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.
"If you have to spend effort into looking at a fragment of code to figure out what it's doing, then you should extract it into a function and name the function after that 'what'."
"Use common sense, stick to small function sizes in most instances but don't be dogmatic about it if you have a genuinely good reason to make an unusually big function."
"All other things being equal, a shorter method is easier to read, easier to understand, and easier to troubleshoot. Refactor long methods into smaller methods if you can."
"The first rule of functions is that they should be small. The second rule of functions is that they should be smaller than that. Functions should not be 100 lines long. Functions should hardly ever be 20 lines long."
Unit Size Overall
There are 447 units with 3,812 lines of code in units (73.2% of code).
public void read() in AsynchronousRatchetingTree/src/main/java/com/facebook/research/asynchronousratchetingtree/art/message/thrift/SetupMessageStruct.java
81
15
2
public int compareTo() in AsynchronousRatchetingTree/src/main/java/com/facebook/research/asynchronousratchetingtree/art/message/thrift/SetupMessageStruct.java
57
17
1
public void write() in AsynchronousRatchetingTree/src/main/java/com/facebook/research/asynchronousratchetingtree/art/message/thrift/SetupMessageStruct.java
48
13
2
public boolean equals() in AsynchronousRatchetingTree/src/main/java/com/facebook/research/asynchronousratchetingtree/art/message/thrift/SetupMessageStruct.java
47
36
1
public void read() in AsynchronousRatchetingTree/src/main/java/com/facebook/research/asynchronousratchetingtree/art/message/thrift/SetupMessageStruct.java
45
8
2
public static void main() in AsynchronousRatchetingTree/src/main/java/com/facebook/research/asynchronousratchetingtree/Main.java
45
9
1
public void write() in AsynchronousRatchetingTree/src/main/java/com/facebook/research/asynchronousratchetingtree/art/message/thrift/SetupMessageStruct.java
44
7
2
public void read() in AsynchronousRatchetingTree/src/main/java/com/facebook/research/asynchronousratchetingtree/art/message/thrift/NodeStruct.java
44
9
2
public void read() in AsynchronousRatchetingTree/src/main/java/com/facebook/research/asynchronousratchetingtree/art/message/thrift/UpdateMessageStruct.java
44
8
2
public void setFieldValue() in AsynchronousRatchetingTree/src/main/java/com/facebook/research/asynchronousratchetingtree/art/message/thrift/SetupMessageStruct.java
43
12
2
public void read() in AsynchronousRatchetingTree/src/main/java/com/facebook/research/asynchronousratchetingtree/dhratchet/message/thrift/DHRatchetSetupMessageStruct.java
42
9
2
public void read() in AsynchronousRatchetingTree/src/main/java/com/facebook/research/asynchronousratchetingtree/dhratchet/message/thrift/DHRatchetMessageStruct.java
42
9
2
public int compareTo() in AsynchronousRatchetingTree/src/main/java/com/facebook/research/asynchronousratchetingtree/art/message/thrift/NodeStruct.java
37
11
1
public int compareTo() in AsynchronousRatchetingTree/src/main/java/com/facebook/research/asynchronousratchetingtree/dhratchet/message/thrift/DHRatchetSetupMessageStruct.java
37
11
1
public int compareTo() in AsynchronousRatchetingTree/src/main/java/com/facebook/research/asynchronousratchetingtree/dhratchet/message/thrift/DHRatchetMessageStruct.java
37
11
1
public void read() in AsynchronousRatchetingTree/src/main/java/com/facebook/research/asynchronousratchetingtree/art/message/thrift/CiphertextMessageStruct.java
35
7
2
public void read() in AsynchronousRatchetingTree/src/main/java/com/facebook/research/asynchronousratchetingtree/art/message/thrift/AuthenticatedMessageStruct.java
public void setFieldValue() in AsynchronousRatchetingTree/src/main/java/com/facebook/research/asynchronousratchetingtree/dhratchet/message/thrift/DHRatchetSetupMessageStruct.java