{"title":"An Anti-Pattern Detection Technique Using Machine Learning to Improve Code Quality","authors":"Nazneen Akhter, Shanto Rahman, K. A. Taher","doi":"10.1109/ICICT4SD50815.2021.9396937","DOIUrl":null,"url":null,"abstract":"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%.","PeriodicalId":239251,"journal":{"name":"2021 International Conference on Information and Communication Technology for Sustainable Development (ICICT4SD)","volume":"45 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2021-02-27","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"3","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2021 International Conference on Information and Communication Technology for Sustainable Development (ICICT4SD)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/ICICT4SD50815.2021.9396937","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 3
Abstract
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%.