History Driven Program Repair
By Xuan-Bach Dinh Le, David Lo, Claire Le Goues. IEEE International Conference on Software Analysis, Evolution, and Reengineering, 2016
405 citations recorded by the source corpus.
Effective automated program repair techniques have great potential to reduce the costs of debugging and maintenance. Previously proposed automated program repair (APR) techniques often follow a generate-and-validate and test-case-driven procedure: They first randomly generate a large pool of fix candidates and then exhaustively validate the quality of the candidates by testing them against existing or provided test suites. Unfortunately, many real-world bugs cannot be repaired by existing techniques even after more than 12 hours of computation in a multi-core cloud environment. More work is needed to advance the capabilities of modern APR techniques. We propose a new technique that utilizes the wealth of bug fixesacross projects in their development history to effectively guide and drive a programrepair process. Our main insight is that recurring bug fixes are common inreal-world applications, and that previously-appearing fix patterns canprovide useful guidance to an automated repair technique. Based on this insight, our technique first automaticallymines bug fix patterns from the history of many projects. We then employ existingmutation operators to generate fix candidates for a given buggy program. Candidates that match frequently occurring historical bug fixes are consideredmore likely to be relevant, and we thus give them priority inthe random search process. Finally, candidates thatpass all the previously failed test cases are recommended as likely fixes. We compare our technique against existinggenerate-and-validate and test-driven APR approaches using 90 bugs from 5 Javaprograms. The experiment results show that our technique can producegood-quality fixes for many more bugs as compared to the baselines, while beingreasonably computationally efficient: it takes less than 20minutes, on average, to correctly fix a bug.
Subfields: Information Systems, Software
View Paper: https://www.semanticscholar.org/paper/a331e24a763fb411a51a4962731976d9030e2556
How researchers see this paper
The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.
In Information Systems
- Chun Xia
- Lingming Zhang
- Michele Tufano
- Tien Nhut Nguyen
- Gabriele Bavota
- Denys Poshyvanyk
- Shaohua Wang
- Yi Li
In Software
Citations in the corpus
- Tree-Transformer: A Transformer-Based Method for Correction of Tree-Structured Data (2019, neutral): “Two successful, recent approaches in this category are that of Le et al., [24] and Long and Rinard [25].”
- Shaping program repair space with existing patches and similar code (2018, methodology): “The results of other approaches come from the corresponding research papers, i.e., ACS [68], HDRepair (HDR) [29], ssFix [65], ELIXIR [54] and JAID [9].”
- Getafix: learning to fix bugs automatically (2019, methodology): “of fix patterns which not only capture the patch to perform, but also enough context to judge which pattern would be the most natural one. We build upon previous research on history-based repair like [7], which has a good chance of producing natural patches. Narrowingthesearchspace. Note the stark c”
- CoCoNuT: combining context-aware neural translation models using ensemble for program repair (2020, neutral): “Suplem eted 7 JAID [12] 9/31 8 HD-Repair* [37] 13/23 9 SketchFix* [27] 19/26 10 ssFix* [86] 20/60 11 CapGen* [82] 21/25 12 ConFix [33] 22/92 13 Elixir* [69] 26/41 14 Hercules [71] 49/72 -”
- Precise Condition Synthesis for Program Repair (2016, methodology): “Please note that in the experiments, the timeout for jGenProg and Nopol was set to three hours [14], the timeout for xPAR and HistoricalFix was set to 90 minutes [18], and the timeout for ACS was 30 minutes.”
- Learning to Repair Software Vulnerabilities with Generative Adversarial Networks (2018, methodology): “Two successful recent approaches are that of Le et al. [11] and Long and Rinard [12].”
- An Empirical Study on Learning Bug-Fixing Patches in the Wild via Neural Machine Translation (2018, methodology): “9. -:22 Tufano et al. similar to the predatory-prey one. Weimer et al. [86] perform program repair using a deterministic search, reducing the search space with program equivalence analysis. Le et al. [42] use the content of previous patches to reward patches that can have a likely better acceptabili”
- CURE: Code-Aware Neural Machine Translation for Automatic Program Repair (2021, methodology): “Type of bugs that CURE is applicable for: Similar to most state-of-the-art G&V APR techniques [1], [3], [5], [8]–[10], [12]–[15], [18]–[20], [33], [34], [49], [51]–[55], CURE is designed to fix single-hunk bugs (i.”
- Context-Aware Patch Generation for Better Automated Program Repair (2018, methodology): “Many of them [16, 19, 20, 29, 36, 45, 46] are known as search-based APR [17] (which may also be referred to as generate-and-validate APR [24, 38, 42] or heuristic-based APR [55]).”
- Agentless: Demystifying LLM-based Software Engineering Agents (2024, background): “Traditional APR techniques can be categorized as template-based [57, 39], heuristic-based [51, 50], and constraint-based [65, 61]”
- Baldur: Whole-Proof Generation and Repair with Large Language Models (2023, background): “, GenProg [44], Prophet [48], AE [88], HDRepair [43], ErrDoc [82], JAID [10], Qlose [17], and Par [38], ssFix [92], CapGen [89], SimFix [36], Hercules [73], Recoder [101], among others).”
- A syntax-guided edit decoder for neural program repair (2021, methodology): “Since Recoder generates only single-hunk patches (patches that only change a consecutive code fragment), we chose 10 traditional single-hunk APR approaches that are often used as baselines in existing studies: jGenProg [35], HDRepair [32], Nopol [73], CapGen [69], SketchFix [22], TBar [40], FixMiner”
- TBar: revisiting template-based automated program repair (2019, methodology): “given that faults in software cause substantial financial losses to the software industry [5, 49], there is a momentum in minimizing the time-to-fix intervals by APR. Recently, various APR approaches [7, 8, 13, 14, 17, 19, 21, 22, 25, 27, 33, 34, 36, 37, 39, 45, 48, 61, 63, 71, 72] have been propose”
- DLFix: Context-based Code Transformation Learning for Automated Program Repair (2020, methodology): “HDRepair [16] was proposed to repair bugs by mining closed frequent bug fix patterns from graph-based representations of real bug fixes.”
- RepairAgent: An Autonomous, LLM-Based Agent for Program Repair (2024, neutral): “Some approaches address it as a search problem based on manually designed code mutation rules and fix patterns [2], [39], [3].”