Neural Program Repair with Execution-based Backpropagation
He Ye, Matias Martinez, Martin Monperrus
摘要
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.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 61 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- CoCoNuT: combining context-aware neural translation models using ensemble for program repair 引用了 DLFix: context-based code transformation learning for automated program repair
- Impact of Code Language Models on Automated Program Repair 引用了 CoCoNuT: combining context-aware neural translation models using ensemble for program repair
- Impact of Code Language Models on Automated Program Repair 引用了 CURE: Code-Aware Neural Machine Translation for Automatic Program Repair
- Impact of Code Language Models on Automated Program Repair 引用了 DLFix: context-based code transformation learning for automated program repair
- Impact of Code Language Models on Automated Program Repair 引用了 A syntax-guided edit decoder for neural program repair
- Retrieval-Based Prompt Selection for Code-Related Few-Shot Learning 引用了 CoCoNuT: combining context-aware neural translation models using ensemble for program repair
- Retrieval-Based Prompt Selection for Code-Related Few-Shot Learning 引用了 CURE: Code-Aware Neural Machine Translation for Automatic Program Repair
- Retrieval-Based Prompt Selection for Code-Related Few-Shot Learning 引用了 DLFix: context-based code transformation learning for automated program repair
- Retrieval-Based Prompt Selection for Code-Related Few-Shot Learning 引用了 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 引用了 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 引用了 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 引用了 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 引用了 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 引用了 Automated Program Repair in the Era of Large Pre-trained Language Models
- CURE: Code-Aware Neural Machine Translation for Automatic Program Repair 引用了 CoCoNuT: combining context-aware neural translation models using ensemble for program repair
- CURE: Code-Aware Neural Machine Translation for Automatic Program Repair 引用了 DLFix: context-based code transformation learning for automated program repair
- A syntax-guided edit decoder for neural program repair 引用了 CoCoNuT: combining context-aware neural translation models using ensemble for program repair
- A syntax-guided edit decoder for neural program repair 引用了 DLFix: context-based code transformation learning for automated program repair
- Automated Program Repair in the Era of Large Pre-trained Language Models 引用了 CoCoNuT: combining context-aware neural translation models using ensemble for program repair
- Automated Program Repair in the Era of Large Pre-trained Language Models 引用了 CURE: Code-Aware Neural Machine Translation for Automatic Program Repair
- Automated Program Repair in the Era of Large Pre-trained Language Models 引用了 DLFix: context-based code transformation learning for automated program repair
- Automated Program Repair in the Era of Large Pre-trained Language Models 引用了 A syntax-guided edit decoder for neural program repair
- Copiloting the Copilots: Fusing Large Language Models with Completion Engines for Automated Program Repair 引用了 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 引用了 CURE: Code-Aware Neural Machine Translation for Automatic Program Repair
- Copiloting the Copilots: Fusing Large Language Models with Completion Engines for Automated Program Repair 引用了 DLFix: context-based code transformation learning for automated program repair
- Copiloting the Copilots: Fusing Large Language Models with Completion Engines for Automated Program Repair 引用了 A syntax-guided edit decoder for neural program repair
- Copiloting the Copilots: Fusing Large Language Models with Completion Engines for Automated Program Repair 引用了 Automated Program Repair in the Era of Large Pre-trained Language Models
引用它的顶会 Paper61
- Automated Program Repair in the Era of Large Pre-trained Language ModelsChunqiu Steven Xia, Yuxiang Wei, Lingming ZhangICSE 2023 · 321 次引用
- Impact of Code Language Models on Automated Program RepairNan Jiang, Kevin Liu, Thibaud Lutellier, Lin TanICSE 2023 · 164 次引用
- Retrieval-Based Prompt Selection for Code-Related Few-Shot LearningNoor Nashid, Mifta Sintaha, Ali MesbahICSE 2023 · 156 次引用
- Copiloting the Copilots: Fusing Large Language Models with Completion Engines for Automated Program RepairYuxiang Wei, Chunqiu Steven Xia, Lingming ZhangFSE 2023 · 111 次引用
- Automated Program Repair via Conversation: Fixing 162 out of 337 Bugs for $0.42 Each using ChatGPTChunqiu Steven Xia, Lingming ZhangISSTA 2024 · 105 次引用
它引用的 Paper12
- CoCoNuT: combining context-aware neural translation models using ensemble for program repairThibaud Lutellier, Hung Viet Pham, Lawrence Pang, Yitong Li 等ISSTA 2020 · 325 次引用
- CURE: Code-Aware Neural Machine Translation for Automatic Program RepairNan Jiang, Thibaud Lutellier, Lin TanICSE 2021 · 267 次引用
- A syntax-guided edit decoder for neural program repairQihao Zhu, Zeyu Sun, Yuan-an Xiao, Wenjie Zhang 等FSE 2021 · 214 次引用
- DLFix: context-based code transformation learning for automated program repairYi Li, Shaohua Wang, Tien N. NguyenICSE 2020 · 201 次引用
- Big code != big vocabulary: open-vocabulary models for source codeRafael-Michael Karampatsis, Hlib Babii, Romain Robbes, Charles Sutton 等ICSE 2020 · 140 次引用
相关 Paper
- Template-based Neural Program RepairXiangxin Meng, Xu Wang, Hongyu Zhang, Hailong Sun 等ICSE 2023 · 29 次引用
- ITER: Iterative Neural Repair for Multi-Location PatchesHe Ye, Martin MonperrusICSE 2024 · 39 次引用
- Grammar-Based Patches Generation for Automated Program RepairYu Tang, Long Zhou, Ambrosio Blanco, Shujie Liu 等ACL Findings 2021 · 13 次引用
- Tare: Type-Aware Neural Program RepairQihao Zhu, Zeyu Sun, Wenjie Zhang, Yingfei Xiong 等ICSE 2023 · 29 次引用
- VulRepair: a T5-based automated software vulnerability repairMichael Fu, Chakkrit Tantithamthavorn, Trung Le, Van Nguyen 等FSE 2022 · 206 次引用
