Feature Reduction Techniques Based Code Smell Prediction

Pravin Singh Yadav*, Rajwant Singh Rao**
*-** Department of Computer Science & Information Technology, Guru Ghasidas Vishwavidyalaya, Bilaspur, India.
Periodicity:July - September'2022
DOI : https://doi.org/10.26634/jse.17.1.19106

Abstract

Code Smell refers to the telltale signs of poor code design that leads to software quality issues. Developers require specific methods to measure the complexity of Code Smells in order to resolve the problem quickly. Recent research has examined the problem of predicting Code Smell using various detection methods. However, the accuracy of machine learning-based Code Smell detectors is still at a normal level. One of the main objective of this paper is to assess how well dimensionality reduction methods can predict Code Smells. This paper uses three machine learning techniques with feature reduction techniques, such as Principal Component Analysis (PCA), t-Distributed Stochastic Neighbor Embedding (t-SNE), and Linear Discriminate Analysis (LDA). Ten-fold cross-validation is used to ensure that the model is well-trained. Datasets are balanced using the Synthetic Minority Oversampling Technique (SMOTE) to ensure an equal number of classes in each dataset. The experimental result concluded that the AdaBoost method with LDA performs better in both the Long Parameter List and Switch Statement datasets, with an accuracy of 92.72% and 91.24%, respectively.

Keywords

Code Smell, Code Smell Prediction, Data Balancing, Feature Selection, Machine Learning Techniques.

How to Cite this Article?

Yadav, P. S., and Rao, R. S. (2022). Feature Reduction Techniques Based Code Smell Prediction. i-manager’s Journal on Software Engineering, 17(1), 6-11. https://doi.org/10.26634/jse.17.1.19106

References

[1]. Abdou, A. S., & Darwish, N. R. (2018). Early prediction of software defect using ensemble learning: A comparative study. International Journal of Computer Applications, 179(46), 29-40.
[2]. Alazba, A., & Aljamaan, H. (2021). Code smell detection using feature selection and stacking ensemble: an empirical investigation. Information and Software Technology, 138, 106648. https://doi.org/10.1016/J.INFSOF.2021.106648
[3]. Aljamaan, H. (2021). Voting heterogeneous ensemble for code smell detection. Proceedings – 20th IEEE International Conference on Machine Learning and Applications, 897–902. https://doi.org/10.1109/ICMLA52953.2021.00148
[4]. Arcelli Fontana, F., Mäntylä, M. V., Zanoni, M., & Marino, A. (2016). Comparing and experimenting machine learning techniques for code smell detection. Empirical Software Engineering, 21(3), 1143-1191. https://doi.org/10.1007/S10664-015-9378-4/TABLES/24
[5]. Catolino, G., Palomba, F., Fontana, F. A., De Lucia, A., Zaidman, A., & Ferrucci, F. (2020). Improving change prediction models with code smell-related information. Empirical Software Engineering, 25(1), 49-95. https://doi.org/10.1007/S10664-019-09739-0/FIGURES/3
[6]. Dewangan, S., & Rao, R. S. (2022). Code smell detection using classification approaches. In Intelligent Systems (PP. 257-266). Springer, Singapore. https://doi.org/10.1007/978-981-19-0901-6_25
[7]. 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
[8]. Dewangan, S., Rao, R. S., Mishra, A., & Gupta, M. (2022). Code smell detection using ensemble machine learning algorithms. Applied Sciences, 12(20), 10321. https://doi.org/10.3390/APP122010321
[9]. Dewangan, S., Rao, R. S., & Yadav, P. S. (2022, July). Dimensionally reduction based machine learning approaches for code smells detection. In 2022 International Conference on Intelligent Controller and Computing for Smart Power (ICICCSP) (PP. 1-4). IEEE. https://doi.org/10.1109/ICICCSP53532.2022.9862030
[10]. Fowler, M. (N.D.). Refactoring: Improving the Design of Existing Code. https://Www.Amazon.In/Refactoring- Improving-Existing-Addison-Wesley-Signature/Dp/0134757599
[11]. Fontana, F. A., & Zanoni, M. (2017). Code smell severity classification using machine learning techniques. Knowledge-Based Systems, 128, 43-58. https://doi.org/10.1016/J.KNOSYS.2017.04.014
[12]. Freund, Y., & Schapire, R. E. (1996). Experiments with a new boosting algorithm. Machine Learning: Proceedings of the Thirteenth International Conference, 1-9.
[13]. Genender-Feltheimer, A. (2018). Visualizing high dimensional and big data. Procedia Computer Science, 140, 112-121. https://doi.org/10.1016/J.PROCS.2018.10.308
[14]. Kreimer, J. (2005). Adaptive detection of design flaws. Electronic Notes in Theoretical Computer Science, 141(4), 117-136. https://doi.org/10.1016/J.ENTCS.2005.02.059
[15]. Liu, H., Jin, J., Xu, Z., Zou, Y., Bu, Y., & Zhang, L. (2019). Deep learning based code smell detection. IEEE Transactions on Software Engineering, 47(9), 1811-1837. https://doi.org/10.1109/TSE.2019.2936376
[16]. Paiva, T., Damasceno, A., Figueiredo, E., & Sant'Anna, C. (2017). On the evaluation of code smells and detection tools. Journal of Software Engineering Research and Development, 5(1), 1–28. https://doi.org/10.1186/S40411-017-0041-1
[17]. Yadav, P. S., Dewangan, S., & Rao, R. S. (2021, December). Extraction of prediction rules of code smell using decision tree algorithm. In 2021 10th International Conference on Internet of Everything, Microwave Engineering, Communication and Networks (IEMECON) (PP. 1-5). IEEE. https://doi.org/10.1109/IEMECON53809.2021.9689174
[18]. Yamashita, A., & Moonen, L. (2012, September). Do code smells reflect important maintainability aspects? In 2012 28th IEEE International Conference on Software Maintenance (ICSM) (PP. 306-315). IEEE. https://doi.org/10.1109/ICSM.2012.6405287
If you have access to this article please login to view the article or kindly login to purchase the article

Purchase Instant Access

Single Article

North Americas,UK,
Middle East,Europe
India Rest of world
USD EUR INR USD-ROW
Pdf 35 35 200 20
Online 35 35 200 15
Pdf & Online 35 35 400 25

Options for accessing this content:
  • If you would like institutional access to this content, please recommend the title to your librarian.
    Library Recommendation Form
  • If you already have i-manager's user account: Login above and proceed to purchase the article.
  • New Users: Please register, then proceed to purchase the article.