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.sirius.client.win32.core.classes.window51181321414924
org.sirius.client.win32.core.types19193118812551119114
org.sirius.client.win32.core.controls.combobox5941059414924
org.sirius.client.win32.core.controls.listbox581845414324
org.sirius.client.win32.core.controls.edit581830414324
org.sirius.client.win32.core.controls.tabcontrol790778281221136
org.sirius.client.win32.core.classes.menu563736414924
org.sirius.client.win32.core.classes.dialog553474414324
org.sirius.client.win32.classes975381362615266
org.sirius.client.win32.core.controls.button541289414324
org.sirius.client.win32.utils535258414924
org.sirius.client.win32.core.constants40246416096
org.sirius.client.win32.types1201241582121
org.sirius.client.win32.classes.controls1223109241201187
org.sirius.client.win32.core19441033034
org.sirius.client.win32.annotations002400096
org.sirius.client.win32.classes.dialogs2215419213
org.sirius.client.win321314415016
Classes totalMethods totalNCSS totalJavadocsJavadoc linesSingle lines commentMulti lines comment
969818735282129197971

Objects

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

TOP 30 classes containing the most NCSS.

ObjectNCSSMethodsClassesJavadocs
org.sirius.client.win32.core.classes.window.WindowPortBindingStub10793600
org.sirius.client.win32.core.controls.combobox.ComboBoxPortBindingStub8572800
org.sirius.client.win32.core.controls.listbox.ListBoxPortBindingStub6632300
org.sirius.client.win32.core.controls.edit.EditPortBindingStub6482300
org.sirius.client.win32.core.classes.menu.MenuPortBindingStub5841700
org.sirius.client.win32.core.controls.tabcontrol.TabControlPortBindingStub4291400
org.sirius.client.win32.core.classes.dialog.DialogPortBindingStub3371300
org.sirius.client.win32.core.types.Menuiteminfo21531027
org.sirius.client.win32.core.constants.IWMConsts209001
org.sirius.client.win32.core.controls.button.ButtonPortBindingStub172900
org.sirius.client.win32.utils.Win32UtilsPortBindingStub151700
org.sirius.client.win32.classes.Window15029011
org.sirius.client.win32.core.classes.window.WindowProxy1423500
org.sirius.client.win32.core.controls.tabcontrol.TcITEM14023017
org.sirius.client.win32.core.types.Menuinfo14021017
org.sirius.client.win32.types.Win32Locator12220015
org.sirius.client.win32.core.types.Windowplacement12119015
org.sirius.client.win32.core.controls.combobox.ComboBoxProxy1102700
org.sirius.client.win32.core.controls.edit.EditProxy942300
org.sirius.client.win32.core.controls.listbox.ListBoxProxy942300
org.sirius.client.win32.core.types.Rect8915011
org.sirius.client.win32.core.classes.menu.MenuProxy701700
org.sirius.client.win32.classes.Menu661204
org.sirius.client.win32.core.controls.tabcontrol.TcHITTESTINFO651107
org.sirius.client.win32.core.types.Point631107
org.sirius.client.win32.core.controls.tabcontrol.TabControlProxy621500
org.sirius.client.win32.core.types.Structure621107
org.sirius.client.win32.core.classes.dialog.DialogServiceLocator611504
org.sirius.client.win32.core.classes.menu.MenuServiceLocator611504
org.sirius.client.win32.core.classes.window.WindowServiceLocator611504

TOP 30 classes containing the most methods.

ObjectNCSSMethodsClassesJavadocs
org.sirius.client.win32.core.classes.window.WindowPortBindingStub10793600
org.sirius.client.win32.core.classes.window.WindowProxy1423500
org.sirius.client.win32.core.types.Menuiteminfo21531027
org.sirius.client.win32.classes.Window15029011
org.sirius.client.win32.core.classes.window.Window302900
org.sirius.client.win32.core.controls.combobox.ComboBoxPortBindingStub8572800
org.sirius.client.win32.core.controls.combobox.ComboBoxProxy1102700
org.sirius.client.win32.core.controls.edit.EditPortBindingStub6482300
org.sirius.client.win32.core.controls.edit.EditProxy942300
org.sirius.client.win32.core.controls.listbox.ListBoxPortBindingStub6632300
org.sirius.client.win32.core.controls.listbox.ListBoxProxy942300
org.sirius.client.win32.core.controls.tabcontrol.TcITEM14023017
org.sirius.client.win32.core.controls.combobox.ComboBox222100
org.sirius.client.win32.core.types.Menuinfo14021017
org.sirius.client.win32.types.Win32Locator12220015
org.sirius.client.win32.core.types.Windowplacement12119015
org.sirius.client.win32.core.classes.menu.MenuPortBindingStub5841700
org.sirius.client.win32.core.classes.menu.MenuProxy701700
org.sirius.client.win32.core.controls.edit.Edit181700
org.sirius.client.win32.core.controls.listbox.ListBox181700
org.sirius.client.win32.core.classes.dialog.DialogServiceLocator611504
org.sirius.client.win32.core.classes.menu.MenuServiceLocator611504
org.sirius.client.win32.core.classes.window.WindowServiceLocator611504
org.sirius.client.win32.core.controls.button.ButtonServiceLocator611504
org.sirius.client.win32.core.controls.combobox.ComboBoxServiceLocator611504
org.sirius.client.win32.core.controls.edit.EditServiceLocator611504
org.sirius.client.win32.core.controls.listbox.ListBoxServiceLocator611504
org.sirius.client.win32.core.controls.tabcontrol.TabControlProxy621500
org.sirius.client.win32.core.controls.tabcontrol.TabControlServiceLocator611504
org.sirius.client.win32.core.types.Rect8915011

