JavaNCSS Metric Results

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

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

Packages

Packages

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

Packages sorted by NCSS.

Package Classes Methods NCSS Javadocs Javadoc lines Single lines comment Multi lines comment
org.csveed.bean 13 163 672 42 324 2 4
org.csveed.bean.conversion 22 75 479 1 5 6 8
org.csveed.row 11 112 437 33 170 0 8
org.csveed.token 6 48 343 1 6 7 20
org.csveed.api 4 95 222 51 314 0 6
org.csveed.report 7 33 151 5 25 1 5
org.csveed.common 5 36 117 0 0 0 0
org.csveed.annotations 0 0 72 0 0 0 164
Classes total Methods total NCSS total Javadocs Javadoc lines Single lines comment Multi lines comment
68 562 2493 133 844 16 215

Objects

Objects

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

TOP 30 classes containing the most NCSS.

Object NCSS Methods Classes Javadocs
org.csveed.token.ParseStateMachine 174 12 0 1
org.csveed.api.CsvClientImpl 139 47 0 0
org.csveed.bean.BeanInstructionsImpl 114 30 0 0
org.csveed.bean.conversion.NumberUtils 110 6 0 0
org.csveed.bean.BeanProperties 93 23 0 0
org.csveed.token.SymbolMapping 91 16 0 0
org.csveed.row.RowReaderImpl 76 13 0 1
org.csveed.row.RowWriterImpl 69 15 0 0
org.csveed.bean.BeanParser 65 7 0 0
org.csveed.bean.BeanReaderImpl 64 15 0 0
org.csveed.row.LineWithInfo 62 11 0 0
org.csveed.report.RowReport 59 10 0 0
org.csveed.row.RowInstructionsImpl 59 19 0 0
org.csveed.common.Column 57 19 0 0
org.csveed.bean.BeanProperty 51 19 0 0
org.csveed.bean.AbstractMapper 46 9 0 0
org.csveed.bean.conversion.CustomBooleanConverter 45 4 0 0
org.csveed.api.CsvClient 37 36 0 37
org.csveed.bean.BeanWriterImpl 36 6 0 0
org.csveed.bean.conversion.DefaultConverters 34 4 0 0
org.csveed.bean.conversion.CustomNumberConverter 31 5 0 0
org.csveed.bean.BeanInstructions 29 28 0 29
org.csveed.bean.conversion.BeanWrapper 29 5 0 0
org.csveed.row.HeaderImpl 28 6 0 0
org.csveed.bean.conversion.CharacterConverter 26 4 0 0
org.csveed.bean.conversion.DateConverter 26 4 0 0
org.csveed.row.RowImpl 26 10 0 1
org.csveed.bean.conversion.ConversionUtil 24 4 0 0
org.csveed.bean.DynamicColumn 21 7 0 1
org.csveed.report.CsvException 21 4 0 0

TOP 30 classes containing the most methods.

Object NCSS Methods Classes Javadocs
org.csveed.api.CsvClientImpl 139 47 0 0
org.csveed.api.CsvClient 37 36 0 37
org.csveed.bean.BeanInstructionsImpl 114 30 0 0
org.csveed.bean.BeanInstructions 29 28 0 29
org.csveed.bean.BeanProperties 93 23 0 0
org.csveed.bean.BeanProperty 51 19 0 0
org.csveed.common.Column 57 19 0 0
org.csveed.row.RowInstructionsImpl 59 19 0 0
org.csveed.row.RowInstructions 17 16 0 16
org.csveed.token.SymbolMapping 91 16 0 0
org.csveed.bean.BeanReaderImpl 64 15 0 0
org.csveed.row.RowWriterImpl 69 15 0 0
org.csveed.row.RowReaderImpl 76 13 0 1
org.csveed.token.ParseStateMachine 174 12 0 1
org.csveed.row.LineWithInfo 62 11 0 0
org.csveed.report.RowReport 59 10 0 0
org.csveed.row.RowImpl 26 10 0 1
org.csveed.bean.AbstractMapper 46 9 0 0
org.csveed.api.Row 9 8 0 9
org.csveed.bean.BeanParser 65 7 0 0
org.csveed.bean.BeanReader 8 7 0 8
org.csveed.bean.DynamicColumn 21 7 0 1
org.csveed.row.RowReader 8 7 0 8
org.csveed.row.RowWriter 8 7 0 7
org.csveed.token.ParseState 19 7 0 0
org.csveed.bean.BeanWriterImpl 36 6 0 0
org.csveed.bean.conversion.NumberUtils 110 6 0 0
org.csveed.common.ColumnIndexKey 18 6 0 0
org.csveed.common.ColumnNameKey 18 6 0 0
org.csveed.row.HeaderImpl 28 6 0 0

