Fractal | Fractal ADL | Cecilia Examples | Minus
 

JavaNCSS Metric Results

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

The following document contains the results of a JavaNCSS metric analysis.
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
org.objectweb.fractal.cecilia.adl 17 78 1152 42 270 55 563
org.objectweb.fractal.cecilia.adl.idl 14 40 1152 33 147 315 424
org.objectweb.fractal.cecilia.primitive.thinkMC.controllers 11 21 547 20 72 153 328
org.objectweb.fractal.cecilia.adl.implementations 12 50 518 28 159 91 383
org.objectweb.fractal.cecilia.primitive.thinkMC.types 9 11 451 18 75 154 304
org.objectweb.fractal.cecilia.adl.controllers 9 47 417 13 67 68 305
org.objectweb.fractal.cecilia.adl.compiler 9 45 406 11 66 95 309
org.objectweb.fractal.cecilia.composite.c.controllers 7 25 387 11 40 73 181
org.objectweb.fractal.cecilia.adl.interfaces 7 36 311 13 86 36 312
org.objectweb.fractal.cecilia.adl.types 5 19 308 7 50 58 139
org.objectweb.fractal.cecilia.adl.components 10 32 265 16 103 36 261
org.objectweb.fractal.cecilia.primitive.thinkMC.source 2 14 264 7 29 92 91
org.objectweb.fractal.cecilia.adl.bindings 5 28 239 6 50 45 207
org.objectweb.fractal.cecilia.adl.compiler.gnu 5 16 233 4 26 53 111
org.objectweb.fractal.cecilia.adl.attributes 4 14 204 4 29 30 111
org.objectweb.fractal.cecilia.primitive.thinkMC.components 4 8 190 9 37 71 122
org.objectweb.fractal.cecilia.adl.idl.util 1 15 189 3 13 1 94
org.objectweb.fractal.adl 8 26 179 13 91 47 190
org.objectweb.fractal.cecilia.primitive.thinkMC.implementations 2 4 175 7 34 60 79
org.objectweb.fractal.cecilia.adl.file 8 26 159 14 69 8 224
org.objectweb.fractal.cecilia.composite.c.components 4 4 147 7 26 60 111
org.objectweb.fractal.cecilia.composite.c.types 2 2 87 4 15 34 64
org.objectweb.fractal.cecilia.adl.directives 7 20 83 23 104 1 162
org.objectweb.fractal.cecilia.primitive.thinkMC.attributes 2 2 75 4 17 31 59
org.objectweb.fractal.cecilia.composite.c 1 3 58 0 0 18 48
org.objectweb.fractal.cecilia.composite.c.source 1 1 52 3 12 24 31
org.objectweb.fractal.cecilia.adl.parser 1 5 42 1 5 6 30
org.objectweb.fractal.cecilia.adl.properties 5 14 24 19 87 0 110
Classes total Methods total NCSS total Javadocs Javadoc lines Single lines comment Multi lines comment
172 606 8314 340 1779 1715 5353

Objects

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

TOP 30 classes containing the most NCSS.

Object NCSS Methods Classes Javadocs
org.objectweb.fractal.cecilia.adl.Launcher 374 29 1 5
org.objectweb.fractal.cecilia.adl.AbstractLauncher 340 9 9 12
org.objectweb.fractal.cecilia.adl.idl.BasicIDLLoader 295 18 1 1
org.objectweb.fractal.cecilia.adl.idl.util.CUtil 170 15 0 3
org.objectweb.fractal.cecilia.adl.types.ComponentTypeDesc 136 6 0 1
org.objectweb.fractal.cecilia.adl.attributes.AttributeLoader 119 6 0 1
org.objectweb.fractal.cecilia.adl.controllers.AbstractControllerChecker 107 16 0 1
org.objectweb.fractal.cecilia.adl.implementations.LanguageLoader 105 10 0 1
org.objectweb.fractal.cecilia.adl.compiler.gnu.GnuDepCompilerTask 99 6 1 1
org.objectweb.fractal.cecilia.adl.interfaces.InterfaceLoader 94 7 0 1
org.objectweb.fractal.cecilia.primitive.thinkMC.source.CompilationVisitor 93 11 2 2
org.objectweb.fractal.cecilia.adl.compiler.AbstractCompilationTaskFactory 92 14 0 0
org.objectweb.fractal.cecilia.composite.c.controllers.CloneableControllerLoader 90 9 0 1
org.objectweb.fractal.cecilia.adl.bindings.BindingResolverLoader 89 8 0 1
org.objectweb.fractal.cecilia.primitive.thinkMC.source.SourceFileVisitor 89 3 3 5
org.objectweb.fractal.cecilia.adl.ReservedWordsChecker 87 2 0 2
org.objectweb.fractal.cecilia.primitive.thinkMC.controllers.PrimitiveControllerLoader 85 8 0 1
org.objectweb.fractal.cecilia.adl.controllers.ControllerImplementationVisitor 82 8 2 2
org.objectweb.fractal.cecilia.adl.implementations.GlobalInitVisitor 80 7 1 2
org.objectweb.fractal.cecilia.primitive.thinkMC.implementations.MacroDefinitionVisitor 77 3 3 5
org.objectweb.fractal.cecilia.adl.CeciliaFactory 73 6 0 1
org.objectweb.fractal.adl.DefinitionTraveler 69 8 0 1
org.objectweb.fractal.cecilia.adl.idl.CInterfaceDefinitionVisitor 64 1 1 3
org.objectweb.fractal.cecilia.primitive.thinkMC.types.ClientInterfaceInstantiationVisitor 63 3 2 3
org.objectweb.fractal.cecilia.adl.compiler.AbstractArchiveTask 61 4 1 1
org.objectweb.fractal.cecilia.adl.idl.RecursiveIDLDispatchVisitor 60 7 0 1
org.objectweb.fractal.cecilia.adl.file.CodeWriter 58 10 0 3
org.objectweb.fractal.cecilia.adl.compiler.AbstractLinkTask 57 5 0 1
org.objectweb.fractal.cecilia.adl.idl.CUnionDefinitionVisitor 56 1 1 3
org.objectweb.fractal.cecilia.adl.idl.CRecordDefinitionVisitor 56 1 1 3

