android / android-test
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 943 units with 9,910 lines of code in units (61.7% of code).
    • 0 very complex units (0 lines of code)
    • 3 complex units (337 lines of code)
    • 20 medium complex units (1,825 lines of code)
    • 42 simple units (1,448 lines of code)
    • 878 very simple units (6,300 lines of code)
0% | 3% | 18% | 14% | 63%
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
py0% | 6% | 33% | 18% | 41%
java0% | 1% | 9% | 12% | 76%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
tools/android/emulator0% | 6% | 33% | 18% | 41%
tools/device_broker/java/com/google/android/apps/common/testing/broker0% | 2% | 5% | 12% | 79%
tools/device_broker/java/com/google/android/apps/common/testing/suite0% | 0% | 18% | 11% | 69%
tools/device_broker/java/com/google/android/apps/common/testing/testrunner0% | 0% | 0% | 0% | 100%
build_extensions0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def _PrepareQemuArgs()
in tools/android/emulator/emulated_device.py
113 40 6
public boolean processLine()
in tools/device_broker/java/com/google/android/apps/common/testing/broker/InstrumentationTestRunnerProcessor.java
97 29 1
def _WatchdogLoop()
in tools/android/emulator/emulated_device.py
127 27 6
protected DexClassData computeNext()
in tools/device_broker/java/com/google/android/apps/common/testing/suite/dex/DexDumpIterator.java
139 25 0
public void run()
in tools/device_broker/java/com/google/android/apps/common/testing/suite/dex/DumpUtils.java
89 22 0
def _Run()
in tools/android/emulator/unified_launcher.py
114 21 36
def _MakeAndroidPlatform()
in tools/android/emulator/unified_launcher.py
70 21 0
private synchronized void runEmulatorLaunchScript()
in tools/device_broker/java/com/google/android/apps/common/testing/broker/WrappedEmulatedDeviceBroker.java
98 20 8
public static void tokenize()
in tools/device_broker/java/com/google/android/apps/common/testing/broker/shell/ShellUtils.java
49 19 2
def KillEmulator()
in tools/android/emulator/emulated_device.py
36 19 3
def StoreAndCompressUserdata()
in tools/android/emulator/emulated_device.py
75 19 3
void runGoogleAndroidTestCase()
in tools/device_broker/java/com/google/android/apps/common/testing/suite/AndroidGoogleTest.java
99 18 0
def _InitializeRamdisk()
in tools/android/emulator/emulated_device.py
161 17 3
def InstallApk()
in tools/android/emulator/emulated_device.py
72 16 4
def _PollEmulatorStatus()
in tools/android/emulator/emulated_device.py
178 15 3
def Spawn()
in tools/android/emulator/common.py
57 15 7
private List runTest()
in tools/device_broker/java/com/google/android/apps/common/testing/broker/AdbController.java
99 14 9
def Configure()
in tools/android/emulator/emulated_device.py
160 14 17
def _MakeEmulatorEnv()
in tools/android/emulator/emulated_device.py
36 13 3
def _CheckLeftProcess()
in tools/android/emulator/emulated_device.py
33 13 1