Skip to content
Free planNo credit card requiredStart writing

article · 2019

TECCD: A Tree Embedding Approach for Code Clone Detection

Yifei Gao, Zan Wang, Shuang Liu, Lin Yang, Wei Sang, Yuanfang Cai

Cited by 31Abstract and details only

Abstract

Clone detection techniques have been explored for decades. Recently, deep learning techniques has been adopted to improve the code representation capability, and improve the state-of-the-art in code clone detection. These approaches usually require a transformation from AST to binary tree to incorporate syntactical information, which introduces overheads. Moreover, these approaches conduct term-embedding, which requires large training datasets. In this paper, we introduce a tree embedding technique to conduct clone detection. Our approach first conducts tree embedding to obtain a node vector for each intermediate node in the AST, which captures the structure information of ASTs. Then we compose a tree vector from its involving node vectors using a lightweight method. Lastly Euclidean distances between tree vectors are measured to determine code clones. We implement our approach in a tool called TECCD and conduct an evaluation using the BigCloneBench (BCB) and 7 other large scale Java projects. The results show that our approach achieves good accuracy and recall and outperforms existing approaches.

Cite this paper

APA 7

Gao, Y., Wang, Z., Liu, S., Yang, L., Sang, W., & Cai, Y. (2019). TECCD: A Tree Embedding Approach for Code Clone Detection. https://doi.org/10.1109/icsme.2019.00025

MLA 9

Gao, Yifei, et al. “TECCD: A Tree Embedding Approach for Code Clone Detection.” 2019, pp. 145–56, https://doi.org/10.1109/icsme.2019.00025.

Chicago

Gao, Yifei, Zan Wang, Shuang Liu, Lin Yang, Wei Sang, and Yuanfang Cai. 2019. “TECCD: A Tree Embedding Approach for Code Clone Detection.” https://doi.org/10.1109/icsme.2019.00025.

Harvard

Gao, Y. et al. (2019) ‘TECCD: A Tree Embedding Approach for Code Clone Detection’. Available at: https://doi.org/10.1109/icsme.2019.00025.

BibTeX
@article{gao2019teccd,
  title = {{TECCD: A Tree Embedding Approach for Code Clone Detection}},
  author = {Gao, Yifei and Wang, Zan and Liu, Shuang and Yang, Lin and Sang, Wei and Cai, Yuanfang},
  pages = {145--156},
  year = {2019},
  doi = {10.1109/icsme.2019.00025}
}

Made from the index record. Check names, capitalisation and page numbers against the paper. Need another style? AI for Research has over 10,000.