Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 81 Next »

Table of Contents

Complexity

NameKeyDescription
Complexitycomplexity

It is the cyclomatic complexity, also known as McCabe metric. Whenever the control flow of a function splits, the complexity counter gets incremented by one. Each function has a minimum complexity of 1.

More details

Complexity /classclass_complexityAverage complexity by class.
Complexity /filefile_complexityAverage complexity by file.
Complexity /methodfunction_complexityAverage complexity by function.

Design

NameKeyDescription

File cycles

file_cycles

Minimal number of file cycles detected inside a directory to be able to identify all undesired dependencies. This metric is available at the directory, module and program levels.

File edges weight

file_edges_weight

Number of file dependencies inside a directory. This metric is available at the directory, module and program levels.

File dependencies to cut

package_tangles

Number of file dependencies to cut in order to remove all cycles between directories. This metric is available at the directory, module and program levels.

 

File tangle

file_tangles

File tangle = Suspect file dependencies

This metric is available at the directory, module and program levels.

File tangle index

file_tangle_index

File tangle index = 2 * (File tangle / File edges weight) * 100.

This metric is available at the directory, module and program levels.

Package cycles

package_cycles

Minimal number of directory cycles detected to be able to identify all undesired dependencies. This metric is available at the directory, module and program levels.

Package dependencies to cut

package_feedback_edges

Number of directory dependencies to cut in order to remove all cycles between directories. This metric is available at the package, module and program levels.

Package tangle index

package_tangle_index

Level of directory interdependency. Best value (0%) means that there is no cycle and worst value (100%) means that directories are really tangled. This metric is computed with the following formula: 2 * (File dependencies to cut / Number of file dependencies between directories) * 100. This metric is available at the directory, module and program levels.

Response for class

rfc

See RFC documentation page. This metric is available at all levels.

Package edges weight

package_edges_weight

Number of file dependencies between directories. This metric is available at the directory, module and program levels.

Suspect file dependencies

file_feedback_edges

File dependencies to cut in order to remove cycles between files inside a directory. Note that cycles between files inside a directory does not always mean a bad quality architecture. This metric is available at the directory level.

Documentation

NameKeyDescription
Comment linescomment_lines

Number of lines containing either comment or commented-out code.

Non-significant comment lines (empty comment lines, comment lines containing only special characters, etc.) do not increase the number of comment lines.

The following piece of code contains 9 comment lines:

 

  

More details

Comments (%)comment_lines_density

Density of comment lines = Comment lines / (Lines of code + Comment lines) * 100

With such a formula:

  • 50% means that the number of lines of code equals the number of comment lines
  • 100% means that the file only contains comment lines
Comments in Procedure Divisions Comments in Procedure divisions (Cobol only)
Public documented API (%)public_documented_api_densityDensity of public documented API = (Public API - Public undocumented API) / Public API * 100
Public undocumented APIpublic_undocumented_apiPublic API without comments header.

Duplications

NameKeyDescription

Duplicated blocks

duplicated_blocks

Number of duplicated blocks of lines.

Duplicated filesduplicated_filesNumber of files involved in a duplication.
Duplicated linesduplicated_linesNumber of lines involved in a duplication.
Duplicated lines (%)duplicated_lines_density

Density of duplication = Duplicated lines / Lines * 100

Issues

NameKeyDescription

New issues

new_violations

Number of new issues.

New xxxxx issues

new_xxxxx_violations

Number of new issues with severity xxxxx, xxxxx being blocker, critical, major, minor or info.

Issues

violations

Number of issues.

xxxxx issues

xxxxx_violations

Number of issues with severity xxxxx, xxxxx being blocker, critical, major, minor or info.

False positive issuesfalse_positive_issuesNumber of false positive issues
Open issuesopen_issuesNumber of issues whose status is Open
Confirmed issuesconfirmed_issuesNumber of issues whose status is Confirmed
Reopened issuesreopened_issuesNumber of issues whose status is Reopened

Weighted issues

weighted_violations

Sum of the issues weighted by the coefficient associated to each severity (Sum(xxxxx_violations * xxxxx_weight)).
To set the weight of each severity, log in as an administrator, go to Settings > General Settings > General > General and set the Rules weight property. The default value is:
( (Blocker_violatons * 10) + (Critical_violations * 5) + (Major_violations * 3) + Minor_violations )

Rules compliance

violations_density

Rules compliance index (RCI) = 100 - (Weighted issues / Lines of code * 100)
If the value is negative, it is rounded to 0%. 

Technical debtsqale_indexEffort in days to fix all issues.

Severity

