Fork me on GitHub

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
com.orangesignal.csv 16 354 1493 297 1768 88 319
com.orangesignal.csv.filters 73 424 1481 417 3109 9 1131
com.orangesignal.csv.io 12 166 1117 131 990 162 250
com.orangesignal.csv.bean 13 89 557 73 516 52 219
com.orangesignal.csv.handlers 12 85 548 62 464 26 206
com.orangesignal.csv.manager 18 143 465 101 742 4 329
com.orangesignal.csv.entryfilters 6 41 196 43 270 0 110
com.orangesignal.csv.annotation 2 10 60 3 17 0 293
Classes total Methods total NCSS total Javadocs Javadoc lines Single lines comment Multi lines comment
152 1312 5917 1127 7876 341 2857

Objects

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

TOP 30 classes containing the most NCSS.

Object NCSS Methods Classes Javadocs
com.orangesignal.csv.CsvResultSet 532 191 0 133
com.orangesignal.csv.CsvReader 322 21 0 18
com.orangesignal.csv.Csv 159 34 0 35
com.orangesignal.csv.filters.SimpleCsvNamedValueFilter 146 48 0 47
com.orangesignal.csv.io.CsvEntityReader 124 14 0 11
com.orangesignal.csv.bean.CsvEntityTemplate 121 10 0 6
com.orangesignal.csv.CsvConfig 118 41 0 42
com.orangesignal.csv.io.CsvEntityWriter 109 17 0 14
com.orangesignal.csv.filters.SimpleBeanFilter 104 34 0 33
com.orangesignal.csv.CsvWriter 102 11 0 10
com.orangesignal.csv.filters.CsvExpressions 98 49 0 50
com.orangesignal.csv.io.CsvColumnPositionMappingBeanReader 97 14 0 11
com.orangesignal.csv.io.CsvColumnNameMappingBeanReader 94 14 0 11
com.orangesignal.csv.bean.SimpleCsvValueConverter 90 6 0 4
com.orangesignal.csv.filters.SimpleCsvValueFilter 83 27 0 26
com.orangesignal.csv.io.CsvColumnNameMappingBeanWriter 81 16 0 13
com.orangesignal.csv.io.CsvColumnPositionMappingBeanWriter 81 16 0 13
com.orangesignal.csv.io.CsvBeanWriter 79 16 0 13
com.orangesignal.csv.bean.AbstractCsvBeanTemplate 78 15 0 16
com.orangesignal.csv.io.CsvColumnNameMapReader 77 13 0 10
com.orangesignal.csv.io.CsvBeanReader 75 14 0 11
com.orangesignal.csv.filters.BeanExpressionUtils 69 16 0 17
com.orangesignal.csv.io.CsvColumnNameMapWriter 68 13 0 10
com.orangesignal.csv.manager.AbstractCsvLoader 66 27 0 3
com.orangesignal.csv.filters.BeanExpressions 64 32 0 33
com.orangesignal.csv.filters.CsvExpressionUtils 57 16 0 17
com.orangesignal.csv.handlers.ColumnPositionMappingBeanListHandler 56 11 0 10
com.orangesignal.csv.CsvResultSetMetaData 55 24 0 22
com.orangesignal.csv.handlers.ColumnNameMappingBeanListHandler 51 9 0 3
com.orangesignal.csv.handlers.BeanListHandler 50 8 0 4

TOP 30 classes containing the most methods.

Object NCSS Methods Classes Javadocs
com.orangesignal.csv.CsvResultSet 532 191 0 133
com.orangesignal.csv.filters.CsvExpressions 98 49 0 50
com.orangesignal.csv.filters.SimpleCsvNamedValueFilter 146 48 0 47
com.orangesignal.csv.CsvConfig 118 41 0 42
com.orangesignal.csv.Csv 159 34 0 35
com.orangesignal.csv.filters.SimpleBeanFilter 104 34 0 33
com.orangesignal.csv.filters.BeanExpressions 64 32 0 33
com.orangesignal.csv.filters.SimpleCsvValueFilter 83 27 0 26
com.orangesignal.csv.manager.AbstractCsvLoader 66 27 0 3
com.orangesignal.csv.manager.CsvLoader 26 25 0 26
com.orangesignal.csv.CsvResultSetMetaData 55 24 0 22
com.orangesignal.csv.CsvReader 322 21 0 18
com.orangesignal.csv.io.CsvEntityWriter 109 17 0 14
com.orangesignal.csv.filters.BeanExpressionUtils 69 16 0 17
com.orangesignal.csv.filters.CsvExpressionUtils 57 16 0 17
com.orangesignal.csv.io.CsvBeanWriter 79 16 0 13
com.orangesignal.csv.io.CsvColumnNameMappingBeanWriter 81 16 0 13
com.orangesignal.csv.io.CsvColumnPositionMappingBeanWriter 81 16 0 13
com.orangesignal.csv.bean.AbstractCsvBeanTemplate 78 15 0 16
com.orangesignal.csv.bean.CsvColumnPositionMappingBeanTemplate 44 14 0 6
com.orangesignal.csv.io.CsvBeanReader 75 14 0 11
com.orangesignal.csv.io.CsvColumnNameMappingBeanReader 94 14 0 11
com.orangesignal.csv.io.CsvColumnPositionMappingBeanReader 97 14 0 11
com.orangesignal.csv.io.CsvEntityReader 124 14 0 11
com.orangesignal.csv.io.CsvColumnNameMapReader 77 13 0 10
com.orangesignal.csv.io.CsvColumnNameMapWriter 68 13 0 10
com.orangesignal.csv.bean.CsvColumnNameMappingBeanTemplate 41 12 0 6
com.orangesignal.csv.handlers.AbstractBeanListHandler 37 12 0 13
com.orangesignal.csv.CsvWriter 102 11 0 10
com.orangesignal.csv.handlers.ColumnPositionMappingBeanListHandler 56 11 0 10

