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.server.win32lib.controls.listbox56967900938
org.sirius.server.win32lib.controls.listview56967900938
org.sirius.server.win32.constants1506501560052
org.sirius.server.win32.classes.controls111085264924420548
org.sirius.server.win32lib.controls.spin553455416324
org.sirius.server.win32lib.controls.tab54741513935
org.sirius.server.win32lib.controls.edit54738300338
org.sirius.server.win32lib.controls.scrollbar547378416324
org.sirius.server.win32lib.controls.slider547378416324
org.sirius.server.win32lib.controls.button54433200338
org.sirius.server.win32.classes56932219855352
org.sirius.server.win32lib.controls.progressbar54129813335
org.sirius.server.win322181211367065
org.sirius.server.win32.core43675416024
org.sirius.server.win32.core.types1064310011
org.sirius.server.win32lib.controls11048113403
Classes totalMethods totalNCSS totalJavadocsJavadoc linesSingle lines commentMulti lines comment
847055803128570701349

Objects

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

TOP 30 classes containing the most NCSS.

ObjectNCSSMethodsClassesJavadocs
org.sirius.server.win32lib.controls.listbox.ListBoxSvcPortStub5171900
org.sirius.server.win32lib.controls.listview.ListViewSvcPortStub5171900
org.sirius.server.win32lib.controls.spin.SpinSvcPortStub3181300
org.sirius.server.win32lib.controls.tab.TabSvcPortStub2881100
org.sirius.server.win32lib.controls.edit.EditSvcPortStub2561100
org.sirius.server.win32lib.controls.scrollbar.ScrollBarSvcPortStub2511100
org.sirius.server.win32lib.controls.slider.SliderSvcPortStub2511100
org.sirius.server.win32lib.controls.button.ButtonSvcPortStub2101000
org.sirius.server.win32.constants.IWMConsts209001
org.sirius.server.win32lib.controls.progressbar.ProgressBarSvcPortStub181900
org.sirius.server.win32.classes.Window1643102
org.sirius.server.win32.classes.controls.ComboBox1122202
org.sirius.server.win32.classes.controls.TabControl931431
org.sirius.server.win32.classes.controls.Edit901902
org.sirius.server.win32lib.controls.listbox.IListBoxContractProxy781900
org.sirius.server.win32lib.controls.listview.IListViewContractProxy781900
org.sirius.server.win32.constants.IListViewConsts70001
org.sirius.server.win32.Win32Utils62313
org.sirius.server.win32lib.controls.button.ButtonSvcLocator611500
org.sirius.server.win32lib.controls.edit.EditSvcLocator611500
org.sirius.server.win32lib.controls.listbox.ListBoxSvcLocator611500
org.sirius.server.win32lib.controls.listview.ListViewSvcLocator611500
org.sirius.server.win32lib.controls.progressbar.ProgressBarSvcLocator611501
org.sirius.server.win32lib.controls.scrollbar.ScrollBarSvcLocator611504
org.sirius.server.win32lib.controls.slider.SliderSvcLocator611504
org.sirius.server.win32lib.controls.spin.SpinSvcLocator611504
org.sirius.server.win32lib.controls.tab.TabSvcLocator611501
org.sirius.server.win32lib.controls.spin.ISpinContractProxy581400
org.sirius.server.win32.core.types.WinDefExt55063
org.sirius.server.win32lib.controls.edit.IEditContractProxy501200

TOP 30 classes containing the most methods.

ObjectNCSSMethodsClassesJavadocs
org.sirius.server.win32.classes.Window1643102
org.sirius.server.win32.core.User32Ext272501
org.sirius.server.win32.classes.controls.ComboBox1122202
org.sirius.server.win32.classes.controls.Edit901902
org.sirius.server.win32lib.controls.listbox.IListBoxContractProxy781900
org.sirius.server.win32lib.controls.listbox.ListBoxSvcPortStub5171900
org.sirius.server.win32lib.controls.listview.IListViewContractProxy781900
org.sirius.server.win32lib.controls.listview.ListViewSvcPortStub5171900
org.sirius.server.win32.classes.controls.ListBox3617017
org.sirius.server.win32.Win32Locator4715010
org.sirius.server.win32lib.controls.button.ButtonSvcLocator611500
org.sirius.server.win32lib.controls.edit.EditSvcLocator611500
org.sirius.server.win32lib.controls.listbox.ListBoxSvcLocator611500
org.sirius.server.win32lib.controls.listview.ListViewSvcLocator611500
org.sirius.server.win32lib.controls.progressbar.ProgressBarSvcLocator611501
org.sirius.server.win32lib.controls.scrollbar.ScrollBarSvcLocator611504
org.sirius.server.win32lib.controls.slider.SliderSvcLocator611504
org.sirius.server.win32lib.controls.spin.SpinSvcLocator611504
org.sirius.server.win32lib.controls.tab.TabSvcLocator611501
org.sirius.server.win32.classes.Common421409
org.sirius.server.win32.classes.controls.TabControl931431
org.sirius.server.win32lib.controls.spin.ISpinContractProxy581400
org.sirius.server.win32lib.controls.listbox.IListBoxContract141300
org.sirius.server.win32lib.controls.listview.IListViewContract141300
org.sirius.server.win32lib.controls.spin.SpinSvcPortStub3181300
org.sirius.server.win32.classes.Menu451202
org.sirius.server.win32lib.controls.edit.IEditContractProxy501200
org.sirius.server.win32lib.controls.scrollbar.IScrollBarContractProxy501200
org.sirius.server.win32lib.controls.slider.ISliderContractProxy501200
org.sirius.server.win32lib.controls.tab.ITabContractProxy501200

