I've searched the Internet for a while now and I have not been able to find any free (or cheap) tools/utilities/modules that can analyze a set of Perl files (modules or scripts) and flag duplicate or cloned or copy/pasted code.
I'm better now, but I used to copy and paste sections of code all over the place. I'd like to clean it up and fix my old code duplication, but a little bit of tool help would be appreciated so I won't have to go through all my old code with a fine tooth comb. Plus, manual recognition of this sort of offense is error prone.
Funny a similar question was posted to SO just a few minutes ago.
Here is a link with some tools you may find useful.
Code Comparison and Plagirism Detection
What do you mean by duplicate code? Just character exact matches or semantic matches.
There are several tools like http://pmd.sourceforge.net/ that can detect duplicate code by string matches, this tool is for java but the source matching works on plain text.
If you want semantic matching, like
sub A
{return 1;}
to match
sub B
{
return 1;
}
Then you'll need something else:(
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With