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
. 20 134 2370 49 279 192 299
org.miloss.fgsms.presentation 21 79 832 31 179 23 785
Classes total Methods total NCSS total Javadocs Javadoc lines Single lines comment Multi lines comment
41 213 3202 80 458 215 1084

Objects

Objects

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

TOP 30 classes containing the most NCSS.

Object NCSS Methods Classes Javadocs
Helper 1057 48 0 27
ProxyLoaderCXF 381 17 0 2
UddiInquiry 225 10 0 2
TransactionLogViewerData 96 7 0 1
OpStatHelper 95 3 0 1
org.miloss.fgsms.presentation.ManageHelper 73 4 0 1
AvailabilityChart 67 3 0 2
org.miloss.fgsms.presentation.SortableStatusList 54 5 1 1
MachinePerfLogsOverTimeHDRates 50 3 0 1
MachinePerfLogsOverTimeNIC 50 3 0 1
org.miloss.fgsms.presentation.ProxyLoader 49 18 0 2
TransactionLogActionBreakDown 46 3 0 1
org.miloss.fgsms.presentation.StatusHelper 37 2 0 2
org.miloss.fgsms.presentation.LoginFilter 36 3 0 1
org.miloss.fgsms.presentation.IProxyLoader 35 16 0 7
PerformanceViewerInvocations 35 5 0 1
PerformanceViewerAvgResTime 33 5 0 1
MachinePerfLogsOverTimeHDFreeSpace 32 3 0 1
org.miloss.fgsms.presentation.OsAgentStatusHelper 26 3 0 3
org.miloss.fgsms.presentation.UserRequestWrapper 23 5 1 1
org.miloss.fgsms.presentation.PKIHandler 22 7 0 1
org.miloss.fgsms.presentation.MachineNetworkData 18 5 0 1
MachinePerfLogsOverTimeCPU 18 3 0 1
MachinePerfLogsOverTimeMem 18 3 0 1
MachinePerfLogsOverTimeThreads 18 3 0 1
ProcessPerfLogsOverTimeCPU 18 3 0 1
ProcessPerfLogsOverTimeMem 18 3 0 1
ProcessPerfLogsOverTimeThreads 18 3 0 1
org.miloss.fgsms.presentation.TransactionLogActionSet 18 5 0 1
org.miloss.fgsms.presentation.TransactionLogData 18 5 0 1

TOP 30 classes containing the most methods.

Object NCSS Methods Classes Javadocs
Helper 1057 48 0 27
org.miloss.fgsms.presentation.ProxyLoader 49 18 0 2
ProxyLoaderCXF 381 17 0 2
org.miloss.fgsms.presentation.IProxyLoader 35 16 0 7
UddiInquiry 225 10 0 2
org.miloss.fgsms.presentation.PKIHandler 22 7 0 1
TransactionLogViewerData 96 7 0 1
org.miloss.fgsms.presentation.MachineNetworkData 18 5 0 1
PerformanceViewerAvgResTime 33 5 0 1
PerformanceViewerInvocations 35 5 0 1
org.miloss.fgsms.presentation.SortableStatusList 54 5 1 1
org.miloss.fgsms.presentation.TransactionLogActionSet 18 5 0 1
org.miloss.fgsms.presentation.TransactionLogData 18 5 0 1
org.miloss.fgsms.presentation.UserRequestWrapper 23 5 1 1
org.miloss.fgsms.presentation.ManageHelper 73 4 0 1
AvailabilityChart 67 3 0 2
org.miloss.fgsms.presentation.LoginFilter 36 3 0 1
MachinePerfLogsOverTimeCPU 18 3 0 1
MachinePerfLogsOverTimeHDFreeSpace 32 3 0 1
MachinePerfLogsOverTimeHDRates 50 3 0 1
MachinePerfLogsOverTimeMem 18 3 0 1
MachinePerfLogsOverTimeNIC 50 3 0 1
MachinePerfLogsOverTimeThreads 18 3 0 1
MessageBrokerQueueDepthChart 15 3 0 1
OpStatHelper 95 3 0 1
org.miloss.fgsms.presentation.OsAgentStatusHelper 26 3 0 3
ProcessPerfLogsOverTimeCPU 18 3 0 1
ProcessPerfLogsOverTimeFileHandles 17 3 0 1
ProcessPerfLogsOverTimeMem 18 3 0 1
ProcessPerfLogsOverTimeThreads 18 3 0 1

