Detecting Bad Smells with Machine Learning Algorithms: an Empirical Study

Daniel Cruz, Amanda Santana, Eduardo Figueiredo
{"title":"Detecting Bad Smells with Machine Learning Algorithms: an Empirical Study","authors":"Daniel Cruz, Amanda Santana, Eduardo Figueiredo","doi":"10.1145/3387906.3388618","DOIUrl":null,"url":null,"abstract":"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.","PeriodicalId":345508,"journal":{"name":"2020 IEEE/ACM International Conference on Technical Debt (TechDebt)","volume":"128 22 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2020-05-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"14","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2020 IEEE/ACM International Conference on Technical Debt (TechDebt)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3387906.3388618","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 14

Abstract

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.
用机器学习算法检测难闻气味:一项实证研究
不良气味是在源代码上实现的不良设计选择的症状。它们是技术债,特别是设计债的关键指标之一。要管理这种债务,重要的是要意识到不良气味,并在可能的情况下对它们进行重构。因此,多年来提出了几种恶臭检测工具和技术。这些工具和技术提供了执行检测的不同策略。最近,机器学习算法也被提出来支持难闻的气味检测。然而,我们缺乏关于这些基于机器学习的技术的准确性和效率的经验证据。在本文中,我们对七种不同的机器学习算法进行了评估,以检测四种类型的难闻气味。我们还使用统一的方法解释模型的决策,分析了软件度量对难闻气味检测的影响。我们发现,通过正确的优化,机器学习算法可以在两个坏气味:上帝类(0.86)和拒绝父母遗产税(0.67)上取得良好的性能(F1分数)。我们还发现了哪些指标在检测每种难闻气味时发挥了基本作用。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信