The Effectiveness of Supervised Machine Learning Algorithms in Predicting Software Refactoring
Not on the map. Why?
Abstract (arXiv)
Refactoring is the process of changing the internal structure of software to improve its quality without modifying its external behavior. Empirical studies have repeatedly shown that refactoring has a positive impact on the understandability and maintainability of software systems. However, before carrying out refactoring activities, developers need to identify refactoring opportunities. Currently, refactoring opportunity identification heavily relies on developers' expertise and intuition. In this paper, we investigate the effectiveness of machine learning algorithms in predicting software refactorings. More specifically, we train six different machine learning algorithms (i.e., Logistic Regression, Naive Bayes, Support Vector Machine, Decision Trees, Random Forest, and Neural Network) with a dataset comprising over two million refactorings from 11,149 real-world projects from the Apache, F-Droid, and GitHub ecosystems. The resulting models predict 20 different refactorings at class, method, and variable-levels with an accuracy often higher than 90%. Our results show that (i) Random Forests are the best models for predicting software refactoring, (ii) process and ownership metrics seem to play a crucial role in the creation of better models, and (iii) models generalize well in different contexts.
Key facts. Cited by 9 papers in the map (data through 13 Oct 2026). First posted on arXiv 10 Jan 2020.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2021: 1; 2022: 2; 2023: 3; 2024: 2; 2025: 1.
9 papers.
- 2021A Survey on Machine Learning Techniques for Source Code Analysiscited by 24
- 2023A systematic literature review on source code similarity measurement and clone detection: techniques, applications, and challengescited by 14
- 2025Combining Large Language Models with Static Analyzers for Code Review Generationcited by 6
- 2024Fairness Concerns in App Reviews: A Study on AI-based Mobile Appscited by 4
- 2022Evaluation of Contrastive Learning with Various Code Representations for Code Clone Detectioncited by 3
- 2022Learning to predict test effectivenesscited by 2
- 2023Can You Improve My Code? Optimizing Programs with Local Searchcited by 1
- 2023On ML-Based Program Translation: Perils and Promisescited by 0
- 2024A Systematic Literature Review on the Use of Machine Learning in Software Engineeringcited by 0
- 2025Combining Large Language Models with Static Analyzers for Code Review Generation10 Feb 2025
- 2024A Systematic Literature Review on the Use of Machine Learning in Software Engineering19 Jun 2024
- 2024Fairness Concerns in App Reviews: A Study on AI-based Mobile Apps16 Jan 2024
- 2023Can You Improve My Code? Optimizing Programs with Local Search10 Jul 2023
- 2023A systematic literature review on source code similarity measurement and clone detection: techniques, applications, and challenges28 Jun 2023
- 2023On ML-Based Program Translation: Perils and Promises21 Feb 2023
- 2022Learning to predict test effectiveness20 Aug 2022
- 2022Evaluation of Contrastive Learning with Various Code Representations for Code Clone Detection17 Jun 2022
- 2021A Survey on Machine Learning Techniques for Source Code Analysis18 Oct 2021