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.services.rs.impl.reports.ws 22 63 1925 76 250 45 110
org.miloss.fgsms.services.rs.impl 6 40 1102 17 126 25 118
org.miloss.fgsms.services.rs.impl.reports.os 7 28 734 7 28 28 35
org.miloss.fgsms.services.rs.impl.reports 3 16 297 4 18 10 15
org.miloss.fgsms.services.rs.impl.reports.broker 3 14 272 4 15 14 15
Classes total Methods total NCSS total Javadocs Javadoc lines Single lines comment Multi lines comment
41 161 4330 108 437 122 293

Objects

Objects

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

TOP 30 classes containing the most NCSS.

Object NCSS Methods Classes Javadocs
org.miloss.fgsms.services.rs.impl.CsvExporter 581 12 0 2
org.miloss.fgsms.services.rs.impl.Reporting 390 20 0 7
org.miloss.fgsms.services.rs.impl.reports.AvailabilityByService 130 8 0 2
org.miloss.fgsms.services.rs.impl.reports.ws.InvocationsByConsumerByServiceByMethod 107 3 0 2
org.miloss.fgsms.services.rs.impl.reports.os.DiskIOReport 99 4 0 1
org.miloss.fgsms.services.rs.impl.reports.ws.InvocationsByConsumerByService 99 3 0 4
org.miloss.fgsms.services.rs.impl.reports.os.FreeDiskSpace 97 4 0 1
org.miloss.fgsms.services.rs.impl.reports.os.NetworkIOReport 86 4 0 1
org.miloss.fgsms.services.rs.impl.reports.ws.InvocationsByConsumer 78 3 0 4
org.miloss.fgsms.services.rs.impl.reports.ws.SuccessFailureCountByHostingServer 75 2 0 3
org.miloss.fgsms.services.rs.impl.reports.broker.ConsumersByQueueOrTopic 74 6 0 2
org.miloss.fgsms.services.rs.impl.reports.ws.SuccessFailureCountByServiceByMethod 72 2 0 3
org.miloss.fgsms.services.rs.impl.reports.os.MemoryUsageReport 70 4 0 1
org.miloss.fgsms.services.rs.impl.reports.ws.ThroughputByHostingServer 69 3 0 3
org.miloss.fgsms.services.rs.impl.reports.broker.QueueDepth 68 4 0 1
org.miloss.fgsms.services.rs.impl.reports.os.CpuUsageReport 68 4 0 1
org.miloss.fgsms.services.rs.impl.reports.os.ThreadCount 68 4 0 1
org.miloss.fgsms.services.rs.impl.reports.ws.AverageMessageSizeByServiceByMethod 68 3 0 4
org.miloss.fgsms.services.rs.impl.reports.os.OpenFilesByProcess 67 4 0 1
org.miloss.fgsms.services.rs.impl.reports.ws.MeanTimeBetweenFailureByService 67 5 0 4
org.miloss.fgsms.services.rs.impl.reports.ws.ResponseTimeOverTime 67 3 0 3
org.miloss.fgsms.services.rs.impl.reports.ws.TotalMessageSizesByService 67 3 0 4
org.miloss.fgsms.services.rs.impl.reports.ws.SuccessFailureCountByService 66 2 0 3
org.miloss.fgsms.services.rs.impl.reports.ServiceLevelAgreementReport 62 4 0 1
org.miloss.fgsms.services.rs.impl.reports.ws.TotalMessageSizeByServiceByMethod 62 3 0 4
org.miloss.fgsms.services.rs.impl.reports.ws.ThroughputByServiceByMethod 61 3 0 4
org.miloss.fgsms.services.rs.impl.reports.ws.InvocationsByHostingServer 60 3 0 4
org.miloss.fgsms.services.rs.impl.reports.ws.InvocationsByDataCollector 59 3 0 4
org.miloss.fgsms.services.rs.impl.reports.ws.AverageMessageSizeByService 57 3 0 4
org.miloss.fgsms.services.rs.impl.reports.ws.ThroughputByService 56 3 0 4

TOP 30 classes containing the most methods.

