FixMiner: Mining Relevant Fix Patterns for Automated Program Repair

10/03/2018
by   Anil Koyuncu, et al.
0

Code comprehension is critical in software maintenance. Towards providing tools and approaches to support maintenance tasks, researchers have investigated various research lines related to how software code can be described in an abstract form. So far, studies on change pattern mining, code clone detection, or semantic patch inference have mainly adopted text-, token- and tree-based representations as the basis for computing similarity among code fragments. Although, in general, existing techniques form clusters of "similar" code, our experience in patch mining has revealed that clusters of patches formed by such techniques do not usually carry explainable semantics that can be associated to bug-fixing patterns. In this paper, we propose a novel, automated approach for mining semantically-relevant fix patterns based on an iterative, three-fold, clustering strategy. Our technique, FixMiner, leverages different tree representations for each round of clustering: the Abstract syntax tree, the edit actions tree, and the code context tree. We have evaluated FixMiner on thousands of software patches collected from open source projects. Preliminary results show that we are able to mine accurate patterns, efficiently exploiting change information in AST diff trees. Eventually, FixMiner yields patterns which can be associated to the semantics of the bugs that the associated patches address. We further leverage the mined patterns to implement an automated program repair pipeline with which we are able to correctly fix 25 bugs from the Defects4J benchmark. Beyond this quantitative performance, we show that the mined fix patterns are sufficiently relevant to produce patches with a high probability of correctness: 80 generated plausible patches are correct, while the closest related works, namely HDRepair and SimFix, achieve respectively 26

READ FULL TEXT
research
02/03/2023

KNOD: Domain Knowledge Distilled Tree Decoder for Automated Program Repair

Automated Program Repair (APR) improves software reliability by generati...
research
01/19/2018

Dissection of a Bug Dataset: Anatomy of 395 Patches from Defects4J

Well-designed and publicly available datasets of bugs are an invaluable ...
research
07/09/2021

Sirius: Static Program Repair with Dependence Graph-Based Systematic Edit Patterns

Software development often involves systematic edits, similar but nonide...
research
07/30/2018

Towards an automated approach for bug fix pattern detection

The characterization of bug datasets is essential to support the evaluat...
research
12/18/2018

AVATAR : Fixing Semantic Bugs with Fix Patterns of Static Analysis Violations

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

TBar: Revisiting Template-based Automated Program Repair

Fix patterns (a.k.a fix templates) are the main ingredients that drive a...
research
11/26/2020

FlexiRepair: Transparent Program Repair with Generic Patches

Template-based program repair research is in need for a common ground to...

Please sign up or login with your details

Forgot password? Click here to reset