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.miloss.fgsms.common 15 159 2627 114 863 162 600
org.miloss.fgsms.common.codec 17 126 662 140 1521 88 606
Classes total Methods total NCSS total Javadocs Javadoc lines Single lines comment Multi lines comment
32 285 3289 254 2384 250 1206

Objects

Objects

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

TOP 30 classes containing the most NCSS.

Object NCSS Methods Classes Javadocs
org.miloss.fgsms.common.Utility 657 39 0 32
org.miloss.fgsms.common.UserIdentityUtil 470 14 0 14
org.miloss.fgsms.common.AesCbcWithIntegrity 298 20 3 36
org.miloss.fgsms.common.codec.Base64 188 26 0 27
org.miloss.fgsms.common.DBSettingsLoader 187 6 0 6
org.miloss.fgsms.common.IpAddressUtility 165 2 0 3
org.miloss.fgsms.common.codec.BaseNCodec 135 24 1 25
org.miloss.fgsms.common.AES 128 11 0 4
org.miloss.fgsms.common.PublicationConstants 119 2 0 1
org.miloss.fgsms.common.Logger 107 49 0 2
org.miloss.fgsms.common.codec.Hex 95 25 0 26
org.miloss.fgsms.common.codec.BinaryCodec 78 11 0 12
org.miloss.fgsms.common.codec.StringUtils 59 20 0 20
org.miloss.fgsms.common.SLAUtils 46 3 0 4
org.miloss.fgsms.common.AuditLogger 45 3 0 4
org.miloss.fgsms.common.PropertyLoader 42 2 0 3
org.miloss.fgsms.common.Main 36 2 0 1
org.miloss.fgsms.common.codec.CharSequenceUtils 17 1 0 2
org.miloss.fgsms.common.DBUtils 17 3 0 1
org.miloss.fgsms.common.BundleLoader 15 2 0 2
org.miloss.fgsms.common.codec.StringEncoderComparator 14 3 0 4
org.miloss.fgsms.common.codec.Charsets 11 2 0 3
org.miloss.fgsms.common.codec.DecoderException 10 4 0 5
org.miloss.fgsms.common.codec.EncoderException 10 4 0 5
org.miloss.fgsms.common.CXFUserIdentifyUtil 8 1 0 1
org.miloss.fgsms.common.codec.CharEncoding 7 0 0 1
org.miloss.fgsms.common.codec.BinaryDecoder 2 1 0 1
org.miloss.fgsms.common.codec.BinaryEncoder 2 1 0 1
org.miloss.fgsms.common.codec.Decoder 2 1 0 2
org.miloss.fgsms.common.codec.Encoder 2 1 0 2

TOP 30 classes containing the most methods.

Object NCSS Methods Classes Javadocs
org.miloss.fgsms.common.Logger 107 49 0 2
org.miloss.fgsms.common.Utility 657 39 0 32
org.miloss.fgsms.common.codec.Base64 188 26 0 27
org.miloss.fgsms.common.codec.Hex 95 25 0 26
org.miloss.fgsms.common.codec.BaseNCodec 135 24 1 25
org.miloss.fgsms.common.AesCbcWithIntegrity 298 20 3 36
org.miloss.fgsms.common.codec.StringUtils 59 20 0 20
org.miloss.fgsms.common.UserIdentityUtil 470 14 0 14
org.miloss.fgsms.common.AES 128 11 0 4
org.miloss.fgsms.common.codec.BinaryCodec 78 11 0 12
org.miloss.fgsms.common.DBSettingsLoader 187 6 0 6
org.miloss.fgsms.common.codec.DecoderException 10 4 0 5
org.miloss.fgsms.common.codec.EncoderException 10 4 0 5
org.miloss.fgsms.common.AuditLogger 45 3 0 4
org.miloss.fgsms.common.codec.StringEncoderComparator 14 3 0 4
org.miloss.fgsms.common.DBUtils 17 3 0 1
org.miloss.fgsms.common.SLAUtils 46 3 0 4
org.miloss.fgsms.common.BundleLoader 15 2 0 2
org.miloss.fgsms.common.codec.Charsets 11 2 0 3
org.miloss.fgsms.common.IpAddressUtility 165 2 0 3
org.miloss.fgsms.common.Main 36 2 0 1
org.miloss.fgsms.common.PropertyLoader 42 2 0 3
org.miloss.fgsms.common.PublicationConstants 119 2 0 1
org.miloss.fgsms.common.codec.BinaryDecoder 2 1 0 1
org.miloss.fgsms.common.codec.BinaryEncoder 2 1 0 1
org.miloss.fgsms.common.codec.CharSequenceUtils 17 1 0 2
org.miloss.fgsms.common.codec.Decoder 2 1 0 2
org.miloss.fgsms.common.codec.Encoder 2 1 0 2
org.miloss.fgsms.common.codec.StringDecoder 2 1 0 2
org.miloss.fgsms.common.codec.StringEncoder 2 1 0 2

