ContrastRepair introduces a novel approach to automated program repair by leveraging Large Language Models (LLMs) and contrastive test pairs. The method aims to enhance the effectiveness of LLMs in accurately localizing bugs and generating high-quality fixes. By providing both negative and positive feedback, ContrastRepair enables LLMs to pinpoint root causes more effectively. The process involves constructing test pairs consisting of failing and passing tests, selecting suitable passing tests based on similarity metrics, and generating prompts for LLMs. The iterative repair process continues until plausible patches are produced or the repair budget is exhausted. Evaluation on benchmark datasets demonstrates that ContrastRepair outperforms existing methods, achieving new state-of-the-art performance in program repair.
他の言語に翻訳
原文コンテンツから
arxiv.org
深掘り質問