SWEPatchTest: Evaluating Software Tests Beyond Reproduction
Hua Lu, Pengcheng Wang, Han Li, Zichen Tian, Yanyu Chen, Huang He, Bingjin Chen
Abstract
Coding agents use generated tests to decide whether a proposed patch satisfies an issue's requirements. A suite that fails on the buggy program and passes after applying the reference patch can still accept an incorrect patch or reject a correct patch. We introduce SWEPATCHTEST, a test-generation benchmark with 619 tasks from SWE-bench Pro, SWE-bench Multilingual, and DeepSWE and 82,579 candidate patches collected from coding-agent trajectories. By replaying each suite on the buggy and patched codebases, jointly measures issue reproduction, acceptance of correct patches, and rejection of incorrect patches. Joint Validation Rate (JVR), which requires all three criteria on the same task, exposes failures hidden by single-reference evaluation: the best-performing configuration achieves only 9.21% JVR despite reproducing the reference transition on 59.29% of tasks. We further use validation scores to select and scale demonstrations for supervised fine-tuning (SFT). The resulting training recipe approximately triples JVR and improves downstream repair across three SWE-bench benchmarks. Patch discrimination thus provides both a diagnostic measure of test quality and an execution-based signal for curating agent training data.
Create a lesson
Related papers
PreciseCoder: Faithful and Generalizable Debugging Beyond Unit-Test Rewards
Yunkai Zhan, Miaosen Chai, Shangshang Wang et al.
SolBehave: Evaluating the Behavioural Correctness of LLM-Generated Smart Contracts
Giovanni Pio Delvecchio, Stefano Fantazzini, Giacomo Frisoni et al.
DTScribe: Generating Models for Digital Twin Reporting using Local Large Language Models
Kérian Fiter, Angelica Portocarrero, Bentley Oakes
SWE-MISBEHAVIOR: Benchmarking and Mitigating Boundary Violations in Software Coding Agents
Do Xuan Trong, Duc Anh Nguyen, Do Xuan Long et al.
Assessing the Quality of Concrete Scenarios Generated from Scenario Classes for Automated Driving
Lina Putze, Thies de Graaff, Jan Steffen Becker et al.
Soliduzz: Finding Miscompilations in Smart-Contract Compilers with Assertion-Driven Equivalence Oracles
Alexander Stromberger, Christoph Hochrainer, Valentin Wüstholz et al.