Averages.

NCSS average Program NCSS Classes average Methods average Javadocs average
33.72 5,917.00 0.00 8.63 7.41

Methods

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

TOP 30 Methods containing the most NCSS.

Methods NCSS CCN Javadocs
com.orangesignal.csv.CsvReader.readCsvToken() 116 50 1
com.orangesignal.csv.io.CsvEntityReader.convert(String) 53 28 0
com.orangesignal.csv.bean.SimpleCsvValueConverter.convert(String,Class) 52 51 0
com.orangesignal.csv.CsvReader.readCsvTokens() 52 34 1
com.orangesignal.csv.CsvWriter.writeValues(String) 49 27 1
com.orangesignal.csv.io.CsvEntityWriter.toValues(T) 38 25 0
com.orangesignal.csv.bean.CsvEntityTemplate.createWritableColumnNames() 35 14 1
com.orangesignal.csv.bean.CsvEntityTemplate.createColumnNames() 33 12 1
com.orangesignal.csv.CsvResultSet.getBoolean(int) 29 20 0
com.orangesignal.csv.CsvReader.cacheLine() 27 9 1
com.orangesignal.csv.io.CsvColumnNameMappingBeanReader.convert(String) 23 10 0
com.orangesignal.csv.io.CsvColumnPositionMappingBeanReader.convert(String) 23 10 0
com.orangesignal.csv.handlers.BeanListHandler.load(CsvReader,boolean) 21 17 0
com.orangesignal.csv.handlers.ColumnNameMappingBeanListHandler.load(CsvReader,boolean) 21 17 0
com.orangesignal.csv.handlers.ColumnPositionMappingBeanListHandler.load(CsvReader,boolean) 21 17 0
com.orangesignal.csv.handlers.CsvEntityListHandler.load(CsvReader,boolean) 21 17 0
com.orangesignal.csv.bean.CsvEntityTemplate.prepare(String,Field[]) 17 7 0
com.orangesignal.csv.filters.BeanExpressionUtils.isEmpty(Object,String) 16 11 1
com.orangesignal.csv.bean.CsvEntityTemplate.createFormat(CsvColumn,Field) 14 8 0
com.orangesignal.csv.bean.FormatUtils.mergeFormatPattern(Format,Format) 14 8 0
com.orangesignal.csv.CsvReader.readTokens() 13 5 1
com.orangesignal.csv.CsvWriter.CsvWriter(Writer,int,CsvConfig) 13 5 1
com.orangesignal.csv.handlers.ResultSetHandler.save(ResultSet,CsvWriter) 13 6 0
com.orangesignal.csv.bean.CsvBeanTemplate.isTargetName(String) 12 13 1
com.orangesignal.csv.Csv.load(ZipFile,String,CsvConfig,T,ZipEntryFilter) 12 4 1
com.orangesignal.csv.Csv.load(ZipFile,CsvConfig,T,ZipEntryFilter) 12 4 1
com.orangesignal.csv.CsvReader.CsvReader(Reader,int,CsvConfig) 12 4 1
com.orangesignal.csv.CsvReader.removeLeadingWhitespaces(String) 12 7 0
com.orangesignal.csv.CsvReader.removeTrailingWhitespaces(String) 12 7 0
com.orangesignal.csv.entryfilters.EntryNameFilter.toString() 12 4 0

Averages.

Program NCSS NCSS average CCN average Javadocs average
5,917.00 3.61 1.96 0.74

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