JavaNCSS Metric Results

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

The following document contains the results of a JavaNCSS metric analysis.
JavaNCSS web site.

Packages

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

Packages sorted by NCSS.

PackageClassesMethodsNCSSJavadocsJavadoc linesSingle lines commentMulti lines comment
net.sf.jsefa.xml.lowlevel1082741522599226
net.sf.jsefa.xml866627332040123
net.sf.jsefa.xml.annotation4405499712634
net.sf.jsefa.rbf54843033179183
net.sf.jsefa.common.converter1362409583330276
net.sf.jsefa.common.validator1559319412150256
net.sf.jsefa.common.annotation934314382822256
net.sf.jsefa.common.mapping1360308563420260
net.sf.jsefa.xml.mapping1749297463290313
net.sf.jsefa.common.validator.traversal528285626075
net.sf.jsefa.rbf.annotation32724713870101
net.sf.jsefa.csv.lowlevel62524218102096
net.sf.jsefa.rbf.lowlevel43721836151060
net.sf.jsefa.common.lowlevel.io21718318101347
net.sf.jsefa.xml.namespace525179211720106
net.sf.jsefa.common.config521171221280139
net.sf.jsefa.flr62013119129198
net.sf.jsefa.csv61912119134293
net.sf.jsefa.csv.annotation251085340221
net.sf.jsefa.flr.annotation251085330234
net.sf.jsefa.rbf.mapping1122108241600201
net.sf.jsefa72999331730118
net.sf.jsefa.common.util313991074088
net.sf.jsefa.flr.lowlevel71593181050117
net.sf.jsefa.common.accessor511861586078
net.sf.jsefa.xml.lowlevel.model102682351860171
net.sf.jsefa.csv.config2208120114069
net.sf.jsefa.csv.lowlevel.config4138115750123
net.sf.jsefa.xml.config216771690057
net.sf.jsefa.xml.lowlevel.config29631157051
net.sf.jsefa.common.lowlevel6185723126093
net.sf.jsefa.common.validator.provider1954746015
net.sf.jsefa.common.converter.provider11045965115
net.sf.jsefa.common.lowlevel.filter48421154074
net.sf.jsefa.flr.config2840845048
net.sf.jsefa.rbf.lowlevel.config28381157038
net.sf.jsefa.rbf.config112331155023
net.sf.jsefa.xml.mapping.support2525634045
net.sf.jsefa.flr.mapping1524638015
net.sf.jsefa.common.lowlevel.config2522845036
net.sf.jsefa.csv.mapping1316427015
net.sf.jsefa.flr.lowlevel.config2315420033
Classes totalMethods totalNCSS totalJavadocsJavadoc linesSingle lines commentMulti lines comment
21899772678535043215220

Objects

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

TOP 30 classes containing the most NCSS.

