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
org.csc.phynixx.loggersystem.logrecord 21 135 624 65 455 9 399
org.csc.phynixx.loggersystem.logger.channellogger 12 73 441 41 306 20 135
org.csc.phynixx.loggersystem.logger 3 21 80 19 108 1 57
Classes total Methods total NCSS total Javadocs Javadoc lines Single lines comment Multi lines comment
36 229 1145 125 869 30 591

Objects

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

TOP 30 classes containing the most NCSS.

Object NCSS Methods Classes Javadocs
org.csc.phynixx.loggersystem.logrecord.PhynixxXADataRecorder 160 32 0 11
org.csc.phynixx.loggersystem.logger.channellogger.FileChannelDataLogger 155 17 1 8
org.csc.phynixx.loggersystem.logger.channellogger.TAEnabledRandomAccessFile 132 26 0 24
org.csc.phynixx.loggersystem.logrecord.PhynixxXARecorderRepository 118 25 3 7
org.csc.phynixx.loggersystem.logrecord.XADataLogger 115 12 1 8
org.csc.phynixx.loggersystem.logger.channellogger.FileChannelDataLoggerFactory 73 11 3 8
org.csc.phynixx.loggersystem.logrecord.PhynixxDataRecord 64 10 0 4
org.csc.phynixx.loggersystem.logrecord.XALogRecordType 57 7 0 1
org.csc.phynixx.loggersystem.logger.DataLoggerRespository 50 8 0 5
org.csc.phynixx.loggersystem.logger.channellogger.LogFilenameMatcher 28 2 1 0
org.csc.phynixx.loggersystem.logrecord.XADataLogger.RecoverReplayListener 26 3 0 0
org.csc.phynixx.loggersystem.logger.channellogger.FileChannelDataLogger.FileAccessor 24 7 0 0
org.csc.phynixx.loggersystem.logger.channellogger.LogFileTraverser 20 2 1 1
org.csc.phynixx.loggersystem.logger.channellogger.LogFilenameMatcher.LogFilenameParts 15 4 0 0
org.csc.phynixx.loggersystem.logrecord.IXADataRecorder 15 14 0 12
org.csc.phynixx.loggersystem.logrecord.OrdinalGenerator 13 4 0 0
org.csc.phynixx.loggersystem.logger.IDataLogger 8 7 0 8
org.csc.phynixx.loggersystem.logger.IDataLoggerFactory 7 6 0 6
org.csc.phynixx.loggersystem.logrecord.IXARecorderRepository 7 6 0 7
org.csc.phynixx.loggersystem.logrecord.IDataRecord 5 4 0 4
org.csc.phynixx.loggersystem.logger.channellogger.FileChannelDataLoggerFactory.LogFileTraverser.ICollectorCallback 4 1 0 0
org.csc.phynixx.loggersystem.logger.channellogger.FileChannelDataLoggerFactory.LogFileTraverser.ICollectorCallback 4 1 0 0
org.csc.phynixx.loggersystem.logrecord.IDataRecordReplay 4 3 0 4
org.csc.phynixx.loggersystem.logrecord.IDataRecordSequence 3 2 0 1
org.csc.phynixx.loggersystem.logrecord.ILogRecordReader 3 2 0 2
org.csc.phynixx.loggersystem.logrecord.IManagedDataRecordLogger 3 2 0 1
org.csc.phynixx.loggersystem.logrecord.IXADataRecorderLifecycleListener 3 2 0 1
org.csc.phynixx.loggersystem.logrecord.IXARecorderResourceListener 3 2 0 1
org.csc.phynixx.loggersystem.logger.channellogger.FileChannelDataLoggerFactory.LogFileTraverser.ICollectorCallback 2 1 0 0
org.csc.phynixx.loggersystem.logger.channellogger.LogFileTraverser.ICollectorCallback 2 1 0 0

TOP 30 classes containing the most methods.

