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.
Til et andet sprog
fra kildeindhold
arxiv.org
Vigtigste indsigter udtrukket fra
by Jiaolong Kon... kl. arxiv.org 03-05-2024
https://arxiv.org/pdf/2403.01971.pdfDybere Forespørgsler