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.

Package Classes Methods NCSS Javadocs Javadoc lines Single lines comment Multi lines comment
net.sourceforge.plantumldependency.commoncli.program.impl 1 47 356 48 343 2 25
net.sourceforge.plantumldependency.commoncli.option 4 50 217 54 433 0 96
net.sourceforge.plantumldependency.commoncli.utils.version 1 16 146 17 374 0 31
net.sourceforge.plantumldependency.commoncli.command.impl 1 12 129 13 79 0 25
net.sourceforge.plantumldependency.commoncli.option.impl.version 2 21 125 23 170 0 52
net.sourceforge.plantumldependency.commoncli.program.version.impl 1 19 121 20 146 0 25
net.sourceforge.plantumldependency.commoncli.option.impl.about 2 18 118 20 143 0 52
net.sourceforge.plantumldependency.commoncli.option.argument.impl.file 3 9 108 12 78 0 81
net.sourceforge.plantumldependency.commoncli.option.argument 2 16 98 18 135 0 48
net.sourceforge.plantumldependency.commoncli.option.impl.help 2 18 95 20 143 0 52
net.sourceforge.plantumldependency.commoncli.constants.log 3 3 78 6 39 0 135
net.sourceforge.plantumldependency.commoncli.option.argument.impl.integer 2 11 72 13 112 0 53
net.sourceforge.plantumldependency.commoncli.option.execution 3 12 65 15 99 0 71
net.sourceforge.plantumldependency.commoncli.option.impl.verbose 2 12 65 14 99 0 52
net.sourceforge.plantumldependency.commoncli.program.execution.impl 1 9 60 10 58 0 25
net.sourceforge.plantumldependency.commoncli.option.argument.impl.filepattern 3 9 53 12 93 0 74
net.sourceforge.plantumldependency.commoncli.program 1 23 37 24 253 0 23
net.sourceforge.plantumldependency.commoncli.constants 1 3 34 4 29 0 35
net.sourceforge.plantumldependency.commoncli.option.argument.impl.directory 1 3 32 4 26 0 27
net.sourceforge.plantumldependency.commoncli.option.impl.output 1 4 32 5 40 0 26
net.sourceforge.plantumldependency.commoncli.option.argument.impl.bool 1 3 29 4 26 0 26
net.sourceforge.plantumldependency.commoncli.utils.fileset 1 3 29 4 34 0 23
net.sourceforge.plantumldependency.commoncli.option.argument.impl.log 1 3 26 4 26 0 26
net.sourceforge.plantumldependency.commoncli.option.argument.impl.locale 1 3 23 4 26 0 26
net.sourceforge.plantumldependency.commoncli.command 1 5 13 6 72 0 23
net.sourceforge.plantumldependency.commoncli.option.status 1 5 13 0 0 0 77
net.sourceforge.plantumldependency.commoncli.exception 2 3 12 5 47 0 48
net.sourceforge.plantumldependency.commoncli.program.version 1 6 11 7 43 0 23
net.sourceforge.plantumldependency.commoncli.program.execution 1 2 9 3 21 0 23
Classes total Methods total NCSS total Javadocs Javadoc lines Single lines comment Multi lines comment
47 348 2206 389 3187 2 1303

Objects

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

TOP 30 classes containing the most NCSS.

