JavaNCSS Metric Results

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

The following document contains the results of a JavaNCSS metric analysis, using JavaNCSS version 32.53.
JavaNCSS web site.

Packages

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

Packages sorted by NCSS.

PackageClassesMethodsNCSSJavadocsJavadoc linesSingle lines commentMulti lines comment
org.diyefi.openlogviewer.graphing17127125739187107129
org.diyefi.openlogviewer3485904269854104
org.diyefi.openlogviewer.decoder4414711911414966
org.diyefi.openlogviewer.optionpanel1240417002922
org.diyefi.openlogviewer.propertypanel84735800253
org.diyefi.openlogviewer.genericlog34325913772644
org.diyefi.openlogviewer.subframes411172161222
org.diyefi.openlogviewer.filefilters614104000132
org.diyefi.openlogviewer.coloring1454001027
org.diyefi.openlogviewer.utils2554313244
Classes totalMethods totalNCSS totalJavadocsJavadoc linesSingle lines commentMulti lines comment
914174050101495391643

Objects

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

TOP 30 classes containing the most NCSS.

ObjectNCSSMethodsClassesJavadocs
org.diyefi.openlogviewer.graphing.EntireGraphingPanel470641228
org.diyefi.openlogviewer.OpenLogViewer4092692
org.diyefi.openlogviewer.optionpanel.OptionFrameV2385760
org.diyefi.openlogviewer.graphing.SingleGraphPanel35922010
org.diyefi.openlogviewer.decoder.FreeEMSBin2791009
org.diyefi.openlogviewer.propertypanel.PropertiesPane2471450
org.diyefi.openlogviewer.graphing.GraphPositionPanel178900
org.diyefi.openlogviewer.NavBarPanel177241717
org.diyefi.openlogviewer.subframes.AboutFrame130811
org.diyefi.openlogviewer.genericlog.GenericDataElement1273107
org.diyefi.openlogviewer.genericlog.GenericLog1081126
org.diyefi.openlogviewer.Text103102
org.diyefi.openlogviewer.optionpanel.OptionFrameV2.ActiveHeaderLabel991610
org.diyefi.openlogviewer.graphing.InfoPanel931100
org.diyefi.openlogviewer.decoder.LogField892110
org.diyefi.openlogviewer.graphing.MultiGraphLayeredPane88901
org.diyefi.openlogviewer.optionpanel.OptionFrameV2.ModifyGraphPane80340
org.diyefi.openlogviewer.propertypanel.PropertiesPane.PropertyPanel78710
org.diyefi.openlogviewer.propertypanel.SingleProperty701700
org.diyefi.openlogviewer.decoder.CSVTypeLog62403
org.diyefi.openlogviewer.FramesPerSecondPanel50300
org.diyefi.openlogviewer.coloring.InitialLineColoring49400
org.diyefi.openlogviewer.Keys42102
org.diyefi.openlogviewer.OpenLogViewer.Runnable39100
org.diyefi.openlogviewer.optionpanel.OptionFrameV2.ActiveHeaderLabel.MouseListener34500
org.diyefi.openlogviewer.utils.Utilities23301
org.diyefi.openlogviewer.filefilters.MSTypeFileFilter22300
org.diyefi.openlogviewer.utils.MathUtils21202
org.diyefi.openlogviewer.Images20102
org.diyefi.openlogviewer.optionpanel.OptionFrameV2.MouseMotionAdapter18100

TOP 30 classes containing the most methods.

