facebookincubator / CG-SQL
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 1,188 units with 22,520 lines of code in units (72.4% of code).
    • 2 very complex units (572 lines of code)
    • 13 complex units (2,011 lines of code)
    • 64 medium complex units (4,358 lines of code)
    • 118 simple units (4,133 lines of code)
    • 991 very simple units (11,446 lines of code)
2% | 8% | 19% | 18% | 50%
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
c2% | 9% | 19% | 18% | 50%
py0% | 0% | 23% | 30% | 46%
m0% | 0% | 0% | 72% | 27%
java0% | 0% | 0% | 0% | 100%
js0% | 0% | 0% | 0% | 100%
h0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
sources2% | 9% | 19% | 18% | 50%
sources/linetester0% | 36% | 0% | 34% | 29%
sources/tester0% | 0% | 31% | 17% | 50%
sources/cqljson0% | 0% | 26% | 33% | 40%
sources/grammar_docs0% | 0% | 20% | 10% | 68%
sources/cqlrt_cf0% | 0% | 0% | 21% | 78%
sources/java0% | 0% | 0% | 0% | 100%
website/src0% | 0% | 0% | 0% | 100%
website/plugins0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
407 70 1
165 53 2
214 46 5
352 45 1
177 44 5
222 41 1
133 39 2
120 32 9
156 32 5
97 30 1
92 29 3
126 27 4
134 27 6
69 26 2
119 26 3
164 25 11
128 25 3
108 23 2
155 23 1
91 23 2
91 22 2
69 21 1
84 21 4
100 20 10
51 20 2
72 20 4
199 19 1
43 19 1
66 19 2
81 18 5
79 18 1
94 18 2
51 17 4
119 17 1
111 17 2
49 16 1
47 16 1
56 16 6
76 16 2
75 16 1
54 16 2
78 16 3
69 16 2
36 15 1
74 15 2
47 15 3
46 14 1
46 14 4
48 14 5
134 14 1