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 11 103 733 73 563 132 434
de.smartics.maven.plugin.jboss.modules.domain 9 56 346 43 272 92 204
de.smartics.maven.plugin.jboss.modules.aether 11 63 304 54 330 128 226
de.smartics.maven.plugin.jboss.modules.sets 5 15 178 13 51 65 108
de.smartics.maven.plugin.jboss.modules.xml 2 15 171 4 19 13 59
de.smartics.maven.plugin.jboss.modules.aether.filter 5 12 102 10 40 55 120
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
47 284 1958 216 1378 529 1274

Objects

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

TOP 30 classes containing the most NCSS.

Object NCSS Methods Classes Javadocs
de.smartics.maven.plugin.jboss.modules.Module 157 36 0 28
de.smartics.maven.plugin.jboss.modules.xml.ModuleXmlBuilder 150 13 1 4
de.smartics.maven.plugin.jboss.modules.JBossModulesArchiveMojo 146 12 0 1
de.smartics.maven.plugin.jboss.modules.domain.ModuleMap 104 13 1 9
de.smartics.maven.plugin.jboss.modules.domain.ExecutionContext 75 10 1 19
de.smartics.maven.plugin.jboss.modules.aether.MavenRepository 70 10 0 4
de.smartics.maven.plugin.jboss.modules.AbstractModuleNameMatcher 66 9 0 8
de.smartics.maven.plugin.jboss.modules.JandexMojo 66 6 0 1
de.smartics.maven.plugin.jboss.modules.domain.ModuleBuilder 51 6 0 3
de.smartics.maven.plugin.jboss.modules.Dependency 50 15 0 13
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.Clusion 43 10 0 8
de.smartics.maven.plugin.jboss.modules.domain.matching.DoubleMatchContext 38 6 0 5
de.smartics.maven.plugin.jboss.modules.domain.ExecutionContext.Builder 35 8 0 8
de.smartics.maven.plugin.jboss.modules.sets.ServicesConverter 34 4 0 2
de.smartics.maven.plugin.jboss.modules.sets.ExportConverter 30 4 0 2
de.smartics.maven.plugin.jboss.modules.sets.ModulesXmlLocator 30 3 0 3
de.smartics.maven.plugin.jboss.modules.aether.Mapper 28 5 0 4
de.smartics.maven.plugin.jboss.modules.domain.matching.SingleMatchContext 28 6 0 5
de.smartics.maven.plugin.jboss.modules.domain.SlotStrategy 27 5 0 0
de.smartics.maven.plugin.jboss.modules.aether.RepositoryLogListener 24 11 0 12
de.smartics.maven.plugin.jboss.modules.Expression 23 6 0 6
de.smartics.maven.plugin.jboss.modules.sets.ModulesParser 20 2 0 3
de.smartics.maven.plugin.jboss.modules.index.Indexer 19 3 0 4
de.smartics.maven.plugin.jboss.modules.aether.PruningDependencyTraverser 18 2 0 2
de.smartics.maven.plugin.jboss.modules.domain.ModuleMap.DependencyKey 18 4 0 0
de.smartics.maven.plugin.jboss.modules.aether.filter.DependencyFlagger 16 4 0 4
de.smartics.maven.plugin.jboss.modules.aether.filter.GaExclusionFilter 16 2 0 2
de.smartics.maven.plugin.jboss.modules.domain.PrunerGenerator 16 3 0 3

TOP 30 classes containing the most methods.

