JavaNCSS Metric Results

[ package ] [ object ] [ method ] [ explanation ]

The following document contains the results of a JavaNCSS metric analysis, using JavaNCSS version 33.54.
JavaNCSS web site.

Packages

Packages

[ package ] [ object ] [ method ] [ explanation ]

Packages sorted by NCSS.

PackageClassesMethodsNCSSJavadocsJavadoc linesSingle lines commentMulti lines comment
com.github.mkolisnyk.aerial.document1310852150160276
com.github.mkolisnyk.aerial.expressions.value63630114491691
com.github.mkolisnyk.aerial.datagenerators.cases42726300010
com.github.mkolisnyk.aerial.readers423226537455
com.github.mkolisnyk.aerial.core.params537212103007
com.github.mkolisnyk.aerial.datagenerators.algorithms32421139013
com.github.mkolisnyk.aerial.datagenerators322181619016
com.github.mkolisnyk.aerial.core618150621019
com.github.mkolisnyk.aerial.util414107415419
com.github.mkolisnyk.aerial.writers2105927110
com.github.mkolisnyk.aerial.core.templates3135500013
com.github.mkolisnyk.aerial.expressions21139310017
com.github.mkolisnyk.aerial516381563022
com.github.mkolisnyk.aerial.annotations00240007
Classes totalMethods totalNCSS totalJavadocsJavadoc linesSingle lines commentMulti lines comment
60359238711842027375

Objects

Objects

[ package ] [ object ] [ method ] [ explanation ]

TOP 30 classes containing the most NCSS.

ObjectNCSSMethodsClassesJavadocs
com.github.mkolisnyk.aerial.core.params.AerialParams12018210
com.github.mkolisnyk.aerial.datagenerators.algorithms.NWiseDataTestingAlgorithm94901
com.github.mkolisnyk.aerial.expressions.value.DateRangeValueExpression92903
com.github.mkolisnyk.aerial.document.ContainerSection821202
com.github.mkolisnyk.aerial.datagenerators.cases.UniqueValueCaseScenarioGenerator78810
com.github.mkolisnyk.aerial.util.HsqlDBWrapper67802
com.github.mkolisnyk.aerial.document.InputRecord6620011
com.github.mkolisnyk.aerial.readers.AerialFileReader65802
com.github.mkolisnyk.aerial.datagenerators.cases.PositiveCaseScenarioGenerator61810
com.github.mkolisnyk.aerial.document.FeatureSection601122
com.github.mkolisnyk.aerial.datagenerators.algorithms.FieldsRecord56901
com.github.mkolisnyk.aerial.datagenerators.cases.MandatoryCaseScenarioGenerator56710
com.github.mkolisnyk.aerial.datagenerators.TypedDataGenerator54613
com.github.mkolisnyk.aerial.datagenerators.TestDataGenerator51500
com.github.mkolisnyk.aerial.document.CaseSection51921
com.github.mkolisnyk.aerial.readers.AerialJiraReader50501
com.github.mkolisnyk.aerial.expressions.value.NumericRangeValueExpression47702
com.github.mkolisnyk.aerial.datagenerators.CaseScenarioGenerator421103
com.github.mkolisnyk.aerial.datagenerators.algorithms.FieldsTable41611
com.github.mkolisnyk.aerial.document.Tokens4011011
com.github.mkolisnyk.aerial.readers.AerialGitHubReader39500
com.github.mkolisnyk.aerial.document.InputSection38603
com.github.mkolisnyk.aerial.expressions.value.SingleDateValueExpression36703
com.github.mkolisnyk.aerial.document.DocumentSection351107
com.github.mkolisnyk.aerial.document.Document30814
com.github.mkolisnyk.aerial.core.AerialRunner28400
com.github.mkolisnyk.aerial.expressions.value.SingleNumericValueExpression27602
com.github.mkolisnyk.aerial.core.AerialTestNGRunner26400
com.github.mkolisnyk.aerial.writers.AerialFileWriter26502
com.github.mkolisnyk.aerial.expressions.value.EnumValueExpression25402

TOP 30 classes containing the most methods.

