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.github.davidmoten.rx.jdbc 74 406 2019 239 1652 59 120
com.github.davidmoten.rx.jdbc.tuple 16 75 505 19 135 2 3
com.github.davidmoten.rx 7 20 68 9 83 6 6
com.github.davidmoten.rx.jdbc.annotations 0 0 21 0 0 0 7
com.github.davidmoten.rx.jdbc.exceptions 2 3 13 0 0 0 0
Classes total Methods total NCSS total Javadocs Javadoc lines Single lines comment Multi lines comment
99 504 2626 267 1870 67 136

Objects

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

TOP 30 classes containing the most NCSS.

Object NCSS Methods Classes Javadocs
com.github.davidmoten.rx.jdbc.Util 511 35 10 25
com.github.davidmoten.rx.jdbc.Database 254 55 13 55
com.github.davidmoten.rx.jdbc.QueryUpdateOnSubscribe 136 16 2 12
com.github.davidmoten.rx.jdbc.QuerySelect 120 10 3 40
com.github.davidmoten.rx.jdbc.QueryUpdate 117 13 3 32
com.github.davidmoten.rx.jdbc.ConnectionNonClosing 113 55 0 2
com.github.davidmoten.rx.jdbc.tuple.Tuple7 110 11 0 2
com.github.davidmoten.rx.jdbc.QuerySelectProducer 85 10 0 5
com.github.davidmoten.rx.jdbc.tuple.Tuple6 83 10 0 2
com.github.davidmoten.rx.jdbc.tuple.Tuple5 72 9 0 2
com.github.davidmoten.rx.jdbc.QuerySelectOnSubscribe 66 8 1 7
com.github.davidmoten.rx.jdbc.tuple.Tuple4 61 8 0 2
com.github.davidmoten.rx.jdbc.QuerySelect.Builder 57 24 0 21
com.github.davidmoten.rx.RxUtil 55 11 5 9
com.github.davidmoten.rx.jdbc.tuple.Tuple3 50 7 0 2
com.github.davidmoten.rx.jdbc.Database.Builder 46 10 1 8
com.github.davidmoten.rx.jdbc.NamedParameters 43 1 1 0
com.github.davidmoten.rx.jdbc.tuple.Tuples 42 10 8 2
com.github.davidmoten.rx.jdbc.tuple.Tuple2 41 7 0 5
com.github.davidmoten.rx.jdbc.QueryUpdate.Builder 41 15 0 15
com.github.davidmoten.rx.jdbc.QueryBuilder 40 13 0 11
com.github.davidmoten.rx.jdbc.QueryUpdate.ReturnGeneratedKeysBuilder 29 13 0 11
com.github.davidmoten.rx.jdbc.QuerySelect.OperatorBuilder 28 12 0 12
com.github.davidmoten.rx.jdbc.tuple.TupleN 28 5 0 2
com.github.davidmoten.rx.jdbc.Util.ProxyService 27 3 0 0
com.github.davidmoten.rx.jdbc.AutoMapCache 26 3 0 0
com.github.davidmoten.rx.jdbc.QuerySelectOperator 25 2 1 2
com.github.davidmoten.rx.jdbc.Parameter 24 6 1 3
com.github.davidmoten.rx.jdbc.ConnectionProviderPooled 24 6 0 4
com.github.davidmoten.rx.jdbc.Queries 23 5 1 6

TOP 30 classes containing the most methods.

Object NCSS Methods Classes Javadocs
com.github.davidmoten.rx.jdbc.Database 254 55 13 55
com.github.davidmoten.rx.jdbc.ConnectionNonClosing 113 55 0 2
com.github.davidmoten.rx.jdbc.Util 511 35 10 25
com.github.davidmoten.rx.jdbc.QuerySelect.Builder 57 24 0 21
com.github.davidmoten.rx.jdbc.QueryUpdateOnSubscribe 136 16 2 12
com.github.davidmoten.rx.jdbc.QueryUpdate.Builder 41 15 0 15
com.github.davidmoten.rx.jdbc.QueryBuilder 40 13 0 11
com.github.davidmoten.rx.jdbc.QueryUpdate 117 13 3 32
com.github.davidmoten.rx.jdbc.QueryUpdate.ReturnGeneratedKeysBuilder 29 13 0 11
com.github.davidmoten.rx.jdbc.QuerySelect.OperatorBuilder 28 12 0 12
com.github.davidmoten.rx.RxUtil 55 11 5 9
com.github.davidmoten.rx.jdbc.tuple.Tuple7 110 11 0 2
com.github.davidmoten.rx.jdbc.QuerySelect 120 10 3 40
com.github.davidmoten.rx.jdbc.Database.Builder 46 10 1 8
com.github.davidmoten.rx.jdbc.tuple.Tuples 42 10 8 2
com.github.davidmoten.rx.jdbc.tuple.Tuple6 83 10 0 2
com.github.davidmoten.rx.jdbc.QuerySelectProducer 85 10 0 5
com.github.davidmoten.rx.jdbc.tuple.Tuple5 72 9 0 2
com.github.davidmoten.rx.jdbc.QuerySelectOnSubscribe 66 8 1 7
com.github.davidmoten.rx.jdbc.tuple.Tuple4 61 8 0 2
com.github.davidmoten.rx.jdbc.QueryContext 16 7 0 4
com.github.davidmoten.rx.jdbc.tuple.Tuple3 50 7 0 2
com.github.davidmoten.rx.jdbc.tuple.Tuple2 41 7 0 5
com.github.davidmoten.rx.jdbc.Parameter 24 6 1 3
com.github.davidmoten.rx.jdbc.ConnectionProviderPooled 24 6 0 4
com.github.davidmoten.rx.jdbc.Queries 23 5 1 6
com.github.davidmoten.rx.jdbc.tuple.TupleN 28 5 0 2
com.github.davidmoten.rx.jdbc.Query 6 5 0 6
com.github.davidmoten.rx.jdbc.ConnectionProviderFromUrl 18 4 0 3
com.github.davidmoten.rx.jdbc.Conditions 10 4 0 5

