Semantic Code Repair using Neuro-Symbolic Transformation Networks

By Jacob Devlin, Jonathan Uesato, Rishabh Singh, Pushmeet Kohli. 2017

53 citations recorded by the source corpus.

We study the problem of semantic code repair, which can be broadly defined as automatically fixing non-syntactic bugs in source code. The majority of past work in semantic code repair assumed access to unit tests against which candidate repairs could be validated. In contrast, the goal here is to develop a strong statistical model to accurately predict both bug locations and exact fixes without access to information about the intended correct behavior of the program. Achieving such a goal requires a robust contextual repair model, which we train on a large corpus of real-world source code that has been augmented with synthetically injected bugs. Our framework adopts a two-stage approach where first a large set of repair candidates are generated by rule-based processors, and then these candidates are scored by a statistical model using a novel neural network architecture which we refer to as Share, Specialize, and Compete. Specifically, the architecture (1) generates a shared encoding of the source code using an RNN over the abstract syntax tree, (2) scores each candidate repair using specialized network modules, and (3) then normalizes these scores together so they can compete against one another in comparable probability space. We evaluate our model on a real-world test set gathered from GitHub containing four common categories of bugs. Our model is able to predict the exact correct repair 41\% of the time with a single guess, compared to 13\% accuracy for an attentional sequence-to-sequence model.

Subfields: Information Systems, Software, Natural Language Processing

How researchers see this paper

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

In Information Systems

  1. Percy Liang
  2. Petros Maniatis
  3. Aditya Kanade
  4. Rishabh Singh
  5. Pushmeet Kohli
  6. David Bieber
  7. Neel Sundaresan
  8. Alexey Svyatkovskiy

In Software

  1. Rishabh Singh
  2. Pushmeet Kohli
  3. Aditya Kanade
  4. Neel Sundaresan
  5. Percy Liang
  6. Jacob A. Harer
  7. Alexey Svyatkovskiy
  8. Peter Chin

In Natural Language Processing

  1. Percy Liang
  2. Mohit Bansal
  3. Graham Neubig
  4. Jianfeng Gao
  5. Christopher D. Manning
  6. Kyunghyun Cho
  7. Quoc V. Le
  8. Richard Socher

Citations in the corpus