arXiv:2610.25308cs.SEOct 2026

Manuscript Offprint

arXiv:2610.25308

From Software History to Executable Regression Tasks: A System for Evaluating Software Agents

Ruikai Shi, Zhengran Zeng, Rui Xie, Shikun Zhang, Wei Ye

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

RUIKAI SHI*, Peking University, China

ZHENGRAN ZENG*, Peking University, China

RUI XIE†, Peking University, China

SHIKUN ZHANG†, Peking University, China

WEI YE†, Peking University, China

As software agents increasingly generate and modify code, evaluating their ability to review changes and discover defects becomes important. Such evaluation needs executable project environments for investigation and reliable defect references supported by reproducible behavior. Existing code review benchmarks provide limited support for this combination. We present a system that constructs executable regression instances from historical introducing-fixing commit pairs and developer tests. The system extracts candidate tests from fixing-side changes, then uses constrained agents to transplant them and configure version-specific environments while preserving production code and test expectations. Independent replay and evidence-based review verify whether tests that fail on the introducing version and pass on the fixing version support the proposed regression relationship. Accepted instances retain both versions' replay recipes, validated tests, and execution evidence. Repair-supported analysis and human review add root-cause locations, tested repairs, and causal explanations. These instances support bug detection and localization in code review, and further enable bug repair and regression-test generation on the same defects. The system constructs 172 validated instances from 522 candidates across 11 Python projects. We evaluate three software agents with ten models and additional reasoning-effort settings on 83 manually selected, enriched instances across the three tasks. Precise root-line localization remains challenging, while baseline combinations achieve repair and regression-test generation success rates of up to 68.7% and 77.1%, respectively. Leading configurations differ by task, and higher task performance does not necessarily yield greater API-cost efficiency. Our approach provides reusable executable evidence for studying agents' defect discovery, repair, and testing capabilities.

CCS Concepts: • Software and its engineering → Software testing and debugging; Software evolution.

Additional Key Words and Phrases: Executable regression data, Mining software repositories, Large language models, Benchmark

1 Introduction

As LLM-based agents take on more code generation and modification tasks [42], evaluating and improving their code review and defect discovery capabilities becomes increasingly important. Finding defects in a change can require executing the program, constructing inputs, and checking suspected behavior. Evaluation therefore needs executable project environments that support investigation and reliable reference answers identifying the defects and their locations.

SWR-Bench, CodeFuse-CR-Bench (SWE-CARE), and AACR-Bench provide pull requests, repository context, and review annotations [12, 44, 46]. Their published construction workflows do not describe systematic reconstruction and validation of project execution conditions for each reviewed revision. Repository snapshots and general Agent containers still require historical dependencies and test support to run the affected behavior reliably. Reliable evaluation also needs reproducible behavioral evidence supporting the reference defect. We address these needs by constructing executable regression instances from software history.

∗^{*}These authors contributed equally to this work.

†^{\dagger}Corresponding authors: Rui Xie, Shikun Zhang, and Wei Ye.

Authors' email addresses: Ruikai Shi (rkshi25@stu.pku.edu.cn); Zhengran Zeng (zhengranzeng@stu.pku.edu.cn); Rui Xie (ruixie@pku.edu.cn); Shikun Zhang (zhangsk@pku.edu.cn); Wei Ye (wye@pku.edu.cn).

Software history records introducing changes, repairs, and developer tests. Constructing executable instances presents three challenges. Fixing-side test changes may pass on both versions or exercise unrelated behavior. Historical versions may require different dependencies and test support that must be reproducible beyond an Agent session. Fail-to-pass outcomes must reflect proposed code changes rather than incompatible test support or unintended validation edits.

We present EReg-Factory, a system for constructing executable regression data from candidate introducing-fixing pairs. The system extracts fixing-side candidate tests for constrained Validation Agents to transplant and execute in version-specific environments. Operation Judges check Agent actions; an environment replayer independently reruns tests; and a Regression Verifier connects paired outcomes to code changes. Instances retain two replay recipes, validated tests, execution evidence, and explanations. Repair-supported analysis and human review add root locations, tested repairs, and causal explanations. These instances support bug detection and localization in code review, where Agents examine the introducing change without access to later fixes or target regression tests. Retained repairs and behavioral evidence further support bug repair and regression-test generation. These three related tasks are evaluated independently on the same defects.

Across 522 candidates from 11 Python projects, EReg-Factory yields 172 validated regression instances. We evaluate three Agents with ten models and additional reasoning settings on 83 manually selected enriched instances across the three tasks. Precise root-cause localization remains challenging, while repair and regression-test generation show promise. Leading models differ by task, and higher performance does not necessarily provide greater benefit per dollar.

Our contributions are:

  • A regression construction system combining paired environment construction, independent replay, and evidence review to validate historical introducing-fixing relationships and retain reproducible execution conditions.

  • Instance enrichment for three tasks using reviewed root locations, repairs, and explanations to support code review through bug detection and localization, alongside repair and regression-test generation.

• An empirical study characterizing construction outcomes and comparing Agents, models, and reasoning configurations by task performance and cost efficiency.

References (27)