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
de.smartics.maven.plugin.jboss.modules.descriptor 17 118 525 113 757 195 275
de.smartics.maven.plugin.jboss.modules 4 26 383 4 28 49 343
de.smartics.maven.plugin.jboss.modules.domain 9 57 343 41 255 113 213
de.smartics.maven.plugin.jboss.modules.aether 11 66 319 55 339 129 233
de.smartics.maven.plugin.jboss.modules.parser 11 33 302 17 98 76 147
de.smartics.maven.plugin.jboss.modules.xml 3 26 211 9 45 24 80
de.smartics.maven.plugin.jboss.modules.aether.filter 6 13 123 11 43 66 132
de.smartics.maven.plugin.jboss.modules.domain.matching 3 17 92 15 84 33 84
de.smartics.maven.plugin.jboss.modules.index 1 3 32 4 19 11 39
Classes total Methods total NCSS total Javadocs Javadoc lines Single lines comment Multi lines comment
65 359 2330 269 1668 696 1546

Objects

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

TOP 30 classes containing the most NCSS.

Object NCSS Methods Classes Javadocs
de.smartics.maven.plugin.jboss.modules.JBossModulesArchiveMojo 175 15 0 1
de.smartics.maven.plugin.jboss.modules.xml.ModuleXmlBuilder 168 19 1 6
de.smartics.maven.plugin.jboss.modules.parser.ModulesDescriptorBuilder 146 12 4 3
de.smartics.maven.plugin.jboss.modules.descriptor.ModuleDescriptor 111 16 1 27
de.smartics.maven.plugin.jboss.modules.domain.ModuleMap 104 13 1 9
de.smartics.maven.plugin.jboss.modules.descriptor.DependenciesDescriptor 86 10 1 20
de.smartics.maven.plugin.jboss.modules.aether.MavenRepository 70 10 0 4
de.smartics.maven.plugin.jboss.modules.domain.ExecutionContext 67 9 1 17
de.smartics.maven.plugin.jboss.modules.JandexMojo 66 6 0 1
de.smartics.maven.plugin.jboss.modules.descriptor.ApplyToModule 61 10 1 13
de.smartics.maven.plugin.jboss.modules.descriptor.DependenciesDescriptor.Builder 52 10 0 9
de.smartics.maven.plugin.jboss.modules.descriptor.ModuleDescriptor.Builder 48 13 0 13
de.smartics.maven.plugin.jboss.modules.domain.ModuleBuilder 48 6 0 3
de.smartics.maven.plugin.jboss.modules.IndexMojo 47 5 0 1
de.smartics.maven.plugin.jboss.modules.aether.MojoRepositoryBuilder 46 16 0 10
de.smartics.maven.plugin.jboss.modules.parser.ModulesXmlLocator 46 4 0 3
de.smartics.maven.plugin.jboss.modules.descriptor.ArtifactClusion 45 10 0 8
de.smartics.maven.plugin.jboss.modules.domain.matching.DoubleMatchContext 38 6 0 5
de.smartics.maven.plugin.jboss.modules.descriptor.ArtifactMatcher 36 6 1 9
de.smartics.maven.plugin.jboss.modules.descriptor.ModuleMatcher 34 6 1 9
de.smartics.maven.plugin.jboss.modules.domain.ExecutionContext.Builder 31 7 0 7
de.smartics.maven.plugin.jboss.modules.domain.SlotStrategy 31 6 0 0
de.smartics.maven.plugin.jboss.modules.aether.Mapper 28 5 0 4
de.smartics.maven.plugin.jboss.modules.descriptor.Directives 28 5 1 8
de.smartics.maven.plugin.jboss.modules.domain.matching.SingleMatchContext 28 6 0 5
de.smartics.maven.plugin.jboss.modules.aether.RepositoryLogListener 24 11 0 12
de.smartics.maven.plugin.jboss.modules.descriptor.ApplyToDependencies 23 5 1 8
de.smartics.maven.plugin.jboss.modules.descriptor.ModuleClusion 23 5 0 4
de.smartics.maven.plugin.jboss.modules.domain.ModuleMap.DependencyKey 20 5 0 0
de.smartics.maven.plugin.jboss.modules.domain.PrunerGenerator 20 4 0 3

