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
gov.usgs.volcanoes.winston.db 12 141 2287 71 538 98 74
gov.usgs.volcanoes.winston.in.ew 12 107 1355 24 135 49 0
gov.usgs.volcanoes.winston.tools.pannel 9 46 1050 2 11 4 0
gov.usgs.volcanoes.winston.legacyServer.cmd.http 7 52 954 20 119 72 3
gov.usgs.volcanoes.winston.legacyServer.cmd 14 43 847 14 74 21 0
gov.usgs.volcanoes.winston.server.http.cmd 6 23 747 13 61 33 29
gov.usgs.volcanoes.winston 6 73 745 47 328 9 0
gov.usgs.volcanoes.winston.legacyServer 5 55 649 11 72 45 9
gov.usgs.volcanoes.winston.server.wws.cmd 13 33 629 26 127 20 51
gov.usgs.volcanoes.winston.server.http.cmd.fdsnws 7 28 506 20 122 39 28
gov.usgs.volcanoes.winston.server 10 38 455 14 91 13 45
gov.usgs.volcanoes.winston.in 5 30 443 5 29 12 0
gov.usgs.volcanoes.winston.tools 10 41 431 0 0 10 0
gov.usgs.volcanoes.winston.server.http 9 30 392 22 131 11 111
gov.usgs.volcanoes.winston.client 10 18 304 11 55 0 21
gov.usgs.volcanoes.winston.legacyServer.cmd.http.fdsn.command 5 22 296 9 48 28 0
gov.usgs.volcanoes.winston.server.http.cmd.fdsnws.constraint 8 30 294 18 115 0 28
gov.usgs.volcanoes.winston.legacyServer.cmd.http.fdsn.station 5 17 262 5 25 0 0
gov.usgs.volcanoes.winston.legacyServer.cmd.http.fdsn.constraint 7 23 222 7 38 3 0
gov.usgs.volcanoes.winston.server.wws 8 34 216 33 170 1 68
gov.usgs.volcanoes.winston.in.metadata 3 9 140 4 21 3 0
gov.usgs.volcanoes.winston.legacyServer.cmd.http.fdsn.dataselect 5 10 139 5 27 4 0
gov.usgs.volcanoes.winston.legacyServer.cmd.http.fdsn.event 4 9 43 4 20 0 0
gov.usgs.volcanoes.winston.legacyServer.cmd.http.fdsn 1 2 18 1 5 0 0
Classes total Methods total NCSS total Javadocs Javadoc lines Single lines comment Multi lines comment
181 914 13424 386 2362 475 467

Objects

Objects

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

TOP 30 classes containing the most NCSS.

Object NCSS Methods Classes Javadocs
gov.usgs.volcanoes.winston.in.ew.ImportEW 581 28 4 12
gov.usgs.volcanoes.winston.db.InputEW 381 21 2 12
gov.usgs.volcanoes.winston.db.Input 336 16 2 7
gov.usgs.volcanoes.winston.db.Data 290 16 0 12
gov.usgs.volcanoes.winston.legacyServer.WWSClient 270 16 3 1
gov.usgs.volcanoes.winston.PlotHelicorder 266 5 2 1
gov.usgs.volcanoes.winston.db.Admin 244 17 0 17
gov.usgs.volcanoes.winston.tools.pannel.PlotHelicorderPanel 211 5 5 1
gov.usgs.volcanoes.winston.legacyServer.cmd.http.HttpRsamCommand 205 10 0 1
gov.usgs.volcanoes.winston.db.Channels 201 15 1 15
gov.usgs.volcanoes.winston.legacyServer.cmd.http.fdsn.station.FdsnStationQuery 201 11 0 1
gov.usgs.volcanoes.winston.Channel 200 30 0 28
gov.usgs.volcanoes.winston.db.WinstonDatabase 184 21 3 1
gov.usgs.volcanoes.winston.in.ew.ImportWS 183 19 1 2
gov.usgs.volcanoes.winston.legacyServer.cmd.http.HttpGapsCommand 172 8 0 1
gov.usgs.volcanoes.winston.in.ew.ImportWSJob 168 12 0 1
gov.usgs.volcanoes.winston.legacyServer.WWS 168 17 0 6
gov.usgs.volcanoes.winston.tools.pannel.ImportWSPanel 163 7 4 0
gov.usgs.volcanoes.winston.legacyServer.cmd.http.HttpHeliCommand 149 6 0 1
gov.usgs.volcanoes.winston.tools.pannel.TimePanel 148 4 6 1
gov.usgs.volcanoes.winston.server.http.cmd.fdsnws.StationService 145 6 0 2
gov.usgs.volcanoes.winston.server.WWS 135 8 1 4
gov.usgs.volcanoes.winston.server.http.cmd.RsamCommand 134 6 1 2
gov.usgs.volcanoes.winston.legacyServer.cmd.http.fdsn.command.FdsnQueryCommand 133 12 0 3
gov.usgs.volcanoes.winston.legacyServer.cmd.http.HttpStatusCommand 129 6 0 1
gov.usgs.volcanoes.winston.server.http.cmd.GapsCommand 125 4 1 2
gov.usgs.volcanoes.winston.db.Upgrade 124 7 4 1
gov.usgs.volcanoes.winston.WWSClient 124 16 1 16
gov.usgs.volcanoes.winston.tools.pannel.ExportSACPanel 121 5 3 0
gov.usgs.volcanoes.winston.db.Merge 118 7 0 1

