Fork me on GitHub

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
info.mikethomas.fahview.v6project.model 9 213 1039 222 801 101 974
info.mikethomas.fahview.v6project 5 18 238 34 103 13 133
info.mikethomas.fahview.v6project.panels 2 22 152 24 118 23 46
info.mikethomas.fahview.v6project.utilities 4 23 142 27 159 29 59
info.mikethomas.fahview.v6project.nodes 3 3 133 6 21 0 60
info.mikethomas.fahview.v6project.files.config 2 19 73 21 51 4 60
info.mikethomas.fahview.v6project.files.queue 2 19 73 21 51 4 60
info.mikethomas.fahview.v6project.properties 2 5 36 7 25 5 42
Classes total Methods total NCSS total Javadocs Javadoc lines Single lines comment Multi lines comment
29 322 1886 362 1329 179 1434

Objects

Objects

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

TOP 30 classes containing the most NCSS.

Object NCSS Methods Classes Javadocs
info.mikethomas.fahview.v6project.model.QueueIndexImpl 385 74 0 75
info.mikethomas.fahview.v6project.model.Core 147 10 0 11
info.mikethomas.fahview.v6project.model.QueueIndex 134 37 0 38
info.mikethomas.fahview.v6project.model.QueueImpl 110 24 0 25
info.mikethomas.fahview.v6project.model.WorkUnitImpl 96 18 0 19
info.mikethomas.fahview.v6project.panels.QueuePanel 85 12 1 13
info.mikethomas.fahview.v6project.ClientProject 53 3 2 10
info.mikethomas.fahview.v6project.panels.QueueTopComponent 53 10 1 11
info.mikethomas.fahview.v6project.WorkProject 53 3 2 9
info.mikethomas.fahview.v6project.model.Client 51 21 0 22
info.mikethomas.fahview.v6project.utilities.QueueReader 47 8 0 9
info.mikethomas.fahview.v6project.utilities.ByteSwapper 44 10 0 11
info.mikethomas.fahview.v6project.model.Queue 43 11 0 12
info.mikethomas.fahview.v6project.files.config.ConfigFileVisualElement 35 16 0 17
info.mikethomas.fahview.v6project.files.queue.QueueFileVisualElement 35 16 0 17
info.mikethomas.fahview.v6project.nodes.WorkNodeFactory 30 1 1 2
info.mikethomas.fahview.v6project.nodes.ClientNodeFactory 29 1 1 2
info.mikethomas.fahview.v6project.nodes.ClientSubProjectNodeFactory 28 1 1 2
info.mikethomas.fahview.v6project.model.User 27 12 0 13
info.mikethomas.fahview.v6project.utilities.LogReader 19 3 0 4
info.mikethomas.fahview.v6project.ClientSubprojectProvider 18 4 0 5
info.mikethomas.fahview.v6project.model.WorkUnit 17 6 0 7
info.mikethomas.fahview.v6project.utilities.ProgressCellRenderer 16 2 0 3
info.mikethomas.fahview.v6project.ClientProjectFactory 13 4 0 5
info.mikethomas.fahview.v6project.WorkProjectFactory 13 4 0 5
info.mikethomas.fahview.v6project.properties.ClientCustomizerProvider 12 2 1 3
info.mikethomas.fahview.v6project.files.config.ConfigFileDataObject 8 3 0 4
info.mikethomas.fahview.v6project.files.queue.QueueFileDataObject 8 3 0 4
info.mikethomas.fahview.v6project.properties.GeneralClientProperties 8 3 0 4

TOP 30 classes containing the most methods.

