Bad Smell Detection Using Machine Learning Techniques: A Systematic Literature Review

Ahmed Al-Shaaby, Hamoud Aljamaan, Mohammad Alshayeb*

*Corresponding author for this work

Research output: Contribution to journalReview articlepeer-review

35 Scopus citations


Code smells are indicators of potential problems in software. They tend to have a negative impact on software quality. Several studies use machine learning techniques to detect bad smells. The objective of this study is to systematically review and analyze machine learning techniques used to detect code smells to provide interested research community with knowledge about the adopted techniques and practices for code smells detection. We use a systematic literature review approach to review studies that use machine learning techniques to detect code smells. Seventeen primary studies were identified. We found that 27 code smells were used in the identified studies; God Class and Long Method, Feature Envy, and Data Class are the most frequently detected code smells. In addition, we found that 16 machine learning algorithms were employed to detect code smells with acceptable prediction accuracy. Furthermore, we the results also indicate that support vector machine techniques were investigated the most. Moreover, we observed that J48 and Random Forest algorithms outperform the other algorithms. We also noticed that, in some cases, the use of boosting techniques on the models does not always enhance their performance. More studies are needed to consider the use of ensemble learning techniques, multiclassification, and feature selection technique for code smells detection. Thus, the application of machine learning algorithms to detect code smells in systems is still in its infancy and needs more research to facilitate the employment of machine learning algorithms in detecting code smells.

Original languageEnglish
Pages (from-to)2341-2369
Number of pages29
JournalArabian Journal for Science and Engineering
Issue number4
StatePublished - 1 Apr 2020

Bibliographical note

Funding Information:
The authors acknowledge the support of King Fahd University of Petroleum and Minerals in the development of this work. 1 C&K metrics (DIT, NOC, CBO, RFC, WMC, LCOM). 2 MOOD metrics (MHF, AHF, MIF, AIF, POF, COF). 3 QMOOD metrics (DSC, NOH, ANA, DAM, DCC, CAM, MOA, MFA, NOP, NOM, CIS).

Publisher Copyright:
© 2020, King Fahd University of Petroleum & Minerals.


  • Anti-pattern
  • Artificial intelligent
  • Bad smell
  • Code smell
  • Machine learning
  • Software quality

ASJC Scopus subject areas

  • General


Dive into the research topics of 'Bad Smell Detection Using Machine Learning Techniques: A Systematic Literature Review'. Together they form a unique fingerprint.

Cite this