Iter-T: ITERative Test Suite Generation for Automated Program Repair
- 10 March 2026
- journal article
- Published by Institute of Electrical and Electronics Engineers (IEEE) in IEEE Transactions on Software Engineering
- Vol. 52 (5) , 1739-1755
Abstract
Test-based automated program repair (TB-APR) techniques automatically fix buggy programs by relying on a failing test suite. This test suite serves a dual purpose: pinpointing bugs and evaluating the validity of potential patches. However, the effectiveness of TB-APR techniques in generating correct patches is highly dependent on the test suite utilized. The primary shortcoming of TB-APR techniques arises from the intrinsic incompleteness of test suites, resulting in a significant drawback: overfitting, i.e., the generation of ‘overfitted patches’, patches that pass the given test suites but fail to repair the subject program correctly regarding its more general intended behavior. To address this challenge, we present a novel technique designed to enhance the effectiveness of TB-APR methods by automatically generating test suites tailored for program repair. Unlike prior TB-APR techniques, it is rooted in the recognition that edge cases that invalidate overfitted patches play a pivotal role in guiding the repair process away from incorrect solutions. This technique leverages formal specifications and bounded verification to evaluate candidate patches and transforms the counterexamples (CEs) obtained from verifying candidate patches into tests for program repair. The efficacy of iteratively using such CEs as tests for TB-APR is substantiated by Iter-T our implementation of this technique for Java programs and JML specifications, evaluated on a benchmark of 717 buggy Java programs drawn from the APR literature. By progressively constructing test suites exclusively from CEs of overfitted candidate patches, Iter-T increases the odds of fixing a bug by about 58% compared to the originally provided test suites. Moreover, in cases where a TB-APR tool repairs a program using its original suite, employing CEs alone as test suites reduces the median time required to generate a correct patch by 42%. Remarkably, the generated CEs-based test suites are very small, accomplishing these results with only 2.4 tests on average.Keywords
This publication has 50 references indexed in Scilit:
- Exploring Automatic Specification Repair in Dafny Programs2023
- FixMiner: Mining relevant fix patterns for automated program repairEmpirical Software Engineering, 2020
- On Reliability of Patch Correctness Assessment2019
- Ultra-Large Repair Search Space with Automatically Mined Templates: The Cardumen Mode of Astor2018
- Automatic Program Repair by Fixing ContractsLecture Notes in Computer Science, 2014
- OpenJML: JML for Java 7 by Extending OpenJDK2011
- Specification-Based Program Repair Using SAT2011
- Pex–White Box Test Generation for .NET2008
- Feedback-Directed Random Test Generation29th International Conference on Software Engineering (ICSE'07), 2007
- An overview of JML tools and applicationsInternational Journal on Software Tools for Technology Transfer, 2004