Random Search and Code Similarity-Based Automatic Program Repair

Heling Cao,Fangzheng Liu,Jianshu Shi,Yonghe Chu,Miaolei Deng
DOI: https://doi.org/10.1007/s12204-022-2514-6
2022-11-12
Journal of Shanghai Jiaotong University (Science)
Abstract:In recent years, automatic program repair approaches have developed rapidly in the field of software engineering. However, the existing program repair techniques based on genetic programming suffer from requiring verification of a large number of candidate patches, which consume a lot of computational resources. In this paper, we propose a random search and code similarity based automatic program repair (RSCSRepair). First, to reduce the verification computation effort for candidate patches, we introduce test filtering to reduce the number of test cases and use test case prioritization techniques to reconstruct a new set of test cases. Second, we use a combination of code similarity and random search for patch generation. Finally, we use a patch overfitting detection method to improve the quality of patches. In order to verify the performance of our approach, we conducted the experiments on the Defects4J benchmark. The experimental results show that RSCSRepair correctly repairs up to 54 bugs, with improvements of 14.3%, 8.5%, 14.3% and 10.3% for our approach compared with jKali, Nopol, CapGen and SimFix, respectively.
What problem does this paper attempt to address?