Averages.

NCSS averageProgram NCSSClasses averageMethods averageJavadocs average
88.868,735.000.0010.222.94

Methods

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

TOP 30 Methods containing the most NCSS.

MethodsNCSSCCNJavadocs
org.sirius.client.win32.core.classes.menu.MenuPortBindingStub._initOperationDesc1()14210
org.sirius.client.win32.core.classes.window.WindowPortBindingStub._initOperationDesc2()13610
org.sirius.client.win32.core.controls.combobox.ComboBoxPortBindingStub._initOperationDesc1()12910
org.sirius.client.win32.core.controls.listbox.ListBoxPortBindingStub._initOperationDesc1()12310
org.sirius.client.win32.core.controls.edit.EditPortBindingStub._initOperationDesc1()12010
org.sirius.client.win32.core.controls.combobox.ComboBoxPortBindingStub._initOperationDesc2()11910
org.sirius.client.win32.core.classes.window.WindowPortBindingStub._initOperationDesc1()11810
org.sirius.client.win32.core.classes.menu.MenuPortBindingStub.MenuPortBindingStub(javax.xml.rpc.Service)10920
org.sirius.client.win32.core.classes.dialog.DialogPortBindingStub._initOperationDesc1()10410
org.sirius.client.win32.core.classes.window.WindowPortBindingStub._initOperationDesc3()9710
org.sirius.client.win32.core.controls.tabcontrol.TabControlPortBindingStub._initOperationDesc1()9710
org.sirius.client.win32.core.controls.listbox.ListBoxPortBindingStub._initOperationDesc2()9010
org.sirius.client.win32.core.controls.edit.EditPortBindingStub._initOperationDesc2()7810
org.sirius.client.win32.core.controls.tabcontrol.TabControlPortBindingStub.TabControlPortBindingStub(javax.xml.rpc.Service)7320
org.sirius.client.win32.core.classes.window.WindowPortBindingStub.WindowPortBindingStub(javax.xml.rpc.Service)4320
org.sirius.client.win32.core.controls.button.ButtonPortBindingStub._initOperationDesc1()4310
org.sirius.client.win32.core.controls.combobox.ComboBoxPortBindingStub.ComboBoxPortBindingStub(javax.xml.rpc.Service)4320
org.sirius.client.win32.core.classes.menu.MenuPortBindingStub.createCall()37150
org.sirius.client.win32.core.classes.window.WindowPortBindingStub.createCall()37150
org.sirius.client.win32.core.controls.combobox.ComboBoxPortBindingStub.createCall()37150
org.sirius.client.win32.core.controls.tabcontrol.TabControlPortBindingStub.createCall()37150
org.sirius.client.win32.utils.Win32UtilsPortBindingStub.createCall()37150
org.sirius.client.win32.classes.Window.initializeElements(Window)3070
org.sirius.client.win32.core.types.Menuiteminfo.hashCode()30140
org.sirius.client.win32.classes.Window.exists()2780
org.sirius.client.win32.utils.Win32UtilsPortBindingStub._initOperationDesc1()2710
org.sirius.client.win32.utils.Win32UtilsPortBindingStub.Win32UtilsPortBindingStub(javax.xml.rpc.Service)2520
org.sirius.client.win32.core.classes.dialog.DialogPortBindingStub.getDlgCtrlID(long)24100
org.sirius.client.win32.core.classes.dialog.DialogPortBindingStub.getDlgItem(long,int)24100
org.sirius.client.win32.core.classes.dialog.DialogPortBindingStub.getDialogBaseUnits()24100

Averages.

Program NCSSNCSS averageCCN averageJavadocs average
8,735.007.722.900.26

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