Extracting Concise Bug-Fixing Patches from Human-Written Patches in Version Control Systems
Yanjie Jiang, Hui Liu, Nan Niu, Lu Zhang, Yamin Hu
摘要
High-quality and large-scale repositories of real bugs and their concise patches collected from real-world applications are critical for research in software engineering community. In such a repository, each real bug is explicitly associated with its fix. Therefore, on one side, the real bugs and their fixes may inspire novel approaches for finding, locating, and repairing software bugs; on the other side, the real bugs and their fixes are indispensable for rigorous and meaningful evaluation of approaches for software testing, fault localization, and program repair. To this end, a number of such repositories, e.g., Defects4J, have been proposed. However, such repositories are rather small because their construction involves expensive human intervention. Although bug-fixing code commits as well as associated test cases could be retrieved from version control systems automatically, existing approaches could not yet automatically extract concise bug-fixing patches from bug-fixing commits because such commits often involve bug-irrelevant changes. In this paper, we propose an automatic approach, called BugBuilder, to extracting complete and concise bug-fixing patches from human-written patches in version control systems. It excludes refactorings by detecting refactorings involved in bug-fixing commits, and reapplying detected refactorings on the faulty version. It enumerates all subsets of the remaining part and validates them on test cases. If none of the subsets has the potential to be a complete bug-fixing patch, the remaining part as a whole is taken as a complete and concise bug-fixing patch. Evaluation results on 809 real bug-fixing commits in Defects4J suggest that BugBuilder successfully generated complete and concise bug-fixing patches for forty percent of the bug-fixing commits, and its precision (99%) was even higher than human experts.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 16 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Automated Program Repair via Conversation: Fixing 162 out of 337 Bugs for $0.42 Each using ChatGPT 引用了 Less training, more repairing please: revisiting automated program repair via zero-shot learning
- 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
- Less training, more repairing please: revisiting automated program repair via zero-shot learning 引用了 A syntax-guided edit decoder for neural program repair
- Copiloting the Copilots: Fusing Large Language Models with Completion Engines for Automated Program Repair 引用了 Less training, more repairing please: revisiting automated program repair via zero-shot learning
- Copiloting the Copilots: Fusing Large Language Models with Completion Engines for Automated Program Repair 引用了 A syntax-guided edit decoder for neural program repair
引用它的顶会 Paper16
- Less training, more repairing please: revisiting automated program repair via zero-shot learningChunqiu Steven Xia, Lingming ZhangFSE 2022 · 223 次引用
- A syntax-guided edit decoder for neural program repairQihao Zhu, Zeyu Sun, Yuan-an Xiao, Wenjie Zhang 等FSE 2021 · 214 次引用
- Boosting coverage-based fault localization via graph-based representation learningYiling Lou, Qihao Zhu, Jinhao Dong, Xia Li 等FSE 2021 · 157 次引用
- 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 次引用
相关 Paper
- Can automated program repair refine fault localization? a unified debugging approachYiling Lou, Ali Ghanbari, Xia Li, Lingming Zhang 等ISSTA 2020 · 99 次引用
- RegMiner: towards constructing a large regression dataset from code evolution historyXuezhi Song, Yun Lin, Siang Hwee Ng, Yijian Wu 等ISSTA 2022 · 11 次引用
- Detecting, Creating, Repairing, and Understanding Indivisible Multi-Hunk BugsQi Xin, Haojun Wu, Jinran Tang, Xinyu Liu 等FSE 2024 · 3 次引用
- CascadeFix: Multi-Location Program Repair via Cascading Planning and GenerationHuan Zhang, Li Kuang, Yang Yang, Yilei Fang 等ACL Findings 2026
- Better Automatic Program Repair by Using Bug Reports and Tests TogetherManish Motwani, Yuriy BrunICSE 2023 · 22 次引用
