JavaNCSS Metric Results

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

The following document contains the results of a JavaNCSS metric analysis.
JavaNCSS web site.

Packages

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

Packages sorted by NCSS.

PackageClassesMethodsNCSSJavadocsJavadoc linesSingle lines commentMulti lines comment
org.fosstrak.reader.rprm.core.msg.command75696690483962464145324
org.fosstrak.reader.rprm.core.msg33289405224814704581372
org.fosstrak.reader.rprm.core.msg.reply72655318466855224203429
org.fosstrak.reader.rprm.core.mgmt.agent.snmp.mib4643107843401920117
org.fosstrak.reader.rprm.core15383286617118013201882
org.fosstrak.reader.rprm.core.mgmt.agent.snmp.table24121208812681094642
org.fosstrak.reader.rprm.core.msg.notification53223111424220093242592
org.fosstrak.reader.rprm.core.msg.transport15907607441950431
org.fosstrak.reader.rprm.core.mgmt.agent.snmp42667424195205162
org.fosstrak.reader.rprm.core.mgmt.alarm228552310010257503
org.fosstrak.reader.rprm.core.mgmt.util323324221604789
org.fosstrak.reader.rprm.core.mgmt.simulator11330917104025
org.fosstrak.reader.rprm.core.readreport883282322262445
org.fosstrak.reader.rprm.core.msg.util7281932420920137
org.fosstrak.reader.rprm.core.triggers8211751612910216
org.fosstrak.reader.rprm.core.util161187681512
org.fosstrak.reader.rprm.core.mgmt31672171361100
org.fosstrak.reader.rprm.core.mgmt.agent136421019
Classes totalMethods totalNCSS totalJavadocsJavadoc linesSingle lines commentMulti lines comment
349282526751271520890430717497

Objects

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

TOP 30 classes containing the most NCSS.

ObjectNCSSMethodsClassesJavadocs
org.fosstrak.reader.rprm.core.msg.command.TextCommandParser20902000
org.fosstrak.reader.rprm.core.mgmt.agent.snmp.mib.EpcglobalReaderMib18833913765
org.fosstrak.reader.rprm.core.msg.CommandDispatcher162731013
org.fosstrak.reader.rprm.core.Source102086130
org.fosstrak.reader.rprm.core.msg.command.TextCommandParserHelper90432033
org.fosstrak.reader.rprm.core.msg.command.TextLexer7111800
org.fosstrak.reader.rprm.core.msg.reply.TextLexer6682500
org.fosstrak.reader.rprm.core.mgmt.agent.snmp.mib.IfMib653163311
org.fosstrak.reader.rprm.core.ReaderDevice612112026
org.fosstrak.reader.rprm.core.msg.TextMessageSerializer57043020
org.fosstrak.reader.rprm.core.mgmt.agent.snmp.mib.IpMib4308166
org.fosstrak.reader.rprm.core.msg.command.SourceCommand3858224144
org.fosstrak.reader.rprm.core.NotificationChannel36637014
org.fosstrak.reader.rprm.core.msg.command.ReaderDeviceCommand3509419132
org.fosstrak.reader.rprm.core.msg.command.ObjectFactory2911450144
org.fosstrak.reader.rprm.core.msg.command.TextCommandParserTokenTypes282000
org.fosstrak.reader.rprm.core.mgmt.simulator.MgmtSimulator280131217
org.fosstrak.reader.rprm.core.mgmt.agent.snmp.EpcgScalar256705
org.fosstrak.reader.rprm.core.mgmt.agent.snmp.table.SnmpTable2561129
org.fosstrak.reader.rprm.core.mgmt.agent.snmp.SnmpAgent25317016
org.fosstrak.reader.rprm.core.msg.reply.ReaderDeviceReply23694094
org.fosstrak.reader.rprm.core.msg.ReadReportNotificationListener23213010
org.fosstrak.reader.rprm.core.msg.reply.TextReplyParser2282100
org.fosstrak.reader.rprm.core.msg.reply.SourceReply22482388
org.fosstrak.reader.rprm.core.mgmt.agent.snmp.table.EpcgAntReadPointTableRow221706
org.fosstrak.reader.rprm.core.mgmt.agent.snmp.table.EpcgSourceTableRow178706
org.fosstrak.reader.rprm.core.msg.reply.ObjectFactory16783082
org.fosstrak.reader.rprm.core.AntennaReadPoint16550051
org.fosstrak.reader.rprm.core.msg.command.NotificationChannelCommand161381060
org.fosstrak.reader.rprm.core.mgmt.agent.snmp.table.EpcgGlobalCountersTableRow153618

