IEEE Access (Jan 2024)

Smell-Aware Bug Classification

  • Khyber,
  • Sikandar Ali,
  • Fazli Wahid,
  • Samad Baseer,
  • Ahmed Alkhayyat,
  • Akram M. Al-Radaei

DOI
https://doi.org/10.1109/ACCESS.2023.3335175
Journal volume & issue
Vol. 12
pp. 14061 – 14082

Abstract

Read online

Code smell indicates inadequacies in design and implementation choices. Code smells harm software maintainability including effects on components’ bug proneness and code quality has been demonstrated in previous studies. This study aims to investigate the importance of code smell metrics in prediction models for detecting bug-prone code modules. For improvement of the bug prediction model, in this study, smell-based metrics of code have been used. For the training of our model, we employed 14 different open-source projects from the PROMISE repository. Every project file consists of source code as well as smell code metrics and was written in Java. We examined different evaluation metrics such as F1_score, accuracy, precision, recall, the area under the receiver operating characteristic curve, and the area under the precision-recall curve of the five methods within the version, within the project, and across the projects. We classify the code components as buggy or non-buggy using Naïve Bayes, Random Forest (RF), Support Vector Machine (SVM), Logistic Regression, and k-Nearest Neighbor classifiers. RF and SVM have given better results within the version as well as within the project.

Keywords