PMD is a Java source code analyzer. It finds unused variables, empty catch blocks, unnecessary object creation, and more. It includes CPD, a tool to detect chunks of identical code.
Changes over 3.9 include 10 new rules, Java 1.5 language specification used by default, better XPath performance, better memory usage, and a slew of bugfixes.
URL: PMD - PMD