facebookincubator / InjKit
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 259 units with 2,554 lines of code in units (71.6% of code).
    • 1 very long units (122 lines of code)
    • 0 long units (0 lines of code)
    • 31 medium size units (1,000 lines of code)
    • 45 small units (665 lines of code)
    • 182 very small units (767 lines of code)
4% | 0% | 39% | 26% | 30%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
java4% | 0% | 39% | 26% | 30%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
TransformCore/src/main/java/com/facebook/ads/injkit/benchmark27% | 0% | 47% | 11% | 13%
TransformCore/src/main/java/com/facebook/ads/injkit0% | 0% | 37% | 28% | 33%
TransformCore/src/main/java/com/facebook/ads/injkit/crashshield0% | 0% | 53% | 27% | 18%
TransformCore/src/main/java/com/facebook/ads/injkit/threadcheck0% | 0% | 44% | 30% | 25%
CommandLineClient/src/main/java/com/facebook/ads/injkit/cli0% | 0% | 50% | 0% | 50%
TransformCore/src/main/java/com/facebook/ads/injkit/sdkdebugger0% | 0% | 20% | 41% | 38%
TransformCore/src/main/java/com/facebook/ads/injkit/model0% | 0% | 9% | 35% | 54%
GradlePlugin/src/main/java/com/facebook/ads/injkit/gradle0% | 0% | 30% | 18% | 50%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
122 6 4
49 5 2
49 1 0
47 13 1
45 8 2
45 15 2
42 7 4
41 10 2
40 6 0
37 8 2
37 6 2
35 6 2
34 8 3
33 12 2
33 10 1
31 9 0
31 6 3
30 8 2
29 5 1
29 5 2
29 8 2
27 5 2
25 3 6
25 7 2
23 4 3
23 6 2
23 5 0
22 4 3
22 6 2
22 2 2
21 4 3
21 7 2
20 3 2
20 6 5
20 3 3
20 7 3
20 2 2
19 5 2
18 7 1
18 1 6
17 7 1
17 3 2
17 6 2
16 3 2
16 4 2
16 4 3
16 5 1
16 4 2
16 2 2
16 3 1