views:

136

answers:

2

Just saw this linked on YCombinator news and the idea heavily appeals to me, and seems like it would be useful for many languages, not just c#, but haven't seen anything similar elsewhere. For reference:

http://www.codeplex.com/CloneDetectiveVS

edit: basic description of the tool for those who don't want to follow the link - It scans the codebase to find cases of duplicate code to help with refactoring things down to minimize duplication issues.

+2  A: 

Java has a few - some of the most popular static analysis tools have this built in along with many other useful rules.

Ones I have used, in the (purely subjective) order that I was happiest with:

  • PMD - comes with CPD - their copy and paste detector
  • Checkstyle - specific rules to look for duplicate code
  • Findbugs - the daddy of all Java static analysis tools. Includes duplicate code detection, along with just about anything else that you can think of, but quite resource intensive

There are some nice IDE plugins for all of these and many other reporting tools (for example, you can see results on a Hudson continuos build server, or your project's Maven site)

serg10
+2  A: 

The IntelliJ IDE (Java, Scala, Ruby,...) has a Locate Duplicate... tool. Usefull indeed !

Sébastien RoccaSerra