21.1. Language Independent Metrics

Architecture Violation Density

Description: Number of architecture violations per 1000 lines of code. This metric is calculated for code that is fully analyzed plus code that is excluded by the 'Issue Filter'.

Categories: Architecture

Architecture Violation Density (Source Elements)

Description: Number of architecture violations per 1000 source elements. This metric is calculated for code that is fully analyzed plus code that is excluded by the 'Issue Filter'.

Categories: Architecture

Code Contained in Files Uncovered by Architecture (%)

Description: Percentage of lines of code contained in files not assigned to any architecture artifact. This metric is calculated for code that is fully analyzed plus code that is excluded by the 'Issue Filter'.

Categories: Architecture

Code Contained in Files with Violations (%)

Description: Percentage of lines of code contained in files with at least one violation. This metric is calculated for code that is fully analyzed plus code that is excluded by the 'Issue Filter'.

Categories: Architecture

Code Contained in Files with Violations or Deprecations (%)

Description: Percentage of lines of code contained in files with at least one violation or deprecation.This metric is calculated for code that is fully analyzed plus code that is excluded by the 'Issue Filter'.

Categories: Architecture

Deprecated parser dependencies

Description: Number of deprecated parser dependencies

Categories: Architecture

Ignored Deprecated Parser Dependencies

Description: Number of parser dependencies in ignored architecture deprecations

Categories: Architecture

Lines of Code in Files with Violations

Description: Lines of code contained in files with at least one violation. This metric is calculated for code that is fully analyzed plus code that is excluded by the 'Issue Filter'.

Categories: Architecture

Lines of Code in Files with Violations or Deprecations (%)

Description: Lines of code contained in files with at least one violation or deprecation.This metric is calculated for code that is fully analyzed plus code that is excluded by the 'Issue Filter'.

Categories: Architecture

Number of Artifacts

Description: Number of architecture artifacts in checked files

Categories: Architecture

Number of Components in Deprecated Artifacts

Description: Number of components that are assigned to deprecated artifact

Categories: Architecture

Number of Components with Violations

Description: Number of components that contain architecture violations

Categories: Architecture

Number of Empty Artifacts

Description: Number of architecture artifacts that are empty in checked files

Categories: Architecture

Number of Ignored Violations (Parser Dependencies)

Description: Number of parser dependencies in ignored architecture violations

Categories: Architecture

Number of Logical Elements in Deprecated Artifacts

Description: Number of logical programming elements that are assigned to deprecated artifact

Categories: Architecture

Number of Unassigned Logical Elements

Description: Number of internal logical elements that are not assigned to any artifact

Categories: Architecture

Number of Unassigned Physical Components

Description: Number of internal physical components that are not assigned to any artifact

Categories: Architecture

Number of Violations (Component Dependencies)

Description: Number of architecture-violating component dependencies

Categories: Architecture

Number of Violations (Parser Dependencies)

Description: Number of architecture-violating parser dependencies

Categories: Architecture

Average Block Nesting Depth

Description: Weighted average of nesting depth.

Categories: Code Analysis

Component Dependencies to Remove (Components)

Description: Number of component dependencies to remove to break up all component cycles.

Categories: Code Analysis, Cycle

Component Rank (Module)

Description: Component Rank is based on Google's page rank algorithm. The total component rank over all components in the selected group adds up to 100. The higher the rank, the more 'important' a component is in a system. Having many incoming dependencies or being referenced by other important components increases rank.

Categories: Code Analysis

Component Rank (System)

Description: Component Rank is based on Google's page rank algorithm. The total component rank over all components in the selected group adds up to 100. The higher the rank, the more 'important' a component is in a system. Having many incoming dependencies or being referenced by other important components increases rank.

Categories: Code Analysis

Issue Density

Description: Calculated as the number of unresolved issues (errors, warnings) * 1000, divided by source element count

Categories: Code Analysis

Max Block Nesting Depth

Description: Nesting depth is a good complexity indicator. Minimum value is zero, each nesting level adds 1.

Categories: Code Analysis

Number of Code Duplicates

Description: Number of duplicated code blocks.

Categories: Code Analysis

Number of Code Duplicates to be Fixed

Description: Number of duplicated code blocks with applied Fix task.

