|
Random Search and Code Similarity-Based Automatic Program Repair
CAO Heling,a,b (曹鹤玲),LIU Fangzhenga (刘方正),SHI Jianshua (石建树),CHU Yonghea (楚永贺),DENG Miaoleia*. (邓淼磊)
2023, 28 (6):
738-752.
doi: 10.1007/s12204-022-2514-6
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
References |
Related Articles |
Metrics
|