TBar: revisiting template-based automated program repair
By Kui Liu, Anil Koyuncu, Dongsun Kim, Tégawendé F. Bissyandé. International Symposium on Software Testing and Analysis, 2019
438 citations recorded by the source corpus.
We revisit the performance of template-based APR to build comprehensive knowledge about the effectiveness of fix patterns, and to highlight the importance of complementary steps such as fault localization or donor code retrieval. To that end, we first investigate the literature to collect, summarize and label recurrently-used fix patterns. Based on the investigation, we build TBar, a straightforward APR tool that systematically attempts to apply these fix patterns to program bugs. We thoroughly evaluate TBar on the Defects4J benchmark. In particular, we assess the actual qualitative and quantitative diversity of fix patterns, as well as their effectiveness in yielding plausible or correct patches. Eventually, we find that, assuming a perfect fault localization, TBar correctly/plausibly fixes 74/101 bugs. Replicating a standard and practical pipeline of APR assessment, we demonstrate that TBar correctly fixes 43 bugs from Defects4J, an unprecedented performance in the literature (including all approaches, i.e., template-based, stochastic mutation-based or synthesis-based APR).
Subfields: Information Systems, Software
View Paper: https://www.semanticscholar.org/paper/3c9b9664ca8cbbd17f5153997c276b0ce5c4f3bd
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
In Software
Citations in the corpus
- A syntax-guided edit decoder for neural program repair (2021, methodology): “To check the correctness of the patches, we manually examined every patch if it is the same with or semantically equivalent to the patch provided by Defects4J, as in previous works [15, 24, 36, 40, 44].”
- RepairAgent: An Autonomous, LLM-Based Agent for Program Repair (2024, neutral): “…have explored various approaches to address the challenge of automatically fixing bugs [1], including techniques based on manually designed [2], [3] and (semi-)automatically extracted [4], [5], [6] fix patterns, based on symbolic constraints [7], [8], [9], and various machine learning-based…”
- DLFix: Context-based Code Transformation Learning for Automated Program Repair (2020, methodology): “The fixing patterns, also called fixing templates, couldbe automatically or semi-automatically mined [16,20, 21,27].”
- Can OpenAI's Codex Fix Bugs?: An evaluation on QuixBugs (2022, methodology): “For instance, GenProg [8] or ARJA [29] use genetic programming while PAR [13], ELIXIR [24] or TBar [17] apply pre-defined transformation rules (repair patterns) to the code.”
- 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]”
- Less training, more repairing please: revisiting automated program repair via zero-shot learning (2022, methodology): “These template-based mask line generations are inspired by common fixes for many bugs [25, 38, 57] and also previous APR tools that utilize preset templates to fix bugs [29, 35, 44, 45, 53].”
- Automated Program Repair in the Era of Large Pre-trained Language Models (2022, positive): “Among traditional APR techniques [7]–[18], template-based APR has been widely recognized as the state of the art [19], [20].”
- CoCoNuT: combining context-aware neural translation models using ensemble for program repair (2020, methodology): “First, we consider 13 tools that also use perfect localization for comparison, including TBar, which fixed the most number of bugs in Defects4J .”