Machine Learning for Change-Prone Class Prediction: A History-Based Approach - Silva, Rogério De Carvalho; Farah, Paulo Roberto; Vergilio, Silvia Regina (Anais do Simpósio Brasileiro de Engenharia de Software (SBES); 2022: Anais do XXXVI Simpósio Brasileiro de Engenharia de Software, 2022)
Classes have a very dynamic life cycle in object-oriented software projects. They can be created, modified or removed due to different reasons. The prediction of prone-change classes in the early stages of the project positively impact the team’s productivity, the allocation of resources, and the quality of the software developed. Existing work uses Machine Learning (ML) and different kind of class metrics. But a limitation of existing work that they do not consider the temporal dependency between instances in the datasets. To fulfill such gap, this work introduces an approach based on the change history of the class in different releases from public repositories. The approach uses the Sliding Window method, and adopts as predictors structural and evolutionary metrics, as well as frequency and diversity of smells. Five projects and four ML algorithms are used in the evaluation. In the great majority of the cases our approach overcomes a traditional approach considering all the indicators. Random Forest presents the best performance and the use of smell-related information does not impact the results.