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.epcis.repository.query12165257188647215616
org.fosstrak.epcis.repository.capture5669872423261394
org.fosstrak.epcis.repository.model18100335301452328
org.fosstrak.epcis.soap148326200059
org.fosstrak.epcis.repository720962430015138
Classes totalMethods totalNCSS totalJavadocsJavadoc linesSingle lines commentMulti lines comment
56434425116613242931535

Objects

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

TOP 30 classes containing the most NCSS.

ObjectNCSSMethodsClassesJavadocs
org.fosstrak.epcis.repository.query.QueryOperationsModule75435236
org.fosstrak.epcis.repository.query.QueryOperationsBackendSQL6261608
org.fosstrak.epcis.repository.capture.CaptureOperationsModule44822012
org.fosstrak.epcis.repository.query.QuerySubscription24917115
org.fosstrak.epcis.repository.query.Schedule2292205
org.fosstrak.epcis.repository.capture.CaptureOperationsBackendSQL2111703
org.fosstrak.epcis.repository.capture.CaptureOperationsServlet137706
org.fosstrak.epcis.repository.query.QueryOperationsWebService9811010
org.fosstrak.epcis.repository.model.EventFieldExtension7522011
org.fosstrak.epcis.repository.query.MasterDataQueryDTO742401
org.fosstrak.epcis.repository.query.SimpleEventQueryDTO671531
org.fosstrak.epcis.repository.query.QueryInitServlet62404
org.fosstrak.epcis.repository.capture.CaptureOperationsSession51801
org.fosstrak.epcis.repository.query.QuerySubscriptionTriggered41201
org.fosstrak.epcis.repository.query.QuerySubscriptionScheduled40602
org.fosstrak.epcis.repository.model.EnumUserType391501
org.fosstrak.epcis.repository.model.BaseEvent381501
org.fosstrak.epcis.repository.query.QueryOperationsSession28601
org.fosstrak.epcis.repository.model.BusinessTransaction24801
org.fosstrak.epcis.repository.model.VocabularyElement20704
org.fosstrak.epcis.soap.DuplicateSubscriptionExceptionResponse17600
org.fosstrak.epcis.soap.ImplementationExceptionResponse17600
org.fosstrak.epcis.soap.InvalidURIExceptionResponse17600
org.fosstrak.epcis.soap.NoSuchNameExceptionResponse17600
org.fosstrak.epcis.soap.NoSuchSubscriptionExceptionResponse17600
org.fosstrak.epcis.soap.QueryParameterExceptionResponse17600
org.fosstrak.epcis.soap.QueryTooComplexExceptionResponse17600
org.fosstrak.epcis.soap.QueryTooLargeExceptionResponse17600
org.fosstrak.epcis.soap.SecurityExceptionResponse17600
org.fosstrak.epcis.soap.SubscribeNotPermittedExceptionResponse17600

TOP 30 classes containing the most methods.

ObjectNCSSMethodsClassesJavadocs
org.fosstrak.epcis.repository.query.QueryOperationsModule75435236
org.fosstrak.epcis.repository.query.MasterDataQueryDTO742401
org.fosstrak.epcis.repository.capture.CaptureOperationsModule44822012
org.fosstrak.epcis.repository.model.EventFieldExtension7522011
org.fosstrak.epcis.repository.query.Schedule2292205
org.fosstrak.epcis.repository.capture.CaptureOperationsBackendSQL2111703
org.fosstrak.epcis.repository.query.QuerySubscription24917115
org.fosstrak.epcis.repository.query.QueryOperationsBackendSQL6261608
org.fosstrak.epcis.repository.model.BaseEvent381501
org.fosstrak.epcis.repository.model.EnumUserType391501
org.fosstrak.epcis.repository.query.SimpleEventQueryDTO671531
org.fosstrak.epcis.repository.capture.CaptureOperationsBackend131202
org.fosstrak.epcis.repository.query.QueryOperationsWebService9811010
org.fosstrak.epcis.repository.capture.CaptureOperationsSession51801
org.fosstrak.epcis.repository.model.BusinessTransaction24801
org.fosstrak.epcis.repository.capture.CaptureOperationsServlet137706
org.fosstrak.epcis.repository.EpcisQueryControlInterface8708
org.fosstrak.epcis.repository.model.VocabularyElement20704
org.fosstrak.epcis.repository.query.QueryOperationsBackend8704
org.fosstrak.epcis.soap.EPCISServicePortType8700
org.fosstrak.epcis.repository.model.AggregationEvent16601
org.fosstrak.epcis.repository.model.EPCISEvent16601
org.fosstrak.epcis.repository.model.TransactionEvent16601
org.fosstrak.epcis.repository.query.QueryOperationsSession28601
org.fosstrak.epcis.repository.query.QuerySubscriptionScheduled40602
org.fosstrak.epcis.soap.DuplicateSubscriptionExceptionResponse17600
org.fosstrak.epcis.soap.ImplementationExceptionResponse17600
org.fosstrak.epcis.soap.InvalidURIExceptionResponse17600
org.fosstrak.epcis.soap.NoSuchNameExceptionResponse17600
org.fosstrak.epcis.soap.NoSuchSubscriptionExceptionResponse17600

