Fork me on GitHub

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
org.oasis_open.docs.wsn.b_2 48 181 997 234 2603 0 0
org.oasis_open.docs.wsn.brw_2 34 105 520 129 857 0 0
org.oasis_open.docs.wsn.br_2 10 50 246 60 614 0 0
org.oasis_open.docs.wsn.t_1 7 34 191 44 549 0 0
org.oasis_open.docs.wsn.client 5 20 141 15 88 5 95
org.oasis_open.docs.wsrf.bf_2 2 17 129 32 370 0 0
org.miloss.fgsms.wsn 2 4 56 4 17 0 8
org.oasis_open.docs.wsrf.r_2 3 5 30 8 68 0 0
Classes total Methods total NCSS total Javadocs Javadoc lines Single lines comment Multi lines comment
111 416 2310 526 5166 5 103

Objects

Objects

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

TOP 30 classes containing the most NCSS.

Object NCSS Methods Classes Javadocs
org.oasis_open.docs.wsn.b_2.ObjectFactory 208 86 0 87
org.oasis_open.docs.wsrf.bf_2.BaseFaultType 65 11 3 25
org.oasis_open.docs.wsn.br_2.ObjectFactory 47 19 0 20
org.miloss.fgsms.wsn.WSNUtility 41 4 0 3
org.oasis_open.docs.wsn.t_1.TopicNamespaceType 35 8 1 12
org.oasis_open.docs.wsn.t_1.TopicType 34 9 0 10
org.oasis_open.docs.wsn.b_2.Subscribe 32 9 1 12
org.oasis_open.docs.wsn.b_2.NotificationMessageHolderType 27 8 1 12
org.oasis_open.docs.wsn.br_2.NotificationBrokerRP 26 8 0 9
org.oasis_open.docs.wsn.br_2.RegisterPublisher 26 8 0 9
org.oasis_open.docs.wsn.br_2.PublisherRegistrationRP 21 7 0 8
org.oasis_open.docs.wsn.b_2.NotificationProducerRP 21 6 0 7
org.oasis_open.docs.wsn.b_2.SubscribeResponse 21 7 0 8
org.oasis_open.docs.wsn.b_2.SubscriptionManagerRP 21 8 0 9
org.oasis_open.docs.wsn.t_1.ObjectFactory 20 9 0 10
org.oasis_open.docs.wsn.client.NotificationService 18 4 0 3
org.oasis_open.docs.wsn.client.PausableSubscriptionManagerService 18 4 0 3
org.oasis_open.docs.wsn.brw_2.CreatePullPointService 17 4 0 3
org.oasis_open.docs.wsn.brw_2.NotificationService 17 4 0 3
org.oasis_open.docs.wsn.brw_2.PausableSubscriptionManagerService 17 4 0 3
org.oasis_open.docs.wsn.brw_2.PublisherRegistrationManagerService 17 4 0 3
org.oasis_open.docs.wsn.brw_2.PullPointService 17 4 0 3
org.oasis_open.docs.wsn.client.CreatePullPointService 17 4 0 3
org.oasis_open.docs.wsn.client.PublisherRegistrationManagerService 17 4 0 3
org.oasis_open.docs.wsn.client.PullPointService 17 4 0 3
org.oasis_open.docs.wsn.b_2.RenewResponse 16 5 0 6
org.oasis_open.docs.wsn.b_2.CreatePullPointResponse 14 4 0 5
org.oasis_open.docs.wsn.b_2.GetMessages 14 4 0 5
org.oasis_open.docs.wsn.b_2.GetMessagesResponse 14 3 0 4
org.oasis_open.docs.wsn.b_2.TopicExpressionType 14 4 0 5

TOP 30 classes containing the most methods.

