...
首页> 外文期刊>The Journal of Systems and Software >An empirical study on bug propagation through code cloning
【24h】

An empirical study on bug propagation through code cloning

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

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

摘要

Code clones are identical or nearly similar code fragments in a code-base. According to the existing studies, code clones are directly related to bugs. Code cloning, 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 define two clone evolutionary patterns that reasonably indicate bug propagation through code cloning. By analyzing software evolution history, we identify those code clones that evolved following the bug propagation patterns. According to our study on thousands of commits of seven subject systems, overall 18.42% of the clone fragments that experience bug-fixes contain propagated bugs. Type-3 clones are primarily involved with bug-propagation. Bug propagation is more likely to occur in the clone fragments that are created in the same commit rather than in different commits. Moreover, code clones residing in the same file have a higher possibility of containing propagated bugs compared to those residing in different files. Severe bugs can sometimes get propagated through code cloning. Automatic support for immediately identifying occurrences of bug-propagation can be beneficial for software maintenance. Our findings are important for prioritizing code clones for management. (C) 2019 Elsevier Inc. All rights reserved.
机译:代码克隆是代码库中相同或几乎相似的代码片段。根据现有研究,代码克隆与错误直接相关。代码克隆(创建代码克隆)被怀疑会将暂时隐藏的错误从一个代码片段传播到另一个代码片段。但是,尚未研究通过代码克隆进行错误传播的强度。在本文中,我们定义了两种克隆演化模式,这些模式可以合理地指示通过代码克隆进行错误传播。通过分析软件演化历史,我们确定了遵循错误传播模式演化的那些代码克隆。根据我们对七个主题系统的数千个提交的研究,经历错误修复的克隆片段总数中有18.42%包含传播的错误。 Type-3克隆主要涉及错误传播。错误传播更可能发生在同一提交而不是不同提交中创建的克隆片段中。此外,与驻留在不同文件中的代码克隆相比,驻留在同一文件中的代码克隆更有可能包含传播的错误。严重的错误有时可以通过代码克隆传播。自动支持立即识别错误传播的发生可能对软件维护很有帮助。我们的发现对于确定代码克隆的优先级对于管理很重要。 (C)2019 Elsevier Inc.保留所有权利。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号