arXiv(opens in a new tab)cs.SEOct 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2610.21359

SWE-at-Scale: Scalable Issue Synthesis from Historical Bug Fixes

Silin Chen, Zihan Zhang, Xiaodong Gu, Jiale Huang, Yuling Shi, Han Li, Zhao Shan, Chengcheng Wan, Zhensu Sun, Haibing Guan

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

As coding agents become increasingly capable, robust evaluation requires a broader and more diverse supply of verifiable software engineering (SWE) tasks. However, real-world tasks are constrained by the natural frequency of issue reporting and the substantial cost of manual curation. Furthermore, existing synthetic approaches rely primarily on the pretrained knowledge of large models coupled with heuristic prompting, often failing to capture the authentic, complex mechanics of software failures. To exponentially scale SWE task production, we introduce SWE-at-Scale, a framework that automatically synthesizes realistic issues by reverse-engineering real-world software fixes. Our key insight is that historical fixes encapsulate deep mechanistic knowledge of bug formation: inverting a fix transforms repair supervision into bug-induction supervision grounded in actual development scenarios. SWE-at-Scale transfers these learned bug patterns to novel code contexts, repeatedly sampling diverse bug typologies to construct executable SWE tasks. Extensive experiments show that SWE-at-Scale generates more diverse and realistic SWE tasks than current synthesis baselines while posing greater challenges to state-of-the-art coding agents. Notably, SWE-at-Scale can generate distinct bug types from a single code context, with bug diversity scaling robustly even up to 200 generations per file. Overall, SWE-at-Scale turns finite real-world fixes into reusable supervision for scalable synthesis of realistic, diverse, and challenging SWE tasks.

1 INTRODUCTION

Repository-level software engineering (SWE) tasks have become a central testbed for evaluating coding agents (Chen et al., 2025b; Lin et al., 2024; Ma et al., 2026; Chen et al., 2026b;c; Lin et al., 2026; Gu et al., 2025; Shi et al., 2026a; Shao et al., 2025). A useful SWE task involves more than

Figure

SWE-bench Verified (Real Issues)

Figure

SWE-smith (Synthetic Issues)

Figure

SWE-at-Scale (Synthetic Issues)

Figure

SWE-at-Scale+ (Synthetic Issues)

Interface Logic Boundary Arguments Attribute Bookkeeping Copy semantics Protocol Filesystem

Figure 1: Bug type distributions for real-world SWE-bench Verified tasks, SWE-smith synthetic tasks, and SWE-at-Scale synthetic SWE tasks.

†^{\dagger}Corresponding author.

Stage 1: Learn From Real Fixes

Stage 2: Dual-Mode Bug Synthesis

Figure

Figure 2: Overview of SWE-at-Scale. Stage 1 reverses real software fixes to construct bug-inducing patch and bug-pattern supervision, which is used to train the synthesis models. Stage 2 applies the learned transformations to new golden repositories through two complementary synthesis models.

a code change (Yang et al., 2025; Sonwane et al., 2025): it should preserve a realistic repository context, introduce an observable behavioral bug, provide a meaningful issue description, and remain executable within the repository’s testing infrastructure.

Existing real-world SWE benchmarks (Jimenez et al., 2024) are inherently difficult to scale, as new tasks can only emerge at the pace of real software development (Zhang et al., 2025). Collecting these tasks is further constrained by repository availability and the cost of constructing executable environments (Jain et al., 2025). Consequently, scaling SWE task data solely through naturally occurring issues requires continuously discovering and validating additional real-world development events.

Recent work has explored large language models (LLMs) as a means of scaling SWE task construction. SWE-smith (Yang et al., 2025) leverages LLMs to inject bugs by prompting them to modify selected code entities, enabling the synthesis of large numbers of synthetic task instances. SWE-Synth (Pham et al., 2025) employs LLM-based component re-implementation followed by test-based filtering, while BugPilot (Sonwane et al., 2025) explores feature addition and behavioral regression as a source of synthetic bugs. These approaches demonstrate that LLMs can generate bugs beyond simple hand-designed mutation rules. However, without dedicated training for bug injection, these approaches largely depend on the bug-generation knowledge already encoded in general-purpose LLMs and elicited through prompting, making repeated generation more likely to revisit familiar bug patterns rather than continually expanding the diversity of synthesized tasks. This motivates a different scaling strategy: rather than repeatedly prompting a general-purpose LLM, we reverse real-world bug fixes to construct correct-to-buggy supervision and train a reusable bug-injection model that can generate diverse bugs in new code contexts.

We introduce SWE-at-Scale, a framework that turns real software fixes into a scalable source of repository-level SWE tasks. Rather than treating each historical fix as a single, one-off task instance, SWE-at-Scale reverses bug-fixing transformations and uses them as supervision for learning how bugs can be induced. Aggregating such reversed transformations across diverse repositories allows the model to learn a reusable distribution of real-world bug patterns, instead of relying solely on the bug-generation knowledge already encoded in general LLMs. Through this reverse-learning formulation, SWE-at-Scale can repeatedly sample these real-world bug patterns and instantiate them in new code contexts, allowing a finite collection of real fixes to support the synthesis of a much larger and more diverse set of executable SWE tasks.

We train SWE-at-Scale and SWE-at-Scale+ on 13,407 real-fix transformations collected from 688 repositories, using Qwen3.5-9B as the backbone model. SWE-at-Scale directly learns to generate bug-inducing patches, while SWE-at-Scale+ explicitly learns natural-language bug patterns that describe how the target code should be modified to induce a bug. Experiments show that SWE-at-Scale synthesizes SWE tasks that are realistic, challenging, diverse, and scalable under repeated generation. In pairwise comparisons with real-world SWE-bench Verified issues, human evaluators select

Figure

Figure 3: Bug type distribution in the training dataset.

Figure

Figure 4: Distribution of training instances across repository domain categories.

SWE-at-Scale- and SWE-at-Scale+-generated bugs as more likely to occur in real software development in 55.9% and 61.2% of cases, respectively. The synthesized tasks also remain challenging for current coding agents: across four resolution models, SWE-at-Scale achieves Pass@1 between 31.68% and 48.48%, while SWE-at-Scale+ achieves between 16.81% and 37.02%, with SWE-at-Scale+ approaching the difficulty of human-expert-designed tasks such as DeepSWE (Huang et al., 2026). As shown in Figure 1, SWE-at-Scale covers a more balanced range of bug types than existing synthesis methods, suggesting that learning from real fixes captures a richer bug distribution than relying on general LLMs' knowledge alone. This diversity also persists under repeated sampling: even after 200 generations per file, 88.27% of usable patches remain unique, indicating that the generated bugs do not quickly collapse to repeated outcomes.

Our contributions are threefold: 1) We introduce SWE-at-Scale, a scalable paradigm for SWE task synthesis. SWE-at-Scale reverses real bug fixes as supervision for learning how bugs are introduced, allowing bug patterns observed in real development to be instantiated in new code contexts; 2) We construct a large-scale training corpus of 13,407 real-fix transformations from 688 repositories and develop two synthesis variants: SWE-at-Scale directly learns bug-inducing patches, while SWE-at-Scale+ externalizes bug-inducing logic as natural-language patterns for more explicit realization; and 3) Through controlled comparisons with real-world and synthetic SWE tasks, we show that SWE-at-Scale produces realistic, diverse, and challenging executable tasks, and that its bug diversity continues to increase as the inference-time sampling budget grows.

References (45)