From the site...
PMD scans Java source code and looks for potential problems like:
- Empty try/catch/finally/switch blocks
- Unused local variables, parameters and private methods
- Empty if/while statements
- Overcomplicated expressions - unnecessary if statements, for loops that could be while loops
- Classes with high Cyclomatic Complexity measurements
Check out the project: http://pmd.sf.net/