Object NCSS Methods Classes Javadocs
org.miloss.fgsms.services.rs.impl.Reporting 390 20 0 7
org.miloss.fgsms.services.rs.impl.CsvExporter 581 12 0 2
org.miloss.fgsms.services.rs.impl.reports.AvailabilityByService 130 8 0 2
org.miloss.fgsms.services.rs.impl.reports.broker.ConsumersByQueueOrTopic 74 6 0 2
org.miloss.fgsms.services.rs.impl.reports.ws.MeanTimeBetweenFailureByService 67 5 0 4
org.miloss.fgsms.services.rs.impl.ReportGeneratorPlugin 5 4 0 5
org.miloss.fgsms.services.rs.impl.reports.BaseReportGenerator 34 4 0 1
org.miloss.fgsms.services.rs.impl.reports.broker.QueueDepth 68 4 0 1
org.miloss.fgsms.services.rs.impl.reports.broker.QueueTopicCountByBroker 49 4 0 1
org.miloss.fgsms.services.rs.impl.reports.os.CpuUsageReport 68 4 0 1
org.miloss.fgsms.services.rs.impl.reports.os.DiskIOReport 99 4 0 1
org.miloss.fgsms.services.rs.impl.reports.os.FreeDiskSpace 97 4 0 1
org.miloss.fgsms.services.rs.impl.reports.os.MemoryUsageReport 70 4 0 1
org.miloss.fgsms.services.rs.impl.reports.os.NetworkIOReport 86 4 0 1
org.miloss.fgsms.services.rs.impl.reports.os.OpenFilesByProcess 67 4 0 1
org.miloss.fgsms.services.rs.impl.reports.os.ThreadCount 68 4 0 1
org.miloss.fgsms.services.rs.impl.reports.ServiceLevelAgreementReport 62 4 0 1
org.miloss.fgsms.services.rs.impl.reports.ws.AverageMessageSizeByService 57 3 0 4
org.miloss.fgsms.services.rs.impl.reports.ws.AverageMessageSizeByServiceByMethod 68 3 0 4
org.miloss.fgsms.services.rs.impl.reports.ws.AverageResponseTimeByService 50 3 0 4
org.miloss.fgsms.services.rs.impl.reports.ws.AverageResponseTimeByServiceByMethod 52 3 0 4
org.miloss.fgsms.services.rs.impl.reports.ws.BaseWebServiceReport 26 3 0 3
org.miloss.fgsms.services.rs.impl.reports.ws.InvocationsByConsumer 78 3 0 4
org.miloss.fgsms.services.rs.impl.reports.ws.InvocationsByConsumerByService 99 3 0 4
org.miloss.fgsms.services.rs.impl.reports.ws.InvocationsByConsumerByServiceByMethod 107 3 0 2
org.miloss.fgsms.services.rs.impl.reports.ws.InvocationsByDataCollector 59 3 0 4
org.miloss.fgsms.services.rs.impl.reports.ws.InvocationsByHostingServer 60 3 0 4
org.miloss.fgsms.services.rs.impl.reports.ws.ResponseTimeOverTime 67 3 0 3
org.miloss.fgsms.services.rs.impl.reports.ws.ThroughputByHostingServer 69 3 0 3
org.miloss.fgsms.services.rs.impl.reports.ws.ThroughputByService 56 3 0 4

Averages.

NCSS average Program NCSS Classes average Methods average Javadocs average
82.68 4,330.00 0.00 3.93 2.63

Methods

Methods

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

TOP 30 Methods containing the most NCSS.

