Making Better Use of Repair Templates in Automated Program Repair: A Multi-Objective Approach

The automation of program repair can be coached in terms of search algorithms. Repair templates derived from common bug-fix patterns can be used to determine a promising search space with potentially many correct patches, a space that can be effectively explored by GP methods. Here we propose a new repair system, ARJA-p, extended from our earlier ARJA system of bug repair for JAVA, which integrates and enhances the performance of the first approach that combines repair templates and EC, PAR. Empirical results on 224 real bugs in Defects4J show that ARJA-p outperforms state-of-the-art repair approaches by a large margin, both in terms of the number of bugs fixed and of their correctness. Specifically, ARJA-p can increase the number of fixed bugs in Defects4J by 29.2% (from 65 to 84) and the number of correctly fixed bugs by 42.3% (from 26 to 37).