GerritCodeReview / java-prettify
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 205 units with 2,430 lines of code in units (75.0% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 5 medium complex units (432 lines of code)
    • 9 simple units (200 lines of code)
    • 191 very simple units (1,798 lines of code)
0% | 0% | 17% | 8% | 73%
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
java0% | 0% | 17% | 8% | 73%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
prettify/parser0% | 0% | 42% | 14% | 43%
syntaxhighlight0% | 0% | 13% | 10% | 75%
prettify/lang0% | 0% | 0% | 0% | 100%
prettify/theme0% | 0% | 0% | 0% | 100%
prettify/example0% | 0% | 0% | 0% | 100%
prettify0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
protected String allowAnywhereFoldCaseAndRenumberGroups()
in src/prettify/parser/CombinePrefixPattern.java
77 25 1
public SyntaxHighlighterPane()
in src/syntaxhighlight/SyntaxHighlighterPane.java
132 23 0
protected static String caseFoldCharset()
in src/prettify/parser/CombinePrefixPattern.java
67 18 1
public void decorate()
in src/prettify/parser/Prettify.java
69 16 1
protected CreateSimpleLexer sourceDecorator()
in src/prettify/parser/Prettify.java
87 12 1
public static List removeDuplicates()
in src/prettify/parser/Util.java
32 10 2
protected static Font setFont()
in src/syntaxhighlight/SyntaxHighlighterPane.java
24 8 3
public boolean equals()
in src/syntaxhighlight/Style.java
11 8 1
public Pattern combinePrefixPattern()
in src/prettify/parser/CombinePrefixPattern.java
22 7 1
protected static int decodeEscape()
in src/prettify/parser/CombinePrefixPattern.java
17 7 1
protected static String encodeEscape()
in src/prettify/parser/CombinePrefixPattern.java
8 7 1
protected CreateSimpleLexer()
in src/prettify/parser/Prettify.java
25 6 2
public void paint()
in src/syntaxhighlight/JTextComponentRowHeader.java
52 6 1
public int hashCode()
in src/syntaxhighlight/Style.java
9 6 0
15 5 1
14 5 1
public static String join()
in src/prettify/parser/Util.java
16 5 2
public JTextComponentRowHeader()
in src/syntaxhighlight/JTextComponentRowHeader.java
48 5 2
protected void applyStyle()
in src/syntaxhighlight/SyntaxHighlighterPane.java
15 5 0
public void register()
in src/prettify/parser/Prettify.java
14 4 1