Coder Social home page Coder Social logo

epochx / commitgen Goto Github PK

View Code? Open in Web Editor NEW
63.0 4.0 27.0 116 KB

Code and data for the paper "A Neural Architecture for Generating Natural Language Descriptions from Source Code Changes"

Lua 16.39% Python 16.42% Shell 0.74% Jupyter Notebook 66.46%

commitgen's Introduction

A Neural Architecture for Generating Natural Language Descriptions from Source Code Changes

  • Requirements

  • Setup environment

    1. Clone this repositoty: cd ~ git clone https://github.com/epochx/commitgen-dev.git
    2. Create data path: mkdir ~/data/preprocessing
    3. Export env variable: export env WORK_DIR=~/data (without trailing slash!)
  • Download our paper data:

    1. Get the raw commit data used in our paper from https://osf.io/67kyc/?view_only=ad588fe5d1a14dd795553fb4951b5bf9 (click on "OSF Storage" and then on "Download as zip".) Unzip the file where convenient.
    2. Unzip the desired dataset zip and move the resulting folder to ~/data.
  • Pre-process data

    1. Parse and filter commits and messages: cd ~/commitgen python ./preprocess.py FOLDER_NAME --language LANGUAGE, where FOLDER_NAME is the name of the folder from the previous step. Add the '--atomic' flag to keep only atomic commits. This will generate a pre-processed version of the dataset in a pickle file in ~/data/preprocessing. Try python ./preprocess.py --help for more details on additional pre-processing parameters.
    2. Generate training data: cd ~/commitgen ./buildData.sh PICKLE_FILE_NAME LANGUAGE (PICKLE_FILE_NAME with no .pickle).
  • Train the model 1.- Run the model cd ~/commitgen ./run.sh PICKLE_FILE_NAME LANGUAGE (PICKLE_FILE_NAME with no .pickle)

You can also dowload additional github project data by using our crawler do cd ~/commitgen and run python crawl_commits.py --help for more details on how to do it.

commitgen's People

Contributors

epochx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

commitgen's Issues

dataset `keras` and some questions about preprocessing

Thanks for your wonderful work!

May I ask for the raw data which named keras which you mentioned in your paper.
When I try to preprocess the data, I find it is missing.
I had already downloaded other data from https://osf.io/67kyc/?view_only=ad588fe5d1a14dd795553fb4951b5bf9

By the way, when I try to preprocess (./preprocess.py FOLDER_NAME --language LANGUAGE), there are a lot of warnings.
For example, when I run python2 preprocess.py Theano_commits --language python,there are a lot of warnings like .../commitgen/commitgen/code.py:209: UserWarning: 'ascii' codec can't encode character u'\u2014' in position 61: ordinal not in range(128) warnings.warn(str(e))
Meantime, the number of commits parsed is less than the extracted.
Do they influenced the final results?
Could you tell me about your developing environment?

Looking forward to your reply!

Thanks a lot!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.