Machine Learning Techniques for Code Smells Detection: A Systematic Mapping Study

  • Frederico Luiz Caram
    LAIS Laboratory for Advanced Information Systems, FUMEC University, Av. Afonso Pena 3880, Belo Horizonte, MG, 30130009, Brazil
  • Bruno Rafael De Oliveira Rodrigues
    LAIS Laboratory for Advanced Information Systems, FUMEC University, Av. Afonso Pena 3880, Belo Horizonte, MG, 30130009, Brazil
  • Amadeu Silveira Campanelli
    LAIS Laboratory for Advanced Information Systems, FUMEC University, Av. Afonso Pena 3880, Belo Horizonte, MG, 30130009, Brazil
  • Fernando Silva Parreiras
    LAIS Laboratory for Advanced Information Systems, FUMEC University, Av. Afonso Pena 3880, Belo Horizonte, MG, 30130009, Brazil

Description

<jats:p>Code smells or bad smells are an accepted approach to identify design flaws in the source code. Although it has been explored by researchers, the interpretation of programmers is rather subjective. One way to deal with this subjectivity is to use machine learning techniques. This paper provides the reader with an overview of machine learning techniques and code smells found in the literature, aiming at determining which methods and practices are used when applying machine learning for code smells identification and which machine learning techniques have been used for code smells identification. A mapping study was used to identify the techniques used for each smell. We found that the Bloaters was the main kind of smell studied, addressed by 35% of the papers. The most commonly used technique was Genetic Algorithms (GA), used by 22.22% of the papers. Regarding the smells addressed by each technique, there was a high level of redundancy, in a way that the smells are covered by a wide range of algorithms. Nevertheless, Feature Envy stood out, being targeted by 63% of the techniques. When it comes to performance, the best average was provided by Decision Tree, followed by Random Forest, Semi-supervised and Support Vector Machine Classifier techniques. 5 out of the 25 analyzed smells were not handled by any machine learning techniques. Most of them focus on several code smells and in general there is no outperforming technique, except for a few specific smells. We also found a lack of comparable results due to the heterogeneity of the data sources and of the provided results. We recommend the pursuit of further empirical studies to assess the performance of these techniques in a standardized dataset to improve the comparison reliability and replicability.</jats:p>

Journal

Citations (1)*help

See more

Details 詳細情報について

Report a problem

Back to top