Virtual Machinery logoJHawk logo
  JHawk 5 - List of metrics
Product Home Licensing & Pricing Metrics Guide Download Free Trial FAQ, News, Bugs Other Products
**** Just released - JHawk 6.1.7 - See here for details ****

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 (See our discussion on this metric here)
Number of Comment Lines The number of Comment Lines associated with the method (See our discussion on this metric here)
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 (See our discussion on this metric here)
Number of expressions The number of expressions in the method (See our discussion on this metric here)
Max depth of nesting The maximum depth of nesting in the method
Halstead length The Halstead length of the metric (See our discussion on the Halstead Metrics here).
Halstead vocabulary The Halstead vocabulary of the method (See our discussion on the Halstead Metrics here).
Halstead volume The Halstead volume of the method (See our discussion on the Halstead Metrics here).
Halstead difficulty The Halstead difficulty of the method (See our discussion on the Halstead Metrics here).
Halstead effort The Halstead effort of the method (See our discussion on the Halstead Metrics here).
Halstead bugs The Halstead prediction of the number of bugs in the method (See our discussion on the Halstead Metrics here).
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 (See our discussion on this metric here)

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 (WMC - one of the Chidamber and Kemerer metrics - see our discussion on these metrics here)
LCOM The value of the LCOM (Lack of Cohesion of Methods) metric for the class. This uses the LCOM* (or LCOM5) calculation. (one of the Chidamber and Kemerer metrics - see our discussion on these metrics here)
Total Cyclomatic Complexity The Total McCabes cyclomatic Complexity for the class
Average Cyclomatic Complexity The Average McCabes cyclomatic Complexity for all of the methods in the class
Number of statements The number of statements in the class (See our discussion on this metric here)
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 (See our discussion on the Halstead Metrics here).
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 (See our discussion on the Halstead Metrics here).
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 (See our discussion on the Halstead Metrics here).
Cumulative Halstead bugs The Halstead prediction of the number of bugs in the code of the class and all of its methods (See our discussion on the Halstead Metrics here).
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. (One of the Chidamber and Kemerer metrics - see our discussion on these metrics here)
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. (One of the Chidamber and Kemerer metrics - see our discussion on these metrics here)
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. (NOC - one of the Chidamber and Kemerer metrics - see our discussion on these metrics here)
Maintainability Index (MI) (including comments) The Maintainability Index for the class, including the adjustment for comments (See our discussion on the Maintainability Index here)
Maintainability Index (MI) The Maintainability Index for the class without any adjustment for comments (See our discussion on the Maintainability Index here)
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. (One of the Chidamber and Kemerer metrics - see our discussion on these metrics here)
LCOM2 The value of the Lack of Cohesion of Methods (2) (LCOM2) metric for the class. (One of the Chidamber and Kemerer metrics - see our discussion on these metrics here)
SIX The value of the SIX metric for the class
Number of Comments The number of Comments associated with the class (See our discussion on this metric here)
Number of Comment Lines The number of Comment Lines associated with the class (See our discussion on this metric here)
Cumulative Number of Comments The number of Comments associated with the class and its method (See our discussion on this metric here)
CumulativeNumber of Comment Lines The number of Comment Lines associated with class and its methods (See our discussion on this metric here)
Lines of Code The number of lines of code in the class and its methods (See our discussion on this metric here)

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 (See our discussion on this metric here)
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 (See our discussion on the Halstead Metrics here).
Cumulative Halstead volume The total of all the Halstead volumes of all the classes in the package (See our discussion on the Halstead Metrics here).
Cumulative Halstead effort The total of all the Halstead efforts of all the classes in the package (See our discussion on the Halstead Metrics here).
Cumulative Halstead bugs The Halstead prediction of the number of bugs in the code of all classes in the package (See our discussion on the Halstead Metrics here).
Maintainability Index (MI) (including comments) The Maintainability Index (MI) for the package, including the adjustment for comments (See our discussion on the Maintainability Index here)
Maintainability Index The Maintainability Index for the package without any adjustment for comments (See our discussion on the Maintainability Index here)
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 (See our discussion on this metric here)
CumulativeNumber of Comment Lines The number of Comment Lines associated with package and its classes (See our discussion on this metric here)
Lines of Code The number of lines of code in the package and its classes (See our discussion on this metric here)

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 (See our discussion on this metric here)
Total Cyclomatic Complexity The Total McCabes cyclomatic Complexity for the system
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 (See our discussion on the Halstead Metrics here).
Cumulative Halstead volume The total of all the Halstead volumes of all the packages in the system (See our discussion on the Halstead Metrics here).
Cumulative Halstead effort The total of all the Halstead efforts of all the packages in the system (See our discussion on the Halstead Metrics here).
Cumulative Halstead bugs The Halstead prediction of the number of bugs in the code of all packages in the system (See our discussion on the Halstead Metrics here).
Maintainability Index (MI) (including comments) The Maintainability Index for the package, including the adjustment for comments (See our discussion on the Maintainability Index here).
Maintainability Index (MI) The Maintainability Index for the package without any adjustment for comments (See our discussion on the Maintainability Index here)
Cumulative Number of Comments The number of Comments associated with the package and its classes (See our discussion on this metric here)
CumulativeNumber of Comment Lines The number of Comment Lines associated with package and its classes (See our discussion on this metric here)
Lines of Code The number of lines of code in the package and its classes (See our discussion on this metric here)

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 -


Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.

 
 
 

Contact Us

All Content © 2020 Virtual Machinery   All Rights Reserved.