首页> 外文期刊>Software Engineering, IEEE Transactions on >When and Why Your Code Starts to Smell Bad (and Whether the Smells Go Away)
【24h】

When and Why Your Code Starts to Smell Bad (and Whether the Smells Go Away)

机译:什么时候以及为什么您的代码开始出现不良气味(以及气味是否消失)

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

摘要

Technical debt is a metaphor introduced by Cunningham to indicate “not quite right code which we postpone making it right”. One noticeable symptom of technical debt is represented by code smells, defined as symptoms of poor design and implementation choices. Previous studies showed the negative impact of code smells on the comprehensibility and maintainability of code. While the repercussions of smells on code quality have been empirically assessed, there is still only anecdotal evidence on when and why bad smells are introduced, what is their survivability, and how they are removed by developers. To empirically corroborate such anecdotal evidence, we conducted a large empirical study over the change history of 200 open source projects. This study required the development of a strategy to identify smell-introducing commits, the mining of over half a million of commits, and the manual analysis and classification of over 10K of them. Our findings mostly contradict common wisdom, showing that most of the smell instances are introduced when an artifact is created and not as a result of its evolution. At the same time, 80 percent of smells survive in the system. Also, among the 20 percent of removed instances, only 9 percent are removed as a direct consequence of refactoring operations.
机译:技术债务是坎宁安(Cunningham)引入的一个隐喻,表示“不完全正确的代码,我们将其推迟以使其正确”。技术债务的一种明显症状是代码臭味,定义为设计和实现选择不当的症状。先前的研究表明,代码气味对代码的可理解性和可维护性具有负面影响。虽然已经通过经验评估了气味对代码质量的影响,但是仍然只有轶事证据表明何时,为什么引入不良气味,它们的生存能力是什么以及开发人员如何去除它们。为了从经验上证实这种轶事证据,我们对200个开源项目的变更历史进行了大规模的实证研究。这项研究要求开发一种策略来识别引入气味的提交,挖掘超过一百万个提交,并手动分析和分类超过一万个提交。我们的发现在大多数情况下与常识相矛盾,这表明大多数气味实例是在创建伪影时引入的,而不是其演变的结果。同时,系统中80%的气味得以保留。同样,在20%的已删除实例中,只有9%被删除是重构操作的直接结果。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号