Averages.

NCSS averageProgram NCSSClasses averageMethods averageJavadocs average
66.214,251.000.117.752.96

Methods

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

TOP 30 Methods containing the most NCSS.

MethodsNCSSCCNJavadocs
org.fosstrak.epcis.repository.query.QueryOperationsModule.constructSimpleEventQueries(QueryParams)3061041
org.fosstrak.epcis.repository.query.QueryOperationsBackendSQL.runSimpleEventQuery(QueryOperationsSession,SimpleEventQueryDTO,List)150251
org.fosstrak.epcis.repository.capture.CaptureOperationsModule.handleEvent(Session,Node,String)140511
org.fosstrak.epcis.repository.query.QueryOperationsBackendSQL.prepareSimpleEventQuery(QueryOperationsSession,SimpleEventQueryDTO)124430
org.fosstrak.epcis.repository.query.QueryOperationsModule.subscribe(String,QueryParams,String,SubscriptionControls,String)87271
org.fosstrak.epcis.repository.query.QueryOperationsModule.constructMasterDataQuery(QueryParams)72281
org.fosstrak.epcis.repository.capture.CaptureOperationsServlet.doPost(HttpServletRequest,HttpServletResponse)62120
org.fosstrak.epcis.repository.query.QueryOperationsBackendSQL.prepareMasterDataQuery(QueryOperationsSession,String,MasterDataQueryDTO)62190
org.fosstrak.epcis.repository.capture.CaptureOperationsModule.doCapture(InputStream,Principal)58201
org.fosstrak.epcis.repository.query.QuerySubscription.executeQuery()58161
org.fosstrak.epcis.repository.capture.CaptureOperationsModule.checkEpc(String)54241
org.fosstrak.epcis.repository.query.QueryOperationsModule.poll(String,QueryParams)52101
org.fosstrak.epcis.repository.query.QuerySubscription.callbackObject(Object)51151
org.fosstrak.epcis.repository.capture.CaptureOperationsBackendSQL.insertEvent(CaptureOperationsSession,Timestamp,Timestamp,String,Long,Long,Long,Long,String,String,Long,Long,String)50160
org.fosstrak.epcis.repository.query.QueryOperationsBackendSQL.storeSupscriptions(QueryOperationsSession,QueryParams,String,String,SubscriptionControls,String,QuerySubscriptionScheduled,String,Schedule)4231
org.fosstrak.epcis.repository.query.Schedule.handleValues(String[],String,int,int)38200
org.fosstrak.epcis.repository.query.QueryOperationsBackendSQL.runMasterDataQuery(QueryOperationsSession,MasterDataQueryDTO,List)37111
org.fosstrak.epcis.repository.query.QueryOperationsBackendSQL.fetchSubscriptions(QueryOperationsSession)3480
org.fosstrak.epcis.repository.query.QuerySubscriptionTriggered.handleNotification(Notification,Object)3480
org.fosstrak.epcis.repository.query.QueryOperationsWebService.subscribe(Subscribe)33251
org.fosstrak.epcis.repository.query.QuerySubscription.updateSubscription(GregorianCalendar)3240
org.fosstrak.epcis.repository.query.Schedule.Schedule(QuerySchedule)31301
org.fosstrak.epcis.repository.query.QueryOperationsBackendSQL.fetchAttributes(QueryOperationsSession,String,String,List,List)3080
org.fosstrak.epcis.repository.query.QueryOperationsModule.unsubscribe(String)2861
org.fosstrak.epcis.repository.capture.CaptureOperationsModule.doDbReset()2791
org.fosstrak.epcis.repository.query.QueryOperationsWebService.poll(Poll)25191
org.fosstrak.epcis.repository.capture.CaptureOperationsBackendSQL.insertExtensionFieldsForEvent(CaptureOperationsSession,long,String,List)2460
org.fosstrak.epcis.repository.capture.CaptureOperationsModule.handleBizTransactions(Session,Node)2371
org.fosstrak.epcis.repository.capture.CaptureOperationsModule.getOrInsertVocabularyElement(Session,String,String)2291
org.fosstrak.epcis.repository.capture.CaptureOperationsServlet.init()2131

Averages.

Program NCSSNCSS averageCCN averageJavadocs average
4,251.007.582.900.28

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