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.data.ui.importer.wizard 78 295 2812 134 899 128 429
pl.edu.agh.cast.data.ui.template 17 95 1063 59 365 34 169
pl.edu.agh.cast.data.template 7 58 456 39 278 31 153
pl.edu.agh.cast.data.ui.utils 12 27 259 19 108 12 69
pl.edu.agh.cast.data.ui.importer.wizard.provider 12 36 254 47 254 22 197
pl.edu.agh.cast.data.importer.data.xls 3 18 243 8 52 27 48
pl.edu.agh.cast.data.util 2 2 210 2 14 3 32
pl.edu.agh.cast.data.importer.data.util 4 17 173 17 122 14 75
pl.edu.agh.cast.data.template.xml 4 13 118 14 87 18 67
pl.edu.agh.cast.data.logging 2 12 99 13 81 5 37
pl.edu.agh.cast.data.ui.importer.action 3 9 88 11 50 7 48
pl.edu.agh.cast.data.template.export 3 9 80 8 47 3 48
pl.edu.agh.cast.data.importer.data.txt 1 5 79 4 31 11 16
pl.edu.agh.cast.data.importer.data 2 9 71 7 56 9 32
pl.edu.agh.cast.data.importer.data.ack 1 4 71 3 19 11 16
pl.edu.agh.cast.data.importer.data.csv 1 4 71 4 23 11 19
pl.edu.agh.cast.data.ui.logging 1 9 65 8 44 4 26
pl.edu.agh.cast.data 1 5 42 6 28 11 57
pl.edu.agh.cast.data.preprocessing 3 15 37 15 93 0 48
Classes total Methods total NCSS total Javadocs Javadoc lines Single lines comment Multi lines comment
157 642 6291 418 2651 361 1586

Objects

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

TOP 30 classes containing the most NCSS.

Object NCSS Methods Classes Javadocs
pl.edu.agh.cast.data.ui.importer.wizard.ValidationPageComposite 478 31 14 7
pl.edu.agh.cast.data.ui.importer.wizard.ImportPageComposite 416 25 6 13
pl.edu.agh.cast.data.ui.template.NewTemplateComposite 298 13 4 7
pl.edu.agh.cast.data.ui.importer.wizard.PreprocessingPageComposite 285 15 11 16
pl.edu.agh.cast.data.ui.importer.wizard.ErrorTypesDialog 270 13 8 10
pl.edu.agh.cast.data.ui.importer.wizard.ImportWizard 261 25 4 18
pl.edu.agh.cast.data.ui.importer.wizard.ImportPage 218 28 2 22
pl.edu.agh.cast.data.template.Template 199 28 1 15
pl.edu.agh.cast.data.util.Messages 196 1 0 0
pl.edu.agh.cast.data.ui.utils.TableViewerHelper 195 8 5 13
pl.edu.agh.cast.data.ui.template.NewTemplateWizardPage 163 26 0 12
pl.edu.agh.cast.data.ui.template.ParametersComposite 112 9 1 7
pl.edu.agh.cast.data.ui.importer.wizard.MainEntityComposite 102 11 5 5
pl.edu.agh.cast.data.importer.data.xls.JxlXlsDataImporter 99 7 0 4
pl.edu.agh.cast.data.ui.template.MappingWizardPage 97 9 0 9
pl.edu.agh.cast.data.ui.importer.wizard.ConversionWithProgressMonitor 90 7 6 3
pl.edu.agh.cast.data.importer.data.xls.PoiXlsDataImporter 77 5 0 2
pl.edu.agh.cast.data.template.AbstractTemplateUtil 76 10 0 9
pl.edu.agh.cast.data.ui.importer.wizard.PreprocessingPage 72 14 1 8
pl.edu.agh.cast.data.ui.template.ModelInfo 68 7 0 5
pl.edu.agh.cast.data.importer.data.util.ImporterUtil 68 9 1 11
pl.edu.agh.cast.data.importer.data.util.AbstractEncodingRecognizer 68 3 0 3
pl.edu.agh.cast.data.importer.data.txt.TxtDataImporter 64 5 0 4
pl.edu.agh.cast.data.ui.importer.wizard.ValidationPage 63 16 0 11
pl.edu.agh.cast.data.ui.importer.wizard.TemplateInfo 62 6 0 3
pl.edu.agh.cast.data.importer.data.csv.CsvDataImporter 58 4 0 4
pl.edu.agh.cast.data.ui.importer.wizard.ImportWizard.RunnableWithProgress 57 3 5 1
pl.edu.agh.cast.data.ui.template.NewTemplateWizard 57 11 0 7
pl.edu.agh.cast.data.importer.data.ack.AckDataImporter 57 4 0 3
pl.edu.agh.cast.data.ui.template.ComboBoxTableCreator 54 4 1 5

TOP 30 classes containing the most methods.

Object NCSS Methods Classes Javadocs
pl.edu.agh.cast.data.ui.importer.wizard.ValidationPageComposite 478 31 14 7
pl.edu.agh.cast.data.ui.importer.wizard.ImportPage 218 28 2 22
pl.edu.agh.cast.data.template.Template 199 28 1 15
pl.edu.agh.cast.data.ui.template.NewTemplateWizardPage 163 26 0 12
pl.edu.agh.cast.data.ui.importer.wizard.ImportWizard 261 25 4 18
pl.edu.agh.cast.data.ui.importer.wizard.ImportPageComposite 416 25 6 13
pl.edu.agh.cast.data.ui.importer.wizard.ValidationPage 63 16 0 11
pl.edu.agh.cast.data.ui.importer.wizard.PreprocessingPageComposite 285 15 11 16
pl.edu.agh.cast.data.ui.importer.wizard.PreprocessingPage 72 14 1 8
pl.edu.agh.cast.data.ui.importer.wizard.ErrorTypesDialog 270 13 8 10
pl.edu.agh.cast.data.ui.template.NewTemplateComposite 298 13 4 7
pl.edu.agh.cast.data.ui.importer.wizard.MainEntityComposite 102 11 5 5
pl.edu.agh.cast.data.ui.template.NewTemplateWizard 57 11 0 7
pl.edu.agh.cast.data.template.AbstractTemplateUtil 76 10 0 9
pl.edu.agh.cast.data.ui.logging.ImportLogFileDialog 46 9 0 8
pl.edu.agh.cast.data.ui.template.MappingWizardPage 97 9 0 9
pl.edu.agh.cast.data.ui.template.ParametersComposite 112 9 1 7
pl.edu.agh.cast.data.importer.data.util.ImporterUtil 68 9 1 11
pl.edu.agh.cast.data.logging.FileRawDataLogger 35 8 0 8
pl.edu.agh.cast.data.ui.importer.wizard.provider.ListLabelProvider 19 8 0 9
pl.edu.agh.cast.data.ui.utils.TableViewerHelper 195 8 5 13
pl.edu.agh.cast.data.ui.importer.wizard.MainEntityPage 21 7 0 5
pl.edu.agh.cast.data.ui.importer.wizard.ConversionWithProgressMonitor 90 7 6 3
pl.edu.agh.cast.data.ui.template.ModelInfo 68 7 0 5
pl.edu.agh.cast.data.importer.data.xls.JxlXlsDataImporter 99 7 0 4
pl.edu.agh.cast.data.ui.importer.wizard.TemplateInfo 62 6 0 3
pl.edu.agh.cast.data.ui.importer.wizard.provider.TemplateTreeContentProvider 25 6 0 7
pl.edu.agh.cast.data.ui.importer.wizard.PreprocessingPageComposite.StringTableLabelProvider 10 6 0 4
pl.edu.agh.cast.data.importer.data.AbstractDataImporterBase 51 6 0 3
pl.edu.agh.cast.data.importer.data.xls.AbstractXlsDataImporter 18 6 0 2

Averages.

NCSS average Program NCSS Classes average Methods average Javadocs average
37.33 6,291.00 0.53 4.09 2.80

