flutter / engine
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 10,758 units with 121,524 lines of code in units (45.2% of code).
    • 8 very complex units (1,792 lines of code)
    • 46 complex units (4,932 lines of code)
    • 183 medium complex units (12,434 lines of code)
    • 591 simple units (20,342 lines of code)
    • 9,930 very simple units (82,024 lines of code)
1% | 4% | 10% | 16% | 67%
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
cc1% | 4% | 9% | 16% | 68%
dart1% | 4% | 12% | 16% | 65%
java2% | 5% | 8% | 16% | 67%
mm0% | 5% | 5% | 20% | 68%
py0% | 0% | 19% | 25% | 55%
h0% | 0% | 0% | 6% | 93%
m0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
shell2% | 5% | 9% | 16% | 66%
lib1% | 3% | 12% | 16% | 66%
tools3% | 4% | 15% | 21% | 54%
display_list0% | 2% | 5% | 22% | 68%
vulkan0% | 5% | 13% | 21% | 58%
build0% | 0% | 44% | 8% | 46%
flow0% | 0% | 3% | 14% | 81%
sky0% | 0% | 25% | 22% | 52%
runtime0% | 0% | 3% | 20% | 75%
testing0% | 0% | 3% | 14% | 81%
common0% | 0% | 10% | 11% | 78%
fml0% | 0% | <1% | 15% | 84%
web_sdk0% | 0% | 0% | 30% | 69%
flutter_frontend_server0% | 0% | 0% | 100% | 0%
ci0% | 0% | 0% | 47% | 52%
assets0% | 0% | 0% | 26% | 73%
benchmarking0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
FileType identifyFile()
in tools/licenses/lib/filesystem.dart
202 149 2
LineBreakResult _unsafeNextLineBreak()
in lib/web_ui/lib/src/engine/text/line_breaker.dart
294 132 3
public AccessibilityNodeInfo createAccessibilityNodeInfo()
in shell/platform/android/io/flutter/view/AccessibilityBridge.java
288 98 1
void AccessibilityBridgeDelegateWin32::OnAccessibilityEvent()
in shell/platform/windows/accessibility_bridge_delegate_win32.cc
116 69 1
void updateSemantics()
in shell/platform/android/io/flutter/view/AccessibilityBridge.java
179 62 3
void parseInstruction()
in lib/spirv/lib/src/transpiler.dart
165 59 0
void TextInputPlugin::HandleMethodCall()
in shell/platform/windows/text_input_plugin.cc
153 55 2
FlutterEngineResult FlutterEngineInitialize()
in shell/platform/embedder/embedder.cc
395 51 5
static bool _isBreak()
in lib/web_ui/lib/src/engine/text/word_breaker.dart
165 48 2
LicenseType convertLicenseNameToType()
in tools/licenses/lib/licenses.dart
65 47 1
public boolean performAction()
in shell/platform/android/io/flutter/view/AccessibilityBridge.java
175 41 3
bool should_match()
in display_list/display_list_canvas_unittests.cc
99 41 6
void arcTo()
in lib/web_ui/lib/src/engine/html/path/path.dart
152 39 4
private static String translateAutofillHint()
in shell/platform/android/io/flutter/embedding/engine/systemchannels/TextInputChannel.java
81 38 1
G_MODULE_EXPORT bool fl_value_equal()
in shell/platform/linux/fl_value.cc
116 36 2
bool PlatformView::HandleFlutterPlatformViewsChannelPlatformMessage()
in shell/platform/fuchsia/flutter/platform_view.cc
154 35 1
47 35 0
public int getOffsetBefore()
in shell/platform/android/io/flutter/plugin/editing/FlutterTextUtils.java
111 34 2
public int getOffsetAfter()
in shell/platform/android/io/flutter/plugin/editing/FlutterTextUtils.java
105 34 2
_SplitLicense _splitLicense()
in tools/licenses/lib/licenses.dart
62 34 2