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.rx.internal.operators 33 203 2393 13 115 249 10
com.github.davidmoten.rx 22 227 1677 47 937 51 3
com.github.davidmoten.rx.testing 2 46 495 13 104 11 0
com.github.davidmoten.rx.buffertofile 4 24 168 6 50 2 0
com.github.davidmoten.rx.util 5 22 132 4 31 27 24
com.github.davidmoten.util 3 27 103 15 167 3 29
com.github.davidmoten.rx.subjects 1 7 33 2 15 1 0
com.github.davidmoten.rx.observables 1 3 13 0 0 0 0
com.github.davidmoten.rx.exceptions 2 1 9 0 0 0 0
Classes total Methods total NCSS total Javadocs Javadoc lines Single lines comment Multi lines comment
73 560 5023 100 1419 344 66

Objects

Objects

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

TOP 30 classes containing the most NCSS.

Object NCSS Methods Classes Javadocs
com.github.davidmoten.rx.testing.TestingHelper 367 11 21 13
com.github.davidmoten.rx.Transformers 240 57 26 27
com.github.davidmoten.rx.internal.operators.OperatorBufferPredicateBoundary 230 2 4 1
com.github.davidmoten.rx.internal.operators.FileBasedSPSCQueueMemoryMappedReaderWriter 205 16 3 1
com.github.davidmoten.rx.internal.operators.OrderedMerge 181 6 3 1
com.github.davidmoten.rx.internal.operators.FileBasedSPSCQueue 171 24 3 0
com.github.davidmoten.rx.internal.operators.OperatorBufferToFile 153 3 4 0
com.github.davidmoten.rx.internal.operators.RollingSPSCQueue 135 24 0 1
com.github.davidmoten.rx.RetryWhen 129 16 7 1
com.github.davidmoten.rx.Serialized 116 9 9 8
com.github.davidmoten.rx.internal.operators.FileBasedSPSCQueueMemoryMapped 109 23 0 0
com.github.davidmoten.rx.Actions 106 24 23 0
com.github.davidmoten.rx.Strings 104 22 11 0
com.github.davidmoten.rx.testing.TestSubscriber2 98 35 1 0
com.github.davidmoten.rx.Obs 86 14 7 4
com.github.davidmoten.rx.Functions 86 17 16 1
com.github.davidmoten.rx.buffertofile.Options 82 16 2 3
com.github.davidmoten.rx.internal.operators.TransformerStateMachine 79 6 6 0
com.github.davidmoten.rx.ResourceManager 79 12 5 0
com.github.davidmoten.rx.Bytes 76 9 10 2
com.github.davidmoten.rx.internal.operators.TransformerOnBackpressureBufferRequestLimiting 76 3 5 1
com.github.davidmoten.rx.Processes 75 3 6 0
com.github.davidmoten.rx.internal.operators.Permutations 74 3 4 0
com.github.davidmoten.rx.internal.operators.TransformerDelayFinalUnsubscribe 67 3 4 0
com.github.davidmoten.rx.buffertofile.DataSerializers 63 5 4 0
com.github.davidmoten.rx.internal.operators.TransformerOnTerminateResume 62 2 2 1
com.github.davidmoten.rx.internal.operators.OnSubscribeMapLast 56 2 2 0
com.github.davidmoten.rx.internal.operators.ObservableServerSocket 53 10 6 0
com.github.davidmoten.rx.internal.operators.TransformerDecode 53 2 4 0
com.github.davidmoten.util.ByteArrayOutputStreamNoCopyUnsynchronized 52 16 0 15

TOP 30 classes containing the most methods.

Object NCSS Methods Classes Javadocs
com.github.davidmoten.rx.Transformers 240 57 26 27
com.github.davidmoten.rx.testing.TestSubscriber2 98 35 1 0
com.github.davidmoten.rx.Actions 106 24 23 0
com.github.davidmoten.rx.internal.operators.FileBasedSPSCQueue 171 24 3 0
com.github.davidmoten.rx.internal.operators.RollingSPSCQueue 135 24 0 1
com.github.davidmoten.rx.internal.operators.AbstractQueueWithResources 50 24 0 0
com.github.davidmoten.rx.internal.operators.FileBasedSPSCQueueMemoryMapped 109 23 0 0
com.github.davidmoten.rx.Strings 104 22 11 0
com.github.davidmoten.rx.Functions 86 17 16 1
com.github.davidmoten.rx.buffertofile.Options 82 16 2 3
com.github.davidmoten.rx.internal.operators.FileBasedSPSCQueueMemoryMappedReaderWriter 205 16 3 1
com.github.davidmoten.rx.RetryWhen 129 16 7 1
com.github.davidmoten.util.ByteArrayOutputStreamNoCopyUnsynchronized 52 16 0 15
com.github.davidmoten.rx.Obs 86 14 7 4
com.github.davidmoten.rx.ResourceManager 79 12 5 0
com.github.davidmoten.rx.testing.TestingHelper 367 11 21 13
com.github.davidmoten.rx.util.ZippedEntry 38 10 0 0
com.github.davidmoten.rx.internal.operators.ObservableServerSocket 53 10 6 0
com.github.davidmoten.rx.Serialized 116 9 9 8
com.github.davidmoten.rx.Bytes 76 9 10 2
com.github.davidmoten.rx.Statistics 36 9 0 0
com.github.davidmoten.rx.internal.operators.QueueWithResourcesNonBlockingUnsubscribe 50 9 0 1
com.github.davidmoten.rx.Schedulers 30 8 1 0
com.github.davidmoten.util.Optional 34 8 1 0
com.github.davidmoten.rx.subjects.PublishSubjectSingleSubscriber 29 7 1 2
com.github.davidmoten.rx.util.Pair 24 7 0 0
com.github.davidmoten.rx.internal.operators.TransformerStateMachine 79 6 6 0
com.github.davidmoten.rx.internal.operators.OrderedMerge 181 6 3 1
com.github.davidmoten.rx.Checked 49 6 12 2
com.github.davidmoten.rx.buffertofile.DataSerializers 63 5 4 0

