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.cli.main.option.programminglanguage.argument 4 49 563 53 688 2 103
net.sourceforge.plantumldependency.cli.main.option.programminglanguage.argument.java.type 6 46 360 50 370 0 166
net.sourceforge.plantumldependency.cli.generic.type.impl 2 42 310 44 377 4 50
net.sourceforge.plantumldependency.cli.main.option.programminglanguage.context 2 46 224 48 408 5 48
net.sourceforge.plantumldependency.cli.main.option.output 2 37 219 39 375 1 54
net.sourceforge.plantumldependency.cli.plantumldiagram.classes.element.impl 5 36 196 41 256 0 120
net.sourceforge.plantumldependency.cli.plantumldiagram.classes.element.stereotype.impl 2 20 145 22 129 0 53
net.sourceforge.plantumldependency.cli.main.program 1 4 117 5 51 0 26
net.sourceforge.plantumldependency.cli.main.option.programminglanguage.argument.java 1 22 106 23 183 0 25
net.sourceforge.plantumldependency.cli.plantumldiagram.classes.relation 6 15 95 18 114 0 170
net.sourceforge.plantumldependency.cli.plantumldiagram.classes.element 7 12 89 19 123 0 165
net.sourceforge.plantumldependency.cli.main.option.display.type.argument 2 10 83 4 23 4 115
net.sourceforge.plantumldependency.cli.plantumldiagram.classes.impl 1 9 81 10 66 0 25
net.sourceforge.plantumldependency.cli.main.ant 1 22 76 23 169 0 28
net.sourceforge.plantumldependency.cli.generic.impl 1 12 67 13 80 0 25
net.sourceforge.plantumldependency.cli.constants.log 3 3 65 6 39 0 122
net.sourceforge.plantumldependency.cli.constants 3 3 64 6 36 0 93
net.sourceforge.plantumldependency.cli.generic.type 4 23 58 22 257 0 136
net.sourceforge.plantumldependency.cli.generic.type.impl.classimpl 3 9 49 11 84 0 70
net.sourceforge.plantumldependency.cli.main.option.programminglanguage.context.impl 2 10 38 12 178 0 48
net.sourceforge.plantumldependency.cli.main.option.include 1 5 34 6 42 12 26
net.sourceforge.plantumldependency.cli.main.option.display.name.argument 1 3 27 4 23 0 26
net.sourceforge.plantumldependency.cli.main.option.display.packagename.argument 1 3 27 4 23 0 26
net.sourceforge.plantumldependency.cli.plantumldiagram.classes.relation.impl 3 3 27 6 48 0 72
net.sourceforge.plantumldependency.cli.main.option.display.type 1 3 26 4 23 0 26
net.sourceforge.plantumldependency.cli.generic.type.impl.annotationimpl 1 5 24 6 49 0 24
net.sourceforge.plantumldependency.cli.generic.type.impl.enumimpl 1 5 24 6 52 0 24
net.sourceforge.plantumldependency.cli.generic.type.impl.interfaceimpl 1 5 24 6 52 0 24
net.sourceforge.plantumldependency.cli.main.option.display.name 1 3 24 4 23 0 26
net.sourceforge.plantumldependency.cli.main.option.display.packagename 1 3 24 4 23 0 26
net.sourceforge.plantumldependency.cli.main.option.basedirectory 1 3 23 4 23 0 26
net.sourceforge.plantumldependency.cli.main.option.exclude 1 3 23 4 23 0 26
net.sourceforge.plantumldependency.cli.main.option.programminglanguage 1 3 23 4 23 0 27
net.sourceforge.plantumldependency.cli.generic.type.impl.nativeimpl 1 4 19 5 33 0 24
net.sourceforge.plantumldependency.cli.generic.type.impl.stubimpl 1 4 18 5 33 0 24
net.sourceforge.plantumldependency.cli.plantumldiagram.classes.element.stereotype 3 5 18 8 81 0 69
net.sourceforge.plantumldependency.cli.generic 1 5 10 6 63 0 23
net.sourceforge.plantumldependency.cli.plantumldiagram.classes 1 2 8 3 31 0 23
net.sourceforge.plantumldependency.cli.exception 1 2 7 3 32 0 24
net.sourceforge.plantumldependency.cli.plantumldiagram 2 1 7 3 32 0 46
net.sourceforge.plantumldependency.cli.plantumldiagram.classes.element.tag 1 2 6 0 0 0 52
net.sourceforge.plantumldependency.cli.main.program.generated 1 0 4 1 8 0 23
Classes total Methods total NCSS total Javadocs Javadoc lines Single lines comment Multi lines comment
85 502 3432 565 4746 28 2329

