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
- Chun Xia
- Lingming Zhang
- Neel Sundaresan
- Alexey Svyatkovskiy
- Prem Devanbu
- Ramesh Karri
- Hammond A. Pearce
- Shuai Lu
In Software
- Chun Xia
- Lingming Zhang
- Neel Sundaresan
- Alexey Svyatkovskiy
- Prem Devanbu
- Michele Tufano
- Shuai Lu
- Brendan Dolan-Gavitt
In Natural Language Processing
- Neel Sundaresan
- Alexey Svyatkovskiy
- Prem Devanbu
- Michele Tufano
- Toufique Ahmed
- Brendan Dolan-Gavitt
- Benjamin Tan
- Chun Xia
In Code Generation & Program Synthesis
- Prem Devanbu
- Brendan Dolan-Gavitt
- Benjamin Tan
- Chun Xia
- Neel Sundaresan
- Ramesh Karri
- Baleegh Ahmad
- Lingming Zhang
Citations in the corpus
- Asleep at the Keyboard? Assessing the Security of GitHub Copilot’s Code Contributions (2021, methodology): “With recent advancements in the domain of deep learning (DL) and NLP, sophisticated models can perform sophisticated interventions on a code base, such as automated program repair [8].”
- Multilingual training for Software Engineering (2021, background): “This approach is known to achieve state-of-the-art performance in both natural language processing, and software-related tasks [3, 4, 11, 18, 22, 32, 33, 35, 50, 75].”
- A Survey on Large Language Models for Code Generation (2024, neutral): “A competent data mining expert needs a foundational education in computer science or related fields along with practical experience in programming languages (PLs), such as Python and R [2].”
- InferFix: End-to-End Program Repair with LLMs (2023, methodology): “Recently CURE [14] has reported state-of-the-art results on Defects4J and QuixBugs datasets, improving over NMT-based APR techniques with the use of a pre-trained”
- Less training, more repairing please: revisiting automated program repair via zero-shot learning (2022, methodology): “Current learning-based APR tools first pass the context including the buggy code elements into an encoder as plain texts [32, 51] or structured representations [42, 80].”
- An Empirical Cybersecurity Evaluation of GitHub Copilot's Code Contributions (2021, methodology): “With recent advancements in the domain of deep learning (DL) and NLP, sophisticated models can perform sophisticated interventions on a code base, such as automated program repair [8].”
- Examining Zero-Shot Vulnerability Repair with Large Language Models (2021, methodology): “first pre-trains a model on a large software code-base to “learn developer-like source code” before fine-tuning to specialize on the program repair task [14].”
- Automated Program Repair in the Era of Large Pre-trained Language Models (2022, neutral): “While learning-based APR tools have shown improvements in both the number and variety of bugs that can be fixed [21], [22], they are still restricted by their training data which may contain unrelated commits and only contain limited bug-fix types, which may not generalize to unseen bug types [26].”