PMD scans Java source code and looks for potential problems like:
Unused local variables
Empty catch blocks
Unused parameters
Empty 'if' statements
Duplicate import statements
Unused private methods
Classes which could be Singletons
Short/long variable and method names
PMD has plugins for JEdit, JBuilder, NetBeans/Sun ONE Studio, IntelliJ IDEA, TextPad, Maven, Ant, Eclipse, Gel, and Emacs.
http://pmd.sourceforge.net
===========================================
Eclipse Checkstyle Plug-in
The Eclipse Checkstyle plug-in integrates the Checkstyle Java code auditor into the Eclipse IDE. The plug-in provides real-time feedback to the user about violations of rules that check for coding style and possible error prone code constructs
http://eclipse-cs.sourceforge.net/
===========================================
===========================================
Unused local variables
Empty catch blocks
Unused parameters
Empty 'if' statements
Duplicate import statements
Unused private methods
Classes which could be Singletons
Short/long variable and method names
PMD has plugins for JEdit, JBuilder, NetBeans/Sun ONE Studio, IntelliJ IDEA, TextPad, Maven, Ant, Eclipse, Gel, and Emacs.
http://pmd.sourceforge.net
===========================================
Eclipse Checkstyle Plug-in
The Eclipse Checkstyle plug-in integrates the Checkstyle Java code auditor into the Eclipse IDE. The plug-in provides real-time feedback to the user about violations of rules that check for coding style and possible error prone code constructs
http://eclipse-cs.sourceforge.net/
===========================================
===========================================