android / user-interface-samples
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 671 units with 6,046 lines of code in units (53.9% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 0 medium complex units (0 lines of code)
    • 14 simple units (601 lines of code)
    • 657 very simple units (5,445 lines of code)
0% | 0% | 0% | 9% | 90%
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% | 0% | 11% | 88%
kt0% | 0% | 0% | 6% | 93%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
InteractiveSliceProviderKotlin0% | 0% | 0% | 16% | 83%
WindowManager0% | 0% | 0% | 15% | 84%
People0% | 0% | 0% | 11% | 88%
Notifications0% | 0% | 0% | 5% | 94%
AppShortcuts0% | 0% | 0% | 17% | 82%
TextStyling0% | 0% | 0% | 19% | 80%
ElevationDrag0% | 0% | 0% | 11% | 88%
ClippingBasic0% | 0% | 0% | 14% | 85%
ElevationBasic0% | 0% | 0% | 15% | 84%
TextLinkify0% | 0% | 0% | 19% | 80%
DownloadableFonts0% | 0% | 0% | 9% | 90%
SliceViewerKotlin0% | 0% | 0% | 0% | 100%
DarkTheme0% | 0% | 0% | 0% | 100%
AppWidget0% | 0% | 0% | 0% | 100%
DragAndDrop0% | 0% | 0% | 0% | 100%
DownloadableFontsKotlin0% | 0% | 0% | 0% | 100%
TextRoundedBackgroundKotlin0% | 0% | 0% | 0% | 100%
TextStylingKotlin0% | 0% | 0% | 0% | 100%
EmojiCompat0% | 0% | 0% | 0% | 100%
SplashScreen0% | 0% | 0% | 0% | 100%
PreferencesKotlin0% | 0% | 0% | 0% | 100%
EmojiCompatKotlin0% | 0% | 0% | 0% | 100%
DocumentCentricApps0% | 0% | 0% | 0% | 100%
ImmersiveMode0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
public void println()
in ElevationBasic/Application/src/main/java/com/example/android/common/logger/LogView.java
44 9 4
String build()
in DownloadableFonts/app/src/main/java/com/example/android/downloadablefonts/QueryBuilder.java
20 9 0
public void println()
in ClippingBasic/Application/src/main/java/com/example/android/common/logger/LogView.java
44 9 4
public void println()
in ElevationDrag/Application/src/main/java/com/example/android/common/logger/LogView.java
44 9 4
public void println()
in TextLinkify/Application/src/main/java/com/example/android/common/logger/LogView.java
44 9 4
private static List findElements()
in TextStyling/app/src/main/java/com/android/example/text/styling/parser/Parser.java
45 8 2
override fun onViewCreated()
in People/app/src/main/java/com/example/android/people/ui/chat/ChatFragment.kt
68 7 2
public void refreshShortcuts()
in AppShortcuts/app/src/main/java/com/example/android/appshortcuts/ShortcutHelper.java
30 7 1
public void itemSelected()
in Notifications/Wearable/src/main/java/com/example/android/wearable/wear/wearnotifications/StandaloneMainActivity.java
35 6 1
public void onClick()
in Notifications/Application/src/main/java/com/example/android/wearable/wear/wearnotifications/MainActivity.java
35 6 1
override fun equals()
in People/app/src/main/java/com/example/android/people/data/Contact.kt
9 6 1
public List getShortcuts()
in AppShortcuts/app/src/main/java/com/example/android/appshortcuts/ShortcutHelper.java
17 6 0
private void updateRulesFromCheckboxes()
in WindowManager/app/src/main/java/com/example/windowmanagersample/embedding/SplitActivityBase.java
81 6 0
override fun buildSlice()
in InteractiveSliceProviderKotlin/app/src/main/java/com/example/android/interactivesliceprovider/slicebuilders/WifiSliceBuilder.kt
85 6 0
fun build()
in DownloadableFontsKotlin/app/src/main/java/com/example/android/downloadablefonts/QueryBuilder.kt
12 5 0
private void showFragment()
in DarkTheme/Application/src/main/java/com/example/android/darktheme/MainActivity.java
27 5 1
override fun onCreate()
in SplashScreen/app/src/main/java/com/example/android/splashscreen/MainActivity.kt
31 5 1
fun getFeaturePositionInViewRect()
in WindowManager/app/src/main/java/com/example/windowmanagersample/SampleTools.kt
27 5 3
private void buildSpans()
in TextStyling/app/src/main/java/com/android/example/text/styling/renderer/MarkdownBuilder.java
17 5 2
public void println()
in ElevationBasic/Application/src/main/java/com/example/android/common/logger/LogWrapper.java
13 4 4