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.issues.bugzilla 28 179 956 207 1688 314 509
de.smartics.maven.issues 14 142 687 145 1800 152 459
de.smartics.maven.issues.cache 9 56 449 65 447 96 304
de.smartics.maven.issues.util 4 25 198 29 221 44 120
de.smartics.maven.issues.repository 2 22 180 24 185 13 48
de.smartics.maven.issues.notes 1 4 62 5 33 16 36
de.smartics.maven.issues.factory 1 3 17 4 25 11 37
Classes total Methods total NCSS total Javadocs Javadoc lines Single lines comment Multi lines comment
59 431 2549 479 4399 646 1513

Objects

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

TOP 30 classes containing the most NCSS.

Object NCSS Methods Classes Javadocs
de.smartics.maven.issues.RendererConfig 200 23 1 52
de.smartics.maven.issues.cache.XmlTaskReader 170 17 0 18
de.smartics.maven.issues.repository.AbstractRepositoryFacade 150 20 1 24
de.smartics.maven.issues.AbstractIssuesConnectionMojo 114 12 0 11
de.smartics.maven.issues.RendererConfig.Builder 105 27 0 27
de.smartics.maven.issues.AbstractIssuesReportMojo 101 21 0 22
de.smartics.maven.issues.bugzilla.AbstractIssuesReportRenderer 98 12 0 13
de.smartics.maven.issues.bugzilla.BugzillaQueryData 94 28 0 29
de.smartics.maven.issues.bugzilla.BugzillaVersionRange 75 13 0 14
de.smartics.maven.issues.IssueManagementConfig 69 25 0 26
de.smartics.maven.issues.bugzilla.AbstractSectionReportRenderer 63 10 0 11
de.smartics.maven.issues.util.ReportReferenceExtractor 63 8 0 9
de.smartics.maven.issues.bugzilla.ReportHelper 61 12 0 13
de.smartics.maven.issues.util.Utils 60 6 0 7
de.smartics.maven.issues.cache.XmlTaskWriter 59 9 0 10
de.smartics.maven.issues.AbstractReportMojo 53 9 0 10
de.smartics.maven.issues.bugzilla.VersionedSectionReportRenderer 52 13 0 14
de.smartics.maven.issues.bugzilla.AbstractBugzillaReportMojo 51 12 0 13
de.smartics.maven.issues.cache.AbstractFileTaskDataStore 51 10 0 11
de.smartics.maven.issues.notes.NotesReader 43 4 0 5
de.smartics.maven.issues.bugzilla.VersionedSectioner 42 5 0 6
de.smartics.maven.issues.bugzilla.Versions 41 4 2 13
de.smartics.maven.issues.util.ReportReference 39 9 0 10
de.smartics.maven.issues.bugzilla.Sections 35 5 2 14
de.smartics.maven.issues.cache.TaskDataCache 34 5 0 6
de.smartics.maven.issues.cache.XmlTaskDataStore 32 3 0 4
de.smartics.maven.issues.bugzilla.TabularReportMojo 23 8 0 9
de.smartics.maven.issues.VersionType 23 8 0 0
de.smartics.maven.issues.bugzilla.SimpleSectioner 22 2 0 3
de.smartics.maven.issues.bugzilla.TabularReportRenderer 21 5 0 6

TOP 30 classes containing the most methods.

Object NCSS Methods Classes Javadocs
de.smartics.maven.issues.bugzilla.BugzillaQueryData 94 28 0 29
de.smartics.maven.issues.RendererConfig.Builder 105 27 0 27
de.smartics.maven.issues.IssueManagementConfig 69 25 0 26
de.smartics.maven.issues.RendererConfig 200 23 1 52
de.smartics.maven.issues.AbstractIssuesReportMojo 101 21 0 22
de.smartics.maven.issues.repository.AbstractRepositoryFacade 150 20 1 24
de.smartics.maven.issues.cache.XmlTaskReader 170 17 0 18
de.smartics.maven.issues.bugzilla.BugzillaVersionRange 75 13 0 14
de.smartics.maven.issues.bugzilla.VersionedSectionReportRenderer 52 13 0 14
de.smartics.maven.issues.AbstractIssuesConnectionMojo 114 12 0 11
de.smartics.maven.issues.bugzilla.AbstractBugzillaReportMojo 51 12 0 13
de.smartics.maven.issues.bugzilla.AbstractIssuesReportRenderer 98 12 0 13
de.smartics.maven.issues.bugzilla.ReportHelper 61 12 0 13
de.smartics.maven.issues.bugzilla.AbstractSectionReportRenderer 63 10 0 11
de.smartics.maven.issues.cache.AbstractFileTaskDataStore 51 10 0 11
de.smartics.maven.issues.AbstractReportMojo 53 9 0 10
de.smartics.maven.issues.cache.XmlTaskWriter 59 9 0 10
de.smartics.maven.issues.util.ReportReference 39 9 0 10
de.smartics.maven.issues.bugzilla.TabularReportMojo 23 8 0 9
de.smartics.maven.issues.bugzilla.VersionedSectionReleasePlanReportRenderer 17 8 0 9
de.smartics.maven.issues.util.ReportReferenceExtractor 63 8 0 9
de.smartics.maven.issues.VersionType 23 8 0 0
de.smartics.maven.issues.bugzilla.BugzillaReleasePlanReportMojo 20 7 0 8
de.smartics.maven.issues.bugzilla.BugzillaSectionReportMojo 17 6 0 7
de.smartics.maven.issues.cache.TaskWriter 7 6 0 7
de.smartics.maven.issues.util.Utils 60 6 0 7
de.smartics.maven.issues.bugzilla.Sections 35 5 2 14
de.smartics.maven.issues.bugzilla.TabularReportRenderer 21 5 0 6
de.smartics.maven.issues.bugzilla.VersionedSectioner 42 5 0 6
de.smartics.maven.issues.cache.TaskDataCache 34 5 0 6

