Abstract
Background: Code smells are symptoms that something may be wrong in software systems that can cause complications in maintaining software quality. In literature, there exist many code smells and their identification is far from trivial. Thus, several techniques have also been proposed to automate code smell detection in order to improve software quality.
Objective: This paper presents an up-to-date review of simple and hybrid machine learning-based code smell detection techniques and tools.
Methods: We collected all the relevant research published in this field till 2020. We extracted the data from those articles and classified them into two major categories. In addition, we compared the selected studies based on several aspects like code smells, machine learning techniques, datasets, programming languages used by datasets, dataset size, evaluation approach, and statistical testing.
Results: A majority of empirical studies have proposed machine-learning based code smell detection tools. Support vector machine and decision tree algorithms are frequently used by the researchers. Along with this, a major proportion of research is conducted on Open Source Softwares (OSS) such as Xerces, Gantt Project and ArgoUml. Furthermore, researchers pay more attention to Feature Envy and Long Method code smells.
Conclusion: We identified several areas of open research like the need for code smell detection techniques using hybrid approaches, the need for employing valid industrial datasets, etc.
Keywords: Code smells, anti-patterns, machine learning, software maintenance, Open Source Softwares (OSS), industrial datasets.
Graphical Abstract
[http://dx.doi.org/10.1007/s11831-019-09348-6]
[http://dx.doi.org/10.1109/ICSE.2015.59]
[http://dx.doi.org/10.1109/ICSM.2004.1357820]
[http://dx.doi.org/10.1201/b17461]
[http://dx.doi.org/10.1109/ICSM.2003.1235447]
[http://dx.doi.org/10.1109/CSMR.2013.26]
[http://dx.doi.org/10.1145/2629648]
[http://dx.doi.org/10.1016/j.jss.2019.110394]
[http://dx.doi.org/10.1109/ICSM.2000.882970]
[http://dx.doi.org/10.1007/s10664-006-9002-8]
[http://dx.doi.org/10.1002/bjs.9744] [PMID: 25605481]
[http://dx.doi.org/10.1002/smr.521]
[http://dx.doi.org/10.1007/978-3-319-62404-4_49]
[http://dx.doi.org/10.1016/j.jss.2017.12.034]
[http://dx.doi.org/10.1016/j.asej.2017.03.002]
[http://dx.doi.org/10.1142/S021819401950013X]
[http://dx.doi.org/10.1007/978-981-13-0761-4_86]
[http://dx.doi.org/10.1016/j.infsof.2018.12.009]
[http://dx.doi.org/10.1007/s10664-015-9378-4]
[http://dx.doi.org/10.1016/j.entcs.2005.02.059]
[http://dx.doi.org/10.1109/CSMR.2010.47]
[http://dx.doi.org/10.1109/TSE.2009.50]
[http://dx.doi.org/10.1109/QSIC.2009.47]
[http://dx.doi.org/10.1109/QUATIC.2010.61]
[http://dx.doi.org/10.1109/JCSSE.2011.5930143]
[http://dx.doi.org/10.1109/ASE.2013.6693086]
[http://dx.doi.org/10.1109/TSE.2014.2372760]
[http://dx.doi.org/10.1109/ICSM.2013.56]
[http://dx.doi.org/10.1109/SANER.2018.8330266]
[http://dx.doi.org/10.5220/0006338804740482]
[http://dx.doi.org/10.1109/ICPC.2019.00023]
[http://dx.doi.org/10.1145/2351676.2351701]
[http://dx.doi.org/10.1145/2970276.2970326]
[http://dx.doi.org/10.1109/ICSE.2007.30]
[http://dx.doi.org/10.1109/WCRE.2009.23]
[http://dx.doi.org/10.1016/j.jss.2010.11.921]
[http://dx.doi.org/10.1109/WCRE.2012.56]
[http://dx.doi.org/10.1109/MLDS.2017.8]
[http://dx.doi.org/10.1007/s11219-015-9271-9]
[http://dx.doi.org/10.1109/TSE.2014.2331057]
[http://dx.doi.org/10.5220/0006709801370146]
[http://dx.doi.org/10.1561/9781601982957]
[http://dx.doi.org/10.1007/s10489-019-01507-3]
[http://dx.doi.org/10.1109/ICSME.2014.32]
[http://dx.doi.org/10.1016/j.infsof.2017.08.008]
[http://dx.doi.org/10.1016/j.advengsoft.2017.05.014]
[http://dx.doi.org/10.1016/j.jocs.2018.05.008]
[http://dx.doi.org/10.1016/j.knosys.2018.03.011]
[http://dx.doi.org/10.1016/j.asoc.2018.07.038]
[http://dx.doi.org/10.1016/j.knosys.2018.06.001]
[http://dx.doi.org/10.1142/S0217984918503049]
[http://dx.doi.org/10.1142/S0217984918503852]
[http://dx.doi.org/10.1142/S0217984918503748]
[http://dx.doi.org/10.1142/S0217732318502395]
[http://dx.doi.org/10.1016/j.knosys.2018.11.024]
[http://dx.doi.org/10.1016/j.engappai.2019.03.021]
[http://dx.doi.org/10.1007/s10489-018-1365-1]
[http://dx.doi.org/10.1142/S0217732319500329]
[http://dx.doi.org/10.1142/S0217732319502018]
[http://dx.doi.org/10.1007/s00366-019-00826-w]
[http://dx.doi.org/10.35940/ijitee.A4215.119119]
[http://dx.doi.org/10.33969/JIEC.2020.21003]
[http://dx.doi.org/10.1016/j.engappai.2020.103541]
[http://dx.doi.org/10.1007/s00366-020-00986-0]
[http://dx.doi.org/10.20998/2074-272X.2020.1.10]
[http://dx.doi.org/10.1007/s00521-020-05017-z]
[http://dx.doi.org/10.1007/s00500-020-05046-9]
[http://dx.doi.org/10.1007/978-3-319-69900-4_31]
[http://dx.doi.org/10.1109/ICSCCC.2018.8703308]
[http://dx.doi.org/10.1109/TIP.2018.2882225] [PMID: 30452372]
[http://dx.doi.org/10.1016/j.knosys.2018.07.020]
[http://dx.doi.org/10.1109/TCYB.2019.2896100] [PMID: 30843858]
[http://dx.doi.org/10.1145/3240508.3240614]