Categories: Code Analysis

Number of Duplicated Code Lines

Description: Number of duplicated lines in duplicated code blocks. The duplicated lines of each code block are calculated as the sum of involved occurrences excluding the largest, which is treated as the reference.

Categories: Code Analysis

Number of Ignored Code Duplicates

Description: Number of ignored duplicated code blocks.

Categories: Code Analysis

Parser Dependencies to Remove (Components)

Description: Number of code lines to change to break up all component cycles.

Categories: Code Analysis, Cycle

Redundant Code (%)

Description: Percentage of redundant code. This also represents the probability that any line is contained in a duplicate. This metric is calculated for fully analyzed code.

Categories: Code Analysis

Redundant Code [Ignored] (%)

Description: Percentage of ignored redundant code. This also represents the probability that any line is contained in an ignored duplicate. This metric is calculated for fully analyzed code.

Categories: Code Analysis

Redundant Code [To Be Fixed] (%)

Description: Percentage of redundant code with an assigned "Fix" task. This also represents the probability that any line is contained in a to-be-fixed duplicate. This metric is calculated for fully analyzed code.

Categories: Code Analysis

Structural Debt Index (Components)

Description: Cumulative structural debt index of component cycles.

Categories: Code Analysis

Biggest Component Cycle Group

Description: Number of components in biggest cycle.

Categories: Cycle

Critically Entangled Lines of Code

Description: Lines of code of source files involved any type of critical cycle (marked as error).

Categories: Cycle

Critically Entangled Lines of Code (%)

Description: Percentage of fully analyzed code contained in source files involved any type of critical cycle (marked as error). This also represents the probability that any line is involved in critically entangled code.

Categories: Cycle

Critically Entangled Lines of Code [Ignored]

Description: Lines of code of source files involved in any type of ignored critical cycle (marked as error).

Categories: Cycle

Critically Entangled Lines of Code [Ignored] (%)

Description: Percentage of fully analyzed code contained in source files involved in any type of ignored critical cycle (marked as error). This also represents the probability that any line is involved in ignored critically entangled code.

Categories: Cycle

Critically Entangled Lines of Code [To Be Fixed]

Description: Lines of code of source files involved any type of to be fixed critical cycle (marked as error).

Categories: Cycle

Critically Entangled Lines of Code [To Be Fixed] (%)

Description: Percentage of fully analyzed code contained in source files involved any type of to be fixed critical cycle (marked as error). This also represents the probability that any line is involved in to be fixed critically entangled code.

Categories: Cycle

Cyclicity (Components)

Description: Cumulated cyclicity of component cycles.

Categories: Cycle

Entangled Lines of Code

Description: Lines of code of source files involved any type of cycle.

Categories: Cycle

Entangled Lines of Code (%)

Description: Percentage of fully analyzed code contained in source files involved in any type of cycle. This also represents the probability that any line is involved in entangled code.

Categories: Cycle

Entangled Lines of Code [Ignored]

Description: Lines of code of source files involved in any type of ignored cycle.

Categories: Cycle

Entangled Lines of Code [Ignored] (%)

Description: Percentage of fully analyzed code contained in source files involved in any type of ignored cycle. This also represents the probability that any line is involved in ignored entangled code.

Categories: Cycle

Entangled Lines of Code [To Be Fixed]

Description: Lines of code of source files involved any type of to be fixed cycle.

Categories: Cycle

Entangled Lines of Code [To Be Fixed] (%)

Description: Percentage of fully analyzed code contained in source files involved any type of to be fixed cycle. This also represents the probability that any line is involved in to be fixed entangled code.

Categories: Cycle

Maximum Lines of Code Involved in a Cycle

Description: Biggest cycle group with respect to the lines of code of involved source files.

Categories: Cycle

Number of Component Cycle Groups

Description: Number of all component cycle groups, warnings and errors.

Categories: Cycle

Number of Critical Component Cycle Groups

Description: Number of component cycle groups marked as errors.

Categories: Cycle

Number of Cyclic Components

Description: Number of cyclic components.

Categories: Cycle

Number of Cyclic Modules

Description: Number of cyclic modules.

Categories: Cycle

Number of Ignored Cyclic Components

