SWE-Factory: Your Automated Factory for Issue Resolution Training Data and Evaluation Benchmarks

Lianghong Guo, Yanlin Wang, Caihua Li, Wei Tao, Pengyu Yang +4 more
6/12/2025
cs.SEcs.AI

No official code found. Best implementation: DeepSoftwareAnalytics/swe-factory (200 stars, last commit 2026-03-02).

Abstract

Constructing large-scale datasets for the GitHub issue resolution task is crucial for both training and evaluating the software engineering capabilities of Large Language Models (LLMs). However, the existing GitHub issue resolution data construction pipeline is challenging and labor-intensive. We identify three key limitations in existing pipelines: (1) test patches collected often omit binary file changes; (2) the manual construction of evaluation environments is labor-intensive; and (3) the fail2pass validation phase requires manual inspection of test logs and writing custom parsing code to extract test status from logs. In this paper, we propose SWE-Factory, a fully automated issue resolution data construction pipeline, to resolve these limitations. First, our pipeline automatically recovers missing binary test files and ensures the correctness of test patches. Second, we introduce SWE-Builder, a LLM-based multi-agent system that automates evaluation environment construction. Third, we introduce a standardized, exit-code-based log parsing method to automatically extract test status, enabling a fully automated fail2pass validation. Experiments on 671 real-world GitHub issues across four programming languages show that our method can effectively construct valid evaluation environments for GitHub issues at a reasonable cost. For example, with GPT-4.1 mini, our SWE-Builder constructs 337 valid task instances out of 671 issues, at $0.047 per instance. Our ablation study further shows the effectiveness of different components of SWE-Builder. We also demonstrate through manual inspection that our exit-code-based fail2pass validation method is highly accurate, achieving an F1 score of 0.99. Additionally, we conduct an exploratory experiment to investigate whether we can use SWE-Factory to enhance models' software engineering ability.

View on arXivView PDF

Code Implementations(1)

[FSE'2026] SWE-Factory: Your Automated Factory for Issue Resolution Training Data and Evaluation Benchmarks

20019Shell, PythonApr 10, 20257 months agoNOASSERTION
coding-agentsdata-synthesisissue-resolutionswe

Similar Papers

Cite this paper

@article{guo2025swefactory,
  title  = {SWE-Factory: Your Automated Factory for Issue Resolution Training Data and Evaluation Benchmarks},
  author = {Lianghong Guo and Yanlin Wang and Caihua Li and Wei Tao and Pengyu Yang and Jiachi Chen and Haoyu Song and Duyu Tang and Zibin Zheng},
  year   = {2025},
  eprint = {2506.10954},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2506.10954v3}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2506.10954.svg)](https://codeofpaper.com/paper/2506.10954)

Discussion