SWT-Bench: Testing and Validating Real-World Bug-Fixes with Code Agents
Niels M\"undler, Mark Niklas M\"uller, Jingxuan He, Martin Vechev

TL;DR
This paper introduces SWT-Bench, a benchmark for testing and validating real-world bug fixes using LLM-based code agents, demonstrating their effectiveness in generating relevant tests and improving code repair precision.
Contribution
The paper presents a new benchmark and analysis framework for evaluating LLM-based code agents in test generation and bug fix validation on real-world GitHub data.
Findings
LLMs perform well at generating relevant test cases.
Code repair agents outperform dedicated test generation systems.
Generated tests effectively filter code fixes, doubling precision.
Abstract
Rigorous software testing is crucial for developing and maintaining high-quality code, making automated test generation a promising avenue for both improving software quality and boosting the effectiveness of code generation methods. However, while code generation with Large Language Models (LLMs) is an extraordinarily active research area, test generation remains relatively unexplored. We address this gap and investigate the capability of LLM-based Code Agents to formalize user issues into test cases. To this end, we propose a novel benchmark based on popular GitHub repositories, containing real-world issues, ground-truth bug-fixes, and golden tests. We find that LLMs generally perform surprisingly well at generating relevant test cases, with Code Agents designed for code repair exceeding the performance of systems designed specifically for test generation. Further, as test generation…
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.
Code & Models
Videos
Taxonomy
TopicsSoftware System Performance and Reliability · Multi-Agent Systems and Negotiation · Software Testing and Debugging Techniques
