A syntax-guided edit decoder for neural program repair
By Qihao Zhu, Zeyu Sun, Yuan-an Xiao, Wenjie Zhang, Kang Yuan, Yingfei Xiong, Lu Zhang. ESEC/SIGSOFT FSE, 2021
301 citations recorded by the source corpus.
Automated Program Repair (APR) helps improve the efficiency of software development and maintenance. Recent APR techniques use deep learning, particularly the encoder-decoder architecture, to generate patches. Though existing DL-based APR approaches have proposed different encoder architectures, the decoder remains to be the standard one, which generates a sequence of tokens one by one to replace the faulty statement. This decoder has multiple limitations: 1) allowing to generate syntactically incorrect programs, 2) inefficiently representing small edits, and 3) not being able to generate project-specific identifiers. In this paper, we propose Recoder, a syntax-guided edit decoder with placeholder generation. Recoder is novel in multiple aspects: 1) Recoder generates edits rather than modified code, allowing efficient representation of small edits; 2) Recoder is syntax-guided, with the novel provider/decider architecture to ensure the syntactic correctness of the patched program and accurate generation; 3) Recoder generates placeholders that could be instantiated as project-specific identifiers later. We conduct experiments to evaluate Recoder on 395 bugs from Defects4J v1.2, 420 additional bugs from Defects4J v2.0, 297 bugs from IntroClassJava and 40 bugs from QuixBugs. Our results show that Recoder repairs 53 bugs on Defects4J v1.2, which achieves 26.2% (11 bugs) improvement over the previous state-of-the-art approach for single-hunk bugs (TBar). Importantly, to our knowledge, Recoder is the first DL-based APR approach that has outperformed the traditional APR approaches on this benchmark. Furthermore, Recoder repairs 19 bugs on the additional bugs from Defects4J v2.0, which is 137.5% (11 bugs) more than TBar and 850% (17 bugs) more than SimFix. Recoder also achieves 775% (31 bugs) and 30.8% (4 bugs) improvement on IntroClassJava and QuixBugs over the baselines respectively. These results suggest that Recoder has better generalizability than existing APR approaches.
Subfields: Artificial Intelligence, Information Systems, Software
View Paper: https://www.semanticscholar.org/paper/0e587fba8c75f5861ce68559f5a007d508011534
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
- Neel Sundaresan
- Alexey Svyatkovskiy
- Chun Xia
- Markus Norman Rabe
- Ma Jin
- Shuai Lu
- Lingming Zhang
- Emily First
In Information Systems
- Chun Xia
- Lingming Zhang
- Neel Sundaresan
- Alexey Svyatkovskiy
- Michele Tufano
- Shuai Lu
- Markus Norman Rabe
- Emily First
In Software
- Chun Xia
- Lingming Zhang
- Neel Sundaresan
- Alexey Svyatkovskiy
- Michele Tufano
- Shuai Lu
- Markus Norman Rabe
- Emily First
Citations in the corpus
- AutoCodeRover: Autonomous Program Improvement (2024, unknown): “Learning-based APR techniques [20, 30, 39] often train a deep learning model with large code repositories and are guided by a specific representation of code syntax and semantics to predict the next tokens that are most likely to be correct patch.”
- InferFix: End-to-End Program Repair with LLMs (2023, background): “Recoder [36] generates edits in a syntax-guided manner and with a provider/decider architecture and placeholder generation.”
- 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].”
- Baldur: Whole-Proof Generation and Repair with Large Language Models (2023, methodology): “The automated program repair field studies the task of taking a program with a bug, evidenced by one or more failing tests, and automatically producing a modified version of the program that passes all the tests [50].”
- RepairAgent: An Autonomous, LLM-Based Agent for Program Repair (2024, unknown): “…the challenge of automatically fixing bugs [1], including techniques based on manually designed [2], [3] and (semi-)automatically extracted [4], [5], [6] fix patterns, based on symbolic constraints [7], [8], [9], and various machine learning-based approaches [10], [11], [12], [13], [14], [15], [16].”
- Automated Program Repair in the Era of Large Pre-trained Language Models (2022, unknown): “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].”