Averages.

NCSS average Program NCSS Classes average Methods average Javadocs average
27.81 2,626.00 0.58 5.09 3.37

Methods

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

TOP 30 Methods containing the most NCSS.

Methods NCSS CCN Javadocs
com.github.davidmoten.rx.jdbc.Util.autoMap(Object,Class) 104 91 1
com.github.davidmoten.rx.jdbc.tuple.Tuple7.equals(Object) 51 42 0
com.github.davidmoten.rx.jdbc.Util.setParameters(PreparedStatement,Parameter,boolean) 47 17 1
com.github.davidmoten.rx.jdbc.tuple.Tuple6.equals(Object) 45 37 0
com.github.davidmoten.rx.jdbc.tuple.Tuple5.equals(Object) 39 32 0
com.github.davidmoten.rx.jdbc.QueryUpdateOnSubscribe.performUpdate(T,State) 35 12 1
com.github.davidmoten.rx.jdbc.tuple.Tuple4.equals(Object) 33 27 0
com.github.davidmoten.rx.jdbc.NamedParameters.parse(String) 32 13 0
com.github.davidmoten.rx.jdbc.Util.getObject(ResultSet,T,int) 32 24 0
com.github.davidmoten.rx.jdbc.tuple.Tuple3.equals(Object) 27 22 0
com.github.davidmoten.rx.jdbc.Util.countQuestionMarkParameters(String) 24 9 0
com.github.davidmoten.rx.jdbc.tuple.Tuple2.equals(Object) 21 17 0
com.github.davidmoten.rx.jdbc.Util.ProxyService.ProxyService(ResultSet,T) 21 9 0
com.github.davidmoten.rx.jdbc.Util.closeQuietly(PreparedStatement) 20 8 1
com.github.davidmoten.rx.jdbc.QueryUpdateOnSubscribe.call(T) 20 5 0
com.github.davidmoten.rx.jdbc.QuerySelectOnSubscribe.call(T) 18 4 0
com.github.davidmoten.rx.jdbc.tuple.Tuple7.toString() 18 1 0
com.github.davidmoten.rx.jdbc.QuerySelectProducer.requestSome(long) 17 10 0
com.github.davidmoten.rx.jdbc.AutoMapCache.getMethodCols(Class) 17 5 0
com.github.davidmoten.rx.jdbc.tuple.TupleN.equals(Object) 15 12 0
com.github.davidmoten.rx.jdbc.Util.getRowInfo(ResultSet) 14 5 0
com.github.davidmoten.rx.jdbc.Util.setNamedParameters(PreparedStatement,Parameter,String) 14 7 0
com.github.davidmoten.rx.jdbc.Util.setBlob(PreparedStatement,int,Object,Class) 13 4 1
com.github.davidmoten.rx.jdbc.Util.setClob(PreparedStatement,int,Object,Class) 13 4 1
com.github.davidmoten.rx.jdbc.QueryUpdateOnSubscribe.performCommit(T,State) 13 5 1
com.github.davidmoten.rx.jdbc.Util.getTypeInfo(Object) 12 4 1
com.github.davidmoten.rx.jdbc.QuerySelectOperator.ApplyQuerySelect.call(R) 11 5 0
com.github.davidmoten.rx.jdbc.tuple.Tuple7.hashCode() 11 8 0
com.github.davidmoten.rx.jdbc.Util.autoMap(ResultSet,T) 11 9 1
com.github.davidmoten.rx.jdbc.QueryUpdateOperator.QueryUpdateOperator(QueryUpdate.Builder,OperatorType) 10 1 1

Averages.

Program NCSS NCSS average CCN average Javadocs average
2,626.00 4.44 2.22 0.46

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