AVATAR : Fixing Semantic Bugs with Fix Patterns of Static Analysis Violations
Preprint
Abstract
Fix pattern-based patch generation is a promising direction in Automated Program Repair (APR). Notably, it has been demonstrated to produce more acceptable and correct patches than the patches obtained with mutation operators through genetic programming. The performance of pattern-based APR systems, however, depends on the fix ingredients mined from fix changes in development histories. Unfortunately, collecting a reliable set of bug fixes in repositories can be challenging. In this paper, we propose to investigate the possibility in an APR scenario of leveraging code changes that address violations by static bug detection tools. To that end, we build the AVATAR APR system, which exploits fix patterns of static analysis violations as ingredients for patch generation. Evaluated on the Defects4J benchmark, we show that, assuming a perfect localization of faults, AVATAR can generate correct patches to fix 34/39 bugs. We further find that AVATAR yields performance metrics that are comparable to that of the closely-related approaches in the literature. While AVATAR outperforms many of the state-of-the-art pattern-based APR systems, it is mostly complementary to current approaches. Overall, our study highlights the relevance of static bug finding tools as indirect contributors of fix ingredients for addressing code defects identified with functional test cases.Keywords
All Related Versions
This publication has 13 references indexed in Scilit:
- FixMiner: Mining relevant fix patterns for automated program repairEmpirical Software Engineering, 2020
- Mining Fix Patterns for FindBugs ViolationsIEEE Transactions on Software Engineering, 2018
- DeepBugs: a learning approach to name-based bug detectionProceedings of the ACM on Programming Languages, 2018
- Automatic repair of real bugs in java: a large-scale experiment on the defects4j datasetEmpirical Software Engineering, 2016
- Nopol: Automatic Repair of Conditional Statement Bugs in Java ProgramsIEEE Transactions on Software Engineering, 2016
- A theoretical analysis of the risk evaluation formulas for spectrum-based fault localizationACM Transactions on Software Engineering and Methodology, 2013
- GenProg: A Generic Method for Automatic Software RepairIEEE Transactions on Software Engineering, 2011
- DECOR: A Method for the Specification and Detection of Code and Design SmellsIEEE Transactions on Software Engineering, 2009
- Toward an understanding of bug fix patternsEmpirical Software Engineering, 2008
- Subject independent facial expression recognition with robust face detection using a convolutional neural networkNeural Networks, 2003