TOP 30 classes containing the most methods.

Object NCSS Methods Classes Javadocs
org.objectweb.fractal.cecilia.adl.Launcher 374 29 1 5
org.objectweb.fractal.cecilia.adl.idl.BasicIDLLoader 295 18 1 1
org.objectweb.fractal.cecilia.adl.controllers.AbstractControllerChecker 107 16 0 1
org.objectweb.fractal.cecilia.adl.interfaces.InterfaceDecorationUtil 45 15 0 2
org.objectweb.fractal.cecilia.adl.idl.util.CUtil 170 15 0 3
org.objectweb.fractal.cecilia.adl.compiler.AbstractCompilationTaskFactory 92 14 0 0
org.objectweb.fractal.adl.VisitorDispatcher 49 11 0 3
org.objectweb.fractal.cecilia.primitive.thinkMC.source.CompilationVisitor 93 11 2 2
org.objectweb.fractal.cecilia.adl.file.CodeWriter 58 10 0 3
org.objectweb.fractal.cecilia.adl.implementations.LanguageLoader 105 10 0 1
org.objectweb.fractal.cecilia.adl.AbstractLauncher 340 9 9 12
org.objectweb.fractal.cecilia.composite.c.controllers.CloneableControllerLoader 90 9 0 1
org.objectweb.fractal.adl.DefinitionTraveler 69 8 0 1
org.objectweb.fractal.cecilia.adl.bindings.BindingDecorationUtil 21 8 0 2
org.objectweb.fractal.cecilia.adl.bindings.BindingResolverLoader 89 8 0 1
org.objectweb.fractal.cecilia.adl.controllers.ControllerDecorationUtil 23 8 0 2
org.objectweb.fractal.cecilia.adl.controllers.ControllerImplementationVisitor 82 8 2 2
org.objectweb.fractal.cecilia.primitive.thinkMC.controllers.PrimitiveControllerLoader 85 8 0 1
org.objectweb.fractal.cecilia.adl.file.SourceFile 22 7 0 3
org.objectweb.fractal.cecilia.adl.interfaces.InterfaceLoader 94 7 0 1
org.objectweb.fractal.cecilia.adl.idl.RecursiveIDLDispatchVisitor 60 7 0 1
org.objectweb.fractal.cecilia.adl.implementations.GlobalInitVisitor 80 7 1 2
org.objectweb.fractal.cecilia.adl.components.ComponentChecker 40 6 0 1
org.objectweb.fractal.cecilia.adl.attributes.AttributeLoader 119 6 0 1
org.objectweb.fractal.cecilia.adl.types.ComponentTypeDesc 136 6 0 1
org.objectweb.fractal.cecilia.adl.types.PrimitiveTypeDefinitionFilter 54 6 0 1
org.objectweb.fractal.cecilia.adl.implementations.ExtendedImplementation 7 6 0 7
org.objectweb.fractal.cecilia.adl.implementations.ImplementationCodeLoaderSelector 42 6 0 2
org.objectweb.fractal.cecilia.adl.compiler.gnu.GnuDepCompilerTask 99 6 1 1
org.objectweb.fractal.cecilia.adl.PrimitiveCheckerDispatcher 21 6 0 1

