# Statistics Summary

For our testing we measured open source projects on GitHub.

The following statistics show combined results over all those projects. The jSparrow Eclipse Plugin has been used to produce the results.

Summary of Statistics

This is a summary of the statistics of all open source projects listed on the Statistics of Open Source Projects page.

Total Java file* count 19792
Number of files changed 12581
Total number of issues fixed 228616
Total time saved 15997 hours, 33 minutes
Total jSparrow run time 20 minutes, 34 seconds
* One Java file could contain more than one Java class.

Combined Statistics

This table adds up all the numbers seen on the Statistics of Open Source Projects page for each project.

Rule NameIssues FixedFiles ChangedTime saved
Add Braces to Control Statements 18988 1979 4430 hours, 32 minutes
Avoid Concatenation in Logging Statements 330 89 110 hours
Collapse If Statements 758 513 631 hours, 40 minutes
Create Temp Files Using Java NIO 56 37 23 hours, 20 minutes
Hide Default Constructor In Utility Classes 678 678 565 hours
Insert Break Statements in For-loops 5 3 30 minutes
Make Fields And Variables Final 129753 10783 108127 hours, 30 minutes
Remove Boxing for String Conversions 90 56 60 hours
Remove Collection::addAll 103 71 34 hours, 20 minutes
Remove Explicit Call To super() 290 274 43 hours, 30 minutes
Remove Explicit Type Argument 3815 1044 572 hours, 15 minutes
Remove Inherited Interfaces from Class Declaration 135 106 36 hours
Remove Lambda Expression Braces 4342 1452 3618 hours, 20 minutes
Remove Modifiers in Interface Properties 1228 131 102 hours, 20 minutes
Remove Null-Checks Before Instanceof 72 46 24 hours
Remove Redundant Type Casts 217 131 144 hours, 40 minutes
Remove toString() on String 19 16 3 hours, 10 minutes
Remove Unnecessary Semicolons 332 38 27 hours, 40 minutes
Remove Unnecessary Thrown Exceptions on Method Signatures 1225 561 408 hours, 20 minutes
Remove Unused Parameters in Private Methods 274 143 228 hours, 20 minutes
Reorder Modifiers 662 349 132 hours, 24 minutes
Reorder String Equality Check 1496 453 2493 hours, 20 minutes
Replace Assignment with Compound Operator 134 71 35 hours, 44 minutes
Replace Collection.sort with List.sort 40 33 8 hours
Replace Concatenation with Infix-Operation 13 3 1 hour, 5 minutes
Replace Equality Check with isEmpty() 198 124 52 hours, 48 minutes
Replace equals() on Enum Constants 280 106 210 hours
Replace Expression Lambda with Method Reference 1177 671 392 hours, 20 minutes
Replace For-Loop with Enhanced-For-Loop 175 127 102 hours, 5 minutes
Replace For-Loop with Stream::findFirst 196 133 58 hours, 48 minutes
Replace For-Loop with Stream::forEach 3842 1670 9605 hours
Replace For-Loop with Stream::Match 196 130 65 hours, 20 minutes
Replace For-Loop with Stream::sum 1 1 10 minutes
Replace indexOf() with contains() 18 13 2 hours, 24 minutes
Replace Inefficient Constructors with valueOf() 250 45 104 hours, 10 minutes
Replace JUnit Expected Annotation Property with assertThrows 2 2 10 minutes
Replace JUnit Timeout Annotation Property with assertTimeout 3 1 15 minutes
Replace Map::get by Map::getOrDefault 1 1 2 minutes
Replace Nested Loops with flatMap 8 8 4 hours
Replace put(..) with putIfAbsent(..) 49 38 13 hours, 4 minutes
Replace static final Collections with Collections.unmodifiable...() 29 22 29 hours
Replace While-Loop with Enhanced For-Loop 68 26 45 hours, 20 minutes
Reuse Random Objects 91 44 53 hours, 5 minutes
Split Multiple Variable Declarations 558 279 148 hours, 48 minutes
StringBuffer() to StringBuilder() 84 61 16 hours, 48 minutes
Use @Override Annotation 5400 1505 4050 hours
Use Arrays Stream 7 6 1 hour, 45 minutes
Use BufferedReader::lines 22 17 9 hours, 10 minutes
Use Collections Singleton List 195 78 52 hours
Use Comparator Methods 3 3 45 minutes
Use equals() on Primitive Objects 42 30 11 hours, 12 minutes
Use Factory Methods for Collections 16 7 2 hours, 40 minutes
Use Files.newBufferedReader 5 5 25 minutes
Use Files.newBufferedWriter 1 1 5 minutes
Use Files.writeString 1 1 5 minutes
Use Functional Interfaces 474 265 276 hours, 30 minutes
Use Guard Condition 2589 1667 2157 hours, 30 minutes
Use Local Variable Type Inference 35676 3122 2378 hours, 24 minutes
Use Multi Catch 166 52 83 hours
Use Offset Based String Methods 3 2 30 minutes
Use Optional::filter 1 1 2 minutes
Use Optional::ifPresent 4 4 16 minutes
Use Optional::map 3 3 6 minutes
Use Portable Newline 66 33 8 hours, 48 minutes
Use Predefined Standard Charset 20 14 3 hours, 20 minutes
Use SecureRandom 239 119 199 hours, 10 minutes
Use Stream::collect 120 92 180 hours
Use Stream::filter 542 359 451 hours, 40 minutes
Use Stream::map 246 201 615 hours
Use String Join 9 8 4 hours, 30 minutes
Use String Literals 14 8 4 hours, 40 minutes
Use StringBuilder::append 10432 3727 3477 hours, 20 minutes
Use Try-With-Resource 39 21 58 hours, 30 minutes
* One Java file could contain more than one Java class.