firebase / firebase-android-sdk
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 9,003 units with 78,858 lines of code in units (65.4% of code).
    • 0 very complex units (0 lines of code)
    • 4 complex units (366 lines of code)
    • 104 medium complex units (5,466 lines of code)
    • 410 simple units (12,487 lines of code)
    • 8,485 very simple units (60,539 lines of code)
0% | <1% | 6% | 15% | 76%
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% | <1% | 7% | 15% | 76%
py0% | 0% | 0% | 18% | 81%
kt0% | 0% | 0% | 10% | 89%
cpp0% | 0% | 0% | 0% | 100%
h0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
firebase-firestore0% | <1% | 5% | 14% | 78%
firebase-database0% | <1% | 13% | 20% | 65%
encoders0% | 4% | 7% | 22% | 64%
firebase-storage0% | 0% | 10% | 21% | 68%
firebase-ml-modeldownloader0% | 0% | 20% | 26% | 53%
firebase-inappmessaging-display0% | 0% | 9% | 10% | 79%
firebase-perf0% | 0% | 2% | 12% | 84%
firebase-messaging0% | 0% | 5% | 23% | 71%
firebase-functions0% | 0% | 32% | 15% | 51%
buildSrc0% | 0% | 5% | 17% | 77%
transport0% | 0% | 6% | 12% | 80%
firebase-inappmessaging0% | 0% | 4% | 12% | 83%
firebase-segmentation0% | 0% | 18% | 45% | 35%
firebase-config0% | 0% | 2% | 9% | 87%
firebase-components0% | 0% | 4% | 16% | 79%
firebase-database-collection0% | 0% | 3% | 15% | 81%
firebase-crashlytics0% | 0% | 0% | 8% | 91%
firebase-installations0% | 0% | 0% | 23% | 76%
firebase-appdistribution0% | 0% | 0% | 8% | 91%
appcheck0% | 0% | 0% | 10% | 89%
firebase-common0% | 0% | 0% | 6% | 93%
firebase-dynamic-links0% | 0% | 0% | 9% | 90%
ci0% | 0% | 0% | 18% | 81%
tools0% | 0% | 0% | 28% | 71%
firebase-crashlytics-ndk0% | 0% | 0% | 2% | 97%
firebase-abt0% | 0% | 0% | 0% | 100%
integ-testing0% | 0% | 0% | 0% | 100%
firebase-appdistribution-stub0% | 0% | 0% | 0% | 100%
firebase-messaging-directboot0% | 0% | 0% | 0% | 100%
macrobenchmark0% | 0% | 0% | 0% | 100%
apk-size0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
public DocumentChanges computeDocChanges()
in firebase-firestore/src/main/java/com/google/firebase/firestore/core/View.java
88 38 2
private static boolean deepEquals()
in firebase-database/src/testUtil/java/com/google/firebase/database/DeepEquals.java
114 34 3
JsonValueObjectEncoderContext add()
in encoders/firebase-encoders-json/src/main/java/com/google/firebase/encoders/json/JsonValueObjectEncoderContext.java
91 27 2
private static Object serialize()
in firebase-firestore/src/main/java/com/google/firebase/firestore/util/CustomClassMapper.java
73 26 2
public boolean isValidPerfMetric()
in firebase-perf/src/main/java/com/google/firebase/perf/metrics/validator/FirebasePerfNetworkValidator.java
85 25 0
public boolean onTouch()
in firebase-inappmessaging-display/src/main/java/com/google/firebase/inappmessaging/display/internal/SwipeDismissTouchListener.java
99 24 2
private Node updateRangeInNode()
in firebase-database/src/main/java/com/google/firebase/database/snapshot/RangeMerge.java
49 23 3
public boolean equals()
in firebase-inappmessaging/src/main/java/com/google/firebase/inappmessaging/model/CardMessage.java
37 23 1
public Object encode()
in firebase-functions/src/main/java/com/google/firebase/functions/Serializer.java
84 22 1
private List removeEventRegistration()
in firebase-database/src/main/java/com/google/firebase/database/core/SyncTree.java
69 22 3
public Operation nextOperation()
in firebase-database/src/testUtil/java/com/google/firebase/database/core/RandomOperationGenerator.java
88 21 0
private static Object serialize()
in firebase-database/src/main/java/com/google/firebase/database/core/utilities/encoding/CustomClassMapper.java
61 21 1
public static Node NodeFromJSON()
in firebase-database/src/main/java/com/google/firebase/database/snapshot/NodeUtilities.java
73 21 2
ObjectEncoderContext add()
in encoders/firebase-encoders-proto/src/main/java/com/google/firebase/encoders/proto/ProtobufDataEncoderContext.java
78 20 3
public List addEventRegistration()
in firebase-database/src/main/java/com/google/firebase/database/core/SyncTree.java
92 20 1
public CacheNode getExpectedClientState()
in firebase-database/src/testUtil/java/com/google/firebase/database/core/RandomOperationGenerator.java
57 19 1
private IndexedNode fullLimitUpdateChild()
in firebase-database/src/main/java/com/google/firebase/database/core/view/filter/LimitedFilter.java
63 19 5
public BeanMapper()
in firebase-database/src/main/java/com/google/firebase/database/core/utilities/encoding/CustomClassMapper.java
77 19 1
private void onDataPush()
in firebase-database/src/main/java/com/google/firebase/database/connection/PersistentConnectionImpl.java
52 19 2
void run()
in firebase-storage/src/main/java/com/google/firebase/storage/FileDownloadTask.java
68 19 0