arrow
Return

Comparing and experimenting machine learning techniques for code smell detection

delete2015-06-06
delete277
PRE
AI
F
Francesca Arcelli Fontana
M
Mika Mäntylä
M
Marco Zanoni *
A
Alessandro Marino
DOI:10.1007/s10664-015-9378-4delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
Several code smell detection tools have been developed providing different results, because smells can be subjectively interpreted, and hence detected, in different ways. In this paper, we perform the largest experiment of applying machine learning algorithms to code smells to the best of our knowledge. We experiment 16 different machine-learning algorithms on four code smells (Data Class, Large Class, Feature Envy, Long Method) and 74 software systems, with 1986 manually validated code smell samples. We found that all algorithms achieved high performances in the cross-validation data set, yet the highest performances were obtained by J48 and Random Forest, while the worst performance were achieved by support vector machines. However, the lower prevalence of code smells, i.e., imbalanced data, in the entire data set caused varying performances that need to be addressed in the future studies. We conclude that the application of machine learning to the detection of these code smells can provide high accuracy (>96 %), and only a hundred training examples are needed to reach at least 95 % accuracy.
Keywords:
Code smells detection
Machine learning techniques
Benchmark for code smell detection
AI Summary

AI Summary

Key information extracted from the uploaded paper, including a brief overview, abstract, background, key highlights, visual analysis, and future outlook.

Journal

Empirical Software Engineering cover
Empirical Software Engineering
IF:
3.6
Papers:
2.0K
Citations:
5.3K

Organization

U
university of milano-bicocca
Scholars:
2.0W
Papers: 1.5W
Citations: 22
U
University of Oulu
Scholars:
1.5W
Papers: 1.3W
Citations: 1.6W
Cited Papers

Cited Papers

The anterior process of the malleus in extant Lagomorpha (Mammalia)
err2017-10-25
err0
PREAI
errWolfgang Maier; Adrian Tröscher; Irina Ruf
errShare
errSave
Code quality analysis in open source software development
err2002-02-08
err171
PREAI
errStamelos, I; Angelis, L; Oikonomou, A; Bleris, GL
errShare
errSave
errShare
errSave
BDTEX: A GQM-based Bayesian approach for the detection of antipatterns
err2011-04-01
err143
PREAI
errKhomh, Foutse; Vaucher, Stephane; Gueheneuc, Yann-Gael; Sahraoui, Houari
errShare
errSave
Identification of Move Method Refactoring Opportunities
err2009-05-01
err274
PREAI
errTsantalis, Nikolaos; Chatzigeorgiou, Alexander
errShare
errSave
researcher View more