Objects

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

TOP 30 classes containing the most NCSS.

Object NCSS Methods Classes Javadocs
net.sourceforge.plantumldependency.cli.main.option.programminglanguage.argument.JavaProgrammingLanguage 378 30 0 31
net.sourceforge.plantumldependency.cli.main.option.programminglanguage.context.AbstractProgrammingLanguageContext 177 34 0 35
net.sourceforge.plantumldependency.cli.generic.type.impl.DependencyTypeImpl 164 26 0 27
net.sourceforge.plantumldependency.cli.generic.type.impl.ImportDependenciesCollectionImpl 95 16 0 17
net.sourceforge.plantumldependency.cli.main.option.programminglanguage.argument.java.JavaRawDependency 94 22 0 23
net.sourceforge.plantumldependency.cli.main.option.output.PlantUMLDependencyOutputOption 86 20 0 21
net.sourceforge.plantumldependency.cli.main.option.programminglanguage.argument.java.type.JavaType 75 17 0 18
net.sourceforge.plantumldependency.cli.main.program.PlantUMLDependencyProgram 74 4 0 5
net.sourceforge.plantumldependency.cli.main.option.output.PlantUMLDependencyOutputOptionExecution 68 17 0 18
net.sourceforge.plantumldependency.cli.plantumldiagram.classes.element.stereotype.impl.PlantUMLStereotypeImpl 67 11 0 12
net.sourceforge.plantumldependency.cli.plantumldiagram.classes.relation.AbstractPlantUMLClassesDiagramRelation 67 10 0 11
net.sourceforge.plantumldependency.cli.plantumldiagram.classes.impl.PlantUMLClassesDiagramImpl 66 9 0 10
net.sourceforge.plantumldependency.cli.main.option.programminglanguage.argument.ProgrammingLanguage 63 13 0 14
net.sourceforge.plantumldependency.cli.plantumldiagram.classes.element.AbstractPlantUMLClassesDiagramElement 60 10 0 11
net.sourceforge.plantumldependency.cli.main.ant.PlantUMLDependencyProgramTask 56 22 0 23
net.sourceforge.plantumldependency.cli.generic.impl.GenericDependencyImpl 55 12 0 13
net.sourceforge.plantumldependency.cli.plantumldiagram.classes.element.stereotype.impl.PlantUMLSpottedCharacterImpl 54 9 0 10
net.sourceforge.plantumldependency.cli.main.option.programminglanguage.argument.java.type.ClassJavaType 42 7 0 8
net.sourceforge.plantumldependency.cli.plantumldiagram.classes.element.impl.PlantUMLClassesDiagramClassElementImpl 41 9 0 10
net.sourceforge.plantumldependency.cli.constants.log.ErrorConstants 39 1 0 2
net.sourceforge.plantumldependency.cli.plantumldiagram.classes.element.impl.PlantUMLClassesDiagramAnnotationElementImpl 38 8 0 9
net.sourceforge.plantumldependency.cli.plantumldiagram.classes.element.impl.PlantUMLClassesDiagramEnumElementImpl 38 8 0 9
net.sourceforge.plantumldependency.cli.plantumldiagram.classes.element.impl.PlantUMLClassesDiagramInterfaceElementImpl 38 8 0 9
net.sourceforge.plantumldependency.cli.main.option.programminglanguage.argument.java.type.EnumJavaType 37 7 0 8
net.sourceforge.plantumldependency.cli.main.option.programminglanguage.argument.java.type.InterfaceJavaType 37 7 0 8
net.sourceforge.plantumldependency.cli.main.option.display.type.argument.DisplayType 32 7 0 0
net.sourceforge.plantumldependency.cli.main.option.programminglanguage.argument.java.type.AnnotationJavaType 28 7 0 8
net.sourceforge.plantumldependency.cli.main.option.display.type.argument.PlantUMLDependencyDisplayTypeOptionArgument 24 3 0 4
net.sourceforge.plantumldependency.cli.constants.PlantUMLDependencyConstants 17 1 0 2
net.sourceforge.plantumldependency.cli.main.option.display.name.argument.PlantUMLDependencyDisplayNameOptionArgument 17 3 0 4

TOP 30 classes containing the most methods.