SeverityDescription
BlockerOperational/security risk: This issue might make the whole application unstable in production. Ex: calling garbage collector, not closing a socket, etc.
CriticalOperational/security risk: This issue might lead to an unexpected behavior in production without impacting the integrity of the whole application. Ex: NullPointerException, badly caught exceptions, lack of unit tests, etc.
MajorThis issue might have a substantial impact on productivity. Ex: too complex methods, package cycles, etc.
MinorThis issue might have a potential and minor impact on productivity. Ex: naming conventions, Finalizer does nothing but call superclass finalizer, etc.
InfoNot known or yet well defined security risk or impact on productivity.

Size

MetricKeyDescription
Accessorsaccessors

Number of getter and setter functions used to get (reading) or set (writing) a class property.

More details

ClassesclassesNumber of classes (including nested classes, interfaces, enums and annotations).
DirectoriesdirectoriesNumber of directories.
FilesfilesNumber of files.
Generated Linesgenerated_lines

Number of lines generated by Cobol code generators like CA-Telon.

Generated lines of codegenerated_nclocNumber of lines of code generated by Cobol code generators like CA-Telon.
Inside Control Flow Statementscobol_inside_ctrlflow_statementsNumber of inside (intra program) control flow statements (GOBACK, STOP RUN, DISPLAY, CONTINUE, EXIT, RETURN, PERFORM paragraph1 THRU paragraph2).
Cobol only.
LineslinesNumber of physical lines (number of carriage returns).
Lines of codencloc

Number of physical lines that contain at least one character which is neither a whitespace or a tabulation or part of a comment.

More details

LOCs in Data Divisionscobol_data_division_nclocNumber of lines of code in Data divisions. Generated lines of code are excluded.
Cobol only. 
LOCs in Procedure Divisionscobol_procedure_division_nclocNumber of lines of code in Procedure divisions. Generated lines of code are excluded.
Cobol only.
Methodsfunctions

Number of functions. Depending on the language, a function is either a function or a method or a paragraph.

More details

Outside Control Flow Statementscobol_outside_ctrlflow_statementsNumber of outside (inter programs) control flow statements (CALL, EXEC CICS LINK, EXEC CICS XCTL, EXEC SQL, EXEC CICS RETURN).
Cobol only.
PackagespackagesNumber of directorys.
ProjectsprojectsNumber of projects in a view.
Public APIpublic_api

Number of public Classes + number of public Functions + number of public Properties

More details

Statementsstatements

Number of statements.

More details

Tests

MetricKeyDescription
Branch coveragebranch_coverage

On each line of code containing some boolean expressions, the branch coverage simply answers the following question: 'Has each boolean expression been evaluated both to true and false?'. This is the density of possible branches in flow control structures that have been followed during unit tests execution.

Branch coverage on new codenew_branch_coverage

Identical to Branch coverage but restricted to new / updated source code.

To be computed this metric requires the SCM Activity plugin.

Coveragecoverage

It is a mix of Line coverage and Branch coverage. Its goal is to provide an even more accurate answer to the following question: 'How much of the source code has been covered by the unit tests?".

Coverage on new codenew_coverage

Identical to Coverage but restricted to new / updated source code.

To be computed this metric requires the SCM Activity plugin .

Line coverageline_coverage

On a given line of code, Line coverage simply answers the following question: 'Has this line of code been executed during the execution of the unit tests?'. It is the density of covered lines by unit tests:

Line coverage on new codenew_line_coverageIdentical to Line coverage but restricted to new / updated source code.
Lines to coverlines_to_coverNumber of lines of code which could be covered by unit tests (for example, blank lines or full comments lines are not considered as lines to cover).
Lines to cover on new codenew_lines_to_coverIdentical to Lines to cover but restricted to new / updated source code.
Skipped unit testsskipped_testsNumber of skipped unit tests.
Uncovered branchesuncovered_conditionsNumber of branches which are not covered by unit tests.
Uncovered branches on new codenew_uncovered_conditionsIdentical to Uncovered branches but restricted to new / updated source code.
Uncovered linesuncovered_linesNumber of lines of code which are not covered by unit tests.
Uncovered lines on new codenew_uncovered_linesIdentical to Uncovered lines but restricted to new / updated source code.
Unit teststestsNumber of unit tests.
Unit tests durationtest_execution_timeTime required to execute all the unit tests.
Unit test errorstest_errorsNumber of unit tests that have failed.
Unit test failurestest_failuresNumber of unit tests that have failed with an unexpected exception.
Unit test success density (%)test_success_densityTest success density = (Unit tests - (Unit test errors + Unit test failures)) / Unit tests * 100

The same kinds of metrics exist for Integration tests coverage and Overall tests coverage (Units tests + Integration tests).

Metrics on tests execution does not exist for Integration tests and Overall tests.

  • No labels