Code Similarity and Location-Awareness Automatic Program Repair
Automatic program repair has drawn more and more attention since software quality is facing increasing challenges. In existing approaches, the unlimited search space is considered to be the main limitation in finding the correct patch. So how to reduce the search space to improve the efficiency of a...
Main Authors: | , , , , , |
---|---|
Format: | Article |
Language: | English |
Published: |
MDPI AG
2023-07-01
|
Series: | Applied Sciences |
Subjects: | |
Online Access: | https://www.mdpi.com/2076-3417/13/14/8519 |
_version_ | 1797590382018560000 |
---|---|
author | Heling Cao Dong Han Fangzheng Liu Tianli Liao Chenyang Zhao Jianshu Shi |
author_facet | Heling Cao Dong Han Fangzheng Liu Tianli Liao Chenyang Zhao Jianshu Shi |
author_sort | Heling Cao |
collection | DOAJ |
description | Automatic program repair has drawn more and more attention since software quality is facing increasing challenges. In existing approaches, the unlimited search space is considered to be the main limitation in finding the correct patch. So how to reduce the search space to improve the efficiency of automatic program repair remains a problem to be solved. In this work, we represent a similarity-based and location-awareness-based automatic program repair (SLARepair). SLARepair takes the similarity between codes as important search information. The search space is further subdivided by the location-awareness strategy to improve search efficiency. In addition, to better guide the search process, a new fitness function is designed for genetic programming, which brings notable improvements. Moreover, the patch verification time is further reduced by utilizing the test case prioritization approach combined with test case filtering. Extensive experiments demonstrate that our SLARepair outperforms the state-of-the-art approaches on the Defects4J benchmark and achieves competitive performances. |
first_indexed | 2024-03-11T01:19:40Z |
format | Article |
id | doaj.art-8df59ef2eaba4cb4bb662b70909f003b |
institution | Directory Open Access Journal |
issn | 2076-3417 |
language | English |
last_indexed | 2024-03-11T01:19:40Z |
publishDate | 2023-07-01 |
publisher | MDPI AG |
record_format | Article |
series | Applied Sciences |
spelling | doaj.art-8df59ef2eaba4cb4bb662b70909f003b2023-11-18T18:14:12ZengMDPI AGApplied Sciences2076-34172023-07-011314851910.3390/app13148519Code Similarity and Location-Awareness Automatic Program RepairHeling Cao0Dong Han1Fangzheng Liu2Tianli Liao3Chenyang Zhao4Jianshu Shi5Key Laboratory of Grain Information Processing and Control, Henan University of Technology, Ministry of Education, Zhengzhou 450001, ChinaKey Laboratory of Grain Information Processing and Control, Henan University of Technology, Ministry of Education, Zhengzhou 450001, ChinaKey Laboratory of Grain Information Processing and Control, Henan University of Technology, Ministry of Education, Zhengzhou 450001, ChinaKey Laboratory of Grain Information Processing and Control, Henan University of Technology, Ministry of Education, Zhengzhou 450001, ChinaKey Laboratory of Grain Information Processing and Control, Henan University of Technology, Ministry of Education, Zhengzhou 450001, ChinaKey Laboratory of Grain Information Processing and Control, Henan University of Technology, Ministry of Education, Zhengzhou 450001, ChinaAutomatic program repair has drawn more and more attention since software quality is facing increasing challenges. In existing approaches, the unlimited search space is considered to be the main limitation in finding the correct patch. So how to reduce the search space to improve the efficiency of automatic program repair remains a problem to be solved. In this work, we represent a similarity-based and location-awareness-based automatic program repair (SLARepair). SLARepair takes the similarity between codes as important search information. The search space is further subdivided by the location-awareness strategy to improve search efficiency. In addition, to better guide the search process, a new fitness function is designed for genetic programming, which brings notable improvements. Moreover, the patch verification time is further reduced by utilizing the test case prioritization approach combined with test case filtering. Extensive experiments demonstrate that our SLARepair outperforms the state-of-the-art approaches on the Defects4J benchmark and achieves competitive performances.https://www.mdpi.com/2076-3417/13/14/8519automatic program repaircode similaritylocation awareness |
spellingShingle | Heling Cao Dong Han Fangzheng Liu Tianli Liao Chenyang Zhao Jianshu Shi Code Similarity and Location-Awareness Automatic Program Repair Applied Sciences automatic program repair code similarity location awareness |
title | Code Similarity and Location-Awareness Automatic Program Repair |
title_full | Code Similarity and Location-Awareness Automatic Program Repair |
title_fullStr | Code Similarity and Location-Awareness Automatic Program Repair |
title_full_unstemmed | Code Similarity and Location-Awareness Automatic Program Repair |
title_short | Code Similarity and Location-Awareness Automatic Program Repair |
title_sort | code similarity and location awareness automatic program repair |
topic | automatic program repair code similarity location awareness |
url | https://www.mdpi.com/2076-3417/13/14/8519 |
work_keys_str_mv | AT helingcao codesimilarityandlocationawarenessautomaticprogramrepair AT donghan codesimilarityandlocationawarenessautomaticprogramrepair AT fangzhengliu codesimilarityandlocationawarenessautomaticprogramrepair AT tianliliao codesimilarityandlocationawarenessautomaticprogramrepair AT chenyangzhao codesimilarityandlocationawarenessautomaticprogramrepair AT jianshushi codesimilarityandlocationawarenessautomaticprogramrepair |