CCGraph: a PDG-based code clone detector with approximate graph matching
Yue Zou, Bihuan Ban, Yinxing Xue, Yun Xu
摘要
The software clone detection is an active research area, which is very important for software maintenance, bug detection etc. The two pieces of cloned code reflect some similarities or equivalents in the syntax or structure of the code representations. There are many representations of code like AST, token, PDG etc. The PDG (Program Dependency Graph) of source code can contain both syntactic and structural information. However, most existing PDGbased tools are quite time-consuming and miss many clones because they detect code clones with exact graph matching by using subgraph isomorphism. In this paper, we propose a novel PDG-based code clone detector, CCGraph, that uses graph kernels. Firstly, we normalize the structure of PDGs and design a two-stage filtering strategy by measuring the characteristic vectors of codes. Then we detect the code clones by using approximate graph matching algorithm based on the reforming WL (Weisfeiler-Lehman) graph kernel. Experiment results show that CCGraph retains a high accuracy, has both better recall and F1-score values, and detects more semantic clones than other two related state-of-the-art tools. Besides, CCGraph is much more efficient than the existing PDG-based tools. CCS CONCEPTS • Software and its engineering → Software maintenance tools.
问问这篇 Paper
智能体会读完全文。
Lune 把这篇 Paper 索引到了最后一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。
引用它的顶会 Paper12
- NIL: large-scale detection of large-variance clonesTasuku Nakagawa, Yoshiki Higo, Shinji KusumotoFSE 2021 · 被引用 41 次
- Has My Release Disobeyed Semantic Versioning? Static Detection Based on Semantic DifferencingLyuye Zhang, Chengwei Liu, Zhengzi Xu, Sen Chen 等ASE 2022 · 被引用 30 次
- Third-Party Library Dependency for Large-Scale SCA in the C/C++ Ecosystem: How Far Are We?Ling Jiang, Hengchen Yuan, Qiyi Tang, Sen Nie 等ISSTA 2023 · 被引用 24 次
- Detecting Semantic Code Clones by Building AST-based Markov Chains ModelYueming Wu, Siyue Feng, Deqing Zou, Hai JinASE 2022 · 被引用 21 次
- Machine Learning is All You Need: A Simple Token-based Approach for Effective Code Clone DetectionSiyue Feng, Wenqi Suo, Yueming Wu, Deqing Zou 等ICSE 2024 · 被引用 20 次
相关 Paper
- SCDetector: Software Functional Clone Detection Based on Semantic Tokens AnalysisYueming Wu, Deqing Zou, Shihan Dou, Siru Yang 等ASE 2020 · 被引用 55 次
- TreeCen: Building Tree Graph for Scalable Semantic Code Clone DetectionYutao Hu, Deqing Zou, Junru Peng, Yueming Wu 等ASE 2022 · 被引用 30 次
- CC2Vec: Combining Typed Tokens with Contrastive Learning for Effective Code Clone DetectionShihan Dou, Yueming Wu, Haoxiang Jia, Yuhao Zhou 等FSE 2024 · 被引用 9 次
- Learning Graph-based Code Representations for Source-level Functional Similarity DetectionJiahao Liu, Jun Zeng, Xiang Wang, Zhenkai LiangICSE 2023 · 被引用 27 次
- Gitor: Scalable Code Clone Detection by Building Global Sample GraphJunjie Shan, Shihan Dou, Yueming Wu, Hairu Wu 等FSE 2023 · 被引用 7 次
