JavaNCSS Metric Results

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

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

Packages

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

Packages sorted by NCSS.

PackageClassesMethodsNCSSJavadocsJavadoc linesSingle lines commentMulti lines comment
net.sourceforge.jeuclid.elements.presentation.general1714173714240145263
net.sourceforge.jeuclid.elements.support.text8657175625229173
net.sourceforge.jeuclid.elements.presentation.table91076219524433224
net.sourceforge.jeuclid.elements.presentation.script1411060711630814267
net.sourceforge.jeuclid.elements.presentation.token8845928024113213
org.w3c.dom.mathml54401527455380401111
net.sourceforge.jeuclid.converter16595005941033236
net.sourceforge.jeuclid.elements.support.operatordict10374742815014260
net.sourceforge.jeuclid.layout1280451874597225
net.sourceforge.jeuclid.elements67244973362120144
net.sourceforge.jeuclid.elements.support.attributes421430181299235
net.sourceforge.jeuclid.swing6744036736214112
net.sourceforge.jeuclid826237262178157
net.sourceforge.jeuclid.context72120317702210
net.sourceforge.jeuclid.elements.support724178271473103
net.sourceforge.jeuclid.elements.generic6321733184692
net.sourceforge.jeuclid.parser4171659821842
net.sourceforge.jeuclid.context.typewrapper831162391351155
net.sourceforge.jeuclid.ant13014331201747
net.sourceforge.jeuclid.font21711814149057
net.sourceforge.jeuclid.elements.content.semantic216641840261
net.sourceforge.jeuclid.awt1945944544
net.sourceforge.jeuclid.elements.presentation114371527039
net.sourceforge.jeuclid.elements.presentation.enlivening1737821042
Classes totalMethods totalNCSS totalJavadocsJavadoc linesSingle lines commentMulti lines comment
21214958070152083393834512

Objects

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

TOP 30 classes containing the most NCSS.

ObjectNCSSMethodsClassesJavadocs
net.sourceforge.jeuclid.elements.presentation.table.Mtable46368253
net.sourceforge.jeuclid.elements.presentation.token.Mo32845035
net.sourceforge.jeuclid.elements.support.attributes.AttributesHelper2631109
net.sourceforge.jeuclid.elements.AbstractJEuclidElement24251051
net.sourceforge.jeuclid.elements.presentation.script.Mmultiscripts22227025
net.sourceforge.jeuclid.elements.support.text.CharacterMapping1951607
net.sourceforge.jeuclid.layout.JEuclidView17616118
net.sourceforge.jeuclid.elements.support.text.CharConverter163404
net.sourceforge.jeuclid.elements.support.text.StringUtil1548113
net.sourceforge.jeuclid.swing.JMathComponent15342040
net.sourceforge.jeuclid.elements.presentation.general.Mstyle14743144
net.sourceforge.jeuclid.elements.presentation.general.Menclose1378527
net.sourceforge.jeuclid.elements.support.operatordict.OperatorDictionary31369112
net.sourceforge.jeuclid.parser.Parser1311039
net.sourceforge.jeuclid.ant.MathMLConverter12730031
net.sourceforge.jeuclid.swing.MathComponentUI11518113
net.sourceforge.jeuclid.context.LayoutContextImpl110617
net.sourceforge.jeuclid.elements.support.operatordict.StretchOverride105202
net.sourceforge.jeuclid.layout.LayoutInfoImpl10423024
net.sourceforge.jeuclid.elements.support.attributes.MathVariant103809
net.sourceforge.jeuclid.elements.presentation.general.Mfrac9919018
net.sourceforge.jeuclid.elements.presentation.script.AbstractUnderOver8918016
net.sourceforge.jeuclid.elements.support.operatordict.OperatorDictionary286314
net.sourceforge.jeuclid.converter.Converter8511112
net.sourceforge.jeuclid.font.DefaultFontFactory801107
net.sourceforge.jeuclid.elements.support.text.MultiAttributedCharacterIterator7823021
net.sourceforge.jeuclid.elements.JEuclidElementFactory76503
net.sourceforge.jeuclid.DOMBuilder75917
net.sourceforge.jeuclid.elements.generic.MathImpl68718
net.sourceforge.jeuclid.elements.presentation.general.Mfenced6510010

TOP 30 classes containing the most methods.

ObjectNCSSMethodsClassesJavadocs
net.sourceforge.jeuclid.elements.presentation.table.Mtable46368253
net.sourceforge.jeuclid.elements.AbstractJEuclidElement24251051
net.sourceforge.jeuclid.elements.presentation.token.Mo32845035
org.w3c.dom.mathml.MathMLTableElement4544045
net.sourceforge.jeuclid.elements.presentation.general.Mstyle14743144
net.sourceforge.jeuclid.swing.JMathComponent15342040
org.w3c.dom.mathml.MathMLStyleElement3938039
net.sourceforge.jeuclid.ant.MathMLConverter12730031
net.sourceforge.jeuclid.elements.presentation.script.Mmultiscripts22227025
org.w3c.dom.mathml.MathMLOperatorElement2524025
net.sourceforge.jeuclid.elements.support.text.MultiAttributedCharacterIterator7823021
net.sourceforge.jeuclid.layout.LayoutInfoImpl10423024
net.sourceforge.jeuclid.layout.LayoutInfo2322023
org.w3c.dom.mathml.MathMLMultiScriptsElement2322023
net.sourceforge.jeuclid.elements.presentation.general.Mfrac9919018
net.sourceforge.jeuclid.elements.presentation.script.AbstractUnderOver8918016
net.sourceforge.jeuclid.swing.MathComponentUI11518113
net.sourceforge.jeuclid.elements.support.text.CharacterMapping1951607
net.sourceforge.jeuclid.layout.JEuclidView17616118
net.sourceforge.jeuclid.elements.generic.DocumentElement4414015
net.sourceforge.jeuclid.elements.presentation.AbstractContainer2914015
org.w3c.dom.mathml.MathMLContentContainer1514015
org.w3c.dom.mathml.MathMLDeclareElement1514015
org.w3c.dom.mathml.MathMLContainer1413014
org.w3c.dom.mathml.MathMLFractionElement1312013
org.w3c.dom.mathml.MathMLPiecewiseElement1312013
org.w3c.dom.mathml.MathMLTableCellElement1312013
net.sourceforge.jeuclid.converter.Converter8511112
net.sourceforge.jeuclid.elements.presentation.token.Mspace3611012
net.sourceforge.jeuclid.elements.support.attributes.AttributesHelper2631109

