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.

Package Classes Methods NCSS Javadocs Javadoc lines Single lines comment Multi lines comment
org.springframework.richclient.form 7 115 641 96 547 57 133
org.springframework.richclient.components 3 63 579 37 300 41 47
org.springframework.richclient.beans 4 70 567 30 170 12 60
org.springframework.richclient.table.support 3 61 420 49 342 20 67
org.springframework.richclient.settings 7 124 342 20 131 0 285
org.springframework.richclient.settings.support 8 48 309 6 30 2 60
org.springframework.richclient.application.mdi 6 37 263 7 26 4 90
org.springframework.richclient.settings.xml 6 40 255 18 106 1 93
org.springframework.richclient.application.splash 3 30 216 3 19 2 45
org.springframework.richclient.swing 2 15 212 25 149 29 23
org.springframework.richclient.selection.binding 2 28 203 2 21 2 30
org.springframework.richclient.preference 5 45 200 8 34 3 75
org.springframework.richclient.core 1 34 184 24 163 0 15
org.springframework.richclient.form.binding.swing 4 27 164 31 322 3 0
org.springframework.richclient.list 4 38 158 19 70 0 60
org.springframework.richclient.selection.binding.support 5 28 151 15 92 3 75
org.springframework.richclient.settings.jdbc 4 25 149 5 19 6 60
org.springframework.richclient.selection.dialog 3 21 144 3 16 1 45
org.springframework.richclient.settings.j2seprefs 4 33 137 7 32 2 76
org.springframework.richclient.application.mdi.contextmenu 6 17 133 8 51 9 90
org.springframework.richclient.context.support 5 22 117 1 11 0 2
org.springframework.binding.value.support 2 14 115 11 86 9 60
org.springframework.richclient.util 3 12 102 1 5 2 15
org.springframework.richclient.application.tabbed 2 15 94 2 11 1 30
org.springframework.binding.support 2 19 61 14 104 0 30
org.springframework.richclient.form.builder 1 3 60 1 3 0 15
org.springframework.rules.metadata 1 5 44 1 5 0 15
org.springframework.rules.constraint.property 1 5 28 2 16 0 15
org.springframework.richclient.application.support 1 3 15 4 41 0 15
org.springframework.richclient.context.test 3 3 14 0 0 0 0
org.springframework.richclient.context 1 0 3 0 0 0 0
Classes total Methods total NCSS total Javadocs Javadoc lines Single lines comment Multi lines comment
109 1000 6080 450 2922 209 1626

Objects

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

TOP 30 classes containing the most NCSS.

Object NCSS Methods Classes Javadocs
org.springframework.richclient.components.ShuttleList 272 26 7 21
org.springframework.richclient.form.AbstractMasterForm 245 38 9 53
org.springframework.richclient.beans.AbstractMemberPropertyAccessor 233 29 0 24
org.springframework.richclient.settings.AbstractSettings 210 56 0 3
org.springframework.richclient.components.ShuttleListBinding 192 30 1 10
org.springframework.richclient.swing.BigDecimalTextField 189 14 2 24
org.springframework.richclient.table.support.AbstractObjectTable 189 38 7 32
org.springframework.richclient.beans.DefaultMemberPropertyAccessor 173 19 0 1
org.springframework.richclient.core.GenericCollectionTypeResolver 172 34 0 24
org.springframework.richclient.application.splash.InfiniteProgressPanel 149 20 1 1
org.springframework.richclient.form.AbstractDetailForm 123 23 1 16
org.springframework.richclient.settings.support.TableMemento 115 13 0 1
org.springframework.richclient.list.TableListCellRenderer 103 24 1 16
org.springframework.richclient.table.support.GlazedTableModel 100 14 2 14
org.springframework.richclient.settings.xml.XmlSettings 95 18 0 1
org.springframework.richclient.settings.jdbc.JdbcSettings 91 15 0 1
org.springframework.richclient.beans.AbstractNestedMemberPropertyAccessor 89 17 1 1
org.springframework.richclient.application.mdi.DesktopApplicationPage 87 11 2 2
org.springframework.richclient.selection.binding.ListSelectionDialogBinding 84 16 3 1
org.springframework.richclient.selection.binding.ListSelectionDialogBinder 82 12 0 1
org.springframework.richclient.form.AbstractTableMasterForm 80 19 1 19
org.springframework.binding.value.support.ObservableEventList 70 11 1 7
org.springframework.richclient.selection.binding.support.SelectField 68 16 2 4
org.springframework.richclient.table.support.ResizeTableColumnSupport 68 9 2 3
org.springframework.richclient.preference.PreferencePage 64 18 2 6
org.springframework.richclient.settings.support.TreeMemento 63 10 0 2
org.springframework.richclient.form.binding.swing.NumberBinding 62 7 1 8
org.springframework.richclient.application.mdi.ScrollingDesktopManager 60 8 0 1
org.springframework.richclient.form.binding.swing.NumberBinder 54 15 0 16
org.springframework.richclient.application.tabbed.TabbedApplicationPage 54 10 2 1

TOP 30 classes containing the most methods.

