facebook / TextLayoutBuilder
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 86 units with 950 lines of code in units (75.2% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (121 lines of code)
    • 1 medium complex units (109 lines of code)
    • 4 simple units (124 lines of code)
    • 80 very simple units (596 lines of code)
0% | 12% | 11% | 13% | 62%
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% | 12% | 11% | 13% | 62%
kt0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
library/src/main/java/com/facebook/fbui/textlayoutbuilder0% | 15% | 13% | 13% | 57%
library/libs/proxy/src/main/java/com/facebook/fbui/textlayoutbuilder/proxy0% | 0% | 0% | 26% | 73%
library/src/main/java/com/facebook/fbui/textlayoutbuilder/util0% | 0% | 0% | 0% | 100%
library/src/main/java/com/facebook/fbui/textlayoutbuilder/glyphwarmer0% | 0% | 0% | 0% | 100%
library/libs/android-text/src/main/java/android/text0% | 0% | 0% | 0% | 100%
sample/src/main/kotlin/com/facebook/fbui/textlayoutbuilder/sample0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
121 28 0
109 12 19
31 9 0
18 7 1
55 7 5
20 7 1
20 5 1
27 5 3
24 5 1
10 4 1
49 3 13
11 3 1
8 3 2
7 3 1
7 3 1
10 3 1
9 3 1
9 3 1
9 3 1
8 2 0
11 2 1
44 2 13
8 2 0
3 2 1
8 2 1
7 2 1
8 2 1
9 2 1
8 2 1
7 2 1
7 2 1
7 2 1
8 2 1
7 2 1
7 2 1
7 2 1
7 2 1
7 2 1
3 2 0
3 2 0
3 2 0
3 2 0
8 2 1
16 1 13
4 1 3
4 1 4
4 1 1
3 1 0
25 1 11
5 1 3