首页> 外文期刊>ACM transactions on software engineering and methodology >Some Code Smells Have a Significant but Small Effect on Faults
【24h】

Some Code Smells Have a Significant but Small Effect on Faults

机译:某些代码气味对故障的影响很小但影响很小

获取原文
获取原文并翻译 | 示例

摘要

We investigate the relationship between faults and five of Fowler et al.'s least-studied smells in code: Data Clumps, Switch Statements, Speculative Generality, Message Chains, and Middle Man. We developed a tool to detect these five smells in three open-source systems: Eclipse, ArgoUML, and Apache Commons. We collected fault data from the change and fault repositories of each system. We built Negative Binomial regression models to analyse the relationships between smells and faults and report the McFadden effect size of those relationships. Our results suggest that Switch Statements had no effect on faults in any of the three systems; Message Chains increased faults in two systems; Message Chains which occurred in larger files reduced faults; Data Clumps reduced faults in Apache and Eclipse but increased faults in ArgoUML; Middle Man reduced faults only in ArgoUML, and Speculative Generality reduced faults only in Eclipse. File size alone affects faults in some systems but not in all systems. Where smells did significantly affect faults, the size of that effect was small (always under 10 percent). Our findings suggest that some smells do indicate fault-prone code in some circumstances but that the effect that these smells have on faults is small. Our findings also show that smells have different effects on different systems. We conclude that arbitrary refactoring is unlikely to significantly reduce fault-proneness and in some cases may increase fault-proneness.
机译:我们研究故障与Fowler等人在代码中研究最少的五种气味之间的关系:数据丛,开关语句,推测性通用性,消息链和中间人。我们开发了一种工具,可以在三个开源系统(Eclipse,ArgoUML和Apache Commons)中检测这五种气味。我们从每个系统的变更和故障存储库中收集故障数据。我们建立了负二项式回归模型来分析气味和故障之间的关系,并报告这些关系的McFadden效应大小。我们的结果表明,Switch语句对这三个系统中的任何一个都没有故障。消息链增加了两个系统中的故障;较大文件中的消息链减少了故障。数据块减少了Apache和Eclipse中的错误,但增加了ArgoUML中的错误;中间人仅在ArgoUML中减少了错误,而Spectralative Generality仅在Eclipse中减少了错误。仅文件大小会影响某些系统中的故障,但不会影响所有系统中的故障。在气味确实会严重影响故障的地方,这种影响的程度很小(始终低于10%)。我们的发现表明,在某些情况下,某些气味确实指示容易出错的代码,但是这些气味对错误的影响很小。我们的发现还表明,气味对不同的系统有不同的影响。我们得出的结论是,任意重构不太可能显着降低故障倾向性,在某些情况下可能会增加故障倾向性。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号