Analyzing the ripple effects of refactoring
摘要
Short development cycles and continuous delivery pressure often push developers toward expedients that lead to poor design and hard-to-maintain systems. A common remedy is code refactoring, which reduces complexity and improves maintainability, though often seen as costly and risky.
ObjectiveWe investigate the long-term effects of refactoring to provide recommendations that support strategic development decisions.
MethodWe assess refactoring impact through change- and defect-proneness analysis, as well as benefit/effort evaluation.
ResultsMost refactorings have short-lived effects, persisting for fewer than 10 changes. Structural refactorings may last over 190 changes, with significant differences across families. Medium-lived refactorings (9–19 changes) prove the most stable and efficient, while longer-lasting ones become increasingly defect-prone and costly.
ConclusionsRefactorings differ in sustainability. Medium-duration refactorings strike the best balance between stability and maintenance cost, while structural ones, though impactful, pose higher long-term risks. These insights guide prioritization of refactoring types to maximize benefit and minimize technical debt.