CURE: Code-Aware Neural Machine Translation for Automatic Program Repair

By Nan Jiang, Thibaud Lutellier, Lin Tan. 2021

415 citations recorded by the source corpus.

Automatic program repair (APR) is crucial to improve software reliability. Recently, neural machine translation (NMT) techniques have been used to automatically fix software bugs. While promising, these approaches have two major limitations. Their search space often does not contain the correct fix, and their search strategy ignores software knowledge such as strict code syntax. Due to these limitations, existing NMT-based techniques underperform the best template-based approaches. We propose CURE, a new NMT-based APR technique with three major novelties. First, CURE pre-trains a programming language (PL) model on a large software codebase to learn developer-like source code before the APR task. Second, CURE designs a new code-aware search strategy that finds more correct fixes by focusing on searching for compilable patches and patches that are close in length to the buggy code. Finally, CURE uses a subword tokenization technique to generate a smaller search space that contains more correct fixes. Our evaluation on two widely-used benchmarks shows that CURE correctly fixes 57 Defects4J bugs and 26 QuixBugs bugs, outperforming all existing APR techniques on both benchmarks.

Subfields: Information Systems, Software, Natural Language Processing, Code Generation & Program Synthesis

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. Neel Sundaresan
  4. Alexey Svyatkovskiy
  5. Prem Devanbu
  6. Ramesh Karri
  7. Hammond A. Pearce
  8. Shuai Lu

In Software

  1. Chun Xia
  2. Lingming Zhang
  3. Neel Sundaresan
  4. Alexey Svyatkovskiy
  5. Prem Devanbu
  6. Michele Tufano
  7. Shuai Lu
  8. Brendan Dolan-Gavitt

In Natural Language Processing

  1. Neel Sundaresan
  2. Alexey Svyatkovskiy
  3. Prem Devanbu
  4. Michele Tufano
  5. Toufique Ahmed
  6. Brendan Dolan-Gavitt
  7. Benjamin Tan
  8. Chun Xia

In Code Generation & Program Synthesis

  1. Prem Devanbu
  2. Brendan Dolan-Gavitt
  3. Benjamin Tan
  4. Chun Xia
  5. Neel Sundaresan
  6. Ramesh Karri
  7. Baleegh Ahmad
  8. Lingming Zhang

Citations in the corpus