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.document 15 137 765 35 303 8 468
gov.nist.secauto.decima.xml.assessment.result 3 34 254 12 100 20 103
gov.nist.secauto.decima.xml.service 8 19 146 7 39 3 228
gov.nist.secauto.decima.xml.document.context 3 27 145 9 65 4 103
gov.nist.secauto.decima.xml.jdom2.saxon.xpath 3 14 137 1 14 7 103
gov.nist.secauto.decima.xml.requirement 1 12 134 4 50 3 53
gov.nist.secauto.decima.xml.jdom2 2 14 86 6 67 3 78
gov.nist.secauto.decima.xml.util 2 7 56 6 39 0 78
gov.nist.secauto.decima.xml.service.extension 2 5 41 0 0 2 79
Classes total Methods total NCSS total Javadocs Javadoc lines Single lines comment Multi lines comment
39 269 1764 80 677 50 1293

Objects

Objects

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

TOP 30 classes containing the most NCSS.

Object NCSS Methods Classes Javadocs
gov.nist.secauto.decima.xml.document.context.DefaultXMLContextResolver 107 17 0 4
gov.nist.secauto.decima.xml.assessment.result.XMLResultBuilder 104 11 0 2
gov.nist.secauto.decima.xml.document.DefaultXMLDocumentFactory 102 18 2 1
gov.nist.secauto.decima.xml.assessment.result.ReportGenerator 98 22 0 10
gov.nist.secauto.decima.xml.requirement.XMLRequirementsParser 94 12 0 4
gov.nist.secauto.decima.xml.document.JDOMDocument 83 16 0 5
gov.nist.secauto.decima.xml.document.CompositeXMLDocument 73 10 1 2
gov.nist.secauto.decima.xml.jdom2.saxon.xpath.CompiledXPath 70 6 1 1
gov.nist.secauto.decima.xml.document.AbstractXPathEvaluator 64 17 0 8
gov.nist.secauto.decima.xml.document.XPathNamespaceContext 61 9 0 2
gov.nist.secauto.decima.xml.document.XMLDocumentFragment 58 13 1 1
gov.nist.secauto.decima.xml.service.ResourceResolverExtensionService 48 5 0 4
gov.nist.secauto.decima.xml.document.AbstractJDOMDocument 42 17 0 0
gov.nist.secauto.decima.xml.jdom2.NamespaceUtil 38 7 0 4
gov.nist.secauto.decima.xml.util.XSLTransformer 28 5 0 3
gov.nist.secauto.decima.xml.jdom2.JDOMUtil 23 7 0 2
gov.nist.secauto.decima.xml.service.extension.Evaluate 22 4 1 0
gov.nist.secauto.decima.xml.jdom2.saxon.xpath.SaxonCompiledXPath 21 4 0 0
gov.nist.secauto.decima.xml.document.SimpleXPathContext 20 6 0 1
gov.nist.secauto.decima.xml.document.XPathCondition 18 4 0 0
gov.nist.secauto.decima.xml.document.JDOMBasedXPathEvaluator 17 5 0 0
gov.nist.secauto.decima.xml.service.CompositeLSResourceResolver 14 2 0 0
gov.nist.secauto.decima.xml.jdom2.saxon.xpath.SaxonXPathFactory 12 4 0 0
gov.nist.secauto.decima.xml.service.TransformerExtensionService 12 3 0 3
gov.nist.secauto.decima.xml.document.XPathEvaluator 11 10 0 7
gov.nist.secauto.decima.xml.document.context.UnknownLocated 11 5 0 0
gov.nist.secauto.decima.xml.service.CompositeEntityResolver 11 2 0 0
gov.nist.secauto.decima.xml.service.AbstractCatalogResourceResolverExtension 9 3 0 0
gov.nist.secauto.decima.xml.document.XMLDocument 8 7 0 7
gov.nist.secauto.decima.xml.util.ExtendedXSLTransformer 7 2 0 3

TOP 30 classes containing the most methods.

Object NCSS Methods Classes Javadocs
gov.nist.secauto.decima.xml.assessment.result.ReportGenerator 98 22 0 10
gov.nist.secauto.decima.xml.document.DefaultXMLDocumentFactory 102 18 2 1
gov.nist.secauto.decima.xml.document.AbstractJDOMDocument 42 17 0 0
gov.nist.secauto.decima.xml.document.AbstractXPathEvaluator 64 17 0 8
gov.nist.secauto.decima.xml.document.context.DefaultXMLContextResolver 107 17 0 4
gov.nist.secauto.decima.xml.document.JDOMDocument 83 16 0 5
gov.nist.secauto.decima.xml.document.XMLDocumentFragment 58 13 1 1
gov.nist.secauto.decima.xml.requirement.XMLRequirementsParser 94 12 0 4
gov.nist.secauto.decima.xml.assessment.result.XMLResultBuilder 104 11 0 2
gov.nist.secauto.decima.xml.document.CompositeXMLDocument 73 10 1 2
gov.nist.secauto.decima.xml.document.XPathEvaluator 11 10 0 7
gov.nist.secauto.decima.xml.document.XPathNamespaceContext 61 9 0 2
gov.nist.secauto.decima.xml.document.XMLDocument 8 7 0 7
gov.nist.secauto.decima.xml.jdom2.JDOMUtil 23 7 0 2
gov.nist.secauto.decima.xml.jdom2.NamespaceUtil 38 7 0 4
gov.nist.secauto.decima.xml.document.SimpleXPathContext 20 6 0 1
gov.nist.secauto.decima.xml.jdom2.saxon.xpath.CompiledXPath 70 6 1 1
gov.nist.secauto.decima.xml.document.JDOMBasedXPathEvaluator 17 5 0 0
gov.nist.secauto.decima.xml.document.context.UnknownLocated 11 5 0 0
gov.nist.secauto.decima.xml.document.context.XMLContextResolver 6 5 0 5
gov.nist.secauto.decima.xml.service.ResourceResolverExtensionService 48 5 0 4
gov.nist.secauto.decima.xml.util.XSLTransformer 28 5 0 3
gov.nist.secauto.decima.xml.document.XPathCondition 18 4 0 0
gov.nist.secauto.decima.xml.jdom2.saxon.xpath.SaxonCompiledXPath 21 4 0 0
gov.nist.secauto.decima.xml.jdom2.saxon.xpath.SaxonXPathFactory 12 4 0 0
gov.nist.secauto.decima.xml.service.extension.Evaluate 22 4 1 0
gov.nist.secauto.decima.xml.document.XMLDocumentFactory 4 3 0 0
gov.nist.secauto.decima.xml.service.AbstractCatalogResourceResolverExtension 9 3 0 0
gov.nist.secauto.decima.xml.service.TransformerExtensionService 12 3 0 3
gov.nist.secauto.decima.xml.service.CompositeEntityResolver 11 2 0 0

