TBar: Revisiting Template-based Automated Program Repair

03/20/2019
by   Kui Liu, et al.
0

Fix patterns (a.k.a fix templates) are the main ingredients that drive a significant portion of automated program repair (APR) studies in the literature. As fix patterns become widely adopted in various approaches, it becomes critical to thoroughly assess the effectiveness of existing templates to establish a clear baseline for APR. In this paper, 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 is able to correctly/plausibly fix 74/102 bugs, while a previous baseline (i.e., kPAR) fixes only 36/55 bugs. Replicating a standard and practical pipeline of APR assessment, we demonstrate that TBar can correctly fix 43 bugs from Defects4J, an unprecedented performance in the literature (including all approaches, i.e., template-based, stochastic mutation-based or synthesis-based APR).

READ FULL TEXT
research
09/17/2023

GAMMA: Revisiting Template-based Automated Program Repair via Mask Prediction

Automated program repair (APR) aims to fix software bugs without human i...
research
12/18/2018

You Cannot Fix What You Cannot Find! An Investigation of Fault Localization Bias in Benchmarking Automated Program Repair Systems

Properly benchmarking Automated Program Repair (APR) systems should cont...
research
07/10/2018

Practical Program Repair via Bytecode Mutation

Software debugging is tedious, time-consuming, and even error-prone by i...
research
03/01/2023

The Inversive Relationship Between Bugs and Patches: An Empirical Study

Software bugs pose an ever-present concern for developers, and patching ...
research
12/18/2018

AVATA R : Fixing Semantic Bugs with Fix Patterns of Static Analysis Violations

Fix pattern-based patch generation is a promising direction in Automated...
research
10/03/2018

FixMiner: Mining Relevant Fix Patterns for Automated Program Repair

Code comprehension is critical in software maintenance. Towards providin...
research
07/19/2023

LTL Synthesis on Infinite-State Arenas defined by Programs

This paper deals with the problem of automatically and correctly control...

Please sign up or login with your details

Forgot password? Click here to reset