Your SlideShare is downloading. ×
Java Code Quality Tools
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Java Code Quality Tools

15,422
views

Published on

Published in: Technology

0 Comments
6 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
15,422
On Slideshare
0
From Embeds
0
Number of Embeds
46
Actions
Shares
0
Downloads
103
Comments
0
Likes
6
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Java Code Quality Tools
    by OrestIvasiv
    Twitter: @halyph
    Blog: halyph.blogspot.com
  • 2. CodeProAnalytix
    Code Analysis
    Metrics
    Code Coverage
    Dependency Analysis
    JUnit Test Generation
    Similar Code Analysis
  • 3. PMD
    Possible bugs - empty try/catch/finally/switch statements
    Dead code - unused local variables, parameters and private methods
    Suboptimal code - wasteful String/StringBuffer usage
    Overcomplicated expressions - unnecessary if statements, for loops that could be while loops
    Duplicate code - copied/pasted code means copied/pasted bugs
  • 4. FindBugs
    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.
    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.
    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.
  • 5. Code Coverage
    Cobertura
    eCobertura – Eclipse Plugin
    EMMA
    EclEmma and JaCoCo – Eclipse Plugins
  • 6. Coding standard analysis
    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.
  • 7. Tattletale
    Identify dependencies between JAR files
    Find missing classes from the classpath
    Spot if a class/package is located in multiple JAR files
    Spot if the same JAR file is located in multiple locations
    With a list of what each JAR file requires and provides
    Verify the SerialVersionUID of a class
    Find similar JAR files that have different version numbers
    Find JAR files without a version number
    Find unused JAR archives
    Identify sealed / signed JAR archives
    Locate a class in a JAR file
    Get the OSGi status of your project
    Remove black listed API usage
  • 8. Consolidated Tools
    Sonar
    Xradar
    QALab
  • 9. UCDetector
    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:
    Unnecessary (dead) code
    Code where the visibility could be changed to protected, default or private
    Methods of fields, which can be final