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.binding.swing 38 352 2045 121 1010 24 403
org.springframework.richclient.application.support 37 358 2025 135 806 52 540
org.springframework.richclient.util 23 209 1988 115 900 115 389
org.springframework.richclient.command 38 413 1750 282 1750 51 596
org.springframework.richclient.dialog 20 361 1651 184 1048 12 304
org.springframework.richclient.components 20 136 1293 100 575 77 199
org.springframework.binding.form.support 15 190 1128 76 522 28 258
org.springframework.binding.value.support 23 196 1101 97 626 22 319
org.springframework.richclient.widget.editor 2 137 1026 31 198 88 54
org.springframework.richclient.table 19 174 1022 75 406 48 309
org.springframework.richclient.command.support 27 201 1010 99 439 16 306
org.springframework.rules.constraint 31 279 926 104 593 0 465
org.springframework.richclient.list 22 132 861 78 419 58 333
org.springframework.richclient.form 12 186 814 81 483 20 152
org.springframework.binding.validation.support 9 119 794 53 305 11 148
org.springframework.richclient.widget.table 13 177 777 141 882 5 54
org.springframework.richclient.application 33 168 775 111 819 14 504
org.springframework.richclient.layout 4 98 674 61 469 15 71
org.springframework.rules.reporting 18 125 625 34 155 1 248
org.springframework.richclient.text 11 57 608 37 196 12 159
org.springframework.richclient.form.builder.support 17 66 588 28 217 16 208
org.springframework.richclient.form.builder 6 158 530 80 665 2 75
org.springframework.richclient.application.config 10 109 527 82 685 7 158
org.springframework.richclient.widget.table.glazedlists 2 52 509 5 29 10 0
org.springframework.richclient.security 17 79 480 71 543 40 687
org.springframework.richclient.core 18 93 478 56 371 13 312
org.springframework.richclient.command.config 13 90 464 81 515 11 207
org.springframework.richclient.wizard 9 116 448 77 496 8 121
org.springframework.richclient.factory 10 135 440 94 556 1 122
org.springframework.richclient.image 14 74 429 39 361 9 248
org.springframework.richclient.widget 13 109 429 28 139 7 7
org.springframework.richclient.form.binding.support 7 83 422 21 150 9 99
org.springframework.richclient.application.splash 8 63 400 37 243 3 123
org.springframework.richclient.form.binding.swing.editor 2 62 368 21 101 14 53
org.springframework.richclient.exceptionhandling 13 44 366 32 195 8 18
org.springframework.rules.factory 3 128 304 64 466 0 48
org.springframework.binding.support 6 39 297 34 310 9 131
org.springframework.rules.constraint.property 12 77 287 33 250 0 149
org.springframework.rules.closure.support 11 70 279 85 435 0 196
org.springframework.richclient.security.support 4 44 278 45 374 28 64
org.springframework.richclient.tree 6 38 274 14 122 34 84
org.springframework.richclient.application.mdi 6 40 270 8 29 4 90
org.springframework.richclient.taskpane 8 32 261 0 0 0 0
org.springframework.richclient.filechooser 4 31 222 18 138 0 60
org.springframework.richclient.selection.binding 2 31 218 3 26 2 30
org.springframework.richclient.application.statusbar.support 2 29 206 11 88 1 31
org.springframework.richclient.form.binding.swing.date 8 34 203 6 31 2 60
org.springframework.richclient.table.renderer 10 34 197 11 63 7 138
org.springframework.richclient.application.setup 4 27 195 10 39 3 15
org.springframework.richclient.exceptionhandling.delegation 7 37 195 19 139 35 7
org.springframework.binding.value.swing 6 28 183 4 22 15 90
org.springframework.richclient.dialog.control 3 37 181 3 24 3 45
org.springframework.richclient.selection.binding.support 5 30 157 17 103 3 75
org.springframework.richclient.selection.dialog 3 21 144 3 16 1 45
org.springframework.richclient.progress 6 39 135 18 116 2 90
org.springframework.richclient.application.mdi.contextmenu 6 17 134 8 51 9 90
org.springframework.richclient.application.session 2 32 130 33 188 0 4
org.springframework.richclient.widget.editor.provider 6 50 119 10 65 0 47
org.springframework.binding.form 11 66 116 75 489 0 144
org.springframework.rules 3 29 112 11 78 0 49
org.springframework.rules.closure 10 24 96 29 224 0 153
org.springframework.richclient.form.binding.swing.text 3 12 83 11 55 1 0
org.springframework.richclient.convert.support 3 14 82 3 17 0 45
org.springframework.binding.format.support 2 24 71 2 19 2 0
org.springframework.rules.support 2 11 67 4 25 1 30
org.springframework.richclient.security.remoting 3 9 66 11 133 6 34
org.springframework.richclient.dialog.support 1 6 60 11 97 0 22
org.springframework.binding.validation 7 21 59 26 132 0 118
org.springframework.binding.value 7 22 49 29 190 0 111
org.springframework.richclient.jnlp 1 6 42 6 78 1 3
org.springframework.richclient.form.binding 5 15 36 20 101 0 75
org.springframework.richclient.util.l2fprod 1 4 30 0 0 0 0
org.springframework.binding 3 12 24 15 116 0 48
org.springframework.richclient.application.event 1 5 21 1 5 0 7
org.springframework.richclient.application.statusbar 1 8 13 9 60 0 15
org.springframework.richclient.image.config 2 2 8 2 6 0 30
Classes total Methods total NCSS total Javadocs Javadoc lines Single lines comment Multi lines comment
770 6636 35675 3489 22787 996 10722