Object NCSS Methods Classes Javadocs
org.springframework.richclient.settings.AbstractSettings 210 56 0 3
org.springframework.richclient.settings.Settings 47 46 0 5
org.springframework.richclient.form.AbstractMasterForm 245 38 9 53
org.springframework.richclient.table.support.AbstractObjectTable 189 38 7 32
org.springframework.richclient.core.GenericCollectionTypeResolver 172 34 0 24
org.springframework.richclient.components.ShuttleListBinding 192 30 1 10
org.springframework.richclient.beans.AbstractMemberPropertyAccessor 233 29 0 24
org.springframework.richclient.components.ShuttleList 272 26 7 21
org.springframework.richclient.list.TableListCellRenderer 103 24 1 16
org.springframework.richclient.form.AbstractDetailForm 123 23 1 16
org.springframework.richclient.form.GeneratedForm 53 21 0 2
org.springframework.richclient.application.splash.InfiniteProgressPanel 149 20 1 1
org.springframework.richclient.form.AbstractTableMasterForm 80 19 1 19
org.springframework.richclient.beans.DefaultMemberPropertyAccessor 173 19 0 1
org.springframework.richclient.settings.xml.XmlSettings 95 18 0 1
org.springframework.richclient.preference.PreferencePage 64 18 2 6
org.springframework.richclient.beans.AbstractNestedMemberPropertyAccessor 89 17 1 1
org.springframework.richclient.selection.binding.ListSelectionDialogBinding 84 16 3 1
org.springframework.richclient.selection.binding.support.SelectField 68 16 2 4
org.springframework.richclient.form.binding.swing.NumberBinder 54 15 0 16
org.springframework.richclient.settings.jdbc.JdbcSettings 91 15 0 1
org.springframework.richclient.swing.BigDecimalTextField 189 14 2 24
org.springframework.richclient.settings.j2seprefs.PreferencesSettings 53 14 0 4
org.springframework.richclient.table.support.GlazedTableModel 100 14 2 14
org.springframework.richclient.settings.support.TableMemento 115 13 0 1
org.springframework.richclient.settings.support.WindowMemento 44 12 0 1
org.springframework.richclient.settings.TransientSettings 23 12 0 1
org.springframework.richclient.selection.binding.ListSelectionDialogBinder 82 12 0 1
org.springframework.binding.value.support.ObservableEventList 70 11 1 7
org.springframework.richclient.settings.j2seprefs.TransientPreferences 27 11 0 1

Averages.

NCSS average Program NCSS Classes average Methods average Javadocs average
47.17 6,080.00 0.50 9.17 4.13

Methods

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

TOP 30 Methods containing the most NCSS.

Methods NCSS CCN Javadocs
org.springframework.richclient.swing.BigDecimalTextField.BigDecimalDocument.insertString(int,String,AttributeSet) 55 36 1
org.springframework.richclient.components.ShuttleList.buildComponent() 54 1 1
org.springframework.richclient.components.ShuttleList.buildButtonPanel() 43 1 0
org.springframework.richclient.selection.binding.ListSelectionDialogBinder.applyContext(ListSelectionDialogBinding,Map) 41 17 0
org.springframework.richclient.swing.BigDecimalTextField.getValue() 37 25 1
org.springframework.richclient.form.AbstractTableMasterForm.createFormControl() 37 7 0
org.springframework.richclient.application.splash.InfiniteProgressPanel.Animator.run() 35 14 0
org.springframework.richclient.beans.AbstractMemberPropertyAccessor.getPropertyType(String) 33 18 1
org.springframework.richclient.selection.binding.ListSelectionDialogBinding.createSelectionDialog() 29 5 0
org.springframework.richclient.beans.DefaultMemberPropertyAccessor.getPropertyValue(Object,Object[],int) 28 16 0
org.springframework.richclient.components.ShuttleListBinding.updateSelectionHolderFromList(PropertyChangeListener) 28 19 0
org.springframework.richclient.list.TableListCellRenderer.getListCellRendererComponent(JList,Object,int,boolean,boolean) 27 9 0
org.springframework.richclient.beans.AbstractMemberPropertyAccessor.setAssemblageValue(Class,Object,Object,Object) 27 9 1
org.springframework.richclient.settings.support.TableMemento.restoreSelectedRows(Settings) 26 9 0
org.springframework.richclient.core.GenericCollectionTypeResolver.extractType(Type,Class,int) 25 16 0
org.springframework.richclient.selection.dialog.ListSelectionDialog.createSelectionComponent() 25 3 0
org.springframework.richclient.application.splash.InfiniteProgressPanel.paintComponent(Graphics) 25 7 0
org.springframework.richclient.application.mdi.contextmenu.DefaultDesktopCommandGroupFactory.createContextMenuCommandGroup(CommandManager,JDesktopPane) 24 4 1
org.springframework.richclient.components.ShuttleList.setListLabels(String,String) 24 5 1
org.springframework.richclient.core.GenericCollectionTypeResolver.getActualType(ParameterizedType,Class,int) 22 14 0
org.springframework.richclient.application.mdi.ScrollingDesktopManager.resizeDesktop() 22 8 0
org.springframework.richclient.settings.jdbc.JdbcSettings.save() 21 7 0
org.springframework.richclient.beans.DefaultMemberPropertyAccessor.getIndexedPropertyValue(String) 21 13 0
org.springframework.richclient.components.ShuttleList.moveRightToLeft() 21 7 1
org.springframework.richclient.form.binding.swing.NumberBinding.createPanelWithDecoration() 20 5 1
org.springframework.richclient.form.AbstractDetailForm.updateControlsForState() 20 4 1
org.springframework.richclient.settings.xml.FileSystemXmlSettingsReaderWriter.read(String) 20 11 0
org.springframework.richclient.components.ShuttleListBinding.indicesOf(Object) 20 7 0
org.springframework.richclient.form.AbstractMasterForm.ListSelectionHandler.maybeChangeSelection(int) 19 4 0
org.springframework.richclient.beans.AbstractMemberPropertyAccessor.introspectMethods(Class,Set) 19 13 1

Averages.

Program NCSS NCSS average CCN average Javadocs average
6,080.00 4.31 1.92 0.32

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