This paper presents a unified catalogue of test refactoring patterns derived from a mixed-method approach involving repository mining, developer surveys, and analysis of StackOverflow discussions, to establish a rigorous benchmark for evaluating future automated recommendation systems, including those driven by Large Language Models.
Abstract
Automated software testing is critical for modern software development, yet test code itself requires maintenance and refactoring to prevent decay. While theoretical test-specific code smells are well-documented, the practical automation of test refactoring—both detection and recommendation—remains incipient, leading to fragmented knowledge and inadequate tooling. This paper bridges this gap by presenting a unified catalogue of test refactoring patterns derived from a mixed-method approach involving repository mining, developer surveys, and analysis of StackOverflow discussions. To operationalize this catalogue, we extend RefactoringMiner with test-aware detection capabilities and introduce PatternTracker, a tool for identifying and tracking the evolution of test patterns across version history. Leveraging this infrastructure, we analyzed 1.7 million Java projects to generate a high-confidence ground-truth dataset of test refactorings. Our results validate the prevalence of these patterns in open-source projects and establish a rigorous benchmark for evaluating future automated recommendation systems, including those driven by Large Language Models.
Results show that ML-enhanced recommendations outperform traditional methods in accuracy, relevance, and impact on maintainability metrics, and highlight the potential of integrating ML into modern development practices to support developers in producing cleaner, more maintainable software systems.
Rohit Malhotra· International Journal of Mod...· 0 citations
SemaDiff, a novel approach for identifying semantic-preserving commits through behaviour-based analysis, is proposed, and results show that SemaDiff distinguishes accurately semantic-preserving from -- changing commits in about 76% of the cases, with a 100% precision in semantic-changing commit detection.
Maha Ayub, Michael Konstantinou, Ahmed Khanfir et al.· arXiv.org· 0 citations
A high-quality benchmark of 1,000 code refinement instances from 328 Python, Java, and JavaScript repositories that focused on one of the most challenging code refinement scenarios that strictly requires repository-level knowledge reasoning, and a straightforward method, RepoRefiner, which retrieves repository-level co...
Ke Wang, Peng Lan, Jia-Kun Liu et al.· ACM Transactions on Software...· 1 citation
SmellCC, a Visual Studio Code extension that augments SonarQube with an LLM-based pipeline to automatically detect and refactor Python code smells, provides in-place, one-click remediation for the top-10 most frequent smells, effectively preventing the accumulation of technical debt during development.
Xiaoting Zhang, Yujie Zhang, Zhi-Peng Gao et al.· 0 citations
This paper presents a comprehensive catalogue of 57 test-specific refactoring types, out of which only 33 were previously documented in the literature, using a mixed-method approach grounded on three sources of data.
This work proposes an approach based on a foundation model oracle that analyzes git-style diffs to identify behavioral changes introduced by Python refactorings and uncovered 13 distinct bugs among the seven refactoring types studied.
Jonhnanthan Oliveira, Rohit Gheyi, Márcio Ribeiro et al.· 0 citations
We use cookies to run the site and, with your consent, for analytics and to show ads.
See our Cookie Policy.