TOP 30 classes containing the most methods.

Object NCSS Methods Classes Javadocs
gov.usgs.volcanoes.winston.Channel 200 30 0 28
gov.usgs.volcanoes.winston.in.ew.ImportEW 581 28 4 12
gov.usgs.volcanoes.winston.db.InputEW 381 21 2 12
gov.usgs.volcanoes.winston.db.WinstonDatabase 184 21 3 1
gov.usgs.volcanoes.winston.server.wws.WwsCommandString 98 20 0 20
gov.usgs.volcanoes.winston.in.ew.ImportWS 183 19 1 2
gov.usgs.volcanoes.winston.Instrument 64 19 0 1
gov.usgs.volcanoes.winston.legacyServer.WWSCommandString 88 19 0 1
gov.usgs.volcanoes.winston.db.Admin 244 17 0 17
gov.usgs.volcanoes.winston.legacyServer.WWS 168 17 0 6
gov.usgs.volcanoes.winston.db.Data 290 16 0 12
gov.usgs.volcanoes.winston.db.Input 336 16 2 7
gov.usgs.volcanoes.winston.legacyServer.WWSClient 270 16 3 1
gov.usgs.volcanoes.winston.WWSClient 124 16 1 16
gov.usgs.volcanoes.winston.db.Channels 201 15 1 15
gov.usgs.volcanoes.winston.server.ConnectionStatistics 118 13 3 1
gov.usgs.volcanoes.winston.in.ew.ImportWSJob 168 12 0 1
gov.usgs.volcanoes.winston.legacyServer.cmd.http.AbstractHttpCommand 87 12 0 12
gov.usgs.volcanoes.winston.legacyServer.cmd.http.fdsn.command.FdsnQueryCommand 133 12 0 3
gov.usgs.volcanoes.winston.in.ew.TraceBufFilter 48 11 0 1
gov.usgs.volcanoes.winston.legacyServer.cmd.http.fdsn.station.FdsnStationQuery 201 11 0 1
gov.usgs.volcanoes.winston.server.http.cmd.fdsnws.constraint.ChannelConstraint 93 11 0 6
gov.usgs.volcanoes.winston.server.http.HttpBaseCommand 70 11 0 9
gov.usgs.volcanoes.winston.legacyServer.cmd.http.HttpRsamCommand 205 10 0 1
gov.usgs.volcanoes.winston.db.WaveServerEmulator 107 9 0 2
gov.usgs.volcanoes.winston.in.StaticImporter 101 9 0 1
gov.usgs.volcanoes.winston.server.wws.cmd.GetMetadataCommand 105 9 2 2
gov.usgs.volcanoes.winston.in.ew.SCNLFilter 52 8 0 1
gov.usgs.volcanoes.winston.in.WaveServerCollector 112 8 0 1
gov.usgs.volcanoes.winston.legacyServer.cmd.BaseCommand 108 8 0 2

Averages.

NCSS average Program NCSS Classes average Methods average Javadocs average
62.54 13,424.00 0.51 5.05 2.13