ObjectNCSSMethodsClassesJavadocs
org.diyefi.openlogviewer.graphing.EntireGraphingPanel470641228
org.diyefi.openlogviewer.genericlog.GenericDataElement1273107
org.diyefi.openlogviewer.OpenLogViewer4092692
org.diyefi.openlogviewer.NavBarPanel177241717
org.diyefi.openlogviewer.graphing.SingleGraphPanel35922010
org.diyefi.openlogviewer.decoder.LogField892110
org.diyefi.openlogviewer.propertypanel.SingleProperty701700
org.diyefi.openlogviewer.optionpanel.OptionFrameV2.ActiveHeaderLabel991610
org.diyefi.openlogviewer.propertypanel.PropertiesPane2471450
org.diyefi.openlogviewer.graphing.InfoPanel931100
org.diyefi.openlogviewer.genericlog.GenericLog1081126
org.diyefi.openlogviewer.decoder.FreeEMSBin2791009
org.diyefi.openlogviewer.graphing.GraphPositionPanel178900
org.diyefi.openlogviewer.graphing.MultiGraphLayeredPane88901
org.diyefi.openlogviewer.subframes.AboutFrame130811
org.diyefi.openlogviewer.propertypanel.PropertiesPane.PropertyPanel78710
org.diyefi.openlogviewer.optionpanel.OptionFrameV2385760
org.diyefi.openlogviewer.decoder.AbstractDecoder16607
org.diyefi.openlogviewer.propertypanel.PropertiesPane.PropertyPanel.MouseListener8500
org.diyefi.openlogviewer.optionpanel.OptionFrameV2.ActiveHeaderLabel.MouseListener34500
org.diyefi.openlogviewer.coloring.InitialLineColoring49400
org.diyefi.openlogviewer.decoder.CSVTypeLog62403
org.diyefi.openlogviewer.FramesPerSecondPanel50300
org.diyefi.openlogviewer.utils.Utilities23301
org.diyefi.openlogviewer.filefilters.MSTypeFileFilter22300
org.diyefi.openlogviewer.filefilters.FreeEMSFileFilter16300
org.diyefi.openlogviewer.optionpanel.OptionFrameV2.ModifyGraphPane80340
org.diyefi.openlogviewer.utils.MathUtils21202
org.diyefi.openlogviewer.filefilters.LogFileFilter8200
org.diyefi.openlogviewer.filefilters.CSVFileFilter8200

Averages.

NCSS averageProgram NCSSClasses averageMethods averageJavadocs average
46.404,050.000.664.581.11

Methods

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

TOP 30 Methods containing the most NCSS.

MethodsNCSSCCNJavadocs
org.diyefi.openlogviewer.graphing.SingleGraphPanel.paintDataPointsAndTraces(Graphics)100450
org.diyefi.openlogviewer.decoder.FreeEMSBin.run()94191
org.diyefi.openlogviewer.graphing.SingleGraphPanel.initGraphZoomedOut()94241
org.diyefi.openlogviewer.OpenLogViewer.OpenLogViewer()9360
org.diyefi.openlogviewer.decoder.FreeEMSBin.decodeBasicLogPacket(boolean[])83291
org.diyefi.openlogviewer.graphing.EntireGraphingPanel.initKeyBindings()6710
org.diyefi.openlogviewer.propertypanel.PropertiesPane.PropertyPanel.PropertyPanel(SingleProperty)4820
org.diyefi.openlogviewer.graphing.InfoPanel.paintComponent(Graphics)45110
org.diyefi.openlogviewer.NavBarPanel.setupNavigationButtons()4310
org.diyefi.openlogviewer.graphing.GraphPositionPanel.paintPositionData(Graphics2D,boolean)43140
org.diyefi.openlogviewer.OpenLogViewer.main(String[])4111
org.diyefi.openlogviewer.OpenLogViewer.Runnable.run()39120
org.diyefi.openlogviewer.coloring.InitialLineColoring.getBestAvailableColor()3970
org.diyefi.openlogviewer.optionpanel.OptionFrameV2.updateFromLog(GenericLog)3870
org.diyefi.openlogviewer.OpenLogViewer.generateChooser()37100
org.diyefi.openlogviewer.OpenLogViewer.openAppWideProps(Properties)37150
org.diyefi.openlogviewer.optionpanel.OptionFrameV2.ModifyGraphPane.ModifyGraphPane()3410
org.diyefi.openlogviewer.optionpanel.OptionFrameV2.remActiveHeaderPanel(ActionEvent)32110
org.diyefi.openlogviewer.graphing.GraphPositionPanel.paintPositionBar(Graphics2D,boolean)32120
org.diyefi.openlogviewer.genericlog.GenericLog.incrementPosition()3250
org.diyefi.openlogviewer.OpenLogViewer.enterFullScreen()3060
org.diyefi.openlogviewer.decoder.FreeEMSBin.FreeEMSBin(File,ResourceBundle)2881
org.diyefi.openlogviewer.subframes.AboutFrame.createSouthPanel()2510
org.diyefi.openlogviewer.NavBarPanel.setupZoomButtons()2510
org.diyefi.openlogviewer.graphing.MultiGraphLayeredPane.addGraph(String)2580
org.diyefi.openlogviewer.NavBarPanel.setupPlayButtons()2410
org.diyefi.openlogviewer.subframes.AboutFrame.AboutFrame(Properties)2310
org.diyefi.openlogviewer.subframes.AboutFrame.createCenterPanel()2310
org.diyefi.openlogviewer.decoder.CSVTypeLog.decodeLog()2271
org.diyefi.openlogviewer.propertypanel.PropertiesPane.setupForLoad()22100

Averages.

Program NCSSNCSS averageCCN averageJavadocs average
4,050.007.922.460.22

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