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.

PackageClassesMethodsNCSSJavadocsJavadoc linesSingle lines commentMulti lines comment
org.fosstrak.epcis.repository.query1618125841291039224244
org.fosstrak.epcis.repository.capture99513506164588112
org.fosstrak.epcis.repository.model27128453401932544
org.fosstrak.epcis.soap1483262155900
org.fosstrak.epcis.repository10261232631215157
Classes totalMethods totalNCSS totalJavadocsJavadoc linesSingle lines commentMulti lines comment
76513477227122483291057

Objects

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

TOP 30 classes containing the most NCSS.

ObjectNCSSMethodsClassesJavadocs
org.fosstrak.epcis.repository.query.QueryOperationsModule76736239
org.fosstrak.epcis.repository.capture.CaptureOperationsModule71938125
org.fosstrak.epcis.repository.query.QueryOperationsBackendSQL62716014
org.fosstrak.epcis.repository.query.QuerySubscription24817118
org.fosstrak.epcis.repository.query.Schedule22922023
org.fosstrak.epcis.repository.capture.CaptureOperationsBackendSQL21117016
org.fosstrak.epcis.repository.capture.CaptureOperationsServlet151807
org.fosstrak.epcis.repository.query.QueryOperationsWebService9811010
org.fosstrak.epcis.repository.model.EventFieldExtension7522011
org.fosstrak.epcis.repository.query.MasterDataQueryDTO742401
org.fosstrak.epcis.repository.query.SimpleEventQueryDTO691631
org.fosstrak.epcis.repository.query.QueryInitServlet62404
org.fosstrak.epcis.repository.capture.CaptureOperationsSession51801
org.fosstrak.epcis.repository.capture.MultipartFormDataFilter46321
org.fosstrak.epcis.repository.query.QuerySubscriptionTriggered41202
org.fosstrak.epcis.repository.query.QuerySubscriptionScheduled40607
org.fosstrak.epcis.repository.model.EnumUserType391501
org.fosstrak.epcis.repository.model.BaseEvent381501
org.fosstrak.epcis.repository.model.EPCISEvent321201
org.fosstrak.epcis.repository.query.QueryOperationsSession28602
org.fosstrak.epcis.repository.model.BusinessTransaction24801
org.fosstrak.epcis.repository.model.VocabularyAttributeElement24802
org.fosstrak.epcis.repository.model.VocabularyAttrCiD23701
org.fosstrak.epcis.repository.query.SimpleEventQueryDTO.EventQueryParam21800
org.fosstrak.epcis.repository.model.VocabularyElement20704
org.fosstrak.epcis.repository.query.QueryOperationsModule.EventComparator19200
org.fosstrak.epcis.soap.DuplicateSubscriptionExceptionResponse17601
org.fosstrak.epcis.soap.ImplementationExceptionResponse17601
org.fosstrak.epcis.soap.InvalidURIExceptionResponse17601
org.fosstrak.epcis.soap.NoSuchNameExceptionResponse17601

TOP 30 classes containing the most methods.

ObjectNCSSMethodsClassesJavadocs
org.fosstrak.epcis.repository.capture.CaptureOperationsModule71938125
org.fosstrak.epcis.repository.query.QueryOperationsModule76736239
org.fosstrak.epcis.repository.query.MasterDataQueryDTO742401
org.fosstrak.epcis.repository.model.EventFieldExtension7522011
org.fosstrak.epcis.repository.query.Schedule22922023
org.fosstrak.epcis.repository.capture.CaptureOperationsBackendSQL21117016
org.fosstrak.epcis.repository.query.QuerySubscription24817118
org.fosstrak.epcis.repository.query.QueryOperationsBackendSQL62716014
org.fosstrak.epcis.repository.query.SimpleEventQueryDTO691631
org.fosstrak.epcis.repository.model.BaseEvent381501
org.fosstrak.epcis.repository.model.EnumUserType391501
org.fosstrak.epcis.repository.capture.CaptureOperationsBackend1312011
org.fosstrak.epcis.repository.model.EPCISEvent321201
org.fosstrak.epcis.repository.query.QueryOperationsWebService9811010
org.fosstrak.epcis.repository.capture.CaptureOperationsServlet151807
org.fosstrak.epcis.repository.capture.CaptureOperationsSession51801
org.fosstrak.epcis.repository.model.BusinessTransaction24801
org.fosstrak.epcis.repository.model.VocabularyAttributeElement24802
org.fosstrak.epcis.repository.query.SimpleEventQueryDTO.EventQueryParam21800
org.fosstrak.epcis.repository.EpcisQueryControlInterface8708
org.fosstrak.epcis.repository.model.VocabularyAttrCiD23701
org.fosstrak.epcis.repository.model.VocabularyElement20704
org.fosstrak.epcis.repository.query.QueryOperationsBackend8708
org.fosstrak.epcis.soap.EPCISServicePortType8701
org.fosstrak.epcis.repository.model.AggregationEvent16601
org.fosstrak.epcis.repository.model.TransactionEvent16601
org.fosstrak.epcis.repository.query.QueryOperationsSession28602
org.fosstrak.epcis.repository.query.QuerySubscriptionScheduled40607
org.fosstrak.epcis.soap.DuplicateSubscriptionExceptionResponse17601
org.fosstrak.epcis.soap.ImplementationExceptionResponse17601

