Several code smells detection tools have been developed providing different results, because smells can be subjectively interpreted and hence detected in different ways. Machine learning techniques have been used for different topics in software engineering, e.g., design pattern detection, code smell detection, bug prediction, recommending systems. In this paper, we focus our attention on the classification of code smell severity through the use of machine learning techniques in different experiments. The severity of code smells is an important factor to take into consideration when reporting code smell detection results, since it allows the prioritization of refactoring efforts. In fact, code smells with high severity can be particularly large and complex, and create larger issues to the maintainability of software a system. In our experiments, we apply several machine learning models, spanning from multinomial classification to regression, plus a method to apply binary classifiers for ordinal classification. In fact, we model code smell severity as an ordinal variable. We take the baseline models from previous work, where we applied binary classification models for code smell detection with good results. We report and compare the performance of the models according to their accuracy and four different performance measures used for the evaluation of ordinal classification techniques. From our results, while the accuracy of the classification of severity is not high as in the binary classification of absence or presence of code smells, the ranking correlation of the actual and predicted severity for the best models reaches 0.88-0.96, measured through Spearman's ρ.

ARCELLI FONTANA, F., Zanoni, M. (2017). Code smell severity classification using machine learning techniques. KNOWLEDGE-BASED SYSTEMS, 128, 43-58 [10.1016/j.knosys.2017.04.014].

Code smell severity classification using machine learning techniques

ARCELLI FONTANA, FRANCESCA
Primo
;
ZANONI, MARCO
2017

Abstract

Several code smells detection tools have been developed providing different results, because smells can be subjectively interpreted and hence detected in different ways. Machine learning techniques have been used for different topics in software engineering, e.g., design pattern detection, code smell detection, bug prediction, recommending systems. In this paper, we focus our attention on the classification of code smell severity through the use of machine learning techniques in different experiments. The severity of code smells is an important factor to take into consideration when reporting code smell detection results, since it allows the prioritization of refactoring efforts. In fact, code smells with high severity can be particularly large and complex, and create larger issues to the maintainability of software a system. In our experiments, we apply several machine learning models, spanning from multinomial classification to regression, plus a method to apply binary classifiers for ordinal classification. In fact, we model code smell severity as an ordinal variable. We take the baseline models from previous work, where we applied binary classification models for code smell detection with good results. We report and compare the performance of the models according to their accuracy and four different performance measures used for the evaluation of ordinal classification techniques. From our results, while the accuracy of the classification of severity is not high as in the binary classification of absence or presence of code smells, the ranking correlation of the actual and predicted severity for the best models reaches 0.88-0.96, measured through Spearman's ρ.
Articolo in rivista - Articolo scientifico
Code smell severity; Code smells detection; Machine learning; Ordinal classification; Refactoring prioritization; Management Information Systems; Software; Information Systems and Management; Artificial Intelligence
English
2017
128
43
58
reserved
ARCELLI FONTANA, F., Zanoni, M. (2017). Code smell severity classification using machine learning techniques. KNOWLEDGE-BASED SYSTEMS, 128, 43-58 [10.1016/j.knosys.2017.04.014].
File in questo prodotto:
File Dimensione Formato  
7-Code smell Severity-KBS Elsevier-2017.pdf

Solo gestori archivio

Tipologia di allegato: Publisher’s Version (Version of Record, VoR)
Dimensione 533.17 kB
Formato Adobe PDF
533.17 kB Adobe PDF   Visualizza/Apri   Richiedi una copia

I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/10281/155452
Citazioni
  • Scopus 121
  • ???jsp.display-item.citation.isi??? 87
Social impact