Are "Solved Issues" in SWE-bench Really Solved Correctly? An Empirical Study

You Wang, Michael Pradel, Zhongxin LiuarXiv 2025 · DOI

Abstract

SWE-bench has emerged as the primary benchmark for evaluating autonomous AI software engineers. However, its reliance on limited test suites—often only those provided in the original developer's Pull Request—creates a "weak test suite" problem. This study introduces PatchDiff, a differential testing tool designed to identify behavioral divergences between AI-generated patches and human solutions. Our empirical analysis of three state-of-the-art AI agents reveals that nearly 30% of "plausible" patches exhibit different behaviors than the ground truth, leading to an average performance inflation of 6.4 percentage points on the leaderboard.

Introduction

As the industry races to develop AI agents capable of autonomous software maintenance, accurate evaluation is critical. SWE-bench measures progress by requiring agents to generate code patches that pass a specific set of tests. However, passing these tests does not guarantee a correct or robust fix. An AI can produce a patch that satisfies the immediate test requirements while failing to address the underlying bug, introducing regressions, or violating project-specific logic. Until now, the prevalence of these "plausible but incorrect" patches was largely unquantified.

Methodology: Differential Testing with PatchDiff

To bridge this validation gap, we developed PatchDiff. This tool employs a differential testing approach to uncover behavioral discrepancies that standard regression tests might miss.

PatchDiff operates by identifying functions modified by both the AI and the human developer. It then uses an LLM (such as GPT-4o-mini) to generate new, targeted test cases. These "differentiating tests" are designed to pass when run against the human "oracle" patch but fail against the AI-generated patch, or vice versa. This automated process allows for the identification of "suspicious patches"—those that appear correct under the original benchmark but behave differently in practice.

Figure 1: PatchDiff identifies behavioral divergence by generating a test case that passes on the human oracle patch but fails on the AI-generated plausible patch.

Empirical Findings and Taxonomy of Errors

Our study evaluated patches from three leading agents: CodeStory, LearnByInteract, and OpenHands on the SWE-bench Verified dataset. We categorized the resulting behavioral divergences into a new taxonomy:

  1. Divergent Implementations (46.8%): The AI implements the fix using a different logical path than the human developer.
  2. Supplementary Semantic Changes (27.3%): The AI adds unrequested logic, such as extra safety checks or edge-case handling, which may inadvertently introduce new bugs or violate project requirements.
  3. Ambiguous Requirements (66.2% of suspicious cases): Many divergences stem from vague issue descriptions where both the human and AI interpretations could be argued as valid, highlighting a need for more precise benchmarking.

Key Results

The application of PatchDiff revealed significant performance inflation across the SWE-bench leaderboard. While agents may appear to solve over 50-60% of tasks, a substantial portion of these solutions are suspicious.

Table 1: Performance metrics for AI agents on SWE-bench Verified, showing the impact of suspicious patches on resolved rates.

As shown in Table 1, the percentage of resolved tasks drops significantly when suspicious patches are excluded. Manual inspection confirmed that 28.6% of these suspicious patches were definitively incorrect. Overall, we found that reported success rates are inflated by an average of 6.4 absolute percentage points. Notably, PatchDiff proved far more effective than traditional automated test generators like LIBRO, which only identified 5.9% of suspicious patches compared to PatchDiff’s 29.6%.

Conclusion

The "gold standard" of AI software engineering evaluation requires more robust quality control. Our findings suggest that simply running all existing repository tests—rather than just PR-specific ones—can catch nearly 8% of incorrect patches immediately. Furthermore, the adoption of differential testing tools like PatchDiff offers a cost-effective ($0.105 per patch) method to ensure AI-generated code truly matches human developer expectations. We advocate for the evolution of benchmarks toward more precise issue specifications and comprehensive validation suites to drive genuine progress in autonomous software engineering.

Summary updated

BibTeX
@misc{wang2025are,
  author = {You Wang and Michael Pradel and Zhongxin Liu},
  title = {{Are "Solved Issues" in SWE-bench Really Solved Correctly? An Empirical Study}},
  year = {2025},
  eprint = {2503.15223},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2503.15223},
}
Figure