awslabs / aws-mysql-jdbc
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 5,655 units with 50,216 lines of code in units (72.6% of code).
    • 11 very complex units (2,041 lines of code)
    • 26 complex units (2,359 lines of code)
    • 154 medium complex units (7,895 lines of code)
    • 285 simple units (7,424 lines of code)
    • 5,179 very simple units (30,497 lines of code)
4% | 4% | 15% | 14% | 60%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
java4% | 4% | 15% | 14% | 60%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/main/core-impl11% | 2% | 16% | 18% | 51%
src/main/user-impl1% | 5% | 16% | 11% | 64%
src/main/core-api7% | 6% | 11% | 15% | 59%
src/main/protocol-impl1% | 4% | 18% | 20% | 55%
src/build/java0% | 0% | 0% | 14% | 85%
src/main/user-api0% | 0% | 0% | 0% | 100%
src/legacy/java0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
public void setObject()
in src/main/core-impl/java/com/mysql/cj/AbstractQueryBindings.java
668 314 4
public static boolean supportsConvert()
in src/main/core-api/java/com/mysql/cj/MysqlType.java
119 82 2
public static MysqlType getByName()
in src/main/core-api/java/com/mysql/cj/MysqlType.java
107 80 1
public static MysqlType findMysqlType()
in src/main/protocol-impl/java/com/mysql/cj/protocol/a/NativeProtocol.java
109 74 8
private T decodeAndCreateReturnValue()
in src/main/core-impl/java/com/mysql/cj/protocol/result/AbstractResultsetRow.java
111 73 5
private static int indexOfNextChar()
in src/main/core-api/java/com/mysql/cj/util/StringUtils.java
102 67 7
public Object getObject()
in src/main/user-impl/java/com/mysql/cj/jdbc/result/ResultSetImpl.java
135 64 1
public ParseInfo()
in src/main/core-api/java/com/mysql/cj/ParseInfo.java
151 61 4
void lex()
in src/main/user-impl/java/com/mysql/cj/xdevapi/ExprParser.java
175 59 0
private void getCallStmtParameterTypes()
in src/main/user-impl/java/com/mysql/cj/jdbc/DatabaseMetaData.java
203 53 6
public boolean configureClientCharacterSet()
in src/main/core-impl/java/com/mysql/cj/NativeSession.java
161 52 1
Expr atomicExpr()
in src/main/user-impl/java/com/mysql/cj/xdevapi/ExprParser.java
138 48 0
public Object getObjectStoredProc()
in src/main/user-impl/java/com/mysql/cj/jdbc/result/ResultSetImpl.java
89 47 2
public static String stripComments()
in src/main/core-api/java/com/mysql/cj/util/StringUtils.java
69 43 7
public T getObject()
in src/main/user-impl/java/com/mysql/cj/jdbc/result/ResultSetImpl.java
102 42 2
public static MysqlType getByJdbcType()
in src/main/core-api/java/com/mysql/cj/MysqlType.java
67 40 1
public void beforeHandshake()
in src/main/protocol-impl/java/com/mysql/cj/protocol/x/XProtocol.java
118 39 0
void forEach()
in src/main/user-impl/java/com/mysql/cj/jdbc/DatabaseMetaData.java
140 37 1
public static final String getDateTimePattern()
in src/main/core-api/java/com/mysql/cj/util/TimeUtil.java
123 37 2
private void setParamValue()
in src/main/user-impl/java/com/mysql/cj/jdbc/result/UpdatableResultSet.java
66 35 5