We should be able to find duplicate code. This both
applies to copy+pasted code but also for structurally
identical code that could be moved to a method.
doMore(i + j)
These snippets are not really copy+paste but if they
are sufficiently long they should go in a method that
takes the integer as an argument.
The PMD project (pmd.sf.net) has a copy and paste
detection tool which works well but is too slow for
regular use. I don't know whether the problem lies in
the underlying algorithm or in the pmd implementation.
If the algorithm is the problem, there has been some
reasearch on this subject, and the algorithm in
http://citeseer.nj.nec.com/539959.html might be an
I think our implementation will have to be a new
FileSetCheck, although it would be cool if we did not
have to parse each file twice.
Log in to post a comment.