Averages.

NCSS average Program NCSS Classes average Methods average Javadocs average
93.00 3,289.00 0.13 8.91 7.94

Methods

Methods

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

TOP 30 Methods containing the most NCSS.

Methods NCSS CCN Javadocs
org.miloss.fgsms.common.IpAddressUtility.modifyURL(String,boolean) 150 45 1
org.miloss.fgsms.common.Utility.getConfigurationDBConnection() 78 22 1
org.miloss.fgsms.common.codec.Base64.encode(Override[],int,int,Context) 50 20 1
org.miloss.fgsms.common.DBSettingsLoader.GetGlobalPolicy(boolean) 50 9 0
org.miloss.fgsms.common.Utility.getActionNameFromXML(String) 49 21 1
org.miloss.fgsms.common.Utility.getPerformanceDBConnection() 44 11 1
org.miloss.fgsms.common.UserIdentityUtil.assertReadAccess(String,String,String,SecurityWrapper,WebServiceContext) 42 17 1
org.miloss.fgsms.common.UserIdentityUtil.assertWriteAccess(String,String,String,SecurityWrapper,WebServiceContext) 40 15 1
org.miloss.fgsms.common.Utility.getAlternateConfigurationDBConnection() 39 12 0
org.miloss.fgsms.common.UserIdentityUtil.assertAuditAccess(String,String,String,SecurityWrapper,WebServiceContext) 37 12 1
org.miloss.fgsms.common.Utility.addStatusChangeSLA(ServicePolicy) 37 10 1
org.miloss.fgsms.common.codec.Base64.decode(Override[],int,int,Context) 36 16 1
org.miloss.fgsms.common.PropertyLoader.loadProperties(String,ClassLoader) 36 17 1
org.miloss.fgsms.common.UserIdentityUtil.hasReadAccess(String,String,String,SecurityWrapper,WebServiceContext) 36 13 1
org.miloss.fgsms.common.Utility.ICMClassificationToString(ClassificationType) 36 33 1
org.miloss.fgsms.common.Utility.ICMClassificationToColorCodeString(ClassificationType) 36 33 1
org.miloss.fgsms.common.UserIdentityUtil.assertAdministerAccess(String,String,String,SecurityWrapper,WebServiceContext) 35 11 1
org.miloss.fgsms.common.UserIdentityUtil.assertAuditRole(String,String,SecurityWrapper,WebServiceContext) 34 17 0
org.miloss.fgsms.common.UserIdentityUtil.hasGlobalAuditRole(String,String,SecurityWrapper,WebServiceContext) 34 14 1
org.miloss.fgsms.common.UserIdentityUtil.assertGlobalAuditRole(String,String,SecurityWrapper,WebServiceContext) 34 17 1
org.miloss.fgsms.common.AuditLogger.logItem(String,String,String,String,String,MessageContext) 33 6 1
org.miloss.fgsms.common.AES.getUrl(String) 32 14 0
org.miloss.fgsms.common.UserIdentityUtil.assertGlobalAdministratorRole(String,String,SecurityWrapper,WebServiceContext) 32 14 1
org.miloss.fgsms.common.UserIdentityUtil.hasGlobalAdministratorRole(String,String,SecurityWrapper,WebServiceContext) 32 11 1
org.miloss.fgsms.common.Utility.getAlternatePerformanceDBConnection() 32 9 0
org.miloss.fgsms.common.UserIdentityUtil.assertAdminOrAgentRole(String,String,SecurityWrapper,WebServiceContext) 31 15 1
org.miloss.fgsms.common.Utility.parseDateTime(String) 31 15 1
org.miloss.fgsms.common.AES.loadKey() 30 12 0
org.miloss.fgsms.common.Main.main(String[]) 30 12 0
org.miloss.fgsms.common.UserIdentityUtil.assertAgentRole(String,String,SecurityWrapper,WebServiceContext) 30 12 1

Averages.

Program NCSS NCSS average CCN average Javadocs average
3,289.00 8.57 3.86 0.69

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