Averages.

NCSS average Program NCSS Classes average Methods average Javadocs average
38.88 2,549.00 0.10 7.31 8.81

Methods

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

TOP 30 Methods containing the most NCSS.

Methods NCSS CCN Javadocs
de.smartics.maven.issues.bugzilla.VersionedSectionReportRenderer.renderBody() 26 4 1
de.smartics.maven.issues.repository.AbstractRepositoryFacade.fetchTaskData(SimpleTaskDataCollector) 24 8 1
de.smartics.maven.issues.AbstractIssuesReportMojo.createRenderConfig(Locale,VersionFactory,ArtifactVersionRange) 23 2 1
de.smartics.maven.issues.AbstractReportMojo.provideSink() 21 9 1
de.smartics.maven.issues.RendererConfig.RendererConfig(Builder) 21 1 1
de.smartics.maven.issues.cache.XmlTaskReader.provideMetaData(TaskAttribute) 20 7 1
de.smartics.maven.issues.notes.NotesReader.extractContent(Node) 20 6 1
de.smartics.maven.issues.cache.XmlTaskReader.provideOptions(TaskAttribute) 19 7 1
de.smartics.maven.issues.AbstractIssuesConnectionMojo.executeReport(Locale) 18 5 1
de.smartics.maven.issues.bugzilla.VersionedSectioner.run() 18 6 1
de.smartics.maven.issues.repository.AbstractRepositoryFacade.runQuery(QueryData,SimpleTaskDataCollector) 18 7 1
de.smartics.maven.issues.util.Utils.normalizeKey(String) 18 7 1
de.smartics.maven.issues.bugzilla.AbstractIssuesReportRenderer.renderTableHeader() 17 3 1
de.smartics.maven.issues.bugzilla.AbstractIssuesReportRenderer.renderTableRow(TaskData) 17 5 1
de.smartics.maven.issues.util.ReportReferenceExtractor.createReportReferenceInstance(Xpp3Dom) 17 7 1
de.smartics.maven.issues.bugzilla.AbstractSectionReportRenderer.renderSections(Sections) 16 5 1
de.smartics.maven.issues.bugzilla.BugzillaVersionRange.appendToUrl(StringBuilder) 16 6 1
de.smartics.maven.issues.cache.XmlTaskReader.provideValues(TaskAttribute) 16 6 1
de.smartics.maven.issues.AbstractIssuesConnectionMojo.createIssueManagementConfig() 15 1 1
de.smartics.maven.issues.AbstractIssuesReportMojo.createRenderer(Locale,VersionFactory,ArtifactVersionRange,TaskData) 15 6 1
de.smartics.maven.issues.bugzilla.AbstractIssuesReportRenderer.renderDescription(boolean) 15 5 1
de.smartics.maven.issues.cache.XmlTaskDataStore.writeTask(OutputStream,TaskData) 15 4 1
de.smartics.maven.issues.cache.XmlTaskReader.readNextInformation(TaskAttribute,String) 15 6 1
de.smartics.maven.issues.repository.AbstractRepositoryFacade.setAuthenicationInformation(TaskRepository) 15 7 1
de.smartics.maven.issues.bugzilla.AbstractBugzillaReportMojo.createQueryData(ArtifactVersionRange) 14 1 1
de.smartics.maven.issues.bugzilla.BugzillaQueryData.createUrl(String) 14 6 1
de.smartics.maven.issues.cache.XmlTaskReader.createTaskData(String) 14 5 1
de.smartics.maven.issues.notes.NotesReader.read(InputStream) 14 6 1
de.smartics.maven.issues.RendererConfig.Builder.build() 14 6 1
de.smartics.maven.issues.repository.AbstractRepositoryFacade.fetchTaskData(TaskDataCache,TaskData,int) 14 8 1

Averages.

Program NCSS NCSS average CCN average Javadocs average
2,549.00 4.32 1.96 0.98

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