Description: Number of ignored cyclic components.

Categories: Cycle

Relative Cyclicity (Components)

Description: Relative component cyclicity in percent.

Categories: Cycle

Relative Entanglement (%)

Description: Computed as the sum of relative cyclicities on component and namespace/directory levels, with each level contributing 50%. If the system contains several languages, the namespace/directory values per language are weighted against the lines of code contributed by the language. High values are an indicator for very large cycle groups.

Categories: Cycle

ACD

Description: Average component dependency according to John Lakos. Average number of components a component depends on directly and indirectly. This metric can be used to characterize the overall average coupling of internal components.

Categories: Cohesion/Coupling, John Lakos

CCD

Description: Cumulative component dependency according to John Lakos. Cumulated depends upon values.

Categories: Cohesion/Coupling, John Lakos

Depends Upon (Module)

Description: Depends upon module level according to DependsOn by John Lakos. Total number of components that a component directly and indirectly depends upon in containing module.

Categories: Cohesion/Coupling, John Lakos

Depends Upon (System)

Description: Depends upon system level according to DependsOn by John Lakos. Total number of components that a component directly and indirectly depends upon in system.

Categories: Cohesion/Coupling, John Lakos

Fan In Maintainability Level (Module)

Description: Percentage of higher-level components in the same module that depend directly or indirectly on this component.

Categories: Cohesion/Coupling

Fan In Visibility (Module)

Description: Percentage of components in the same module that depend directly or indirectly on this component.

Categories: Cohesion/Coupling, MacCormack, Rusnak, Baldwin

Fan In Visibility (System)

Description: Percentage of internal components in the system that depend directly or indirectly on this component.

Categories: Cohesion/Coupling, MacCormack, Rusnak, Baldwin

Fan Out Visibility (Module)

Description: Percentage of components in the same module that this component depends upon.

Categories: Cohesion/Coupling, MacCormack, Rusnak, Baldwin

Fan Out Visibility (System)

Description: Percentage of internal components in the system that this component depends upon.

Categories: Cohesion/Coupling, MacCormack, Rusnak, Baldwin

Highest ACD

Description: Highest module ACD.

Categories: Cohesion/Coupling, John Lakos

LCOM4

Description: Determines the number of components in a class. A component is composed of fields, methods and types defined top level including all their nested programming elements. Constructors, destructors, empty, abstract and overridden methods of classes are not included in the calculation. The metric represents the unrelated portions of code in a class. A value of 1 indicates the highest cohesion possible - which is normally desirable. High values might indicate that a class is a candidate for a refactoring. Consider that utility classes by nature have high LCOM4 values.

Categories: Cohesion/Coupling

Logical Cohesion (Module)

Description: Number of dependencies 'to' and 'from' other top-level logical programming elements in the same namespace on module level.

Categories: Cohesion/Coupling

Logical Cohesion (System)

Description: Number of dependencies 'to' and 'from' other top-level logical programming elements in the same namespace on system level.

Categories: Cohesion/Coupling

Logical Coupling (Module)

Description: Number of dependencies 'to' and 'from' other top-level logical programming elements in other namespaces on module level.

Categories: Cohesion/Coupling

Logical Coupling (System)

Description: Number of dependencies 'to' and 'from' other top-level logical programming elements in other namespaces on system level.

Categories: Cohesion/Coupling

Maintainability Level

Description: This metric estimates maintainability as a percentage. 100% is the best possible value. To do that it looks at the dependency structure between components (source files in most languages). Cyclic dependencies and low level classes with a lot of incoming dependencies have a negative influence on the metric. Keeping good vertical boundaries and not having too many layers will have a positive influence. It is also recommended to have as many components as possible that are independent, i.e. have no incoming dependencies and therefore can be changed without influencing the rest of the system. In Java and C# the metric also considers the value of the relative cyclicity metric for packages/namespaces. If you have large cycle groups they will have a negative influence on the metric value.

Categories: Cohesion/Coupling

NCCD

Description: Normalized cumulative component dependency according to John Lakos. The ratio between the cumulative component dependency and the cumulative component dependency of a balanced binary tree of the same size. A value greater than 1 indicates a more vertical design. A value less than 1 indicates a more horizontal design.