TOP 30 classes containing the most methods.

ObjectNCSSMethodsClassesJavadocs
org.fosstrak.reader.rprm.core.msg.command.ObjectFactory2911450144
org.fosstrak.reader.rprm.core.ReaderDevice612112026
org.fosstrak.reader.rprm.core.msg.command.ReaderDeviceCommand3509419132
org.fosstrak.reader.rprm.core.msg.reply.ReaderDeviceReply23694094
org.fosstrak.reader.rprm.core.Source102086130
org.fosstrak.reader.rprm.core.msg.reply.ObjectFactory16783082
org.fosstrak.reader.rprm.core.msg.command.SourceCommand3858224144
org.fosstrak.reader.rprm.core.msg.reply.SourceReply22482388
org.fosstrak.reader.rprm.core.msg.notification.ObjectFactory13969068
org.fosstrak.reader.rprm.core.AntennaReadPoint16550051
org.fosstrak.reader.rprm.core.msg.TextMessageSerializer57043020
org.fosstrak.reader.rprm.core.mgmt.agent.snmp.mib.EpcglobalReaderMib18833913765
org.fosstrak.reader.rprm.core.msg.command.NotificationChannelCommand161381060
org.fosstrak.reader.rprm.core.msg.reply.NotificationChannelReply10238140
org.fosstrak.reader.rprm.core.NotificationChannel36637014
org.fosstrak.reader.rprm.core.msg.command.TextCommandParserHelper90432033
org.fosstrak.reader.rprm.core.msg.CommandDispatcher162731013
org.fosstrak.reader.rprm.core.msg.command.DataSelectorCommand11830744
org.fosstrak.reader.rprm.core.msg.reply.DataSelectorReply7630030
org.fosstrak.reader.rprm.core.msg.reply.Reply7630030
org.fosstrak.reader.rprm.core.msg.reply.ReplyType3130031
org.fosstrak.reader.rprm.core.msg.command.Command7128028
org.fosstrak.reader.rprm.core.msg.reply.TextLexer6682500
org.fosstrak.reader.rprm.core.msg.reply.TextReplyParser2282100
org.fosstrak.reader.rprm.core.readreport.TagType702104
org.fosstrak.reader.rprm.core.msg.command.TagFieldCommand8120530
org.fosstrak.reader.rprm.core.msg.command.TextCommandParser20902000
org.fosstrak.reader.rprm.core.msg.reply.TagFieldReply5120020
org.fosstrak.reader.rprm.core.DataSelector951906
org.fosstrak.reader.rprm.core.msg.command.TextLexer7111800

Averages.

NCSS averageProgram NCSSClasses averageMethods averageJavadocs average
67.7226,751.000.968.097.78

Methods

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

TOP 30 Methods containing the most NCSS.

