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.exceptions.report.renderer.html 12 36 327 22 92 141 232
de.smartics.exceptions.report.data 10 71 312 60 329 110 240
de.smartics.exceptions.report.utils 5 32 293 35 258 61 121
de.smartics.exceptions.report.generator 7 43 234 45 278 97 134
de.smartics.exceptions.report 6 27 168 21 115 59 137
de.smartics.exceptions.report.renderer 13 26 115 37 219 110 216
de.smartics.exceptions.report.message 4 25 106 27 161 33 117
de.smartics.exceptions.report.scan 5 10 54 10 51 41 89
de.smartics.exceptions.report.sort 3 6 49 9 48 33 74
de.smartics.exceptions.report.app 1 3 10 4 28 11 38
de.smartics.exceptions.report.qdox 1 1 10 2 9 11 38
Classes total Methods total NCSS total Javadocs Javadoc lines Single lines comment Multi lines comment
67 280 1678 272 1588 707 1436

Objects

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

TOP 30 classes containing the most NCSS.

Object NCSS Methods Classes Javadocs
de.smartics.exceptions.report.data.PlaceholderInfoHandler 85 13 0 1
de.smartics.exceptions.report.renderer.html.AbstractHtmlLinkTagRenderer 75 7 0 3
de.smartics.exceptions.report.utils.JavadocUtils 73 7 0 8
de.smartics.exceptions.report.generator.HtmlReportGenerator 57 8 0 4
de.smartics.exceptions.report.utils.InlineJavadocTags 57 5 0 4
de.smartics.exceptions.report.renderer.html.HtmlValueTagRenderer 54 5 0 5
de.smartics.exceptions.report.renderer.JavadocRenderer 54 4 0 3
de.smartics.exceptions.report.utils.CopyReader 49 5 0 6
de.smartics.exceptions.report.generator.AbstractHtmlReportGenerator 43 5 0 6
de.smartics.exceptions.report.utils.StringFunction 43 9 0 10
de.smartics.exceptions.report.AbstractBuilder 35 6 1 4
de.smartics.exceptions.report.data.ExceptionCodeMapping 35 6 0 4
de.smartics.exceptions.report.utils.RuntimeUtils 35 6 0 7
de.smartics.exceptions.report.renderer.html.HtmlSeeTagRenderer 33 1 0 1
de.smartics.exceptions.report.renderer.html.HtmlRendererFactory 32 11 0 2
de.smartics.exceptions.report.renderer.html.Utils 32 4 0 2
de.smartics.exceptions.report.data.ExceptionCodeReportItem 31 10 0 11
de.smartics.exceptions.report.generator.AbstractOutputReportGenerator 31 13 0 14
de.smartics.exceptions.report.message.PlaceHolderInfo 31 6 1 8
de.smartics.exceptions.report.message.PlaceHolderDesc 30 10 0 10
de.smartics.exceptions.report.ReportConfiguration 28 11 0 12
de.smartics.exceptions.report.message.PlaceHolderDescId 27 8 0 9
de.smartics.exceptions.report.data.AbstractExceptionCodesReport 26 7 0 6
de.smartics.exceptions.report.generator.AbstractReportGenerator 25 7 0 8
de.smartics.exceptions.report.AddReportItemHelper 22 2 0 1
de.smartics.exceptions.report.data.ReportProblem 21 6 0 7
de.smartics.exceptions.report.GenericScannerFactory 21 4 0 1
de.smartics.exceptions.report.scan.AbstractScannerFactory 19 3 1 3
de.smartics.exceptions.report.data.ProjectConfiguration 16 15 0 16
de.smartics.exceptions.report.generator.AbstractXmlReportGenerator 15 3 0 4

TOP 30 classes containing the most methods.

Object NCSS Methods Classes Javadocs
de.smartics.exceptions.report.data.ProjectConfiguration 16 15 0 16
de.smartics.exceptions.report.data.PlaceholderInfoHandler 85 13 0 1
de.smartics.exceptions.report.generator.AbstractOutputReportGenerator 31 13 0 14
de.smartics.exceptions.report.renderer.html.HtmlRendererFactory 32 11 0 2
de.smartics.exceptions.report.ReportConfiguration 28 11 0 12
de.smartics.exceptions.report.data.ExceptionCodeReportItem 31 10 0 11
de.smartics.exceptions.report.message.PlaceHolderDesc 30 10 0 10
de.smartics.exceptions.report.renderer.RendererFactory 11 10 0 11
de.smartics.exceptions.report.utils.StringFunction 43 9 0 10
de.smartics.exceptions.report.generator.HtmlReportGenerator 57 8 0 4
de.smartics.exceptions.report.message.PlaceHolderDescId 27 8 0 9
de.smartics.exceptions.report.data.AbstractExceptionCodesReport 26 7 0 6
de.smartics.exceptions.report.generator.AbstractReportGenerator 25 7 0 8
de.smartics.exceptions.report.renderer.html.AbstractHtmlLinkTagRenderer 75 7 0 3
de.smartics.exceptions.report.utils.JavadocUtils 73 7 0 8
de.smartics.exceptions.report.AbstractBuilder 35 6 1 4
de.smartics.exceptions.report.data.ExceptionCodeMapping 35 6 0 4
de.smartics.exceptions.report.data.ReportProblem 21 6 0 7
de.smartics.exceptions.report.message.PlaceHolderInfo 31 6 1 8
de.smartics.exceptions.report.utils.RuntimeUtils 35 6 0 7
de.smartics.exceptions.report.data.ExceptionCodesReport 6 5 0 6
de.smartics.exceptions.report.generator.AbstractHtmlReportGenerator 43 5 0 6
de.smartics.exceptions.report.generator.ReportGenerator 7 5 0 6
de.smartics.exceptions.report.renderer.html.HtmlValueTagRenderer 54 5 0 5
de.smartics.exceptions.report.utils.CopyReader 49 5 0 6
de.smartics.exceptions.report.utils.InlineJavadocTags 57 5 0 4
de.smartics.exceptions.report.data.InMemoryExceptionCodesReport 10 4 0 2
de.smartics.exceptions.report.data.SourceInfo 12 4 0 5
de.smartics.exceptions.report.GenericScannerFactory 21 4 0 1
de.smartics.exceptions.report.renderer.html.Utils 32 4 0 2

