Quality assurance focuses on the most important features of any
- Suboptimal code. eg: Wasteful String/StringBuffer usage
If used in smart manner, using a code analysis tool is not going to cause additional burden on the developer. Here are few tips;
1. Integrate your code analysis tool with your IDE so that it will generate the warnings as you code. So you can fix those right away and they will never get accumilated.
2. Integrade the code analysis tool with your builds so that it will generate the code analysis report at the end of each build which can be mailed for those responsible.
1.Choose the rules that are right for you.
2. Integrate your code analysis tool with your IDE
3. Integrade the code analysis tool with your builds
FindBugs™ is a program to find bugs in Java programs. It looks for instances of "bug patterns" --- code instances that are likely to be errors.FindBugs is platform independent, and is known to run on GNU/Linux, Windows, and MacOS X platforms. It is free software, distributed under the terms of the Lesser GNU Public License.
PMD scans Java source code and looks for potential problems like:
- Possible bugs - empty try/catch/finally/switch statements
3. PMD CPD
Duplicate code can be hard to find, especially in a large project. But PMD's Copy/Paste Detector (CPD) can find it for you! CPD works with Java, JSP, C, C++, and PHP code. This tool is a suset of PMD tool.