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.

Package Classes Methods NCSS Javadocs Javadoc lines Single lines comment Multi lines comment
gov.nist.secauto.decima.xml.testing 16 111 761 12 80 31 429
gov.nist.secauto.decima.xml.testing.assertion 14 60 404 5 42 15 379
gov.nist.secauto.decima.xml.testing.services 1 1 7 0 0 0 53
Classes total Methods total NCSS total Javadocs Javadoc lines Single lines comment Multi lines comment
31 172 1172 17 122 46 861

Objects

Objects

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

TOP 30 classes containing the most NCSS.

Object NCSS Methods Classes Javadocs
gov.nist.secauto.decima.xml.testing.AssessmentUnitTestParser 192 21 0 1
gov.nist.secauto.decima.xml.testing.DefaultAssessmentUnitTest 93 8 1 0
gov.nist.secauto.decima.xml.testing.assertion.RemainingAssertion 75 4 2 0
gov.nist.secauto.decima.xml.testing.UnitTestSupport 64 16 0 2
gov.nist.secauto.decima.xml.testing.AssessmentUnitTestBuilder 60 12 0 1
gov.nist.secauto.decima.xml.testing.assertion.AbstractRequirementGroupAssertion 57 8 0 1
gov.nist.secauto.decima.xml.testing.assertion.OverallAssertion 53 4 2 0
gov.nist.secauto.decima.xml.testing.SchematronAssessmentInfo 44 8 0 5
gov.nist.secauto.decima.xml.testing.AssessmentRunNotifierDecorator 36 15 0 1
gov.nist.secauto.decima.xml.testing.StubRequirementsManager 36 5 2 1
gov.nist.secauto.decima.xml.testing.assertion.DerivedRequirementAssertion 23 4 0 0
gov.nist.secauto.decima.xml.testing.DescriptionAdapter 22 6 0 1
gov.nist.secauto.decima.xml.testing.assertion.AbstractFindMatchingDerivedRequirements 22 8 0 0
gov.nist.secauto.decima.xml.testing.assertion.AbstractFindNonMatchingDerivedRequirementsHandler 22 8 0 0
gov.nist.secauto.decima.xml.testing.assertion.BaseRequirementAssertion 18 4 0 0
gov.nist.secauto.decima.xml.testing.assertion.ResultsWalker 15 4 0 1
gov.nist.secauto.decima.xml.testing.assertion.AssertionTracker 13 4 0 3
gov.nist.secauto.decima.xml.testing.assertion.AssertionException 12 5 0 0
gov.nist.secauto.decima.xml.testing.ParserException 11 5 0 0
gov.nist.secauto.decima.xml.testing.AssessmentDescriptionAdapter 9 2 0 0
gov.nist.secauto.decima.xml.testing.AssertionDescriptionAdapter 6 2 0 0
gov.nist.secauto.decima.xml.testing.AssessmentUnitTestBase 6 5 0 0
gov.nist.secauto.decima.xml.testing.TemplateProcessorDescriptionAdapter 6 2 0 0
gov.nist.secauto.decima.xml.testing.assertion.AbstractAssertion 6 2 0 0
gov.nist.secauto.decima.xml.testing.assertion.RequirementHandler 4 3 0 0
gov.nist.secauto.decima.xml.testing.AssessmentUnitTest 3 2 0 0
gov.nist.secauto.decima.xml.testing.assertion.Assertion 3 2 0 0
gov.nist.secauto.decima.xml.testing.services.TestingResourceResolverExtension 3 1 0 0
gov.nist.secauto.decima.xml.testing.DescriptionResolver 2 1 0 0
gov.nist.secauto.decima.xml.testing.UnitTestFileHandler 2 1 0 0

TOP 30 classes containing the most methods.

