File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

favorite duplicate code tool?

 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 33686
316
Eclipse IDE Java VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does anyone have a favorite tool for finding duplicate (copy/pasted) code? Preferably one that is Eclipse based or runs through Ant.

I'm aware that there are a number of tools out there for finding duplicate code, but sometimes finding out what people are really using is more valuable. Your opinions helped greatly when picking a code coverage tool.
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The only one I've used is CPD -which is part of PMD- and it does have an Ant task (not sure about Eclipse integration).
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've tried a view, but I didn't really use any of them regularly. I think it's because I don't find much value in refactoring code that I don't currently touch anyway, and than I typically spot the duplication without the use of a tool.

Another thing is that those tools can only spot syntactic duplication. Most often, it's the semantic duplication that's killing me - two parts of code that are doing the same thing in slightly different ways...
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 33686
316
Eclipse IDE Java VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Interesting. Thanks guys.

Ilja: Thanks for adding something about the tools that I didn't think about
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic