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.

Package Classes Methods NCSS Javadocs Javadoc lines Single lines comment Multi lines comment
pl.edu.agh.cast.dataview.ui 15 62 312 40 206 9 112
pl.edu.agh.cast.dataview.ui.editor 4 25 131 15 88 3 35
pl.edu.agh.cast.dataview.view.util 4 17 112 6 33 4 32
pl.edu.agh.cast.dataview.column.filter.impl 12 17 110 17 100 7 191
pl.edu.agh.cast.dataview.ui.filter 5 13 108 7 46 0 32
pl.edu.agh.cast.dataview.view 4 18 93 9 73 2 64
pl.edu.agh.cast.dataview.ui.action 3 12 83 15 84 3 48
pl.edu.agh.cast.dataview.column.provider.impl 7 10 69 11 58 0 112
pl.edu.agh.cast.dataview.column.filter.cnf 4 11 55 15 85 2 64
pl.edu.agh.cast.dataview.column.type.impl 4 12 44 4 23 1 67
pl.edu.agh.cast.dataview 1 5 38 6 28 15 61
pl.edu.agh.cast.dataview.column.type 3 8 33 7 46 1 48
pl.edu.agh.cast.dataview.column.filter 3 8 27 9 64 0 48
pl.edu.agh.cast.dataview.util 1 1 24 0 0 3 16
pl.edu.agh.cast.dataview.column.provider 3 4 14 6 39 0 48
pl.edu.agh.cast.dataview.provider.impl 1 1 8 2 10 0 16
pl.edu.agh.cast.dataview.provider 1 1 3 2 13 0 16
Classes total Methods total NCSS total Javadocs Javadoc lines Single lines comment Multi lines comment
75 225 1264 171 996 50 1010

Objects

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

TOP 30 classes containing the most NCSS.

Object NCSS Methods Classes Javadocs
pl.edu.agh.cast.dataview.ui.DataTableColumn 112 18 4 9
pl.edu.agh.cast.dataview.ui.DataTableColumnMenu 86 12 4 6
pl.edu.agh.cast.dataview.ui.filter.NewFilterDialog 70 6 3 3
pl.edu.agh.cast.dataview.ui.editor.DataTableEditor 67 14 2 9
pl.edu.agh.cast.dataview.column.filter.impl.AbstractDateColumnFilter 42 4 2 2
pl.edu.agh.cast.dataview.view.util.DataViewFactory 41 9 1 3
pl.edu.agh.cast.dataview.view.util.ColumnTypes 40 8 1 3
pl.edu.agh.cast.dataview.Activator 31 5 0 6
pl.edu.agh.cast.dataview.ui.action.OpenDataTableEditor 30 4 0 5
pl.edu.agh.cast.dataview.ui.editor.TableEditorInput 30 9 0 6
pl.edu.agh.cast.dataview.view.DataView 30 5 0 3
pl.edu.agh.cast.dataview.column.type.AbstractColumnType 26 6 0 3
pl.edu.agh.cast.dataview.util.Messages 22 1 0 0
pl.edu.agh.cast.dataview.ui.ColumnFiltersController 21 6 0 6
pl.edu.agh.cast.dataview.column.filter.cnf.DisjunctionFilter 19 4 0 5
pl.edu.agh.cast.dataview.view.DataViewColumnType 18 5 0 2
pl.edu.agh.cast.dataview.ui.DataTableLabelProvider 16 7 0 8
pl.edu.agh.cast.dataview.ui.action.EnableFilteringAction 15 3 0 4
pl.edu.agh.cast.dataview.column.filter.AbstractColumnFilter 15 4 0 3
pl.edu.agh.cast.dataview.view.DataViewColumn 14 4 0 2
pl.edu.agh.cast.dataview.view.DataViewColumnFilter 14 4 0 2
pl.edu.agh.cast.dataview.column.filter.cnf.SingleFilter 14 3 0 4
pl.edu.agh.cast.dataview.ui.filter.ColumnFilter 12 4 0 4
pl.edu.agh.cast.dataview.column.provider.impl.EntitieColumnValueProvider 11 2 0 3
pl.edu.agh.cast.dataview.column.type.impl.BooleanColumnType 10 3 0 1
pl.edu.agh.cast.dataview.ui.DataTableColumnSorter 8 2 0 2
pl.edu.agh.cast.dataview.ui.DataTableContentProvider 8 4 0 5
pl.edu.agh.cast.dataview.column.filter.cnf.NegationFilter 8 3 0 4
pl.edu.agh.cast.dataview.column.type.impl.DateColumnType 8 3 0 1
pl.edu.agh.cast.dataview.column.filter.impl.StringRegexColumnFilter 7 2 0 2

TOP 30 classes containing the most methods.

Object NCSS Methods Classes Javadocs
pl.edu.agh.cast.dataview.ui.DataTableColumn 112 18 4 9
pl.edu.agh.cast.dataview.ui.editor.DataTableEditor 67 14 2 9
pl.edu.agh.cast.dataview.ui.DataTableColumnMenu 86 12 4 6
pl.edu.agh.cast.dataview.ui.editor.TableEditorInput 30 9 0 6
pl.edu.agh.cast.dataview.view.util.DataViewFactory 41 9 1 3
pl.edu.agh.cast.dataview.view.util.ColumnTypes 40 8 1 3
pl.edu.agh.cast.dataview.ui.DataTableLabelProvider 16 7 0 8
pl.edu.agh.cast.dataview.ui.ColumnFiltersController 21 6 0 6
pl.edu.agh.cast.dataview.ui.filter.NewFilterDialog 70 6 3 3
pl.edu.agh.cast.dataview.column.type.AbstractColumnType 26 6 0 3
pl.edu.agh.cast.dataview.ui.action.ShowStatisticsAction 6 5 0 6
pl.edu.agh.cast.dataview.Activator 31 5 0 6
pl.edu.agh.cast.dataview.view.DataView 30 5 0 3
pl.edu.agh.cast.dataview.view.DataViewColumnType 18 5 0 2
pl.edu.agh.cast.dataview.ui.filter.ColumnFilter 12 4 0 4
pl.edu.agh.cast.dataview.ui.DataTableContentProvider 8 4 0 5
pl.edu.agh.cast.dataview.ui.action.OpenDataTableEditor 30 4 0 5
pl.edu.agh.cast.dataview.view.DataViewColumn 14 4 0 2
pl.edu.agh.cast.dataview.view.DataViewColumnFilter 14 4 0 2
pl.edu.agh.cast.dataview.column.filter.impl.AbstractDateColumnFilter 42 4 2 2
pl.edu.agh.cast.dataview.column.filter.AbstractColumnFilter 15 4 0 3
pl.edu.agh.cast.dataview.column.filter.cnf.DisjunctionFilter 19 4 0 5
pl.edu.agh.cast.dataview.ui.IFilterModifiedListener 4 3 0 4
pl.edu.agh.cast.dataview.ui.action.EnableFilteringAction 15 3 0 4
pl.edu.agh.cast.dataview.column.filter.cnf.NegationFilter 8 3 0 4
pl.edu.agh.cast.dataview.column.filter.cnf.SingleFilter 14 3 0 4
pl.edu.agh.cast.dataview.column.type.impl.BooleanColumnType 10 3 0 1
pl.edu.agh.cast.dataview.column.type.impl.DateColumnType 8 3 0 1
pl.edu.agh.cast.dataview.column.type.impl.LongColumnType 7 3 0 1
pl.edu.agh.cast.dataview.column.type.impl.StringColumnType 7 3 0 1

Averages.

NCSS average Program NCSS Classes average Methods average Javadocs average
13.45 1,264.00 0.23 3.00 2.28

Methods

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

TOP 30 Methods containing the most NCSS.

Methods NCSS CCN Javadocs
pl.edu.agh.cast.dataview.ui.filter.NewFilterDialog.createComposite() 30 2 0
pl.edu.agh.cast.dataview.ui.DataTableColumnMenu.addNewFilterMenu(ColumnFilter) 21 2 0
pl.edu.agh.cast.dataview.ui.action.OpenDataTableEditor.run(IAction) 18 7 1
pl.edu.agh.cast.dataview.view.DataView.getColumns(IElement) 16 5 1
pl.edu.agh.cast.dataview.column.filter.impl.AbstractDateColumnFilter.trimDate(Date,DateType) 16 4 0
pl.edu.agh.cast.dataview.column.type.AbstractColumnType.compare(Object,Object) 14 13 1
pl.edu.agh.cast.dataview.ui.editor.TableEditorInput.equals(Object) 13 10 1
pl.edu.agh.cast.dataview.ui.editor.DataTableEditor.createTableMenu() 13 1 0
pl.edu.agh.cast.dataview.ui.DataTableColumn.configureListeners() 12 1 0
pl.edu.agh.cast.dataview.ui.DataTableColumn.adjustColumnWith() 12 2 1
pl.edu.agh.cast.dataview.ui.filter.NewFilterDialog.addListeners() 11 1 0
pl.edu.agh.cast.dataview.ui.filter.NewFilterDialog.open() 10 4 1
pl.edu.agh.cast.dataview.ui.editor.DataTableEditor.configureColumns() 10 2 0
pl.edu.agh.cast.dataview.column.filter.impl.AbstractDateColumnFilter.convertFilterValue(String) 10 10 0
pl.edu.agh.cast.dataview.ui.DataTableColumn.addLabelsEqualsFilter(String) 9 1 1
pl.edu.agh.cast.dataview.view.util.DataViewFactory.loadProviders() 9 5 0
pl.edu.agh.cast.dataview.view.util.ColumnTypes.loadColumnTypes() 9 5 0
pl.edu.agh.cast.dataview.ui.DataTableColumnMenu.createFilterMenu(Shell) 8 1 1
pl.edu.agh.cast.dataview.ui.DataTableColumnMenu.createConcreteFilterMenuItem(DataViewColumnFilter,Menu) 8 1 0
pl.edu.agh.cast.dataview.ui.DataTableColumnMenu.filterRemoved(ColumnFilter) 8 4 1
pl.edu.agh.cast.dataview.ui.DataTableColumn.init() 8 1 0
pl.edu.agh.cast.dataview.ui.DataTableColumn.configureFilterButton() 8 2 0
pl.edu.agh.cast.dataview.ui.DataTableColumn.moveFilterButton() 8 3 0
pl.edu.agh.cast.dataview.ui.action.EnableFilteringAction.setActiveEditor(IAction,IEditorPart) 8 2 1
pl.edu.agh.cast.dataview.ui.editor.DataTableEditor.init(IEditorSite,IEditorInput) 8 2 1
pl.edu.agh.cast.dataview.column.filter.cnf.DisjunctionFilter.toString() 8 2 1
pl.edu.agh.cast.dataview.ui.DataTableColumnMenu.createClearFiltersMenuItem() 7 1 0
pl.edu.agh.cast.dataview.ui.DataTableColumn.getUniqueColumValues() 7 3 1
pl.edu.agh.cast.dataview.ui.action.OpenDataTableEditor.selectionChanged(IAction,ISelection) 7 4 1
pl.edu.agh.cast.dataview.ui.editor.DataTableEditor.createPartControl(Composite) 7 1 1

Averages.

Program NCSS NCSS average CCN average Javadocs average
1,264.00 3.67 1.63 0.49

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