android / views-widgets-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 791 units with 6,798 lines of code in units (62.1% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 7 medium complex units (555 lines of code)
    • 32 simple units (980 lines of code)
    • 752 very simple units (5,263 lines of code)
0% | 0% | 8% | 14% | 77%
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% | 10% | 17% | 71%
kt0% | 0% | 0% | 3% | 96%
js0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
ConstraintLayoutExamples0% | 0% | 15% | 17% | 67%
AnimationsInterpolatorPlayground0% | 0% | 21% | 8% | 70%
SwipeRefreshMultipleViews0% | 0% | 0% | 20% | 79%
SwipeRefreshLayoutBasic0% | 0% | 0% | 20% | 79%
MultiWindowPlayground0% | 0% | 0% | 12% | 87%
RecyclerView0% | 0% | 0% | 12% | 87%
SimpleTransition0% | 0% | 0% | 49% | 50%
DataBindingDataBoundList0% | 0% | 0% | 16% | 83%
ViewPager20% | 0% | 0% | 0% | 100%
RecyclerViewKotlin0% | 0% | 0% | 0% | 100%
MultiWindowPlaygroundKotlin0% | 0% | 0% | 0% | 100%
DataBindingDataBoundRecyclerView0% | 0% | 0% | 0% | 100%
CardView0% | 0% | 0% | 0% | 100%
CardViewKotlin0% | 0% | 0% | 0% | 100%
WebView0% | 0% | 0% | 0% | 100%
RecyclerViewSimple0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
public void parseXML()
in ConstraintLayoutExamples/CycleEditor/src/com/google/androidstudio/motionlayoutcycles/CycleModel.java
104 25 1
public void paint()
in ConstraintLayoutExamples/CycleEditor/src/com/google/androidstudio/motionlayoutcycles/CycleView.java
115 21 3
public void parse()
in ConstraintLayoutExamples/CycleEditor/src/com/google/androidstudio/motionlayoutcycles/CycleSetModel.java
85 21 0
private HashSet preParse()
in ConstraintLayoutExamples/CycleEditor/src/com/google/androidstudio/motionlayoutcycles/CycleSetModel.java
61 16 1
public boolean onTouchEvent()
in AnimationsInterpolatorPlayground/app/src/main/java/com/example/android/interpolatorplayground/CurveVisualizer.java
47 16 1
public void paint()
in ConstraintLayoutExamples/CycleEditor/src/com/google/androidstudio/motionlayoutcycles/AnimationPanel.java
99 12 1
private void populateParametersUI()
in AnimationsInterpolatorPlayground/app/src/main/java/com/example/android/interpolatorplayground/MainActivity.java
44 11 2
public void getPos()
in ConstraintLayoutExamples/CycleEditor/src/com/google/androidstudio/motionlayoutcycles/MonotoneSpline.java
35 10 2
public void getPos()
in ConstraintLayoutExamples/CycleEditor/src/com/google/androidstudio/motionlayoutcycles/MonotoneSpline.java
35 10 2
public void getPos()
in ConstraintLayoutExamples/CycleEditor/src/com/google/androidstudio/motionlayoutcycles/LinearInterpolator.java
33 10 2
public void getPos()
in ConstraintLayoutExamples/CycleEditor/src/com/google/androidstudio/motionlayoutcycles/LinearInterpolator.java
33 10 2
public static void setEntries()
in DataBindingDataBoundList/app/src/main/java/com/example/android/databoundlist/ListBindingAdapters.java
30 10 5
private void alignButtons()
in SimpleTransition/app/src/main/java/com/android/example/simpletransition/MainActivity.java
36 9 2
public void println()
in SwipeRefreshMultipleViews/Application/src/main/java/com/example/android/common/logger/LogView.java
44 9 4
public void println()
in SwipeRefreshLayoutBasic/Application/src/main/java/com/example/android/common/logger/LogView.java
44 9 4
public void println()
in RecyclerView/Application/src/main/java/com/example/android/common/logger/LogView.java
44 9 4
public void println()
in MultiWindowPlayground/Application/src/main/java/com/example/android/common/logger/LogView.java
44 9 4
public double getValue()
in ConstraintLayoutExamples/CycleEditor/src/com/google/androidstudio/motionlayoutcycles/CycleView.java
20 8 1
public MonotoneSpline()
in ConstraintLayoutExamples/CycleEditor/src/com/google/androidstudio/motionlayoutcycles/MonotoneSpline.java
38 8 2
public double getLength2D()
in ConstraintLayoutExamples/CycleEditor/src/com/google/androidstudio/motionlayoutcycles/MonotoneSpline.java
48 8 1