Dependent or Not: Detecting and Understanding Collections of Refactorings
- 17 February 2023
- journal article
- research article
- Published by Institute of Electrical and Electronics Engineers (IEEE) in IEEE Transactions on Software Engineering
- Vol. PP (00985589) , 1-15
Abstract
Refactoring is a program transformation to improve the internal structure of a program while preserving its external behavior. Developers frequently apply multiple refactorings that depend on each other to achieve goals such as improving code reusability. Although manually applying a sequence of dependent refactorings is a common practice, existing refactoring recommendation tools treat refactorings in isolation without revealing the dependencies among them to developers. One reason is that these relationships among refactorings are poorly understood. Current approaches treat refactoring recommendations as a strictly ordered sequence limiting developers’ ability to understand, validate, and apply recommended refactorings. To address this gap, this paper describes a theory for reasoning about collections of refactorings through defining an ordering dependency relation among refactorings and organizing collection of refactorings as a set of refactoring graphs. We propose an algorithm for identifying refactoring dependencies and illustrate these concepts with a tool for visualizing such refactoring dependencies and refactoring graphs. Our validation results demonstrate that 43% of the 1,457,873 recommended refactorings from 9,595 projects that we studied are part of dependent refactoring graphs. Furthermore, refactorings are not only commonly involved in dependent relations, but also when applied, dependent refactoring graphs improve all of the quality attribute metrics in our experiments more than individual refactorings.Keywords
This publication has 34 references indexed in Scilit:
- An Empirical Study of RefactoringChallenges and Benefits at MicrosoftIEEE Transactions on Software Engineering, 2014
- Recommending Refactoring Operations in Large Software Systems2013
- An exploration of technical debtJournal of Systems and Software, 2013
- Empirical investigation of refactoring effect on software qualityInformation and Software Technology, 2009
- Conflict-aware schedule of software refactoringsIET Software, 2008
- Analysing refactoring dependencies using graph transformationSoftware and Systems Modeling, 2007
- Detecting Structural Refactoring Conflicts Using Critical Pair AnalysisElectronic Notes in Theoretical Computer Science, 2005
- A hierarchical model for object-oriented design quality assessmentIEEE Transactions on Software Engineering, 2002
- Evaluating the cost of software qualityCommunications of the ACM, 1998
- 9 Computer experiments1996