Automatic Repair of Java Programs with Mixed Granularity and Variable Mapping
Keywords:Automatic software repair, random search, mixed repair granularity, test case prioritization
During the process of software repair, since the granularity of repair is too coarse and the way of fixing ingredient is too simple, the repair efficiency needs to be further improved. To resolve the problems, we propose a Mixed Granularity and Variable Mapping based automatic software Repair (MGVMRepair). We adopt random search algorithm as the framework of program evolution, and utilize the mapping relationship between variables as an auxiliary specification. Firstly, fault localization is used to locate the suspicious statements and to form a list of modification points. Secondly, the ingredient of program repair at statement level is obtained, and the mapping relationship of variables is established. Then, the test case prioritization is improved from the perspective of the modification point. Finally, a program passes all test cases or the program iteration terminates.
The experimental results show that MGVMRepair has a higher repair success rate than GenProg, CapGen, SimFix, jKali, jMutRepair and SketchFix on Defects4J.
Copyright terms are indicated in the Republic of Lithuania Law on Copyright and Related Rights, Articles 4-37.