Multi-Objective Optimization for Token-Based Clone Detection

02/12/2020
by   Yaroslav Golubev, et al.
0

Clone detection plays an important role in software engineering. Finding clones within a single project introduces possible refactoring opportunities, and between different projects it could be used for detecting code reuse or possible licensing violations. In this paper, we propose a modification to token-based clone detection that allows detecting more clone pairs of greater diversity without losing precision by implementing multi-parameter search, i.e. conducting the search several times, aimed at different groups of clones. To combat the increase in operation time that this approach brings about, we propose an optimization that allows to significantly decrease the overlap in detected clones between the searches. The method is applicable to any clone detector tool that uses tokens and similarity measures, highly configurable and can also be run in parallel, making it well-suited for large-scale analysis research. We describe the method and its optimization and evaluate them with two different popular clone detection tools on two datasets of different sizes, consisting of four prominent open source projects. The implementation of the technique allows to increase the number of detected clones by 41.9-52.7 and consider further research possibilities.

READ FULL TEXT

Please sign up or login with your details

Forgot password? Click here to reset