Reliable Fix Patterns Inferred from Static Checkers for Automated Program Repair

Author:

Liu Kui1ORCID,Zhang Jingtang1ORCID,Li Li2ORCID,Koyuncu Anil3ORCID,Kim Dongsun4ORCID,Ge Chunpeng5ORCID,Liu Zhe1ORCID,Klein Jacques6ORCID,Bissyandé Tegawendé F.6ORCID

Affiliation:

1. Nanjing University of Aeronautics and Astronautics, China

2. School of Software, Beihang University, China

3. Sabanci University, Turkey

4. Kyungpook National University, South Korea

5. School of Software, Shandong University, China

6. University of Luxembourg, Luxembourg

Abstract

Fix pattern-based patch generation is a promising direction in automated program repair (APR). Notably, it has been demonstrated to produce more acceptable and correct patches than the patches obtained with mutation operators through genetic programming. The performance of pattern-based APR systems, however, depends on the fix ingredients mined from fix changes in development histories. Unfortunately, collecting a reliable set of bug fixes in repositories can be challenging. In this article, we propose investigating the possibility in an APR scenario of leveraging fix patterns inferred from code changes that address violations detected by static analysis tools. To that end, we build a fix pattern-based APR tool, Avatar , which exploits fix patterns of static analysis violations as ingredients for the patch generation of repairing semantic bugs. Evaluated on four benchmarks (i.e., Defects4J, Bugs.jar, BEARS, and QuixBugs), Avatar presents the potential feasibility of fixing semantic bugs with the fix patterns inferred from the patches for fixing static analysis violations and can correctly fix 26 semantic bugs when Avatar is implemented with the normal program repair pipeline. We also find that Avatar achieves performance metrics that are comparable to that of the closely related approaches in the literature. Compared with CoCoNut, Avatar can fix 18 new bugs in Defects4J and 3 new bugs in QuixBugs. When compared with HDRepair, JAID, and SketchFix, Avatar can newly fix 14 Defects4J bugs. In terms of the number of correctly fixed bugs, Avatar is also comparable to the program repair tools with the normal fault localization setting and presents better performance than most program repair tools. These results imply that Avatar is complementary to current program repair approaches. We further uncover that Avatar can present different bug-fixing performances when it is configured with different fault localization tools, and the stack trace information from the failed executions of test cases can be exploited to improve the bug-fixing performance of Avatar by fixing more bugs with fewer generated patch candidates. Overall, our study highlights the relevance of static bug-finding tools as indirect contributors of fix ingredients for addressing code defects identified with functional test cases (i.e., dynamic information).

Funder

National Key R&D Program of China

National Natural Science Foundation of China

Natural Science Foundation of Jiangsu Province, China

Open Project Program of the State Key Laboratory of Mathematical Engineering and Advanced Computing

European Research Council

European Union’s Horizon 2020

National Research Foundation of Korea

Kyungpook National University Research Fund, 2020

Publisher

Association for Computing Machinery (ACM)

Subject

Software

Cited by 5 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

1. Copiloting the Copilots: Fusing Large Language Models with Completion Engines for Automated Program Repair;Proceedings of the 31st ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering;2023-11-30

2. Analyzing a Semantics-Aware Bug Seeding Tool's Efficacy: A qualitative study with the SemSeed tool;Proceedings of the XXXVII Brazilian Symposium on Software Engineering;2023-09-25

3. Tips: towards automating patch suggestion for vulnerable smart contracts;Automated Software Engineering;2023-09-13

4. PreciseBugCollector: Extensible, Executable and Precise Bug-Fix Collection: Solution for Challenge 8: Automating Precise Data Collection for Code Snippets with Bugs, Fixes, Locations, and Types;2023 38th IEEE/ACM International Conference on Automated Software Engineering (ASE);2023-09-11

5. Gamma: Revisiting Template-Based Automated Program Repair Via Mask Prediction;2023 38th IEEE/ACM International Conference on Automated Software Engineering (ASE);2023-09-11

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3