PMD is an extensible cross-language static 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.
These details are provided for information only. No information here is legal advice and should not be used as such.