MintHint: Automated Synthesis of Repair Hints
Preprint
Abstract
Automating repair of programs is a practically important but extremely challenging task. In this paper, we present MintHint, a novel technique for semi-automated program repair that is a departure from most of today's program-repair techniques. Instead of trying to find an actual repair, which is often practically impossible, MintHint performs statistical correlation analysis to identify expressions that are likely to occur in the repaired code and synthesizes repair hints from these expressions. Intuitively, these repair hints give suggestions to developers on how to modify faulty statements to obtain a repaired version of the code. To synthesize repair hints, MintHint requires a test suite of the faulty program, containing at least one test that triggers the fault. Unlike most approaches that search for an actual repair, MintHint can perform well in the common case in which (1) the search space for repairs does not contain the actual repair or (2) operational specifications obtained from test cases are incomplete or even imperfect. In addition, MintHint can address a number of different types of faults, including incorrect, spurious, and missing expressions. The results of our empirical evaluation of MintHint are promising and provide initial evidence of its effectiveness. When run on five programs and a large number of faults, MintHint was able to produce useful hints for 48 out of the 56 faults considered.Keywords
All Related Versions
This publication has 22 references indexed in Scilit:
- Automated repair of HTML generation errors in PHP applications using string constraint solving2012
- Alternate and Learn: Finding Witnesses without Looking All overLecture Notes in Computer Science, 2012
- Code-based automated program fixing2011
- Specification-Based Program Repair Using SAT2011
- Generating Fixes from Object Behavior Anomalies2009
- BugFix: A learning-based tool to assist developers in fixing bugs2009
- Supporting Controlled Experimentation with Testing Techniques: An Infrastructure and its Potential ImpactEmpirical Software Engineering, 2005
- Program Repair as a Game2005
- Automated Debugging Using Path-Based Weakest Preconditions2004
- Understanding Counterexamples with explain2004