TOP 30 classes containing the most methods.

Object NCSS Methods Classes Javadocs
de.smartics.maven.plugin.jboss.modules.xml.ModuleXmlBuilder 168 19 1 6
de.smartics.maven.plugin.jboss.modules.aether.MojoRepositoryBuilder 46 16 0 10
de.smartics.maven.plugin.jboss.modules.descriptor.ModuleDescriptor 111 16 1 27
de.smartics.maven.plugin.jboss.modules.JBossModulesArchiveMojo 175 15 0 1
de.smartics.maven.plugin.jboss.modules.descriptor.ModuleDescriptor.Builder 48 13 0 13
de.smartics.maven.plugin.jboss.modules.domain.ModuleMap 104 13 1 9
de.smartics.maven.plugin.jboss.modules.parser.ModulesDescriptorBuilder 146 12 4 3
de.smartics.maven.plugin.jboss.modules.aether.RepositoryLogListener 24 11 0 12
de.smartics.maven.plugin.jboss.modules.aether.MavenRepository 70 10 0 4
de.smartics.maven.plugin.jboss.modules.descriptor.ApplyToModule 61 10 1 13
de.smartics.maven.plugin.jboss.modules.descriptor.ArtifactClusion 45 10 0 8
de.smartics.maven.plugin.jboss.modules.descriptor.DependenciesDescriptor 86 10 1 20
de.smartics.maven.plugin.jboss.modules.descriptor.DependenciesDescriptor.Builder 52 10 0 9
de.smartics.maven.plugin.jboss.modules.domain.ExecutionContext 67 9 1 17
de.smartics.maven.plugin.jboss.modules.aether.RepositoryBuilder 8 7 0 8
de.smartics.maven.plugin.jboss.modules.domain.ExecutionContext.Builder 31 7 0 7
de.smartics.maven.plugin.jboss.modules.descriptor.ArtifactMatcher 36 6 1 9
de.smartics.maven.plugin.jboss.modules.descriptor.ModuleMatcher 34 6 1 9
de.smartics.maven.plugin.jboss.modules.descriptor.ModulesDescriptor 16 6 0 7
de.smartics.maven.plugin.jboss.modules.domain.matching.DoubleMatchContext 38 6 0 5
de.smartics.maven.plugin.jboss.modules.domain.matching.SingleMatchContext 28 6 0 5
de.smartics.maven.plugin.jboss.modules.domain.ModuleBuilder 48 6 0 3
de.smartics.maven.plugin.jboss.modules.domain.SlotStrategy 31 6 0 0
de.smartics.maven.plugin.jboss.modules.JandexMojo 66 6 0 1
de.smartics.maven.plugin.jboss.modules.aether.Mapper 28 5 0 4
de.smartics.maven.plugin.jboss.modules.descriptor.ApplyToDependencies 23 5 1 8
de.smartics.maven.plugin.jboss.modules.descriptor.ApplyToModule.Builder 17 5 0 5
de.smartics.maven.plugin.jboss.modules.descriptor.Directives 28 5 1 8
de.smartics.maven.plugin.jboss.modules.descriptor.ModuleClusion 23 5 0 4
de.smartics.maven.plugin.jboss.modules.domain.matching.DelegationMatchContext 15 5 0 5

Averages.

NCSS average Program NCSS Classes average Methods average Javadocs average
32.52 2,330.00 0.22 5.52 4.86

Methods

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

TOP 30 Methods containing the most NCSS.

