Context <p>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.</p> Objective <p>We investigate the long-term effects of refactoring to provide recommendations that support strategic development decisions.</p> Method <p>We assess refactoring impact through change- and defect-proneness analysis, as well as benefit/effort evaluation.</p> Results <p>Most 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.</p> Conclusions <p>Refactorings 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.</p>

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Analyzing the ripple effects of refactoring

  • Mikel Robredo,
  • Matteo Esposito,
  • Fabio Palomba,
  • Rafael Peñaloza,
  • Valentina Lenarduzzi

摘要

Context

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.

Objective

We investigate the long-term effects of refactoring to provide recommendations that support strategic development decisions.

Method

We assess refactoring impact through change- and defect-proneness analysis, as well as benefit/effort evaluation.

Results

Most 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.

Conclusions

Refactorings 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.