TreeCen: Building Tree Graph for Scalable Semantic Code Clone Detection
Yutao Hu, Deqing Zou, Junru Peng, Yueming Wu, Junjie Shan, Hai Jin
摘要
Code clone detection is an important research problem that has attracted wide attention in software engineering. Many methods have been proposed for detecting code clone, among which text-based and token-based approaches are scalable but lack consideration of code semantics, thus resulting in the inability to detect semantic code clones. Methods based on intermediate representations of codes can solve the problem of semantic code clone detection. However, graph-based methods are not practicable due to code compilation, and existing tree-based approaches are limited by the scale of trees for scalable code clone detection. In this paper, we propose TreeCen, a scalable tree-based code clone detector, which satisfies scalability while detecting semantic clones effectively. Given the source code of a method, we first extract its abstract syntax tree (AST) based on static analysis and transform it into a simple graph representation (i.e., tree graph) according to the node type, rather than using traditional heavyweight tree matching. We then treat the tree graph as a social network and adopt centrality analysis on each node to maintain the tree details. By this, the original complex tree can be converted into a 72-dimensional vector while containing comprehensive structural information of the AST. Finally, these vectors are fed into a machine learning model to train a detector and use it to find code clones. We conduct comparative evaluations on effectiveness and
问问这篇 Paper
智能体会读完全文。
Lune 把这篇 Paper 索引到了每一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。
引用它的顶会 Paper5
- 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 次
- Comparison and Evaluation of Clone Detection Techniques with Different Code RepresentationsYuekun Wang, Yuhang Ye, Yueming Wu, Weiwei Zhang 等ICSE 2023 · 被引用 15 次
- CC2Vec: Combining Typed Tokens with Contrastive Learning for Effective Code Clone DetectionShihan Dou, Yueming Wu, Haoxiang Jia, Yuhao Zhou 等FSE 2024 · 被引用 9 次
- Tritor: Detecting Semantic Code Clones by Building Social Network-Based Triads ModelDeqing Zou, Siyue Feng, Yueming Wu, Wenqi Suo 等FSE 2023 · 被引用 6 次
- A Longitudinal Analysis Of Replicas in the Wild Wild AndroidSyeda Mashal Abbas Zaidi, Shahpar Khan, Parjanya Vyas, Yousra AaferASE 2024
它引用的顶会 Paper3
- Functional code clone detection with syntax and semantics fusion learningChunrong Fang, Zixi Liu, Yangyang Shi, Jeff Huang 等ISSTA 2020 · 被引用 125 次
- InferCode: Self-Supervised Learning of Code Representations by Predicting SubtreesNghi D. Q. Bui, Yijun Yu, Lingxiao JiangICSE 2021 · 被引用 106 次
- SCDetector: Software Functional Clone Detection Based on Semantic Tokens AnalysisYueming Wu, Deqing Zou, Shihan Dou, Siru Yang 等ASE 2020 · 被引用 55 次
相关 Paper
- Fine-Grained Code Clone Detection with Block-Based Splitting of Abstract Syntax TreeTiancheng Hu, Zijing Xu, Yilin Fang, Yueming Wu 等ISSTA 2023 · 被引用 18 次
- Detecting Semantic Code Clones by Building AST-based Markov Chains ModelYueming Wu, Siyue Feng, Deqing Zou, Hai JinASE 2022 · 被引用 21 次
- CCGraph: a PDG-based code clone detector with approximate graph matchingYue Zou, Bihuan Ban, Yinxing Xue, Yun XuASE 2020 · 被引用 46 次
- NIL: large-scale detection of large-variance clonesTasuku Nakagawa, Yoshiki Higo, Shinji KusumotoFSE 2021 · 被引用 41 次
- DSFM: Enhancing Functional Code Clone Detection with Deep Subtree InteractionsZhiwei Xu, Shaohua Qiang, Dinghong Song, Min Zhou 等ICSE 2024 · 被引用 7 次
