ACM Transactions on Software Engineering and Methodology · 2025 · 19 citations · 15 references
ComputingComputer ScienceComputational LinguisticsNatural Language ProcessingSoftware EngineeringDefect DetectionSoftware MaintenanceSoftware TestingAutomated Patch GenerationAutomated Program RepairBenchmark DatasetsBug LocalizationFeedbackLarge Language ModelsProgram RepairRoot Causes
Automated Program Repair (APR) aims to automatically generate patches for rectifying software bugs. Recent strides in Large Language Models (LLM), such as ChatGPT, have yielded encouraging outcomes in APR, especially within the conversation-driven APR framework. Nevertheless, the efficacy of conversation-driven APR is contingent on the quality of the feedback information. In this article, we propose ContrastRepair , a novel conversation-based APR approach that augments conversation-driven APR by providing LLMs with contrastive test pairs. A test pair consists of a failing test and a passing test, which offer contrastive feedback to the LLM. Our key insight is to minimize the difference between the generated passing test and the given failing test, which can better isolate the root causes of bugs. By providing such informative feedback, ContrastRepair enables the LLM to produce effective bug fixes. The implementation of ContrastRepair is based on the state-of-the-art LLM, ChatGPT, and it iteratively interacts with ChatGPT until plausible patches are generated. We evaluate ContrastRepair on multiple benchmark datasets, including Defects4J, QuixBugs, and HumanEval-Java. The results demonstrate that ContrastRepair significantly outperforms existing methods, achieving a new state-of-the-art in program repair. For instance, among Defects4J 1.2 and 2.0, ContrastRepair correctly repairs 143 out of all 337 bug cases, while the best-performing baseline fixes 124 bugs.
15
Training language models to follow instructions with human feedback
Long Ouyang, Jeff Wu, Xu Jiang et al. · arXiv (Cornell University) · 2022 · 4.3K citations · Full text
Symbolic execution and program testing
James C. King · Communications of the ACM · 1976 · 3K citations · Full text
GPT-3: Its Nature, Scope, Limits, and Consequences
Luciano Floridi, Massimo Chiriatti · Minds and Machines · 2020 · 2.2K citations · Full text