Object NCSS Methods Classes Javadocs
gov.nist.secauto.decima.xml.testing.AssessmentUnitTestParser 192 21 0 1
gov.nist.secauto.decima.xml.testing.UnitTestSupport 64 16 0 2
gov.nist.secauto.decima.xml.testing.AssessmentRunNotifierDecorator 36 15 0 1
gov.nist.secauto.decima.xml.testing.AssessmentUnitTestBuilder 60 12 0 1
gov.nist.secauto.decima.xml.testing.DefaultAssessmentUnitTest 93 8 1 0
gov.nist.secauto.decima.xml.testing.SchematronAssessmentInfo 44 8 0 5
gov.nist.secauto.decima.xml.testing.assertion.AbstractFindMatchingDerivedRequirements 22 8 0 0
gov.nist.secauto.decima.xml.testing.assertion.AbstractFindNonMatchingDerivedRequirementsHandler 22 8 0 0
gov.nist.secauto.decima.xml.testing.assertion.AbstractRequirementGroupAssertion 57 8 0 1
gov.nist.secauto.decima.xml.testing.DescriptionAdapter 22 6 0 1
gov.nist.secauto.decima.xml.testing.AssessmentUnitTestBase 6 5 0 0
gov.nist.secauto.decima.xml.testing.ParserException 11 5 0 0
gov.nist.secauto.decima.xml.testing.StubRequirementsManager 36 5 2 1
gov.nist.secauto.decima.xml.testing.assertion.AssertionException 12 5 0 0
gov.nist.secauto.decima.xml.testing.assertion.AssertionTracker 13 4 0 3
gov.nist.secauto.decima.xml.testing.assertion.BaseRequirementAssertion 18 4 0 0
gov.nist.secauto.decima.xml.testing.assertion.DerivedRequirementAssertion 23 4 0 0
gov.nist.secauto.decima.xml.testing.assertion.OverallAssertion 53 4 2 0
gov.nist.secauto.decima.xml.testing.assertion.RemainingAssertion 75 4 2 0
gov.nist.secauto.decima.xml.testing.assertion.ResultsWalker 15 4 0 1
gov.nist.secauto.decima.xml.testing.assertion.RequirementHandler 4 3 0 0
gov.nist.secauto.decima.xml.testing.AssertionDescriptionAdapter 6 2 0 0
gov.nist.secauto.decima.xml.testing.AssessmentDescriptionAdapter 9 2 0 0
gov.nist.secauto.decima.xml.testing.AssessmentUnitTest 3 2 0 0
gov.nist.secauto.decima.xml.testing.TemplateProcessorDescriptionAdapter 6 2 0 0
gov.nist.secauto.decima.xml.testing.assertion.AbstractAssertion 6 2 0 0
gov.nist.secauto.decima.xml.testing.assertion.Assertion 3 2 0 0
gov.nist.secauto.decima.xml.testing.DescriptionResolver 2 1 0 0
gov.nist.secauto.decima.xml.testing.UnitTestFileHandler 2 1 0 0
gov.nist.secauto.decima.xml.testing.services.TestingResourceResolverExtension 3 1 0 0

Averages.

NCSS average Program NCSS Classes average Methods average Javadocs average
29.65 1,172.00 0.23 5.55 0.55

Methods

Methods

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

TOP 30 Methods containing the most NCSS.