Averages.

NCSS averageProgram NCSSClasses averageMethods averageJavadocs average
55.824,772.000.136.753.57

Methods

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

TOP 30 Methods containing the most NCSS.

MethodsNCSSCCNJavadocs
org.fosstrak.epcis.repository.query.QueryOperationsModule.constructSimpleEventQueries(QueryParams)2931011
org.fosstrak.epcis.repository.query.QueryOperationsBackendSQL.runSimpleEventQuery(QueryOperationsSession,SimpleEventQueryDTO,Object)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)88271
org.fosstrak.epcis.repository.query.QueryOperationsModule.constructMasterDataQuery(QueryParams)72281
org.fosstrak.epcis.repository.query.QueryOperationsBackendSQL.prepareMasterDataQuery(QueryOperationsSession,String,MasterDataQueryDTO)62190
org.fosstrak.epcis.repository.capture.CaptureOperationsModule.getOrEditVocabularyElement(Session,String,String,String)59261
org.fosstrak.epcis.repository.query.QuerySubscription.executeQuery()57161
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)50161
org.fosstrak.epcis.repository.capture.CaptureOperationsServlet.doPost(HttpServletRequest,HttpServletResponse)50111
org.fosstrak.epcis.repository.query.QueryOperationsBackendSQL.storeSupscriptions(QueryOperationsSession,QueryParams,String,String,SubscriptionControls,String,QuerySubscriptionScheduled,String,Schedule)4231
org.fosstrak.epcis.repository.capture.CaptureOperationsModule.doCapture(InputStream,Principal)41171
org.fosstrak.epcis.repository.capture.CaptureOperationsModule.getOrEditVocabularyAttributeElement(Session,String,Long,String,String,String)40171
org.fosstrak.epcis.repository.query.Schedule.handleValues(String[],String,int,int)38201
org.fosstrak.epcis.repository.query.QueryOperationsBackendSQL.runMasterDataQuery(QueryOperationsSession,MasterDataQueryDTO,VocabularyType)37111
org.fosstrak.epcis.repository.capture.CaptureOperationsModule.handleVocabulary(Session,Node,String)36141
org.fosstrak.epcis.repository.query.QueryOperationsBackendSQL.fetchSubscriptions(QueryOperationsSession)3481
org.fosstrak.epcis.repository.query.QuerySubscriptionTriggered.handleNotification(Notification,Object)3481
org.fosstrak.epcis.repository.query.QueryOperationsWebService.subscribe(Subscribe)33251
org.fosstrak.epcis.repository.capture.CaptureOperationsModule.doDbReset()32141
org.fosstrak.epcis.repository.query.QuerySubscription.updateSubscription(Calendar)3241
org.fosstrak.epcis.repository.query.Schedule.Schedule(QuerySchedule)31301
org.fosstrak.epcis.repository.capture.MultipartFormDataFilter.doFilter(ServletRequest,ServletResponse,FilterChain)3070
org.fosstrak.epcis.repository.query.QueryOperationsBackendSQL.fetchAttributes(QueryOperationsSession,String,String,String,AttributeType)3081
org.fosstrak.epcis.repository.query.QueryOperationsModule.unsubscribe(String)2861
org.fosstrak.epcis.repository.query.QueryOperationsModule.parseExtensionField(String,String,Object)25101

Averages.

Program NCSSNCSS averageCCN averageJavadocs average
4,772.007.402.870.39

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