corretto / hotpatch-for-apache-log4j2
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 514 units with 8,416 lines of code in units (80.1% of code).
    • 2 very complex units (1,402 lines of code)
    • 8 complex units (1,143 lines of code)
    • 35 medium complex units (1,937 lines of code)
    • 41 simple units (949 lines of code)
    • 428 very simple units (2,985 lines of code)
16% | 13% | 23% | 11% | 35%
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
java16% | 13% | 23% | 11% | 35%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
java/com/amazon/corretto/hotpatch/org/objectweb/asm17% | 14% | 21% | 11% | 35%
java/com/amazon/corretto/hotpatch/org/objectweb/asm/signature0% | 0% | 42% | 4% | 53%
java0% | 0% | 55% | 20% | 23%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
private void readCode()
in src/main/java/com/amazon/corretto/hotpatch/org/objectweb/asm/ClassReader.java
978 532 3
void execute()
in src/main/java/com/amazon/corretto/hotpatch/org/objectweb/asm/Frame.java
424 191 4
public void accept()
in src/main/java/com/amazon/corretto/hotpatch/org/objectweb/asm/ClassReader.java
237 50 3
void putMethodInfo()
in src/main/java/com/amazon/corretto/hotpatch/org/objectweb/asm/MethodWriter.java
194 43 1
private int readMethod()
in src/main/java/com/amazon/corretto/hotpatch/org/objectweb/asm/ClassReader.java
208 38 3
private int readElementValue()
in src/main/java/com/amazon/corretto/hotpatch/org/objectweb/asm/ClassReader.java
167 36 4
public int getOpcode()
in src/main/java/com/amazon/corretto/hotpatch/org/objectweb/asm/Type.java
61 33 1
public void visitFrame()
in src/main/java/com/amazon/corretto/hotpatch/org/objectweb/asm/MethodWriter.java
117 28 5
public void visit()
in src/main/java/com/amazon/corretto/hotpatch/org/objectweb/asm/AnnotationWriter.java
71 26 2
private void putFrame()
in src/main/java/com/amazon/corretto/hotpatch/org/objectweb/asm/MethodWriter.java
88 26 0
private static int parseType()
in src/main/java/com/amazon/corretto/hotpatch/org/objectweb/asm/signature/SignatureReader.java
76 25 3
private int readTypeAnnotationTarget()
in src/main/java/com/amazon/corretto/hotpatch/org/objectweb/asm/ClassReader.java
68 25 2
private static int getAbstractTypeFromDescriptor()
in src/main/java/com/amazon/corretto/hotpatch/org/objectweb/asm/Frame.java
64 22 3
static void putTarget()
in src/main/java/com/amazon/corretto/hotpatch/org/objectweb/asm/TypeReference.java
34 21 2
private int readField()
in src/main/java/com/amazon/corretto/hotpatch/org/objectweb/asm/ClassReader.java
133 21 3
private static boolean merge()
in src/main/java/com/amazon/corretto/hotpatch/org/objectweb/asm/Frame.java
60 20 4
int computeMethodInfoSize()
in src/main/java/com/amazon/corretto/hotpatch/org/objectweb/asm/MethodWriter.java
87 20 0
public void visitVarInsn()
in src/main/java/com/amazon/corretto/hotpatch/org/objectweb/asm/MethodWriter.java
50 19 2
public void visitJumpInsn()
in src/main/java/com/amazon/corretto/hotpatch/org/objectweb/asm/MethodWriter.java
64 18 2
private void computeMaxStackAndLocal()
in src/main/java/com/amazon/corretto/hotpatch/org/objectweb/asm/MethodWriter.java
72 18 0