In Search of Metrics to Guide Developer-Based Refactoring Recommendations
Mikel Robredo, Matteo Esposito, Fabio Palomba, Rafael Peñaloza, Valentina Lenarduzzi
TL;DR
The paper tackles the challenge of guiding refactoring by developing developer-centric recommendations grounded in empirical metrics. It proposes using Large Language Models to analyze commit messages and extract refactoring motivations, extending beyond PR-centric analyses to encompass broader project history. The study aims to identify a catalog of product and process metrics that quantify developers’ motivations to refactor, enabling targeted and cost-efficient refactoring efforts. The work promises practical benefits for practitioners and lays a foundation for future research on developer-based software maintenance.
Abstract
Context. Source code refactoring is a well-established approach to improving source code quality without compromising its external behavior. Motivation. The literature described the benefits of refactoring, yet its application in practice is threatened by the high cost of time, resource allocation, and effort required to perform it continuously. Providing refactoring recommendations closer to what developers perceive as relevant may support the broader application of refactoring in practice and drive prioritization efforts. Aim. In this paper, we aim to foster the design of a developer-based refactoring recommender, proposing an empirical study into the metrics that study the developer's willingness to apply refactoring operations. We build upon previous work describing the developer's motivations for refactoring and investigate how product and process metrics may grasp those motivations. Expected Results. We will quantify the value of product and process metrics in grasping developers' motivations to perform refactoring, thus providing a catalog of metrics for developer-based refactoring recommenders to use.