ObjectNCSSMethodsClassesJavadocs
net.sf.jsefa.xml.annotation.XmlTypeMappingFactory2873504
net.sf.jsefa.xml.XmlDeserializerImpl2012506
net.sf.jsefa.rbf.annotation.RbfTypeMappingFactory1772206
net.sf.jsefa.xml.lowlevel.XmlPullBasedXmlLowLevelSerializer1701502
net.sf.jsefa.rbf.RbfDeserializerImpl16619011
net.sf.jsefa.xml.XmlSerializerImpl1631816
net.sf.jsefa.common.lowlevel.io.LineSegmentReader15412112
net.sf.jsefa.xml.lowlevel.StaxBasedXmlLowLevelDeserializer14914011
net.sf.jsefa.xml.lowlevel.StaxBasedXmlLowLevelSerializer14115012
net.sf.jsefa.xml.lowlevel.XmlPullBasedXmlLowLevelDeserializer1381402
net.sf.jsefa.rbf.lowlevel.RbfLowLevelDeserializerImpl13319017
net.sf.jsefa.csv.lowlevel.CsvLowLevelDeserializerImpl111703
net.sf.jsefa.rbf.RbfSerializerImpl1061509
net.sf.jsefa.xml.namespace.NamespaceManager10013010
net.sf.jsefa.common.config.Configuration9116117
net.sf.jsefa.common.annotation.TypeMappingFactory8920121
net.sf.jsefa.xml.XmlReaderFactory88713
net.sf.jsefa.common.validator.traversal.TraversingComplexValueValidator811001
net.sf.jsefa.common.util.ReflectionUtil801208
net.sf.jsefa.common.annotation.ValidatorFactory78433
net.sf.jsefa.rbf.RbfIOFactory781209
net.sf.jsefa.csv.lowlevel.CsvLowLevelSerializerImpl76903
net.sf.jsefa.common.validator.traversal.TraversingValidatorFactory73713
net.sf.jsefa.common.mapping.ComplexTypeMapping701006
net.sf.jsefa.common.converter.XmlDateTimeConverter69717
net.sf.jsefa.csv.config.CsvConfiguration5720119
net.sf.jsefa.common.converter.SimpleListConverter55704
net.sf.jsefa.xml.config.XmlConfiguration5316115
net.sf.jsefa.csv.lowlevel.config.CsvLowLevelConfiguration5213114
net.sf.jsefa.xml.mapping.ElementDescriptor52805

TOP 30 classes containing the most methods.

ObjectNCSSMethodsClassesJavadocs
net.sf.jsefa.xml.annotation.XmlTypeMappingFactory2873504
net.sf.jsefa.xml.XmlDeserializerImpl2012506
net.sf.jsefa.rbf.annotation.RbfTypeMappingFactory1772206
net.sf.jsefa.common.annotation.TypeMappingFactory8920121
net.sf.jsefa.csv.config.CsvConfiguration5720119
net.sf.jsefa.rbf.lowlevel.RbfLowLevelDeserializerImpl13319017
net.sf.jsefa.rbf.RbfDeserializerImpl16619011
net.sf.jsefa.xml.XmlSerializerImpl1631816
net.sf.jsefa.common.config.Configuration9116117
net.sf.jsefa.xml.config.XmlConfiguration5316115
net.sf.jsefa.rbf.RbfSerializerImpl1061509
net.sf.jsefa.xml.lowlevel.StaxBasedXmlLowLevelSerializer14115012
net.sf.jsefa.xml.lowlevel.XmlPullBasedXmlLowLevelSerializer1701502
net.sf.jsefa.xml.lowlevel.StaxBasedXmlLowLevelDeserializer14914011
net.sf.jsefa.xml.lowlevel.XmlPullBasedXmlLowLevelDeserializer1381402
net.sf.jsefa.csv.lowlevel.config.CsvLowLevelConfiguration5213114
net.sf.jsefa.rbf.lowlevel.RbfLowLevelSerializerImpl4813012
net.sf.jsefa.xml.namespace.NamespaceManager10013010
net.sf.jsefa.common.lowlevel.io.LineSegmentReader15412112
net.sf.jsefa.common.util.ReflectionUtil801208
net.sf.jsefa.rbf.config.RbfConfiguration2712011
net.sf.jsefa.rbf.RbfIOFactory781209
net.sf.jsefa.common.converter.provider.SimpleTypeConverterProvider371009
net.sf.jsefa.common.mapping.ComplexTypeMapping701006
net.sf.jsefa.common.validator.traversal.TraversingComplexValueValidator811001
net.sf.jsefa.common.validator.provider.ValidatorProvider44907
net.sf.jsefa.csv.lowlevel.CsvLowLevelSerializerImpl76903
net.sf.jsefa.xml.lowlevel.config.XmlLowLevelConfiguration409110
net.sf.jsefa.common.mapping.MapTypeMapping34805
net.sf.jsefa.DeserializationException36808

Averages.

NCSS averageProgram NCSSClasses averageMethods averageJavadocs average
26.137,267.000.104.573.91