Object NCSS Methods Classes Javadocs
info.mikethomas.fahview.v6project.model.QueueIndexImpl 385 74 0 75
info.mikethomas.fahview.v6project.model.QueueIndex 134 37 0 38
info.mikethomas.fahview.v6project.model.QueueImpl 110 24 0 25
info.mikethomas.fahview.v6project.model.Client 51 21 0 22
info.mikethomas.fahview.v6project.model.WorkUnitImpl 96 18 0 19
info.mikethomas.fahview.v6project.files.config.ConfigFileVisualElement 35 16 0 17
info.mikethomas.fahview.v6project.files.queue.QueueFileVisualElement 35 16 0 17
info.mikethomas.fahview.v6project.model.User 27 12 0 13
info.mikethomas.fahview.v6project.panels.QueuePanel 85 12 1 13
info.mikethomas.fahview.v6project.model.Queue 43 11 0 12
info.mikethomas.fahview.v6project.model.Core 147 10 0 11
info.mikethomas.fahview.v6project.panels.QueueTopComponent 53 10 1 11
info.mikethomas.fahview.v6project.utilities.ByteSwapper 44 10 0 11
info.mikethomas.fahview.v6project.utilities.QueueReader 47 8 0 9
info.mikethomas.fahview.v6project.model.WorkUnit 17 6 0 7
info.mikethomas.fahview.v6project.ClientProjectFactory 13 4 0 5
info.mikethomas.fahview.v6project.ClientSubprojectProvider 18 4 0 5
info.mikethomas.fahview.v6project.WorkProjectFactory 13 4 0 5
info.mikethomas.fahview.v6project.ClientProject 53 3 2 10
info.mikethomas.fahview.v6project.files.config.ConfigFileDataObject 8 3 0 4
info.mikethomas.fahview.v6project.files.queue.QueueFileDataObject 8 3 0 4
info.mikethomas.fahview.v6project.properties.GeneralClientProperties 8 3 0 4
info.mikethomas.fahview.v6project.utilities.LogReader 19 3 0 4
info.mikethomas.fahview.v6project.WorkProject 53 3 2 9
info.mikethomas.fahview.v6project.properties.ClientCustomizerProvider 12 2 1 3
info.mikethomas.fahview.v6project.utilities.ProgressCellRenderer 16 2 0 3
info.mikethomas.fahview.v6project.nodes.ClientNodeFactory 29 1 1 2
info.mikethomas.fahview.v6project.nodes.ClientSubProjectNodeFactory 28 1 1 2
info.mikethomas.fahview.v6project.nodes.WorkNodeFactory 30 1 1 2

Averages.

NCSS average Program NCSS Classes average Methods average Javadocs average
55.76 1,886.00 0.34 11.10 12.48

Methods

Methods

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

TOP 30 Methods containing the most NCSS.

Methods NCSS CCN Javadocs
info.mikethomas.fahview.v6project.model.Core.setProject() 83 27 1
info.mikethomas.fahview.v6project.model.QueueIndexImpl.getCpuType() 58 18 1
info.mikethomas.fahview.v6project.model.QueueIndexImpl.getOsType() 58 18 1
info.mikethomas.fahview.v6project.panels.QueuePanel.initComponents() 46 1 1
info.mikethomas.fahview.v6project.model.WorkUnitImpl.WorkUnitImpl(int,QueueReader) 38 12 1
info.mikethomas.fahview.v6project.model.Core.Core(int,QueueReader) 37 12 1
info.mikethomas.fahview.v6project.model.QueueIndexImpl.QueueIndexImpl(int,QueueReader) 37 12 1
info.mikethomas.fahview.v6project.model.QueueImpl.toString() 22 1 1
info.mikethomas.fahview.v6project.model.QueueIndexImpl.toString() 18 1 1
info.mikethomas.fahview.v6project.model.QueueIndexImpl.update() 16 1 1
info.mikethomas.fahview.v6project.panels.QueueTopComponent.initComponents() 16 1 1
info.mikethomas.fahview.v6project.panels.QueueTopComponent.componentOpened() 16 2 1
info.mikethomas.fahview.v6project.nodes.WorkNodeFactory.WorkNodeList.keys() 15 5 0
info.mikethomas.fahview.v6project.model.QueueImpl.setIndex() 14 2 1
info.mikethomas.fahview.v6project.nodes.ClientNodeFactory.ClientNodeList.keys() 14 2 0
info.mikethomas.fahview.v6project.ClientSubprojectProvider.getSubprojects() 12 6 1
info.mikethomas.fahview.v6project.model.QueueImpl.update() 12 1 1
info.mikethomas.fahview.v6project.nodes.ClientSubProjectNodeFactory.ReportsNodeList.node(Project) 10 2 0
info.mikethomas.fahview.v6project.utilities.ByteSwapper.swap(long) 10 1 1
info.mikethomas.fahview.v6project.utilities.ProgressCellRenderer.getTableCellRendererComponent(JTable,Object,boolean,boolean,int,int) 10 3 1
info.mikethomas.fahview.v6project.utilities.LogReader.toString() 9 3 1
info.mikethomas.fahview.v6project.ClientProject.ClientProjectLogicalView.createLogicalView() 8 3 1
info.mikethomas.fahview.v6project.model.QueueImpl.setZ7156() 8 4 1
info.mikethomas.fahview.v6project.model.WorkUnitImpl.toString() 8 1 1
info.mikethomas.fahview.v6project.utilities.QueueReader.readBEUInt(int,int) 8 1 1
info.mikethomas.fahview.v6project.utilities.QueueReader.readIP(int) 8 1 1
info.mikethomas.fahview.v6project.utilities.QueueReader.readString(int,int) 8 3 1
info.mikethomas.fahview.v6project.WorkProject.WorkProjectLogicalView.createLogicalView() 8 3 0
info.mikethomas.fahview.v6project.utilities.QueueReader.read(int,int) 7 2 1
info.mikethomas.fahview.v6project.model.WorkUnitImpl.update() 6 1 1

Averages.

Program NCSS NCSS average CCN average Javadocs average
1,886.00 3.49 1.47 0.87

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