CoCoNuT: combining context-aware neural translation models using ensemble for program repair

By Thibaud Lutellier, Hung Viet Pham, Lawrence Pang, Yitong Li, Moshi Wei, Lin Tan. 2020

436 citations recorded by the source corpus.

Automated generate-and-validate (GV) program repair techniques (APR) typically rely on hard-coded rules, thus only fixing bugs following specific fix patterns. These rules require a significant amount of manual effort to discover and it is hard to adapt these rules to different programming languages. To address these challenges, we propose a new G&V technique—CoCoNuT, which uses ensemble learning on the combination of convolutional neural networks (CNNs) and a new context-aware neural machine translation (NMT) architecture to automatically fix bugs in multiple programming languages. To better represent the context of a bug, we introduce a new context-aware NMT architecture that represents the buggy source code and its surrounding context separately. CoCoNuT uses CNNs instead of recurrent neural networks (RNNs), since CNN layers can be stacked to extract hierarchical features and better model source code at different granularity levels (e.g., statements and functions). In addition, CoCoNuT takes advantage of the randomness in hyperparameter tuning to build multiple models that fix different bugs and combines these models using ensemble learning to fix more bugs. Our evaluation on six popular benchmarks for four programming languages (Java, C, Python, and JavaScript) shows that CoCoNuT correctly fixes (i.e., the first generated patch is semantically equivalent to the developer’s patch) 509 bugs, including 309 bugs that are fixed by none of the 27 techniques with which we compare.

Subfields: Information Systems, Software, Code Generation & Program Synthesis, Program Analysis & Verification

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. Chun Xia
  2. Lingming Zhang
  3. Vincent J. Hellendoorn
  4. Baishakhi Ray
  5. Prem Devanbu
  6. Neel Sundaresan
  7. Alexey Svyatkovskiy
  8. Yangruibo Ding

In Software

  1. Chun Xia
  2. Lingming Zhang
  3. Prem Devanbu
  4. Vincent J. Hellendoorn
  5. Neel Sundaresan
  6. Alexey Svyatkovskiy
  7. Baishakhi Ray
  8. Yangruibo Ding

In Code Generation & Program Synthesis

  1. Prem Devanbu
  2. Chun Xia
  3. Lingming Zhang
  4. Yangruibo Ding
  5. Baishakhi Ray
  6. Vincent J. Hellendoorn
  7. Wasi Uddin Ahmad
  8. Saikat Chakraborty

In Program Analysis & Verification

  1. Vincent J. Hellendoorn
  2. Chun Xia
  3. Lingming Zhang
  4. Prem Devanbu
  5. Lu Zhang
  6. Neel Sundaresan
  7. Yangruibo Ding
  8. Baishakhi Ray

Citations in the corpus