arrow
Return

Fast Code Clone Detection Based on Weighted Recursive Autoencoders

delete2019-01-01
delete31
delete
OA
AI
J
Jie Zeng *
K
Kerong Ben
X
Xiaowei Li
张
张弦 (Xian Zhang)
DOI:10.1109/ACCESS.2019.2938825delete
deleteOriginal
deleteShare
deleteSave
View PDF
Abstract

Abstract

En 中文
Code cloning considerably facilitates software development but also leads to recurring bugs and other software quality problems. In this paper, we propose a fast code clone detection method based on weighted recursive autoencoders (RAE) to measure code similarity at the function level. Different from manually defining features for code clone detection, our deep learning-based method can automatically learn program features. First, we analyze program abstract syntax trees using weighted RAE, extract the program features and encode the functions to vectors. During the modeling process, we consider node weight information in abstract syntax trees to increase the proportion of information contributed by important nodes in the final vector representation of one program. Second, we report functions with similar vectors as code clone pairs. The second phase is time consuming when analyzing large software systems because it needs quadratic pairwise comparisons. To solve this problem, we transform the clone detection problem into an approximate nearest neighbors search (ANNS) in a high-dimensional vector set and use the navigating spreading-out graph to reduce the computational time complexity. Experimental results on BigCloneBench show that our method outperforms the compared algorithm based on unweighted RAE in terms of precision, recall, and AUC value and can return clone pairs in approximately 33 min, while the compared algorithm requires approximately 14 days when performing pairwise comparisons among 785,438 functions' vectors. Our method also outperforms many prominent tools, including Oreo, in detecting Moderately Type-3 or Type-4 clones, and our false positive rate (FPR) equals 0.055, which means few false positives. More importantly, our method has no need for labeled data, and all of the source code is released to guarantee experimental reproducibility.
Keywords:
Code clone
fast code clone detection
abstract syntax tree
weighted recursive autoen-coders
navigating spreading-out graph
AI Summary

AI Summary

Key information extracted from the uploaded paper, including a brief overview, abstract, background, key highlights, visual analysis, and future outlook.

Journal

IEEE Access cover
IEEE Access
IF:
3.6
Papers:
9.8W
Citations:
29.4W

Organization

W
wuhan naval university of engineering
Scholars:
2.6K
Papers: 1.6K
Citations: 2
Cited Papers

Cited Papers

Lys63/Met1-hybrid ubiquitin chains are commonly formed during the activation of innate immune signalling
err2016-06-01
err0
errOAAI
errChristoph H. Emmerich; Siddharth Bakshi; Ian R. Kelsall; Juanma Ortiz-Guerrero; Natalia Shpiro; Philip Cohen
errShare
errSave
Software clone detection: A systematic review
err2013-07-01
err291
PREAI
errRattan, Dhavleesh; Bhatia, Rajesh; Singh, Maninder
errShare
errSave
Influence of algal organic matter of Microcystis aeruginosa on ferrate decay and MS2 bacteriophage inactivation
err2019-12-01
err0
PREAI
errXueyin Wu; Aixi Tang; Xiaochao Bi; Thanh H. Nguyen; Baoling Yuan
errShare
errSave
Comparison and evaluation of clone detection tools
err2007-09-01
err510
errOAAI
errBellon, Stefan; Koschke, Rainer; Antoniol, Giuliano; Krinke, Jens; Merlo, Ettore
errShare
errSave
researcher View more