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
fr.paris.lutece.plugins.franceconnect.oidc 7 117 340 124 516 9 231
fr.paris.lutece.plugins.franceconnect.web 4 20 207 24 108 4 132
fr.paris.lutece.plugins.franceconnect.oidc.jwt 4 8 161 12 87 16 135
fr.paris.lutece.plugins.franceconnect.oidc.dataclient 3 31 109 34 117 0 99
fr.paris.lutece.plugins.franceconnect.service 4 13 80 17 71 2 132
Classes total Methods total NCSS total Javadocs Javadoc lines Single lines comment Multi lines comment
22 189 897 211 899 31 729

Objects

Objects

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

TOP 30 classes containing the most NCSS.

Object NCSS Methods Classes Javadocs
fr.paris.lutece.plugins.franceconnect.oidc.UserInfo 134 50 0 51
fr.paris.lutece.plugins.franceconnect.web.CallbackHandler 121 16 0 17
fr.paris.lutece.plugins.franceconnect.oidc.jwt.MitreJWTParser 81 1 0 2
fr.paris.lutece.plugins.franceconnect.oidc.dataclient.AbstractDataClient 65 15 0 16
fr.paris.lutece.plugins.franceconnect.oidc.IDToken 45 17 0 18
fr.paris.lutece.plugins.franceconnect.oidc.RegisteredClient 44 14 0 15
fr.paris.lutece.plugins.franceconnect.oidc.jwt.JjwtJWTParser 37 4 0 5
fr.paris.lutece.plugins.franceconnect.oidc.Token 30 11 0 12
fr.paris.lutece.plugins.franceconnect.oidc.ServerConfiguration 27 10 0 11
fr.paris.lutece.plugins.franceconnect.web.Constants 25 1 0 2
fr.paris.lutece.plugins.franceconnect.service.DataClientService 22 5 0 6
fr.paris.lutece.plugins.franceconnect.oidc.AuthServerConf 22 8 0 9
fr.paris.lutece.plugins.franceconnect.oidc.AuthClientConf 19 7 0 8
fr.paris.lutece.plugins.franceconnect.oidc.dataclient.DataClient 16 15 0 16
fr.paris.lutece.plugins.franceconnect.service.TokenService 13 3 0 4
fr.paris.lutece.plugins.franceconnect.web.OAuthLogoutServlet 12 1 0 2
fr.paris.lutece.plugins.franceconnect.web.OAuthCallbackServlet 9 2 0 3
fr.paris.lutece.plugins.franceconnect.service.BearerTokenAuthenticator 8 3 0 4
fr.paris.lutece.plugins.franceconnect.service.MapperService 8 2 0 3
fr.paris.lutece.plugins.franceconnect.oidc.jwt.TokenValidationException 6 2 0 3
fr.paris.lutece.plugins.franceconnect.oidc.dataclient.UserInfoDataClient 6 1 0 2
fr.paris.lutece.plugins.franceconnect.oidc.jwt.JWTParser 2 1 0 2

TOP 30 classes containing the most methods.

Object NCSS Methods Classes Javadocs
fr.paris.lutece.plugins.franceconnect.oidc.UserInfo 134 50 0 51
fr.paris.lutece.plugins.franceconnect.oidc.IDToken 45 17 0 18
fr.paris.lutece.plugins.franceconnect.web.CallbackHandler 121 16 0 17
fr.paris.lutece.plugins.franceconnect.oidc.dataclient.DataClient 16 15 0 16
fr.paris.lutece.plugins.franceconnect.oidc.dataclient.AbstractDataClient 65 15 0 16
fr.paris.lutece.plugins.franceconnect.oidc.RegisteredClient 44 14 0 15
fr.paris.lutece.plugins.franceconnect.oidc.Token 30 11 0 12
fr.paris.lutece.plugins.franceconnect.oidc.ServerConfiguration 27 10 0 11
fr.paris.lutece.plugins.franceconnect.oidc.AuthServerConf 22 8 0 9
fr.paris.lutece.plugins.franceconnect.oidc.AuthClientConf 19 7 0 8
fr.paris.lutece.plugins.franceconnect.service.DataClientService 22 5 0 6
fr.paris.lutece.plugins.franceconnect.oidc.jwt.JjwtJWTParser 37 4 0 5
fr.paris.lutece.plugins.franceconnect.service.BearerTokenAuthenticator 8 3 0 4
fr.paris.lutece.plugins.franceconnect.service.TokenService 13 3 0 4
fr.paris.lutece.plugins.franceconnect.service.MapperService 8 2 0 3
fr.paris.lutece.plugins.franceconnect.web.OAuthCallbackServlet 9 2 0 3
fr.paris.lutece.plugins.franceconnect.oidc.jwt.TokenValidationException 6 2 0 3
fr.paris.lutece.plugins.franceconnect.web.OAuthLogoutServlet 12 1 0 2
fr.paris.lutece.plugins.franceconnect.web.Constants 25 1 0 2
fr.paris.lutece.plugins.franceconnect.oidc.jwt.JWTParser 2 1 0 2
fr.paris.lutece.plugins.franceconnect.oidc.jwt.MitreJWTParser 81 1 0 2
fr.paris.lutece.plugins.franceconnect.oidc.dataclient.UserInfoDataClient 6 1 0 2