Methods

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

TOP 30 Methods containing the most NCSS.

MethodsNCSSCCNJavadocs
net.sf.jsefa.common.lowlevel.io.LineSegmentReader.read(int,int)56281
net.sf.jsefa.xml.XmlDeserializerImpl.deserializeComplexElement(XmlComplexTypeMapping)49190
net.sf.jsefa.rbf.RbfDeserializerImpl.readSubRecords(Object,RbfComplexTypeMapping)44200
net.sf.jsefa.xml.lowlevel.XmlPullBasedXmlLowLevelSerializer.writeStartElement(QName,QName)38150
net.sf.jsefa.rbf.lowlevel.RbfLowLevelDeserializerImpl.applyFilter()36180
net.sf.jsefa.xml.lowlevel.StaxBasedXmlLowLevelSerializer.writeStartElement(QName,QName)35121
net.sf.jsefa.xml.lowlevel.StaxBasedXmlLowLevelDeserializer.moveToNext()34121
net.sf.jsefa.xml.lowlevel.XmlPullBasedXmlLowLevelDeserializer.moveToNext()34130
net.sf.jsefa.rbf.annotation.RbfTypeMappingFactory.createRecordMappings(Class)3290
net.sf.jsefa.xml.lowlevel.StaxBasedXmlLowLevelDeserializer.current()32131
net.sf.jsefa.xml.XmlSerializerImpl.serializeComplexElement(Object,ElementMapping,XmlComplexTypeMapping)31130
net.sf.jsefa.csv.lowlevel.CsvLowLevelDeserializerImpl.readStringValueUsingEscapeCharacter()30110
net.sf.jsefa.csv.lowlevel.CsvLowLevelDeserializerImpl.readStringValueUsingQuotes(char,char,char)28120
net.sf.jsefa.common.annotation.ValidatorFactory.createContextualValidator(Class,Field,Annotation,Class)27120
net.sf.jsefa.rbf.annotation.RbfTypeMappingFactory.createFieldMappings(Class)2780
net.sf.jsefa.xml.annotation.XmlTypeMappingFactory.createElementMappings(Class,NamespaceManager)2790
net.sf.jsefa.common.converter.XmlDateTimeConverter.toGregorianCalendar(XMLGregorianCalendar)2691
net.sf.jsefa.common.lowlevel.io.LineSegmentReader.fill()2560
net.sf.jsefa.rbf.RbfIOFactory.RbfIOFactory(C)2550
net.sf.jsefa.xml.lowlevel.XmlPullBasedXmlLowLevelSerializer.writeDocTypeDeclaration(QName,String,String)24110
net.sf.jsefa.xml.namespace.QNameParser.parse(String,boolean,NamespaceManager)24141
net.sf.jsefa.common.annotation.TypeMappingFactory.createSimpleTypeConverter(Class,Field,Annotation)2390
net.sf.jsefa.flr.lowlevel.FlrLowLevelDeserializerImpl.trim(String,Align,char)22160
net.sf.jsefa.common.config.Configuration.Defaults.OnDemandObjectProvider$1.get()2030
net.sf.jsefa.xml.lowlevel.StaxBasedXmlLowLevelSerializer.writeDocTypeDeclaration(QName,String,String)2071
net.sf.jsefa.common.validator.traversal.TraversingComplexValueValidator.validate(Object)19111
net.sf.jsefa.rbf.RbfSerializerImpl.writeSubRecords(Object,RbfComplexTypeMapping)1960
net.sf.jsefa.xml.annotation.XmlTypeMappingFactory.createComplexTypeMappingIfAbsent(Class)1950
net.sf.jsefa.xml.mapping.ElementDescriptor.equals(Object)19150
net.sf.jsefa.xml.namespace.NamespaceManager.registerPrefix(String,String)19161

Averages.

Program NCSSNCSS averageCCN averageJavadocs average
7,267.004.882.490.62

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