This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Soft Skills and have John Sonmez on-line!
See this thread for details.
The moose likes IDEs, Version Control and other tools and the fly likes favorite duplicate code tool? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "favorite duplicate code tool?" Watch "favorite duplicate code tool?" New topic
Author

favorite duplicate code tool?

Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 31057
    
232

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.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42915
    
  68
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

Joined: Jul 11, 2001
Posts: 14112
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...


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 31057
    
232

Interesting. Thanks guys.

Ilja: Thanks for adding something about the tools that I didn't think about
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: favorite duplicate code tool?