Methods

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

TOP 30 Methods containing the most NCSS.

Methods NCSS CCN Javadocs
pl.edu.agh.cast.data.ui.template.NewTemplateComposite.initGUI() 227 6 0
pl.edu.agh.cast.data.ui.importer.wizard.ImportPageComposite.initGUI() 198 3 0
pl.edu.agh.cast.data.ui.importer.wizard.ValidationPageComposite.initGUI() 146 2 0
pl.edu.agh.cast.data.ui.importer.wizard.ErrorTypesDialog.createControl() 109 2 0
pl.edu.agh.cast.data.ui.importer.wizard.PreprocessingPageComposite.initGUI() 88 2 0
pl.edu.agh.cast.data.ui.utils.TableViewerHelper.initErrorTable(TableViewer,String[],boolean,int) 68 13 1
pl.edu.agh.cast.data.ui.utils.TableViewerHelper.initTable(TableViewer,String[],String[][],boolean,int,BrokenDataInfo,boolean,ValidationPageComposite) 64 11 1
pl.edu.agh.cast.data.ui.importer.wizard.ConversionWithProgressMonitor.run(IProgressMonitor) 59 7 1
pl.edu.agh.cast.data.ui.importer.wizard.ValidationPageComposite.createPopupMenu(Control) 48 1 0
pl.edu.agh.cast.data.ui.importer.wizard.ErrorTypesDialog.initTable() 46 6 0
pl.edu.agh.cast.data.ui.importer.wizard.PreprocessingPageComposite.initItemsTable() 45 3 0
pl.edu.agh.cast.data.ui.template.ParametersComposite.fillParametersComposite() 40 4 0
pl.edu.agh.cast.data.ui.importer.wizard.ImportPage.validateImporterType() 39 19 1
pl.edu.agh.cast.data.ui.importer.wizard.ImportWizard.performFinish() 38 12 1
pl.edu.agh.cast.data.ui.importer.wizard.MainEntityComposite.initTableViewer() 37 3 0
pl.edu.agh.cast.data.importer.data.ack.AckDataImporter.readData(InputStream,long,String,Charset) 34 10 1
pl.edu.agh.cast.data.ui.template.ImporterOptionsDialog.init() 33 2 0
pl.edu.agh.cast.data.ui.importer.wizard.PreprocessingPage.getNextPage() 32 7 1
pl.edu.agh.cast.data.ui.importer.wizard.ImportPageComposite.handlePreviewAction() 32 7 0
pl.edu.agh.cast.data.importer.data.xls.JxlXlsDataImporter.cell2String(Cell) 32 25 0
pl.edu.agh.cast.data.ui.utils.TableViewerHelper.AbstractColumnSorter.doCompare(Object,Object) 29 10 1
pl.edu.agh.cast.data.importer.data.txt.TxtDataImporter.readData(InputStream,long,String,Charset) 28 7 1
pl.edu.agh.cast.data.ui.importer.wizard.ValidationPageComposite.updateStats() 27 5 0
pl.edu.agh.cast.data.importer.data.util.AbstractEncodingRecognizer.getRowsEncoding(DataRow) 27 15 0
pl.edu.agh.cast.data.template.Template.equals(Object) 27 23 1
pl.edu.agh.cast.data.ui.importer.wizard.ImportPage.getNextPage() 26 3 1
pl.edu.agh.cast.data.ui.importer.wizard.ImportPageComposite.handleLoadTemplateAction(Button) 26 10 0
pl.edu.agh.cast.data.ui.template.MappingWizardPage.createTable(ModelColumn[],TabularData) 25 9 1
pl.edu.agh.cast.data.importer.data.csv.CsvDataImporter.readData(InputStream,long,String,Charset) 25 7 1
pl.edu.agh.cast.data.ui.importer.wizard.ValidationPageComposite.ignoreFirstLines(int) 24 9 0

Averages.

Program NCSS NCSS average CCN average Javadocs average
6,291.00 7.72 2.41 0.52

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