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
com.github.davidmoten.rx2.internal.flowable 23 70 2943 6 35 234 0
com.github.davidmoten.rx2 18 147 1026 13 296 67 3
com.github.davidmoten.rx2.internal.flowable.buffertofile 8 63 606 0 0 70 0
com.github.davidmoten.rx2.flowable 5 66 458 17 252 24 12
com.github.davidmoten.rx2.buffertofile 5 20 165 12 112 4 11
com.github.davidmoten.util 1 23 103 1 5 2 0
com.github.davidmoten.rx2.util 2 21 97 0 0 23 0
com.github.davidmoten.rx2.internal 1 4 47 0 0 0 0
com.github.davidmoten.rx2.observable 3 10 37 0 0 1 0
com.github.davidmoten.rx2.internal.observable 1 3 17 0 0 0 0
com.github.davidmoten.rx2.exceptions 2 1 8 0 0 0 0
com.github.davidmoten.rx2.functions 1 1 3 0 0 0 0
Classes total Methods total NCSS total Javadocs Javadoc lines Single lines comment Multi lines comment
70 429 5510 49 700 425 26

Objects

Objects

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

TOP 30 classes containing the most NCSS.

Object NCSS Methods Classes Javadocs
com.github.davidmoten.rx2.internal.flowable.FlowableRepeatingTransform 513 4 8 1
com.github.davidmoten.rx2.internal.flowable.FlowableMatch 277 2 6 0
com.github.davidmoten.rx2.flowable.Transformers 215 44 24 8
com.github.davidmoten.rx2.internal.flowable.FlowableMergeInterleave 200 2 5 0
com.github.davidmoten.rx2.internal.flowable.FlowableStateMachine 174 2 1 0
com.github.davidmoten.rx2.internal.flowable.FlowableInsertTimeout 161 2 2 0
com.github.davidmoten.rx2.internal.flowable.buffertofile.FlowableOnBackpressureBufferToFile 158 3 3 0
com.github.davidmoten.rx2.internal.flowable.FlowableInsertMaybe 150 2 2 0
com.github.davidmoten.rx2.Strings 144 37 15 3
com.github.davidmoten.rx2.internal.flowable.DelimitedStringLinkedList 142 10 1 1
com.github.davidmoten.rx2.RetryWhen 137 17 7 1
com.github.davidmoten.rx2.internal.flowable.buffertofile.PagedQueue 134 10 1 0
com.github.davidmoten.rx2.internal.flowable.FlowableCollectWhile 132 2 1 0
com.github.davidmoten.rx2.internal.flowable.buffertofile.Pages 121 18 0 0
com.github.davidmoten.rx2.internal.flowable.FlowableStringSplitSimple 114 2 1 1
com.github.davidmoten.rx2.internal.flowable.FlowableStringInputStream 106 2 1 1
com.github.davidmoten.util.RingBuffer 98 23 1 1
com.github.davidmoten.rx2.internal.flowable.FlowableMaxRequest 94 2 1 0
com.github.davidmoten.rx2.internal.flowable.FlowableMinRequest 92 2 1 0
com.github.davidmoten.rx2.Flowables 89 15 5 4
com.github.davidmoten.rx2.flowable.Serialized 87 10 7 8
com.github.davidmoten.rx2.internal.flowable.TransformerStateMachine 83 5 6 0
com.github.davidmoten.rx2.buffertofile.Options 82 6 3 10
com.github.davidmoten.rx2.Bytes 74 10 11 2
com.github.davidmoten.rx2.internal.flowable.FlowableWindowMinMax 69 2 2 1
com.github.davidmoten.rx2.internal.flowable.FlowableMapLast 63 2 1 0
com.github.davidmoten.rx2.internal.flowable.buffertofile.MemoryMappedFile 61 13 0 0
com.github.davidmoten.rx2.Consumers 60 14 13 0
com.github.davidmoten.rx2.StateMachine 59 2 10 0
com.github.davidmoten.rx2.util.Pair 55 11 0 0

TOP 30 classes containing the most methods.

Object NCSS Methods Classes Javadocs
com.github.davidmoten.rx2.flowable.Transformers 215 44 24 8
com.github.davidmoten.rx2.Strings 144 37 15 3
com.github.davidmoten.util.RingBuffer 98 23 1 1
com.github.davidmoten.rx2.internal.flowable.buffertofile.Pages 121 18 0 0
com.github.davidmoten.rx2.RetryWhen 137 17 7 1
com.github.davidmoten.rx2.Flowables 89 15 5 4
com.github.davidmoten.rx2.Consumers 60 14 13 0
com.github.davidmoten.rx2.internal.flowable.buffertofile.MemoryMappedFile 61 13 0 0
com.github.davidmoten.rx2.internal.flowable.buffertofile.Page 42 13 0 0
com.github.davidmoten.rx2.util.Pair 55 11 0 0
com.github.davidmoten.rx2.flowable.Serialized 87 10 7 8
com.github.davidmoten.rx2.util.ZippedEntry 38 10 0 0
com.github.davidmoten.rx2.Bytes 74 10 11 2
com.github.davidmoten.rx2.internal.flowable.buffertofile.PagedQueue 134 10 1 0
com.github.davidmoten.rx2.internal.flowable.FlowableServerSocket 54 10 6 0
com.github.davidmoten.rx2.internal.flowable.DelimitedStringLinkedList 142 10 1 1
com.github.davidmoten.rx2.Statistics 38 9 0 0
com.github.davidmoten.rx2.buffertofile.Serializers 34 6 1 0
com.github.davidmoten.rx2.buffertofile.Options 82 6 3 10
com.github.davidmoten.rx2.SchedulerHelper 25 6 1 0
com.github.davidmoten.rx2.Actions 19 5 4 0
com.github.davidmoten.rx2.Observables 49 5 4 3
com.github.davidmoten.rx2.Functions 20 5 4 0
com.github.davidmoten.rx2.BiFunctions 20 5 4 0
com.github.davidmoten.rx2.internal.flowable.TransformerStateMachine 83 5 6 0
com.github.davidmoten.rx2.BiPredicates 14 4 3 0
com.github.davidmoten.rx2.flowable.CloseableFlowableWithReset 14 4 0 0
com.github.davidmoten.rx2.flowable.CachedFlowable 11 4 0 0
com.github.davidmoten.rx2.flowable.Burst 48 4 2 1
com.github.davidmoten.rx2.IO 40 4 3 0

