A novel approach for code smell detection: An empirical study

52Citations
Citations of this article
66Readers
Mendeley users who have this article in their library.

This article is free to access.

Abstract

Code smells detection helps in improving understandability and maintainability of software while reducing the chances of system failure.In this study, six machine learning algorithms have been applied to predict code smells.For this purpose, four code smell datasets (God-class, Data-class, Feature-envy, and Long-method) are considered which are generated from 74 open-source systems.To evaluate the performance of machine learning algorithms on these code smell datasets, 10-fold cross validation technique is applied that predicts the model by partitioning the original dataset into a training set to train the model and test set to evaluate it.Two feature selection techniques are applied to enhance our prediction accuracy.The Chi-squared and Wrapper-based feature selection techniques are used to improve the accuracy of total six machine learning methods by choosing the top metrics in each dataset.Results obtained by applying these two feature selection techniques are compared.To improve the accuracy of these algorithms, grid search-based parameter optimization technique is applied.In this study, 100% accuracy was obtained for the Long-method dataset by using the Logistic Regression algorithm with all features while the worst performance 95.20% was obtained by Naive Bayes algorithm for the Long-method dataset using the chi-square feature selection technique.

Cite

CITATION STYLE

APA

Dewangan, S., Rao, R. S., Mishra, A., & Gupta, M. (2021). A novel approach for code smell detection: An empirical study. IEEE Access, 9, 162869–162883. https://doi.org/10.1109/ACCESS.2021.3133810

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Save time finding and organizing research with Mendeley

Sign up for free