Papers
Topics
Authors
Recent
Search
2000 character limit reached

SWE-Bench ProMax: Benchmarking Agents on Large-Scale Multilingual Code Refactoring

Published 10 Aug 2026 in cs.CL and cs.SE | (2608.09802v1)

Abstract: As AI coding agents take on increasingly complex, long-horizon software engineering tasks, existing benchmarks are rapidly saturating and their evaluation quality has come under serious scrutiny: a recent audit found that nearly 60% of unsolved SWE-bench Verified instances contain flawed tests -- either overly narrow tests that reject correct solutions or overly broad tests that check unstated requirements -- and that frontier models can verbatim reproduce gold patches from training data. Code refactoring, which requires coordinated, behavior-preserving changes across many files, offers a substantially harder and more realistic test of agent capability, yet remains underserved by current benchmarks. We introduce SWE-Bench ProMax, an expert-curated, multilingual code refactoring benchmark of 170 instances drawn from real commits across seven programming languages (Python, Java, TypeScript, Go, C, C++, and Rust). Every instance undergoes rigorous, multi-stage curation that directly addresses the quality problems identified in prior benchmarks: issue descriptions are rewritten from scratch to provide precise, unambiguous specifications, and test suites are manually reviewed to remove overly narrow and overly broad tests. Tasks with insufficient complexity or limited cross-file scope are filtered out, yielding a benchmark of challenging, large-scale refactoring tasks that average 11.4 modified files and 261.6 lines of code per instance, substantially exceeding the scale of existing benchmarks. Experiments with frontier models under two agent scaffolds show that the best model achieves only 41.2% resolve rate, confirming that SWE-Bench ProMax presents a meaningful and unsaturated challenge for current AI coding agents. Our benchmark is available at https://huggingface.co/datasets/swe-bench-promax/SWE-Bench-ProMax.

Summary

  • The paper introduces 170 expert-curated refactoring tasks across seven programming languages and 70 repositories, with large patches averaging 11.4 source files and 261.6 lines of code.
  • The paper finds GPT-5.2 achieves the highest resolve rate at 41.2% with OpenHands, while GLM-5 reaches 36.5% at just $0.24 per instance, showing that cost and performance do not scale together.
  • The paper identifies incomplete cross-file propagation and repetitive edit–revert cycles as the main failure modes, indicating that agents need stronger planning for cascading changes across code, tests, configuration, and documentation.

SWE-Bench ProMax is an expert-curated benchmark of 170 multilingual code refactoring tasks designed to address two deficiencies that increasingly undermine repository-level coding evaluations: saturation and flawed test suites. The paper's central empirical finding is stark—the best frontier model resolves only 41.2% of instances, against the 75%+ resolve rates now routine on SWE-bench Verified. The benchmark's construction directly targets documented quality defects: a recent audit found nearly 60% of unsolved SWE-bench Verified instances contain flawed tests (35.5% overly narrow, 18.8% overly broad), prompting OpenAI to deprecate the benchmark entirely.

Motivation and positioning

The authors argue that code refactoring—behavior-preserving restructuring across many files—is a prototypical long-horizon task that existing benchmarks underserve. Industry evidence supports this framing: OpenAI identifies "project-scale refactors" as a primary use case for multi-context-window agents, and Cursor reports that real developer tasks increasingly span many files. Prior refactoring benchmarks are limited in scope: RefactorBench offers 100 handcrafted Python-only tasks averaging 4.3 modified files, while SWE-Refactor covers 1,099 Java instances without human verification of test quality. Neither combines multilingual coverage, large-scale complexity, and expert-curated tests.

The scale contrast with SWE-bench Verified is pronounced: 30% of ProMax instances modify more than 10 files and 32% exceed 200 lines of code, whereas 86% of SWE-bench Verified instances modify only a single file. A representative instance requires refactoring NASA's F'Prime flight software framework across 244 files while preserving runtime behavior.

Benchmark construction

Instances are drawn from 29,782 initial candidates, of which only 170 survive—a retention rate reflecting aggressive filtering. The three-stage pipeline proceeds as follows:

  1. Data collection: GitHub API queries identify repositories with at least 500 stars, approved licenses, and a dominant target language; candidate commits post-January 2025 contain "refactor" but not "bug fix" and touch both test and non-test files.
  2. Environment construction: Docker environments are built at pre-refactoring commits using automated tooling; instances where the gold patch fails its test suite are discarded.
  3. Filtering and rewriting: Experts, assisted by LLMs, discard low-complexity tasks, remove narrow and broad tests, rewrite issue descriptions from scratch as self-contained specifications verified to be both necessary and sufficient conditions for the gold patch, and perform final human verification.

The resulting dataset spans seven languages (Python, Java, TypeScript, Go, C, C++, Rust) across 70 repositories. Gold patches average 11.4 source files and 261.6 lines of code (8,179.5 tokens), with a maximum of 182 files; total modifications average 15.9 files per instance. Per-language statistics reveal structural differences: C++ and Java instances average over 20 modified files, and C has the highest average LOC (424.1), consistent with cross-cutting changes in codebases with deep type hierarchies.