Averages.

NCSS average Program NCSS Classes average Methods average Javadocs average
35.40 8,314.00 0.50 3.52 1.98

Methods

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

TOP 30 Methods containing the most NCSS.

Methods NCSS CCN Javadocs
org.objectweb.fractal.cecilia.adl.Launcher.init(String) 94 36 0
org.objectweb.fractal.cecilia.adl.types.ComponentTypeDesc.equals(Object) 91 66 0
org.objectweb.fractal.cecilia.adl.attributes.AttributeLoader.checkAttributesContainer(AttributesContainer,Map) 76 38 0
org.objectweb.fractal.cecilia.adl.idl.BasicIDLLoader.check(String,IDLDefinition,Map,List,ClassLoader,Map) 56 24 0
org.objectweb.fractal.cecilia.adl.implementations.LanguageLoader.checkNode(Node,Map) 55 21 0
org.objectweb.fractal.cecilia.adl.AbstractLauncher.CommandLine.parseArgs(Options,boolean,String) 50 19 1
org.objectweb.fractal.cecilia.composite.c.controllers.BCInstantiationVisitor.BCInstantiationTask.processSourceCode() 37 7 0
org.objectweb.fractal.cecilia.adl.compiler.ExecutionHelper.exec(String,List) 36 7 0
org.objectweb.fractal.cecilia.adl.idl.BasicIDLLoader.merge(IDLDefinition,IDLDefinition) 35 14 0
org.objectweb.fractal.cecilia.adl.compiler.AbstractArchiveTask.getFile(ExecutorService) 35 4 0
org.objectweb.fractal.cecilia.primitive.thinkMC.implementations.MacroDefinitionVisitor.AbstractImplementationTask.processSourceCode() 35 5 0
org.objectweb.fractal.cecilia.adl.compiler.AbstractLinkTask.execute() 33 12 0
org.objectweb.fractal.cecilia.adl.AbstractLauncher.argsToMap(String) 32 9 0
org.objectweb.fractal.cecilia.adl.interfaces.InterfaceLoader.checkInterfaceContainer(InterfaceContainer,Map) 31 18 0
org.objectweb.fractal.cecilia.adl.components.StartOrderLoader.checkOrder(ComponentContainer) 31 15 0
org.objectweb.fractal.cecilia.adl.idl.BasicIDLLoader.normalizeIDL(IDLDefinition,ClassLoader) 31 24 0
org.objectweb.fractal.cecilia.adl.CeciliaFactory.newComponent(String,Map) 31 17 0
org.objectweb.fractal.cecilia.adl.implementations.CCodeLoader.loadImplementation(String,String,Map) 30 12 0
org.objectweb.fractal.cecilia.adl.Launcher.createCompiler(String,Map) 30 16 0
org.objectweb.fractal.cecilia.adl.idl.util.CUtil.buildRecordField(Field,String) 29 10 0
org.objectweb.fractal.cecilia.adl.idl.util.CUtil.buildUnionField(Field,String) 29 10 0
org.objectweb.fractal.cecilia.adl.compiler.gnu.GnuDepCompilerTask.needRecompile(File,File) 29 19 0
org.objectweb.fractal.cecilia.primitive.thinkMC.source.CompilationVisitor.visit(List,ComponentContainer,Map) 29 12 1
org.objectweb.fractal.cecilia.primitive.thinkMC.controllers.ACInstantiationVisitor.ACInstantiationTask.processSourceCode() 29 11 0
org.objectweb.fractal.cecilia.composite.c.components.ComponentInstantiationVisitor.ComponentInstantiationTask.processSourceCode() 28 1 0
org.objectweb.fractal.cecilia.composite.c.components.CloneableInstantiationVisitor.CloneableInstantiationTask.processSourceCode() 28 1 0
org.objectweb.fractal.cecilia.composite.c.controllers.CloneableControllerLoader.beforeSubComponentCheck(List,ComponentContainer,Map) 28 16 0
org.objectweb.fractal.cecilia.adl.idl.util.CUtil.buildParameter(Parameter) 27 8 1
org.objectweb.fractal.cecilia.adl.idl.CInterfaceDefinitionVisitor.CInterfaceHeaderTask.enterInterface(InterfaceDefinition) 27 2 0
org.objectweb.fractal.cecilia.primitive.thinkMC.implementations.FactoryImplementationVisitor.FactoryImplementationTask.processSourceCode() 27 3 0

Averages.

Program NCSS NCSS average CCN average Javadocs average
8,314.00 6.47 2.87 0.24

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

 
2007-2009 © ObjectWeb Consortium  | Last Published: 2009-04-21 13:48  | Version: 2.1.0