Skip to main content
QUICK REVIEW

[论文解读] A systematic literature review on source code similarity measurement and clone detection: techniques, applications, and challenges

Morteza Zakeri‐Nasrabadi, Saeed Parsa|arXiv (Cornell University)|Jun 28, 2023
Software Engineering Research被引用 5
一句话总结

本篇系统性文献回顾分析了136篇关于源代码相似性度量与克隆检测的原始研究,评估了八种方法论和五个应用领域中的技术、工具、应用及挑战。共识别出80种工具,其中Java(49%)和C/C++(37%)支持较强,指出可用数据集有限(仅8个公开),并揭示了关键挑战,包括缺乏实证验证、混合方法不足以及对多范式语言的支持有限。

ABSTRACT

Measuring and evaluating source code similarity is a fundamental software engineering activity that embraces a broad range of applications, including but not limited to code recommendation, duplicate code, plagiarism, malware, and smell detection. This paper proposes a systematic literature review and meta-analysis on code similarity measurement and evaluation techniques to shed light on the existing approaches and their characteristics in different applications. We initially found over 10000 articles by querying four digital libraries and ended up with 136 primary studies in the field. The studies were classified according to their methodology, programming languages, datasets, tools, and applications. A deep investigation reveals 80 software tools, working with eight different techniques on five application domains. Nearly 49% of the tools work on Java programs and 37% support C and C++, while there is no support for many programming languages. A noteworthy point was the existence of 12 datasets related to source code similarity measurement and duplicate codes, of which only eight datasets were publicly accessible. The lack of reliable datasets, empirical evaluations, hybrid methods, and focuses on multi-paradigm languages are the main challenges in the field. Emerging applications of code similarity measurement concentrate on the development phase in addition to the maintenance.

研究动机与目标

  • 识别并分类现有的源代码相似性度量与克隆检测技术。
  • 分析各研究中工具、编程语言及数据集的分布情况。
  • 评估该领域实证评估的成熟度与可靠性。
  • 识别维护阶段之外的新兴应用,特别是开发阶段的应用。
  • 突出关键挑战,如缺乏公开数据集、多范式语言支持有限以及混合方法不足。

提出的方法

  • 通过查询四个数字图书馆开展系统性文献回顾,以识别相关研究。
  • 基于预设的纳入与排除标准筛选并选定136篇原始研究。
  • 按方法论、编程语言、数据集、工具和应用领域对研究进行分类。
  • 通过元分析综合各研究的发现,重点关注工具特性和技术的普遍性。
  • 将80种软件工具映射至八种不同的检测技术及五个应用领域。
  • 评估数据集的可用性与质量,确认仅12个数据集中有8个可公开获取。

实验结果

研究问题

  • RQ1在源代码相似性度量与克隆检测中,哪些技术占主导地位?
  • RQ2现有工具与研究最常针对哪些编程语言?
  • RQ3可用于代码相似性与克隆检测的公开数据集有多少个,其质量如何?
  • RQ4代码相似性度量在软件工程中的主要应用是什么?
  • RQ5哪些主要挑战阻碍了该研究领域的进展?

主要发现

  • 共识别出80种软件工具,其中49%针对Java,37%针对C和C++。
  • 在识别出的12个数据集中,仅有8个与代码相似性及克隆检测相关且可公开获取。
  • 多数研究集中于维护阶段的应用,如克隆检测与错误检测。
  • 各研究中普遍存在实证评估与基准测试的缺乏,限制了可复现性。
  • 尽管混合方法结合多种技术具有提升准确性的潜力,但其研究仍显不足。
  • 对多范式语言及较少见编程语言的支持仍极为有限或完全缺失。

更好的研究,从现在开始

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

无需绑定信用卡

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