Fork me on GitHub

JavaNCSS Metric Results

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

The following document contains the results of a JavaNCSS metric analysis, using JavaNCSS version 33.54.
JavaNCSS web site.

Packages

Packages

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

Packages sorted by NCSS.

Package Classes Methods NCSS Javadocs Javadoc lines Single lines comment Multi lines comment
org.apache.chemistry.opencmis.server.impl.atompub 19 157 2331 131 413 280 346
org.apache.chemistry.opencmis.server.impl.browser 13 95 1674 59 179 132 240
org.apache.chemistry.opencmis.server.impl.webservices 14 59 1025 16 48 15 252
fr.paris.lutece.plugins.document.modules.cmis.service 6 59 797 57 325 46 221
org.apache.chemistry.opencmis.server.shared 6 31 371 26 90 10 111
org.apache.chemistry.opencmis.server.impl 3 17 113 5 15 8 54
org.apache.chemistry.opencmis.server.impl.dummy 2 11 73 2 6 3 36
org.apache.chemistry.opencmis.server.filter 2 8 64 1 4 2 36
fr.paris.lutece.plugins.document.modules.cmis.web 4 7 46 4 16 0 132
Classes total Methods total NCSS total Javadocs Javadoc lines Single lines comment Multi lines comment
69 444 6494 301 1096 496 1428

Objects

Objects

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

TOP 30 classes containing the most NCSS.

Object NCSS Methods Classes Javadocs
org.apache.chemistry.opencmis.server.impl.atompub.AtomEntryParser 307 22 0 22
fr.paris.lutece.plugins.document.modules.cmis.service.DocumentRepository 298 13 0 11
fr.paris.lutece.plugins.document.modules.cmis.service.TypeManager 265 14 0 11
org.apache.chemistry.opencmis.server.impl.browser.ObjectService 239 17 0 17
org.apache.chemistry.opencmis.server.impl.browser.BrowserBindingUtils 235 22 1 10
org.apache.chemistry.opencmis.server.impl.browser.CmisBrowserBindingServlet 219 5 0 2
org.apache.chemistry.opencmis.server.impl.atompub.ObjectService 218 13 0 13
org.apache.chemistry.opencmis.server.impl.atompub.NavigationService 215 6 0 6
org.apache.chemistry.opencmis.server.impl.webservices.ObjectService 187 17 0 1
org.apache.chemistry.opencmis.server.impl.atompub.AtomPubUtils 169 9 0 10
org.apache.chemistry.opencmis.server.impl.atompub.RepositoryService 161 5 0 6
org.apache.chemistry.opencmis.server.impl.atompub.CmisAtomPubServlet 151 5 0 4
org.apache.chemistry.opencmis.server.impl.atompub.AtomDocumentBase 143 42 0 17
org.apache.chemistry.opencmis.server.shared.ThresholdOutputStream 135 11 3 7
org.apache.chemistry.opencmis.server.impl.atompub.DiscoveryService 125 4 0 3
org.apache.chemistry.opencmis.server.impl.browser.POSTHttpServletRequestWrapper 99 11 0 0
org.apache.chemistry.opencmis.server.shared.HttpUtils 98 9 0 9
org.apache.chemistry.opencmis.server.impl.webservices.AbstractUsernameTokenAuthHandler 97 1 5 0
org.apache.chemistry.opencmis.server.impl.browser.NavigationService 95 7 0 7
org.apache.chemistry.opencmis.server.impl.webservices.AbstractService 94 5 0 6
org.apache.chemistry.opencmis.server.impl.browser.ControlParser 92 10 0 1
fr.paris.lutece.plugins.document.modules.cmis.service.BaseRepository 84 12 0 13
org.apache.chemistry.opencmis.server.impl.webservices.VersioningService 69 6 0 1
org.apache.chemistry.opencmis.server.impl.atompub.PolicyService 66 5 0 5
org.apache.chemistry.opencmis.server.impl.webservices.NavigationService 65 6 0 1
org.apache.chemistry.opencmis.server.impl.browser.RepositoryService 64 7 0 5
org.apache.chemistry.opencmis.server.impl.atompub.AtomFeed 59 9 0 10
org.apache.chemistry.opencmis.server.impl.atompub.AtomEntry 57 8 0 9
org.apache.chemistry.opencmis.server.impl.atompub.VersioningService 57 4 0 4
org.apache.chemistry.opencmis.server.impl.browser.VersioningService 55 5 0 5