Object NCSS Methods Classes Javadocs
net.sourceforge.plantumldependency.commoncli.program.impl.JavaProgramImpl 289 47 0 48
net.sourceforge.plantumldependency.commoncli.utils.version.ProgramVersionUtils 112 16 0 17
net.sourceforge.plantumldependency.commoncli.program.version.impl.ProgramVersionImpl 104 19 0 20
net.sourceforge.plantumldependency.commoncli.command.impl.CommandLineImpl 98 12 0 13
net.sourceforge.plantumldependency.commoncli.option.AbstractOption 90 21 0 22
net.sourceforge.plantumldependency.commoncli.option.argument.AbstractOptionArgument 75 12 0 13
net.sourceforge.plantumldependency.commoncli.option.AbstractOptionWithArgument 68 14 0 15
net.sourceforge.plantumldependency.commoncli.constants.log.ErrorConstants 52 1 0 2
net.sourceforge.plantumldependency.commoncli.program.execution.impl.JavaProgramExecutionImpl 47 9 0 10
net.sourceforge.plantumldependency.commoncli.option.impl.version.VersionOptionExecution 46 9 0 10
net.sourceforge.plantumldependency.commoncli.option.execution.AbstractOptionExecution 44 8 0 9
net.sourceforge.plantumldependency.commoncli.option.impl.about.AboutOption 42 12 0 13
net.sourceforge.plantumldependency.commoncli.option.impl.about.AboutOptionExecution 42 6 0 7
net.sourceforge.plantumldependency.commoncli.option.impl.help.HelpOption 42 12 0 13
net.sourceforge.plantumldependency.commoncli.option.impl.version.VersionOption 42 12 0 13
net.sourceforge.plantumldependency.commoncli.option.argument.impl.integer.IntegerIntervalOptionArgumentImpl 37 8 0 9
net.sourceforge.plantumldependency.commoncli.constants.CommandLineConstants 27 3 0 4
net.sourceforge.plantumldependency.commoncli.program.JavaProgram 24 23 0 24
net.sourceforge.plantumldependency.commoncli.option.argument.impl.file.ExistingFileOptionArgumentImpl 23 3 0 4
net.sourceforge.plantumldependency.commoncli.option.argument.impl.file.ExistingOrNotFileOptionArgumentImpl 23 3 0 4
net.sourceforge.plantumldependency.commoncli.option.argument.impl.file.NotExistingFileOptionArgumentImpl 23 3 0 4
net.sourceforge.plantumldependency.commoncli.option.impl.help.HelpOptionExecution 23 6 0 7
net.sourceforge.plantumldependency.commoncli.utils.fileset.FileSetUtils 23 3 0 4
net.sourceforge.plantumldependency.commoncli.option.argument.impl.directory.ExistingDirectoryOptionArgumentImpl 20 3 0 4
net.sourceforge.plantumldependency.commoncli.option.impl.verbose.VerboseOption 19 7 0 8
net.sourceforge.plantumldependency.commoncli.constants.log.FineConstants 18 1 0 2
net.sourceforge.plantumldependency.commoncli.option.argument.impl.bool.BooleanOptionArgumentImpl 17 3 0 4
net.sourceforge.plantumldependency.commoncli.option.argument.impl.integer.IntegerOptionArgumentImpl 17 3 0 4
net.sourceforge.plantumldependency.commoncli.option.argument.impl.log.LevelOptionArgumentImpl 17 3 0 4
net.sourceforge.plantumldependency.commoncli.option.impl.verbose.VerboseLevelOption 16 5 0 6

TOP 30 classes containing the most methods.

Object NCSS Methods Classes Javadocs
net.sourceforge.plantumldependency.commoncli.program.impl.JavaProgramImpl 289 47 0 48
net.sourceforge.plantumldependency.commoncli.program.JavaProgram 24 23 0 24
net.sourceforge.plantumldependency.commoncli.option.AbstractOption 90 21 0 22
net.sourceforge.plantumldependency.commoncli.program.version.impl.ProgramVersionImpl 104 19 0 20
net.sourceforge.plantumldependency.commoncli.utils.version.ProgramVersionUtils 112 16 0 17
net.sourceforge.plantumldependency.commoncli.option.AbstractOptionWithArgument 68 14 0 15
net.sourceforge.plantumldependency.commoncli.command.impl.CommandLineImpl 98 12 0 13
net.sourceforge.plantumldependency.commoncli.option.argument.AbstractOptionArgument 75 12 0 13
net.sourceforge.plantumldependency.commoncli.option.impl.about.AboutOption 42 12 0 13
net.sourceforge.plantumldependency.commoncli.option.impl.help.HelpOption 42 12 0 13
net.sourceforge.plantumldependency.commoncli.option.impl.version.VersionOption 42 12 0 13
net.sourceforge.plantumldependency.commoncli.option.impl.version.VersionOptionExecution 46 9 0 10
net.sourceforge.plantumldependency.commoncli.program.execution.impl.JavaProgramExecutionImpl 47 9 0 10
net.sourceforge.plantumldependency.commoncli.option.argument.impl.integer.IntegerIntervalOptionArgumentImpl 37 8 0 9
net.sourceforge.plantumldependency.commoncli.option.execution.AbstractOptionExecution 44 8 0 9
net.sourceforge.plantumldependency.commoncli.option.OptionWithArgument 9 8 0 9
net.sourceforge.plantumldependency.commoncli.option.impl.verbose.VerboseOption 19 7 0 8
net.sourceforge.plantumldependency.commoncli.option.Option 8 7 0 8
net.sourceforge.plantumldependency.commoncli.option.impl.about.AboutOptionExecution 42 6 0 7
net.sourceforge.plantumldependency.commoncli.option.impl.help.HelpOptionExecution 23 6 0 7
net.sourceforge.plantumldependency.commoncli.program.version.ProgramVersion 7 6 0 7
net.sourceforge.plantumldependency.commoncli.command.CommandLine 6 5 0 6
net.sourceforge.plantumldependency.commoncli.option.impl.verbose.VerboseLevelOption 16 5 0 6
net.sourceforge.plantumldependency.commoncli.option.status.OptionStatus 12 5 0 0
net.sourceforge.plantumldependency.commoncli.option.argument.OptionArgument 5 4 0 5
net.sourceforge.plantumldependency.commoncli.option.impl.output.OutputOption 14 4 0 5
net.sourceforge.plantumldependency.commoncli.constants.CommandLineConstants 27 3 0 4
net.sourceforge.plantumldependency.commoncli.option.argument.impl.bool.BooleanOptionArgumentImpl 17 3 0 4
net.sourceforge.plantumldependency.commoncli.option.argument.impl.directory.ExistingDirectoryOptionArgumentImpl 20 3 0 4
net.sourceforge.plantumldependency.commoncli.option.argument.impl.file.ExistingFileOptionArgumentImpl 23 3 0 4

