Exploring and Lifting the Robustness of LLM-powered Automated Program Repair with Metamorphic Testing
Pengyu Xue, Linhao Wu, Zhen Yang, Zhongxing Yu, Zhi Jin, Ge Li, Yan, Xiao, Shuo Liu, Xinyi Li, Hongyi Lin, Jingwen Wu

TL;DR
This paper introduces MT-LAPR, a metamorphic testing framework for Large Language Model-powered Automated Program Repair, revealing significant robustness issues and proposing a training-based solution to improve repair stability.
Contribution
The paper develops a novel metamorphic testing framework for LAPR, identifies robustness vulnerabilities, and proposes a training method to enhance LAPR robustness using generated test cases.
Findings
34.4% - 48.5% of test cases expose LAPR instability
Robustness correlates positively with code readability
Proposed training approach improves robustness by up to 49.32%
Abstract
In recent years, Large language model-powered Automated Program Repair (LAPR) techniques have achieved state-of-the-art bug-fixing performance and have been pervasively applied and studied in both industry and academia. Nonetheless, LLMs were proved to be highly sensitive to input prompts, with slight differences in the expressions of semantically equivalent programs potentially causing repair failures. Therefore, it is crucial to conduct robustness testing on LAPR techniques before their practical deployment. However, related research is scarce. To this end, we propose MT-LAPR, a Metamorphic Testing framework exclusively for LAPR techniques, which summarizes nine widely-recognized Metamorphic Relations (MRs) by developers across three perturbation levels: token, statement, and block. Afterward, our proposed MRs are applied to buggy codes to generate test cases, which are semantically…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Testing and Debugging Techniques · Software Reliability and Analysis Research · Radiation Effects in Electronics
