JavaNCSS Metric Results

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

The following document contains the results of a JavaNCSS metric analysis, using JavaNCSS version 32.53.
JavaNCSS web site.

Packages

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

Packages sorted by NCSS.

PackageClassesMethodsNCSSJavadocsJavadoc linesSingle lines commentMulti lines comment
org.slasoi.gslam.templateregistry.plog512712859592501261208
org.slasoi.gslam.templateregistry171341577216103564
org.slasoi.gslam.templateregistry.plog.gui72316900490
Classes totalMethods totalNCSS totalJavadocsJavadoc linesSingle lines commentMulti lines comment
754284605612662331862

Objects

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

TOP 30 classes containing the most NCSS.

ObjectNCSSMethodsClassesJavadocs
org.slasoi.gslam.templateregistry.plog.Engine54319191
org.slasoi.gslam.templateregistry.plog._m_parser5073920
org.slasoi.gslam.templateregistry.___jdbc_storage4472000
org.slasoi.gslam.templateregistry.plog._bi_evaluator3101030
org.slasoi.gslam.templateregistry.plog.Session2141103
org.slasoi.gslam.templateregistry.SLATemplateRegistryImpl2032812
org.slasoi.gslam.templateregistry.plog.Clause19523219
org.slasoi.gslam.templateregistry.____plog183900
org.slasoi.gslam.templateregistry.plog.PI166811
org.slasoi.gslam.templateregistry.plog._m_wrapper1601620
org.slasoi.gslam.templateregistry.____plog_metadata_query153700
org.slasoi.gslam.templateregistry.____plog_common1411400
org.slasoi.gslam.templateregistry.plog.Term13019013
org.slasoi.gslam.templateregistry.plog.gui.ConsolePanel119140
org.slasoi.gslam.templateregistry.plog.Var1011218
org.slasoi.gslam.templateregistry.plog._bi_all_solutions101320
org.slasoi.gslam.templateregistry.plog.Console90701
org.slasoi.gslam.templateregistry.___in_memory_storage741600
org.slasoi.gslam.templateregistry.plog.Module69811
org.slasoi.gslam.templateregistry.plog._bi_lists67220
org.slasoi.gslam.templateregistry.plog._goal671500
org.slasoi.gslam.templateregistry.plog.Module.Impl60920
org.slasoi.gslam.templateregistry.____plog_mod601030
org.slasoi.gslam.templateregistry.plog.Error5614012
org.slasoi.gslam.templateregistry.plog._bi_lists.Clause.Iterator52100
org.slasoi.gslam.templateregistry.plog.gui.ConsolePanel.____INPUT48800
org.slasoi.gslam.templateregistry.____plog_slat_parser39100
org.slasoi.gslam.templateregistry.plog.Engine.Clause.Iterator38100
org.slasoi.gslam.templateregistry.plog.Var.Accessor36704
org.slasoi.gslam.templateregistry.plog.Engine.Clause.Iterator34100

TOP 30 classes containing the most methods.

ObjectNCSSMethodsClassesJavadocs
org.slasoi.gslam.templateregistry.plog._m_parser5073920
org.slasoi.gslam.templateregistry.SLATemplateRegistryImpl2032812
org.slasoi.gslam.templateregistry.plog.Clause19523219
org.slasoi.gslam.templateregistry.___jdbc_storage4472000
org.slasoi.gslam.templateregistry.plog.Engine54319191
org.slasoi.gslam.templateregistry.plog.Term13019013
org.slasoi.gslam.templateregistry.plog._m_wrapper1601620
org.slasoi.gslam.templateregistry.___in_memory_storage741600
org.slasoi.gslam.templateregistry.plog._goal671500
org.slasoi.gslam.templateregistry.___storage161500
org.slasoi.gslam.templateregistry.plog.Error5614012
org.slasoi.gslam.templateregistry.____plog_common1411400
org.slasoi.gslam.templateregistry.plog.Var1011218
org.slasoi.gslam.templateregistry.plog.Session2141103
org.slasoi.gslam.templateregistry.plog._bi_evaluator3101030
org.slasoi.gslam.templateregistry.____plog_mod601030
org.slasoi.gslam.templateregistry.plog.Module.Impl60920
org.slasoi.gslam.templateregistry.plog._m_parser.__tokenlist32900
org.slasoi.gslam.templateregistry.____plog183900
org.slasoi.gslam.templateregistry.plog.gui.ConsolePanel.____INPUT48800
org.slasoi.gslam.templateregistry.plog.Module69811
org.slasoi.gslam.templateregistry.plog.PI166811
org.slasoi.gslam.templateregistry.plog.Console90701
org.slasoi.gslam.templateregistry.plog.Var.Accessor36704
org.slasoi.gslam.templateregistry.____plog_metadata_query153700
org.slasoi.gslam.templateregistry.plog.gui.ConsolePanel.____CONSOLE_DOC19400
org.slasoi.gslam.templateregistry.plog.gui.ConsolePanel.____OUTPUT16400
org.slasoi.gslam.templateregistry.plog.Clause.Iterator7301
org.slasoi.gslam.templateregistry.plog.Clause.OneShot14300
org.slasoi.gslam.templateregistry.plog.gui.ConsoleApp26310

