ContrastRepair: Enhancing Conversation-Based Automated Program Repair via Contrastive Test Case Pairs
Not on the map. Why?
Abstract (arXiv)
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 paper, 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 informative and specific 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.
Key facts. Cited by 19 papers in the map (data through 7 Oct 2026). First posted on arXiv 4 Mar 2024.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2024: 4; 2025: 11; 2026: 4.
19 papers.
Sort:
By area:
- 2025Live-SWE-agent: Can Software Engineering Agents Self-Evolve on the Fly?cited by 91
- 2024When LLMs Meet Cybersecurity: A Systematic Literature Reviewcited by 70
- 2024Alibaba LingmaAgent: Improving Automated Issue Resolution via Comprehensive Repository Explorationcited by 58
- 2024Lingma SWE-GPT: An Open Development-Process-Centric Language Model for Automated Software Improvementcited by 57
- 2024From Code to Correctness: Closing the Last Mile of Code Generation with Hierarchical Debuggingcited by 46
- 2025OrcaLoca: An LLM Agent Framework for Software Issue Localizationcited by 43
- 2025Code Graph Model (CGM): A Graph-Integrated Large Language Model for Repository-Level Software Engineering Taskscited by 27
- 2025Thinking Longer, Not Larger: Enhancing Software Engineering Agents via Scaling Test-Time Computecited by 25
- 2025Seeing is Fixing: Cross-Modal Reasoning with Multimodal LLMs for Visual Software Issue Fixingcited by 11
- 2025Skeleton-Guided-Translation: A Benchmarking Framework for Code Repository Translation with Fine-Grained Quality Evaluationcited by 3
- 2025Adversarial Reasoning for Repair Based on Inferred Program Intentcited by 2
- 2025TN-AutoRCA: Benchmark Construction and Agentic Framework for Self-Improving Alarm-Based Root Cause Analysis in Telecommunication Networkscited by 2
7 more
- 2025Empowering Real-World: A Survey on the Technology, Practice, and Evaluation of LLM-driven Industry Agentscited by 2
- 2026EGSS: Entropy-guided Stepwise Scaling for Reliable Software Engineeringcited by 2
- 2025Collaborative Agents for Automated Program Repair in Rubycited by 1
- 2025Self-Bootstrapping Automated Program Repair: Using LLMs to Generate and Evaluate Synthetic Training Data for Bug Repaircited by 0
- 2026Hydra: Efficient, Correct Code Generation via Checkpoint-and-Rollback Supportcited by 0
- 2026MultiFixer: A Coordinator-Proposer Based Multi-Agent Framework For Fixing Multi-Hunk Bugscited by 0
- 2026Test-Driven Approaches to Software Engineering with Large Language Models: A Survey of Phases, Tasks, and Agent Skillscited by 0
- 2026Test-Driven Approaches to Software Engineering with Large Language Models: A Survey of Phases, Tasks, and Agent Skills10 Sep 2026
- 2026MultiFixer: A Coordinator-Proposer Based Multi-Agent Framework For Fixing Multi-Hunk Bugs29 Jul 2026
- 2026Hydra: Efficient, Correct Code Generation via Checkpoint-and-Rollback Support14 May 2026
- 2026EGSS: Entropy-guided Stepwise Scaling for Reliable Software Engineering5 Feb 2026
- 2025Live-SWE-agent: Can Software Engineering Agents Self-Evolve on the Fly?17 Nov 2025
- 2025Collaborative Agents for Automated Program Repair in Ruby6 Nov 2025
- 2025Empowering Real-World: A Survey on the Technology, Practice, and Evaluation of LLM-driven Industry Agents20 Oct 2025
- 2025TN-AutoRCA: Benchmark Construction and Agentic Framework for Self-Improving Alarm-Based Root Cause Analysis in Telecommunication Networks24 Jul 2025
- 2025Seeing is Fixing: Cross-Modal Reasoning with Multimodal LLMs for Visual Software Issue Fixing19 Jun 2025
- 2025Code Graph Model (CGM): A Graph-Integrated Large Language Model for Repository-Level Software Engineering Tasks22 May 2025
- 2025Adversarial Reasoning for Repair Based on Inferred Program Intent19 May 2025
- 2025Self-Bootstrapping Automated Program Repair: Using LLMs to Generate and Evaluate Synthetic Training Data for Bug Repair12 May 2025
7 more
- 2025Thinking Longer, Not Larger: Enhancing Software Engineering Agents via Scaling Test-Time Compute31 Mar 2025
- 2025OrcaLoca: An LLM Agent Framework for Software Issue Localization1 Feb 2025
- 2025Skeleton-Guided-Translation: A Benchmarking Framework for Code Repository Translation with Fine-Grained Quality Evaluation27 Jan 2025
- 2024Lingma SWE-GPT: An Open Development-Process-Centric Language Model for Automated Software Improvement1 Nov 2024
- 2024From Code to Correctness: Closing the Last Mile of Code Generation with Hierarchical Debugging2 Oct 2024
- 2024Alibaba LingmaAgent: Improving Automated Issue Resolution via Comprehensive Repository Exploration3 Jun 2024
- 2024When LLMs Meet Cybersecurity: A Systematic Literature Review6 May 2024
- 2025Live-SWE-agent: Can Software Engineering Agents Self-Evolve on the Fly?cited by 91
- 2024Lingma SWE-GPT: An Open Development-Process-Centric Language Model for Automated Software Improvementcited by 57
- 2025OrcaLoca: An LLM Agent Framework for Software Issue Localizationcited by 43
- 2025Collaborative Agents for Automated Program Repair in Rubycited by 1
- 2026MultiFixer: A Coordinator-Proposer Based Multi-Agent Framework For Fixing Multi-Hunk Bugscited by 0
- 2026Test-Driven Approaches to Software Engineering with Large Language Models: A Survey of Phases, Tasks, and Agent Skillscited by 0
- 2026Test-Driven Approaches to Software Engineering with Large Language Models: A Survey of Phases, Tasks, and Agent Skills10 Sep 2026
- 2026MultiFixer: A Coordinator-Proposer Based Multi-Agent Framework For Fixing Multi-Hunk Bugs29 Jul 2026
- 2025Live-SWE-agent: Can Software Engineering Agents Self-Evolve on the Fly?17 Nov 2025
- 2025Collaborative Agents for Automated Program Repair in Ruby6 Nov 2025
- 2025OrcaLoca: An LLM Agent Framework for Software Issue Localization1 Feb 2025
- 2024Lingma SWE-GPT: An Open Development-Process-Centric Language Model for Automated Software Improvement1 Nov 2024
- 2025Thinking Longer, Not Larger: Enhancing Software Engineering Agents via Scaling Test-Time Computecited by 25
- 2025Seeing is Fixing: Cross-Modal Reasoning with Multimodal LLMs for Visual Software Issue Fixingcited by 11
- 2025Adversarial Reasoning for Repair Based on Inferred Program Intentcited by 2
- 2025Empowering Real-World: A Survey on the Technology, Practice, and Evaluation of LLM-driven Industry Agentscited by 2
- 2026EGSS: Entropy-guided Stepwise Scaling for Reliable Software Engineeringcited by 2
- 2026EGSS: Entropy-guided Stepwise Scaling for Reliable Software Engineering5 Feb 2026
- 2025Empowering Real-World: A Survey on the Technology, Practice, and Evaluation of LLM-driven Industry Agents20 Oct 2025
- 2025Seeing is Fixing: Cross-Modal Reasoning with Multimodal LLMs for Visual Software Issue Fixing19 Jun 2025
- 2025Adversarial Reasoning for Repair Based on Inferred Program Intent19 May 2025
- 2025Thinking Longer, Not Larger: Enhancing Software Engineering Agents via Scaling Test-Time Compute31 Mar 2025
- 2024When LLMs Meet Cybersecurity: A Systematic Literature Reviewcited by 70
- 2024Alibaba LingmaAgent: Improving Automated Issue Resolution via Comprehensive Repository Explorationcited by 58
- 2024From Code to Correctness: Closing the Last Mile of Code Generation with Hierarchical Debuggingcited by 46
- 2025Code Graph Model (CGM): A Graph-Integrated Large Language Model for Repository-Level Software Engineering Taskscited by 27
- 2025Skeleton-Guided-Translation: A Benchmarking Framework for Code Repository Translation with Fine-Grained Quality Evaluationcited by 3
- 2025TN-AutoRCA: Benchmark Construction and Agentic Framework for Self-Improving Alarm-Based Root Cause Analysis in Telecommunication Networkscited by 2
- 2026Hydra: Efficient, Correct Code Generation via Checkpoint-and-Rollback Supportcited by 0
- 2026Hydra: Efficient, Correct Code Generation via Checkpoint-and-Rollback Support14 May 2026
- 2025TN-AutoRCA: Benchmark Construction and Agentic Framework for Self-Improving Alarm-Based Root Cause Analysis in Telecommunication Networks24 Jul 2025
- 2025Code Graph Model (CGM): A Graph-Integrated Large Language Model for Repository-Level Software Engineering Tasks22 May 2025
- 2025Skeleton-Guided-Translation: A Benchmarking Framework for Code Repository Translation with Fine-Grained Quality Evaluation27 Jan 2025
- 2024From Code to Correctness: Closing the Last Mile of Code Generation with Hierarchical Debugging2 Oct 2024
- 2024Alibaba LingmaAgent: Improving Automated Issue Resolution via Comprehensive Repository Exploration3 Jun 2024
- 2024When LLMs Meet Cybersecurity: A Systematic Literature Review6 May 2024