Refactoring Prediction Using Multi-Label Classification Approach
Refactoring is the process of restructuring existing source code to improve its internal structure without altering its external behavior. Refactoring is essential to maintaining software quality; however, its manual application is labor-intensive, and existing automated techniques often fall short by relying on binary classification, neglecting the co-occurrence of multiple refactoring needs. This study addresses this gap by proposing and evaluating multi-label machine learning models capable of predicting combinations from 20 distinct refactoring operations across class, method, and variable granularities. We systematically investigate three multi-label learning strategies (Label Powerset, Classifier Chains, and Binary Relevance) integrated with five base classifiers: Random Forest, Gradient Boosting, XGBoost, Decision Tree, and Artificial Neural Network. Experiments are conducted using 10-fold cross-validation on a real-world dataset, with relevant feature selection techniques applied. Results indicate that variable-level metrics yield the highest predictive performance, with the Label Powerset strategy combined with Random Forest achieving a Jaccard accuracy of 95.30%. These findings highlight the efficacy of multi-label learning in modeling complex, real-world refactoring scenarios, providing a robust foundation for enhancing automated refactoring tools and advancing software maintenance practices.
Authors
- Muna Al‐Razgan (ORCID: https://orcid.org/0000-0002-9705-3867)
- Amal Alazba (ORCID: https://orcid.org/0000-0002-9353-7872)
- Abeer Alarainy (ORCID: https://orcid.org/0009-0000-5882-8490)
- Arwa Abolkhair
- Aljawharah AlMuaythir (ORCID: https://orcid.org/0009-0001-6163-3149)
- Aljohara Alyousef
Institutions
- King Saud University (SA)
Publication Details
- Journal
- IEEE Access
- Published
- 2025-01-01
- DOI
- https://doi.org/10.1109/access.2025.3625188
- Primary Topic
- Text and Document Classification Technologies
- Type
- article
- Field-Weighted Citation Impact
- 0.00