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.fosstrak.llrp.commander.views88010825028051212
org.fosstrak.llrp.commander.dialogs7458474220334147
org.fosstrak.llrp.commander.editors21967787941023449
org.fosstrak.llrp.commander.util10827697951613222
org.fosstrak.llrp.commander.editors.graphical553747127023164
org.fosstrak.llrp.commander4615413919231126
org.fosstrak.llrp.commander.views.roaccess392705302843
org.fosstrak.llrp.commander.wizards2162151357040
org.fosstrak.llrp.commander.preferences.pref1131905332022
org.fosstrak.llrp.commander.check41518014654882
org.fosstrak.llrp.commander.editors.graphical.actions2787212040
org.fosstrak.llrp.commander.preferences3460645078
org.fosstrak.llrp.commander.actions2622845040
org.fosstrak.llrp.commander.repository131128023
Classes totalMethods totalNCSS totalJavadocsJavadoc linesSingle lines commentMulti lines comment
73490579935619662711688

Objects

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

TOP 30 classes containing the most NCSS.

ObjectNCSSMethodsClassesJavadocs
org.fosstrak.llrp.commander.views.ReaderExplorerView47414139
org.fosstrak.llrp.commander.ResourceCenter32842133
org.fosstrak.llrp.commander.editors.graphical.LLRPDetailsPage3122483
org.fosstrak.llrp.commander.editors.graphical.LLRPMasterDetailsBlock23712123
org.fosstrak.llrp.commander.util.LLRPTreeMaintainer21924023
org.fosstrak.llrp.commander.util.LLRP21516015
org.fosstrak.llrp.commander.views.MessageboxView20613815
org.fosstrak.llrp.commander.dialogs.SendMessageDialog193946
org.fosstrak.llrp.commander.editors.LLRPEditor17817216
org.fosstrak.llrp.commander.preferences.pref.GroupedStringFieldEditor1591345
org.fosstrak.llrp.commander.dialogs.ReaderSettingsDialog138223
org.fosstrak.llrp.commander.views.roaccess.ROAccessReportsView137584
org.fosstrak.llrp.commander.wizards.NewLLRPMessageWizardPage111946
org.fosstrak.llrp.commander.util.LLRPFactory100703
org.fosstrak.llrp.commander.dialogs.MessageboxViewOptionsDialog98657
org.fosstrak.llrp.commander.views.TableViewPart982031
org.fosstrak.llrp.commander.dialogs.AddReaderDialog83938
org.fosstrak.llrp.commander.dialogs.ConnectDialog789210
org.fosstrak.llrp.commander.ExceptionHandler771211
org.fosstrak.llrp.commander.dialogs.HealthCheckDialog71333
org.fosstrak.llrp.commander.views.ReaderExplorerViewContentProvider7110011
org.fosstrak.llrp.commander.editors.XMLDoubleClickStrategy69401
org.fosstrak.llrp.commander.check.CheckEclipseProject67211
org.fosstrak.llrp.commander.wizards.NewLLRPMessageWizard64727
org.fosstrak.llrp.commander.views.roaccess.DetailsDialog62210
org.fosstrak.llrp.commander.editors.BinaryMessage5911012
org.fosstrak.llrp.commander.dialogs.AddFCDialog57725
org.fosstrak.llrp.commander.editors.BinaryMessageHelper4910011
org.fosstrak.llrp.commander.util.LLRPRangeConstraint46805
org.fosstrak.llrp.commander.util.MessageBoxRefresh469110

TOP 30 classes containing the most methods.

ObjectNCSSMethodsClassesJavadocs
org.fosstrak.llrp.commander.ResourceCenter32842133
org.fosstrak.llrp.commander.editors.graphical.LLRPDetailsPage3122483
org.fosstrak.llrp.commander.util.LLRPTreeMaintainer21924023
org.fosstrak.llrp.commander.views.TableViewPart982031
org.fosstrak.llrp.commander.editors.LLRPEditor17817216
org.fosstrak.llrp.commander.util.LLRP21516015
org.fosstrak.llrp.commander.views.ReaderExplorerView47414139
org.fosstrak.llrp.commander.preferences.pref.GroupedStringFieldEditor1591345
org.fosstrak.llrp.commander.views.MessageboxView20613815
org.fosstrak.llrp.commander.views.ReaderTreeObject391309
org.fosstrak.llrp.commander.editors.graphical.LLRPMasterDetailsBlock23712123
org.fosstrak.llrp.commander.ExceptionHandler771211
org.fosstrak.llrp.commander.editors.BinaryMessage5911012
org.fosstrak.llrp.commander.editors.BinaryMessageHelper4910011
org.fosstrak.llrp.commander.views.ReaderExplorerViewContentProvider7110011
org.fosstrak.llrp.commander.dialogs.AddReaderDialog83938
org.fosstrak.llrp.commander.dialogs.ConnectDialog789210
org.fosstrak.llrp.commander.dialogs.SendMessageDialog193946
org.fosstrak.llrp.commander.util.MessageBoxRefresh469110
org.fosstrak.llrp.commander.wizards.NewLLRPMessageWizardPage111946
org.fosstrak.llrp.commander.editors.BinarySingleValue19809
org.fosstrak.llrp.commander.util.LLRPRangeConstraint46805
org.fosstrak.llrp.commander.check.CheckItem30707
org.fosstrak.llrp.commander.dialogs.AddFCDialog57725
org.fosstrak.llrp.commander.editors.graphical.GraphicalEditorPage33704
org.fosstrak.llrp.commander.editors.graphical.LLRPTreeContentProvider18701
org.fosstrak.llrp.commander.editors.XMLConfiguration41701
org.fosstrak.llrp.commander.util.LLRPFactory100703
org.fosstrak.llrp.commander.wizards.NewLLRPMessageWizard64727
org.fosstrak.llrp.commander.dialogs.MessageboxViewOptionsDialog98657