Methods NCSS CCN Javadocs
gov.nist.secauto.decima.xml.testing.AssessmentUnitTestParser.buildUnitTest(Document,URL) 55 17 0
gov.nist.secauto.decima.xml.testing.AssessmentUnitTestParser.newSchematronHandler(String,Schematron,String) 28 12 0
gov.nist.secauto.decima.xml.testing.assertion.AbstractRequirementGroupAssertion.handleQuanity(XMLDocument,AssessmentResults,AssertionTracker) 23 9 0
gov.nist.secauto.decima.xml.testing.AssessmentUnitTestBuilder.build() 20 7 1
gov.nist.secauto.decima.xml.testing.AssessmentUnitTestParser.buildLogicAssessment(Element) 20 5 0
gov.nist.secauto.decima.xml.testing.DefaultAssessmentUnitTest.execute(RunNotifier) 18 3 0
gov.nist.secauto.decima.xml.testing.UnitTestSupport.processTemplate() 18 11 0
gov.nist.secauto.decima.xml.testing.DefaultAssessmentUnitTest.getDescription() 17 4 0
gov.nist.secauto.decima.xml.testing.DefaultAssessmentUnitTest.processAssertions(AssessmentResults,XMLDocument,RunNotifier) 17 6 0
gov.nist.secauto.decima.xml.testing.assertion.AbstractRequirementGroupAssertion.handleAll(XMLDocument,AssessmentResults,AssertionTracker) 16 4 0
gov.nist.secauto.decima.xml.testing.DefaultAssessmentUnitTest.processTemplate(RunNotifier) 15 5 0
gov.nist.secauto.decima.xml.testing.assertion.RemainingAssertion.FindMatchingDerivedRequirementsHandler.handleBaseRequirementResult(BaseRequirementResult) 13 5 0
gov.nist.secauto.decima.xml.testing.assertion.RemainingAssertion.FindNonMatchingDerivedRequirementsHandler.handleBaseRequirementResult(BaseRequirementResult) 13 5 0
gov.nist.secauto.decima.xml.testing.AssessmentUnitTestParser.buildSchematronAssessment(Element,File) 12 3 0
gov.nist.secauto.decima.xml.testing.SchematronAssessmentInfo.handleParameters(Element) 12 3 0
gov.nist.secauto.decima.xml.testing.DefaultAssessmentUnitTest.processAssessments(XMLDocument,XMLDocument,RunNotifier) 11 2 0
gov.nist.secauto.decima.xml.testing.assertion.DerivedRequirementAssertion.evaluate(XMLDocument,AssessmentResults,AssertionTracker) 10 2 0
gov.nist.secauto.decima.xml.testing.assertion.OverallAssertion.toString() 10 2 0
gov.nist.secauto.decima.xml.testing.assertion.RemainingAssertion.toString() 10 2 0
gov.nist.secauto.decima.xml.testing.AssessmentUnitTestParser.getSchematron(URL) 9 4 0
gov.nist.secauto.decima.xml.testing.assertion.RemainingAssertion.FindMatchingDerivedRequirementsHandler.handleDerivedRequirementResult(BaseRequirementResult,DerivedRequirementResult) 9 2 0
gov.nist.secauto.decima.xml.testing.assertion.RemainingAssertion.FindNonMatchingDerivedRequirementsHandler.handleDerivedRequirementResult(BaseRequirementResult,DerivedRequirementResult) 9 2 0
gov.nist.secauto.decima.xml.testing.assertion.OverallAssertion.FindMatchingDerivedRequirementsHandler.handleBaseRequirementResult(BaseRequirementResult) 8 3 0
gov.nist.secauto.decima.xml.testing.assertion.OverallAssertion.FindNonMatchingDerivedRequirementsHandler.handleBaseRequirementResult(BaseRequirementResult) 8 3 0
gov.nist.secauto.decima.xml.testing.SchematronAssessmentInfo.hashCode() 7 3 0
gov.nist.secauto.decima.xml.testing.SchematronAssessmentInfo.equals(Object) 7 13 0
gov.nist.secauto.decima.xml.testing.AssessmentDescriptionAdapter.getName() 6 1 0
gov.nist.secauto.decima.xml.testing.AssessmentUnitTestParser.getInstance() 6 4 0
gov.nist.secauto.decima.xml.testing.AssessmentUnitTestParser.AssessmentUnitTestParser() 6 1 0
gov.nist.secauto.decima.xml.testing.AssessmentUnitTestParser.parse(URL) 6 3 1

Averages.

Program NCSS NCSS average CCN average Javadocs average
1,172.00 4.11 1.72 0.08

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 declaration package java.lang;
Import declaration import java.awt.*;
Class declaration
  • public class Foo {
  • public class Foo extends Bla {
Interface declaration public interface Able ; {
Field declaration
  • int a;
  • int a, b, c = 5, d = 6;
Method declaration
  • public void cry();
  • public void gib() throws DeadException {
Constructor declaration public Foo() {
Constructor invocation
  • this();
  • super();
Statement declaration
  • i = 0;
  • if (ok)
  • if (exit) {
  • if (3 == 4);
  • if (4 == 4) { ;
  • } else {
Label declaration fine :

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).