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.assessment.schematron 15 68 472 10 97 17 429
gov.nist.secauto.decima.xml.assessment.schema 9 77 373 6 52 11 253
gov.nist.secauto.decima.xml.schematron 9 55 311 4 41 5 256
gov.nist.secauto.decima.xml.assessment 1 18 72 3 35 1 59
gov.nist.secauto.decima.xml.assessment.service 1 1 7 0 0 0 53
Classes total Methods total NCSS total Javadocs Javadoc lines Single lines comment Multi lines comment
35 219 1235 23 225 34 1050

Objects

Objects

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

TOP 30 classes containing the most NCSS.

Object NCSS Methods Classes Javadocs
gov.nist.secauto.decima.xml.schematron.DefaultSchematronCompiler 105 16 0 0
gov.nist.secauto.decima.xml.assessment.schematron.SchematronAssessment 93 11 0 1
gov.nist.secauto.decima.xml.assessment.schema.SchemaAssessment 81 12 1 2
gov.nist.secauto.decima.xml.schematron.DefaultSchematron 79 9 0 1
gov.nist.secauto.decima.xml.assessment.schema.XPathLocatingContentHandler 69 17 1 0
gov.nist.secauto.decima.xml.assessment.schematron.AbstractDerivedRequirementParsingHandler 44 10 0 0
gov.nist.secauto.decima.xml.assessment.schematron.AbstractSVRLHandler 42 9 0 4
gov.nist.secauto.decima.xml.assessment.Factory 39 18 0 3
gov.nist.secauto.decima.xml.assessment.schematron.SVRLParser 39 4 0 2
gov.nist.secauto.decima.xml.assessment.schema.DelegatingXMLFilter 34 16 0 0
gov.nist.secauto.decima.xml.assessment.schema.AssessmentSAXErrorHandler 29 7 0 3
gov.nist.secauto.decima.xml.assessment.schema.AbstractDelegatingContentHandler 28 13 0 0
gov.nist.secauto.decima.xml.assessment.schema.XMLPathLocationAssessmentXMLFilter 25 4 1 0
gov.nist.secauto.decima.xml.assessment.schematron.AbstractIdAwareSVRLHandler 22 4 0 0
gov.nist.secauto.decima.xml.assessment.schematron.ResultGeneratingSVRLHandler 22 4 0 0
gov.nist.secauto.decima.xml.assessment.schema.SAXContext 21 6 0 1
gov.nist.secauto.decima.xml.assessment.schematron.AbstractIdAwareSchematronHandler 19 4 0 2
gov.nist.secauto.decima.xml.assessment.schematron.SingleDerivedRequirementSVRLHandler 19 4 0 0
gov.nist.secauto.decima.xml.schematron.SchematronParser 18 3 0 1
gov.nist.secauto.decima.xml.assessment.schematron.SchematronAssertionEntry 11 3 1 0
gov.nist.secauto.decima.xml.schematron.SchematronCompilationException 11 5 0 0
gov.nist.secauto.decima.xml.schematron.SchematronEvaluationException 11 5 0 0
gov.nist.secauto.decima.xml.schematron.SchematronException 11 5 0 0
gov.nist.secauto.decima.xml.assessment.schematron.DefaultSchematronHandler 9 3 0 0
gov.nist.secauto.decima.xml.assessment.schematron.SingleDerivedRequirementSchematronHandler 9 3 0 0
gov.nist.secauto.decima.xml.schematron.Schematron 8 7 0 1
gov.nist.secauto.decima.xml.assessment.schematron.SVRLHandler 6 5 0 0
gov.nist.secauto.decima.xml.schematron.SchematronHandler 5 4 0 0
gov.nist.secauto.decima.xml.assessment.schema.SAXTestResult 4 1 0 0
gov.nist.secauto.decima.xml.assessment.schematron.DerivedRequirementParsingHandler 3 1 0 0

TOP 30 classes containing the most methods.

