一句话:提出基于LLM代码改写的可扩展合成缺陷流水线,构建含中间修复步骤的仓库级数据集SWE-Synth,训练效果媲美人工数据集。
自动程序修复(APR)旨在自主修复软件缺陷,但其效果受限于缺乏多样、真实的缺陷数据集。人工挖掘与标注成本高,难以扩展。本文提出一种可扩展的合成数据流水线,利用大语言模型(LLM)通过定向代码改写生成合成缺陷,并能合成有价值的中间修复步骤,从而增强面向正确修复的训练信号。基于该方法,作者构建了 SWE-Synth:一个规模大、上下文丰富、自然且可自动验证的缺陷-修复对数据集,并包含中间修复步骤。在 SWE-Bench 与 BugsInPy 等基准上,使用该合成数据集训练的 LLM 学到了上下文感知的修复策略,修复准确率与使用 SWE-Gym 等 GitHub 人工数据集训练相当,同时具备 effortless 的缺陷合成与更优的可扩展性。
Automated program repair (APR) aims to autonomously fix software bugs, yet its effectiveness is hampered by the lack of diverse, real-world bug datasets essential for model training. Although combining large-scale mining with human effort can yield such datasets, the associated costs limit scalability. To address this, we introduce a novel, scalable synthetic data pipeline that leverages large language models (LLMs) to generate synthetic bugs through targeted LLM-based code rewriting. Our pipeline is also capable of synthesizing valuable intermediate repair steps and enriches the training signal toward correct fixes. Using our method, we create SWE-Synth, a large and contextually rich dataset of bug-fix pairs that are natural, scalable, automated verifiable, and contain intermediate repair steps. Training LLMs on our synthetic dataset yields context-aware repair strategies, that achieve repair accuracy equivalent to those trained on manually curated datasets from GitHub like SWE-Gym while delivering superior scalability with effortless bug synthesis, as demonstrated on popular benchmarks (SWE-Bench and BugsInPy).
@inproceedings{paperbot11568,
title = {Synthetic Repo-level Bug Dataset for Training Automated Program Repair Models},
author = {Minh V. T. Pham and Huy N. Phan and Nhat Hoang Phan and Cuong Chi Le and Tien N. Nguyen and Nghi Bui},
booktitle = {ICSE},
year = {2026},
doi = {10.1145/3744916.3764562}
}