TOP 30 classes containing the most methods.

Object NCSS Methods Classes Javadocs
org.apache.chemistry.opencmis.server.impl.atompub.AtomDocumentBase 143 42 0 17
org.apache.chemistry.opencmis.server.impl.browser.BrowserBindingUtils 235 22 1 10
org.apache.chemistry.opencmis.server.impl.atompub.AtomEntryParser 307 22 0 22
org.apache.chemistry.opencmis.server.impl.browser.ObjectService 239 17 0 17
org.apache.chemistry.opencmis.server.impl.webservices.ObjectService 187 17 0 1
fr.paris.lutece.plugins.document.modules.cmis.service.TypeManager 265 14 0 11
org.apache.chemistry.opencmis.server.impl.CallContextImpl 34 14 0 3
fr.paris.lutece.plugins.document.modules.cmis.service.DocumentRepository 298 13 0 11
org.apache.chemistry.opencmis.server.impl.atompub.ObjectService 218 13 0 13
fr.paris.lutece.plugins.document.modules.cmis.service.BaseRepository 84 12 0 13
fr.paris.lutece.plugins.document.modules.cmis.service.DocumentCmisService 33 11 0 12
org.apache.chemistry.opencmis.server.impl.browser.POSTHttpServletRequestWrapper 99 11 0 0
org.apache.chemistry.opencmis.server.shared.ThresholdOutputStream 135 11 3 7
org.apache.chemistry.opencmis.server.impl.browser.ControlParser 92 10 0 1
org.apache.chemistry.opencmis.server.impl.atompub.AtomPubUtils 169 9 0 10
org.apache.chemistry.opencmis.server.impl.atompub.AtomFeed 59 9 0 10
org.apache.chemistry.opencmis.server.shared.HttpUtils 98 9 0 9
fr.paris.lutece.plugins.document.modules.cmis.service.RepositoryObject 38 8 0 8
org.apache.chemistry.opencmis.server.impl.dummy.DummyService 28 8 0 1
org.apache.chemistry.opencmis.server.impl.atompub.AtomEntry 57 8 0 9
org.apache.chemistry.opencmis.server.impl.browser.NavigationService 95 7 0 7
org.apache.chemistry.opencmis.server.impl.browser.RepositoryService 64 7 0 5
org.apache.chemistry.opencmis.server.impl.atompub.ServiceDocument 28 7 0 1
org.apache.chemistry.opencmis.server.impl.webservices.NavigationService 65 6 0 1
org.apache.chemistry.opencmis.server.impl.webservices.VersioningService 69 6 0 1
org.apache.chemistry.opencmis.server.impl.atompub.XMLDocumentBase 29 6 0 7
org.apache.chemistry.opencmis.server.impl.atompub.NavigationService 215 6 0 6
org.apache.chemistry.opencmis.server.impl.browser.VersioningService 55 5 0 5
org.apache.chemistry.opencmis.server.impl.browser.CmisBrowserBindingServlet 219 5 0 2
org.apache.chemistry.opencmis.server.impl.webservices.RepositoryService 53 5 0 1

Averages.

NCSS average Program NCSS Classes average Methods average Javadocs average
74.80 6,494.00 0.13 6.43 4.36

Methods

Methods

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

TOP 30 Methods containing the most NCSS.

