Do We Have a Chance to Fix Bugs When Refactoring Code Smells?

Wanwangying Ma, Lin Chen, Yuming Zhou, Baowen Xu
{"title":"Do We Have a Chance to Fix Bugs When Refactoring Code Smells?","authors":"Wanwangying Ma, Lin Chen, Yuming Zhou, Baowen Xu","doi":"10.1109/SATE.2016.11","DOIUrl":null,"url":null,"abstract":"Code smells are used to describe code structures that may cause detrimental effects on software and should be refactored. Previous studies show that some code smells have significant effect on faults. However, how to refactor code smells to reduce bugs still needs more concern. We investigate the possibility of prioritizing code smell refactoring with the help of fault prediction results. We also investigate the possibility of improving the performance of fault prediction by using code smell detection results. We use Cohen's Kappa statistic to report agreements between results of code smell detections and fault predictions. We use fault prediction result as an indicator to guide code smell refactoring. Our results show that refactoring Blob, Long Parameter List, and Refused Parent Be Request may have a good chance to detect and fix bugs, and some code smells are particularly useful for improving the recall of fault prediction.","PeriodicalId":344531,"journal":{"name":"2016 International Conference on Software Analysis, Testing and Evolution (SATE)","volume":"171 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2016-11-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"15","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2016 International Conference on Software Analysis, Testing and Evolution (SATE)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/SATE.2016.11","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 15

Abstract

Code smells are used to describe code structures that may cause detrimental effects on software and should be refactored. Previous studies show that some code smells have significant effect on faults. However, how to refactor code smells to reduce bugs still needs more concern. We investigate the possibility of prioritizing code smell refactoring with the help of fault prediction results. We also investigate the possibility of improving the performance of fault prediction by using code smell detection results. We use Cohen's Kappa statistic to report agreements between results of code smell detections and fault predictions. We use fault prediction result as an indicator to guide code smell refactoring. Our results show that refactoring Blob, Long Parameter List, and Refused Parent Be Request may have a good chance to detect and fix bugs, and some code smells are particularly useful for improving the recall of fault prediction.
当重构有异味的代码时,我们有机会修复bug吗?
代码气味用于描述可能对软件造成有害影响的代码结构,应该对其进行重构。以前的研究表明,某些代码气味对错误有显著的影响。然而,如何重构代码气味以减少bug仍然需要更多的关注。我们研究了在故障预测结果的帮助下对代码气味重构进行优先级排序的可能性。我们还研究了利用代码气味检测结果提高故障预测性能的可能性。我们使用Cohen的Kappa统计来报告代码气味检测结果和故障预测之间的一致性。我们使用故障预测结果作为指标来指导代码气味重构。我们的结果表明,重构Blob、Long Parameter List和Refused Parent Be Request可能有很好的机会检测和修复bug,并且一些代码气味对于提高故障预测的召回率特别有用。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约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学术官方微信