Averages.

NCSS average Program NCSS Classes average Methods average Javadocs average
34.18 897.00 0.00 8.59 9.59

Methods

Methods

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

TOP 30 Methods containing the most NCSS.

Methods NCSS CCN Javadocs
fr.paris.lutece.plugins.franceconnect.oidc.jwt.MitreJWTParser.parseJWT(Token,AuthClientConf,AuthServerConf,String,Logger) 79 45 1
fr.paris.lutece.plugins.franceconnect.oidc.jwt.JjwtJWTParser.parseJWT(Token,AuthClientConf,AuthServerConf,String,Logger) 23 7 1
fr.paris.lutece.plugins.franceconnect.web.CallbackHandler.handleAuthorizationRequest(HttpServletRequest,HttpServletResponse) 22 3 1
fr.paris.lutece.plugins.franceconnect.web.CallbackHandler.handleAuthorizationCodeResponse(HttpServletRequest,HttpServletResponse) 22 6 1
fr.paris.lutece.plugins.franceconnect.web.CallbackHandler.getToken(String,HttpSession) 15 2 1
fr.paris.lutece.plugins.franceconnect.oidc.dataclient.AbstractDataClient.getAcrValues() 12 6 1
fr.paris.lutece.plugins.franceconnect.web.CallbackHandler.handle(HttpServletRequest,HttpServletResponse) 10 3 1
fr.paris.lutece.plugins.franceconnect.oidc.dataclient.AbstractDataClient.getScopes() 10 3 1
fr.paris.lutece.plugins.franceconnect.oidc.dataclient.AbstractDataClient.getData(Token) 10 2 1
fr.paris.lutece.plugins.franceconnect.oidc.RegisteredClient.getScopes() 10 3 1
fr.paris.lutece.plugins.franceconnect.web.OAuthLogoutServlet.service(HttpServletRequest,HttpServletResponse) 9 2 1
fr.paris.lutece.plugins.franceconnect.web.CallbackHandler.checkState(HttpServletRequest) 8 3 1
fr.paris.lutece.plugins.franceconnect.web.CallbackHandler.handleError(HttpServletRequest,HttpServletResponse,String) 7 2 1
fr.paris.lutece.plugins.franceconnect.oidc.UserInfo.setAddressObject(Object) 7 1 1
fr.paris.lutece.plugins.franceconnect.oidc.jwt.JjwtJWTParser.getVerifiedNonce(Claims,String) 7 5 1
fr.paris.lutece.plugins.franceconnect.service.TokenService.parse(String,AuthClientConf,AuthServerConf,String) 6 1 1
fr.paris.lutece.plugins.franceconnect.web.CallbackHandler.getStoredSessionString(HttpSession,String) 6 4 1
fr.paris.lutece.plugins.franceconnect.service.DataClientService.instance() 5 2 1
fr.paris.lutece.plugins.franceconnect.service.DataClientService.initClients() 5 2 1
fr.paris.lutece.plugins.franceconnect.web.CallbackHandler.traceMap(String) 5 2 1
fr.paris.lutece.plugins.franceconnect.oidc.dataclient.UserInfoDataClient.handleToken(Token,HttpServletRequest,HttpServletResponse) 5 2 1
fr.paris.lutece.plugins.franceconnect.service.DataClientService.getDataClientUrl(String) 4 1 1
fr.paris.lutece.plugins.franceconnect.web.CallbackHandler.createNonce(HttpSession) 4 1 1
fr.paris.lutece.plugins.franceconnect.web.CallbackHandler.createState(HttpSession) 4 1 1
fr.paris.lutece.plugins.franceconnect.oidc.IDToken.toString() 4 1 1
fr.paris.lutece.plugins.franceconnect.oidc.Token.toString() 4 1 1
fr.paris.lutece.plugins.franceconnect.web.OAuthCallbackServlet.service(HttpServletRequest,HttpServletResponse) 3 1 1
fr.paris.lutece.plugins.franceconnect.web.OAuthCallbackServlet.getConfiguration() 3 2 1
fr.paris.lutece.plugins.franceconnect.oidc.jwt.JjwtJWTParser.getExpiration(Claims) 3 1 1
fr.paris.lutece.plugins.franceconnect.oidc.jwt.JjwtJWTParser.getIssueAt(Claims) 3 1 1

Averages.

Program NCSS NCSS average CCN average Javadocs average
897.00 3.24 1.46 1.00

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