Skip to main content
QUICK REVIEW

[论文解读] Smelling out Code Clones: Clone Detection Tool Evaluation and Corresponding Challenges

Rachel Gauci|arXiv (Cornell University)|Mar 2, 2015
Software Engineering Research参考文献 4被引用 3
一句话总结

本文评估了克隆检测工具,识别出工具评估中的挑战,如缺乏参考语料库、配置敏感性以及基准测试缺陷。本文提出EvaClone框架,通过适应度函数自动确定最优工具配置,使Java系统召回率和精确率最高提升21.9%,C系统提升10.6%,从而提升对比研究的有效性。

ABSTRACT

Software clones have been an active area of research for the past two decades. However, although numerous clone detection tools are now available, only a small fraction of the literature has focused on tool evaluation, and this is in fact still an open problem. This is mostly due to the fact that standard information retrieval metrics such as recall and precision require a priori knowledge of clones already in the system. Detection tools also typically have a large number of parameters which are difficult to fine-tune for optimal performance on a particular software system, and different outputs produced by different tools add to the complexity of comparing one tool to another. In this review, we further explore the reasons why tool evaluation is still an open challenge, and present the current tools and frameworks targeted at mitigating these problems, focusing on the current standard benchmarks used to evaluate modern clone detection tools, and also presenting a recent method aimed at finding optimal tool configurations.

研究动机与目标

  • 调查克隆检测工具评估中持续存在的挑战,特别是由于缺乏参考语料库和配置敏感性所致。
  • 评估现有基准(如Bellon框架和变异与注入框架)在确保有效工具比较方面的局限性。
  • 提出并评估EvaClone框架,该框架可自动识别最优工具配置参数,以提升评估可靠性。
  • 证明默认配置在工具评估中会显著降低性能,而最优调优可显著提升召回率与精确率。
  • 强调需要标准化、具有代表性的基准和平衡召回率与精确率的适应度函数,以提升工具评估的科学性。

提出的方法

  • 使用Bellon框架和变异与注入框架作为标准基准,生成克隆检测评估的参考语料库。
  • 在EvaClone中应用适应度函数,通过最大化不同工具间的一致性,识别克隆检测工具的最优配置参数。
  • 采用系统化方法在多个软件系统(如psql、swing)中调优工具参数,以提升检测性能。
  • 通过对比默认配置与优化配置下的工具性能,量化配置调优对召回率与精确率的影响。
  • 分析现有评估方法的有效性威胁,包括对默认设置的过度依赖,以及适应度函数偏向召回率而非精确率的问题。
  • 在开源系统上验证结果,但承认其在通用性方面可能无法推广至专有或非开源系统。

实验结果

研究问题

  • RQ1尽管已有超过70种克隆检测工具,为何克隆检测的工具评估仍被视为开放性挑战?
  • RQ2克隆检测工具中的默认配置设置在多大程度上影响召回率与精确率?如何缓解这一问题?
  • RQ3EvaClone框架在识别最优工具配置以提升检测性能方面效果如何?
  • RQ4现有基准(如Bellon框架和变异与注入框架)在克隆检测评估中存在哪些关键局限性?
  • RQ5一种以最大化工具间一致性为目标的适应度函数,是否可能导致评估结果偏差,特别是通过牺牲精确率而过度提升召回率?

主要发现

  • 克隆检测工具的默认配置显著降低了评估的有效性,实证显示在使用优化配置后,召回率最高提升21.9%,精确率最高提升10.6%。
  • EvaClone中的适应度函数通过最大化工具间一致性,倾向于偏向召回率而非精确率,可能导致假阳性率上升。
  • 在Bellon等人研究的14种工具中,仅有2种使用了调优后的配置,凸显了尽管性能不佳,仍普遍存在使用默认设置的现象。
  • 使用默认配置的实证研究易受有效性威胁,如在采用优化配置后观察到的显著性能提升所证明的那样。
  • 若Svajlenko等人关于现代工具的研究改用最优配置而非默认配置进行评估,其结果很可能会发生显著变化。
  • 尽管已有进展,现有基准和评估框架仍存在局限,如过度依赖开源系统,且难以推广至工业级软件。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。