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

Packages

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

Packages sorted by NCSS.

Package Classes Methods NCSS Javadocs Javadoc lines Single lines comment Multi lines comment
fr.lip6.move.pnml.todot 5 25 494 30 252 31 214
fr.lip6.move.pnml.todot.processors 5 48 384 53 255 12 144
fr.lip6.move.pnml.todot.utils 7 28 189 30 199 2 281
fr.lip6.move.pnml.todot.exceptions 5 21 62 21 123 0 145
fr.lip6.move.pnml.todot.client 2 3 58 3 15 3 45
Classes total Methods total NCSS total Javadocs Javadoc lines Single lines comment Multi lines comment
24 125 1187 137 844 48 829

Objects

Objects

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

TOP 30 classes containing the most NCSS.

Object NCSS Methods Classes Javadocs
fr.lip6.move.pnml.todot.Transform2dot 125 9 0 10
fr.lip6.move.pnml.todot.processors.PTProcessor 111 16 0 17
fr.lip6.move.pnml.todot.processors.SNProcessor 109 14 0 15
fr.lip6.move.pnml.todot.ConcurrentTransform2dot 91 4 0 5
fr.lip6.move.pnml.todot.PNMLtoDotServiceMain 85 7 0 8
fr.lip6.move.pnml.todot.processors.CoreProcessor 82 11 0 12
fr.lip6.move.pnml.todot.ConcurrentPNMLtoDotServiceMain 61 3 0 4
fr.lip6.move.pnml.todot.utils.ConcurrentTransformationTimer 51 2 1 3
fr.lip6.move.pnml.todot.utils.CLOptions 47 14 0 15
fr.lip6.move.pnml.todot.client.ConcurrentValidationClient 46 2 1 3
fr.lip6.move.pnml.todot.utils.ConcurrentLogger 33 2 0 3
fr.lip6.move.pnml.todot.PNMLtoDot 28 2 0 3
fr.lip6.move.pnml.todot.processors.Processor 20 5 0 6
fr.lip6.move.pnml.todot.exceptions.ServerException 17 5 0 1
fr.lip6.move.pnml.todot.utils.MessageUtility 16 3 0 4
fr.lip6.move.pnml.todot.processors.MainProcessor 14 2 0 3
fr.lip6.move.pnml.todot.utils.ConcurrentTransformationTimer.ActionListener 13 1 0 0
fr.lip6.move.pnml.todot.exceptions.InternalException 10 4 0 5
fr.lip6.move.pnml.todot.exceptions.InvalidFileException 10 4 0 5
fr.lip6.move.pnml.todot.exceptions.InvalidFileTypeException 10 4 0 5
fr.lip6.move.pnml.todot.exceptions.TransformationException 10 4 0 5
fr.lip6.move.pnml.todot.utils.UnHandledType 10 4 0 5
fr.lip6.move.pnml.todot.utils.HTTPStatusCodes 5 2 0 0
fr.lip6.move.pnml.todot.client.ConcurrentValidationClient.Runnable 2 1 0 0

TOP 30 classes containing the most methods.

Object NCSS Methods Classes Javadocs
fr.lip6.move.pnml.todot.processors.PTProcessor 111 16 0 17
fr.lip6.move.pnml.todot.processors.SNProcessor 109 14 0 15
fr.lip6.move.pnml.todot.utils.CLOptions 47 14 0 15
fr.lip6.move.pnml.todot.processors.CoreProcessor 82 11 0 12
fr.lip6.move.pnml.todot.Transform2dot 125 9 0 10
fr.lip6.move.pnml.todot.PNMLtoDotServiceMain 85 7 0 8
fr.lip6.move.pnml.todot.exceptions.ServerException 17 5 0 1
fr.lip6.move.pnml.todot.processors.Processor 20 5 0 6
fr.lip6.move.pnml.todot.ConcurrentTransform2dot 91 4 0 5
fr.lip6.move.pnml.todot.exceptions.InternalException 10 4 0 5
fr.lip6.move.pnml.todot.exceptions.InvalidFileException 10 4 0 5
fr.lip6.move.pnml.todot.exceptions.InvalidFileTypeException 10 4 0 5
fr.lip6.move.pnml.todot.exceptions.TransformationException 10 4 0 5
fr.lip6.move.pnml.todot.utils.UnHandledType 10 4 0 5
fr.lip6.move.pnml.todot.ConcurrentPNMLtoDotServiceMain 61 3 0 4
fr.lip6.move.pnml.todot.utils.MessageUtility 16 3 0 4
fr.lip6.move.pnml.todot.client.ConcurrentValidationClient 46 2 1 3
fr.lip6.move.pnml.todot.PNMLtoDot 28 2 0 3
fr.lip6.move.pnml.todot.processors.MainProcessor 14 2 0 3
fr.lip6.move.pnml.todot.utils.ConcurrentLogger 33 2 0 3
fr.lip6.move.pnml.todot.utils.ConcurrentTransformationTimer 51 2 1 3
fr.lip6.move.pnml.todot.utils.HTTPStatusCodes 5 2 0 0
fr.lip6.move.pnml.todot.client.ConcurrentValidationClient.Runnable 2 1 0 0
fr.lip6.move.pnml.todot.utils.ConcurrentTransformationTimer.ActionListener 13 1 0 0

