Finding code duplicates
The first tool, dupfinder, can be used to find duplicates in your C# and VB.NET code. What is really cool is that it not only marks some parts of your code as duplicated if they are identical, but also if they have a similar structure. This means that even if two parts of your code contain different variable names or methods, they can be, in a very smart way, marked as duplicated.
To run dupfinder, use the following command:
dupFinder [OPTIONS] source
The source
parameter specifies what you would like to analyze. It can be a solution file or just files from your projects. A sample file path would look as follows:
dupfinder.exe E:\ctv_project\codingblog\trunk\src\CodingBlog.sln dupfinder.exe E:\ctv_project\codingblog\trunk\src\**\*.cs
At the end, dupfinder will inform you of how many files have been analyzed and where the report has been created through the following output:
26 files found to analyze. INFO: Duplicates report was written to C:\Users\Lukasz\AppData\Local...