JavaNCSS Metric Results

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

The following document contains the results of a JavaNCSS metric analysis.
JavaNCSS web site.

Packages

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

Packages sorted by NCSS.

PackageClassesMethodsNCSSJavadocsJavadoc linesSingle lines commentMulti lines comment
org.fosstrak.llrp.adaptor101831053147828134263
org.fosstrak.llrp.client.repository.sql.roaccess360504541978494
org.fosstrak.llrp.client.repository.sql443369342353298
org.fosstrak.llrp.client956235633654199
org.fosstrak.llrp.adaptor.config319172221171062
org.fosstrak.llrp.adaptor.util28791565442
org.fosstrak.llrp.adaptor.exception210311253046
org.fosstrak.llrp.adaptor.queue1723838020
Classes totalMethods totalNCSS totalJavadocsJavadoc linesSingle lines commentMulti lines comment
3438624663551898268824

Objects

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

TOP 30 classes containing the most NCSS.

ObjectNCSSMethodsClassesJavadocs
org.fosstrak.llrp.adaptor.AdaptorManagement40042041
org.fosstrak.llrp.client.repository.sql.AbstractSQLRepository25931030
org.fosstrak.llrp.adaptor.ReaderImpl24129411
org.fosstrak.llrp.client.repository.sql.roaccess.ROAccessItem22140041
org.fosstrak.llrp.client.repository.sql.roaccess.AbstractSQLROAccessReportsRepository21416012
org.fosstrak.llrp.adaptor.ReaderMetaData11937034
org.fosstrak.llrp.adaptor.config.ConfigurationLoader107506
org.fosstrak.llrp.client.LLRPMessageItem9121022
org.fosstrak.llrp.adaptor.AdaptorImpl781902
org.fosstrak.llrp.adaptor.AdaptorWorker6315015
org.fosstrak.llrp.adaptor.util.AsynchronousNotifiableList597114
org.fosstrak.llrp.client.RepositoryFactory47304
org.fosstrak.llrp.client.Reader4113013
org.fosstrak.llrp.client.repository.sql.DerbyRepository28402
org.fosstrak.llrp.adaptor.config.AdaptorConfiguration26809
org.fosstrak.llrp.adaptor.config.ReaderConfiguration23607
org.fosstrak.llrp.client.repository.sql.MySQLRepository22401
org.fosstrak.llrp.client.repository.sql.PostgreSQLRepository22401
org.fosstrak.llrp.adaptor.queue.QueueEntry21708
org.fosstrak.llrp.adaptor.Reader2019020
org.fosstrak.llrp.adaptor.AdaptorCallback19403
org.fosstrak.llrp.adaptor.Adaptor1716017
org.fosstrak.llrp.client.repository.sql.roaccess.DerbyROAccessReportsRepository17401
org.fosstrak.llrp.adaptor.exception.LLRPRuntimeException16607
org.fosstrak.llrp.client.Repository1513014
org.fosstrak.llrp.adaptor.exception.LLRPDuplicateNameException12405
org.fosstrak.llrp.adaptor.util.SortedProperties9101
org.fosstrak.llrp.client.ROAccessReportsRepository5405
org.fosstrak.llrp.adaptor.Constants4001
org.fosstrak.llrp.adaptor.AsynchronousNotifiable3203

TOP 30 classes containing the most methods.

ObjectNCSSMethodsClassesJavadocs
org.fosstrak.llrp.adaptor.AdaptorManagement40042041
org.fosstrak.llrp.client.repository.sql.roaccess.ROAccessItem22140041
org.fosstrak.llrp.adaptor.ReaderMetaData11937034
org.fosstrak.llrp.client.repository.sql.AbstractSQLRepository25931030
org.fosstrak.llrp.adaptor.ReaderImpl24129411
org.fosstrak.llrp.client.LLRPMessageItem9121022
org.fosstrak.llrp.adaptor.AdaptorImpl781902
org.fosstrak.llrp.adaptor.Reader2019020
org.fosstrak.llrp.adaptor.Adaptor1716017
org.fosstrak.llrp.client.repository.sql.roaccess.AbstractSQLROAccessReportsRepository21416012
org.fosstrak.llrp.adaptor.AdaptorWorker6315015
org.fosstrak.llrp.client.Reader4113013
org.fosstrak.llrp.client.Repository1513014
org.fosstrak.llrp.adaptor.config.AdaptorConfiguration26809
org.fosstrak.llrp.adaptor.queue.QueueEntry21708
org.fosstrak.llrp.adaptor.util.AsynchronousNotifiableList597114
org.fosstrak.llrp.adaptor.config.ReaderConfiguration23607
org.fosstrak.llrp.adaptor.exception.LLRPRuntimeException16607
org.fosstrak.llrp.adaptor.config.ConfigurationLoader107506
org.fosstrak.llrp.adaptor.AdaptorCallback19403
org.fosstrak.llrp.adaptor.exception.LLRPDuplicateNameException12405
org.fosstrak.llrp.client.repository.sql.DerbyRepository28402
org.fosstrak.llrp.client.repository.sql.MySQLRepository22401
org.fosstrak.llrp.client.repository.sql.PostgreSQLRepository22401
org.fosstrak.llrp.client.repository.sql.roaccess.DerbyROAccessReportsRepository17401
org.fosstrak.llrp.client.ROAccessReportsRepository5405
org.fosstrak.llrp.client.RepositoryFactory47304
org.fosstrak.llrp.adaptor.AsynchronousNotifiable3203
org.fosstrak.llrp.adaptor.util.SortedProperties9101
org.fosstrak.llrp.client.LLRPExceptionHandler2102

