see also "Any tools to check for duplicate VB.NET code?"
A friend of mine only has access to the Express editions of Visual Studio and I am trying to help him refactor to remove a lot of duplication.
In computer programming, duplicate code is a sequence of source code that occurs more than once, either within a program or across different programs owned or maintained by the same entity. Duplicate code is generally considered undesirable for a number of reasons.
Sonar uses the following four metrics to cover code duplication. Duplicated lines can also be expressed as a percentage value and we will create an alert with a threshold value of five percent. Number of physical lines touched by duplication. Number of duplicated blocks participating in duplication.
Code Inspection: Duplicated code fragmentReports duplicated blocks of code from the selected scope: the same file or the entire project. The inspection features quick-fixes that help you to set the size of detected duplicates, navigate to repetitive code fragments, and compare them in a tool window.
You could take a look at Simian or DuplicateFinder. Neither have a dependency on the IDE, although you can integrate Simian quite easily.
Clone Detective appears as though it might work for you. I haven't used it before, but I stumbled across it on codeplex this week.
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