Averages.

NCSS average Program NCSS Classes average Methods average Javadocs average
60.25 5,023.00 3.41 7.67 1.37

Methods

Methods

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

TOP 30 Methods containing the most NCSS.

Methods NCSS CCN Javadocs
com.github.davidmoten.rx.internal.operators.OrderedMerge.MergeProducer.emit() 84 36 0
com.github.davidmoten.rx.internal.operators.OperatorBufferPredicateBoundary.BoundedAfterSubscriber.drain() 73 31 0
com.github.davidmoten.rx.internal.operators.OperatorBufferPredicateBoundary.BoundedBeforeSubscriber.drain() 73 32 0
com.github.davidmoten.rx.internal.operators.TransformerDelayFinalUnsubscribe.call(T) 48 1 0
com.github.davidmoten.rx.Processes.execute(Parameters) 38 1 0
com.github.davidmoten.rx.internal.operators.FileBasedSPSCQueue.QueueReader.read() 38 13 0
com.github.davidmoten.rx.internal.operators.TransformerDecode.process(Result[],ByteBuffer,boolean,CharsetDecoder,String) 34 12 0
com.github.davidmoten.rx.testing.TestingHelper.createTestSubscriber(TestType,Integer) 32 22 0
com.github.davidmoten.rx.testing.TestingHelper.runTest(R,TestType) 31 16 0
com.github.davidmoten.rx.internal.operators.OperatorWindowMinMax.call(T) 30 1 0
com.github.davidmoten.rx.Transformers.removePairs(Boolean,Boolean) 25 1 1
com.github.davidmoten.rx.internal.operators.OperatorBufferToFile.QueueProducer.drainNow() 25 14 0
com.github.davidmoten.rx.internal.operators.FileBasedSPSCQueueMemoryMappedReaderWriter.openForRead() 25 10 0
com.github.davidmoten.rx.internal.operators.TransformerStringSplit.split(String,Pattern) 24 1 0
com.github.davidmoten.rx.internal.operators.FileBasedSPSCQueueMemoryMapped.poll() 24 9 0
com.github.davidmoten.rx.Transformers.Transformer$1.call(T) 23 1 0
com.github.davidmoten.rx.internal.operators.TransformerOnBackpressureBufferRequestLimiting.ParentSubscriber.requestMore(long) 23 10 0
com.github.davidmoten.rx.internal.operators.TransformerDelayFinalUnsubscribe.Action0$1.call() 23 6 0
com.github.davidmoten.rx.ResourceManager.map(R,R) 23 1 0
com.github.davidmoten.rx.testing.TestingHelper.Case.Case(T,R,boolean,Long,boolean,R,String,Integer,Throwable,long,long,long,RuntimeException) 22 1 0
com.github.davidmoten.rx.Functions.add() 22 1 1
com.github.davidmoten.rx.internal.operators.FileBasedSPSCQueueMemoryMappedReaderWriter.openForWrite() 22 9 0
com.github.davidmoten.rx.internal.operators.FileBasedSPSCQueueMemoryMappedReaderWriter.poll() 22 12 0
com.github.davidmoten.rx.Obs.cache(T,long,TimeUnit,Scheduler) 21 1 1
com.github.davidmoten.rx.internal.operators.RollingSPSCQueue.offer(T) 21 10 0
com.github.davidmoten.rx.Processes.Func1$1.call(Process) 20 2 0
com.github.davidmoten.rx.Functions.Func2$1.call(T,T) 20 14 0
com.github.davidmoten.rx.SchedulerWithId.createWorker() 20 1 0
com.github.davidmoten.rx.internal.operators.TransformerStateMachine.execute(State,Boolean,State,BackpressureStrategy) 20 1 0
com.github.davidmoten.rx.internal.operators.RollingSPSCQueue.poll() 20 12 0

Averages.

Program NCSS NCSS average CCN average Javadocs average
5,023.00 4.59 1.77 0.08

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