Sia-RAE: A Siamese Network based on Recursive AutoEncoder for Effective Clone Detection

Chenhui Feng, Tao Wang, Yue Yu, Yang Zhang, Yanzhi Zhang, Huaimin Wang · 2020

Code clone helps improving programming productivity, while at the same time leads to many negative effects on software maintenance. Many approaches have been proposed to detect clones, but most of them fail on detecting low similarity code snippets. In this paper, we propose a Siamese network which links two recursive autoencoders (RAE) with a comparator network for clone detection. The unweighted recursive autoencoder is designed to learn code representation and then the comparator network is employed for similarity evaluation. In this Siamese network, it takes full advantages of lexical, semantic and structure information, and achieves high accuracy in revealing tiny similarity. We conduct comprehensive experiments on BigCloneBench using tagged clones as well as the whole repository respectively. The results suggest that our approach achieves good accuracy, and its recall reaches 93.02 % in WT3/T4, which outperforms state-of-the-art.

Read the paper · More papers on PaperTik