Neural Program Repair with Execution-based Backpropagation
He Ye, Matias Martinez, Martin Monperrus
Abstract
Neural machine translation (NMT) architectures have achieved promising results for automatic program repair. Yet, they have the limitation of generating low-quality patches (e.g., not compilable patches). This is because the existing works only optimize a purely syntactic loss function based on characters and tokens without incorporating program-specific information during neural network weight optimization. In this paper, we propose a novel program repair model called RewardRepair. The core novelty of RewardRepair is to improve NMT-based program repair with a loss function based on program compilation and test execution information, rewarding the network to produce patches that compile and that do not overfit. We conduct several experiments to evaluate RewardRepair showing that it is feasible and effective to use compilation and test execution results to optimize the underlying neural repair model. RewardRepair correctly repairs 207 bugs over four benchmarks. we report on repair success for 121 bugs that are fixed for the first time in the literature. Also, RewardRepair produces up to 45.3% of compilable patches, an improvement over the 39% by the state-of-the-art.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
61 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- CoCoNuT: combining context-aware neural translation models using ensemble for program repair cites DLFix: context-based code transformation learning for automated program repair
- Impact of Code Language Models on Automated Program Repair cites CoCoNuT: combining context-aware neural translation models using ensemble for program repair
- Impact of Code Language Models on Automated Program Repair cites CURE: Code-Aware Neural Machine Translation for Automatic Program Repair
- Impact of Code Language Models on Automated Program Repair cites DLFix: context-based code transformation learning for automated program repair
- Impact of Code Language Models on Automated Program Repair cites A syntax-guided edit decoder for neural program repair
- Retrieval-Based Prompt Selection for Code-Related Few-Shot Learning cites CoCoNuT: combining context-aware neural translation models using ensemble for program repair
- Retrieval-Based Prompt Selection for Code-Related Few-Shot Learning cites CURE: Code-Aware Neural Machine Translation for Automatic Program Repair
- Retrieval-Based Prompt Selection for Code-Related Few-Shot Learning cites DLFix: context-based code transformation learning for automated program repair
- Retrieval-Based Prompt Selection for Code-Related Few-Shot Learning cites A syntax-guided edit decoder for neural program repair
- Automated Program Repair via Conversation: Fixing 162 out of 337 Bugs for $0.42 Each using ChatGPT cites CoCoNuT: combining context-aware neural translation models using ensemble for program repair
- Automated Program Repair via Conversation: Fixing 162 out of 337 Bugs for $0.42 Each using ChatGPT cites CURE: Code-Aware Neural Machine Translation for Automatic Program Repair
- Automated Program Repair via Conversation: Fixing 162 out of 337 Bugs for $0.42 Each using ChatGPT cites DLFix: context-based code transformation learning for automated program repair
- Automated Program Repair via Conversation: Fixing 162 out of 337 Bugs for $0.42 Each using ChatGPT cites A syntax-guided edit decoder for neural program repair
- Automated Program Repair via Conversation: Fixing 162 out of 337 Bugs for $0.42 Each using ChatGPT cites Automated Program Repair in the Era of Large Pre-trained Language Models
- CURE: Code-Aware Neural Machine Translation for Automatic Program Repair cites CoCoNuT: combining context-aware neural translation models using ensemble for program repair
- CURE: Code-Aware Neural Machine Translation for Automatic Program Repair cites DLFix: context-based code transformation learning for automated program repair
- A syntax-guided edit decoder for neural program repair cites CoCoNuT: combining context-aware neural translation models using ensemble for program repair
- A syntax-guided edit decoder for neural program repair cites DLFix: context-based code transformation learning for automated program repair
- Automated Program Repair in the Era of Large Pre-trained Language Models cites CoCoNuT: combining context-aware neural translation models using ensemble for program repair
- Automated Program Repair in the Era of Large Pre-trained Language Models cites CURE: Code-Aware Neural Machine Translation for Automatic Program Repair
- Automated Program Repair in the Era of Large Pre-trained Language Models cites DLFix: context-based code transformation learning for automated program repair
- Automated Program Repair in the Era of Large Pre-trained Language Models cites A syntax-guided edit decoder for neural program repair
- Copiloting the Copilots: Fusing Large Language Models with Completion Engines for Automated Program Repair cites CoCoNuT: combining context-aware neural translation models using ensemble for program repair
- Copiloting the Copilots: Fusing Large Language Models with Completion Engines for Automated Program Repair cites CURE: Code-Aware Neural Machine Translation for Automatic Program Repair
- Copiloting the Copilots: Fusing Large Language Models with Completion Engines for Automated Program Repair cites DLFix: context-based code transformation learning for automated program repair
- Copiloting the Copilots: Fusing Large Language Models with Completion Engines for Automated Program Repair cites A syntax-guided edit decoder for neural program repair
- Copiloting the Copilots: Fusing Large Language Models with Completion Engines for Automated Program Repair cites Automated Program Repair in the Era of Large Pre-trained Language Models
Cited by top-tier papers61
- Automated Program Repair in the Era of Large Pre-trained Language ModelsChunqiu Steven Xia, Yuxiang Wei, Lingming ZhangICSE 2023 · 321 citations
- Impact of Code Language Models on Automated Program RepairNan Jiang, Kevin Liu, Thibaud Lutellier, Lin TanICSE 2023 · 164 citations
- Retrieval-Based Prompt Selection for Code-Related Few-Shot LearningNoor Nashid, Mifta Sintaha, Ali MesbahICSE 2023 · 156 citations
- Copiloting the Copilots: Fusing Large Language Models with Completion Engines for Automated Program RepairYuxiang Wei, Chunqiu Steven Xia, Lingming ZhangFSE 2023 · 111 citations
- Automated Program Repair via Conversation: Fixing 162 out of 337 Bugs for $0.42 Each using ChatGPTChunqiu Steven Xia, Lingming ZhangISSTA 2024 · 105 citations
Builds on12
- CoCoNuT: combining context-aware neural translation models using ensemble for program repairThibaud Lutellier, Hung Viet Pham, Lawrence Pang, Yitong Li et al.ISSTA 2020 · 325 citations
- CURE: Code-Aware Neural Machine Translation for Automatic Program RepairNan Jiang, Thibaud Lutellier, Lin TanICSE 2021 · 267 citations
- A syntax-guided edit decoder for neural program repairQihao Zhu, Zeyu Sun, Yuan-an Xiao, Wenjie Zhang et al.FSE 2021 · 214 citations
- DLFix: context-based code transformation learning for automated program repairYi Li, Shaohua Wang, Tien N. NguyenICSE 2020 · 201 citations
- Big code != big vocabulary: open-vocabulary models for source codeRafael-Michael Karampatsis, Hlib Babii, Romain Robbes, Charles Sutton et al.ICSE 2020 · 140 citations
Related papers
- Template-based Neural Program RepairXiangxin Meng, Xu Wang, Hongyu Zhang, Hailong Sun et al.ICSE 2023 · 29 citations
- ITER: Iterative Neural Repair for Multi-Location PatchesHe Ye, Martin MonperrusICSE 2024 · 39 citations
- Grammar-Based Patches Generation for Automated Program RepairYu Tang, Long Zhou, Ambrosio Blanco, Shujie Liu et al.ACL Findings 2021 · 13 citations
- Tare: Type-Aware Neural Program RepairQihao Zhu, Zeyu Sun, Wenjie Zhang, Yingfei Xiong et al.ICSE 2023 · 29 citations
- VulRepair: a T5-based automated software vulnerability repairMichael Fu, Chakkrit Tantithamthavorn, Trung Le, Van Nguyen et al.FSE 2022 · 206 citations
