Technical Debt (TD) is one of the main obstacles to the quality and sustainability of software in the long term, accumulating”interest” that increases maintenance costs and reduces the productivity of development teams. Among the strategies to manage TD, refactoring stands out for its ability to improve the internal structure of the code without changing its external behavior, contributing to improving the readability, maintainability, and extensibility of the software. This study analyzes the impact of refactoring on TD using metrics extracted from SonarQube and RefactoringMiner at the class level. TD is represented by the”sqale_debt_ratio” and stratified in quartiles to model its levels. The analysis focuses both on the presence or absence of refactoring and on the influence of specific types and levels of applications. Evaluating the role of refactoring is fundamental to understanding how these practices can reduce TD, improve software quality, and optimize maintenance. To ensure the robustness of the models, metrics directly related to TD were removed and collinearity-based selection techniques were applied. The validation of the approach was performed on six open-source software systems available on GitHub. The predictive models, built with machine learning techniques, were analyzed with SHAP (Shapley Additive exPlanations) to identify the most relevant features. The results of the study are promising and demonstrate how the adoption of targeted refactoring practices can effectively reduce TD. The combined approach of prediction and explainability helps to fill a gap in the literature and offers practical guidance for managing TD and optimizing refactoring practices in software systems.

Explainability of Technical Debt: An Analysis on the Role of Refactoring in Software Systems

Aversano, Lerina;Madau, Antonella;Verdone, Chiara
2025-01-01

Abstract

Technical Debt (TD) is one of the main obstacles to the quality and sustainability of software in the long term, accumulating”interest” that increases maintenance costs and reduces the productivity of development teams. Among the strategies to manage TD, refactoring stands out for its ability to improve the internal structure of the code without changing its external behavior, contributing to improving the readability, maintainability, and extensibility of the software. This study analyzes the impact of refactoring on TD using metrics extracted from SonarQube and RefactoringMiner at the class level. TD is represented by the”sqale_debt_ratio” and stratified in quartiles to model its levels. The analysis focuses both on the presence or absence of refactoring and on the influence of specific types and levels of applications. Evaluating the role of refactoring is fundamental to understanding how these practices can reduce TD, improve software quality, and optimize maintenance. To ensure the robustness of the models, metrics directly related to TD were removed and collinearity-based selection techniques were applied. The validation of the approach was performed on six open-source software systems available on GitHub. The predictive models, built with machine learning techniques, were analyzed with SHAP (Shapley Additive exPlanations) to identify the most relevant features. The results of the study are promising and demonstrate how the adoption of targeted refactoring practices can effectively reduce TD. The combined approach of prediction and explainability helps to fill a gap in the literature and offers practical guidance for managing TD and optimizing refactoring practices in software systems.
File in questo prodotto:
Non ci sono file associati a questo prodotto.

I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/11369/481178
Citazioni
  • ???jsp.display-item.citation.pmc??? ND
  • Scopus 0
  • ???jsp.display-item.citation.isi??? ND
social impact