awslabs / aws-postgresql-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 2,927 units with 31,154 lines of code in units (45.9% of code).
    • 4 very complex units (875 lines of code)
    • 15 complex units (1,675 lines of code)
    • 67 medium complex units (3,462 lines of code)
    • 168 simple units (4,420 lines of code)
    • 2,673 very simple units (20,722 lines of code)
2% | 5% | 11% | 14% | 66%
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
java2% | 5% | 11% | 13% | 66%
groovy0% | 0% | 0% | 37% | 62%
pl0% | 0% | 0% | 0% | 100%
kt0% | 0% | 0% | 0% | 100%
kts0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
pgjdbc/src2% | 5% | 11% | 13% | 66%
benchmarks/src0% | 0% | 5% | 11% | 82%
test-gss/src0% | 0% | 0% | 37% | 62%
ROOT0% | 0% | 0% | 0% | 100%
buildSrc/src0% | 0% | 0% | 0% | 100%
pgjdbc0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
public static List parseJdbcSql()
in pgjdbc/src/main/java/org/postgresql/core/Parser.java
218 87 6
protected void processResults()
in pgjdbc/src/main/java/org/postgresql/core/v3/QueryExecutorImpl.java
297 77 3
public static JdbcCallParseInfo modifyJdbcCall()
in pgjdbc/src/main/java/org/postgresql/core/Parser.java
181 64 5
public void setObject()
in pgjdbc/src/main/java/org/postgresql/jdbc/PgPreparedStatement.java
179 53 4
public static Number numeric()
in pgjdbc/src/main/java/org/postgresql/util/ByteConverter.java
170 45 3
public ResultSet getColumns()
in pgjdbc/src/main/java/org/postgresql/jdbc/PgDatabaseMetaData.java
165 36 4
public void setNull()
in pgjdbc/src/main/java/org/postgresql/jdbc/PgPreparedStatement.java
78 34 2
private void sendBind()
in pgjdbc/src/main/java/org/postgresql/core/v3/QueryExecutorImpl.java
91 33 4
public int getDisplaySize()
in pgjdbc/src/main/java/org/postgresql/jdbc/TypeInfoCache.java
79 33 2
private void doAuthentication()
in pgjdbc/src/main/java/org/postgresql/core/v3/ConnectionFactoryImpl.java
158 32 4
static PgArrayList buildArrayList()
in pgjdbc/src/main/java/org/postgresql/jdbc/ArrayDecoding.java
77 32 2
public void setObject()
in pgjdbc/src/main/java/org/postgresql/jdbc/PgPreparedStatement.java
72 32 2
public ResultSet getProcedureColumns()
in pgjdbc/src/main/java/org/postgresql/jdbc/PgDatabaseMetaData.java
175 28 4
private static int parseSql()
in pgjdbc/src/main/java/org/postgresql/core/Parser.java
95 27 5
public ResultSet getFunctionColumns()
in pgjdbc/src/main/java/org/postgresql/jdbc/PgDatabaseMetaData.java
173 27 4
public boolean verify()
in pgjdbc/src/main/java/org/postgresql/ssl/PGjdbcHostnameVerifier.java
107 27 2
public int tokenize()
in pgjdbc/src/main/java/org/postgresql/util/PGtokenizer.java
45 26 2
private void sendOneQuery()
in pgjdbc/src/main/java/org/postgresql/core/v3/QueryExecutorImpl.java
64 26 5
public QueryExecutor openConnectionImpl()
in pgjdbc/src/main/java/org/postgresql/core/v3/ConnectionFactoryImpl.java
126 26 4
public int getPrecision()
in pgjdbc/src/main/java/org/postgresql/jdbc/TypeInfoCache.java
48 25 2