kirancodes.me
To Proof Maintenance & Beyond!

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.

BibTeX
@article{Xin-al:FSE24,
  author    = {Qi Xin and
               Haojun Wu and
               Jinran Tang and
               Xinyu Liu and
               Steven P. Reiss and
               Jifeng Xuan},
  title     = {Detecting, Creating, Repairing, and Understanding Indivisible {Multi-Hunk} Bugs},
  journal   = {{PACMSE}},
  volume    = {1},
  number    = {{FSE}},
  pages     = {2747--2770},
  year      = {2024},
}

Related papers