Categories: Cohesion/Coupling, John Lakos

Physical Cohesion

Description: Number of dependencies 'to' and 'from' other components in the same module.

Categories: Cohesion/Coupling

Physical Coupling

Description: Number of dependencies 'to' and 'from' other components in other modules.

Categories: Cohesion/Coupling

Propagation Cost

Description: Propagation cost metric according to MacCormack, Rusnak and Baldwin. It describes the proportion of software files that are directly or indirectly linked to each other.

Categories: Cohesion/Coupling, MacCormack, Rusnak, Baldwin

Used From (Module)

Description: Number of all depending elements (direct and indirect) + 1 (including self) in containing module.

Categories: Cohesion/Coupling, John Lakos

Used From (System)

Description: Number of all depending elements (direct and indirect) + 1 (including self) in system.

Categories: Cohesion/Coupling, John Lakos

Code Comment Lines

Description: Counts all comment lines excluding header comments and blank comment lines. This includes code of fully analyzed and issue ignoring code.

Categories: Size

Comment Lines

Description: Counts all comment lines excluding blank comment lines. This includes fully analyzed and issue ignoring code.

Categories: Size

Lines of Code

Description: Lines of code excluding blank and comment lines. This includes fully analyzed and issue ignoring code.

Categories: Size

Lines of Fully Analyzed Code

Description: Lines of fully analyzed code excluding blank and comment lines.

Categories: Size

Lines of Fully Analyzed Code in Large Files

Description: Lines of fully analyzed code excluding blank and comment lines in files violating the threshold (default 1000).

Categories: Size

Lines of Fully Analyzed Code in Large Files (%)

Description: Percent of lines of fully analyzed code excluding blank and comment lines in files violating the threshold (default 1000).

Categories: Size

Lines of Fully Analyzed Code in Large Files [Ignored]

Description: Lines of fully analyzed code excluding blank and comment lines in ignored files violating the threshold (default 1000).

Categories: Size

Lines of Fully Analyzed Code in Large Files [Ignored] (%)

Description: Percent of lines of fully analyzed code excluding blank and comment lines in ignored files violating the threshold (default 1000).

Categories: Size

Lines of Fully Analyzed Code in Large Files [To Be Fixed]

Description: Lines of fully analyzed code excluding blank and comment lines in to be fixed files violating the threshold (default 1000).

Categories: Size

Lines of Fully Analyzed Code in Large Files [To Be Fixed] (%)

Description: Percent of lines of fully analyzed code excluding blank and comment lines in to be fixed files violating the threshold (default 1000).

Categories: Size

Lines of Issue-Ignoring Code

Description: Lines of code excluding blank and comment lines for which only architecture violations and parsing problems are reported.

Categories: Size

Number of Components (Full Analysis)

Description: Number of fully analyzed components.

Categories: Size

Number of Components (Ignoring Issues)

Description: Number of components ignoring issues.

Categories: Size

Number of Components/Sources

Description: Number of components or source files

Categories: Size

Number of Excluded Source Files

Description: Number of source files excluded via 'File Filter'. These files are completely excluded from the analysis and do not contribute to any metric.

Categories: Size

Number of Logical Types (Module)

Description: Number of logical types (classes, enums or similar) in container on module level.

Categories: Size

Number of Logical Types (System)

Description: Number of logical types (classes, enums or similar) in container on system level.

Categories: Size

Number of Methods

Description: Number of member functions.

Categories: Size

Number of Modules

Description: Number of modules.

Categories: Size

Number of Parameters

Description: Number of parameters.

Categories: Size

Number of Source Files

Description: Number of source files in fully analyzed and issue ignoring code.

Categories: Size

Number of Source Files (Excluded)

Description: Number of source files in test code (excluded via 'Production Code Filter').

Categories: Size

Number of Source Files (Full Analysis)

Description: Number of source files that are fully analyzed, i.e. not excluded by any workspace filter.

Categories: Size

Number of Source Files (Ignoring Issue)

Description: Number of source files excluded via 'Issue Filter' that no issues (except parser issues and architecture violations) are generated for.

Categories: Size

Number of Statements

Description: Counts all statements. This includes statements of fully analyzed and issue ignoring code.

Categories: Size

