Virtual Machinery logoJHawk logo
  JHawk 5 - List of metrics
Product Home Licensing & Pricing Metrics Guide Download Free Trial FAQ, News, Bugs Other Products

JHawk List of Metrics

JHawk collects metrics at four different levels. The lowest level is the method level, then up to the class level, then the package level then, finally, the system level. The method, class and package levels correlate with the Java artefacts with these names. The 'system' level represents a group of these artefacts that you wish to examine collectively e.g. all the code in an application. Full documentation relating to the calculation of these metrics is supplied with the product.

Metrics collected at the method level

Metric name Metric description
Name The name of the method
Cyclomatic Complexity McCabes cyclomatic Complexity for the method
Number of Arguments Number of Arguments
Number of Comments The number of Comments associated with the method
Number of Comment Lines The number of Comment Lines associated with the method
Variable Declarations The number of variables declared in the method
Variable References The number of variables referenced in the method
Number of statements The number of statements in the method
Number of expressions The number of expressions in the method
Max depth of nesting The maximum depth of nesting in the method
Halstead length The Halstead length of the metric
Halstead vocabulary The Halstead vocabulary of the method
Halstead volume The Halstead volume of the method
Halstead difficulty The Halstead difficulty of the method
Halstead effort The Halstead effort of the method
Halstead bugs The Halstead prediction of the number of bugs in the method
Total depth of nesting The total depth of nesting in the method
Number of casts The number of class casts in the method
Number of loops The number of loops (for, while) in the method
Number of operators The total number of operators in the method
Number of operands The total number of operands in the method
Class References The classes referenced in the method
External methods The external methods called by the method
Local methods The local methods called by the method
Exceptions referenced The exceptions referenced by the method
Exceptions thrown The exceptions thrown by the method
Modifiers The modifiers (static, public etc) applied to the signature of the method
Lines of Code The number of lines of code in the method

Metrics collected at the class level

Metric name Metric description
Name The name of the class
Superclass Name The name of the superclass of the class
Number of methods The number of methods in the class
LCOM The value of the LCOM (Lack of Cohesion of Methods) metric for the class. This uses the LCOM* (or LCOM5) calculation
Total Cyclomatic Complexity The Total McCabes cyclomatic Complexity for the class
Average Cyclomatic Complexity The Average McCabes cyclomatic Complexity for all of the methods inthe class
Number of statements The number of statements in the class
Cumulative Halstead length The Halstead length of the code in the class plus the total of all the Halstead lengths of all the methods in the class
Cumulative Halstead volume The Halstead volume of the code in the class plus the total of all the Halstead volumes of all the methods in the class
Cumulative Halstead effort The Halstead effort of the code in the class plus the total of all the Halstead efforts of all the methods in the class
Cumulative Halstead bugs The Halstead prediction of the number of bugs in the code of the class and all of its methods
Un Weighted class Size The Unweighted Class Size (UWCS) of the class
Number of Queries The number of methods in the class that are queries (i.e. that return a value)
Number of Commands The number of methods in the class that are commands (i.e. that do not return a value)
External method calls The external methods called by the class and by methods in the class
Hierarchy method calls The methods called by the class and by methods in the class
Local method calls The local methods called by the class and by methods in the class that are defined in the hierarchy of the class
Instance Variables The instance variables defined by the class
Modifiers The modifiers (public, protected etc) applied to the declaration of the class
Interfaces The interfaces implemented by the class
Packages imported The packages imported by the class
Response for Class The value of the Response For Class (RFC) metric for the class
Message passing The value of the Message passing (MPC) metric for the class
Coupling between objects The value of the Coupling Between Objects (CBO) metric for the class
Fan In The value of the Fan In (Afferent coupling (Ca)) metric for the class
Fan Out The value of the Fan Out (Efferent coupling (Ce)) metric for the class
Reuse Ratio The value of the Reuse Ratio for the class
Specialization Ratio The value of the Specialization Ratio for the class
Superclasses The number of superclasses (excluding Object) in the hierarchy of the class
Subclasses The number of subclasses below the class in the hierarchy
Maintainability Index (including comments) The Maintainability Index for the class, including the adjustment for comments
Maintainability Index The Maintainability Index for the class without any adjustment for comments
Cohesion The value of the Cohesion (COH) metric for the class
Depth of Inheritance Tree The value of the Depth of Inheritance Tree (DIT) metric for the class
LCOM2 The value of the Lack of Cohesion of Methods (2) (LCOM2) metric for the class
SIX The value of the SIX metric for the class
Number of Comments The number of Comments associated with the class
Number of Comment Lines The number of Comment Lines associated with the class
Cumulative Number of Comments The number of Comments associated with the class and its method
CumulativeNumber of Comment Lines The number of Comment Lines associated with class and its methods
Lines of Code The number of lines of code in the class and its methods

Metrics collected at the package level

Metric name Metric description
Name The name of the package
Number of classes The number of classes in the package
Number of methods The number of methods in the package
Number of statements The number of statements in the package
Total Cyclomatic Complexity The Total McCabes cyclomatic Complexity for the package
Average Cyclomatic Complexity The Average McCabes cyclomatic Complexity for all of the methods in the package
Cumulative Halstead length The total of all the Halstead lengths of all the classes in the package
Cumulative Halstead volume The total of all the Halstead volumes of all the classes in the package
Cumulative Halstead effort The total of all the Halstead efforts of all the classes in the package
Cumulative Halstead bugs The Halstead prediction of the number of bugs in the code of all classes in the package
Maintainability Index (including comments) The Maintainability Index for the package, including the adjustment for comments
Maintainability Index The Maintainability Index for the package without any adjustment for comments
Abstractness The value of the Abstractness metric for the package
Fan In The value of the Fan In metric for the package
Fan Out The value of the Fan Out metric for the package
Instability The value of the Instability metric for the package
Distance The value of the Distance metric for the package
Maximum Cyclomatic Complexity The maximum value of McCabes cyclomatic Complexity for any method in the package
Cumulative Number of Comments The number of Comments associated with the package and its classes
CumulativeNumber of Comment Lines The number of Comment Lines associated with package and its classes
Lines of Code The number of lines of code in the package and its classes

Metrics collected at the system level

Metric name Metric description
Name The name of the System
Number of packages The number of packages in the system
Number of classes The number of classes in the system
Number of methods The number of methods in the system
Number of statements The number of statements in the system
Total Cyclomatic Complexity The Total McCabes cyclomatic Complexity for the system/TD>
Average Cyclomatic Complexity The Average McCabes cyclomatic Complexity for all of the methods in the system
Cumulative Halstead length The total of all the Halstead lengths of all the packages in the system
Cumulative Halstead volume The total of all the Halstead volumes of all the packages in the system
Cumulative Halstead effort The total of all the Halstead efforts of all the packages in the system
Cumulative Halstead bugs The Halstead prediction of the number of bugs in the code of all packages in the system
Maintainability Index (including comments) The Maintainability Index for the package, including the adjustment for comments
Maintainability Index The Maintainability Index for the package without any adjustment for comments
Cumulative Number of Comments The number of Comments associated with the package and its classes
CumulativeNumber of Comment Lines The number of Comment Lines associated with package and its classes
Lines of Code The number of lines of code in the package and its classes

Click here to download demo Click here to read our handy guide to java metrics

You may be interested in some of our other products. All have demo or trial versions. Just click on the links below to find out more -


Java and all Java-based trademarks are trademarks or registered trademarks of Sun Microsystems Inc.

Eclipse is a trademark of the Eclipse Foundation, Inc.

 
 
 

Contact Us

All Content 2013 Virtual Machinery   All Rights Reserved.