Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
As the name implies, source analysis tools look at your source code, searching for bug patterns. The tool I used in the following code is PMD, an open source tool for Java. PMD offers a command-line version, Ant support, and plug-ins for all major development environments. It looks for problems in the following categories:
Possible bugs
For example, empty try...catch blocks
Dead code
Unused local variables, parameters, and private variables
Suboptimal code
Wasteful string usage
Overcomplicated expressions
“Reuse” via copy and paste
Duplicate code (supported by an ancillary tool called CPD)
“Reuse” via copy and paste