Objects

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

TOP 30 classes containing the most NCSS.

Object NCSS Methods Classes Javadocs
org.springframework.richclient.widget.editor.AbstractDataEditorWidget 699 94 15 17
org.springframework.richclient.widget.table.glazedlists.GlazedListTableWidget 409 48 21 3
org.springframework.binding.form.support.AbstractFormModel 367 68 4 32
org.springframework.richclient.layout.TableLayoutBuilder 362 51 1 30
org.springframework.richclient.application.support.DefaultApplicationServices 341 63 28 65
org.springframework.richclient.util.BrowserLauncher 315 8 1 6
org.springframework.richclient.form.AbstractForm 303 77 6 27
org.springframework.richclient.command.AbstractCommand 293 80 4 83
org.springframework.richclient.form.builder.FormLayoutFormBuilder 281 96 1 15
org.springframework.richclient.components.ShuttleList 272 26 7 21
org.springframework.richclient.dialog.ApplicationDialog 272 72 3 74
org.springframework.richclient.form.binding.swing.editor.AbstractLookupBinding 270 41 8 21
org.springframework.richclient.command.CommandGroup 266 79 0 20
org.springframework.richclient.util.RcpSupport 264 41 2 7
org.springframework.richclient.layout.GridBagLayoutBuilder 256 45 1 29
org.springframework.richclient.widget.editor.DefaultDataEditorWidget 255 43 3 14
org.springframework.richclient.text.TextComponentPopup 251 26 9 7
org.springframework.richclient.factory.DefaultComponentFactory 228 65 2 21
org.springframework.richclient.components.BigDecimalTextField 225 14 2 24
org.springframework.rules.factory.Constraints 222 106 0 62
org.springframework.richclient.form.binding.swing.AbstractGlazedListsBinding 218 36 9 5
org.springframework.binding.validation.support.DefaultValidationResultsModel 214 38 2 13
org.springframework.richclient.util.OverlayHelper 210 12 4 3
org.springframework.richclient.util.ClassUtils 201 22 0 12
org.springframework.richclient.application.config.DefaultApplicationObjectConfigurer 199 28 0 25
org.springframework.richclient.widget.table.TableCellRenderers 195 0 7 1
org.springframework.richclient.form.binding.swing.ShuttleListBinding 192 30 1 10
org.springframework.binding.form.support.DefaultFormModel 180 37 2 7
org.springframework.rules.constraint.ConstraintsAccessor 179 89 0 9
org.springframework.richclient.table.ShuttleSortableTableModel 179 26 1 2

TOP 30 classes containing the most methods.

Object NCSS Methods Classes Javadocs
org.springframework.rules.factory.Constraints 222 106 0 62
org.springframework.richclient.form.builder.FormLayoutFormBuilder 281 96 1 15
org.springframework.richclient.widget.editor.AbstractDataEditorWidget 699 94 15 17
org.springframework.rules.constraint.ConstraintsAccessor 179 89 0 9
org.springframework.richclient.command.AbstractCommand 293 80 4 83
org.springframework.richclient.command.CommandGroup 266 79 0 20
org.springframework.richclient.form.AbstractForm 303 77 6 27
org.springframework.richclient.dialog.ApplicationDialog 272 72 3 74
org.springframework.binding.form.support.AbstractFormModel 367 68 4 32
org.springframework.richclient.factory.DefaultComponentFactory 228 65 2 21
org.springframework.richclient.application.support.DefaultApplicationServices 341 63 28 65
org.springframework.richclient.widget.table.PropertyColumnTableDescription 156 53 0 45
org.springframework.richclient.layout.TableLayoutBuilder 362 51 1 30
org.springframework.richclient.widget.table.glazedlists.GlazedListTableWidget 409 48 21 3
org.springframework.richclient.layout.GridBagLayoutBuilder 256 45 1 29
org.springframework.richclient.widget.table.PropertyColumn 137 44 0 15
org.springframework.richclient.widget.editor.DefaultDataEditorWidget 255 43 3 14
org.springframework.richclient.form.binding.swing.editor.AbstractLookupBinding 270 41 8 21
org.springframework.richclient.util.RcpSupport 264 41 2 7
org.springframework.richclient.application.support.AbstractApplicationPage 161 39 1 12
org.springframework.richclient.command.support.DefaultCommandManager 116 39 0 6
org.springframework.richclient.factory.ComponentFactory 40 39 0 40
org.springframework.binding.validation.support.DefaultValidationResultsModel 214 38 2 13
org.springframework.richclient.application.support.AbstractApplicationWindow 163 37 1 9
org.springframework.binding.form.support.DefaultFormModel 180 37 2 7
org.springframework.richclient.form.binding.swing.AbstractGlazedListsBinding 218 36 9 5
org.springframework.binding.value.support.ListListModel 141 36 1 6
org.springframework.richclient.command.config.CommandFaceDescriptor 152 35 0 36
org.springframework.richclient.table.BaseTableModel 157 33 0 34
org.springframework.richclient.wizard.AbstractWizard 98 31 0 32