Averages.

NCSS average Program NCSS Classes average Methods average Javadocs average
67.15 3,202.00 0.05 5.20 1.95

Methods

Methods

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

TOP 30 Methods containing the most NCSS.

Methods NCSS CCN Javadocs
Helper.buildFromHttpPost(HttpServletRequest,ServicePolicy) 399 141 1
ProxyLoaderCXF.GetUDDIInquiryConfig(ServletContext,HttpServletRequest,HttpServletResponse) 89 37 0
OpStatHelper.GetStatusAll(IProxyLoader,ServletContext,HttpServletRequest,HttpServletResponse) 65 10 0
AvailabilityChart.produceDataset(Map) 62 19 1
UddiInquiry.PublishEndpoints(String[],PCS,SecurityWrapper,String,boolean) 61 11 0
Helper.StringToDuration(String) 48 17 1
UddiInquiry.InquiryMonitoredServices() 47 19 1
MachinePerfLogsOverTimeHDRates.produceDataset(Map) 45 13 0
MachinePerfLogsOverTimeNIC.produceDataset(Map) 45 13 0
Helper.ImportServicePolicy(String,PolicyType) 43 23 0
TransactionLogActionBreakDown.produceDataset(Map) 41 19 0
TransactionLogViewerData.GetRenderedData(GetMessageLogsResponseMsg) 40 14 0
TransactionLogViewerData.produceDataset(Map) 38 16 0
ProxyLoaderCXF.GetPCS(ServletContext,HttpServletRequest,HttpServletResponse) 37 13 0
ProxyLoaderCXF.GetDAS(ServletContext,HttpServletRequest,HttpServletResponse) 37 13 0
ProxyLoaderCXF.GetRS(ServletContext,HttpServletRequest,HttpServletResponse) 37 13 0
ProxyLoaderCXF.GetARS(ServletContext,HttpServletRequest,HttpServletResponse) 37 13 0
ProxyLoaderCXF.GetSS(ServletContext,HttpServletRequest,HttpServletResponse) 37 13 0
ProxyLoaderCXF.GetOpStat(ServletContext,HttpServletRequest,HttpServletResponse) 37 13 0
Helper.StringToLongMS(String) 33 13 1
org.miloss.fgsms.presentation.LoginFilter.doFilter(ServletRequest,ServletResponse,FilterChain) 32 13 0
Helper.BuildRule(HttpServletRequest,PCS,SecurityWrapper) 29 12 1
Helper.BuildSLAAction(HttpServletRequest,PCS,SecurityWrapper) 28 11 1
MachinePerfLogsOverTimeHDFreeSpace.produceDataset(Map) 27 10 0
org.miloss.fgsms.presentation.StatusHelper.sendGetRequest(String) 26 10 1
UddiInquiry.InquiryUDDIBusnessesAsHtmlSelect() 24 9 0
OpStatHelper.toHtmlFormatedString(GetOperatingStatusResponseMessage,String) 23 3 0
Helper.ShowOpStat(SecurityWrapper,org.miloss.fgsms.services.interfaces.status.OpStatusService,String) 22 4 0
org.miloss.fgsms.presentation.ManageHelper.GetPartitionNamesAsHtmlListboxForThroughput(String,String,String,PCS,SecurityWrapper,String) 22 8 0
org.miloss.fgsms.presentation.ManageHelper.GetNICNamesAsHtmlListbox(String,String,String,PCS,SecurityWrapper,String) 22 8 0

Averages.

Program NCSS NCSS average CCN average Javadocs average
3,202.00 12.22 5.42 0.18

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