The Effectiveness of Supervised Machine Learning Algorithms in Predicting Software Refactoring
Autor: | Erick Galani Maziero, Maurício Aniche, Rafael Serapilha Durelli, Vinicius H. S. Durelli |
---|---|
Rok vydání: | 2020 |
Předmět: |
FOS: Computer and information sciences
Computer science Decision tree Maintainability 02 engineering and technology Machine learning computer.software_genre Computer Science - Software Engineering Naive Bayes classifier Software 0202 electrical engineering electronic engineering information engineering Software system machine learning for software engineering Artificial neural network business.industry software refactoring 020207 software engineering Random forest Software Engineering (cs.SE) Code refactoring refactoring recommendation Artificial intelligence business computer Algorithm |
Zdroj: | IEEE Transactions on Software Engineering, 48(4) |
ISSN: | 0098-5589 |
DOI: | 10.48550/arxiv.2001.03338 |
Popis: | 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. Comment: To appear in TSE |
Databáze: | OpenAIRE |
Externí odkaz: |