Averages.

NCSS averageProgram NCSSClasses averageMethods averageJavadocs average
67.454,605.000.635.710.88

Methods

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

TOP 30 Methods containing the most NCSS.

MethodsNCSSCCNJavadocs
org.slasoi.gslam.templateregistry.plog.Engine.____SYS_CANDIDATES(_m_wrapper,Clause)4161440
org.slasoi.gslam.templateregistry.____plog.p_TEMPLATE_QUERY(SLATemplate,UUID[],ResultSet,Report)91340
org.slasoi.gslam.templateregistry.plog._bi_evaluator.evaluate(Term)90610
org.slasoi.gslam.templateregistry.plog._m_parser.nextToken(String)84440
org.slasoi.gslam.templateregistry.plog.Session.solveNext()71331
org.slasoi.gslam.templateregistry.___jdbc_storage.x_CREATE_TABLES(boolean,boolean)6750
org.slasoi.gslam.templateregistry.plog._bi_evaluator.processFloat(float,Func)60290
org.slasoi.gslam.templateregistry.plog._bi_lists.concat(Clause)5410
org.slasoi.gslam.templateregistry.plog.Console.run()50190
org.slasoi.gslam.templateregistry.___jdbc_storage.p_ADD_PREDICATE(Clause,String,String,boolean)4650
org.slasoi.gslam.templateregistry.plog._bi_lists.Clause.Iterator.next()45200
org.slasoi.gslam.templateregistry.plog._m_parser.parse(__tokenlist)43250
org.slasoi.gslam.templateregistry.___jdbc_storage.x_DATASOURCE(SLAManagerContext)43100
org.slasoi.gslam.templateregistry.plog._bi_evaluator.processInt(int,int,Func)41210
org.slasoi.gslam.templateregistry.____plog_metadata_query.p_SIMPLE_DOMAIN_TO_PLOG_STRING(String,SimpleDomainExpr,String,String[])3890
org.slasoi.gslam.templateregistry.____plog_metadata_query.p_COMPOUND_CONSTRAINT_TO_PLOG_STRING(CompoundConstraintExpr,String,String[])37160
org.slasoi.gslam.templateregistry.____plog_metadata_query.p_COMPOUND_DOMAIN_TO_PLOG_STRING(String,CompoundDomainExpr,String,String[])37160
org.slasoi.gslam.templateregistry.____plog_slat_parser.p_PARSE(Engine,SLATemplate,Metadata,Report)37140
org.slasoi.gslam.templateregistry.plog.Engine.Clause.Iterator.next()36150
org.slasoi.gslam.templateregistry.____plog_common.p_EXTRACT_MONTHLY_TARIFF_USAGE_PRICE(SLATemplate,Var)36180
org.slasoi.gslam.templateregistry.plog.Session.unify(Term,Term,Term)35220
org.slasoi.gslam.templateregistry.plog.Clause.compareTo(Term)34300
org.slasoi.gslam.templateregistry.plog._bi_all_solutions.solve(Engine,_m_wrapper,Clause)3410
org.slasoi.gslam.templateregistry.plog._m_parser.write(Term,boolean,boolean)34200
org.slasoi.gslam.templateregistry.plog.Engine.Clause.Iterator.next()32150
org.slasoi.gslam.templateregistry.___jdbc_storage.p_REMOVE_PREDICATE(Clause,String,String)3270
org.slasoi.gslam.templateregistry.___jdbc_storage.p_ADD_SPEC(Specification)3120
org.slasoi.gslam.templateregistry.plog.Engine.Clause.OneShot.once()30130
org.slasoi.gslam.templateregistry.plog._bi_all_solutions.findall(_m_wrapper,Engine,Term,Clause,Clause)30110
org.slasoi.gslam.templateregistry.plog._m_parser.parse_infix(Term,_op,Term,__tokenlist,int)30120

Averages.

Program NCSSNCSS averageCCN averageJavadocs average
4,605.0010.314.790.12

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