firebase / snippets-android
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 660 units with 6,514 lines of code in units (59.1% 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)
    • 10 simple units (234 lines of code)
    • 650 very simple units (6,280 lines of code)
0% | 0% | 0% | 3% | 96%
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% | 4% | 95%
kt0% | 0% | 0% | 2% | 97%
py0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
appindexing0% | 0% | 0% | 36% | 63%
mlkit0% | 0% | 0% | 12% | 87%
firestore0% | 0% | 0% | 3% | 96%
ml-functions0% | 0% | 0% | 19% | 80%
tasks0% | 0% | 0% | 13% | 86%
auth0% | 0% | 0% | 0% | 100%
storage0% | 0% | 0% | 0% | 100%
database0% | 0% | 0% | 0% | 100%
dynamic-links0% | 0% | 0% | 0% | 100%
predictions0% | 0% | 0% | 0% | 100%
dl-invites0% | 0% | 0% | 0% | 100%
analytics0% | 0% | 0% | 0% | 100%
perf0% | 0% | 0% | 0% | 100%
crashlytics0% | 0% | 0% | 0% | 100%
appcheck0% | 0% | 0% | 0% | 100%
scripts0% | 0% | 0% | 0% | 100%
test-lab0% | 0% | 0% | 0% | 100%
messaging0% | 0% | 0% | 0% | 100%
firebaseoptions0% | 0% | 0% | 0% | 100%
inappmessaging0% | 0% | 0% | 0% | 100%
functions0% | 0% | 0% | 0% | 100%
admob0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
override fun onCreate()
in appindexing/app/src/main/java/com/google/firebase/example/appindexing/kotlin/MeasureActivity.kt
16 7 1
protected void onCreate()
in appindexing/app/src/main/java/com/google/firebase/example/appindexing/MeasureActivity.java
16 7 1
public void listenToDocumentLocal()
in firestore/app/src/main/java/com/google/example/firestore/DocSnippets.java
20 6 0
public void listenToDiffs()
in firestore/app/src/main/java/com/google/example/firestore/DocSnippets.java
27 6 0
private void getRecognizedTexts()
in ml-functions/app/src/main/java/devrel/firebase/google/com/mlfunctions/MainActivity.java
29 6 1
private void detectFaces()
in mlkit/app/src/main/java/com/google/firebase/example/mlkit/FaceDetectionActivity.java
44 6 1
private void processFaceList()
in mlkit/app/src/main/java/com/google/firebase/example/mlkit/FaceDetectionActivity.java
24 6 1
protected void onHandleWork()
in appindexing/app/src/main/java/com/google/firebase/example/appindexing/AppIndexingUpdateService.java
23 6 1
override fun onHandleWork()
in appindexing/app/src/main/java/com/google/firebase/example/appindexing/kotlin/AppIndexingUpdateService.kt
22 6 1
public void blockingTask()
in tasks/app/src/main/java/com/google/firebase/quickstart/tasks/MainActivity.java
13 6 0
public void listenState()
in firestore/app/src/main/java/com/google/example/firestore/DocSnippets.java
22 5 0
public void offlineListen()
in firestore/app/src/main/java/com/google/example/firestore/DocSnippets.java
21 5 1
public static void queryHashes()
in firestore/app/src/main/java/com/google/example/firestore/SolutionGeoqueries.java
32 5 0
fun offlineListen()
in firestore/app/src/main/java/com/google/example/firestore/kotlin/DocSnippets.kt
19 5 1
fun queryHashes()
in firestore/app/src/main/java/com/google/example/firestore/kotlin/SolutionGeoqueries.kt
29 5 0
public void startUpdates()
in firestore/app/src/main/java/com/google/example/firestore/SolutionRateLimiting.java
33 5 0
def regionsInFile()
in scripts/checksnippets.py
16 5 1
private int getRotationCompensation()
in mlkit/app/src/main/java/com/google/firebase/example/mlkit/VisionImage.java
29 5 3
private void processDocumentTextBlock()
in mlkit/app/src/main/java/com/google/firebase/example/mlkit/TextRecognitionActivity.java
27 5 1
override fun onCreate()
in dynamic-links/app/src/main/java/com/google/firebase/quickstart/dynamiclinks/kotlin/ReferralActivity.kt
18 5 1