Object NCSS Methods Classes Javadocs
net.sourceforge.plantumldependency.cli.main.option.programminglanguage.context.AbstractProgrammingLanguageContext 177 34 0 35
net.sourceforge.plantumldependency.cli.main.option.programminglanguage.argument.JavaProgrammingLanguage 378 30 0 31
net.sourceforge.plantumldependency.cli.generic.type.impl.DependencyTypeImpl 164 26 0 27
net.sourceforge.plantumldependency.cli.main.ant.PlantUMLDependencyProgramTask 56 22 0 23
net.sourceforge.plantumldependency.cli.main.option.programminglanguage.argument.java.JavaRawDependency 94 22 0 23
net.sourceforge.plantumldependency.cli.main.option.output.PlantUMLDependencyOutputOption 86 20 0 21
net.sourceforge.plantumldependency.cli.main.option.output.PlantUMLDependencyOutputOptionExecution 68 17 0 18
net.sourceforge.plantumldependency.cli.main.option.programminglanguage.argument.java.type.JavaType 75 17 0 18
net.sourceforge.plantumldependency.cli.generic.type.impl.ImportDependenciesCollectionImpl 95 16 0 17
net.sourceforge.plantumldependency.cli.main.option.programminglanguage.argument.ProgrammingLanguage 63 13 0 14
net.sourceforge.plantumldependency.cli.generic.impl.GenericDependencyImpl 55 12 0 13
net.sourceforge.plantumldependency.cli.main.option.programminglanguage.context.ProgrammingLanguageContext 13 12 0 13
net.sourceforge.plantumldependency.cli.generic.type.DependencyType 12 11 0 12
net.sourceforge.plantumldependency.cli.plantumldiagram.classes.element.stereotype.impl.PlantUMLStereotypeImpl 67 11 0 12
net.sourceforge.plantumldependency.cli.plantumldiagram.classes.element.AbstractPlantUMLClassesDiagramElement 60 10 0 11
net.sourceforge.plantumldependency.cli.plantumldiagram.classes.relation.AbstractPlantUMLClassesDiagramRelation 67 10 0 11
net.sourceforge.plantumldependency.cli.plantumldiagram.classes.element.impl.PlantUMLClassesDiagramClassElementImpl 41 9 0 10
net.sourceforge.plantumldependency.cli.plantumldiagram.classes.element.stereotype.impl.PlantUMLSpottedCharacterImpl 54 9 0 10
net.sourceforge.plantumldependency.cli.plantumldiagram.classes.impl.PlantUMLClassesDiagramImpl 66 9 0 10
net.sourceforge.plantumldependency.cli.plantumldiagram.classes.element.impl.PlantUMLClassesDiagramAnnotationElementImpl 38 8 0 9
net.sourceforge.plantumldependency.cli.plantumldiagram.classes.element.impl.PlantUMLClassesDiagramEnumElementImpl 38 8 0 9
net.sourceforge.plantumldependency.cli.plantumldiagram.classes.element.impl.PlantUMLClassesDiagramInterfaceElementImpl 38 8 0 9
net.sourceforge.plantumldependency.cli.generic.type.ImportDependenciesCollection 8 7 0 8
net.sourceforge.plantumldependency.cli.main.option.display.type.argument.DisplayType 32 7 0 0
net.sourceforge.plantumldependency.cli.main.option.programminglanguage.argument.java.type.AnnotationJavaType 28 7 0 8
net.sourceforge.plantumldependency.cli.main.option.programminglanguage.argument.java.type.ClassJavaType 42 7 0 8
net.sourceforge.plantumldependency.cli.main.option.programminglanguage.argument.java.type.EnumJavaType 37 7 0 8
net.sourceforge.plantumldependency.cli.main.option.programminglanguage.argument.java.type.InterfaceJavaType 37 7 0 8
net.sourceforge.plantumldependency.cli.generic.GenericDependency 6 5 0 6
net.sourceforge.plantumldependency.cli.generic.type.impl.annotationimpl.AnnotationDependencyTypeImpl 12 5 0 6

Averages.

NCSS average Program NCSS Classes average Methods average Javadocs average
29.62 3,432.00 0.01 5.91 6.65

Methods

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

TOP 30 Methods containing the most NCSS.