Object NCSS Methods Classes Javadocs
org.oasis_open.docs.wsn.b_2.ObjectFactory 208 86 0 87
org.oasis_open.docs.wsn.br_2.ObjectFactory 47 19 0 20
org.oasis_open.docs.wsrf.bf_2.BaseFaultType 65 11 3 25
org.oasis_open.docs.wsn.b_2.Subscribe 32 9 1 12
org.oasis_open.docs.wsn.t_1.ObjectFactory 20 9 0 10
org.oasis_open.docs.wsn.t_1.TopicType 34 9 0 10
org.oasis_open.docs.wsn.br_2.NotificationBrokerRP 26 8 0 9
org.oasis_open.docs.wsn.br_2.RegisterPublisher 26 8 0 9
org.oasis_open.docs.wsn.b_2.NotificationMessageHolderType 27 8 1 12
org.oasis_open.docs.wsn.b_2.SubscriptionManagerRP 21 8 0 9
org.oasis_open.docs.wsn.t_1.TopicNamespaceType 35 8 1 12
org.oasis_open.docs.wsn.br_2.PublisherRegistrationRP 21 7 0 8
org.oasis_open.docs.wsn.b_2.SubscribeResponse 21 7 0 8
org.oasis_open.docs.wsn.b_2.NotificationProducerRP 21 6 0 7
org.oasis_open.docs.wsrf.bf_2.ObjectFactory 13 6 0 7
org.oasis_open.docs.wsn.b_2.RenewResponse 16 5 0 6
org.oasis_open.docs.wsrf.r_2.ObjectFactory 12 5 0 6
org.miloss.fgsms.wsn.WSNUtility 41 4 0 3
org.oasis_open.docs.wsn.brw_2.CreatePullPointService 17 4 0 3
org.oasis_open.docs.wsn.brw_2.NotificationBroker 5 4 0 5
org.oasis_open.docs.wsn.brw_2.NotificationService 17 4 0 3
org.oasis_open.docs.wsn.brw_2.PausableSubscriptionManager 5 4 0 5
org.oasis_open.docs.wsn.brw_2.PausableSubscriptionManagerService 17 4 0 3
org.oasis_open.docs.wsn.brw_2.PublisherRegistrationManagerService 17 4 0 3
org.oasis_open.docs.wsn.brw_2.PullPointService 17 4 0 3
org.oasis_open.docs.wsn.br_2.RegisterPublisherResponse 11 4 0 5
org.oasis_open.docs.wsn.b_2.CreatePullPointResponse 14 4 0 5
org.oasis_open.docs.wsn.b_2.GetMessages 14 4 0 5
org.oasis_open.docs.wsn.b_2.TopicExpressionType 14 4 0 5
org.oasis_open.docs.wsn.b_2.UnacceptableInitialTerminationTimeFaultType 11 4 0 5

Averages.

NCSS average Program NCSS Classes average Methods average Javadocs average
12.80 2,310.00 0.05 3.75 4.74

Methods

Methods

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

TOP 30 Methods containing the most NCSS.

Methods NCSS CCN Javadocs
org.miloss.fgsms.wsn.WSNUtility.getWSAAddress(W3CEndpointReference) 14 5 0
org.miloss.fgsms.wsn.WSNUtility.listStringtoString(String) 11 7 1
org.miloss.fgsms.wsn.WSNUtility.topicExpressionToList(TopicExpressionType) 8 5 0
org.miloss.fgsms.wsn.WSNUtility.stringIsNullOrEmpty(String) 6 5 1
org.oasis_open.docs.wsn.t_1.TopicNamespaceType.isFinal() 5 3 1
org.oasis_open.docs.wsn.t_1.TopicType.isFinal() 5 3 1
org.oasis_open.docs.wsn.br_2.DestroyRegistration.getAny() 4 2 1
org.oasis_open.docs.wsn.br_2.DestroyRegistrationResponse.getAny() 4 2 1
org.oasis_open.docs.wsn.br_2.NotificationBrokerRP.getTopicExpression() 4 2 1
org.oasis_open.docs.wsn.br_2.NotificationBrokerRP.getTopicExpressionDialect() 4 2 1
org.oasis_open.docs.wsn.br_2.PublisherRegistrationRP.getTopic() 4 2 1
org.oasis_open.docs.wsn.br_2.RegisterPublisher.getTopic() 4 2 1
org.oasis_open.docs.wsn.br_2.RegisterPublisher.getAny() 4 2 1
org.oasis_open.docs.wsn.b_2.CreatePullPoint.getAny() 4 2 1
org.oasis_open.docs.wsn.b_2.CreatePullPointResponse.getAny() 4 2 1
org.oasis_open.docs.wsn.b_2.DestroyPullPoint.getAny() 4 2 1
org.oasis_open.docs.wsn.b_2.DestroyPullPointResponse.getAny() 4 2 1
org.oasis_open.docs.wsn.b_2.FilterType.getAny() 4 2 1
org.oasis_open.docs.wsn.b_2.GetCurrentMessage.getAny() 4 2 1
org.oasis_open.docs.wsn.b_2.GetCurrentMessageResponse.getAny() 4 2 1
org.oasis_open.docs.wsn.b_2.GetMessages.getAny() 4 2 1
org.oasis_open.docs.wsn.b_2.GetMessagesResponse.getNotificationMessage() 4 2 1
org.oasis_open.docs.wsn.b_2.GetMessagesResponse.getAny() 4 2 1
org.oasis_open.docs.wsn.b_2.InvalidFilterFaultType.getUnknownFilter() 4 2 1
org.oasis_open.docs.wsn.b_2.NotificationProducerRP.getTopicExpression() 4 2 1
org.oasis_open.docs.wsn.b_2.NotificationProducerRP.getTopicExpressionDialect() 4 2 1
org.oasis_open.docs.wsn.b_2.Notify.getNotificationMessage() 4 2 1
org.oasis_open.docs.wsn.b_2.Notify.getAny() 4 2 1
org.oasis_open.docs.wsn.b_2.PauseSubscription.getAny() 4 2 1
org.oasis_open.docs.wsn.b_2.PauseSubscriptionResponse.getAny() 4 2 1

Averages.

Program NCSS NCSS average CCN average Javadocs average
2,310.00 2.38 1.16 0.95

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