Methods NCSS CCN Javadocs
org.miloss.fgsms.services.rs.impl.reports.ws.InvocationsByConsumerByServiceByMethod.generateReport(OutputStreamWriter,String,String,String,TimeRange,String,SecurityWrapper,WebServiceContext) 102 23 0
org.miloss.fgsms.services.rs.impl.Reporting.generateHtmlReport(String,ExportDataRequestMsg) 96 38 0
org.miloss.fgsms.services.rs.impl.reports.ws.InvocationsByConsumerByService.generateReport(OutputStreamWriter,String,String,String,TimeRange,String,SecurityWrapper,WebServiceContext) 94 21 1
org.miloss.fgsms.services.rs.impl.reports.os.DiskIOReport.generateReport(OutputStreamWriter,String,String,String,TimeRange,String,SecurityWrapper,WebServiceContext) 90 15 0
org.miloss.fgsms.services.rs.impl.reports.os.FreeDiskSpace.generateReport(OutputStreamWriter,String,String,String,TimeRange,String,SecurityWrapper,WebServiceContext) 88 15 0
org.miloss.fgsms.services.rs.impl.CsvExporter.generateTransactionsCSVReport(ExportCSVDataRequestMsg,String,String,String,String,SecurityWrapper) 78 19 0
org.miloss.fgsms.services.rs.impl.CsvExporter.generateStatisticsCSVReport(ExportCSVDataRequestMsg,String,String,String,String,SecurityWrapper) 77 8 0
org.miloss.fgsms.services.rs.impl.reports.os.NetworkIOReport.generateReport(OutputStreamWriter,String,String,String,TimeRange,String,SecurityWrapper,WebServiceContext) 77 13 0
org.miloss.fgsms.services.rs.impl.reports.ws.InvocationsByConsumer.generateReport(OutputStreamWriter,String,String,String,TimeRange,String,SecurityWrapper,WebServiceContext) 73 16 1
org.miloss.fgsms.services.rs.impl.reports.ws.SuccessFailureCountByHostingServer.generateReport(OutputStreamWriter,String,String,String,TimeRange,String,SecurityWrapper,WebServiceContext) 72 16 1
org.miloss.fgsms.services.rs.impl.reports.ws.SuccessFailureCountByServiceByMethod.generateReport(OutputStreamWriter,String,String,String,TimeRange,String,SecurityWrapper,WebServiceContext) 69 16 1
org.miloss.fgsms.services.rs.impl.reports.ws.ThroughputByHostingServer.generateReport(OutputStreamWriter,String,String,String,TimeRange,String,SecurityWrapper,WebServiceContext) 64 14 0
org.miloss.fgsms.services.rs.impl.Reporting.generateZipFileandDelete(String,String) 63 17 0
org.miloss.fgsms.services.rs.impl.reports.ws.AverageMessageSizeByServiceByMethod.generateReport(OutputStreamWriter,String,String,String,TimeRange,String,SecurityWrapper,WebServiceContext) 63 13 1
org.miloss.fgsms.services.rs.impl.reports.ws.SuccessFailureCountByService.generateReport(OutputStreamWriter,String,String,String,TimeRange,String,SecurityWrapper,WebServiceContext) 63 11 1
org.miloss.fgsms.services.rs.impl.reports.ws.ResponseTimeOverTime.generateReport(OutputStreamWriter,String,String,String,TimeRange,String,SecurityWrapper,WebServiceContext) 62 12 0
org.miloss.fgsms.services.rs.impl.reports.ws.TotalMessageSizesByService.generateReport(OutputStreamWriter,String,String,String,TimeRange,String,SecurityWrapper,WebServiceContext) 62 13 1
org.miloss.fgsms.services.rs.impl.reports.broker.ConsumersByQueueOrTopic.generateReport(OutputStreamWriter,String,String,String,TimeRange,String,SecurityWrapper,WebServiceContext) 61 11 0
org.miloss.fgsms.services.rs.impl.CsvExporter.generateMachineCSVReport(ExportCSVDataRequestMsg,String,String,String,String,SecurityWrapper) 60 12 0
org.miloss.fgsms.services.rs.impl.reports.os.MemoryUsageReport.generateReport(OutputStreamWriter,String,String,String,TimeRange,String,SecurityWrapper,WebServiceContext) 60 12 0
org.miloss.fgsms.services.rs.impl.reports.broker.QueueDepth.generateReport(OutputStreamWriter,String,String,String,TimeRange,String,SecurityWrapper,WebServiceContext) 59 10 0
org.miloss.fgsms.services.rs.impl.CsvExporter.generateProcessCSVReport(ExportCSVDataRequestMsg,String,String,String,String,SecurityWrapper) 58 12 0
org.miloss.fgsms.services.rs.impl.reports.os.CpuUsageReport.generateReport(OutputStreamWriter,String,String,String,TimeRange,String,SecurityWrapper,WebServiceContext) 58 11 0
org.miloss.fgsms.services.rs.impl.reports.os.OpenFilesByProcess.generateReport(OutputStreamWriter,String,String,String,TimeRange,String,SecurityWrapper,WebServiceContext) 58 10 0
org.miloss.fgsms.services.rs.impl.reports.os.ThreadCount.generateReport(OutputStreamWriter,String,String,String,TimeRange,String,SecurityWrapper,WebServiceContext) 58 11 0
org.miloss.fgsms.services.rs.impl.reports.ws.TotalMessageSizeByServiceByMethod.generateReport(OutputStreamWriter,String,String,String,TimeRange,String,SecurityWrapper,WebServiceContext) 57 12 1
org.miloss.fgsms.services.rs.impl.reports.ws.ThroughputByServiceByMethod.generateReport(OutputStreamWriter,String,String,String,TimeRange,String,SecurityWrapper,WebServiceContext) 56 12 1
org.miloss.fgsms.services.rs.impl.reports.ws.InvocationsByHostingServer.generateReport(OutputStreamWriter,String,String,String,TimeRange,String,SecurityWrapper,WebServiceContext) 55 12 1
org.miloss.fgsms.services.rs.impl.reports.ws.InvocationsByDataCollector.generateReport(OutputStreamWriter,String,String,String,TimeRange,String,SecurityWrapper,WebServiceContext) 54 11 1
org.miloss.fgsms.services.rs.impl.CsvExporter.generateAvailabilityCSVReport(ExportCSVDataRequestMsg,String,String,String,String,SecurityWrapper) 52 6 0

Averages.

Program NCSS NCSS average CCN average Javadocs average
4,330.00 20.70 4.99 0.42

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