Number of Statements in Fully Analyzed Code

Description: Counts all statements in fully analyzed code.

Categories: Size

Number of Types

Description: Number of types (classes, enums or similar) in container.

Categories: Size

Source Element Count

Description: Number of programming elements (i.e. types, fields, methods, functions, ...) plus number of statements. This includes elements of fully analyzed and issue ignoring code.

Categories: Size

Total Lines

Description: Counts all lines including empty and comment lines of source files. This includes files of fully analyzed and issue ignoring code.

Categories: Size

Relational Cohesion (Module)

Description: Relation cohesion according to Craig Larman (adapted). Number of internal namespace dependencies divided by the number of top-level logical programming elements in the same namespace on module level. Higher numbers suggest more cohesion.

Categories: Craig Larman, Cohesion/Coupling

Relational Cohesion (System)

Description: Relation cohesion according to Craig Larman (adapted). Number of internal namespace dependencies divided by the number of top-level logical programming elements in the same namespace on system level. Higher numbers suggest more cohesion.

Categories: Craig Larman, Cohesion/Coupling

Abstractness (Module)

Description: Abstractness according to Robert C. Martin based on module level dependencies. Total number of abstract types divided by the total number of concrete types. The metric has a range of [0,1]. 0 means that the container contains no abstract types. 1 means that the container contains nothing but abstract types.

Categories: Robert C. Martin

Abstractness (System)

Description: Abstractness according to Robert C. Martin based on system level dependencies. Total number of abstract types divided by the total number of concrete types. The metric has a range of [0,1]. 0 means that the container contains no abstract types. 1 means that the container contains nothing but abstract types.

Categories: Robert C. Martin

Distance (Module)

Description: Distance according to Robert C. Martin based on module level dependencies. Abstractness + Instability - 1. The metric has a range of [-1,1]. This is a variation of the original metric definition. A negative sign means 'in the zone of pain' and a positive sign means 'in the zone of uselessness'. A 'good' value should be around 0.

Categories: Robert C. Martin

Distance (System)

Description: Distance according to Robert C. Martin based on system level dependencies. Abstractness + Instability - 1. The metric has a range of [-1,1]. This is a variation of the original metric definition. A negative sign means 'in the zone of pain' and a positive sign means 'in the zone of uselessness'. A 'good' value should be around 0.

Categories: Robert C. Martin

Instability (Module)

Description: Instability according to Robert C. Martin based on module level dependencies. The metric has a range of [0,1]. If there are no outgoing dependencies, then the Instability will be 0 and the measured element is stable. If there are no incoming dependencies, then the Instability will be 1 and the measured element is instable. Stable means that the element is not so easy to be changed. Instable means that it is easier to be changed.

Categories: Robert C. Martin

Instability (System)

Description: Instability according to Robert C. Martin based on system level dependencies. The metric has a range of [0,1]. If there are no outgoing dependencies, then I will be 0 and the measured element is stable. If there are no incoming dependencies, then I will be 1 and the measured element is instable. Stable means that the element is not so easy to be changed. Instable means that it is easier to be changed.

Categories: Robert C. Martin

Number of Incoming Dependencies (Module)

Description: Number of incoming dependencies on module level.

Categories: Robert C. Martin

Number of Incoming Dependencies (System)

Description: Number of incoming dependencies on system level.

Categories: Robert C. Martin

Number of Outgoing Dependencies (Module)

Description: Number of outgoing dependencies on module level.

Categories: Robert C. Martin

Number of Outgoing Dependencies (System)

Description: Number of outgoing dependencies on system level.

Categories: Robert C. Martin

Average Complexity

Description: Weighted average modified extended cyclomatic complexity for fully analyzed code

Categories: Thomas J. McCabe

Average Complexity (Module)

Description: Weighted average modified extended cyclomatic complexity for fully analyzed code on module level

Categories: Thomas J. McCabe

Average Complexity (System)

Description: Weighted average modified extended cyclomatic complexity for fully analyzed code on system level

Categories: Thomas J. McCabe

Cyclomatic Complexity

Description: Cyclomatic complexity according to Thomas J. McCabe. Number of decision points in a method plus one for the method entry.

Categories: Thomas J. McCabe

