PMD is a Java source code analysis tool - it checks your code for unused fields, empty try/catch/finally/if/while blocks, unused method parameters, and stuff like that. There's much more info here.
This table contains the results of running PMD's unused code ruleset against a bunch of Apache projects.
Comments? Questions? Please post them here
| Project | Problems found | ||
|---|---|---|---|
| Ant | 29 | ||
| Log4j | 45 | ||
| BCEL | 11 | ||
| Cocoon | 5 | ||
| Cactus | 6 | ||
| OJB | 147 | ||
| Turbine 2 | 17 | ||
| Commons Sandbox | 333 | ||
| ORO | 0 | ||
| POI | 36 | ||
| Commons | 369 | ||
| Torque | 0 | ||
| James | 0 | ||
| JMeter | 130 | ||
| Maven | 10 | ||
| Struts | 12 | ||
| Tomcat40-Catalina | 58 | ||
| XML-Xindice | 8 | ||
| Axis | 31 |