ObjectNCSSMethodsClassesJavadocs
com.github.mkolisnyk.aerial.document.InputRecord6620011
com.github.mkolisnyk.aerial.core.params.AerialParams12018210
com.github.mkolisnyk.aerial.document.ContainerSection821202
com.github.mkolisnyk.aerial.datagenerators.CaseScenarioGenerator421103
com.github.mkolisnyk.aerial.document.DocumentSection351107
com.github.mkolisnyk.aerial.document.FeatureSection601122
com.github.mkolisnyk.aerial.document.Tokens4011011
com.github.mkolisnyk.aerial.datagenerators.algorithms.FieldsRecord56901
com.github.mkolisnyk.aerial.datagenerators.algorithms.NWiseDataTestingAlgorithm94901
com.github.mkolisnyk.aerial.document.CaseSection51921
com.github.mkolisnyk.aerial.expressions.value.DateRangeValueExpression92903
com.github.mkolisnyk.aerial.datagenerators.cases.PositiveCaseScenarioGenerator61810
com.github.mkolisnyk.aerial.datagenerators.cases.UniqueValueCaseScenarioGenerator78810
com.github.mkolisnyk.aerial.document.Document30814
com.github.mkolisnyk.aerial.readers.AerialFileReader65802
com.github.mkolisnyk.aerial.util.HsqlDBWrapper67802
com.github.mkolisnyk.aerial.datagenerators.cases.MandatoryCaseScenarioGenerator56710
com.github.mkolisnyk.aerial.expressions.value.NumericRangeValueExpression47702
com.github.mkolisnyk.aerial.expressions.value.SingleDateValueExpression36703
com.github.mkolisnyk.aerial.expressions.ValueExpression20703
com.github.mkolisnyk.aerial.AerialReader11607
com.github.mkolisnyk.aerial.core.params.AerialOutputFormat21600
com.github.mkolisnyk.aerial.datagenerators.algorithms.FieldsTable41611
com.github.mkolisnyk.aerial.datagenerators.TypedDataGenerator54613
com.github.mkolisnyk.aerial.document.InputSection38603
com.github.mkolisnyk.aerial.expressions.value.SingleNumericValueExpression27602
com.github.mkolisnyk.aerial.AerialWriter7505
com.github.mkolisnyk.aerial.core.params.AerialInputFormat19500
com.github.mkolisnyk.aerial.core.templates.AerialTemplateMap19500
com.github.mkolisnyk.aerial.datagenerators.TestDataGenerator51500

Averages.

NCSS averageProgram NCSSClasses averageMethods averageJavadocs average
32.552,387.000.225.981.97

Methods

Methods

[ package ] [ object ] [ method ] [ explanation ]

TOP 30 Methods containing the most NCSS.

