cs.SEOct 13, 2026

SWEPatchTest: Evaluating Software Tests Beyond Reproduction

Authors: Hua Lu, Pengcheng Wang, Han Li, Zichen Tian, Yanyu Chen, Huang He, Bingjin Chen

Organizations: Baidu Inc. · Nanjing University · The Chinese University of Hong Kong

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, \benchmark 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.

Figures & tables

Appendix figures & tables9 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. CodeLift: Your Test Suite Is Secretly a Dense SWE Curriculum

    Oct 12, 2026Junjielong Xu, Huachao Zhu, Alyssa Wu +2RL for Code GenerationSoftware Engineering Agents

  2. SWE-Bench Pro V2: A Cleaner, Harder-to-Game Coding Benchmark

    Oct 16, 2026Soham Dan, Jeff Da, Sanyam Bhutani +8Coding Agent BenchmarksSoftware Engineering Benchmarks

  3. ExecCritic: Learn to Test, Test to Improve for Coding Agents

    Sep 8, 2026Leitian Tao, Baolin Peng, Haorui Wang +7RL for Code GenerationSoftware Engineering Agents