PMD and Checkstyle
Depending on the PMD document, it checks the following sections in your code:
Unused local variables
An empty catch block
Parameter not used
Empty if statement
Duplicate import statement
Unused private methods
Could be a singletons class.
Short/Long variable and method name
Checkstyle Check the following sections:
Javadoc annotation
Naming conventions
Title
Import statement
Volume size
Blank
Modifiers
Block
Mixed Check (pack live some useful, such as System.out and Printstacktrace)
their role
Pmd,checkstyle can check Javadoc annotations; But PMD provides a useful feature called CPD, which checks the copy-and-paste portion of the code. The most frequent errors I have found using PMD are unused import statements, unused private variables, and unexpected repeat spelling. Checkstyle can find more errors. Includes a missing Javadoc annotation, more than 80-character lines, an inconsistent variable name, a tab instead of a space, and so on. All two tools allow you to create custom rules.
If you want to use one of them in your organization, Checkstyle seems better: it checks most of the projects agreed by the company code. If improving code quality is the primary goal, then PMD is a good choice. But if you want more features and really use tools to modify the code, you should try jalopy.
jalopy, Jalopy is an easy to configure source code format program that detects and fixes a large number of custom bugs in Java code. Jalopy is more like a code-builder than an inspector. Jalopy's plug-ins now support most Ides, and most are seamless integration. I find that jalopy is particularly powerful and can do a lot of cool things. For example, it can modify code indentation, align parentheses, make line widths conform to a character length, insert related Javadoc annotations, and sort import statements. The best place to Jalopy is the Super customization feature. A simple user interface allows you to select all the features of the jalopy switch without requiring an XML configuration file.
Don't waste resources
I suggest that you use these tools instead of time-consuming and laborious manual code checks. Once you've used these tools to turn code checking into a relatively easy task, you can check your code as a common job rather than a mess at the end of the project. These tools also provide an integration with Apache ant, so you can run these code inspectors every day, and they can work well when compiling or executing unit tests. Control your code and deliver what you really think is high quality.