Averages.

NCSS average Program NCSS Classes average Methods average Javadocs average
33.69 1,764.00 0.15 6.90 2.05

Methods

Methods

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

TOP 30 Methods containing the most NCSS.

Methods NCSS CCN Javadocs
gov.nist.secauto.decima.xml.assessment.result.ReportGenerator.generate(Source,Result) 26 9 1
gov.nist.secauto.decima.xml.assessment.result.XMLResultBuilder.buildTestResult(TestResult,DerivedRequirement,Namespace,String) 26 8 0
gov.nist.secauto.decima.xml.document.context.DefaultXMLContextResolver.buildXPathElement(StringBuilder,Element) 23 6 0
gov.nist.secauto.decima.xml.document.CompositeXMLDocument.initializeDelegate(XMLDocument) 19 8 0
gov.nist.secauto.decima.xml.document.context.DefaultXMLContextResolver.getXPath(Content) 19 7 0
gov.nist.secauto.decima.xml.assessment.result.XMLResultBuilder.buildSubjects(Element,AssessmentResults) 16 3 0
gov.nist.secauto.decima.xml.requirement.XMLRequirementsParser.parseRequirement(Element,Specification,URI) 16 4 0
gov.nist.secauto.decima.xml.service.ResourceResolverExtensionService.getEntityResolver() 16 6 1
gov.nist.secauto.decima.xml.service.ResourceResolverExtensionService.getLSResolver() 16 6 1
gov.nist.secauto.decima.xml.document.DefaultXMLDocumentFactory.loadURLInternal(URL) 14 4 0
gov.nist.secauto.decima.xml.document.XPathNamespaceContext.getPrefixes(String) 14 4 0
gov.nist.secauto.decima.xml.document.DefaultXMLDocumentFactory.load(URL,File) 13 6 0
gov.nist.secauto.decima.xml.requirement.XMLRequirementsParser.parseRequirements(Document,URI,RequirementAppender) 13 4 0
gov.nist.secauto.decima.xml.assessment.result.XMLResultBuilder.newDocument(AssessmentResults) 12 2 1
gov.nist.secauto.decima.xml.document.AbstractXPathEvaluator.getContext(String) 12 4 0
gov.nist.secauto.decima.xml.jdom2.saxon.xpath.SaxonCompiledXPath.wrap(Object) 12 4 0
gov.nist.secauto.decima.xml.requirement.XMLRequirementsParser.parseMetadata(Element,AbstractRequirement) 12 4 0
gov.nist.secauto.decima.xml.util.XSLTransformer.resolve(String,String) 12 7 0
gov.nist.secauto.decima.xml.document.context.DefaultXMLContextResolver.buildXPathAttribute(StringBuilder,Attribute) 11 2 0
gov.nist.secauto.decima.xml.document.context.DefaultXMLContextResolver.getLocated(Content) 11 3 0
gov.nist.secauto.decima.xml.jdom2.NamespaceUtil.lookupOrUseGeneratedNamespace(Element,String,String,boolean) 11 5 1
gov.nist.secauto.decima.xml.document.JDOMDocument.loadDocumentFromInputStream(InputStream,String,SAXEngine) 10 5 0
gov.nist.secauto.decima.xml.document.XPathCondition.appliesTo(XMLDocument) 10 6 0
gov.nist.secauto.decima.xml.service.extension.Evaluate.FunctionCall.call(XPathContext,Sequence[]) 10 4 0
gov.nist.secauto.decima.xml.assessment.result.XMLResultBuilder.buildBaseRequirement(BaseRequirementResult,Namespace,String) 9 2 0
gov.nist.secauto.decima.xml.assessment.result.XMLResultBuilder.buildDerivedRequirement(DerivedRequirementResult,Namespace,String) 9 2 0
gov.nist.secauto.decima.xml.document.CompositeXMLDocument.CompositeXMLContextResolver.getSystemId(Content) 9 3 0
gov.nist.secauto.decima.xml.document.DefaultXMLDocumentFactory.CyclePreventingDocumentResolver.resolve(URL) 9 5 0
gov.nist.secauto.decima.xml.document.JDOMDocument.JDOMDocument(File,SAXEngine) 9 5 1
gov.nist.secauto.decima.xml.document.JDOMDocument.JDOMDocument(File,URL,SAXEngine) 9 5 1

Averages.

Program NCSS NCSS average CCN average Javadocs average
1,764.00 4.10 1.72 0.25

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