File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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
internet detective
Marshal

Joined: May 26, 2003
Posts: 29237
    
139

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: 39547
    
  27
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).


Ping & DNS - updated with new look and Ping home screen widget
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
internet detective
Marshal

Joined: May 26, 2003
Posts: 29237
    
139

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?
 
Similar Threads
Favorite Coverage Analyzer
Using z-index To Place Page on Top
Your favorite tool for code coverage
GUI Tool
Code duplication