Averages.

NCSS average Program NCSS Classes average Methods average Javadocs average
39.00 35,675.00 0.48 8.62 4.53

Methods

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

TOP 30 Methods containing the most NCSS.

Methods NCSS CCN Javadocs
org.springframework.richclient.util.BrowserLauncher.loadClasses() 90 37 1
org.springframework.richclient.util.BrowserLauncher.locateBrowser() 76 34 1
org.springframework.richclient.util.BrowserLauncher.openURL(URL) 74 2 1
org.springframework.richclient.util.BrowserLauncher.Runnable$1.run() 68 32 0
org.springframework.richclient.components.BigDecimalTextField.BigDecimalDocument.insertString(int,String,AttributeSet) 59 38 1
org.springframework.richclient.util.OverlayHelper.positionOverlay(JLayeredPane) 57 24 0
org.springframework.richclient.widget.table.TableCellRenderers.ListPropertyCellRenderer.getTableCellRendererComponent(JTable,Object,boolean,boolean,int,int) 55 18 0
org.springframework.richclient.components.ShuttleList.buildComponent() 54 1 1
org.springframework.richclient.taskpane.JTaskPaneBuilder.buildGroupComponent(JComponent,CommandGroup,int) 46 10 0
org.springframework.richclient.selection.binding.ListSelectionDialogBinder.applyContext(ListSelectionDialogBinding,Map) 45 18 0
org.springframework.richclient.taskpane.DefaultTaskPaneIconGenerator.createIcon(int,Color,char) 44 7 0
org.springframework.richclient.components.ShuttleList.buildButtonPanel() 43 1 0
org.springframework.richclient.layout.TableLayoutBuilder.fillInGaps() 42 10 0
org.springframework.richclient.widget.table.glazedlists.GlazedListTableWidget.GlazedListTableWidget(Class,List,TableFormat,String[],Comparator,boolean) 42 5 0
org.springframework.richclient.widget.editor.AbstractDataEditorWidget.createCopySelectedRowsToClipboardCommand() 40 1 0
org.springframework.richclient.table.TableSortIndicator.TableHeaderClickHandler.mouseClicked(MouseEvent) 38 13 0
org.springframework.richclient.text.TextComponentPopup.DefaultKeymap.getKeyStrokesForAction(Action) 38 18 0
org.springframework.richclient.util.SpringLayoutUtils.makeGrid(Container,int,int,int,int,int,int) 38 8 1
org.springframework.richclient.components.BigDecimalTextField.getValue() 37 25 1
org.springframework.richclient.table.ShuttleSortableTableModel.tableChanged(TableModelEvent) 35 9 0
org.springframework.richclient.application.splash.InfiniteProgressPanel.Animator.run() 35 14 0
org.springframework.richclient.widget.table.glazedlists.GlazedListTableWidget.initializeSelectColumnCommands() 35 1 0
org.springframework.richclient.layout.TableLayoutBuilder.getAttributes(String) 34 20 0
org.springframework.richclient.widget.table.glazedlists.GlazedListTableWidget.GlazedListTableWidget(List,TableDescription,Comparator) 34 10 0
org.springframework.richclient.core.LabelInfo.valueOf(String) 33 11 1
org.springframework.richclient.security.LoginCommand.doExecuteCommand() 32 2 1
org.springframework.richclient.command.config.CommandButtonLabelInfo.valueOf(String) 32 12 1
org.springframework.richclient.util.RcpSupport.getClone(Object) 32 18 0
org.springframework.richclient.widget.editor.AbstractDataEditorWidget.getTableFilterPanel() 31 4 0
org.springframework.richclient.widget.editor.AbstractDataEditorWidget.getTableFilterControlPanel() 31 10 0

Averages.

Program NCSS NCSS average CCN average Javadocs average
35,675.00 3.72 1.66 0.38

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

 
2004-2009 © The Spring Framework