Yup, the LOC count was done using the excellent JavaNCSS utility -
http://www.kclee.com/clemens/java/javancss/.
PMD and Checkstyle are kind of similar - both are static analysis tools,
both use JavaCC, both have a bunch of rules to run on the code. I think
the main difference is that Checkstyle can do a lot of checking of
Javadoc and variable/method/class name formats, whereas PMD is more
focused on identifying semantic stuff like unused code, questionable
design (like using ArrayList rather than List), and stuff like that.
There's definitely some overlap, and the Checkstyle folks and I have
bounced around some thoughts on combining the two projects....
Yup, history would be kind of cool - one of the PMD developers put in a
similar feature request a while back:
http://sourceforge.net/tracker/index.php?func=detail&aid=583155&group_id
=56262&atid=479924
But no one's really laid down any code on that yet....
Yours,
Tom
-----Original Message-----
From: Moderated discussion of advanced Java topics.
Sent: Tuesday, November 26, 2002 10:24 AM
Subject: Re: [ADVANCED-JAVA] Some fun "unused import
statement" stats....
Is your LOC count exclusive of comments?
On a related note, how does PMD compare with checkstyle? I've run
checkstyle a few times on a real project and it was neat. One
feature all
such tools need is a built-in diff reporter: don't just
report the current
stats, report the delta from a previous run -- would be
awesome for team
projects... In other words, accept the codebase as it is initially but
detect and punish whoever makes it worse later...
Vlad.
Please respond to "Moderated discussion of advanced Java topics."
Sent by: "Moderated discussion of advanced Java topics."
Subject: Re: [ADVANCED-JAVA] Some fun "unused import
statement" stats....
That's a good idea... let's see what turns up on the JDK source.
[much typing]
OK, for the JDK 1.4 src we've got 347737 LOC and 3369 bad
imports. Less
than one percent, not too bad at all...
Yours,
Tom
-----Original Message-----
From: Moderated discussion of advanced Java topics.
Vlad Roubtsov
Sent: Tuesday, November 26, 2002 9:31 AM
Subject: Re: [ADVANCED-JAVA] Some fun "unused import
statement" stats....
Opening many JDK source files shows plenty of redundant
imports as well.
Please respond to "Moderated discussion of advanced Java topics."
Sent by: "Moderated discussion of advanced Java topics."
Subject: [ADVANCED-JAVA] Some fun "unused import
statement" stats....
http://cvs.apache.org/~tcopeland/jakarta_bad_imports.htm
Not a bad percentage. If anyone can suggest any other large bodies of
open source code (with pserver CVS access), I'll run the same
report on
those and see what comes up...
Yours,
Tom Copeland
InfoEther
703-486-4543
You can read messages from the ADVANCED-JAVA archive, unsubscribe, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.
You can read messages from the ADVANCED-JAVA archive, unsubscribe, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.
You can read messages from the ADVANCED-JAVA archive, unsubscribe, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.
You can read messages from the ADVANCED-JAVA archive, unsubscribe, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.
You can read messages from the ADVANCED-JAVA archive, unsubscribe, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.