Lune

ASE2022顶会

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

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 5 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Machine Learning is All You Need: A Simple Token-based Approach for Effective Code Clone Detection 引用了 SCDetector: Software Functional Clone Detection Based on Semantic Tokens Analysis
  • Machine Learning is All You Need: A Simple Token-based Approach for Effective Code Clone Detection 引用了 Tritor: Detecting Semantic Code Clones by Building Social Network-Based Triads Model
  • Machine Learning is All You Need: A Simple Token-based Approach for Effective Code Clone Detection 引用了 Comparison and Evaluation of Clone Detection Techniques with Different Code Representations
  • InferCode: Self-Supervised Learning of Code Representations by Predicting Subtrees 引用了 Functional code clone detection with syntax and semantics fusion learning
  • Tritor: Detecting Semantic Code Clones by Building Social Network-Based Triads Model 引用了 SCDetector: Software Functional Clone Detection Based on Semantic Tokens Analysis
  • CC2Vec: Combining Typed Tokens with Contrastive Learning for Effective Code Clone Detection 引用了 SCDetector: Software Functional Clone Detection Based on Semantic Tokens Analysis
  • Comparison and Evaluation of Clone Detection Techniques with Different Code Representations 引用了 Functional code clone detection with syntax and semantics fusion learning
  • Comparison and Evaluation of Clone Detection Techniques with Different Code Representations 引用了 SCDetector: Software Functional Clone Detection Based on Semantic Tokens Analysis
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper5

  1. 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 次引用
  2. Comparison and Evaluation of Clone Detection Techniques with Different Code RepresentationsYuekun Wang, Yuhang Ye, Yueming Wu, Weiwei Zhang 等ICSE 2023 · 15 次引用
  3. CC2Vec: Combining Typed Tokens with Contrastive Learning for Effective Code Clone DetectionShihan Dou, Yueming Wu, Haoxiang Jia, Yuhao Zhou 等FSE 2024 · 9 次引用
  4. Tritor: Detecting Semantic Code Clones by Building Social Network-Based Triads ModelDeqing Zou, Siyue Feng, Yueming Wu, Wenqi Suo 等FSE 2023 · 6 次引用
  5. A Longitudinal Analysis Of Replicas in the Wild Wild AndroidSyeda Mashal Abbas Zaidi, Shahpar Khan, Parjanya Vyas, Yousra AaferASE 2024

它引用的 Paper3

  1. Functional code clone detection with syntax and semantics fusion learningChunrong Fang, Zixi Liu, Yangyang Shi, Jeff Huang 等ISSTA 2020 · 125 次引用
  2. InferCode: Self-Supervised Learning of Code Representations by Predicting SubtreesNghi D. Q. Bui, Yijun Yu, Lingxiao JiangICSE 2021 · 106 次引用
  3. SCDetector: Software Functional Clone Detection Based on Semantic Tokens AnalysisYueming Wu, Deqing Zou, Shihan Dou, Siru Yang 等ASE 2020 · 55 次引用

相关 Paper

  1. Detecting Semantic Code Clones by Building AST-based Markov Chains ModelYueming Wu, Siyue Feng, Deqing Zou, Hai JinASE 2022 · 21 次引用
  2. Fine-Grained Code Clone Detection with Block-Based Splitting of Abstract Syntax TreeTiancheng Hu, Zijing Xu, Yilin Fang, Yueming Wu 等ISSTA 2023 · 18 次引用
  3. CCGraph: a PDG-based code clone detector with approximate graph matchingYue Zou, Bihuan Ban, Yinxing Xue, Yun XuASE 2020 · 46 次引用
  4. NIL: large-scale detection of large-variance clonesTasuku Nakagawa, Yoshiki Higo, Shinji KusumotoFSE 2021 · 41 次引用
  5. DSFM: Enhancing Functional Code Clone Detection with Deep Subtree InteractionsZhiwei Xu, Shaohua Qiang, Dinghong Song, Min Zhou 等ICSE 2024 · 7 次引用
黄昏的海面,两侧是细线勾勒的悬崖