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
org.jrobin.core42593315337532298271110
org.jrobin.graph423002779879221081086
org.jrobin.data1312512216054857336
org.jrobin.inspector1289115421257288
org.jrobin.cmd149191787264336
org.jrobin.core.jrrd13938796437948159
org.jrobin.core.timespec53153698812183
org.jrobin.convertor1663217024
Classes totalMethods totalNCSS totalJavadocsJavadoc linesSingle lines commentMulti lines comment
142132810702607526711733522

Objects

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

TOP 30 classes containing the most NCSS.

ObjectNCSSMethodsClassesJavadocs
org.jrobin.graph.RrdGraphDefTemplate5362505
org.jrobin.data.RpnCalculator479920
org.jrobin.graph.RrdGraph3883604
org.jrobin.inspector.RrdInspector32517152
org.jrobin.core.RrdDb32455046
org.jrobin.data.DataProcessor28850036
org.jrobin.core.timespec.TimeParser263703
org.jrobin.core.Util26141133
org.jrobin.graph.RrdGraphDef25871068
org.jrobin.cmd.RrdGraphCmd2471701
org.jrobin.core.RrdDef22938032
org.jrobin.core.RrdToolkit21025021
org.jrobin.core.Datasource20526018
org.jrobin.core.Archive19822014
org.jrobin.core.jrrd.Archive1921608
org.jrobin.core.jrrd.RRDatabase18219018
org.jrobin.inspector.GraphFrame179790
org.jrobin.graph.GifPixelsEncoder1751200
org.jrobin.core.FetchData16433029
org.jrobin.graph.TimeAxis1391000
org.jrobin.core.RrdBackend13129010
org.jrobin.graph.ImageWorker1302200
org.jrobin.core.XmlTemplate12935012
org.jrobin.inspector.EditDatasourceDialog129720
org.jrobin.inspector.EditArchiveDialog121720
org.jrobin.core.jrrd.DataSource1101108
org.jrobin.graph.ValueAxis103210
org.jrobin.graph.LegendComposer102210
org.jrobin.core.Robin9917012
org.jrobin.cmd.RrdCmdScanner971300

TOP 30 classes containing the most methods.

ObjectNCSSMethodsClassesJavadocs
org.jrobin.graph.RrdGraphDef25871068
org.jrobin.core.RrdDb32455046
org.jrobin.data.DataProcessor28850036
org.jrobin.core.Util26141133
org.jrobin.core.RrdDef22938032
org.jrobin.graph.RrdGraph3883604
org.jrobin.core.XmlTemplate12935012
org.jrobin.core.FetchData16433029
org.jrobin.core.RrdBackend13129010
org.jrobin.core.Datasource20526018
org.jrobin.core.RrdToolkit21025021
org.jrobin.graph.RrdGraphDefTemplate5362505
org.jrobin.core.RrdToolReader522300
org.jrobin.core.Archive19822014
org.jrobin.core.DataImporter292200
org.jrobin.graph.ImageWorker1302200
org.jrobin.cmd.RrdToolCmd672100
org.jrobin.core.XmlReader602100
org.jrobin.graph.GifEncoder922100
org.jrobin.core.jrrd.RRDatabase18219018
org.jrobin.cmd.RrdGraphCmd2471701
org.jrobin.core.Header781709
org.jrobin.core.Robin9917012
org.jrobin.core.RrdPrimitive521700
org.jrobin.data.Def481700
org.jrobin.inspector.RrdInspector32517152
org.jrobin.core.jrrd.Archive1921608
org.jrobin.core.jrrd.RRDFile771601
org.jrobin.core.XmlWriter6016015
org.jrobin.core.FetchRequest4914012

Averages.

NCSS averageProgram NCSSClasses averageMethods averageJavadocs average
71.5110,702.000.309.354.27

Methods

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

TOP 30 Methods containing the most NCSS.

MethodsNCSSCCNJavadocs
org.jrobin.data.RpnCalculator.calculateValues()202800
org.jrobin.data.RpnCalculator.createToken(String)167540
org.jrobin.inspector.RrdInspector.constructUI()11410
org.jrobin.graph.RrdGraphDefTemplate.resolveOptions(Node)113380
org.jrobin.cmd.RrdGraphCmd.getGraphDef()101321
org.jrobin.graph.ValueAxis.draw()86280
org.jrobin.core.timespec.TimeParser.day()79420
org.jrobin.core.timespec.TimeParser.parse()71401
org.jrobin.inspector.EditDatasourceDialog.constructUI(DsDef)7030
org.jrobin.inspector.EditArchiveDialog.constructUI(ArcDef)6230
org.jrobin.graph.RrdGraph.expandValueRange()61230
org.jrobin.core.jrrd.Archive.toXml(PrintStream)5280
org.jrobin.graph.GifPixelsEncoder.compress(int,OutputStream)51100
org.jrobin.graph.ValueAxisLogarithmic.draw()50160
org.jrobin.core.timespec.TimeParser.plusMinus(int)49200
org.jrobin.inspector.GraphFrame.createRrdGraph()4680
org.jrobin.graph.TimeAxis.adjustStartingTime(int,int)4490
org.jrobin.core.timespec.TimeScanner.nextToken()42240
org.jrobin.graph.RrdGraphDefTemplate.resolveTimeGrid(Node)41280
org.jrobin.core.Archive.fetchData(FetchRequest)3990
org.jrobin.core.jrrd.RRDatabase.findBestArchive(long,long,long,ArrayList)37120
org.jrobin.inspector.GraphFrame.constructUI()3710
org.jrobin.core.timespec.TimeParser.timeOfDay()36190
org.jrobin.core.RrdDb.findMatchingArchive(FetchRequest)34160
org.jrobin.cmd.RrdXportCmd.xport()3350
org.jrobin.core.Datasource.calculateUpdateValue(long,double,long,double)33190
org.jrobin.cmd.RrdUpdateCmd.execute()31180
org.jrobin.core.RrdDefTemplate.getRrdDef()3171
org.jrobin.core.jrrd.DataSource.toXml(PrintStream)3010
org.jrobin.graph.ValueAxisMrtg.draw()30130

Averages.

Program NCSSNCSS averageCCN averageJavadocs average
10,702.006.552.620.39

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