Averages.

NCSS averageProgram NCSSClasses averageMethods averageJavadocs average
67.795,799.001.236.714.88

Methods

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

TOP 30 Methods containing the most NCSS.

MethodsNCSSCCNJavadocs
org.fosstrak.llrp.commander.views.ReaderExplorerView.makeActions()15010
org.fosstrak.llrp.commander.dialogs.ReaderSettingsDialog.createContents(Composite)13191
org.fosstrak.llrp.commander.dialogs.SendMessageDialog.createContents(Composite)123111
org.fosstrak.llrp.commander.views.ReaderExplorerView.createSendMessageAction(String)11190
org.fosstrak.llrp.commander.views.ReaderExplorerView.Action$10.run()102430
org.fosstrak.llrp.commander.views.roaccess.ROAccessReportsView.createPartControl(Composite)8250
org.fosstrak.llrp.commander.dialogs.MessageboxViewOptionsDialog.createContents(Composite)8121
org.fosstrak.llrp.commander.views.ReaderExplorerView.fillContextMenu(IMenuManager)79101
org.fosstrak.llrp.commander.preferences.pref.GroupedStringFieldEditor.getDBFieldControl(Composite)7771
org.fosstrak.llrp.commander.views.MessageboxView.createActions()7010
org.fosstrak.llrp.commander.dialogs.HealthCheckDialog.createContents(Composite)6111
org.fosstrak.llrp.commander.editors.graphical.LLRPMasterDetailsBlock.createAddParameterActions(MenuManager)59220
org.fosstrak.llrp.commander.ResourceCenter.initializeAdaptorMgmt()5991
org.fosstrak.llrp.commander.views.roaccess.DetailsDialog.createContents(Composite)5670
org.fosstrak.llrp.commander.editors.graphical.LLRPMasterDetailsBlock.createMasterPart(IManagedForm,Composite)5210
org.fosstrak.llrp.commander.check.CheckEclipseProject.fix()45110
org.fosstrak.llrp.commander.ResourceCenter.getRepository()4581
org.fosstrak.llrp.commander.ExceptionHandler.postExceptionToGUI(LLRPExceptionHandlerTypeMap,LLRPRuntimeException,String,String)4410
org.fosstrak.llrp.commander.wizards.NewLLRPMessageWizardPage.createControl(Composite)4421
org.fosstrak.llrp.commander.ExceptionHandler.Runnable$1.run()38120
org.fosstrak.llrp.commander.util.LLRP.getDescription(Object)35101
org.fosstrak.llrp.commander.editors.XMLDoubleClickStrategy.selectComment(int)33140
org.fosstrak.llrp.commander.dialogs.SendMessageDialog.sendMessage()32100
org.fosstrak.llrp.commander.editors.graphical.LLRPDetailsPage.createDescriptionAction()3161
org.fosstrak.llrp.commander.editors.graphical.LLRPDetailsPage.createFieldText(Composite,FormToolkit,FieldDefinition)3110
org.fosstrak.llrp.commander.editors.graphical.LLRPDetailsPage.updateFieldControls()2950
org.fosstrak.llrp.commander.util.LLRPFactory.initializeFields(Object,LLRPTreeMaintainer)2890
org.fosstrak.llrp.commander.editors.graphical.LLRPDetailsPage.createListAndParameterControls(Composite,FormToolkit)2770
org.fosstrak.llrp.commander.editors.graphical.LLRPMasterDetailsBlock.createSectionToolbar(Section,FormToolkit)2711
org.fosstrak.llrp.commander.editors.graphical.LLRPDetailsPage.createContents(Composite)2610

Averages.

Program NCSSNCSS averageCCN averageJavadocs average
5,799.008.842.510.47

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