Object NCSS Methods Classes Javadocs
gov.nist.secauto.decima.xml.assessment.Factory 39 18 0 3
gov.nist.secauto.decima.xml.assessment.schema.XPathLocatingContentHandler 69 17 1 0
gov.nist.secauto.decima.xml.assessment.schema.DelegatingXMLFilter 34 16 0 0
gov.nist.secauto.decima.xml.schematron.DefaultSchematronCompiler 105 16 0 0
gov.nist.secauto.decima.xml.assessment.schema.AbstractDelegatingContentHandler 28 13 0 0
gov.nist.secauto.decima.xml.assessment.schema.SchemaAssessment 81 12 1 2
gov.nist.secauto.decima.xml.assessment.schematron.SchematronAssessment 93 11 0 1
gov.nist.secauto.decima.xml.assessment.schematron.AbstractDerivedRequirementParsingHandler 44 10 0 0
gov.nist.secauto.decima.xml.assessment.schematron.AbstractSVRLHandler 42 9 0 4
gov.nist.secauto.decima.xml.schematron.DefaultSchematron 79 9 0 1
gov.nist.secauto.decima.xml.assessment.schema.AssessmentSAXErrorHandler 29 7 0 3
gov.nist.secauto.decima.xml.schematron.Schematron 8 7 0 1
gov.nist.secauto.decima.xml.assessment.schema.SAXContext 21 6 0 1
gov.nist.secauto.decima.xml.assessment.schematron.SVRLHandler 6 5 0 0
gov.nist.secauto.decima.xml.schematron.SchematronCompilationException 11 5 0 0
gov.nist.secauto.decima.xml.schematron.SchematronEvaluationException 11 5 0 0
gov.nist.secauto.decima.xml.schematron.SchematronException 11 5 0 0
gov.nist.secauto.decima.xml.assessment.schema.XMLPathLocationAssessmentXMLFilter 25 4 1 0
gov.nist.secauto.decima.xml.assessment.schematron.AbstractIdAwareSVRLHandler 22 4 0 0
gov.nist.secauto.decima.xml.assessment.schematron.AbstractIdAwareSchematronHandler 19 4 0 2
gov.nist.secauto.decima.xml.assessment.schematron.ResultGeneratingSVRLHandler 22 4 0 0
gov.nist.secauto.decima.xml.assessment.schematron.SVRLParser 39 4 0 2
gov.nist.secauto.decima.xml.assessment.schematron.SingleDerivedRequirementSVRLHandler 19 4 0 0
gov.nist.secauto.decima.xml.schematron.SchematronHandler 5 4 0 0
gov.nist.secauto.decima.xml.assessment.schematron.DefaultSchematronHandler 9 3 0 0
gov.nist.secauto.decima.xml.assessment.schematron.SchematronAssertionEntry 11 3 1 0
gov.nist.secauto.decima.xml.assessment.schematron.SingleDerivedRequirementSchematronHandler 9 3 0 0
gov.nist.secauto.decima.xml.schematron.SchematronParser 18 3 0 1
gov.nist.secauto.decima.xml.assessment.schematron.IdAwareSchematronHandler 3 2 0 0
gov.nist.secauto.decima.xml.assessment.schema.SAXLocationXPathResolver 2 1 0 0

Averages.

NCSS average Program NCSS Classes average Methods average Javadocs average
26.51 1,235.00 0.11 6.26 0.66

Methods

Methods

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

TOP 30 Methods containing the most NCSS.

