An Anti-Pattern Detection Technique Using Machine Learning to Improve Code Quality

Autor: Kazi Abu Taher, Shanto Rahman, Nazneen Akhter
Rok vydání: 2021
Předmět:
Zdroj: 2021 International Conference on Information and Communication Technology for Sustainable Development (ICICT4SD).
DOI: 10.1109/icict4sd50815.2021.9396937
Popis: Poor software design and coding tend the software programs to be buggy at a massive rate. To enhance the code quality this paper proposes an automatic anti-pattern detection technique, which identifies anti-patterns from source code using Machine Learning (ML) classifiers. Here, four anti-patterns are considered such as Blob, Feature Decomposition (FD), Swiss Army Knife (SAK) and Spaghetti Code (SC) from three open-source Java projects namely ArgoUML, Azureus and Xerces. To improve the accuracy, a data pre-processing technique namely SMOTE is adopted. To locate these anti-patterns, four ML classifiers have been used which are Support Vector Machine (SVM), Naive Bayes (NB), Random Forest (RF) and Decision Tree (DT). The proposed technique shows a better performance in terms of three evaluation metrics such as precision, recall, f-measure. SVM with SMOTE performs better in terms of precision and recall that are respectively 96.42% and 96.18%.
Databáze: OpenAIRE