Detecting Bad Smells with Machine Learning Algorithms: an Empirical Study

被引:23
作者
Cruz, Daniel [1 ]
Santana, Amanda [1 ]
Figueiredo, Eduardo [1 ]
机构
[1] Univ Fed Minas Gerais, Belo Horizonte, MG, Brazil
来源
2020 IEEE/ACM INTERNATIONAL CONFERENCE ON TECHNICAL DEBT, TECHDEBT | 2020年
关键词
bad smells detection; machine learning; software quality; software measurement; empirical software engineering; CODE SMELLS; MAINTAINABILITY; METRICS; IMPACT;
D O I
10.1145/3387906.3388618
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Bad smells are symptoms of bad design choices implemented on the source code. They are one of the key indicators of technical debts, specifically, design debt. To manage this kind of debt, it is important to be aware of bad smells and refactor them whenever possible. Therefore, several bad smell detection tools and techniques have been proposed over the years. These tools and techniques present different strategies to perform detections. More recently, machine learning algorithms have also been proposed to support bad smell detection. However, we lack empirical evidence on the accuracy and efficiency of these machine learning based techniques. In this paper, we present an evaluation of seven different machine learning algorithms on the task of detecting four types of bad smells. We also provide an analysis of the impact of software metrics for bad smell detection using a unified approach for interpreting the models' decisions. We found that with the right optimization, machine learning algorithms can achieve good performance (F1 score) for two bad smells: God Class (0.86) and Refused Parent Bequest (0.67). We also uncovered which metrics play fundamental roles for detecting each bad smell.
引用
收藏
页码:31 / 40
页数:10
相关论文
共 55 条
[51]  
Strumbelj E, 2010, J MACH LEARN RES, V11, P1
[52]  
Suryanarayana G., 2014, Refactoring for software design smells: Managing technical debt
[53]   The Qualitas Corpus: A Curated Collection of Java']Java Code for Empirical Studies [J].
Tempero, Ewan ;
Anslow, Craig ;
Dietrich, Jens ;
Han, Ted ;
Li, Jing ;
Lumpe, Markus ;
Melton, Hayden ;
Noble, James .
17TH ASIA PACIFIC SOFTWARE ENGINEERING CONFERENCE (APSEC 2010), 2010, :336-345
[54]  
Vidal S, 2015, 2015 34TH INTERNATIONAL CONFERENCE OF THE CHILEAN COMPUTER SCIENCE SOCIETY (SCCC)
[55]   Code smells as system-level indicators of maintainability: An empirical study [J].
Yamashita, Aiko ;
Counsell, Steve .
JOURNAL OF SYSTEMS AND SOFTWARE, 2013, 86 (10) :2639-2653