android / games-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 1,171 units with 13,289 lines of code in units (21.2% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 36 medium complex units (1,969 lines of code)
    • 92 simple units (2,935 lines of code)
    • 1,043 very simple units (8,385 lines of code)
0% | 0% | 14% | 22% | 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
cpp0% | 0% | 17% | 27% | 54%
h0% | 0% | 23% | 0% | 76%
java0% | 0% | 8% | 14% | 76%
c0% | 0% | 18% | 0% | 81%
cs0% | 0% | 0% | 7% | 92%
hpp0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
agdk/agdktunnel/app0% | 0% | 16% | 24% | 58%
agdk/game_controller/common0% | 0% | 33% | 20% | 46%
agdk/agde/endless-tunnel0% | 0% | 16% | 27% | 55%
agdk/agde/Teapot0% | 0% | 7% | 20% | 72%
agdk/game_controller/gameactivity0% | 0% | 24% | 36% | 39%
agdk/game_controller/nativeactivity0% | 0% | 30% | 29% | 39%
agdk/util/tuningfork0% | 0% | 13% | 15% | 71%
trivialkart/trivialkart-unity/Assets0% | 0% | 0% | 7% | 92%
agdk/common/src0% | 0% | 0% | 17% | 82%
agdk/common/include0% | 0% | 0% | 0% | 100%
agdk/agde/HelloJNI0% | 0% | 0% | 0% | 100%
agdk/agde/AssemblyCode-Link-Objects0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
void NativeEngine::HandleCommand()
in agdk/agdktunnel/app/src/main/cpp/native_engine.cpp
96 24 1
void PlayScene::DoFrame()
in agdk/agde/endless-tunnel/endless-tunnel/Android/app/src/main/cpp/play_scene.cpp
78 22 0
void PlayScene::DoFrame()
in agdk/agdktunnel/app/src/main/cpp/play_scene.cpp
78 22 0
void NativeEngine::HandleCommand()
in agdk/game_controller/gameactivity/app/src/main/cpp/native_engine.cpp
82 21 1
void NativeEngine::HandleCommand()
in agdk/game_controller/nativeactivity/app/src/main/cpp/native_engine.cpp
78 20 1
void DemoScene::RenderPanel_ControlsTab()
in agdk/game_controller/common/demo_scene.cpp
84 18 3
void PlayScene::DetectCollisions()
in agdk/agde/endless-tunnel/endless-tunnel/Android/app/src/main/cpp/play_scene.cpp
64 17 1
void PlayScene::DetectCollisions()
in agdk/agdktunnel/app/src/main/cpp/play_scene.cpp
64 17 1
void NativeEngine::HandleCommand()
in agdk/agde/endless-tunnel/endless-tunnel/Android/app/src/main/cpp/native_engine.cpp
65 16 1
static jclass loadClass()
in agdk/game_controller/common/JNIUtil.h
112 16 5
void GameAssetManagerInternals::SetAssetPackErrorStatus()
in agdk/agdktunnel/app/src/main/cpp/game_asset_manager.cpp
61 16 3
void Obstacle::PutRandomBonus()
in agdk/agde/endless-tunnel/endless-tunnel/Android/app/src/main/cpp/obstacle.cpp
37 15 0
float Interpolator::GetFormula()
in agdk/agde/Teapot/GameEngine/Interpolator.cpp
51 15 5
public static void validateSettingsHistograms()
in agdk/util/tuningfork/tools/validation/src/main/java/com/google/tuningfork/validation/ValidationUtil.java
40 15 2
void Obstacle::PutRandomBonus()
in agdk/agdktunnel/app/src/main/cpp/obstacle.cpp
37 15 0
void GameAssetManagerInternals::UpdateAssetPackFromDownloadState()
in agdk/agdktunnel/app/src/main/cpp/game_asset_manager.cpp
58 15 2
void UiWidget::Render()
in agdk/agde/endless-tunnel/endless-tunnel/Android/app/src/main/cpp/ui_scene.cpp
33 14 5
void DemoScene::RenderMouseData()
in agdk/game_controller/common/demo_scene.cpp
58 14 0
void UiWidget::Render()
in agdk/agdktunnel/app/src/main/cpp/ui_scene.cpp
33 14 5
void UiScene::OnKeyDown()
in agdk/agde/endless-tunnel/endless-tunnel/Android/app/src/main/cpp/ui_scene.cpp
35 13 1