Extended Cyclomatic Complexity

Description: As cyclomatic complexity adding the number of logical '&&' and '||' operations.

Categories: Thomas J. McCabe

Modified Cyclomatic Complexity

Description: As cyclomatic complexity but switch statements only add 1 independent from the number of cases.

Categories: Thomas J. McCabe

Modified Extended Cyclomatic Complexity

Description: As cyclomatic complexity but switch statements only add 1 independent from the number of cases and adding the number of logical '&&' and '||' operations.

Categories: Thomas J. McCabe

Code Churn (2y)

Description: Number of lines added or removed in the last 2 years

Categories: Change History

Code Churn (30d)

Description: Number of lines added or removed in the last 30 days

Categories: Change History

Code Churn (365d)

Description: Number of lines added or removed in the last 365 days

Categories: Change History

Code Churn (5y)

Description: Number of lines added or removed in the last 5 years

Categories: Change History

Code Churn (90d)

Description: Number of lines added or removed in the last 90 days

Categories: Change History

Code Churn Rate (2y)

Description: Percentage of lines added or removed in the last 2 years based on total lines

Categories: Change History

Code Churn Rate (30d)

Description: Percentage of lines added or removed in the last 30 days based on total lines

Categories: Change History

Code Churn Rate (365d)

Description: Percentage of lines added or removed in the last 365 days based on total lines

Categories: Change History

Code Churn Rate (5y)

Description: Percentage of lines added or removed in the last 5 years based on total lines

Categories: Change History

Code Churn Rate (90d)

Description: Percentage of lines added or removed in the last 90 days based on total lines

Categories: Change History

Days since last commit

Description: Days since this file was last changed (9999 means no changes in the last 5 years)

Categories: Change History

File Changes (2y)

Description: Number of committed file changes in the last 2 years

Categories: Change History

File Changes (30d)

Description: Number of committed file changes in the last 30 days

Categories: Change History

File Changes (365d)

Description: Number of committed file changes in the last 365 days

Categories: Change History

File Changes (5y)

Description: Number of committed file changes in the last 5 years

Categories: Change History

File Changes (90d)

Description: Number of committed file changes in the last 90 days

Categories: Change History

Number of Authors (30d)

Description: Number of developers who have worked on this item in the last 30 days

Categories: Change History

Number of authors (2y)

Description: Number of developers who have worked on this item in the last 2 years

Categories: Change History

Number of authors (365d)

Description: Number of developers who have worked on this item in the last year

Categories: Change History

Number of authors (5y)

Description: Number of developers who have worked on this item in the last 5 years

Categories: Change History

Number of authors (90d)

Description: Number of developers who have worked on this item in the last 90 days

Categories: Change History

Number of Statements in Complex Methods

Description: Counts all statements in fully analyzed code of too complex methods, i.e. that violate the thresholds for max nesting depth (default 4) or for extended modified cyclomatic complexity (default 15).

Categories: Complexity

Number of Statements in Complex Methods (%)

Description: Percentage of statements in fully analyzed code in too complex methods, i.e. that violate the thresholds for max nesting depth (default 4) or for extended modified cyclomatic complexity (default 15).

Categories: Complexity

Number of Statements in Complex Methods [Ignored]

Description: Counts all statements in fully analyzed code of ignored too complex methods, i.e. that violate the thresholds for max nesting depth (default 4) or for extended modified cyclomatic complexity (default 15).

Categories: Complexity

Number of Statements in Complex Methods [Ignored] (%)

Description: Percentage of statements in fully analyzed code in ignored too complex methods, i.e. that violate the thresholds for max nesting depth (default 4) or for extended modified cyclomatic complexity (default 15).

Categories: Complexity

Number of Statements in Complex Methods [To Be Fixed]

Description: Counts all statements in fully analyzed code of to be fixed too complex methods, i.e. that violate the thresholds for max nesting depth (default 4) or for extended modified cyclomatic complexity (default 15).

Categories: Complexity

Number of Statements in Complex Methods [To Be Fixed] (%)

Description: Percentage of statements in fully analyzed code in to be fixed too complex methods, i.e. that violate the thresholds for max nesting depth (default 4) or for extended modified cyclomatic complexity (default 15).

Categories: Complexity