Similar code detection algorithm based on sequence clustering
Shuo Li · Caai Transactions on Intelligent Systems · 2013
In order to improve efficiency of similar detecting between the codes of source programs,similar code detection algorithm based on sequence clustering was proposed in this paper.First,the algorithm extracts the source code by partitioning it into multi-segments according to its structure.Secondly,parts of the codes in each segment were transformed and the sequences were then clustered taking the weighted edit distance as the similar measure standard.Next,similar code fragments were obtained,achieving the objective of detecting similar functions among multi-codes of the source program.The experimental results based on a series of real and synthetic programs reveal the validity and scalability of the algorithm.