Methods

Methods

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

TOP 30 Methods containing the most NCSS.

Methods NCSS CCN Javadocs
gov.usgs.volcanoes.winston.PlotHelicorder.parseArgs() 130 41 0
gov.usgs.volcanoes.winston.in.ew.ImportEW.importChannel(TraceBuf) 111 36 0
gov.usgs.volcanoes.winston.legacyServer.cmd.http.HttpStatusCommand.sendResponse() 106 20 0
gov.usgs.volcanoes.winston.in.ew.ImportWSJob.getData(quit[]) 103 35 0
gov.usgs.volcanoes.winston.db.Admin.main(String[]) 85 28 1
gov.usgs.volcanoes.winston.db.Input.inputTraceBuf(TraceBuf,boolean) 73 17 1
gov.usgs.volcanoes.winston.db.InputEW.inputTraceBufs(TraceBuf,boolean,int,int) 73 27 1
gov.usgs.volcanoes.winston.server.wws.cmd.GetScnlCommand.doCommand(ChannelHandlerContext,WwsCommandString) 73 22 0
gov.usgs.volcanoes.winston.PlotHelicorder.PlotHelicorder(String[]) 71 8 0
gov.usgs.volcanoes.winston.db.Input.inputTraceBuf(TraceBuf) 70 15 1
gov.usgs.volcanoes.winston.legacyServer.cmd.http.HttpHeliCommand.sendResponse() 69 22 0
gov.usgs.volcanoes.winston.server.http.cmd.StatusCommand.doCommand(ChannelHandlerContext,FullHttpRequest) 65 12 0
gov.usgs.volcanoes.winston.legacyServer.cmd.http.HttpRsamCommand.getUsage(HttpRequest) 64 5 0
gov.usgs.volcanoes.winston.server.http.cmd.fdsnws.StationService.sendQueryResponse(WinstonDatabasePool,ChannelHandlerContext,FullHttpRequest) 61 12 0
gov.usgs.volcanoes.winston.db.Data.findGaps(String,double,double) 59 25 1
gov.usgs.volcanoes.winston.legacyServer.cmd.http.fdsn.station.FdsnStationQuery.sendXml() 59 14 0
gov.usgs.volcanoes.winston.legacyServer.cmd.http.HttpHeliCommand.getUsage(HttpRequest) 58 4 0
gov.usgs.volcanoes.winston.tools.pannel.PlotHelicorderPanel.createFields() 56 5 0
gov.usgs.volcanoes.winston.legacyServer.cmd.HttpCommand.sendUsage(String,SocketChannel) 55 8 0
gov.usgs.volcanoes.winston.server.wws.cmd.GetScnlRawCommand.doCommand(ChannelHandlerContext,WwsCommandString) 54 20 0
gov.usgs.volcanoes.winston.legacyServer.cmd.GetSCNLRawCommand.doCommand(Object,SocketChannel) 53 21 0
gov.usgs.volcanoes.winston.legacyServer.cmd.http.fdsn.dataselect.FdsnDataselectQuery.sendData(Channel,OutputStream) 52 13 0
gov.usgs.volcanoes.winston.legacyServer.WWS.processConfigFile() 51 11 1
gov.usgs.volcanoes.winston.legacyServer.cmd.http.HttpGapsCommand.writeHuman() 50 6 0
gov.usgs.volcanoes.winston.server.http.cmd.GapsCommand.doCommand(ChannelHandlerContext,FullHttpRequest) 50 12 0
gov.usgs.volcanoes.winston.db.Data.getTraceBufBytes(String,double,double,int) 49 24 1
gov.usgs.volcanoes.winston.legacyServer.cmd.http.HttpMenuCommand.sendResponse() 49 13 0
gov.usgs.volcanoes.winston.legacyServer.WWSClient.outputSac(String,int,Double,Double,String,String,double,double) 49 10 0
gov.usgs.volcanoes.winston.in.ew.ImportEW.consoleInputManager(ImportEW) 48 15 1
gov.usgs.volcanoes.winston.tools.pannel.PlotHelicorderPanel.go() 48 4 0

Averages.

Program NCSS NCSS average CCN average Javadocs average
13,424.00 9.68 3.01 0.21

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