Object NCSS Methods Classes Javadocs
org.csc.phynixx.loggersystem.logrecord.PhynixxXADataRecorder 160 32 0 11
org.csc.phynixx.loggersystem.logger.channellogger.TAEnabledRandomAccessFile 132 26 0 24
org.csc.phynixx.loggersystem.logrecord.PhynixxXARecorderRepository 118 25 3 7
org.csc.phynixx.loggersystem.logger.channellogger.FileChannelDataLogger 155 17 1 8
org.csc.phynixx.loggersystem.logrecord.IXADataRecorder 15 14 0 12
org.csc.phynixx.loggersystem.logrecord.XADataLogger 115 12 1 8
org.csc.phynixx.loggersystem.logger.channellogger.FileChannelDataLoggerFactory 73 11 3 8
org.csc.phynixx.loggersystem.logrecord.PhynixxDataRecord 64 10 0 4
org.csc.phynixx.loggersystem.logger.DataLoggerRespository 50 8 0 5
org.csc.phynixx.loggersystem.logger.channellogger.FileChannelDataLogger.FileAccessor 24 7 0 0
org.csc.phynixx.loggersystem.logger.IDataLogger 8 7 0 8
org.csc.phynixx.loggersystem.logrecord.XALogRecordType 57 7 0 1
org.csc.phynixx.loggersystem.logger.IDataLoggerFactory 7 6 0 6
org.csc.phynixx.loggersystem.logrecord.IXARecorderRepository 7 6 0 7
org.csc.phynixx.loggersystem.logger.channellogger.LogFilenameMatcher.LogFilenameParts 15 4 0 0
org.csc.phynixx.loggersystem.logrecord.IDataRecord 5 4 0 4
org.csc.phynixx.loggersystem.logrecord.OrdinalGenerator 13 4 0 0
org.csc.phynixx.loggersystem.logrecord.IDataRecordReplay 4 3 0 4
org.csc.phynixx.loggersystem.logrecord.XADataLogger.RecoverReplayListener 26 3 0 0
org.csc.phynixx.loggersystem.logger.channellogger.LogFilenameMatcher 28 2 1 0
org.csc.phynixx.loggersystem.logger.channellogger.LogFileTraverser 20 2 1 1
org.csc.phynixx.loggersystem.logrecord.IDataRecordSequence 3 2 0 1
org.csc.phynixx.loggersystem.logrecord.ILogRecordReader 3 2 0 2
org.csc.phynixx.loggersystem.logrecord.IManagedDataRecordLogger 3 2 0 1
org.csc.phynixx.loggersystem.logrecord.IXADataRecorderLifecycleListener 3 2 0 1
org.csc.phynixx.loggersystem.logrecord.IXARecorderResourceListener 3 2 0 1
org.csc.phynixx.loggersystem.logger.channellogger.FileChannelDataLoggerFactory.LogFileTraverser.ICollectorCallback 4 1 0 0
org.csc.phynixx.loggersystem.logger.channellogger.FileChannelDataLoggerFactory.LogFileTraverser.ICollectorCallback 4 1 0 0
org.csc.phynixx.loggersystem.logger.channellogger.FileChannelDataLoggerFactory.LogFileTraverser.ICollectorCallback 2 1 0 0
org.csc.phynixx.loggersystem.logger.channellogger.LogFileTraverser.ICollectorCallback 2 1 0 0

Averages.

NCSS average Program NCSS Classes average Methods average Javadocs average
31.50 1,145.00 0.28 6.36 3.47

Methods

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

TOP 30 Methods containing the most NCSS.