Methods NCSS CCN Javadocs
de.smartics.maven.plugin.jboss.modules.parser.ModulesDescriptorBuilder.parseApply(Builder,Element) 23 5 0
de.smartics.maven.plugin.jboss.modules.parser.ModulesDescriptorBuilder.handleChild(ApplyToModule.Builder,XMLOutputter,Element) 19 6 0
de.smartics.maven.plugin.jboss.modules.aether.filter.ExclusionFilter.accept(DependencyNode,DependencyNode) 16 10 0
de.smartics.maven.plugin.jboss.modules.JBossModulesArchiveMojo.calcModulesRootDirectories() 15 6 0
de.smartics.maven.plugin.jboss.modules.JBossModulesArchiveMojo.runModuleCreation(Dependency) 15 6 0
de.smartics.maven.plugin.jboss.modules.JBossModulesArchiveMojo.attach() 15 7 0
de.smartics.maven.plugin.jboss.modules.parser.ModulesXmlLocator.discover(ClassLoader,File) 15 5 1
de.smartics.maven.plugin.jboss.modules.domain.ModuleMap.calcModule(DependencyKey) 14 8 0
de.smartics.maven.plugin.jboss.modules.JBossModulesArchiveMojo.createContext(Dependency) 14 2 0
de.smartics.maven.plugin.jboss.modules.IndexMojo.runIndexing() 13 5 0
de.smartics.maven.plugin.jboss.modules.JandexMojo.runIndexing() 13 5 0
de.smartics.maven.plugin.jboss.modules.JandexMojo.runIndexing(Indexer,DirectoryScanner) 13 5 0
de.smartics.maven.plugin.jboss.modules.JBossModulesArchiveMojo.execute() 13 3 0
de.smartics.maven.plugin.jboss.modules.parser.ModulesDescriptorBuilder.parseApplyToDependencies(Element) 13 4 0
de.smartics.maven.plugin.jboss.modules.parser.ModulesDescriptorBuilder.parseMatcher(DependenciesDescriptor.Builder,Element) 13 3 0
de.smartics.maven.plugin.jboss.modules.parser.ModulesXmlLocator.loadModules(ModulesDescriptor,URL,String) 13 5 0
de.smartics.maven.plugin.jboss.modules.parser.ModulesXmlLocator.loadModules(ModulesDescriptor,File) 13 5 0
de.smartics.maven.plugin.jboss.modules.xml.ModuleXmlBuilder.addResolvedDependencies(ModuleDescriptor,Dependency,Element) 13 2 0
de.smartics.maven.plugin.jboss.modules.domain.SlotStrategy.calcSlot(Artifact,String) 12 6 0
de.smartics.maven.plugin.jboss.modules.IndexMojo.runIndexing(Indexer) 12 6 0
de.smartics.maven.plugin.jboss.modules.JandexMojo.runIndexing(Indexer) 12 6 0
de.smartics.maven.plugin.jboss.modules.JandexMojo.writeIndex(Indexer) 12 3 0
de.smartics.maven.plugin.jboss.modules.JBossModulesArchiveMojo.adjustSession() 12 2 0
de.smartics.maven.plugin.jboss.modules.JBossModulesArchiveMojo.calcRootDependencies() 12 4 0
de.smartics.maven.plugin.jboss.modules.parser.ModulesDescriptorBuilder.parseModule(Element) 12 1 0
de.smartics.maven.plugin.jboss.modules.parser.ModulesDescriptorBuilder.parseMatch(Element) 12 3 0
de.smartics.maven.plugin.jboss.modules.parser.ModulesDescriptorBuilder.handleDependencies(ApplyToModule.Builder,XMLOutputter,Element) 12 3 0
de.smartics.maven.plugin.jboss.modules.xml.ModuleXmlBuilder.calcDefaultSlot(ModuleDescriptor,Dependency) 12 6 0
de.smartics.maven.plugin.jboss.modules.aether.filter.GaExclusionFilter.accept(DependencyNode,DependencyNode) 11 6 0
de.smartics.maven.plugin.jboss.modules.aether.MavenRepository.configureRequest(DependencyRequest) 11 4 0

Averages.

Program NCSS NCSS average CCN average Javadocs average
2,330.00 4.62 2.06 0.58

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