Methods NCSS CCN Javadocs
net.sourceforge.plantumldependency.cli.main.option.programminglanguage.argument.JavaProgrammingLanguage.removeSourceFileCommentsAndGenerics(String) 53 15 1
net.sourceforge.plantumldependency.cli.main.program.PlantUMLDependencyProgram.PlantUMLDependencyProgram(ProgramVersion) 46 1 1
net.sourceforge.plantumldependency.cli.main.option.programminglanguage.context.AbstractProgrammingLanguageContext.equals(Object) 45 37 1
net.sourceforge.plantumldependency.cli.main.option.programminglanguage.argument.JavaProgrammingLanguage.getNextEndOfGenericIndex(int,String) 40 15 1
net.sourceforge.plantumldependency.cli.plantumldiagram.classes.relation.AbstractPlantUMLClassesDiagramRelation.equals(Object) 23 19 1
net.sourceforge.plantumldependency.cli.main.option.programminglanguage.argument.java.JavaRawDependency.equals(Object) 21 17 1
net.sourceforge.plantumldependency.cli.main.option.programminglanguage.argument.JavaProgrammingLanguage.readJavaRawDependencyFromPreparedFile(String) 21 3 1
net.sourceforge.plantumldependency.cli.plantumldiagram.classes.element.AbstractPlantUMLClassesDiagramElement.equals(Object) 21 17 1
net.sourceforge.plantumldependency.cli.plantumldiagram.classes.element.stereotype.impl.PlantUMLStereotypeImpl.equals(Object) 21 17 1
net.sourceforge.plantumldependency.cli.plantumldiagram.classes.impl.PlantUMLClassesDiagramImpl.equals(Object) 21 17 1
net.sourceforge.plantumldependency.cli.main.option.programminglanguage.argument.JavaProgrammingLanguage.getNextEndOfMultiLineCommentIndex(int,String) 20 7 1
net.sourceforge.plantumldependency.cli.main.option.output.PlantUMLDependencyOutputOption.parseCommandLine(CommandLine) 19 2 1
net.sourceforge.plantumldependency.cli.plantumldiagram.classes.element.stereotype.impl.PlantUMLSpottedCharacterImpl.equals(Object) 17 14 1
net.sourceforge.plantumldependency.cli.main.option.display.type.argument.PlantUMLDependencyDisplayTypeOptionArgument.parseArgument(String) 16 8 1
net.sourceforge.plantumldependency.cli.main.option.programminglanguage.argument.JavaProgrammingLanguage.extractImportDependenciesSet(String,Pattern,ProgrammingLanguageContext) 16 3 1
net.sourceforge.plantumldependency.cli.main.option.programminglanguage.argument.JavaProgrammingLanguage.getNextEndOfCharContent(int,String) 16 8 1
net.sourceforge.plantumldependency.cli.main.option.programminglanguage.argument.JavaProgrammingLanguage.getNextEndOfStringContent(int,String) 16 8 1
net.sourceforge.plantumldependency.cli.main.option.programminglanguage.argument.JavaProgrammingLanguage.getOrCreateAnnotationDependencyWithFullName(String,JavaType,ImportDependenciesCollection,ProgrammingLanguageContext,int) 16 3 1
net.sourceforge.plantumldependency.cli.main.option.programminglanguage.argument.JavaProgrammingLanguage.getOrCreateParentDependencyWithFullName(JavaType,JavaParentType,String,ImportDependenciesCollection,ProgrammingLanguageContext,int) 16 3 1
net.sourceforge.plantumldependency.cli.main.option.programminglanguage.context.AbstractProgrammingLanguageContext.AbstractProgrammingLanguageContext(GenericDependency,GenericDependency,GenericDependency,DisplayType,Pattern,Pattern) 16 4 1
net.sourceforge.plantumldependency.cli.generic.impl.GenericDependencyImpl.equals(Object) 15 12 1
net.sourceforge.plantumldependency.cli.generic.type.impl.DependencyTypeImpl.equals(Object) 15 12 1
net.sourceforge.plantumldependency.cli.generic.type.impl.DependencyTypeImpl.getImportDependenciesToGeneratePlantUML(DisplayType,Pattern,Pattern) 15 6 1
net.sourceforge.plantumldependency.cli.generic.type.impl.ImportDependenciesCollectionImpl.equals(Object) 15 12 1
net.sourceforge.plantumldependency.cli.main.option.programminglanguage.argument.java.type.ClassJavaType.createDependencyType(String,String,boolean,ImportDependenciesCollection,GenericDependency,GenericDependency,GenericDependency) 15 2 1
net.sourceforge.plantumldependency.cli.main.option.programminglanguage.argument.java.type.JavaType.equals(Object) 15 12 1
net.sourceforge.plantumldependency.cli.main.option.programminglanguage.argument.ProgrammingLanguage.equals(Object) 15 12 1
net.sourceforge.plantumldependency.cli.plantumldiagram.classes.element.impl.PlantUMLClassesDiagramAnnotationElementImpl.equals(Object) 15 12 1
net.sourceforge.plantumldependency.cli.plantumldiagram.classes.element.impl.PlantUMLClassesDiagramClassElementImpl.equals(Object) 15 12 1
net.sourceforge.plantumldependency.cli.plantumldiagram.classes.element.impl.PlantUMLClassesDiagramEnumElementImpl.equals(Object) 15 12 1

Averages.

Program NCSS NCSS average CCN average Javadocs average
3,432.00 4.37 2.02 0.97

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