Object NCSS Methods Classes Javadocs
de.smartics.maven.plugin.jboss.modules.Module 157 36 0 28
de.smartics.maven.plugin.jboss.modules.aether.MojoRepositoryBuilder 46 16 0 10
de.smartics.maven.plugin.jboss.modules.Dependency 50 15 0 13
de.smartics.maven.plugin.jboss.modules.domain.ModuleMap 104 13 1 9
de.smartics.maven.plugin.jboss.modules.xml.ModuleXmlBuilder 150 13 1 4
de.smartics.maven.plugin.jboss.modules.JBossModulesArchiveMojo 146 12 0 1
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.Clusion 43 10 0 8
de.smartics.maven.plugin.jboss.modules.domain.ExecutionContext 75 10 1 19
de.smartics.maven.plugin.jboss.modules.AbstractModuleNameMatcher 66 9 0 8
de.smartics.maven.plugin.jboss.modules.domain.ExecutionContext.Builder 35 8 0 8
de.smartics.maven.plugin.jboss.modules.aether.RepositoryBuilder 8 7 0 8
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 51 6 0 3
de.smartics.maven.plugin.jboss.modules.Expression 23 6 0 6
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.domain.matching.DelegationMatchContext 15 5 0 5
de.smartics.maven.plugin.jboss.modules.domain.SlotStrategy 27 5 0 0
de.smartics.maven.plugin.jboss.modules.IndexMojo 47 5 0 1
de.smartics.maven.plugin.jboss.modules.aether.DelegateDependencyTraverser 11 4 0 3
de.smartics.maven.plugin.jboss.modules.aether.filter.DefaultTransitiveDependencyResolver 13 4 0 2
de.smartics.maven.plugin.jboss.modules.aether.filter.DependencyFlagger 16 4 0 4
de.smartics.maven.plugin.jboss.modules.domain.MatchContext 5 4 0 5
de.smartics.maven.plugin.jboss.modules.domain.ModuleMap.DependencyKey 18 4 0 0
de.smartics.maven.plugin.jboss.modules.sets.ExportConverter 30 4 0 2
de.smartics.maven.plugin.jboss.modules.sets.ServicesConverter 34 4 0 2
de.smartics.maven.plugin.jboss.modules.aether.MavenResponse 7 3 0 4

Averages.

NCSS average Program NCSS Classes average Methods average Javadocs average
34.70 1,958.00 0.06 6.04 4.77

Methods

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

TOP 30 Methods containing the most NCSS.

Methods NCSS CCN Javadocs
de.smartics.maven.plugin.jboss.modules.sets.ServicesConverter.unmarshal(HierarchicalStreamReader,UnmarshallingContext) 28 7 0
de.smartics.maven.plugin.jboss.modules.sets.ExportConverter.unmarshal(HierarchicalStreamReader,UnmarshallingContext) 24 6 0
de.smartics.maven.plugin.jboss.modules.AbstractModuleNameMatcher.merge(AbstractModuleNameMatcher) 21 13 1
de.smartics.maven.plugin.jboss.modules.xml.ModuleXmlBuilder.addResolvedDependencies(Module,Dependency,Element) 20 8 0
de.smartics.maven.plugin.jboss.modules.xml.ModuleXmlBuilder.addStaticDependencies(Module,Element) 20 9 0
de.smartics.maven.plugin.jboss.modules.Module.mergePort(Module) 17 7 0
de.smartics.maven.plugin.jboss.modules.JBossModulesArchiveMojo.runModuleCreation(Dependency) 15 5 0
de.smartics.maven.plugin.jboss.modules.JBossModulesArchiveMojo.attach() 15 7 0
de.smartics.maven.plugin.jboss.modules.JBossModulesArchiveMojo.createContext(Dependency) 15 2 0
de.smartics.maven.plugin.jboss.modules.sets.ModulesXmlLocator.discover() 15 5 1
de.smartics.maven.plugin.jboss.modules.domain.ModuleMap.calcModule(DependencyKey) 14 8 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.sets.ModuleDescritors.getModules() 13 6 1
de.smartics.maven.plugin.jboss.modules.sets.ModulesParser.ModulesParser() 13 1 1
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.execute() 12 3 0
de.smartics.maven.plugin.jboss.modules.JBossModulesArchiveMojo.adjustSession() 12 2 0
de.smartics.maven.plugin.jboss.modules.xml.ModuleXmlBuilder.calcSlot(ExecutionContext,Module,Dependency) 12 5 0
de.smartics.maven.plugin.jboss.modules.xml.ModuleXmlBuilder.calcDefaultSlot(Module,Dependency) 12 6 0
de.smartics.maven.plugin.jboss.modules.AbstractModuleNameMatcher.isMatched(String) 11 9 1
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
de.smartics.maven.plugin.jboss.modules.aether.PruningDependencyTraverser.doTraverseDependency(Dependency) 11 7 0
de.smartics.maven.plugin.jboss.modules.domain.ModuleBuilder.createModuleXml(File) 11 1 0
de.smartics.maven.plugin.jboss.modules.index.Indexer.writeIndex() 11 4 1

Averages.

Program NCSS NCSS average CCN average Javadocs average
1,958.00 4.90 2.24 0.60

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