The Performance Analysis of Machine Learning Techniques in Code Smell Detection

In scope of this work, models capable of detecting code smells using machine learning in C++ projects have been developed. In this context, the Clean++ tool was used to analyze four open-source C++ projects, to obtain class-based metrics and Lazy Class code smell-labeled positive and negative class samples. A labeled code smell dataset consisting of 409 instances was created. Machine learning models using KNearest Neighbors, Decision Tree, Multi-Layer Perceptron, Logistic Regression, Random Forest Classifier, Support Vector Classifier and Naïve Bayes algorithms were developed and model trainings were conducted on the generated dataset. Hyperparameter optimization was performed to determine the optimal parameters for each model. The performance analysis of the models trained with the optimal parameters was conducted on a separate test dataset comprising 20% of the initial data, using accuracy, precision, recall and F1 score evaluation metrics. The model which was trained with K-Nearest Neighbors algorithm exhibited the most successful performance, achieving an accuracy of 93.902% and a F1 score of 82.758%. Second highest performance was the model with Random Forest Classifier algorithm, which performed with 91.463% accuracy and 77.419% F1 score. However, the F1 scores of the other 5 models remained below 75%.

Authors

Publication Details

Published
2024-10-26
DOI
https://doi.org/10.1109/ubmk63289.2024.10773525
Citations
1
Primary Topic
Network Security and Intrusion Detection
Type
article
Field-Weighted Citation Impact
0.35
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

The Performance Analysis of Machine Learning Techniques in Code Smell Detection

Oya Kalıpsız, A. Gökhan Yavuz
1 citations
Network Security and Intrusion Detection
0.35
article

The Performance Analysis of Machine Learning Techniques in Code Smell Detection

Oya Kalıpsız, A. Gökhan Yavuz
article en
1 citations

Abstract

In scope of this work, models capable of detecting code smells using machine learning in C++ projects have been developed. In this context, the Clean++ tool was used to analyze four open-source C++ projects, to obtain class-based metrics and Lazy Class code smell-labeled positive and negative class samples. A labeled code smell dataset consisting of 409 instances was created. Machine learning models using KNearest Neighbors, Decision Tree, Multi-Layer Perceptron, Logistic Regression, Random Forest Classifier, Support Vector Classifier and Naïve Bayes algorithms were developed and model trainings were conducted on the generated dataset. Hyperparameter optimization was performed to determine the optimal parameters for each model. The performance analysis of the models trained with the optimal parameters was conducted on a separate test dataset comprising 20% of the initial data, using accuracy, precision, recall and F1 score evaluation metrics. The model which was trained with K-Nearest Neighbors algorithm exhibited the most successful performance, achieving an accuracy of 93.902% and a F1 score of 82.758%. Second highest performance was the model with Random Forest Classifier algorithm, which performed with 91.463% accuracy and 77.419% F1 score. However, the F1 scores of the other 5 models remained below 75%.

Openalex Percentile: Top 36%
Network Security and Intrusion Detection
0.35
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.