android / app-bundle-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 335 units with 4,182 lines of code in units (39.7% of code).
    • 1 very complex units (149 lines of code)
    • 0 complex units (0 lines of code)
    • 4 medium complex units (196 lines of code)
    • 19 simple units (839 lines of code)
    • 311 very simple units (2,998 lines of code)
3% | 0% | 4% | 20% | 71%
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
cpp6% | 0% | 8% | 24% | 60%
py0% | 0% | 0% | 28% | 71%
java0% | 0% | 0% | 10% | 89%
h0% | 0% | 0% | 0% | 100%
kt0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
PlayAssetDelivery/NativeSample5% | 0% | 7% | 22% | 64%
PlayAssetDelivery/BundletoolScriptSample0% | 0% | 0% | 28% | 71%
InstantApps/multi-feature-module0% | 0% | 0% | 12% | 87%
InstantApps/service0% | 0% | 0% | 0% | 100%
InstantApps/analytics0% | 0% | 0% | 0% | 100%
DynamicFeatureNavigation/DSL0% | 0% | 0% | 0% | 100%
InstantApps/storage-api0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
GLboolean gl3stubInit()
in PlayAssetDelivery/NativeSample/common/ndk_helper/gl3stub.cpp
149 105 0
float Interpolator::GetFormula()
in PlayAssetDelivery/NativeSample/common/ndk_helper/interpolator.cpp
51 15 5
void TexturedTeapotRender::UpdateButton()
in PlayAssetDelivery/NativeSample/Teapot/src/main/cpp/TexturedTeapotRender.cpp
39 13 0
GESTURE_STATE PinchDetector::Detect()
in PlayAssetDelivery/NativeSample/common/ndk_helper/gestureDetector.cpp
54 13 1
GESTURE_STATE DragDetector::Detect()
in PlayAssetDelivery/NativeSample/common/ndk_helper/gestureDetector.cpp
52 12 1
int32_t Engine::HandleInput()
in PlayAssetDelivery/NativeSample/Teapot/src/main/cpp/TeapotNativeActivity.cpp
48 9 2
void Engine::HandleCmd()
in PlayAssetDelivery/NativeSample/Teapot/src/main/cpp/TeapotNativeActivity.cpp
28 9 2
bool TeapotRenderer::LoadShaders()
in PlayAssetDelivery/NativeSample/Teapot/src/main/cpp/TeapotRenderer.cpp
52 9 3
public Animator createAnimator()
in InstantApps/multi-feature-module/app/src/main/java/com/example/android/unsplash/transition/TextResize.java
94 9 3
def extract_bundle_config()
in PlayAssetDelivery/BundletoolScriptSample/add_packs.py
65 8 4
def main()
in PlayAssetDelivery/BundletoolScriptSample/add_packs.py
55 8 0
Mat4 Mat4::Inverse()
in PlayAssetDelivery/NativeSample/common/ndk_helper/vecmath.cpp
63 8 0
void android_main()
in PlayAssetDelivery/NativeSample/Teapot/src/main/cpp/TeapotNativeActivity.cpp
31 7 1
bool JNIHelper::ReadFile()
in PlayAssetDelivery/NativeSample/common/ndk_helper/JNIHelper.cpp
54 7 2
GESTURE_STATE TapDetector::Detect()
in PlayAssetDelivery/NativeSample/common/ndk_helper/gestureDetector.cpp
30 7 1
GESTURE_STATE DoubletapDetector::Detect()
in PlayAssetDelivery/NativeSample/common/ndk_helper/gestureDetector.cpp
30 7 1
private float getTranslationPoint()
in InstantApps/multi-feature-module/app/src/main/java/com/example/android/unsplash/transition/TextResize.java
15 7 5
def create_output_dir()
in PlayAssetDelivery/BundletoolScriptSample/generate_asset_pack.py
16 6 1
void TexturedTeapotRender::Init()
in PlayAssetDelivery/NativeSample/Teapot/src/main/cpp/TexturedTeapotRender.cpp
53 6 1
uint32_t JNIHelper::LoadTexture()
in PlayAssetDelivery/NativeSample/common/ndk_helper/JNIHelper.cpp
51 6 4