MethodsNCSSCCNJavadocs
org.fosstrak.reader.rprm.core.msg.command.TextCommandParser.command_name()9482380
org.fosstrak.reader.rprm.core.msg.command.TextCommandParser.keyword2ident()7922630
org.fosstrak.reader.rprm.core.msg.CommandDispatcher.executeCommand(ReaderDeviceCommand,String,IncomingMessage)384591
org.fosstrak.reader.rprm.core.msg.CommandDispatcher.executeCommand(SourceCommand,String,IncomingMessage)383701
org.fosstrak.reader.rprm.core.msg.command.TextLexer.TextLexer(LexerSharedInputState)26810
org.fosstrak.reader.rprm.core.msg.command.TextCommandParserHelper.getSourceCommand()249541
org.fosstrak.reader.rprm.core.msg.command.TextCommandParserHelper.getReaderDeviceCommand()207471
org.fosstrak.reader.rprm.core.msg.CommandDispatcher.executeCommand(NotificationChannelCommand,String,IncomingMessage)199400
org.fosstrak.reader.rprm.core.mgmt.agent.snmp.table.SnmpTable.update()173591
org.fosstrak.reader.rprm.core.msg.CommandDispatcher.executeCommand(DataSelectorCommand,String,IncomingMessage)150241
org.fosstrak.reader.rprm.core.mgmt.agent.snmp.table.EpcgAntReadPointTableRow.getValue(int)149770
org.fosstrak.reader.rprm.core.mgmt.simulator.MgmtSimulator.initGUI()14921
org.fosstrak.reader.rprm.core.msg.command.TextLexer.mIDENT(boolean)1431200
org.fosstrak.reader.rprm.core.msg.reply.TextLexer.mIDENT(boolean)1431200
org.fosstrak.reader.rprm.core.mgmt.agent.snmp.SnmpAgent.createEpcGlobalScalars()139330
org.fosstrak.reader.rprm.core.msg.command.TextLexer.nextToken()136850
org.fosstrak.reader.rprm.core.mgmt.agent.snmp.table.EpcgGlobalCountersTableRow.getValue(int)121510
org.fosstrak.reader.rprm.core.mgmt.agent.snmp.EpcgScalar.getValue()114380
org.fosstrak.reader.rprm.core.msg.reply.TextLexer.mSTRING(boolean)114960
org.fosstrak.reader.rprm.core.msg.reply.TextLexer.mSTRINGCHAR1(boolean)113930
org.fosstrak.reader.rprm.core.msg.command.TextCommandParser.object_type_name()108280
org.fosstrak.reader.rprm.core.ReaderDevice.resetToDefaultSettings(String,String)104190
org.fosstrak.reader.rprm.core.mgmt.agent.snmp.table.EpcgSourceTableRow.getValue(int)103510
org.fosstrak.reader.rprm.core.msg.command.TextCommandParserHelper.getNotificationChannelCommand()98211
org.fosstrak.reader.rprm.core.mgmt.agent.snmp.mib.EpcglobalReaderMib.createEpcgAntReadPointEntry()9510
org.fosstrak.reader.rprm.core.msg.reply.TextLexer.nextToken()89470
org.fosstrak.reader.rprm.core.msg.TextMessageSerializer.serializeReaderDevice(ReaderDeviceReply)87261
org.fosstrak.reader.rprm.core.msg.command.TextCommandParserHelper.getDataSelectorCommand()86161
org.fosstrak.reader.rprm.core.NotificationChannel.addSourceReport(SourceReport)84451
org.fosstrak.reader.rprm.core.mgmt.agent.snmp.table.SnmpTableRow.getSnmpTableRow(RowObjectContainer)76311

Averages.

Program NCSSNCSS averageCCN averageJavadocs average
26,751.005.962.300.73

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 declarationpackage java.lang;
Import declarationimport java.awt.*;
Class declaration
  • public class Foo {
  • public class Foo extends Bla {
Interface declarationpublic interface Able ; {
Field declaration
  • int a;
  • int a, b, c = 5, d = 6;
Method declaration
  • public void cry();
  • public void gib() throws DeadException {
Constructor declarationpublic Foo() {
Constructor invocation
  • this();
  • super();
Statement declaration
  • i = 0;
  • if (ok)
  • if (exit) {
  • if (3 == 4);
  • if (4 == 4) { ;
  • } else {
Label declarationfine :
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).