Methods NCSS CCN Javadocs
org.apache.chemistry.opencmis.server.impl.atompub.DiscoveryService.query(CallContext,CmisService,String,HttpServletRequest,HttpServletResponse) 72 15 1
fr.paris.lutece.plugins.document.modules.cmis.service.TypeManager.setup() 71 1 1
org.apache.chemistry.opencmis.server.impl.atompub.RepositoryService.getRepositories(CallContext,CmisService,HttpServletRequest,HttpServletResponse) 68 20 1
fr.paris.lutece.plugins.document.modules.cmis.service.DocumentRepository.compileProperties(RepositoryObject,String,ObjectInfoImpl,String) 66 13 0
org.apache.chemistry.opencmis.server.impl.browser.CmisBrowserBindingServlet.dispatch(CallContext,HttpServletRequest,HttpServletResponse) 66 26 0
org.apache.chemistry.opencmis.server.impl.atompub.AtomPubUtils.writeObjectEntry(CmisService,AtomEntry,ObjectData,ObjectInFolderContainer,String,String,String,UrlBuilder,boolean) 62 27 1
org.apache.chemistry.opencmis.server.impl.browser.CmisBrowserBindingServlet.init(ServletConfig) 61 5 0
fr.paris.lutece.plugins.document.modules.cmis.service.DocumentRepository.getInfos() 60 2 1
org.apache.chemistry.opencmis.server.impl.atompub.NavigationService.getChildren(CallContext,CmisService,String,HttpServletRequest,HttpServletResponse) 60 17 1
org.apache.chemistry.opencmis.server.impl.browser.BrowserBindingUtils.createPropertyData(PropertyDefinition,Object) 59 23 0
org.apache.chemistry.opencmis.server.impl.browser.POSTHttpServletRequestWrapper.POSTHttpServletRequestWrapper(HttpServletRequest,File,int) 54 16 0
org.apache.chemistry.opencmis.server.impl.atompub.NavigationService.getCheckedOutDocs(CallContext,CmisService,String,HttpServletRequest,HttpServletResponse) 52 9 1
org.apache.chemistry.opencmis.server.shared.HttpUtils.createContext(HttpServletRequest,HttpServletResponse,ServletContext,String,CallContextHandler,File,int) 49 17 1
org.apache.chemistry.opencmis.server.impl.webservices.AbstractService.convertException(Exception) 48 16 1
fr.paris.lutece.plugins.document.modules.cmis.service.DocumentRepository.getChildren(CallContext,String,String,String,Boolean,IncludeRelationships,String,Boolean,BigInteger,BigInteger,ExtensionsData,ObjectInfoHandler) 45 16 1
org.apache.chemistry.opencmis.server.impl.atompub.CmisAtomPubServlet.init(ServletConfig) 45 5 0
org.apache.chemistry.opencmis.server.impl.atompub.RepositoryService.getTypeChildren(CallContext,CmisService,String,HttpServletRequest,HttpServletResponse) 45 10 1
fr.paris.lutece.plugins.document.modules.cmis.service.TypeManager.createPropDef(String,String,String,PropertyType,Cardinality,Updatability,boolean,boolean) 42 10 1
org.apache.chemistry.opencmis.server.impl.atompub.RelationshipService.getObjectRelationships(CallContext,CmisService,String,HttpServletRequest,HttpServletResponse) 38 7 1
org.apache.chemistry.opencmis.server.impl.browser.CmisBrowserBindingServlet.getErrorCode(CmisBaseException) 37 25 1
org.apache.chemistry.opencmis.server.impl.atompub.DiscoveryService.getContentChanges(CallContext,CmisService,String,HttpServletRequest,HttpServletResponse) 37 7 1
org.apache.chemistry.opencmis.server.impl.atompub.CmisAtomPubServlet.getErrorCode(CmisBaseException) 37 25 1
org.apache.chemistry.opencmis.server.impl.atompub.RepositoryService.getTypeDescendants(CallContext,CmisService,String,HttpServletRequest,HttpServletResponse) 37 9 1
fr.paris.lutece.plugins.document.modules.cmis.service.BaseRepository.addPropertyDefault(PropertiesImpl,PropertyDefinition) 36 18 1
org.apache.chemistry.opencmis.server.impl.atompub.NavigationService.getDescendants(CallContext,CmisService,String,HttpServletRequest,HttpServletResponse) 36 11 1
org.apache.chemistry.opencmis.server.impl.atompub.NavigationService.getFolderTree(CallContext,CmisService,String,HttpServletRequest,HttpServletResponse) 36 11 1
fr.paris.lutece.plugins.document.modules.cmis.service.TypeManager.getTypesChildren(CallContext,String,boolean,BigInteger,BigInteger) 35 18 1
org.apache.chemistry.opencmis.server.impl.browser.BrowserBindingUtils.createProperties(ControlParser,String,TypeCache) 35 17 0
org.apache.chemistry.opencmis.server.impl.atompub.AtomEntryParser.parseEntry(XMLStreamReader) 35 15 1
org.apache.chemistry.opencmis.server.impl.atompub.AtomEntryParser.parseAtomContent(XMLStreamReader) 35 15 1

Averages.

Program NCSS NCSS average CCN average Javadocs average
6,494.00 10.01 3.60 0.49

Explanations

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