Averages.

NCSS average Program NCSS Classes average Methods average Javadocs average
35.23 2,206.00 0.00 7.40 8.28

Methods

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

TOP 30 Methods containing the most NCSS.

Methods NCSS CCN Javadocs
net.sourceforge.plantumldependency.commoncli.option.impl.about.AboutOptionExecution.execute() 24 3 1
net.sourceforge.plantumldependency.commoncli.program.version.impl.ProgramVersionImpl.equals(Object) 23 20 1
net.sourceforge.plantumldependency.commoncli.command.impl.CommandLineImpl.findOptionArgument(OptionWithArgument) 22 8 1
net.sourceforge.plantumldependency.commoncli.command.impl.CommandLineImpl.findAndCheckOptionIndex(Option) 21 8 1
net.sourceforge.plantumldependency.commoncli.option.argument.AbstractOptionArgument.equals(Object) 20 16 1
net.sourceforge.plantumldependency.commoncli.option.impl.version.VersionOptionExecution.execute() 20 3 1
net.sourceforge.plantumldependency.commoncli.program.impl.JavaProgramImpl.getFullUsage() 19 3 1
net.sourceforge.plantumldependency.commoncli.program.impl.JavaProgramImpl.getMainUsage() 18 2 1
net.sourceforge.plantumldependency.commoncli.utils.version.ProgramVersionUtils.createProgramVersionFromProperties(Properties,String) 17 5 1
net.sourceforge.plantumldependency.commoncli.program.impl.JavaProgramImpl.parseCommandLine(CommandLine) 16 5 1
net.sourceforge.plantumldependency.commoncli.program.version.impl.ProgramVersionImpl.compareTo(ProgramVersion) 16 19 1
net.sourceforge.plantumldependency.commoncli.command.impl.CommandLineImpl.equals(Object) 15 12 1
net.sourceforge.plantumldependency.commoncli.option.AbstractOption.equals(Object) 15 12 1
net.sourceforge.plantumldependency.commoncli.program.execution.impl.JavaProgramExecutionImpl.equals(Object) 15 12 1
net.sourceforge.plantumldependency.commoncli.program.impl.JavaProgramImpl.generateMainUsageDescription(String,Option,Option) 15 3 1
net.sourceforge.plantumldependency.commoncli.program.impl.JavaProgramImpl.deepClone() 15 3 1
net.sourceforge.plantumldependency.commoncli.program.impl.JavaProgramImpl.equals(Object) 15 12 1
net.sourceforge.plantumldependency.commoncli.program.impl.JavaProgramImpl.getFullUsageExamples() 15 3 1
net.sourceforge.plantumldependency.commoncli.option.argument.impl.file.ExistingFileOptionArgumentImpl.parseArgument(String) 14 7 1
net.sourceforge.plantumldependency.commoncli.option.argument.impl.file.ExistingOrNotFileOptionArgumentImpl.parseArgument(String) 14 6 1
net.sourceforge.plantumldependency.commoncli.option.argument.impl.file.NotExistingFileOptionArgumentImpl.parseArgument(String) 14 7 1
net.sourceforge.plantumldependency.commoncli.option.argument.impl.integer.IntegerIntervalOptionArgumentImpl.parseArgument(String) 14 9 1
net.sourceforge.plantumldependency.commoncli.program.impl.JavaProgramImpl.addOption(Option) 14 6 1
net.sourceforge.plantumldependency.commoncli.utils.version.ProgramVersionUtils.createProgramVersionFromPropertiesFileWithinClassloader(String,String,ClassLoader) 14 3 1
net.sourceforge.plantumldependency.commoncli.option.AbstractOption.getFullUsage() 13 2 1
net.sourceforge.plantumldependency.commoncli.option.argument.AbstractOptionArgument.compareTo(A) 13 4 1
net.sourceforge.plantumldependency.commoncli.utils.version.ProgramVersionUtils.createProgramVersionFromStringDateAndSnapshot(Date,String,String,boolean) 13 5 1
net.sourceforge.plantumldependency.commoncli.option.AbstractOptionWithArgument.findAndParseArgumentOrGetDefaultArgument(CommandLine) 12 3 1
net.sourceforge.plantumldependency.commoncli.program.impl.JavaProgramImpl.getKnownBugsOrLimitations() 12 3 1
net.sourceforge.plantumldependency.commoncli.command.impl.CommandLineImpl.getCommandLineArgumentsAsString() 11 3 1

Averages.

Program NCSS NCSS average CCN average Javadocs average
2,206.00 4.04 1.74 0.99

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