Averages.

NCSS average Program NCSS Classes average Methods average Javadocs average
41.92 1,187.00 0.08 5.21 5.71

Methods

Methods

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

TOP 30 Methods containing the most NCSS.

Methods NCSS CCN Javadocs
fr.lip6.move.pnml.todot.ConcurrentTransform2dot.call() 58 9 1
fr.lip6.move.pnml.todot.client.ConcurrentValidationClient.main(String[]) 39 10 1
fr.lip6.move.pnml.todot.utils.ConcurrentTransformationTimer.run() 36 7 1
fr.lip6.move.pnml.todot.ConcurrentPNMLtoDotServiceMain.listen(String[],File,File) 31 11 1
fr.lip6.move.pnml.todot.Transform2dot.transform(String) 31 25 1
fr.lip6.move.pnml.todot.PNMLtoDot.main(String[]) 25 8 1
fr.lip6.move.pnml.todot.PNMLtoDotServiceMain.standalone(String) 25 8 1
fr.lip6.move.pnml.todot.Transform2dot.checkFileDeduceOutput(String) 25 15 1
fr.lip6.move.pnml.todot.PNMLtoDotServiceMain.parseArgs(String[]) 23 11 1
fr.lip6.move.pnml.todot.Transform2dot.writeTransformationMessage() 22 5 1
fr.lip6.move.pnml.todot.ConcurrentPNMLtoDotServiceMain.main(String[]) 21 11 1
fr.lip6.move.pnml.todot.processors.CoreProcessor.processPages(PageHLAPI) 20 7 1
fr.lip6.move.pnml.todot.processors.PTProcessor.processPages(PageHLAPI) 20 7 1
fr.lip6.move.pnml.todot.processors.SNProcessor.processPages(PageHLAPI) 19 7 1
fr.lip6.move.pnml.todot.processors.SNProcessor.processNode(NodeHLAPI,String,StringBuffer) 15 5 1
fr.lip6.move.pnml.todot.Transform2dot.determineNetType() 14 5 1
fr.lip6.move.pnml.todot.utils.ConcurrentLogger.ConcurrentLogger(String,LogRecord) 14 5 1
fr.lip6.move.pnml.todot.utils.ConcurrentTransformationTimer.ActionListener.actionPerformed(ActionEvent) 13 5 0
fr.lip6.move.pnml.todot.processors.PTProcessor.processNode(NodeHLAPI,String,StringBuffer) 12 5 1
fr.lip6.move.pnml.todot.processors.SNProcessor.processNets(PetriNetHLAPI) 12 2 1
fr.lip6.move.pnml.todot.processors.CoreProcessor.processNets(PetriNetHLAPI) 11 2 1
fr.lip6.move.pnml.todot.processors.MainProcessor.getProcessor(HLAPIRootClass) 11 6 1
fr.lip6.move.pnml.todot.processors.PTProcessor.processNets(PetriNetHLAPI) 11 2 1
fr.lip6.move.pnml.todot.PNMLtoDotServiceMain.checkArgs(CLOptions) 10 14 1
fr.lip6.move.pnml.todot.utils.ConcurrentLogger.run() 10 3 1
fr.lip6.move.pnml.todot.ConcurrentTransform2dot.ConcurrentTransform2dot(Socket,File,LogRecord) 9 2 1
fr.lip6.move.pnml.todot.ConcurrentTransform2dot.appendDotFile(StringBuffer) 9 4 1
fr.lip6.move.pnml.todot.processors.CoreProcessor.processNode(NodeHLAPI,String,StringBuffer) 9 3 1
fr.lip6.move.pnml.todot.processors.PTProcessor.extractMarking(PlaceHLAPI) 9 4 1
fr.lip6.move.pnml.todot.processors.PTProcessor.processArc(ArcHLAPI) 8 1 1

Averages.

Program NCSS NCSS average CCN average Javadocs average
1,187.00 7.18 2.74 0.93

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