anthropics / claudes-c-compiler
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 3,365 units with 69,698 lines of code in units (46.1% of code).
    • 14 very complex units (3,639 lines of code)
    • 53 complex units (5,649 lines of code)
    • 280 medium complex units (18,595 lines of code)
    • 334 simple units (11,124 lines of code)
    • 2,684 very simple units (30,691 lines of code)
5% | 8% | 26% | 15% | 44%
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
rs5% | 9% | 29% | 17% | 37%
h0% | 0% | 1% | 2% | 95%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src5% | 9% | 29% | 17% | 37%
include0% | 0% | 1% | 2% | 95%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
115 92 1
1188 88 2
276 85 3
131 72 1
215 65 2
210 62 7
182 59 6
184 58 3
182 55 4
143 55 3
209 52 8
157 51 1
114 51 2
333 51 2
99 50 1
164 50 3
136 47 2
65 46 2
181 46 6
108 44 10
157 44 1
64 43 1
200 43 4
131 42 1
196 40 3
127 39 1
107 38 1
152 38 2
120 36 2
100 35 4
45 35 3
72 33 3
126 33 4
66 33 9
46 32 3
181 32 10
38 31 1
71 31 1
269 31 15
88 31 1
110 30 5
90 30 1
66 30 1
128 30 4
93 30 6
171 30 2
201 30 2
95 29 2
68 29 3
121 29 3