A notable composition caveat: TypeScript's 28 instances come from only two repositories, with Angular alone contributing 25—an acknowledged skew arising from selecting large, actively maintained projects. The authors also disclose that LLM-assisted classification shows every instance involves at least two task categories, with 46.5% spanning three or more; bug fixes co-occur with refactoring in 41.2% of instances, meaning agents must handle compound challenges rather than isolated transformations.

Experimental results

Six models were evaluated under two scaffolds (mini-swe-agent and OpenHands) with a 300-step and $10 cost limit per instance:</p> <div class='overflow-x-auto max-w-full my-4'><table class='table border-collapse w-full' style='table-layout: fixed'><thead><tr> <th>Model</th> <th>mini-swe-agent</th> <th>OpenHands</th> <th>Cost (OpenHands)</th> </tr> </thead><tbody><tr> <td>GPT-5.2</td> <td>21.8%</td> <td><strong>41.2%</strong></td> <td>$3.60 Claude Sonnet 4.6 30.6% 38.8% $4.77 GLM-5 22.9% 36.5% $0.24 Qwen3.5 20.6% 36.5% $0.78 Kimi-K2.5 26.5% 32.9% $0.72 Gemini-3-Pro 26.5% 19.4% $1.49

Three findings stand out. First, open-weight models approach proprietary performance at a fraction of the cost: GLM-5 achieves 36.5% at $0.24 per instance—roughly one-twentieth the cost of Claude Sonnet 4.6, which trails GPT-5.2 despite being the most expensive model. Higher spending does not translate proportionally into resolve rate. Second, scaffold choice matters substantially: every model except Gemini-3-Pro improves markedly under OpenHands, with GPT-5.2 nearly doubling from 21.8% to 41.2%, suggesting richer runtime tooling particularly benefits large-scale refactoring. Third, no model dominates across languages: Claude Sonnet 4.6 leads on TypeScript (53.6%) and Rust (63.6%), GPT-5.2 on Python (48.3%) and C (75.0%), GLM-5 on Java (34.6%), and Qwen3.5 on C++ (54.5%). The high variance on TypeScript and Rust—including Gemini-3-Pro scoring 0.0% on TypeScript—suggests language-specific training data, rather than inherent language difficulty, drives these gaps.

Failure analysis

Trajectory analysis identifies incomplete refactoring as the dominant failure mode. Both examined agents track the gold patch distribution closely for small changes but diverge sharply beyond roughly five files: agents reach their 90th percentile by approximately 10 modified files, whereas gold patches require around 20. Critically, this is not a file-localization failure—agents correctly identify core files but fail to propagate transformations to peripheral call sites, configuration files, documentation, and test fixtures, leaving downstream dependencies inconsistent.

On resolved versus unresolved instances, successful resolutions complete in markedly fewer interaction rounds. Failed attempts exhibit "unproductive exploration": repetitive edit–revert cycles consuming steps without expanding modification scope. Qwen3.5 is the extreme case, taking the most steps under both scaffolds yet never leading overall. The authors conclude the bottleneck is not reasoning ability per se but the capacity to maintain a coherent plan across many files through cascading consequences of structural change.

Limitations and open questions

Several limitations warrant note. The benchmark contains only 170 instances, small relative to automated benchmarks, though justified by curation depth. Repository concentration skews language-level conclusions: TypeScript results rest largely on Angular, so per-language rankings may not generalize beyond those projects. Instances are mined from commits rather than curated issues, so even rewritten descriptions depend on expert judgment about what constitutes a necessary and sufficient specification—and the curation pipeline itself uses LLM assistance, introducing a potential circularity given that the evaluated systems are also LLM-based. Contamination risk from public GitHub sources is mitigated only partially by the post-January 2025 cutoff. Finally, the outcome-driven evaluation (all tests must pass) does not measure intermediate reasoning quality or whether agent solutions preserve behavior in ways the test suite fails to capture—the same narrowness concern the authors raise about prior benchmarks could apply to any fixed test suite.

Conclusion

SWE-Bench ProMax demonstrates that large-scale, behavior-preserving refactoring remains substantially unsolved for current AI coding agents, with a best resolve rate of 41.2% and a clear, diagnosable failure mode: incomplete cross-file propagation coupled with unproductive exploration cycles. Its principal contributions are methodological—systematic expert curation addressing documented test-quality defects, and demonstration that open-weight models achieve near-frontier refactoring performance at an order-of-magnitude lower cost. The open questions it leaves are specific: whether scaffold improvements can close the gap between mini-swe-agent and OpenHands performance, whether the incomplete-propagation failure mode can be addressed through explicit change-planning mechanisms rather than more exploration steps, and how well per-language findings generalize beyond the concentrated repository samples.

Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.

Tweets

Sign up for free to view the 6 tweets with 82 likes about this paper.