Methods NCSS CCN Javadocs
gov.nist.secauto.decima.xml.schematron.DefaultSchematronCompiler.newSchematron(URL) 56 28 0
gov.nist.secauto.decima.xml.schematron.DefaultSchematron.getCompiledSchematron(String) 32 12 0
gov.nist.secauto.decima.xml.assessment.schematron.SchematronAssessment.process(XMLDocument,AssessmentResultBuilder,File) 24 7 0
gov.nist.secauto.decima.xml.assessment.schematron.SchematronAssessment.executeInternal(XMLDocument,AssessmentResultBuilder) 21 9 0
gov.nist.secauto.decima.xml.schematron.DefaultSchematron.transformInternal(Source,Result,String,String) 21 11 0
gov.nist.secauto.decima.xml.assessment.schematron.SVRLParser.parse(SVRLHandler,Document) 20 7 1
gov.nist.secauto.decima.xml.assessment.schematron.SchematronAssessment.SchematronAssessment(Schematron,String,SchematronHandler) 19 3 1
gov.nist.secauto.decima.xml.assessment.schematron.AbstractSVRLHandler.handleAssertionResult(String,String,TestStatus,String,String) 16 5 0
gov.nist.secauto.decima.xml.assessment.schema.SchemaAssessment.getXMLReaderSchemaFactory() 15 6 0
gov.nist.secauto.decima.xml.assessment.schema.SchemaAssessment.executeInternal(XMLDocument,AssessmentResultBuilder) 15 4 0
gov.nist.secauto.decima.xml.assessment.schema.XPathLocatingContentHandler.XPathContext.buildXPath(String,QName,Integer) 13 2 0
gov.nist.secauto.decima.xml.assessment.schema.SchemaAssessment.getNameDetails() 10 3 0
gov.nist.secauto.decima.xml.assessment.schematron.SVRLParser.parse(SVRLHandler,File,boolean) 10 4 1
gov.nist.secauto.decima.xml.assessment.schema.SchemaAssessment.SchemaAssessment(String,Source) 9 2 1
gov.nist.secauto.decima.xml.assessment.schema.XPathLocatingContentHandler.startElement(String,String,String,Attributes) 9 2 0
gov.nist.secauto.decima.xml.assessment.schema.XPathLocatingContentHandler.getCurrentXPath() 8 2 0
gov.nist.secauto.decima.xml.assessment.schema.XPathLocatingContentHandler.XPathContext.getNewNodeIndex(QName) 8 2 0
gov.nist.secauto.decima.xml.assessment.schematron.AbstractDerivedRequirementParsingHandler.handlePattern(Element) 8 3 0
gov.nist.secauto.decima.xml.assessment.schematron.AbstractDerivedRequirementParsingHandler.handleRule(Element) 8 3 0
gov.nist.secauto.decima.xml.assessment.schematron.AbstractIdAwareSchematronHandler.getAssertionsForPatternId(String) 8 2 1
gov.nist.secauto.decima.xml.assessment.schematron.ResultGeneratingSVRLHandler.handleSuccessfulReport(Element) 8 1 0
gov.nist.secauto.decima.xml.assessment.schematron.ResultGeneratingSVRLHandler.handleFailedAssert(Element) 8 1 0
gov.nist.secauto.decima.xml.assessment.schema.AssessmentSAXErrorHandler.AssessmentSAXErrorHandler(SchemaAssessment,XMLDocument,String,AssessmentResultBuilder,SAXLocationXPathResolver) 7 1 1
gov.nist.secauto.decima.xml.assessment.schema.SAXContext.SAXContext(SAXParseException,String,String) 7 1 1
gov.nist.secauto.decima.xml.assessment.schematron.AbstractIdAwareSVRLHandler.handleActivePattern(Element) 7 4 0
gov.nist.secauto.decima.xml.assessment.schematron.AbstractIdAwareSVRLHandler.handleFiredRule(Element) 7 4 0
gov.nist.secauto.decima.xml.assessment.schematron.AbstractSVRLHandler.AbstractSVRLHandler(XMLDocument,XMLDocument,AssessmentResultBuilder) 7 3 1
gov.nist.secauto.decima.xml.assessment.schematron.SchematronAssessment.getNameDetails() 7 2 0
gov.nist.secauto.decima.xml.schematron.SchematronParser.parseRule(Element,SchematronHandler) 7 4 0
gov.nist.secauto.decima.xml.assessment.schematron.AbstractDerivedRequirementParsingHandler.handleElement(SchematronAssertionEntry.AssertionType,String) 6 3 0

Averages.

Program NCSS NCSS average CCN average Javadocs average
1,235.00 3.51 1.53 0.10

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