Averages.

NCSS average Program NCSS Classes average Methods average Javadocs average
30.90 2,493.00 0.00 8.26 1.96

Methods

Methods

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

TOP 30 Methods containing the most NCSS.

Methods NCSS CCN Javadocs
org.csveed.token.ParseStateMachine.determineState(int,EncounteredSymbol) 104 85 0
org.csveed.bean.conversion.NumberUtils.convertNumberToTargetClass(Number,T) 40 28 0
org.csveed.token.ParseStateMachine.offerSymbol(int) 38 13 0
org.csveed.bean.BeanParser.checkForAnnotations(BeanProperty) 30 10 0
org.csveed.bean.conversion.NumberUtils.parseNumber(String,T) 27 24 0
org.csveed.bean.conversion.DefaultConverters.registerConverters() 26 1 0
org.csveed.row.RowReaderImpl.readBareLine() 25 14 0
org.csveed.bean.conversion.NumberUtils.decodeBigInteger(String) 20 8 0
org.csveed.row.LineWithInfo.convertToPrintable(int) 20 13 0
org.csveed.bean.BeanInstructionsImpl.getPropertyLogLine(BeanProperty) 19 7 0
org.csveed.bean.conversion.CustomBooleanConverter.fromString(String) 18 24 0
org.csveed.row.RowWriterImpl.writeCells(String) 18 8 0
org.csveed.bean.conversion.NumberUtils.parseNumber(String,T,NumberFormat) 17 10 0
org.csveed.bean.AbstractMapper.convert(T,Row,int,DynamicColumn) 15 9 0
org.csveed.bean.conversion.CharacterConverter.fromString(String) 15 10 0
org.csveed.token.SymbolMapping.find(int,ParseState) 15 12 0
org.csveed.bean.BeanProperties.parseBean(Class) 14 7 0
org.csveed.bean.BeanReaderImpl.readBean() 12 5 0
org.csveed.report.RowReport.createFocusLine(RowPart) 12 4 0
org.csveed.bean.conversion.ConversionUtil.trimAllWhitespace(String) 11 5 0
org.csveed.bean.BeanParser.parseCsvLocalizedNumber(String,CsvLocalizedNumber) 10 3 0
org.csveed.bean.BeanWriterImpl.writeBean(T) 10 3 0
org.csveed.bean.conversion.DateConverter.fromString(String) 10 11 0
org.csveed.token.SymbolMapping.charToPrintable(char) 10 7 0
org.csveed.bean.AbstractMapper.setDynamicColumnProperties(Row,int,BeanWrapper,Column) 9 3 0
org.csveed.bean.BeanParser.getBeanInstructions(Class) 9 4 0
org.csveed.bean.BeanWriterImpl.writeHeader() 9 5 0
org.csveed.bean.conversion.BeanWrapper.getProperty(BeanProperty) 9 6 0
org.csveed.report.CsvException.getLocalizedMessage() 9 3 0
org.csveed.report.RowReport.tokenize() 9 4 0

Averages.

Program NCSS NCSS average CCN average Javadocs average
2,493.00 3.35 1.91 0.21

Explanations

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