On the Employment of Machine Learning for Recommending Refactorings: A Systematic Literature Review - Armijo, Guisella Angulo; Santibañez, Daniel San Martín; Durelli, Rafael; Camargo, Valter Vieira de (Anais do Simpósio Brasileiro de Engenharia de Software (SBES); 2024: Anais do XXXVIII Simpósio Brasileiro de Engenharia de SoftwareDO - 10.5753/sbes.2024.3436, 2024)
Context and Motivation: Refactoring is a widely recognized technique aimed at enhancing the comprehensibility and maintainability of source code while preserving its external behavior. The widespread adoption of refactorings as a systematic practice is still very dependent on individual expertise and inclination of software engineers. To address this challenge, various approaches have emerged with the objective of automatically suggesting refactorings, thereby alleviating engineers from the manual burden of identifying such opportunities. Objective: This study aims to analyze the current landscape of approaches utilizing Machine Learning (ML) for recommending refactorings and discuss their usage. Method: A Systematic Literature Review (SLR) was conducted, spanning five scientific databases from 2015 to December 2023. Initially, 177 papers were identified, from which a final set of 27 papers was reached. Results: The findings encompass: i) an exploration of the most and least investigated refactorings and ML techniques; ii) an analysis of the datasets used; iii) an examination of the evaluation methodologies employed; and iv) an assessment of recommendation completeness and quality. Conclusion: This study has significant potential for further research, as numerous refactorings remain unexplored by existing studies. Furthermore, it highlights that many ML-based approaches fall short in delivering comprehensive recommendations, thus emphasizing the imperative for ongoing investigation and enhancement in this field. All artifacts produced from our research are available on the replication package [1].