Averages.

NCSS average Program NCSS Classes average Methods average Javadocs average
19.88 1,678.00 0.04 4.18 4.07

Methods

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

TOP 30 Methods containing the most NCSS.

Methods NCSS CCN Javadocs
de.smartics.exceptions.report.utils.InlineJavadocTags.iterator() 39 11 1
de.smartics.exceptions.report.renderer.html.HtmlSeeTagRenderer.render(StringBuilder,DocletTag) 32 12 0
de.smartics.exceptions.report.renderer.JavadocRenderer.renderInlineTags(JavaAnnotatedElement,StringBuilder) 26 7 0
de.smartics.exceptions.report.renderer.html.AbstractHtmlLinkTagRenderer.calcLinkTarget(DocletTag) 25 8 0
de.smartics.exceptions.report.utils.JavadocUtils.constructRelativePath(String,String) 22 10 1
de.smartics.exceptions.report.renderer.html.HtmlValueTagRenderer.render(StringBuilder,DocletTag) 20 6 0
de.smartics.exceptions.report.renderer.html.AbstractHtmlLinkTagRenderer.render(StringBuilder,DocletTag) 19 6 1
de.smartics.exceptions.report.renderer.JavadocRenderer.renderTags(JavaAnnotatedElement,StringBuilder) 19 6 0
de.smartics.exceptions.report.utils.CopyReader.parse(XMLEventReader) 19 6 1
de.smartics.exceptions.report.generator.HtmlReportGenerator.writeReportElementInfo(XMLStreamWriter,XMLStreamWriter,ExceptionCodeReportItem) 18 2 1
de.smartics.exceptions.report.renderer.html.Utils.referencedClass(DocletTag) 18 8 0
de.smartics.exceptions.report.generator.AbstractOutputReportGenerator.write(O,O,StoredExceptionCodesReport) 17 7 1
de.smartics.exceptions.report.generator.HtmlReportGenerator.writeTableHeader(XMLStreamWriter,XMLStreamWriter) 17 1 1
de.smartics.exceptions.report.renderer.html.HtmlValueTagRenderer.appendConstantValue(StringBuilder,String,JavaClass) 17 7 1
de.smartics.exceptions.report.data.ExceptionCodeMapping.calc(ClassLibrary,JavaAnnotatedElement,PlaceHolderInfo) 16 6 0
de.smartics.exceptions.report.generator.AbstractHtmlReportGenerator.writeInfoHeader(XMLStreamWriter,XMLStreamWriter,String,ExceptionCodeReportItem) 15 4 1
de.smartics.exceptions.report.utils.JavadocUtils.checkParameters(String,String) 15 11 1
de.smartics.exceptions.report.AddReportItemHelper.addReportItems(JavaClass) 14 5 0
de.smartics.exceptions.report.utils.CopyReader.copy(String) 14 5 1
de.smartics.exceptions.report.utils.JavadocUtils.split(String) 14 6 1
de.smartics.exceptions.report.generator.AbstractHtmlReportGenerator.writeHead(XMLStreamWriter,XMLStreamWriter) 13 2 1
de.smartics.exceptions.report.generator.HtmlReportGenerator.getCodeTitle(String,ExceptionCodeReportItem) 12 3 0
de.smartics.exceptions.report.utils.StringFunction.capitalize(String) 12 7 1
de.smartics.exceptions.report.data.PlaceholderInfoHandler.addMessageParam(String,MessageType,AnnotationValue) 11 3 0
de.smartics.exceptions.report.message.PlaceHolderInfo.getPlaceHolderDescs(MessageType) 11 5 1
de.smartics.exceptions.report.utils.JavadocUtils.expandJavadocUrl(String,String) 11 9 1
de.smartics.exceptions.report.data.AbstractExceptionCodesReport.checkForUniqueness(String) 10 3 0
de.smartics.exceptions.report.data.PlaceholderInfoHandler.calcComment(String,JavaClass,JavaField) 10 10 0
de.smartics.exceptions.report.generator.AbstractHtmlReportGenerator.writeContent(XMLStreamWriter,XMLStreamWriter,StoredExceptionCodesReport) 10 1 1
de.smartics.exceptions.report.renderer.html.AbstractHtmlLinkTagRenderer.getTarget(DocletTag) 10 3 0

Averages.

Program NCSS NCSS average CCN average Javadocs average
1,678.00 4.24 1.91 0.74

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