Tritor: Detecting Semantic Code Clones by Building Social Network-Based Triads Model

Dec 6, 2023

Speakers

About

Code clone detection refers to finding the functionally similarities between two code fragments, which is becoming increasingly important with the evolution of the software engineering field. There are numbers of code clone detection methods have been proposed, including tree-based methods that are capable of detecting semantic code clones. However, due to the fact that tree structure is complex, these methods are difficult to apply to large-scale clone detection. In this paper, we propose a scalable semantic code clone detector based on semantically enhanced abstract syntax tree. Specifically, we add the control flow and data flow details into the original tree and regard the enhanced tree as a social network. Then we build a social network-based triads model to collect the similarity features between the two methods by analyzing different types of triads within the network. After obtaining all features, we use them to train a machine learning-based semantic code clone detector (\ie Tritor). To examine the capability of Tritor, we evaluate it on two widely used datasets with other nine state-of-the-art code clone detection systems. The experimental results show that Tritor has better detection performance than SourcererCC, RtvNN, Deckard, ASTNN, TBCNN, CDLH, SCDetector, DeepSim, and FCCA. As for scalability, Tritor is about 39 times faster than another current state-of-the-art tree-based code clone detector ASTNN.

Organizer

Store presentation

Should this presentation be stored for 1000 years?

How do we store presentations

Total of 0 viewers voted for saving the presentation to eternal vault which is 0.0%

Sharing

Recommended Videos

Presentations on similar topic, category or speaker

Interested in talks like this? Follow ESEC-FSE