The following is excerpted from Semantic Designs' website:
Do you suspect copyright or patent infringement of your software? Looking for an easier way to perform the necessary forensics? Until now you had few alternatives to laboriously manually comparing source code (and hoping to get lucky finding something incriminating) or looking for indicators such as suspiciously similar metrics. Now you can let CloneDR do the analysis for you. Originally designed as a refactoring tool, CloneDR compares the source code from two programs and reports on the code that it is similar and identical between them. You can control how similar the code must be in order to be reported.
CloneDR builds an internal representation of the two programs known as an abstract syntax tree. That allows much more accurate determination of similar copies than simply comparing the source code text.
CloneDR is available for a number of popular languages (and a few less popular ones too!). An evaluation copy of our CloneDR is available for download.
Learn more here.