Averages.

NCSS averageProgram NCSSClasses averageMethods averageJavadocs average
66.325,803.000.148.391.52

Methods

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

TOP 30 Methods containing the most NCSS.

MethodsNCSSCCNJavadocs
org.sirius.server.win32lib.controls.listbox.ListBoxSvcPortStub._initOperationDesc1()12110
org.sirius.server.win32lib.controls.listview.ListViewSvcPortStub._initOperationDesc1()12110
org.sirius.server.win32lib.controls.spin.SpinSvcPortStub._initOperationDesc1()9310
org.sirius.server.win32lib.controls.edit.EditSvcPortStub._initOperationDesc1()8710
org.sirius.server.win32lib.controls.tab.TabSvcPortStub._initOperationDesc1()7410
org.sirius.server.win32lib.controls.scrollbar.ScrollBarSvcPortStub._initOperationDesc1()7010
org.sirius.server.win32lib.controls.slider.SliderSvcPortStub._initOperationDesc1()7010
org.sirius.server.win32lib.controls.button.ButtonSvcPortStub._initOperationDesc1()5710
org.sirius.server.win32lib.controls.progressbar.ProgressBarSvcPortStub._initOperationDesc1()4810
org.sirius.server.win32lib.controls.listbox.ListBoxSvcPortStub._initOperationDesc2()3710
org.sirius.server.win32lib.controls.listbox.ListBoxSvcPortStub.createCall()37150
org.sirius.server.win32lib.controls.listview.ListViewSvcPortStub._initOperationDesc2()3710
org.sirius.server.win32lib.controls.listview.ListViewSvcPortStub.createCall()37150
org.sirius.server.win32lib.controls.tab.TabSvcPortStub.createCall()37150
org.sirius.server.win32.Win32Utils.WNDENUMPROC.callback(HWND,Pointer)28100
org.sirius.server.win32lib.controls.listbox.ListBoxSvcPortStub.ListBoxSvcPortStub(javax.xml.rpc.Service)2720
org.sirius.server.win32lib.controls.listview.ListViewSvcPortStub.ListViewSvcPortStub(javax.xml.rpc.Service)2720
org.sirius.server.win32lib.controls.tab.TabSvcPortStub.TabSvcPortStub(javax.xml.rpc.Service)2720
org.sirius.server.win32lib.controls.button.ButtonSvcPortStub.isChecked(java.lang.Integer)24100
org.sirius.server.win32lib.controls.button.ButtonSvcPortStub.isIntermediate(java.lang.Integer)24100
org.sirius.server.win32lib.controls.button.ButtonSvcPortStub.isPressed(java.lang.Integer)24100
org.sirius.server.win32lib.controls.edit.EditSvcPortStub.getSelectedText(java.lang.Integer)24100
org.sirius.server.win32lib.controls.edit.EditSvcPortStub.getText(java.lang.Integer)24100
org.sirius.server.win32lib.controls.listbox.ListBoxSvcPortStub.getItemNames(java.lang.Integer)24100
org.sirius.server.win32lib.controls.listbox.ListBoxSvcPortStub.getItemsCount(java.lang.Integer)24100
org.sirius.server.win32lib.controls.listbox.ListBoxSvcPortStub.getSelectedIndex(java.lang.Integer)24100
org.sirius.server.win32lib.controls.listbox.ListBoxSvcPortStub.getSelectedItem(java.lang.Integer)24100
org.sirius.server.win32lib.controls.listbox.ListBoxSvcPortStub.getSelectedItems(java.lang.Integer)24100
org.sirius.server.win32lib.controls.listview.ListViewSvcPortStub.getItemNames(java.lang.Integer)24100
org.sirius.server.win32lib.controls.listview.ListViewSvcPortStub.getItemsCount(java.lang.Integer)24100

Averages.

Program NCSSNCSS averageCCN averageJavadocs average
5,803.006.442.290.14

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