paperbot · PL 论文追踪

全部论文 待读 收藏

P2 CCAligner

CCAligner
ICSE Proceedings of the 40th International Conference on Software Engineering2018匹配度 2/10 · 该论文属于程序分析与代码克隆检测,关注大规模差距克隆的检测算法;但未涉及用户核心关注的静态分析与LLM/Agent交叉、浮点程序分析或贝叶斯程序分析,方向匹配度低。引用 127 inbox
Pengcheng Wang, Jeffrey Svajlenko, Yanzhao Wu, Yun Xu, Chanchal K. Roy
crossref: 2026-09-12

AI 速览

一句话:提出基于代码窗口与编辑距离的 CCAligner,高效检测大规模差距克隆并兼顾通用克隆检测。

软件开发中常通过复制代码并大量编辑来复用代码,所得代码属于复杂 Type-3 克隆,称为大规模差距克隆(large-gap clone)。现有克隆检测器在检测此类克隆时存在局限。本文提出工具 CCAligner,采用考虑编辑距离的代码窗口进行匹配,设计新的 e-mismatch 索引,并使用非对称相似系数度量相似度。作者在大规模差距克隆及一般 Type-1、Type-2、Type-3 克隆检测上评估 CCAligner。结果表明,CCAligner 在大规模差距克隆检测上优于其他竞争工具;在 10MLOC 输入上执行时间最佳,并在一般 Type-1 至 Type-3 克隆检测中保持良好精确率与召回率,整体与最佳检测器相当。

问题
如何有效检测因大量编辑产生的大规模差距克隆(复杂 Type-3 克隆),现有最先进克隆检测器在此任务上存在局限。
方法
提出 CCAligner,基于考虑编辑距离的代码窗口进行匹配,引入 e-mismatch 索引,并用非对称相似系数进行相似度度量。
评估
在大规模差距克隆及一般 Type-1/2/3 克隆检测上全面评估,与现有工具比较精度、召回率和执行时间。
原文摘要(Abstract)

Copying code and then pasting with large number of edits is a common activity in software development, and the pasted code is a kind of complicated Type-3 clone. Due to large number of edits, we consider the clone as a large-gap clone. Large-gap clone can reflect the extension of code, such as change and improvement. The existing state-of-the-art clone detectors suffer from several limitations in detecting large-gap clones. In this paper, we propose a tool, CCAligner, using code window that considers e edit distance for matching to detect large-gap clones. In our approach, a novel e-mismatch index is designed and the asymmetric similarity coefficient is used for similarity measure. We thoroughly evaluate CCAligner both for large-gap clone detection, and for general Type-1, Type-2 and Type-3 clone detection. The results show that CCAligner performs better than other competing tools in large-gap clone detection, and has the best execution time for 10MLOC input with good precision and recall in general Type-1 to Type-3 clone detection. Compared with existing state-of-the-art tools, CCAligner is the best performing large-gap clone detection tool, and remains competitive with the best clone detectors in general Type-1, Type-2 and Type-3 clone detection.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot4492,
  title = {CCAligner},
  author = {Pengcheng Wang and Jeffrey Svajlenko and Yanzhao Wu and Yun Xu and Chanchal K. Roy},
  booktitle = {ICSE},
  year = {2018},
  doi = {10.1145/3180155.3180179}
}