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.
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.
4 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
- Characterizing Multi-Hunk Patches: Divergence, Proximity, and LLM Repair Challenges cites Less training, more repairing please: revisiting automated program repair via zero-shot learning
- Characterizing Multi-Hunk Patches: Divergence, Proximity, and LLM Repair Challenges cites Automated Repair of Programs from Large Language Models
- Characterizing Multi-Hunk Patches: Divergence, Proximity, and LLM Repair Challenges cites DLFix: context-based code transformation learning for automated program repair
- Characterizing Multi-Hunk Patches: Divergence, Proximity, and LLM Repair Challenges cites A syntax-guided edit decoder for neural program repair
- TLR: Codebase-Level C Memory Management Error Repair with Large Language Models cites Automated Program Repair in the Era of Large Pre-trained Language Models
- Less training, more repairing please: revisiting automated program repair via zero-shot learning cites DLFix: context-based code transformation learning for automated program repair
- Less training, more repairing please: revisiting automated program repair via zero-shot learning cites A syntax-guided edit decoder for neural program repair
- Automated Repair of Programs from Large Language Models cites DLFix: context-based code transformation learning for automated program repair
- Automated Repair of Programs from Large Language Models cites A syntax-guided edit decoder for neural program repair
- Well Begun is Half Done: Location-Aware and Trace-Guided Iterative Automated Vulnerability Repair cites Less training, more repairing please: revisiting automated program repair via zero-shot learning
- Well Begun is Half Done: Location-Aware and Trace-Guided Iterative Automated Vulnerability Repair cites DLFix: context-based code transformation learning for automated program repair
- Well Begun is Half Done: Location-Aware and Trace-Guided Iterative Automated Vulnerability Repair cites A syntax-guided edit decoder for neural 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 Less training, more repairing please: revisiting automated program repair via zero-shot learning
- 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
- From Code to Correctness: Closing the Last Mile of Code Generation with Hierarchical Debugging cites DLFix: context-based code transformation learning for automated program repair
- From Code to Correctness: Closing the Last Mile of Code Generation with Hierarchical Debugging cites Automated Program Repair in the Era of Large Pre-trained Language Models
Cited 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
- CascadeFix: Multi-Location Program Repair via Cascading Planning and GenerationHuan Zhang, Li Kuang, Yang Yang, Yilei Fang et al.ACL Findings 2026
- DEAR: A Novel Deep Learning-based Approach for Automated Program RepairYi Li, Shaohua Wang, Tien N. NguyenICSE 2022 · 91 citations
- 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
- On the Effectiveness of Unified Debugging: An Extensive Study on 16 Program Repair SystemsSamuel Benton, Xia Li, Yiling Lou, Lingming ZhangASE 2020 · 35 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
