firebase / firebase-admin-java
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 3,056 units with 20,787 lines of code in units (73.0% of code).
    • 2 very long units (210 lines of code)
    • 23 long units (1,494 lines of code)
    • 113 medium size units (3,309 lines of code)
    • 356 small units (5,065 lines of code)
    • 2,562 very small units (10,709 lines of code)
1% | 7% | 15% | 24% | 51%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
java1% | 7% | 15% | 24% | 51%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
firebase/database/core3% | 14% | 22% | 24% | 34%
firebase/database/utilities0% | 17% | 33% | 28% | 20%
firebase/database/connection0% | 10% | 23% | 31% | 33%
firebase/database/snapshot0% | 5% | 13% | 21% | 59%
firebase/auth0% | 2% | 7% | 21% | 67%
firebase/messaging0% | 3% | 7% | 16% | 72%
firebase/database/collection0% | 0% | 23% | 19% | 57%
firebase/database0% | 0% | 15% | 23% | 60%
firebase/projectmanagement0% | 0% | 17% | 35% | 46%
firebase0% | 0% | 8% | 25% | 66%
firebase/auth/internal0% | 0% | 7% | 24% | 68%
firebase/database/util0% | 0% | 19% | 33% | 47%
firebase/remoteconfig0% | 0% | 2% | 27% | 69%
firebase/internal0% | 0% | 0% | 33% | 66%
firebase/auth/multitenancy0% | 0% | 0% | 14% | 85%
firebase/cloud0% | 0% | 0% | 45% | 54%
firebase/iid0% | 0% | 0% | 40% | 59%
firebase/messaging/internal0% | 0% | 0% | 54% | 45%
firebase/remoteconfig/internal0% | 0% | 0% | 6% | 93%
firebase/auth/hash0% | 0% | 0% | 5% | 94%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
private void rerunTransactionQueue()
in src/main/java/com/google/firebase/database/core/Repo.java
106 12 2
public ProcessorResult applyOperation()
in src/main/java/com/google/firebase/database/core/view/ViewProcessor.java
104 11 4
public List addEventRegistration()
in src/main/java/com/google/firebase/database/core/SyncTree.java
91 20 1
public void startTransaction()
in src/main/java/com/google/firebase/database/core/Repo.java
84 7 3
private ViewCache generateEventCacheAfterServerEvent()
in src/main/java/com/google/firebase/database/core/view/ViewProcessor.java
82 11 5
private void sendTransactionQueue()
in src/main/java/com/google/firebase/database/core/Repo.java
81 11 2
public BeanMapper()
in src/main/java/com/google/firebase/database/utilities/encoding/CustomClassMapper.java
77 19 1
public static Node NodeFromJSON()
in src/main/java/com/google/firebase/database/snapshot/NodeUtilities.java
73 21 2
private void deferredInitialization()
in src/main/java/com/google/firebase/database/core/Repo.java
71 3 0
private List removeEventRegistration()
in src/main/java/com/google/firebase/database/core/SyncTree.java
69 22 3
private IndexedNode fullLimitUpdateChild()
in src/main/java/com/google/firebase/database/core/view/filter/LimitedFilter.java
63 19 5
private ViewCache applyUserOverwrite()
in src/main/java/com/google/firebase/database/core/view/ViewProcessor.java
63 8 6
private void tryScheduleReconnect()
in src/main/java/com/google/firebase/database/connection/PersistentConnectionImpl.java
62 5 0
private static Object serialize()
in src/main/java/com/google/firebase/database/utilities/encoding/CustomClassMapper.java
61 21 1
private ViewCache applyServerMerge()
in src/main/java/com/google/firebase/database/core/view/ViewProcessor.java
60 10 7
private void checkContents()
in src/main/java/com/google/firebase/auth/FirebaseTokenVerifierImpl.java
59 13 2
private AndroidNotification()
in src/main/java/com/google/firebase/messaging/AndroidNotification.java
59 8 1
private void abortTransactionsAtNode()
in src/main/java/com/google/firebase/database/core/Repo.java
59 9 2
private ViewCache ackUserWrite()
in src/main/java/com/google/firebase/database/core/view/ViewProcessor.java
59 10 6
private ViewCache applyServerOverwrite()
in src/main/java/com/google/firebase/database/core/view/ViewProcessor.java
57 9 7