Methods NCSS CCN Javadocs
org.csc.phynixx.loggersystem.logrecord.XADataLogger.writeData(PhynixxXADataRecorder,IDataRecord) 22 6 1
org.csc.phynixx.loggersystem.logrecord.XADataLogger.recoverData(PhynixxXADataRecorder,XALogRecordType,XALogRecordType[][]) 22 10 1
org.csc.phynixx.loggersystem.logger.channellogger.FileChannelDataLogger.reopen(AccessMode) 19 6 1
org.csc.phynixx.loggersystem.logrecord.PhynixxXADataRecorder.establishState(IDataRecord) 19 10 0
org.csc.phynixx.loggersystem.logrecord.XADataLogger.RecoverReplayListener.onRecord(XALogRecordType,XALogRecordType[][]) 18 8 0
org.csc.phynixx.loggersystem.logrecord.XALogRecordType.resolve(short) 16 13 0
org.csc.phynixx.loggersystem.logger.channellogger.TAEnabledRandomAccessFile.read(int) 15 9 1
org.csc.phynixx.loggersystem.logrecord.PhynixxXARecorderRepository.equals(Object) 15 12 0
org.csc.phynixx.loggersystem.logger.channellogger.FileChannelDataLogger.close() 14 7 0
org.csc.phynixx.loggersystem.logger.channellogger.TAEnabledRandomAccessFile.close() 13 4 1
org.csc.phynixx.loggersystem.logrecord.PhynixxXADataRecorder.replayRecords(IDataRecordReplay) 13 10 0
org.csc.phynixx.loggersystem.logger.channellogger.FileChannelDataLogger.associatedRandomAccessFile() 12 6 0
org.csc.phynixx.loggersystem.logger.channellogger.FileChannelDataLogger.write(short,short[][]) 12 4 1
org.csc.phynixx.loggersystem.logger.channellogger.FileChannelDataLogger.replay(ILogRecordReplayListener) 12 3 1
org.csc.phynixx.loggersystem.logger.channellogger.FileChannelDataLogger.openRandomAccessFile(File,String) 11 7 0
org.csc.phynixx.loggersystem.logger.channellogger.FileChannelDataLoggerFactory.provideFile(String,File) 11 8 0
org.csc.phynixx.loggersystem.logger.channellogger.LogFileTraverser.iterateDirectory(File,ICollectorCallback) 11 7 0
org.csc.phynixx.loggersystem.logger.channellogger.TAEnabledRandomAccessFile.restoreCommittedSize() 11 2 1
org.csc.phynixx.loggersystem.logrecord.PhynixxDataRecord.equals(Object) 11 9 0
org.csc.phynixx.loggersystem.logrecord.XADataLogger.writeStartSequence(IXADataRecorder) 11 2 1
org.csc.phynixx.loggersystem.logger.channellogger.FileChannelDataLoggerFactory.FileChannelDataLoggerFactory(String,File) 10 8 1
org.csc.phynixx.loggersystem.logrecord.PhynixxDataRecord.setRecords(EMPTY_DATA[][]) 10 6 1
org.csc.phynixx.loggersystem.logrecord.PhynixxXARecorderRepository.createXADataRecorder() 10 4 0
org.csc.phynixx.loggersystem.logrecord.PhynixxXARecorderRepository.recover() 10 4 1
org.csc.phynixx.loggersystem.logger.channellogger.FileChannelDataLoggerFactory.cleanup() 9 1 1
org.csc.phynixx.loggersystem.logger.channellogger.FileChannelDataLoggerFactory.destroyLogger(String) 9 1 0
org.csc.phynixx.loggersystem.logger.channellogger.FileChannelDataLoggerFactory.findLoggerNames() 9 1 0
org.csc.phynixx.loggersystem.logger.channellogger.LogFilenameMatcher.matches(String) 9 3 0
org.csc.phynixx.loggersystem.logrecord.PhynixxDataRecord.compareTo(PhynixxDataRecord) 9 7 0
org.csc.phynixx.loggersystem.logrecord.PhynixxXADataRecorder.compareTo(Object) 9 7 0

Averages.

Program NCSS NCSS average CCN average Javadocs average
1,145.00 4.18 2.14 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).