Averages.

NCSS averageProgram NCSSClasses averageMethods averageJavadocs average
65.472,466.000.1511.3510.44

Methods

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

TOP 30 Methods containing the most NCSS.

MethodsNCSSCCNJavadocs
org.fosstrak.llrp.client.repository.sql.roaccess.AbstractSQLROAccessReportsRepository.handleROAccessReport(String,String,RO_ACCESS_REPORT)76181
org.fosstrak.llrp.client.repository.sql.roaccess.ROAccessItem.parse(RO_ACCESS_REPORT,String,String,long)75351
org.fosstrak.llrp.adaptor.AdaptorManagement.define(String,String)56111
org.fosstrak.llrp.adaptor.AdaptorManagement.loadFromFile()52151
org.fosstrak.llrp.adaptor.ReaderImpl.connect(boolean)43100
org.fosstrak.llrp.client.repository.sql.AbstractSQLRepository.get(String,String,int,boolean)43111
org.fosstrak.llrp.client.repository.sql.roaccess.ROAccessItem.get(int)39371
org.fosstrak.llrp.adaptor.ReaderImpl.enableHeartBeat()3341
org.fosstrak.llrp.adaptor.AdaptorManagement.storeToFile()32101
org.fosstrak.llrp.adaptor.config.ConfigurationLoader.writeAdapter(AdaptorConfiguration,Properties,int)2941
org.fosstrak.llrp.client.repository.sql.AbstractSQLRepository.initialize(Map)29120
org.fosstrak.llrp.client.LLRPMessageItem.prettyPrint()2811
org.fosstrak.llrp.client.repository.sql.roaccess.AbstractSQLROAccessReportsRepository.getAll()2820
org.fosstrak.llrp.adaptor.config.ConfigurationLoader.writeConfiguration(List,String)2381
org.fosstrak.llrp.adaptor.config.ConfigurationLoader.getConfiguration(String)2261
org.fosstrak.llrp.client.repository.sql.AbstractSQLRepository.get(String)2131
org.fosstrak.llrp.client.RepositoryFactory.create(Map)2091
org.fosstrak.llrp.client.repository.sql.AbstractSQLRepository.put(LLRPMessageItem)1931
org.fosstrak.llrp.client.repository.sql.AbstractSQLRepository.count(String,String)1951
org.fosstrak.llrp.adaptor.AdaptorManagement.undefine(String)1841
org.fosstrak.llrp.adaptor.ReaderImpl.disconnect()1880
org.fosstrak.llrp.adaptor.ReaderImpl.messageReceived(LLRPMessage)1781
org.fosstrak.llrp.adaptor.ReaderMetaData.toString()1710
org.fosstrak.llrp.client.repository.sql.AbstractSQLRepository.loadDriver()1741
org.fosstrak.llrp.adaptor.config.ConfigurationLoader.getReaderPrototypes()1541
org.fosstrak.llrp.adaptor.ReaderImpl.Runnable$1.run()1560
org.fosstrak.llrp.adaptor.ReaderMetaData.ReaderMetaData(ReaderMetaData)1511
org.fosstrak.llrp.adaptor.AdaptorManagement.initialize(String,String,boolean,LLRPExceptionHandler,MessageHandler,boolean)1441
org.fosstrak.llrp.adaptor.AdaptorManagement.enqueueLLRPMessage(String,String,LLRPMessage)1441
org.fosstrak.llrp.adaptor.ReaderImpl.send(byte[])1470

Averages.

Program NCSSNCSS averageCCN averageJavadocs average
2,466.005.091.960.81

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 declarationpackage java.lang;
Import declarationimport java.awt.*;
Class declaration
  • public class Foo {
  • public class Foo extends Bla {
Interface declarationpublic interface Able ; {
Field declaration
  • int a;
  • int a, b, c = 5, d = 6;
Method declaration
  • public void cry();
  • public void gib() throws DeadException {
Constructor declarationpublic Foo() {
Constructor invocation
  • this();
  • super();
Statement declaration
  • i = 0;
  • if (ok)
  • if (exit) {
  • if (3 == 4);
  • if (4 == 4) { ;
  • } else {
Label declarationfine :
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).