Averages.

NCSS average Program NCSS Classes average Methods average Javadocs average
69.21 5,510.00 2.73 6.13 0.70

Methods

Methods

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

TOP 30 Methods containing the most NCSS.

Methods NCSS CCN Javadocs
com.github.davidmoten.rx2.internal.flowable.FlowableMatch.MatchCoordinator.handleItem(Object,Source) 60 18 0
com.github.davidmoten.rx2.internal.flowable.FlowableStringSplitSimple.StringSplitSubscriber.drain() 54 21 0
com.github.davidmoten.rx2.internal.flowable.FlowableMergeInterleave.MergeInterleaveSubscription.drain() 53 22 0
com.github.davidmoten.rx2.internal.flowable.FlowableMatch.MatchCoordinator.drain() 50 24 0
com.github.davidmoten.rx2.internal.flowable.buffertofile.FlowableOnBackpressureBufferToFile.BufferToFileSubscriber.drain() 48 20 0
com.github.davidmoten.rx2.internal.flowable.buffertofile.PagedQueue.poll() 43 18 0
com.github.davidmoten.rx2.internal.flowable.FlowableRepeatingTransform.ChainedReplaySubject.drain() 41 19 0
com.github.davidmoten.rx2.internal.flowable.FlowableStateMachine.StateMachineSubscriber.drain() 38 15 0
com.github.davidmoten.rx2.internal.flowable.FlowableMinRequest.MinRequestSubscriber.drain() 38 19 0
com.github.davidmoten.rx2.internal.flowable.TransformerDecode.process(Result[],ByteBuffer,boolean,CharsetDecoder,String) 34 12 0
com.github.davidmoten.rx2.internal.flowable.FlowableInsertMaybe.InsertSubscriber.drain() 34 14 0
com.github.davidmoten.rx2.internal.flowable.FlowableInsertTimeout.InsertTimeoutSubscriber.drain() 33 14 0
com.github.davidmoten.rx2.internal.flowable.DelimitedStringLinkedList.next() 32 11 0
com.github.davidmoten.rx2.internal.flowable.FlowableRepeatingTransform.Chain.drain() 32 13 0
com.github.davidmoten.rx2.internal.flowable.FlowableRepeatingTransform.DestinationSerializedSubject.drain() 32 18 0
com.github.davidmoten.rx2.internal.flowable.FlowableCollectWhile.CollectWhileSubscriber.drain() 31 13 0
com.github.davidmoten.rx2.internal.flowable.FlowableMaxRequest.MaxRequestSubscriber.onNext(T) 31 9 0
com.github.davidmoten.rx2.internal.flowable.FlowableStringInputStream.StringInputStream.read(int[],int,int) 27 16 0
com.github.davidmoten.rx2.internal.flowable.FlowableCollectWhile.CollectWhileSubscriber.tryOnNext(T) 24 15 0
com.github.davidmoten.rx2.internal.flowable.TransformerStringSplit.split(String,Pattern,BackpressureStrategy,int) 24 1 0
com.github.davidmoten.rx2.flowable.Burst.subscribeActual(T) 23 1 0
com.github.davidmoten.rx2.internal.flowable.FlowableRepeatingTransform.ChainedReplaySubject.request(long) 23 8 0
com.github.davidmoten.rx2.internal.flowable.FlowableRepeatingTransform.Chain.handleCompleteOrCancel(T) 22 6 0
com.github.davidmoten.rx2.Flowables.cache(T,long,TimeUnit,Scheduler) 21 1 1
com.github.davidmoten.rx2.Observables.cache(T,long,TimeUnit,Scheduler) 21 1 1
com.github.davidmoten.rx2.util.Pair.equals(Object) 21 17 0
com.github.davidmoten.rx2.internal.flowable.FlowableMaxRequest.MaxRequestSubscriber.requestMore() 21 9 0
com.github.davidmoten.rx2.internal.flowable.DelimitedStringLinkedList.extractFromHeadPositionToSearchPosition() 21 8 0
com.github.davidmoten.rx2.flowable.Transformers.Function$1.apply(Object) 20 1 0
com.github.davidmoten.rx2.internal.flowable.FlowableFetchPagesByRequest.create(T,long,int) 19 1 0

Averages.

Program NCSS NCSS average CCN average Javadocs average
5,510.00 4.87 1.86 0.04

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