SEAILGJun 18, 2024

SWT-Bench: Testing and Validating Real-World Bug-Fixes with Code Agents

arXiv:2406.12952v3125 citationsHas Code
Originality Incremental advance
AI Analysis

This work addresses the gap in test generation for software testing and code repair, providing a benchmark and metrics for analyzing code agents, though it is incremental in nature.

The authors tackled the problem of automated test generation for code repair by creating a benchmark with real-world GitHub issues and evaluating LLM-based Code Agents, finding that these agents perform well at generating relevant test cases and can double the precision of code fixes.

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 is a similar but more structured task than code generation, it allows for a more fine-grained analysis using issue reproduction rate and coverage changes, providing a dual metric for analyzing systems designed for code repair. Finally, we find that generated tests are an effective filter for proposed code fixes, doubling the precision of SWE-Agent. We release all data and code at https://github.com/logic-star-ai/SWT-Bench

Code Implementations1 repo
Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes