首页> 外文会议>IEEE International Conference on Software Maintenance and Evolution >Bug Propagation through Code Cloning: An Empirical Study
【24h】

Bug Propagation through Code Cloning: An Empirical Study

机译:通过代码克隆的错误传播:实证研究

获取原文

摘要

Code clones are defined to be the identical or nearly similar code fragments in a code-base. According to a number of existing studies, code clones are directly related to bugs and inconsistencies in software systems. Code cloning (i.e., creating code clones) is suspected to propagate temporarily hidden bugs from one code fragment to another. However, there is no study on the intensity of bug-propagation through code cloning.In this paper we present our empirical study on bug-propagation through code cloning. We define two clone evolution patterns that reasonably indicate bug propagation through code cloning. We first identify code clones that experienced bug-fix changes by analyzing software evolution history, and then determine which of these code clones evolved following the bug propagation patterns. According to our study on thousands of commits of four open-source subject systems written in Java, up to 33% of the clone fragments that experience bug-fix changes can contain propagated bugs. Around 28.57% of the bug-fixes experienced by the code clones can occur for fixing propagated bugs. We also find that near-miss clones are primarily involved with bug-propagation rather than identical clones. The clone fragments involved with bug propagation are mostly method clones. Bug propagation is more likely to occur in the clone fragments that are created in the same commit operation rather than in different commits. Our findings are important for prioritizing code clones for refactoring and tracking from the perspective of bug propagation.
机译:代码克隆被定义为代码库中的相同或几乎类似的代码片段。根据一些现有研究,代码克隆与软件系统中的错误和不一致。代码克隆(即,创建代码克隆)被怀疑将临时隐藏的错误从一个代码片段传播到另一个代码片段。然而,通过代码克隆,没有关于错误传播的强度。在本文中,我们通过代码克隆展示了我们对错误传播的实证研究。我们定义了两个克隆演化模式,通过代码克隆,合理地表示错误传播。我们首先通过分析软件演进历史来确定经历错误修复更改的代码克隆,然后确定在BUB传播模式之后演变的哪些代码克隆。根据我们的研究在Java中编写的四个开源主题系统的数千个犯规,高达33 %遇到错误修复更改的克隆片段可以包含传播的错误。在修复传播的错误的情况下,可能会出现约28.57 %代码克隆所经历的错误修复。我们还发现近乎临近的克隆主要涉及错误传播而不是相同的克隆。涉及Bug传播的克隆片段主要是方法克隆。错误传播更有可能发生在同一提交操作中创建的克隆片段中,而不是在不同的提交中。我们的发现对于从Bug传播的角度来看,对于优先考虑代码克隆并跟踪的重要性。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号