MethodsNCSSCCNJavadocs
com.github.mkolisnyk.aerial.expressions.value.DateRangeValueExpression.generate()4220
com.github.mkolisnyk.aerial.datagenerators.cases.UniqueValueCaseScenarioGenerator.generateUniqueScenarioData(String,String[])3490
com.github.mkolisnyk.aerial.core.params.AerialParams.parse(String[])3390
com.github.mkolisnyk.aerial.document.ContainerSection.parse(String)3070
com.github.mkolisnyk.aerial.readers.AerialJiraReader.open(AerialParams)2680
com.github.mkolisnyk.aerial.datagenerators.TypedDataGenerator.getApplicableExpressions()2540
com.github.mkolisnyk.aerial.datagenerators.algorithms.NWiseDataTestingAlgorithm.generateTestData()2480
com.github.mkolisnyk.aerial.datagenerators.cases.MandatoryCaseScenarioGenerator.generateMandatoryScenarioData(String,String[])2350
com.github.mkolisnyk.aerial.readers.AerialGitHubReader.open(AerialParams)2370
com.github.mkolisnyk.aerial.datagenerators.TestDataGenerator.generateTestData()2140
com.github.mkolisnyk.aerial.util.HsqlDBWrapper.executeQuery(String)2150
com.github.mkolisnyk.aerial.document.InputSection.parse(String)1950
com.github.mkolisnyk.aerial.datagenerators.algorithms.NWiseDataTestingAlgorithm.getUniqueCombinations(String[])1860
com.github.mkolisnyk.aerial.datagenerators.cases.PositiveCaseScenarioGenerator.generateTestData(String)1830
com.github.mkolisnyk.aerial.expressions.value.SingleDateValueExpression.generate()1810
com.github.mkolisnyk.aerial.readers.AerialFileReader.listFiles(File,String)1650
com.github.mkolisnyk.aerial.core.params.AerialParams.validate()1530
com.github.mkolisnyk.aerial.datagenerators.cases.PositiveCaseScenarioGenerator.generate()1530
com.github.mkolisnyk.aerial.datagenerators.cases.UniqueValueCaseScenarioGenerator.generate()1520
com.github.mkolisnyk.aerial.document.CaseSection.getScenarioGenerators()1530
com.github.mkolisnyk.aerial.expressions.value.StringRegexpValueExpression.generate()1520
com.github.mkolisnyk.aerial.readers.AerialFileReader.compareFileName(String,String)1590
com.github.mkolisnyk.aerial.document.FeatureSection.getTagString(String)1350
com.github.mkolisnyk.aerial.expressions.value.EnumValueExpression.generate()1340
com.github.mkolisnyk.aerial.datagenerators.algorithms.NWiseDataTestingAlgorithm.getNextRow(FieldsTable,FieldsRecord)1250
com.github.mkolisnyk.aerial.datagenerators.TestDataGenerator.generateQueryString(String[])1240
com.github.mkolisnyk.aerial.document.CaseSection.generate()1230
com.github.mkolisnyk.aerial.expressions.value.NumericRangeValueExpression.generate()1220
com.github.mkolisnyk.aerial.core.AerialMain.main(String[])1131
com.github.mkolisnyk.aerial.core.AerialProcessor.process(AerialReader,AerialWriter)1130

Averages.

Program NCSSNCSS averageCCN averageJavadocs average
2,387.004.941.850.23

Explanations

Explanations

[ package ] [ object ] [ method ] [ explanation ]

Non Commenting Source Statements (NCSS)

Statements for JavaNCSS are not statements as specified in the Java Language Specification but include all kinds of declarations too. Roughly spoken, NCSS is approximately equivalent to counting ';' and '{' characters in Java source files.

Not counted are empty statements, empty blocks or semicolons after closing brackets. Of course, comments don't get counted too. Closing brackets also never get counted, the same applies to blocks in general.

Examples
Package declarationpackage java.lang;
Import declarationimport java.awt.*;
Class declaration
  • public class Foo {
  • public class Foo extends Bla {
Interface declarationpublic interface Able ; {
Field declaration
  • int a;
  • int a, b, c = 5, d = 6;
Method declaration
  • public void cry();
  • public void gib() throws DeadException {
Constructor declarationpublic Foo() {
Constructor invocation
  • this();
  • super();
Statement declaration
  • i = 0;
  • if (ok)
  • if (exit) {
  • if (3 == 4);
  • if (4 == 4) { ;
  • } else {
Label declarationfine :

In some cases consecutive semicolons are illegal according to the JLS but JavaNCSS still tolerates them (thought JavaNCSS is still more strict as 'javac'). Nevertheless they are never counted as two statements.

Cyclomatic Complexity Number (CCN)

CCN is also know as McCabe Metric. There exists a much hyped theory behind it based on graph theory, but it all comes down to simply counting 'if', 'for', 'while' statements etc. in a method. Whenever the control flow of a method splits, the "CCN counter" gets incremented by one.

Each method has a minimum value of 1 per default. For each of the following Java keywords/statements this value gets incremented by one:

  • if
  • for
  • while
  • case
  • catch

Also if the control flow of a method returns abortively the CCNvalue will be incremented by one:

  • if
  • for

An ordinary return at the end of method will not be counted.

Note that 'else', 'default', and 'finally' don't increment the CCN value any further. On the other hand, a simple method with a 'switch' statement and a huge block of 'case' statements can have a surprisingly high CCN value (still it has the same value when converting a 'switch' block to an equivalent sequence of 'if' statements).