Automatic Software Refactoring to Enhance Quality: A Review - Khaleel, Shahbaa I.; Mahmood , Rasha Ahmed (Jurnal Ilmiah Teknik Elektro Komputer dan Informatika, 2024)
Refactoring aims to enhance the internal structure of the code and improve maintainability without affecting its functionality and external behavior. As a result of the development of technologies, it has become necessary to apply automatic refactoring to address complexities and reduce technical debt. This review presents machine learning and deep learning techniques that lead to identifying opportunities for the need for refactoring and implementing them through analyzing the software code and discovering "code smells", where the focus is on the role of tools such as RefactoringMiner, CODEBERT in enhancing the accuracy of prediction. This review presents various methodologies that include metrics-based methods, search, machine learning and discusses their impact on software quality. The review reviews experimental studies that focus on the challenges of refactoring such as reducing the risks associated with making unnecessary modifications and determining the appropriate timing. Notable empirical studies include a study by Bavota et al., in which Ref-Finder was used to detect 15,008 refactorings in open source software systems, identifying 85% of which improved code quality and reduced bugs. Additionally, another study by Khatchadourian et al. demonstrated the effectiveness of OPTIMIZE STREAMS in improving code performance in large Java projects, increasing efficiency by 55% on average. The study presents two research contributions. The first is a comprehensive analysis of automated refactoring techniques using machine learning algorithms, in addition to improving maintainability and reducing complexity. The second contribution is to provide recommendations to support developers in using modern tools and choosing the right timing for refactoring, which enhances code productivity. The results showed that machine learning techniques can significantly enhance the efficiency of refactoring and thus support developers in making accurate decisions in enhancing maintainability.