Successfully reported this slideshow.
Java Code Quality Tools<br />by OrestIvasiv<br />Twitter: @halyph<br />Blog: halyph.blogspot.com<br />
CodeProAnalytix<br />Code Analysis<br />Metrics<br />Code Coverage <br />Dependency Analysis<br />JUnit Test Generation<br...
PMD<br />Possible bugs - empty try/catch/finally/switch statements<br />Dead code - unused local variables, parameters and...
FindBugs<br />Correctness bug - Probable bug - an apparent coding mistake resulting in code that was probably not what the...
Code Coverage<br />Cobertura<br />eCobertura – Eclipse Plugin<br />EMMA<br />EclEmma and JaCoCo – Eclipse Plugins<br />
Coding standard analysis<br />Checkstyle is a development tool to help programmers write Java code that adheres to a codin...
Tattletale<br />Identify dependencies between JAR files<br />Find missing classes from the classpath<br />Spot if a class/...
Consolidated Tools<br />Sonar<br />Xradar<br />QALab<br />
UCDetector<br />Unnecessary Code Detector is a eclipse PlugInto find unnecessary (dead) public Java code. For example publ...
Upcoming SlideShare
Loading in …5
×

Java Code Quality Tools

27,011 views

Published on

Published in: Technology

Java Code Quality Tools

  1. 1. Java Code Quality Tools<br />by OrestIvasiv<br />Twitter: @halyph<br />Blog: halyph.blogspot.com<br />
  2. 2. CodeProAnalytix<br />Code Analysis<br />Metrics<br />Code Coverage <br />Dependency Analysis<br />JUnit Test Generation<br />Similar Code Analysis<br />
  3. 3. PMD<br />Possible bugs - empty try/catch/finally/switch statements<br />Dead code - unused local variables, parameters and private methods<br />Suboptimal code - wasteful String/StringBuffer usage<br />Overcomplicated expressions - unnecessary if statements, for loops that could be while loops<br />Duplicate code - copied/pasted code means copied/pasted bugs<br />
  4. 4. FindBugs<br />Correctness bug - Probable bug - an apparent coding mistake resulting in code that was probably not what the developer intended. We strive for a low false positive rate. <br />Bad Practice - Violations of recommended and essential coding practice. Examples include hash code and equals problems, cloneable idiom, dropped exceptions, serializable problems, and misuse of finalize. We strive to make this analysis accurate, although some groups may not care about some of the bad practices. <br />Dodgy - Code that is confusing, anomalous, or written in a way that leads itself to errors. Examples include dead local stores, switch fall through, unconfirmed casts, and redundant null check of value known to be null. More false positives accepted. In previous versions of FindBugs, this category was known as Style. <br />
  5. 5. Code Coverage<br />Cobertura<br />eCobertura – Eclipse Plugin<br />EMMA<br />EclEmma and JaCoCo – Eclipse Plugins<br />
  6. 6. Coding standard analysis<br />Checkstyle is a development tool to help programmers write Java code that adheres to a coding standard. It automates the process of checking Java code to spare humans of this boring (but important) task. This makes it ideal for projects that want to enforce a coding standard. <br />
  7. 7. Tattletale<br />Identify dependencies between JAR files<br />Find missing classes from the classpath<br />Spot if a class/package is located in multiple JAR files<br />Spot if the same JAR file is located in multiple locations<br />With a list of what each JAR file requires and provides<br />Verify the SerialVersionUID of a class<br />Find similar JAR files that have different version numbers<br />Find JAR files without a version number<br />Find unused JAR archives<br />Identify sealed / signed JAR archives<br />Locate a class in a JAR file<br />Get the OSGi status of your project<br />Remove black listed API usage<br />
  8. 8. Consolidated Tools<br />Sonar<br />Xradar<br />QALab<br />
  9. 9. UCDetector<br />Unnecessary Code Detector is a eclipse PlugInto find unnecessary (dead) public Java code. For example public classes, methods or fields which have no references. UCDetector creates markers for the following problems, which appear in the eclipse problem view:<br />Unnecessary (dead) code<br />Code where the visibility could be changed to protected, default or private<br />Methods of fields, which can be final<br />

×