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.fest.swing.driver18476542115163338342512
org.fest.swing.fixture51931293591256860775
org.fest.swing.core363481482258113741708
org.fest.swing.monitor11784373216614169
org.fest.swing.input8683822412215129
org.fest.swing.hierarchy16653773618716182
org.fest.swing.format1346342351881199
org.fest.swing.util1149294412590188
org.fest.swing.query2448252473420303
org.fest.swing.keystroke5161931795178
org.fest.swing.finder852189272830170
org.fest.swing.applet43515633174060
org.fest.swing.launcher41912516182163
org.fest.swing.awt11611812631526
org.fest.swing.edt420961269060
org.fest.swing.core.matcher5259020117075
org.fest.swing.timing3218818110048
org.fest.swing.data21076758046
org.fest.swing.listener295710601028
org.fest.swing.exception614521886090
org.fest.swing.image29461062031
org.fest.swing.task3838527045
org.fest.swing.cell5123117131075
org.fest.swing.annotation1528213035
Classes totalMethods totalNCSS totalJavadocsJavadoc linesSingle lines commentMulti lines comment
4092669120952125129551486095

Objects

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

TOP 30 classes containing the most NCSS.

ObjectNCSSMethodsClassesJavadocs
org.fest.swing.core.RobotFixture34574354
org.fest.swing.driver.JTreeDriver15634222
org.fest.swing.fixture.ContainerFixture15072073
org.fest.swing.driver.JTableDriver14736135
org.fest.swing.fixture.JTableFixture14050047
org.fest.swing.driver.JListDriver12731226
org.fest.swing.core.AWTEventGenerator1241307
org.fest.swing.fixture.JListFixture12143041
org.fest.swing.driver.JComboBoxDriver12025013
org.fest.swing.driver.JTextComponentDriver11525014
org.fest.swing.fixture.JTreeFixture11338037
org.fest.swing.keystroke.KeyStrokeMappingProvider_en104102
org.fest.swing.driver.ComponentDriver9833030
org.fest.swing.fixture.FrameFixture9833032
org.fest.swing.awt.AWT9716212
org.fest.swing.fixture.JOptionPaneFixture9534033
org.fest.swing.fixture.JComboBoxFixture9332031
org.fest.swing.fixture.JScrollBarFixture9331030
org.fest.swing.fixture.JInternalFrameFixture9231030
org.fest.swing.core.BasicComponentFinder9130023
org.fest.swing.fixture.DialogFixture8930029
org.fest.swing.fixture.JTextComponentFixture8930029
org.fest.swing.input.MouseInfo861701
org.fest.swing.input.InputState8423116
org.fest.swing.fixture.JSpinnerFixture8127026
org.fest.swing.fixture.JFileChooserFixture7627025
org.fest.swing.fixture.JTableCellFixture7527025
org.fest.swing.core.Settings7423019
org.fest.swing.fixture.JCheckBoxFixture7425024
org.fest.swing.fixture.JToggleButtonFixture7425024

TOP 30 classes containing the most methods.

ObjectNCSSMethodsClassesJavadocs
org.fest.swing.core.RobotFixture34574354
org.fest.swing.fixture.ContainerFixture15072073
org.fest.swing.fixture.JTableFixture14050047
org.fest.swing.core.Robot4948048
org.fest.swing.fixture.JListFixture12143041
org.fest.swing.fixture.JTreeFixture11338037
org.fest.swing.driver.JTableDriver14736135
org.fest.swing.driver.JTreeDriver15634222
org.fest.swing.fixture.JOptionPaneFixture9534033
org.fest.swing.driver.ComponentDriver9833030
org.fest.swing.fixture.FrameFixture9833032
org.fest.swing.fixture.JComboBoxFixture9332031
org.fest.swing.driver.JListDriver12731226
org.fest.swing.fixture.JInternalFrameFixture9231030
org.fest.swing.fixture.JScrollBarFixture9331030
org.fest.swing.core.BasicComponentFinder9130023
org.fest.swing.fixture.DialogFixture8930029
org.fest.swing.fixture.JTextComponentFixture8930029
org.fest.swing.fixture.JFileChooserFixture7627025
org.fest.swing.fixture.JSpinnerFixture8127026
org.fest.swing.fixture.JTableCellFixture7527025
org.fest.swing.driver.JComboBoxDriver12025013
org.fest.swing.driver.JTextComponentDriver11525014
org.fest.swing.fixture.JCheckBoxFixture7425024
org.fest.swing.fixture.JToggleButtonFixture7425024
org.fest.swing.core.Settings7423019
org.fest.swing.fixture.JRadioButtonFixture6823022
org.fest.swing.input.InputState8423116
org.fest.swing.fixture.JScrollPaneFixture6322020
org.fest.swing.fixture.JSliderFixture6622021

Averages.

NCSS averageProgram NCSSClasses averageMethods averageJavadocs average
23.1112,095.000.456.535.20

Methods

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

TOP 30 Methods containing the most NCSS.

MethodsNCSSCCNJavadocs
org.fest.swing.keystroke.KeyStrokeMappingProvider_en.keyStrokeMappings()10311
org.fest.swing.core.AWTEventGenerator.moveMouse(Component,int,int)2681
org.fest.swing.driver.JTreePathFinder.findMatchingPath(JTree,String)26120
org.fest.swing.core.RobotFixture.focus(Component,boolean)2190
org.fest.swing.driver.JToolBarLocation.dockLocation(JToolBar,Container,String)19101
org.fest.swing.core.AWTEventGenerator.releaseMouse(int)1881
org.fest.swing.util.Arrays.format(String[][])18101
org.fest.swing.core.RobotFixture.click(Component,Point,MouseButton,int)1741
org.fest.swing.input.DisposedWindowMonitor.isDuplicateDispose(AWTEvent)1690
org.fest.swing.util.Arrays.assertEquals(String[][],String[][],String)16141
org.fest.swing.core.AWTEventGenerator.pressMouse(Component,Point,int)1571
org.fest.swing.input.InputState.updateState(MouseEvent)1570
org.fest.swing.awt.AWT.locationOnScreenOf(Component)1491
org.fest.swing.core.AWTEventPoster.verifyPostedEvent(Component,AWTEvent)1460
org.fest.swing.input.MouseInfo.component()1470
org.fest.swing.monitor.ContextMonitor.processEvent(ComponentEvent)14120
org.fest.swing.core.AWTEventGenerator.postMouseMotion(Component,int,Point)1320
org.fest.swing.core.RobotFixture.waitForComponentToBeReady(Component,long)1380
org.fest.swing.core.RobotFixture.waitForIdle(EventQueue)1360
org.fest.swing.driver.Actions.findActionKey(String,ActionMap)1380
org.fest.swing.driver.ComponentDriver.waitForShowing(Component,long)1381
org.fest.swing.driver.DragAndDrop.drop(Component,Point)1351
org.fest.swing.core.InputModifiers.modifiersMatch(InputEvent,int)12110
org.fest.swing.core.RobotFixture.type(char)1261
org.fest.swing.driver.JComboBoxDriver.dropDownList()1271
org.fest.swing.driver.JListDriver.selectItems(JList,String[])1271
org.fest.swing.driver.JListDriver.selectItems(JList,int[])1271
org.fest.swing.driver.JTreeDriver.selectRows(JTree,int[])1271
org.fest.swing.driver.JTreePathFinder.splitPath(String)1230
org.fest.swing.format.JTreeFormatter.selectionPaths(JTree)1270

Averages.

Program NCSSNCSS averageCCN averageJavadocs average
12,095.003.121.460.60

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