Can Old Tests Do New Tricks for Resolving SWE Issues?
Open Access
- 30 June 2026
- journal article
- Published by Association for Computing Machinery (ACM) in Proceedings of the ACM on Software Engineering
- Vol. 3 (FSE) , 3186-3207
Abstract
Test suites in real-world projects are often large and achieve high code coverage, yet they remain insufficient for detecting all bugs. The abundance of unresolved issues in open-source project trackers highlights this gap. While regression tests are typically designed to ensure past functionality is preserved in the new version, they can also serve a complementary purpose: debugging the current version. Specifically, regression tests can (1) enhance the generation of reproduction tests for newly reported issues, and (2) validate that patches do not regress existing functionality. We present TestPrune, a fully automated technique that leverages issue tracker reports and strategically reuses regression tests for both bug reproduction and patch validation. A key contribution of TestPrune is its ability to automatically minimize the regression suite to a small, highly relevant subset of tests. Due to the predominance of LLM-based debugging techniques, this minimization is essential as large test suites exceed context limits, introduce noise, and inflate inference costs. TestPrune can be plugged into any agentic bug repair pipeline and orthogonally improve overall performance. As a proof of concept, we show that TestPrune leads to a 6.2Keywords
This publication has 14 references indexed in Scilit:
- Issue Localization via LLM-Driven Iterative Code Graph Searching2025
- SpecRover: Code Intent Extraction via LLMs2025
- ATM: Black-box Test Case Minimization based on Test Code Similarity and Evolutionary Search2023
- Fine-grained test minimization2018
- Energy-aware test-suite minimization for Android apps2016
- Cost-effective test suite minimization in product lines using search techniquesJournal of Systems and Software, 2015
- Regression testing minimization, selection and prioritization: a surveySoftware Testing, Verification and Reliability, 2012
- Test suite reduction with selective redundancy2005
- Test-suite reduction and prioritization for modified condition/decision coverageIEEE Transactions on Software Engineering, 2003
- Note on the Sampling Error of the Difference Between Correlated Proportions or PercentagesPsychometrika, 1947