Many methods, techniques and tools have been proposed for software clone detection.
Lingxiao et al (2005) proposed an efficient algorithm for detecting similar subtrees from the tree representing the source code. First, The algorithm maps subtrees to numerical vectors. Then a clustering algorithm partitions these vectors into a set of clusters where each cluster contains similar subtrees. The experimentation done using the DECKARD tool showed that the approach is scalable and accurate.