Detecting, Creating, Repairing, and Understanding Indivisible Multi-Hunk Bugs
Qi Xin, Haojun Wu, Jinran Tang, Xinyu Liu, Steven P. Reiss, Jifeng Xuan
Abstract
This paper presents our approach proposed to detect and create indivisible multi-hunk bugs, an evaluation of existing repair techniques based on these bugs, and a study of the patches of these bugs constructed by the developers and existing tools. Multi-hunk bug repair aims to deal with complex bugs by fixing multiple locations of the program. Previous research on multi-hunk bug repair is severely misguided, as the evaluation of previous techniques is predominantly based on the Defects4J dataset containing a great deal of divisible multi-hunk bugs. A divisible multi-hunk bug is essentially a combination of multiple bugs triggering different failures and is uncommon while debugging, as the developer typically deals with one failure at a time. To address this problem and provide a better basis for multi-hunk bug repair, we propose an enumeration-based approach IBugFinder, which given a bug dataset can automatically detect divisible and indivisible bugs in the dataset and further isolate the divisible bugs into new indivisible bugs. We applied IBugFinder to 281 multi-hunk bugs from the Defects4J dataset. IBugFinder identified 139 divisible bugs and created 249 new bugs among which 105 are multi-hunk.
We evaluated existing repair techniques with the indivisible multi-hunk bugs detected and created by IBugFinder and found that these techniques repaired only a small number of bugs suggesting weak multi-hunk repair abilities. We further studied the patches of indivisible multi-hunk bugs constructed by the developers and the various tools with a focus on understanding the relationships of the partial patches made at different locations. The study has led to the identification of 8 partial patch relationships, which suggest different strategies for multi-hunk patch generation and provide important implication for multi-hunk bug repair.
• Software and its engineering → Software creation and management.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 4a63d4ee-8fa8-48c5-81d7-fd59a9f11208Cited by top-tier papers4
- From Code to Correctness: Closing the Last Mile of Code Generation with Hierarchical DebuggingYuling Shi, Songsong Wang, Chengcheng Wan, Min Wang et al.ICSE 2026 · 4 citations
- Characterizing Multi-Hunk Patches: Divergence, Proximity, and LLM Repair ChallengesNoor Nashid, Daniel Ding, Keheliya Gallaba, Ahmed E. Hassan et al.ASE 2025 · 1 citation
- TLR: Codebase-Level C Memory Management Error Repair with Large Language ModelsXiao Cheng, Zhihao Guo, Huan Huo, Yulei SuiFSE 2026 · 1 citation
- Well Begun is Half Done: Location-Aware and Trace-Guided Iterative Automated Vulnerability RepairZhenlei Ye, Xiaobing Sun, Sicong Cao, Lili Bo et al.ICSE 2026
Builds on16
- Automated Program Repair in the Era of Large Pre-trained Language ModelsChunqiu Steven Xia, Yuxiang Wei, Lingming ZhangICSE 2023 · 321 citations
- Less training, more repairing please: revisiting automated program repair via zero-shot learningChunqiu Steven Xia, Lingming ZhangFSE 2022 · 223 citations
- A syntax-guided edit decoder for neural program repairQihao Zhu, Zeyu Sun, Yuan-an Xiao, Wenjie Zhang et al.FSE 2021 · 214 citations
- Automated Repair of Programs from Large Language ModelsZhiyu Fan, Xiang Gao, Martin Mirchev, Abhik Roychoudhury et al.ICSE 2023 · 213 citations
- DLFix: context-based code transformation learning for automated program repairYi Li, Shaohua Wang, Tien N. NguyenICSE 2020 · 201 citations
Related papers
- Extracting Concise Bug-Fixing Patches from Human-Written Patches in Version Control SystemsYanjie Jiang, Hui Liu, Nan Niu, Lu Zhang et al.ICSE 2021 · 38 citations
- Benchmarking Automated Program Repair: An Extensive Study on Both Real-World and Artificial BugsYicheng Ouyang, Jun Yang, Lingming ZhangISSTA 2024 · 8 citations
- PReMM: LLM-Based Program Repair for Multi-method Bugs via Divide and ConquerLinna Xie, Zhong Li, Yu Pei, Zhongzhen Wen et al.OOPSLA 2025 · 1 citation
- DEAR: A Novel Deep Learning-based Approach for Automated Program RepairYi Li, Shaohua Wang, Tien N. NguyenICSE 2022 · 91 citations
- One Size Does Not Fit All: Multi-granularity Patch Generation for Better Automated Program RepairBo Lin, Shangwen Wang, Ming Wen, Liqian Chen et al.ISSTA 2024 · 10 citations
