Neural Networks for Modeling Source Code Edits

By Rui Zhao, David Bieber, Kevin Swersky, Daniel Tarlow. 2018

12 citations recorded by the source corpus.

Programming languages are emerging as a challenging and interesting domain for machine learning. A core task, which has received significant attention in recent years, is building generative models of source code. However, to our knowledge, previous generative models have always been framed in terms of generating static snapshots of code. In this work, we instead treat source code as a dynamic object and tackle the problem of modeling the edits that software developers make to source code files. This requires extracting intent from previous edits and leveraging it to generate subsequent edits. We develop several neural networks and use synthetic data to test their ability to learn challenging edit patterns that require strong generalization. We then collect and train our models on a large-scale dataset of Google source code, consisting of millions of fine-grained edits from thousands of Python developers. From the modeling perspective, our main conclusion is that a new composition of attentional and pointer network components provides the best overall performance and scalability. From the application perspective, our results provide preliminary evidence of the feasibility of developing tools that learn to predict future edits.

Subfields: Artificial Intelligence, Information Systems, Natural Language Processing, Signal Processing

How researchers see this paper

The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.

In Artificial Intelligence

  1. Percy Liang
  2. Uri Alon
  3. Omer Levy
  4. Charles Sutton
  5. Eran Yahav
  6. Luke S. Zettlemoyer
  7. Graham Neubig
  8. Miltiadis Allamanis

In Information Systems

  1. Uri Alon
  2. Eran Yahav
  3. Charles Sutton
  4. Miltiadis Allamanis
  5. Percy Liang
  6. Michael Pradel
  7. Michihiro Yasunaga
  8. Omer Levy

In Natural Language Processing

  1. Uri Alon
  2. Eran Yahav
  3. Omer Levy
  4. Percy Liang
  5. Charles Sutton
  6. Miltiadis Allamanis
  7. Michihiro Yasunaga
  8. Luke S. Zettlemoyer

In Signal Processing

  1. Uri Alon
  2. Eran Yahav
  3. Omer Levy
  4. Satish Chandra
  5. Michihiro Yasunaga
  6. Charles Sutton
  7. Roy Sadaka
  8. Michael Pradel

Citations in the corpus