A clustering method for pruning false positive of clonde code detection

Peijun Ma, Yixin Bian, Xiaohong Su · 2013

There are some false positives when detect syntax similar cloned code with clone code technology based on token. In this paper, we propose a novel algorithm to automatically prune false positives of clone code detection by performing clustering with different attribute and weights. First, closely related statements are grouped into a cluster by performing clustering. Second, compare the hash values of the statements in the two clusters to prune false positives. The experimental results show that our method can effectively prune clone code false positives caused by switching the orders of same structure statments. It not only improves the accuracy of cloned code detection and cloned code related defects detection but also contribute to the following study of cloned code refactoring

Read the paper · More papers on PaperTik