Averages.

NCSS averageProgram NCSSClasses averageMethods averageJavadocs average
33.898,070.000.127.057.33

Methods

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

TOP 30 Methods containing the most NCSS.

MethodsNCSSCCNJavadocs
net.sourceforge.jeuclid.context.LayoutContextImpl.LayoutContextImpl()8711
net.sourceforge.jeuclid.elements.presentation.token.Mo.layoutStage2(LayoutView,LayoutInfo,LayoutContext)55121
net.sourceforge.jeuclid.elements.presentation.general.AbstractRoot.layoutStageInvariant(LayoutView,LayoutInfo,LayoutStage,LayoutContext)4431
net.sourceforge.jeuclid.elements.presentation.table.Mtable.VAlign.parseString(String)35111
net.sourceforge.jeuclid.elements.presentation.token.Mo.calcYScaleFactorAndBaselineShift(LayoutInfo,LayoutInfo,TextLayoutInfo,LayoutContext,Graphics2D)3540
net.sourceforge.jeuclid.elements.presentation.table.Mtable.layoutStageInvariant(LayoutView,LayoutInfo,LayoutStage,LayoutContext)3421
net.sourceforge.jeuclid.elements.support.operatordict.OperatorDictionary3.intToSpace(String)33101
net.sourceforge.jeuclid.elements.support.attributes.AttributesHelper.convertSizeToPt(String,LayoutContext,String)3291
net.sourceforge.jeuclid.elements.presentation.script.AbstractUnderOver.layoutUnderOver(LayoutView,LayoutInfo,LayoutStage,LayoutContext)3150
net.sourceforge.jeuclid.elements.presentation.table.Mtable.getVAlign(JEuclidElement,int)3180
net.sourceforge.jeuclid.elements.presentation.token.Mo.layoutStage1(LayoutView,LayoutInfo,LayoutStage,LayoutContext)3161
net.sourceforge.jeuclid.elements.support.text.StringUtil.textContentAsAttributedCharacterIterator(LayoutContext,JEuclidElement,Node,float)3161
net.sourceforge.jeuclid.elements.presentation.script.Mmultiscripts.parseChildren()3080
net.sourceforge.jeuclid.elements.presentation.table.Mtable.getHAlign(JEuclidElement,int)3090
net.sourceforge.jeuclid.elements.support.text.StringUtil.convertStringtoAttributedString(String,MathVariant,float,LayoutContext)2991
net.sourceforge.jeuclid.layout.JEuclidView.replaceNodes(DocumentElement,Node,Node)2861
net.sourceforge.jeuclid.elements.presentation.script.Mmultiscripts.layoutStageInvariant(LayoutView,LayoutInfo,LayoutStage,LayoutContext)2631
net.sourceforge.jeuclid.ant.MathMLConverter.execute()25101
net.sourceforge.jeuclid.elements.support.attributes.AttributesHelper.parseWithHash(String)25101
net.sourceforge.jeuclid.elements.presentation.general.Mfenced.createDelegates()2461
net.sourceforge.jeuclid.elements.presentation.table.Mtable.stretchAndAlignMtds(LayoutView,LayoutableNode[],LayoutInfo[],int,LayoutStage)2470
net.sourceforge.jeuclid.DOMBuilder.createJeuclidDom(Node,boolean,boolean)2391
net.sourceforge.jeuclid.elements.presentation.general.Mstyle.StyleLayoutContext.applyScriptlevel(Object)2370
net.sourceforge.jeuclid.elements.support.attributes.AttributesHelper.colorTOsRGBString(Color)2381
net.sourceforge.jeuclid.elements.support.operatordict.OperatorDictionary3.extractValuesFromDocument(Document,XPath,String)2331
net.sourceforge.jeuclid.parser.Parser.parse(Source)2361
net.sourceforge.jeuclid.elements.support.attributes.AttributesHelper.parseRelativeSize(String,LayoutContext,float)2271
net.sourceforge.jeuclid.elements.support.text.CharacterMapping.parseFontFamily(String)2280
net.sourceforge.jeuclid.layout.JEuclidView.layout(LayoutableNode,LayoutStage,LayoutContext)2280
net.sourceforge.jeuclid.ant.MathMLConverter.process(File,String,File)2171

Averages.

Program NCSSNCSS averageCCN averageJavadocs average
8,070.003.781.640.89

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