PMD Results

The following document contains the results of PMD 7.17.0.

Violations By Priority

Priority 1

fr/univtln/bruno/samples/java101/tp3/Demo.java

Rule Violation Line
ClassWithOnlyPrivateConstructorsShouldBeFinal This class has only private constructors and may be final 20

fr/univtln/bruno/samples/java101/tp3/bestpractices/CollectionBestPractices.java

Rule Violation Line
ClassWithOnlyPrivateConstructorsShouldBeFinal This class has only private constructors and may be final 11

fr/univtln/bruno/samples/java101/tp3/eclipse/EclipseCollectionsExamples.java

Rule Violation Line
ClassWithOnlyPrivateConstructorsShouldBeFinal This class has only private constructors and may be final 16

fr/univtln/bruno/samples/java101/tp3/functional/AppliedFunctionnalExamples.java

Rule Violation Line
ClassWithOnlyPrivateConstructorsShouldBeFinal This class has only private constructors and may be final 17

fr/univtln/bruno/samples/java101/tp3/functional/CollectorsExamples.java

Rule Violation Line
ClassWithOnlyPrivateConstructorsShouldBeFinal This class has only private constructors and may be final 17

fr/univtln/bruno/samples/java101/tp3/functional/DebuggingExamples.java

Rule Violation Line
ClassWithOnlyPrivateConstructorsShouldBeFinal This class has only private constructors and may be final 11

fr/univtln/bruno/samples/java101/tp3/functional/GroupingDisplayExamples.java

Rule Violation Line
ClassWithOnlyPrivateConstructorsShouldBeFinal This class has only private constructors and may be final 14

fr/univtln/bruno/samples/java101/tp3/functional/MappingAndSortingExamples.java

Rule Violation Line
ClassWithOnlyPrivateConstructorsShouldBeFinal This class has only private constructors and may be final 14

fr/univtln/bruno/samples/java101/tp3/functional/StreamBasicsExamples.java

Rule Violation Line
ClassWithOnlyPrivateConstructorsShouldBeFinal This class has only private constructors and may be final 17

fr/univtln/bruno/samples/java101/tp3/guava/GuavaExamples.java

Rule Violation Line
ClassWithOnlyPrivateConstructorsShouldBeFinal This class has only private constructors and may be final 17

fr/univtln/bruno/samples/java101/tp3/list/ListExamples.java

Rule Violation Line
ClassWithOnlyPrivateConstructorsShouldBeFinal This class has only private constructors and may be final 16

fr/univtln/bruno/samples/java101/tp3/map/MapExamples.java

Rule Violation Line
ClassWithOnlyPrivateConstructorsShouldBeFinal This class has only private constructors and may be final 15

fr/univtln/bruno/samples/java101/tp3/queue/QueueExamples.java

Rule Violation Line
ClassWithOnlyPrivateConstructorsShouldBeFinal This class has only private constructors and may be final 12

fr/univtln/bruno/samples/java101/tp3/set/DedupCollections.java

Rule Violation Line
ClassWithOnlyPrivateConstructorsShouldBeFinal This class has only private constructors and may be final 22

fr/univtln/bruno/samples/java101/tp3/set/SetExamples.java

Rule Violation Line
ClassWithOnlyPrivateConstructorsShouldBeFinal This class has only private constructors and may be final 15

fr/univtln/bruno/samples/java101/tp3/BookTest.java

Rule Violation Line
MethodNamingConventions The JUnit 5 test method name 'of_validatesArguments' doesn't match '[a-z][a-zA-Z0-9]*' 12
MethodNamingConventions The JUnit 5 test method name 'compareTo_consistent_ordering' doesn't match '[a-z][a-zA-Z0-9]*' 21

fr/univtln/bruno/samples/java101/tp3/CompareConsistencyTest.java

Rule Violation Line
MethodNamingConventions The JUnit 5 test method name 'person_compareTo_consistentWithEquals' doesn't match '[a-z][a-zA-Z0-9]*' 10
MethodNamingConventions The JUnit 5 test method name 'book_compareTo_consistentWithEquals' doesn't match '[a-z][a-zA-Z0-9]*' 18

fr/univtln/bruno/samples/java101/tp3/PersonTest.java

Rule Violation Line
MethodNamingConventions The JUnit 5 test method name 'of_validatesArguments' doesn't match '[a-z][a-zA-Z0-9]*' 10
MethodNamingConventions The JUnit 5 test method name 'compareTo_ordersByLastThenFirstThenAge' doesn't match '[a-z][a-zA-Z0-9]*' 22
MethodNamingConventions The JUnit 5 test method name 'fullName_returnsConcatenation' doesn't match '[a-z][a-zA-Z0-9]*' 34

Priority 2

fr/univtln/bruno/samples/java101/tp3/Book.java

Rule Violation Line
SystemPrintln Usage of System.out/err 79
SystemPrintln Usage of System.out/err 82
SystemPrintln Usage of System.out/err 85
SystemPrintln Usage of System.out/err 88

fr/univtln/bruno/samples/java101/tp3/Person.java

Rule Violation Line
SystemPrintln Usage of System.out/err 91
SystemPrintln Usage of System.out/err 95
SystemPrintln Usage of System.out/err 98
SystemPrintln Usage of System.out/err 101

fr/univtln/bruno/samples/java101/tp3/bestpractices/CollectionBestPractices.java

Rule Violation Line
GuardLogStatement Logger calls should be surrounded by log level guards. 38
GuardLogStatement Logger calls should be surrounded by log level guards. 39
GuardLogStatement Logger calls should be surrounded by log level guards. 74
GuardLogStatement Logger calls should be surrounded by log level guards. 88
GuardLogStatement Logger calls should be surrounded by log level guards. 92
GuardLogStatement Logger calls should be surrounded by log level guards. 248
GuardLogStatement Logger calls should be surrounded by log level guards. 249
GuardLogStatement Logger calls should be surrounded by log level guards. 261
GuardLogStatement Logger calls should be surrounded by log level guards. 283
GuardLogStatement Logger calls should be surrounded by log level guards. 285

fr/univtln/bruno/samples/java101/tp3/comparable/ComparatorExamples.java

Rule Violation Line
GuardLogStatement Logger calls should be surrounded by log level guards. 63
GuardLogStatement Logger calls should be surrounded by log level guards. 76
GuardLogStatement Logger calls should be surrounded by log level guards. 89
GuardLogStatement Logger calls should be surrounded by log level guards. 129
GuardLogStatement Logger calls should be surrounded by log level guards. 267

fr/univtln/bruno/samples/java101/tp3/functional/AppliedFunctionnalExamples.java

Rule Violation Line
GuardLogStatement Logger calls should be surrounded by log level guards. 36
GuardLogStatement Logger calls should be surrounded by log level guards. 37

fr/univtln/bruno/samples/java101/tp3/functional/CollectorsExamples.java

Rule Violation Line
GuardLogStatement Logger calls should be surrounded by log level guards. 36

fr/univtln/bruno/samples/java101/tp3/functional/DedupExamples.java

Rule Violation Line
GuardLogStatement Logger calls should be surrounded by log level guards. 27

fr/univtln/bruno/samples/java101/tp3/functional/GroupingDisplayExamples.java

Rule Violation Line
GuardLogStatement Logger calls should be surrounded by log level guards. 39

fr/univtln/bruno/samples/java101/tp3/functional/MappingAndSortingExamples.java

Rule Violation Line
GuardLogStatement Logger calls should be surrounded by log level guards. 31
GuardLogStatement Logger calls should be surrounded by log level guards. 43
GuardLogStatement Logger calls should be surrounded by log level guards. 55
GuardLogStatement Logger calls should be surrounded by log level guards. 81
GuardLogStatement Logger calls should be surrounded by log level guards. 82
GuardLogStatement Logger calls should be surrounded by log level guards. 83

fr/univtln/bruno/samples/java101/tp3/functional/ParallelStreamsExamples.java

Rule Violation Line
GuardLogStatement Logger calls should be surrounded by log level guards. 30
GuardLogStatement Logger calls should be surrounded by log level guards. 36
GuardLogStatement Logger calls should be surrounded by log level guards. 37
GuardLogStatement Logger calls should be surrounded by log level guards. 38
GuardLogStatement Logger calls should be surrounded by log level guards. 52

fr/univtln/bruno/samples/java101/tp3/functional/StreamBasicsExamples.java

Rule Violation Line
GuardLogStatement Logger calls should be surrounded by log level guards. 31
GuardLogStatement Logger calls should be surrounded by log level guards. 32
GuardLogStatement Logger calls should be surrounded by log level guards. 33
GuardLogStatement Logger calls should be surrounded by log level guards. 34
GuardLogStatement Logger calls should be surrounded by log level guards. 35
GuardLogStatement Logger calls should be surrounded by log level guards. 36
GuardLogStatement Logger calls should be surrounded by log level guards. 37
GuardLogStatement Logger calls should be surrounded by log level guards. 38
GuardLogStatement Logger calls should be surrounded by log level guards. 57
GuardLogStatement Logger calls should be surrounded by log level guards. 60
GuardLogStatement Logger calls should be surrounded by log level guards. 70
GuardLogStatement Logger calls should be surrounded by log level guards. 71
GuardLogStatement Logger calls should be surrounded by log level guards. 72
GuardLogStatement Logger calls should be surrounded by log level guards. 81
GuardLogStatement Logger calls should be surrounded by log level guards. 83
GuardLogStatement Logger calls should be surrounded by log level guards. 92
GuardLogStatement Logger calls should be surrounded by log level guards. 93
GuardLogStatement Logger calls should be surrounded by log level guards. 94
GuardLogStatement Logger calls should be surrounded by log level guards. 95
GuardLogStatement Logger calls should be surrounded by log level guards. 125
GuardLogStatement Logger calls should be surrounded by log level guards. 126
GuardLogStatement Logger calls should be surrounded by log level guards. 135
GuardLogStatement Logger calls should be surrounded by log level guards. 136

fr/univtln/bruno/samples/java101/tp3/guava/GuavaExamples.java

Rule Violation Line
GuardLogStatement Logger calls should be surrounded by log level guards. 36

fr/univtln/bruno/samples/java101/tp3/list/ListExamples.java

Rule Violation Line
GuardLogStatement Logger calls should be surrounded by log level guards. 33
GuardLogStatement Logger calls should be surrounded by log level guards. 35
GuardLogStatement Logger calls should be surrounded by log level guards. 36
GuardLogStatement Logger calls should be surrounded by log level guards. 39
GuardLogStatement Logger calls should be surrounded by log level guards. 42
GuardLogStatement Logger calls should be surrounded by log level guards. 54
GuardLogStatement Logger calls should be surrounded by log level guards. 57
GuardLogStatement Logger calls should be surrounded by log level guards. 60
GuardLogStatement Logger calls should be surrounded by log level guards. 129

fr/univtln/bruno/samples/java101/tp3/map/MapExamples.java

Rule Violation Line
GuardLogStatement Logger calls should be surrounded by log level guards. 32
GuardLogStatement Logger calls should be surrounded by log level guards. 33
GuardLogStatement Logger calls should be surrounded by log level guards. 35
GuardLogStatement Logger calls should be surrounded by log level guards. 36
GuardLogStatement Logger calls should be surrounded by log level guards. 39
GuardLogStatement Logger calls should be surrounded by log level guards. 65
GuardLogStatement Logger calls should be surrounded by log level guards. 77
GuardLogStatement Logger calls should be surrounded by log level guards. 101

fr/univtln/bruno/samples/java101/tp3/queue/QueueExamples.java

Rule Violation Line
GuardLogStatement Logger calls should be surrounded by log level guards. 29
GuardLogStatement Logger calls should be surrounded by log level guards. 30
GuardLogStatement Logger calls should be surrounded by log level guards. 45
GuardLogStatement Logger calls should be surrounded by log level guards. 57
GuardLogStatement Logger calls should be surrounded by log level guards. 71
GuardLogStatement Logger calls should be surrounded by log level guards. 76
GuardLogStatement Logger calls should be surrounded by log level guards. 89
GuardLogStatement Logger calls should be surrounded by log level guards. 96
GuardLogStatement Logger calls should be surrounded by log level guards. 119

fr/univtln/bruno/samples/java101/tp3/set/SetExamples.java

Rule Violation Line
GuardLogStatement Logger calls should be surrounded by log level guards. 36
GuardLogStatement Logger calls should be surrounded by log level guards. 107
GuardLogStatement Logger calls should be surrounded by log level guards. 108

Priority 3

fr/univtln/bruno/samples/java101/tp3/Book.java

Rule Violation Line
ShortMethodName Avoid using short method names 37
CyclomaticComplexity The method 'of(String, String, String, LocalDate, double)' has a cyclomatic complexity of 14. 37
MethodArgumentCouldBeFinal Parameter 'isbn' is not assigned and could be declared final 37
MethodArgumentCouldBeFinal Parameter 'title' is not assigned and could be declared final 37
MethodArgumentCouldBeFinal Parameter 'author' is not assigned and could be declared final 37
MethodArgumentCouldBeFinal Parameter 'publishedDate' is not assigned and could be declared final 37
MethodArgumentCouldBeFinal Parameter 'price' is not assigned and could be declared final 37
ControlStatementBraces This statement should have braces 38
ControlStatementBraces This statement should have braces 39
ControlStatementBraces This statement should have braces 40
ControlStatementBraces This statement should have braces 41
ControlStatementBraces This statement should have braces 42
OverrideBothEqualsAndHashCodeOnComparable When implementing Comparable, both equals() and hashCode() should be overridden 53
MethodArgumentCouldBeFinal Parameter 'other' is not assigned and could be declared final 53
ControlStatementBraces This statement should have braces 54
LocalVariableCouldBeFinal Local variable 'b' could be declared final 78
LocalVariableCouldBeFinal Local variable 'cheaper' could be declared final 81
LocalVariableCouldBeFinal Local variable 'renamed' could be declared final 84

fr/univtln/bruno/samples/java101/tp3/Person.java

Rule Violation Line
ShortMethodName Avoid using short method names 47
MethodArgumentCouldBeFinal Parameter 'firstName' is not assigned and could be declared final 47
MethodArgumentCouldBeFinal Parameter 'lastName' is not assigned and could be declared final 47
MethodArgumentCouldBeFinal Parameter 'age' is not assigned and could be declared final 47
LocalVariableCouldBeFinal Local variable 'fn' could be declared final 50
PrematureDeclaration Declaration of 'ln' can be moved closer to its usages 51
LocalVariableCouldBeFinal Local variable 'ln' could be declared final 51
ControlStatementBraces This statement should have braces 52
ControlStatementBraces This statement should have braces 53
ControlStatementBraces This statement should have braces 54
OverrideBothEqualsAndHashCodeOnComparable When implementing Comparable, both equals() and hashCode() should be overridden 65
MethodArgumentCouldBeFinal Parameter 'other' is not assigned and could be declared final 65
LocalVariableCouldBeFinal Local variable 'p' could be declared final 90
LocalVariableCouldBeFinal Local variable 'older' could be declared final 94
LocalVariableCouldBeFinal Local variable 'renamed' could be declared final 97

fr/univtln/bruno/samples/java101/tp3/bestpractices/CollectionBestPractices.java

Rule Violation Line
LocalVariableCouldBeFinal Local variable 'bad' could be declared final 34
LocalVariableCouldBeFinal Local variable 'exposed' could be declared final 36
MethodArgumentCouldBeFinal Parameter 'item' is not assigned and could be declared final 49
LocalVariableCouldBeFinal Local variable 'good' could be declared final 54
LocalVariableCouldBeFinal Local variable 'copy' could be declared final 56
LocalVariableCouldBeFinal Local variable 'arrayList' could be declared final 70
LooseCoupling Avoid using implementation types like 'LinkedList'; use the interface instead 76
LocalVariableCouldBeFinal Local variable 'linkedList' could be declared final 76
LocalVariableCouldBeFinal Local variable 'hashSet' could be declared final 81
LooseCoupling Avoid using implementation types like 'TreeSet'; use the interface instead 86
LocalVariableCouldBeFinal Local variable 'treeSet' could be declared final 86
LocalVariableCouldBeFinal Local variable 'hashMap' could be declared final 90
AvoidDuplicateLiterals The String literal "Alice" appears 5 times in this file; the first occurrence is on line 91 91
LocalVariableCouldBeFinal Local variable 'immutableList' could be declared final 100
LocalVariableCouldBeFinal Local variable 'immutableSet' could be declared final 101
LocalVariableCouldBeFinal Local variable 'immutableMap' could be declared final 102
LocalVariableCouldBeFinal Local variable 'mutable' could be declared final 112
LocalVariableCouldBeFinal Local variable 'copy' could be declared final 113
UnusedLocalVariable Avoid unused local variables such as 'emptyList'. 124
UnusedLocalVariable Avoid unused local variables such as 'emptySet'. 125
UnusedLocalVariable Avoid unused local variables such as 'emptyMap'. 126
LocalVariableCouldBeFinal Local variable 'singletonList' could be declared final 129
LocalVariableCouldBeFinal Local variable 'singletonSet' could be declared final 130
LocalVariableCouldBeFinal Local variable 'singletonMap' could be declared final 131
LocalVariableCouldBeFinal Local variable 'modernList' could be declared final 134
LocalVariableCouldBeFinal Local variable 'modernSet' could be declared final 135
LocalVariableCouldBeFinal Local variable 'modernMap' could be declared final 136
UnusedLocalVariable Avoid unused local variables such as 'withCapacity'. 139
UnusedLocalVariable Avoid unused local variables such as 'mapWithCapacity'. 140
AvoidCatchingNPE Avoid catching NullPointerException; consider removing the cause of the NPE. 151
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 151
LocalVariableCouldBeFinal Local variable 'arrayList' could be declared final 154
LocalVariableCouldBeFinal Local variable 'hashMap' could be declared final 159
LocalVariableCouldBeFinal Local variable 'ts' could be declared final 165
AvoidCatchingNPE Avoid catching NullPointerException; consider removing the cause of the NPE. 167
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 167
LocalVariableCouldBeFinal Local variable 'scores' could be declared final 170
LocalVariableCouldBeFinal Local variable 'bobScore' could be declared final 172
LocalVariableCouldBeFinal Local variable 'item' could be declared final 183
LiteralsFirstInComparisons Position literals first in String comparisons 184
ControlStatementBraces This statement should have braces 184
LocalVariableCouldBeFinal Local variable 'it' could be declared final 191
LiteralsFirstInComparisons Position literals first in String comparisons 193
ControlStatementBraces This statement should have braces 193
LocalVariableCouldBeFinal Local variable 'filtered' could be declared final 202
LiteralsFirstInComparisons Position literals first in String comparisons 202
NPathComplexity The method 'performanceExample()' has an NPath complexity of 256, current threshold is 200 209
LocalVariableCouldBeFinal Local variable 'size' could be declared final 211
LocalVariableCouldBeFinal Local variable 'arrayList' could be declared final 212
ControlStatementBraces This statement should have braces 213
UnusedLocalVariable Avoid unused local variables such as 'sum'. 215
ControlStatementBraces This statement should have braces 216
LocalVariableCouldBeFinal Local variable 'arrayNs' could be declared final 217
LocalVariableCouldBeFinal Local variable 'linkedList' could be declared final 219
ControlStatementBraces This statement should have braces 220
ControlStatementBraces This statement should have braces 223
LocalVariableCouldBeFinal Local variable 'linkedNs' could be declared final 224
LocalVariableCouldBeFinal Local variable 'hashSet' could be declared final 227
ControlStatementBraces This statement should have braces 228
ControlStatementBraces This statement should have braces 230
UselessPureMethodCall Do not call pure method contains if the result is not used. 230
LocalVariableCouldBeFinal Local variable 'hashNs' could be declared final 231
LocalVariableCouldBeFinal Local variable 'treeSet' could be declared final 232
ControlStatementBraces This statement should have braces 233
ControlStatementBraces This statement should have braces 235
UselessPureMethodCall Do not call pure method contains if the result is not used. 235
LocalVariableCouldBeFinal Local variable 'treeNs' could be declared final 236
LocalVariableCouldBeFinal Local variable 'list1' could be declared final 246
LocalVariableCouldBeFinal Local variable 'list2' could be declared final 247
CompareObjectsWithEquals Use equals() to compare object references. 248
MethodArgumentCouldBeFinal Parameter 'n' is not assigned and could be declared final 254
LocalVariableCouldBeFinal Local variable 'badSet' could be declared final 258
MethodArgumentCouldBeFinal Parameter 'v' is not assigned and could be declared final 266
MethodArgumentCouldBeFinal Parameter 'o' is not assigned and could be declared final 276
LocalVariableCouldBeFinal Local variable 'map' could be declared final 280
LocalVariableCouldBeFinal Local variable 'key' could be declared final 281
LocalVariableCouldBeFinal Local variable 'fixed' could be declared final 287

fr/univtln/bruno/samples/java101/tp3/comparable/ComparatorExamples.java

Rule Violation Line
UseUtilityClass All methods are static. Consider adding a private no-args constructor to prevent instantiation. 25
LocalVariableCouldBeFinal Local variable 'people' could be declared final 31
AvoidDuplicateLiterals The String literal "Charlie" appears 6 times in this file; the first occurrence is on line 32 32
AvoidDuplicateLiterals The String literal "Brown" appears 6 times in this file; the first occurrence is on line 32 32
AvoidDuplicateLiterals The String literal "Alice" appears 8 times in this file; the first occurrence is on line 33 33
AvoidDuplicateLiterals The String literal "Smith" appears 6 times in this file; the first occurrence is on line 33 33
AvoidDuplicateLiterals The String literal "Bob" appears 6 times in this file; the first occurrence is on line 34 34
AvoidDuplicateLiterals The String literal "Jones" appears 5 times in this file; the first occurrence is on line 34 34
LocalVariableCouldBeFinal Local variable 'people' could be declared final 48
UseDiamondOperator Explicit type arguments can be replaced by a diamond: `new Comparator<>()` 56
MethodArgumentCouldBeFinal Parameter 'a' is not assigned and could be declared final 58
MethodArgumentCouldBeFinal Parameter 'b' is not assigned and could be declared final 58
MethodArgumentCouldBeFinal Parameter 'a' is not assigned and could be declared final 71
MethodArgumentCouldBeFinal Parameter 'b' is not assigned and could be declared final 71
UseDiamondOperator Explicit type arguments can be replaced by a diamond: `new Comparator<>()` 82
MethodArgumentCouldBeFinal Parameter 'a' is not assigned and could be declared final 84
MethodArgumentCouldBeFinal Parameter 'b' is not assigned and could be declared final 84
LocalVariableCouldBeFinal Local variable 'people' could be declared final 100
LocalVariableCouldBeFinal Local variable 'lastNameCmp' could be declared final 109
MethodArgumentCouldBeFinal Parameter 'a' is not assigned and could be declared final 111
MethodArgumentCouldBeFinal Parameter 'b' is not assigned and could be declared final 111
LocalVariableCouldBeFinal Local variable 'firstNameCmp' could be declared final 115
MethodArgumentCouldBeFinal Parameter 'a' is not assigned and could be declared final 117
MethodArgumentCouldBeFinal Parameter 'b' is not assigned and could be declared final 117
LocalVariableCouldBeFinal Local variable 'ageCmp' could be declared final 121
MethodArgumentCouldBeFinal Parameter 'a' is not assigned and could be declared final 123
MethodArgumentCouldBeFinal Parameter 'b' is not assigned and could be declared final 123
LocalVariableCouldBeFinal Local variable 'words' could be declared final 142
LocalVariableCouldBeFinal Local variable 'natural' could be declared final 143
LocalVariableCouldBeFinal Local variable 'reversed' could be declared final 145
LocalVariableCouldBeFinal Local variable 'ci' could be declared final 147
LocalVariableCouldBeFinal Local variable 'byLen' could be declared final 150
UseDiamondOperator Explicit type arguments can be replaced by a diamond: `new Comparator<>()` 151
MethodArgumentCouldBeFinal Parameter 'a' is not assigned and could be declared final 153
MethodArgumentCouldBeFinal Parameter 'b' is not assigned and could be declared final 153
LocalVariableCouldBeFinal Local variable 'lenThenAlpha' could be declared final 158
UseDiamondOperator Explicit type arguments can be replaced by a diamond: `new Comparator<>()` 159
MethodArgumentCouldBeFinal Parameter 'a' is not assigned and could be declared final 161
MethodArgumentCouldBeFinal Parameter 'b' is not assigned and could be declared final 161
LocalVariableCouldBeFinal Local variable 'c' could be declared final 162
ControlStatementBraces This statement should have braces 163
LocalVariableCouldBeFinal Local variable 'withNulls' could be declared final 188
LocalVariableCouldBeFinal Local variable 'nullsFirst' could be declared final 189
LocalVariableCouldBeFinal Local variable 'nullsLast' could be declared final 191
LocalVariableCouldBeFinal Local variable 'books' could be declared final 202
LocalVariableCouldBeFinal Local variable 'byPrice' could be declared final 212
UseDiamondOperator Explicit type arguments can be replaced by a diamond: `new Comparator<>()` 213
MethodArgumentCouldBeFinal Parameter 'a' is not assigned and could be declared final 215
MethodArgumentCouldBeFinal Parameter 'b' is not assigned and could be declared final 215
LocalVariableCouldBeFinal Local variable 'byDateDesc' could be declared final 220
MethodArgumentCouldBeFinal Parameter 'a' is not assigned and could be declared final 223
MethodArgumentCouldBeFinal Parameter 'b' is not assigned and could be declared final 223
LocalVariableCouldBeFinal Local variable 'byAuthorPrice' could be declared final 228
UseDiamondOperator Explicit type arguments can be replaced by a diamond: `new Comparator<>()` 229
MethodArgumentCouldBeFinal Parameter 'a' is not assigned and could be declared final 231
MethodArgumentCouldBeFinal Parameter 'b' is not assigned and could be declared final 231
LocalVariableCouldBeFinal Local variable 'c' could be declared final 232
ControlStatementBraces This statement should have braces 233
LocalVariableCouldBeFinal Local variable 'people' could be declared final 253
LocalVariableCouldBeFinal Local variable 'ageComparator' could be declared final 259
MethodArgumentCouldBeFinal Parameter 'a' is not assigned and could be declared final 261
MethodArgumentCouldBeFinal Parameter 'b' is not assigned and could be declared final 261
LocalVariableCouldBeFinal Local variable 'youngest' could be declared final 265
LocalVariableCouldBeFinal Local variable 'oldest' could be declared final 266
LocalVariableCouldBeFinal Local variable 'anonymous' could be declared final 276
MethodArgumentCouldBeFinal Parameter 'a' is not assigned and could be declared final 277
MethodArgumentCouldBeFinal Parameter 'b' is not assigned and could be declared final 277
UnusedLocalVariable Avoid unused local variables such as 'lambda'. 281
LocalVariableCouldBeFinal Local variable 'methodRef' could be declared final 283
MethodArgumentCouldBeFinal Parameter 'a' is not assigned and could be declared final 285
MethodArgumentCouldBeFinal Parameter 'b' is not assigned and could be declared final 285
LocalVariableCouldBeFinal Local variable 'people' could be declared final 289

fr/univtln/bruno/samples/java101/tp3/eclipse/EclipseCollectionsExamples.java

Rule Violation Line
LocalVariableCouldBeFinal Local variable 'list' could be declared final 29
LocalVariableCouldBeFinal Local variable 'sum' could be declared final 30

fr/univtln/bruno/samples/java101/tp3/functional/AppliedFunctionnalExamples.java

Rule Violation Line
LocalVariableCouldBeFinal Local variable 'people' could be declared final 31
LocalVariableCouldBeFinal Local variable 'people' could be declared final 45
LocalVariableCouldBeFinal Local variable 'byLast' could be declared final 51

fr/univtln/bruno/samples/java101/tp3/functional/CollectorsExamples.java

Rule Violation Line
LocalVariableCouldBeFinal Local variable 'nums' could be declared final 29
LocalVariableCouldBeFinal Local variable 'evenCount' could be declared final 30
LocalVariableCouldBeFinal Local variable 'anyGt4' could be declared final 31
LocalVariableCouldBeFinal Local variable 'allPositive' could be declared final 32
LocalVariableCouldBeFinal Local variable 'noneNegative' could be declared final 33
LocalVariableCouldBeFinal Local variable 'firstGt3' could be declared final 34
LocalVariableCouldBeFinal Local variable 'people' could be declared final 44
LocalVariableCouldBeFinal Local variable 'byLast' could be declared final 46
LocalVariableCouldBeFinal Local variable 'counts' could be declared final 48
LocalVariableCouldBeFinal Local variable 'books' could be declared final 58
LocalVariableCouldBeFinal Local variable 'titlesByAuthor' could be declared final 64

fr/univtln/bruno/samples/java101/tp3/functional/DebuggingExamples.java

Rule Violation Line
LocalVariableCouldBeFinal Local variable 'nums' could be declared final 23
LocalVariableCouldBeFinal Local variable 'result' could be declared final 24
LocalVariableCouldBeFinal Local variable 'empty' could be declared final 39

fr/univtln/bruno/samples/java101/tp3/functional/DedupExamples.java

Rule Violation Line
MethodArgumentCouldBeFinal Parameter 'withDup' is not assigned and could be declared final 26
MethodArgumentCouldBeFinal Parameter 'withDup' is not assigned and could be declared final 35
LocalVariableCouldBeFinal Local variable 'ordered' could be declared final 36
UseExplicitTypes Use Explicit Types 36

fr/univtln/bruno/samples/java101/tp3/functional/GroupingDisplayExamples.java

Rule Violation Line
MethodArgumentCouldBeFinal Parameter 'people' is not assigned and could be declared final 26
LocalVariableCouldBeFinal Local variable 'byLast' could be declared final 27
MethodArgumentCouldBeFinal Parameter 'people' is not assigned and could be declared final 37
MethodArgumentCouldBeFinal Parameter 'threshold' is not assigned and could be declared final 37
LocalVariableCouldBeFinal Local variable 'part' could be declared final 38
UseExplicitTypes Use Explicit Types 38

fr/univtln/bruno/samples/java101/tp3/functional/MappingAndSortingExamples.java

Rule Violation Line
MethodArgumentCouldBeFinal Parameter 'people' is not assigned and could be declared final 29
MethodArgumentCouldBeFinal Parameter 'people' is not assigned and could be declared final 41
MethodArgumentCouldBeFinal Parameter 'books' is not assigned and could be declared final 53
MethodArgumentCouldBeFinal Parameter 'people' is not assigned and could be declared final 65
MethodArgumentCouldBeFinal Parameter 'books' is not assigned and could be declared final 75
LocalVariableCouldBeFinal Local variable 'byPrice' could be declared final 77
LocalVariableCouldBeFinal Local variable 'byDateDesc' could be declared final 78
LocalVariableCouldBeFinal Local variable 'byAuthorPrice' could be declared final 79

fr/univtln/bruno/samples/java101/tp3/functional/ParallelStreamsExamples.java

Rule Violation Line
UseUtilityClass All methods are static. Consider adding a private no-args constructor to prevent instantiation. 17
LocalVariableCouldBeFinal Local variable 'data' could be declared final 24
LocalVariableCouldBeFinal Local variable 't0' could be declared final 26
LocalVariableCouldBeFinal Local variable 'sumSeq' could be declared final 27
LocalVariableCouldBeFinal Local variable 't1' could be declared final 28
LocalVariableCouldBeFinal Local variable 'sumParStart' could be declared final 32
LocalVariableCouldBeFinal Local variable 'sumPar' could be declared final 33
LocalVariableCouldBeFinal Local variable 'sumParEnd' could be declared final 34
LocalVariableCouldBeFinal Local variable 'data' could be declared final 47
LocalVariableCouldBeFinal Local variable 'counter' could be declared final 49
LocalVariableCouldBeFinal Local variable 'reduced' could be declared final 54

fr/univtln/bruno/samples/java101/tp3/functional/StreamBasicsExamples.java

Rule Violation Line
LocalVariableCouldBeFinal Local variable 'fromList' could be declared final 29
LocalVariableCouldBeFinal Local variable 'people' could be declared final 49
LocalVariableCouldBeFinal Local variable 'age30' could be declared final 56
LocalVariableCouldBeFinal Local variable 'complex' could be declared final 59
LocalVariableCouldBeFinal Local variable 'people' could be declared final 69
LocalVariableCouldBeFinal Local variable 'nested' could be declared final 80
LocalVariableCouldBeFinal Local variable 'sentences' could be declared final 82
LocalVariableCouldBeFinal Local variable 'nums' could be declared final 91
LocalVariableCouldBeFinal Local variable 'nums' could be declared final 103
LocalVariableCouldBeFinal Local variable 'result' could be declared final 105
LocalVariableCouldBeFinal Local variable 'people' could be declared final 124
LocalVariableCouldBeFinal Local variable 'numbers' could be declared final 134

fr/univtln/bruno/samples/java101/tp3/guava/GuavaExamples.java

Rule Violation Line
LocalVariableCouldBeFinal Local variable 'mm' could be declared final 30
LocalVariableCouldBeFinal Local variable 'k' could be declared final 35

fr/univtln/bruno/samples/java101/tp3/list/ListExamples.java

Rule Violation Line
LocalVariableCouldBeFinal Local variable 'people' could be declared final 28
AvoidDuplicateLiterals The String literal "Alice" appears 5 times in this file; the first occurrence is on line 29 29
AvoidDuplicateLiterals The String literal "Smith" appears 5 times in this file; the first occurrence is on line 29 29
LooseCoupling Avoid using implementation types like 'LinkedList'; use the interface instead 50
LocalVariableCouldBeFinal Local variable 'people' could be declared final 50
LocalVariableCouldBeFinal Local variable 'polled' could be declared final 56
ControlStatementBraces This statement should have braces 57
LocalVariableCouldBeFinal Local variable 'popped' could be declared final 59
ControlStatementBraces This statement should have braces 60
LocalVariableCouldBeFinal Local variable 'immutable' could be declared final 68
LocalVariableCouldBeFinal Local variable 'backing' could be declared final 71
LocalVariableCouldBeFinal Local variable 'unmodifiable' could be declared final 72
LocalVariableCouldBeFinal Local variable 'numbers' could be declared final 82
LocalVariableCouldBeFinal Local variable 'slice' could be declared final 83
LocalVariableCouldBeFinal Local variable 'people' could be declared final 99
LocalVariableCouldBeFinal Local variable 'items' could be declared final 119
LocalVariableCouldBeFinal Local variable 'i' could be declared final 120
LambdaCanBeMethodReference Lambda expression could be written as a method reference: `"B"::equals` 125
LocalVariableCouldBeFinal Local variable 'listIt' could be declared final 127

fr/univtln/bruno/samples/java101/tp3/map/MapExamples.java

Rule Violation Line
LocalVariableCouldBeFinal Local variable 'people' could be declared final 27
AvoidDuplicateLiterals The String literal "P001" appears 5 times in this file; the first occurrence is on line 28 28
AvoidDuplicateLiterals The String literal "Alice" appears 7 times in this file; the first occurrence is on line 28 28
AvoidDuplicateLiterals The String literal "Smith" appears 4 times in this file; the first occurrence is on line 28 28
AvoidDuplicateLiterals The String literal "Bob" appears 7 times in this file; the first occurrence is on line 29 29
AvoidDuplicateLiterals The String literal "Charlie" appears 4 times in this file; the first occurrence is on line 30 30
LocalVariableCouldBeFinal Local variable 'prev' could be declared final 34
LocalVariableCouldBeFinal Local variable 'capitals' could be declared final 47
LocalVariableCouldBeFinal Local variable 'capitals' could be declared final 59
LocalVariableCouldBeFinal Local variable 'scores' could be declared final 73
LocalVariableCouldBeFinal Local variable 'ages' could be declared final 100
ControlStatementBraces This statement should have braces 101
LocalVariableCouldBeFinal Local variable 'e' could be declared final 101
LocalVariableCouldBeFinal Local variable 'words' could be declared final 111
LocalVariableCouldBeFinal Local variable 'manual' could be declared final 112
ControlStatementBraces This statement should have braces 113
LocalVariableCouldBeFinal Local variable 'w' could be declared final 113
LocalVariableCouldBeFinal Local variable 'mergeMap' could be declared final 114
LocalVariableCouldBeFinal Local variable 'people' could be declared final 125
LocalVariableCouldBeFinal Local variable 'm1' could be declared final 139
LocalVariableCouldBeFinal Local variable 'backing' could be declared final 146
LocalVariableCouldBeFinal Local variable 'view' could be declared final 147

fr/univtln/bruno/samples/java101/tp3/queue/QueueExamples.java

Rule Violation Line
LocalVariableCouldBeFinal Local variable 'q' could be declared final 24
LocalVariableCouldBeFinal Local variable 'd' could be declared final 40
LocalVariableCouldBeFinal Local variable 'stack' could be declared final 53
LooseCoupling Avoid using implementation types like 'PriorityQueue'; use the interface instead 65
LocalVariableCouldBeFinal Local variable 'pq' could be declared final 65
ControlStatementBraces This statement should have braces 71
LooseCoupling Avoid using implementation types like 'PriorityQueue'; use the interface instead 73
LocalVariableCouldBeFinal Local variable 'max' could be declared final 73
ControlStatementBraces This statement should have braces 76
LooseCoupling Avoid using implementation types like 'PriorityQueue'; use the interface instead 84
LocalVariableCouldBeFinal Local variable 'byName' could be declared final 84
ControlStatementBraces This statement should have braces 89
LooseCoupling Avoid using implementation types like 'PriorityQueue'; use the interface instead 91
LocalVariableCouldBeFinal Local variable 'byAge' could be declared final 91
LocalVariableCouldBeFinal Local variable 'p' could be declared final 95
MissingOverride The method 'compareTo(Task)' is missing an @Override annotation. 108
OverrideBothEqualsAndHashCodeOnComparable When implementing Comparable, both equals() and hashCode() should be overridden 108
MethodArgumentCouldBeFinal Parameter 'o' is not assigned and could be declared final 108
LooseCoupling Avoid using implementation types like 'PriorityQueue'; use the interface instead 112
LocalVariableCouldBeFinal Local variable 'tasks' could be declared final 112
LocalVariableCouldBeFinal Local variable 't' could be declared final 118
LocalVariableCouldBeFinal Local variable 'window' could be declared final 131
LocalVariableCouldBeFinal Local variable 'size' could be declared final 132
LocalVariableCouldBeFinal Local variable 'v' could be declared final 133
ControlStatementBraces This statement should have braces 134

fr/univtln/bruno/samples/java101/tp3/set/DedupCollections.java

Rule Violation Line
MethodArgumentCouldBeFinal Parameter 'withDup' is not assigned and could be declared final 36
LocalVariableCouldBeFinal Local variable 'uniqueOrder' could be declared final 37
MethodArgumentCouldBeFinal Parameter 'values' is not assigned and could be declared final 46
LocalVariableCouldBeFinal Local variable 'ordered' could be declared final 47
UseExplicitTypes Use Explicit Types 47

fr/univtln/bruno/samples/java101/tp3/set/SetExamples.java

Rule Violation Line
LocalVariableCouldBeFinal Local variable 'people' could be declared final 29
LocalVariableCouldBeFinal Local variable 'addedDuplicate' could be declared final 33
LocalVariableCouldBeFinal Local variable 'ordered' could be declared final 47
LocalVariableCouldBeFinal Local variable 'sorted' could be declared final 57
LocalVariableCouldBeFinal Local variable 'byAge' could be declared final 63
LocalVariableCouldBeFinal Local variable 's1' could be declared final 74
LocalVariableCouldBeFinal Local variable 's2' could be declared final 75
LocalVariableCouldBeFinal Local variable 'union' could be declared final 76
LocalVariableCouldBeFinal Local variable 'inter' could be declared final 78
LocalVariableCouldBeFinal Local variable 'diff' could be declared final 80
LocalVariableCouldBeFinal Local variable 'sym' could be declared final 82
LocalVariableCouldBeFinal Local variable 'withDup' could be declared final 96
LocalVariableCouldBeFinal Local variable 'nav' could be declared final 106
LocalVariableCouldBeFinal Local variable 'imm' could be declared final 119
LocalVariableCouldBeFinal Local variable 'mutable' could be declared final 125
LocalVariableCouldBeFinal Local variable 'view' could be declared final 126

fr/univtln/bruno/samples/java101/tp3/BookTest.java

Rule Violation Line
UnitTestContainsTooManyAsserts Unit tests should not contain more than 1 assert(s). 12
AvoidDuplicateLiterals The String literal "Title" appears 4 times in this file; the first occurrence is on line 13 13
AvoidDuplicateLiterals The String literal "Author" appears 4 times in this file; the first occurrence is on line 13 13
AvoidDuplicateLiterals The String literal "978" appears 4 times in this file; the first occurrence is on line 14 14
UnitTestContainsTooManyAsserts Unit tests should not contain more than 1 assert(s). 21
LocalVariableCouldBeFinal Local variable 'b1' could be declared final 22
LocalVariableCouldBeFinal Local variable 'b2' could be declared final 23
LocalVariableCouldBeFinal Local variable 'b3' could be declared final 24

fr/univtln/bruno/samples/java101/tp3/CompareConsistencyTest.java

Rule Violation Line
UnitTestContainsTooManyAsserts Unit tests should not contain more than 1 assert(s). 10
LocalVariableCouldBeFinal Local variable 'p1' could be declared final 11
LocalVariableCouldBeFinal Local variable 'p2' could be declared final 12
UnitTestContainsTooManyAsserts Unit tests should not contain more than 1 assert(s). 18
LocalVariableCouldBeFinal Local variable 'b1' could be declared final 19
LocalVariableCouldBeFinal Local variable 'b2' could be declared final 20

fr/univtln/bruno/samples/java101/tp3/PersonTest.java

Rule Violation Line
UnitTestContainsTooManyAsserts Unit tests should not contain more than 1 assert(s). 10
UnitTestContainsTooManyAsserts Unit tests should not contain more than 1 assert(s). 22
LocalVariableCouldBeFinal Local variable 'a' could be declared final 23
LocalVariableCouldBeFinal Local variable 'b' could be declared final 24
LocalVariableCouldBeFinal Local variable 'c' could be declared final 25

Priority 4

fr/univtln/bruno/samples/java101/tp3/Book.java

Rule Violation Line
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Book': 'of' is already in scope 78

fr/univtln/bruno/samples/java101/tp3/Demo.java

Rule Violation Line
ShortClassName Avoid short class names like Demo 20

fr/univtln/bruno/samples/java101/tp3/Person.java

Rule Violation Line
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Person': 'of' is already in scope 90

fr/univtln/bruno/samples/java101/tp3/functional/ParallelStreamsExamples.java

Rule Violation Line
UnnecessaryImport Unused import 'java.util.stream.Collectors' 7
UselessParentheses Useless parentheses around `t1 - t0`. 30
UselessParentheses Useless parentheses around `t1 - t0`. 36
UselessParentheses Useless parentheses around `sumParEnd - sumParStart`. 37
UselessParentheses Useless parentheses around `sumParEnd - sumParStart`. 38

fr/univtln/bruno/samples/java101/tp3/set/SetExamples.java

Rule Violation Line
UnnecessaryFullyQualifiedName Unnecessary qualifier 'fr.univtln.bruno.samples.java101.tp3.set': 'DedupCollections' is already in scope because it is declared in the same package 97

Files

fr/univtln/bruno/samples/java101/tp3/Book.java

Rule Violation Priority Line
ShortMethodName Avoid using short method names 3 37
CyclomaticComplexity The method 'of(String, String, String, LocalDate, double)' has a cyclomatic complexity of 14. 3 37
MethodArgumentCouldBeFinal Parameter 'isbn' is not assigned and could be declared final 3 37
MethodArgumentCouldBeFinal Parameter 'title' is not assigned and could be declared final 3 37
MethodArgumentCouldBeFinal Parameter 'author' is not assigned and could be declared final 3 37
MethodArgumentCouldBeFinal Parameter 'publishedDate' is not assigned and could be declared final 3 37
MethodArgumentCouldBeFinal Parameter 'price' is not assigned and could be declared final 3 37
ControlStatementBraces This statement should have braces 3 38
ControlStatementBraces This statement should have braces 3 39
ControlStatementBraces This statement should have braces 3 40
ControlStatementBraces This statement should have braces 3 41
ControlStatementBraces This statement should have braces 3 42
OverrideBothEqualsAndHashCodeOnComparable When implementing Comparable, both equals() and hashCode() should be overridden 3 53
MethodArgumentCouldBeFinal Parameter 'other' is not assigned and could be declared final 3 53
ControlStatementBraces This statement should have braces 3 54
LocalVariableCouldBeFinal Local variable 'b' could be declared final 3 78
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Book': 'of' is already in scope 4 78
SystemPrintln Usage of System.out/err 2 79
LocalVariableCouldBeFinal Local variable 'cheaper' could be declared final 3 81
SystemPrintln Usage of System.out/err 2 82
LocalVariableCouldBeFinal Local variable 'renamed' could be declared final 3 84
SystemPrintln Usage of System.out/err 2 85
SystemPrintln Usage of System.out/err 2 88

fr/univtln/bruno/samples/java101/tp3/Demo.java

Rule Violation Priority Line
ShortClassName Avoid short class names like Demo 4 20
ClassWithOnlyPrivateConstructorsShouldBeFinal This class has only private constructors and may be final 1 20

fr/univtln/bruno/samples/java101/tp3/Person.java

Rule Violation Priority Line
ShortMethodName Avoid using short method names 3 47
MethodArgumentCouldBeFinal Parameter 'firstName' is not assigned and could be declared final 3 47
MethodArgumentCouldBeFinal Parameter 'lastName' is not assigned and could be declared final 3 47
MethodArgumentCouldBeFinal Parameter 'age' is not assigned and could be declared final 3 47
LocalVariableCouldBeFinal Local variable 'fn' could be declared final 3 50
PrematureDeclaration Declaration of 'ln' can be moved closer to its usages 3 51
LocalVariableCouldBeFinal Local variable 'ln' could be declared final 3 51
ControlStatementBraces This statement should have braces 3 52
ControlStatementBraces This statement should have braces 3 53
ControlStatementBraces This statement should have braces 3 54
OverrideBothEqualsAndHashCodeOnComparable When implementing Comparable, both equals() and hashCode() should be overridden 3 65
MethodArgumentCouldBeFinal Parameter 'other' is not assigned and could be declared final 3 65
LocalVariableCouldBeFinal Local variable 'p' could be declared final 3 90
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Person': 'of' is already in scope 4 90
SystemPrintln Usage of System.out/err 2 91
LocalVariableCouldBeFinal Local variable 'older' could be declared final 3 94
SystemPrintln Usage of System.out/err 2 95
LocalVariableCouldBeFinal Local variable 'renamed' could be declared final 3 97
SystemPrintln Usage of System.out/err 2 98
SystemPrintln Usage of System.out/err 2 101

fr/univtln/bruno/samples/java101/tp3/bestpractices/CollectionBestPractices.java

Rule Violation Priority Line
ClassWithOnlyPrivateConstructorsShouldBeFinal This class has only private constructors and may be final 1 11
LocalVariableCouldBeFinal Local variable 'bad' could be declared final 3 34
LocalVariableCouldBeFinal Local variable 'exposed' could be declared final 3 36
GuardLogStatement Logger calls should be surrounded by log level guards. 2 38
GuardLogStatement Logger calls should be surrounded by log level guards. 2 39
MethodArgumentCouldBeFinal Parameter 'item' is not assigned and could be declared final 3 49
LocalVariableCouldBeFinal Local variable 'good' could be declared final 3 54
LocalVariableCouldBeFinal Local variable 'copy' could be declared final 3 56
LocalVariableCouldBeFinal Local variable 'arrayList' could be declared final 3 70
GuardLogStatement Logger calls should be surrounded by log level guards. 2 74
LooseCoupling Avoid using implementation types like 'LinkedList'; use the interface instead 3 76
LocalVariableCouldBeFinal Local variable 'linkedList' could be declared final 3 76
LocalVariableCouldBeFinal Local variable 'hashSet' could be declared final 3 81
LooseCoupling Avoid using implementation types like 'TreeSet'; use the interface instead 3 86
LocalVariableCouldBeFinal Local variable 'treeSet' could be declared final 3 86
GuardLogStatement Logger calls should be surrounded by log level guards. 2 88
LocalVariableCouldBeFinal Local variable 'hashMap' could be declared final 3 90
AvoidDuplicateLiterals The String literal "Alice" appears 5 times in this file; the first occurrence is on line 91 3 91
GuardLogStatement Logger calls should be surrounded by log level guards. 2 92
LocalVariableCouldBeFinal Local variable 'immutableList' could be declared final 3 100
LocalVariableCouldBeFinal Local variable 'immutableSet' could be declared final 3 101
LocalVariableCouldBeFinal Local variable 'immutableMap' could be declared final 3 102
LocalVariableCouldBeFinal Local variable 'mutable' could be declared final 3 112
LocalVariableCouldBeFinal Local variable 'copy' could be declared final 3 113
UnusedLocalVariable Avoid unused local variables such as 'emptyList'. 3 124
UnusedLocalVariable Avoid unused local variables such as 'emptySet'. 3 125
UnusedLocalVariable Avoid unused local variables such as 'emptyMap'. 3 126
LocalVariableCouldBeFinal Local variable 'singletonList' could be declared final 3 129
LocalVariableCouldBeFinal Local variable 'singletonSet' could be declared final 3 130
LocalVariableCouldBeFinal Local variable 'singletonMap' could be declared final 3 131
LocalVariableCouldBeFinal Local variable 'modernList' could be declared final 3 134
LocalVariableCouldBeFinal Local variable 'modernSet' could be declared final 3 135
LocalVariableCouldBeFinal Local variable 'modernMap' could be declared final 3 136
UnusedLocalVariable Avoid unused local variables such as 'withCapacity'. 3 139
UnusedLocalVariable Avoid unused local variables such as 'mapWithCapacity'. 3 140
AvoidCatchingNPE Avoid catching NullPointerException; consider removing the cause of the NPE. 3 151
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 151
LocalVariableCouldBeFinal Local variable 'arrayList' could be declared final 3 154
LocalVariableCouldBeFinal Local variable 'hashMap' could be declared final 3 159
LocalVariableCouldBeFinal Local variable 'ts' could be declared final 3 165
AvoidCatchingNPE Avoid catching NullPointerException; consider removing the cause of the NPE. 3 167
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 167
LocalVariableCouldBeFinal Local variable 'scores' could be declared final 3 170
LocalVariableCouldBeFinal Local variable 'bobScore' could be declared final 3 172
LocalVariableCouldBeFinal Local variable 'item' could be declared final 3 183
LiteralsFirstInComparisons Position literals first in String comparisons 3 184
ControlStatementBraces This statement should have braces 3 184
LocalVariableCouldBeFinal Local variable 'it' could be declared final 3 191
LiteralsFirstInComparisons Position literals first in String comparisons 3 193
ControlStatementBraces This statement should have braces 3 193
LocalVariableCouldBeFinal Local variable 'filtered' could be declared final 3 202
LiteralsFirstInComparisons Position literals first in String comparisons 3 202
NPathComplexity The method 'performanceExample()' has an NPath complexity of 256, current threshold is 200 3 209
LocalVariableCouldBeFinal Local variable 'size' could be declared final 3 211
LocalVariableCouldBeFinal Local variable 'arrayList' could be declared final 3 212
ControlStatementBraces This statement should have braces 3 213
UnusedLocalVariable Avoid unused local variables such as 'sum'. 3 215
ControlStatementBraces This statement should have braces 3 216
LocalVariableCouldBeFinal Local variable 'arrayNs' could be declared final 3 217
LocalVariableCouldBeFinal Local variable 'linkedList' could be declared final 3 219
ControlStatementBraces This statement should have braces 3 220
ControlStatementBraces This statement should have braces 3 223
LocalVariableCouldBeFinal Local variable 'linkedNs' could be declared final 3 224
LocalVariableCouldBeFinal Local variable 'hashSet' could be declared final 3 227
ControlStatementBraces This statement should have braces 3 228
ControlStatementBraces This statement should have braces 3 230
UselessPureMethodCall Do not call pure method contains if the result is not used. 3 230
LocalVariableCouldBeFinal Local variable 'hashNs' could be declared final 3 231
LocalVariableCouldBeFinal Local variable 'treeSet' could be declared final 3 232
ControlStatementBraces This statement should have braces 3 233
ControlStatementBraces This statement should have braces 3 235
UselessPureMethodCall Do not call pure method contains if the result is not used. 3 235
LocalVariableCouldBeFinal Local variable 'treeNs' could be declared final 3 236
LocalVariableCouldBeFinal Local variable 'list1' could be declared final 3 246
LocalVariableCouldBeFinal Local variable 'list2' could be declared final 3 247
GuardLogStatement Logger calls should be surrounded by log level guards. 2 248
CompareObjectsWithEquals Use equals() to compare object references. 3 248
GuardLogStatement Logger calls should be surrounded by log level guards. 2 249
MethodArgumentCouldBeFinal Parameter 'n' is not assigned and could be declared final 3 254
LocalVariableCouldBeFinal Local variable 'badSet' could be declared final 3 258
GuardLogStatement Logger calls should be surrounded by log level guards. 2 261
MethodArgumentCouldBeFinal Parameter 'v' is not assigned and could be declared final 3 266
MethodArgumentCouldBeFinal Parameter 'o' is not assigned and could be declared final 3 276
LocalVariableCouldBeFinal Local variable 'map' could be declared final 3 280
LocalVariableCouldBeFinal Local variable 'key' could be declared final 3 281
GuardLogStatement Logger calls should be surrounded by log level guards. 2 283
GuardLogStatement Logger calls should be surrounded by log level guards. 2 285
LocalVariableCouldBeFinal Local variable 'fixed' could be declared final 3 287

fr/univtln/bruno/samples/java101/tp3/comparable/ComparatorExamples.java

Rule Violation Priority Line
UseUtilityClass All methods are static. Consider adding a private no-args constructor to prevent instantiation. 3 25
LocalVariableCouldBeFinal Local variable 'people' could be declared final 3 31
AvoidDuplicateLiterals The String literal "Charlie" appears 6 times in this file; the first occurrence is on line 32 3 32
AvoidDuplicateLiterals The String literal "Brown" appears 6 times in this file; the first occurrence is on line 32 3 32
AvoidDuplicateLiterals The String literal "Alice" appears 8 times in this file; the first occurrence is on line 33 3 33
AvoidDuplicateLiterals The String literal "Smith" appears 6 times in this file; the first occurrence is on line 33 3 33
AvoidDuplicateLiterals The String literal "Bob" appears 6 times in this file; the first occurrence is on line 34 3 34
AvoidDuplicateLiterals The String literal "Jones" appears 5 times in this file; the first occurrence is on line 34 3 34
LocalVariableCouldBeFinal Local variable 'people' could be declared final 3 48
UseDiamondOperator Explicit type arguments can be replaced by a diamond: `new Comparator<>()` 3 56
MethodArgumentCouldBeFinal Parameter 'a' is not assigned and could be declared final 3 58
MethodArgumentCouldBeFinal Parameter 'b' is not assigned and could be declared final 3 58
GuardLogStatement Logger calls should be surrounded by log level guards. 2 63
MethodArgumentCouldBeFinal Parameter 'a' is not assigned and could be declared final 3 71
MethodArgumentCouldBeFinal Parameter 'b' is not assigned and could be declared final 3 71
GuardLogStatement Logger calls should be surrounded by log level guards. 2 76
UseDiamondOperator Explicit type arguments can be replaced by a diamond: `new Comparator<>()` 3 82
MethodArgumentCouldBeFinal Parameter 'a' is not assigned and could be declared final 3 84
MethodArgumentCouldBeFinal Parameter 'b' is not assigned and could be declared final 3 84
GuardLogStatement Logger calls should be surrounded by log level guards. 2 89
LocalVariableCouldBeFinal Local variable 'people' could be declared final 3 100
LocalVariableCouldBeFinal Local variable 'lastNameCmp' could be declared final 3 109
MethodArgumentCouldBeFinal Parameter 'a' is not assigned and could be declared final 3 111
MethodArgumentCouldBeFinal Parameter 'b' is not assigned and could be declared final 3 111
LocalVariableCouldBeFinal Local variable 'firstNameCmp' could be declared final 3 115
MethodArgumentCouldBeFinal Parameter 'a' is not assigned and could be declared final 3 117
MethodArgumentCouldBeFinal Parameter 'b' is not assigned and could be declared final 3 117
LocalVariableCouldBeFinal Local variable 'ageCmp' could be declared final 3 121
MethodArgumentCouldBeFinal Parameter 'a' is not assigned and could be declared final 3 123
MethodArgumentCouldBeFinal Parameter 'b' is not assigned and could be declared final 3 123
GuardLogStatement Logger calls should be surrounded by log level guards. 2 129
LocalVariableCouldBeFinal Local variable 'words' could be declared final 3 142
LocalVariableCouldBeFinal Local variable 'natural' could be declared final 3 143
LocalVariableCouldBeFinal Local variable 'reversed' could be declared final 3 145
LocalVariableCouldBeFinal Local variable 'ci' could be declared final 3 147
LocalVariableCouldBeFinal Local variable 'byLen' could be declared final 3 150
UseDiamondOperator Explicit type arguments can be replaced by a diamond: `new Comparator<>()` 3 151
MethodArgumentCouldBeFinal Parameter 'a' is not assigned and could be declared final 3 153
MethodArgumentCouldBeFinal Parameter 'b' is not assigned and could be declared final 3 153
LocalVariableCouldBeFinal Local variable 'lenThenAlpha' could be declared final 3 158
UseDiamondOperator Explicit type arguments can be replaced by a diamond: `new Comparator<>()` 3 159
MethodArgumentCouldBeFinal Parameter 'a' is not assigned and could be declared final 3 161
MethodArgumentCouldBeFinal Parameter 'b' is not assigned and could be declared final 3 161
LocalVariableCouldBeFinal Local variable 'c' could be declared final 3 162
ControlStatementBraces This statement should have braces 3 163
LocalVariableCouldBeFinal Local variable 'withNulls' could be declared final 3 188
LocalVariableCouldBeFinal Local variable 'nullsFirst' could be declared final 3 189
LocalVariableCouldBeFinal Local variable 'nullsLast' could be declared final 3 191
LocalVariableCouldBeFinal Local variable 'books' could be declared final 3 202
LocalVariableCouldBeFinal Local variable 'byPrice' could be declared final 3 212
UseDiamondOperator Explicit type arguments can be replaced by a diamond: `new Comparator<>()` 3 213
MethodArgumentCouldBeFinal Parameter 'a' is not assigned and could be declared final 3 215
MethodArgumentCouldBeFinal Parameter 'b' is not assigned and could be declared final 3 215
LocalVariableCouldBeFinal Local variable 'byDateDesc' could be declared final 3 220
MethodArgumentCouldBeFinal Parameter 'a' is not assigned and could be declared final 3 223
MethodArgumentCouldBeFinal Parameter 'b' is not assigned and could be declared final 3 223
LocalVariableCouldBeFinal Local variable 'byAuthorPrice' could be declared final 3 228
UseDiamondOperator Explicit type arguments can be replaced by a diamond: `new Comparator<>()` 3 229
MethodArgumentCouldBeFinal Parameter 'a' is not assigned and could be declared final 3 231
MethodArgumentCouldBeFinal Parameter 'b' is not assigned and could be declared final 3 231
LocalVariableCouldBeFinal Local variable 'c' could be declared final 3 232
ControlStatementBraces This statement should have braces 3 233
LocalVariableCouldBeFinal Local variable 'people' could be declared final 3 253
LocalVariableCouldBeFinal Local variable 'ageComparator' could be declared final 3 259
MethodArgumentCouldBeFinal Parameter 'a' is not assigned and could be declared final 3 261
MethodArgumentCouldBeFinal Parameter 'b' is not assigned and could be declared final 3 261
LocalVariableCouldBeFinal Local variable 'youngest' could be declared final 3 265
LocalVariableCouldBeFinal Local variable 'oldest' could be declared final 3 266
GuardLogStatement Logger calls should be surrounded by log level guards. 2 267
LocalVariableCouldBeFinal Local variable 'anonymous' could be declared final 3 276
MethodArgumentCouldBeFinal Parameter 'a' is not assigned and could be declared final 3 277
MethodArgumentCouldBeFinal Parameter 'b' is not assigned and could be declared final 3 277
UnusedLocalVariable Avoid unused local variables such as 'lambda'. 3 281
LocalVariableCouldBeFinal Local variable 'methodRef' could be declared final 3 283
MethodArgumentCouldBeFinal Parameter 'a' is not assigned and could be declared final 3 285
MethodArgumentCouldBeFinal Parameter 'b' is not assigned and could be declared final 3 285
LocalVariableCouldBeFinal Local variable 'people' could be declared final 3 289

fr/univtln/bruno/samples/java101/tp3/eclipse/EclipseCollectionsExamples.java

Rule Violation Priority Line
ClassWithOnlyPrivateConstructorsShouldBeFinal This class has only private constructors and may be final 1 16
LocalVariableCouldBeFinal Local variable 'list' could be declared final 3 29
LocalVariableCouldBeFinal Local variable 'sum' could be declared final 3 30

fr/univtln/bruno/samples/java101/tp3/functional/AppliedFunctionnalExamples.java

Rule Violation Priority Line
ClassWithOnlyPrivateConstructorsShouldBeFinal This class has only private constructors and may be final 1 17
LocalVariableCouldBeFinal Local variable 'people' could be declared final 3 31
GuardLogStatement Logger calls should be surrounded by log level guards. 2 36
GuardLogStatement Logger calls should be surrounded by log level guards. 2 37
LocalVariableCouldBeFinal Local variable 'people' could be declared final 3 45
LocalVariableCouldBeFinal Local variable 'byLast' could be declared final 3 51

fr/univtln/bruno/samples/java101/tp3/functional/CollectorsExamples.java

Rule Violation Priority Line
ClassWithOnlyPrivateConstructorsShouldBeFinal This class has only private constructors and may be final 1 17
LocalVariableCouldBeFinal Local variable 'nums' could be declared final 3 29
LocalVariableCouldBeFinal Local variable 'evenCount' could be declared final 3 30
LocalVariableCouldBeFinal Local variable 'anyGt4' could be declared final 3 31
LocalVariableCouldBeFinal Local variable 'allPositive' could be declared final 3 32
LocalVariableCouldBeFinal Local variable 'noneNegative' could be declared final 3 33
LocalVariableCouldBeFinal Local variable 'firstGt3' could be declared final 3 34
GuardLogStatement Logger calls should be surrounded by log level guards. 2 36
LocalVariableCouldBeFinal Local variable 'people' could be declared final 3 44
LocalVariableCouldBeFinal Local variable 'byLast' could be declared final 3 46
LocalVariableCouldBeFinal Local variable 'counts' could be declared final 3 48
LocalVariableCouldBeFinal Local variable 'books' could be declared final 3 58
LocalVariableCouldBeFinal Local variable 'titlesByAuthor' could be declared final 3 64

fr/univtln/bruno/samples/java101/tp3/functional/DebuggingExamples.java

Rule Violation Priority Line
ClassWithOnlyPrivateConstructorsShouldBeFinal This class has only private constructors and may be final 1 11
LocalVariableCouldBeFinal Local variable 'nums' could be declared final 3 23
LocalVariableCouldBeFinal Local variable 'result' could be declared final 3 24
LocalVariableCouldBeFinal Local variable 'empty' could be declared final 3 39

fr/univtln/bruno/samples/java101/tp3/functional/DedupExamples.java

Rule Violation Priority Line
MethodArgumentCouldBeFinal Parameter 'withDup' is not assigned and could be declared final 3 26
GuardLogStatement Logger calls should be surrounded by log level guards. 2 27
MethodArgumentCouldBeFinal Parameter 'withDup' is not assigned and could be declared final 3 35
LocalVariableCouldBeFinal Local variable 'ordered' could be declared final 3 36
UseExplicitTypes Use Explicit Types 3 36

fr/univtln/bruno/samples/java101/tp3/functional/GroupingDisplayExamples.java

Rule Violation Priority Line
ClassWithOnlyPrivateConstructorsShouldBeFinal This class has only private constructors and may be final 1 14
MethodArgumentCouldBeFinal Parameter 'people' is not assigned and could be declared final 3 26
LocalVariableCouldBeFinal Local variable 'byLast' could be declared final 3 27
MethodArgumentCouldBeFinal Parameter 'people' is not assigned and could be declared final 3 37
MethodArgumentCouldBeFinal Parameter 'threshold' is not assigned and could be declared final 3 37
LocalVariableCouldBeFinal Local variable 'part' could be declared final 3 38
UseExplicitTypes Use Explicit Types 3 38
GuardLogStatement Logger calls should be surrounded by log level guards. 2 39

fr/univtln/bruno/samples/java101/tp3/functional/MappingAndSortingExamples.java

Rule Violation Priority Line
ClassWithOnlyPrivateConstructorsShouldBeFinal This class has only private constructors and may be final 1 14
MethodArgumentCouldBeFinal Parameter 'people' is not assigned and could be declared final 3 29
GuardLogStatement Logger calls should be surrounded by log level guards. 2 31
MethodArgumentCouldBeFinal Parameter 'people' is not assigned and could be declared final 3 41
GuardLogStatement Logger calls should be surrounded by log level guards. 2 43
MethodArgumentCouldBeFinal Parameter 'books' is not assigned and could be declared final 3 53
GuardLogStatement Logger calls should be surrounded by log level guards. 2 55
MethodArgumentCouldBeFinal Parameter 'people' is not assigned and could be declared final 3 65
MethodArgumentCouldBeFinal Parameter 'books' is not assigned and could be declared final 3 75
LocalVariableCouldBeFinal Local variable 'byPrice' could be declared final 3 77
LocalVariableCouldBeFinal Local variable 'byDateDesc' could be declared final 3 78
LocalVariableCouldBeFinal Local variable 'byAuthorPrice' could be declared final 3 79
GuardLogStatement Logger calls should be surrounded by log level guards. 2 81
GuardLogStatement Logger calls should be surrounded by log level guards. 2 82
GuardLogStatement Logger calls should be surrounded by log level guards. 2 83

fr/univtln/bruno/samples/java101/tp3/functional/ParallelStreamsExamples.java

Rule Violation Priority Line
UnnecessaryImport Unused import 'java.util.stream.Collectors' 4 7
UseUtilityClass All methods are static. Consider adding a private no-args constructor to prevent instantiation. 3 17
LocalVariableCouldBeFinal Local variable 'data' could be declared final 3 24
LocalVariableCouldBeFinal Local variable 't0' could be declared final 3 26
LocalVariableCouldBeFinal Local variable 'sumSeq' could be declared final 3 27
LocalVariableCouldBeFinal Local variable 't1' could be declared final 3 28
GuardLogStatement Logger calls should be surrounded by log level guards. 2 30
UselessParentheses Useless parentheses around `t1 - t0`. 4 30
LocalVariableCouldBeFinal Local variable 'sumParStart' could be declared final 3 32
LocalVariableCouldBeFinal Local variable 'sumPar' could be declared final 3 33
LocalVariableCouldBeFinal Local variable 'sumParEnd' could be declared final 3 34
GuardLogStatement Logger calls should be surrounded by log level guards. 2 36
UselessParentheses Useless parentheses around `t1 - t0`. 4 36
GuardLogStatement Logger calls should be surrounded by log level guards. 2 37
UselessParentheses Useless parentheses around `sumParEnd - sumParStart`. 4 37
GuardLogStatement Logger calls should be surrounded by log level guards. 2 38
UselessParentheses Useless parentheses around `sumParEnd - sumParStart`. 4 38
LocalVariableCouldBeFinal Local variable 'data' could be declared final 3 47
LocalVariableCouldBeFinal Local variable 'counter' could be declared final 3 49
GuardLogStatement Logger calls should be surrounded by log level guards. 2 52
LocalVariableCouldBeFinal Local variable 'reduced' could be declared final 3 54

fr/univtln/bruno/samples/java101/tp3/functional/StreamBasicsExamples.java

Rule Violation Priority Line
ClassWithOnlyPrivateConstructorsShouldBeFinal This class has only private constructors and may be final 1 17
LocalVariableCouldBeFinal Local variable 'fromList' could be declared final 3 29
GuardLogStatement Logger calls should be surrounded by log level guards. 2 31
GuardLogStatement Logger calls should be surrounded by log level guards. 2 32
GuardLogStatement Logger calls should be surrounded by log level guards. 2 33
GuardLogStatement Logger calls should be surrounded by log level guards. 2 34
GuardLogStatement Logger calls should be surrounded by log level guards. 2 35
GuardLogStatement Logger calls should be surrounded by log level guards. 2 36
GuardLogStatement Logger calls should be surrounded by log level guards. 2 37
GuardLogStatement Logger calls should be surrounded by log level guards. 2 38
LocalVariableCouldBeFinal Local variable 'people' could be declared final 3 49
LocalVariableCouldBeFinal Local variable 'age30' could be declared final 3 56
GuardLogStatement Logger calls should be surrounded by log level guards. 2 57
LocalVariableCouldBeFinal Local variable 'complex' could be declared final 3 59
GuardLogStatement Logger calls should be surrounded by log level guards. 2 60
LocalVariableCouldBeFinal Local variable 'people' could be declared final 3 69
GuardLogStatement Logger calls should be surrounded by log level guards. 2 70
GuardLogStatement Logger calls should be surrounded by log level guards. 2 71
GuardLogStatement Logger calls should be surrounded by log level guards. 2 72
LocalVariableCouldBeFinal Local variable 'nested' could be declared final 3 80
GuardLogStatement Logger calls should be surrounded by log level guards. 2 81
LocalVariableCouldBeFinal Local variable 'sentences' could be declared final 3 82
GuardLogStatement Logger calls should be surrounded by log level guards. 2 83
LocalVariableCouldBeFinal Local variable 'nums' could be declared final 3 91
GuardLogStatement Logger calls should be surrounded by log level guards. 2 92
GuardLogStatement Logger calls should be surrounded by log level guards. 2 93
GuardLogStatement Logger calls should be surrounded by log level guards. 2 94
GuardLogStatement Logger calls should be surrounded by log level guards. 2 95
LocalVariableCouldBeFinal Local variable 'nums' could be declared final 3 103
LocalVariableCouldBeFinal Local variable 'result' could be declared final 3 105
LocalVariableCouldBeFinal Local variable 'people' could be declared final 3 124
GuardLogStatement Logger calls should be surrounded by log level guards. 2 125
GuardLogStatement Logger calls should be surrounded by log level guards. 2 126
LocalVariableCouldBeFinal Local variable 'numbers' could be declared final 3 134
GuardLogStatement Logger calls should be surrounded by log level guards. 2 135
GuardLogStatement Logger calls should be surrounded by log level guards. 2 136

fr/univtln/bruno/samples/java101/tp3/guava/GuavaExamples.java

Rule Violation Priority Line
ClassWithOnlyPrivateConstructorsShouldBeFinal This class has only private constructors and may be final 1 17
LocalVariableCouldBeFinal Local variable 'mm' could be declared final 3 30
LocalVariableCouldBeFinal Local variable 'k' could be declared final 3 35
GuardLogStatement Logger calls should be surrounded by log level guards. 2 36

fr/univtln/bruno/samples/java101/tp3/list/ListExamples.java

Rule Violation Priority Line
ClassWithOnlyPrivateConstructorsShouldBeFinal This class has only private constructors and may be final 1 16
LocalVariableCouldBeFinal Local variable 'people' could be declared final 3 28
AvoidDuplicateLiterals The String literal "Alice" appears 5 times in this file; the first occurrence is on line 29 3 29
AvoidDuplicateLiterals The String literal "Smith" appears 5 times in this file; the first occurrence is on line 29 3 29
GuardLogStatement Logger calls should be surrounded by log level guards. 2 33
GuardLogStatement Logger calls should be surrounded by log level guards. 2 35
GuardLogStatement Logger calls should be surrounded by log level guards. 2 36
GuardLogStatement Logger calls should be surrounded by log level guards. 2 39
GuardLogStatement Logger calls should be surrounded by log level guards. 2 42
LooseCoupling Avoid using implementation types like 'LinkedList'; use the interface instead 3 50
LocalVariableCouldBeFinal Local variable 'people' could be declared final 3 50
GuardLogStatement Logger calls should be surrounded by log level guards. 2 54
LocalVariableCouldBeFinal Local variable 'polled' could be declared final 3 56
GuardLogStatement Logger calls should be surrounded by log level guards. 2 57
ControlStatementBraces This statement should have braces 3 57
LocalVariableCouldBeFinal Local variable 'popped' could be declared final 3 59
GuardLogStatement Logger calls should be surrounded by log level guards. 2 60
ControlStatementBraces This statement should have braces 3 60
LocalVariableCouldBeFinal Local variable 'immutable' could be declared final 3 68
LocalVariableCouldBeFinal Local variable 'backing' could be declared final 3 71
LocalVariableCouldBeFinal Local variable 'unmodifiable' could be declared final 3 72
LocalVariableCouldBeFinal Local variable 'numbers' could be declared final 3 82
LocalVariableCouldBeFinal Local variable 'slice' could be declared final 3 83
LocalVariableCouldBeFinal Local variable 'people' could be declared final 3 99
LocalVariableCouldBeFinal Local variable 'items' could be declared final 3 119
LocalVariableCouldBeFinal Local variable 'i' could be declared final 3 120
LambdaCanBeMethodReference Lambda expression could be written as a method reference: `"B"::equals` 3 125
LocalVariableCouldBeFinal Local variable 'listIt' could be declared final 3 127
GuardLogStatement Logger calls should be surrounded by log level guards. 2 129

fr/univtln/bruno/samples/java101/tp3/map/MapExamples.java

Rule Violation Priority Line
ClassWithOnlyPrivateConstructorsShouldBeFinal This class has only private constructors and may be final 1 15
LocalVariableCouldBeFinal Local variable 'people' could be declared final 3 27
AvoidDuplicateLiterals The String literal "P001" appears 5 times in this file; the first occurrence is on line 28 3 28
AvoidDuplicateLiterals The String literal "Alice" appears 7 times in this file; the first occurrence is on line 28 3 28
AvoidDuplicateLiterals The String literal "Smith" appears 4 times in this file; the first occurrence is on line 28 3 28
AvoidDuplicateLiterals The String literal "Bob" appears 7 times in this file; the first occurrence is on line 29 3 29
AvoidDuplicateLiterals The String literal "Charlie" appears 4 times in this file; the first occurrence is on line 30 3 30
GuardLogStatement Logger calls should be surrounded by log level guards. 2 32
GuardLogStatement Logger calls should be surrounded by log level guards. 2 33
LocalVariableCouldBeFinal Local variable 'prev' could be declared final 3 34
GuardLogStatement Logger calls should be surrounded by log level guards. 2 35
GuardLogStatement Logger calls should be surrounded by log level guards. 2 36
GuardLogStatement Logger calls should be surrounded by log level guards. 2 39
LocalVariableCouldBeFinal Local variable 'capitals' could be declared final 3 47
LocalVariableCouldBeFinal Local variable 'capitals' could be declared final 3 59
GuardLogStatement Logger calls should be surrounded by log level guards. 2 65
LocalVariableCouldBeFinal Local variable 'scores' could be declared final 3 73
GuardLogStatement Logger calls should be surrounded by log level guards. 2 77
LocalVariableCouldBeFinal Local variable 'ages' could be declared final 3 100
ControlStatementBraces This statement should have braces 3 101
LocalVariableCouldBeFinal Local variable 'e' could be declared final 3 101
GuardLogStatement Logger calls should be surrounded by log level guards. 2 101
LocalVariableCouldBeFinal Local variable 'words' could be declared final 3 111
LocalVariableCouldBeFinal Local variable 'manual' could be declared final 3 112
ControlStatementBraces This statement should have braces 3 113
LocalVariableCouldBeFinal Local variable 'w' could be declared final 3 113
LocalVariableCouldBeFinal Local variable 'mergeMap' could be declared final 3 114
LocalVariableCouldBeFinal Local variable 'people' could be declared final 3 125
LocalVariableCouldBeFinal Local variable 'm1' could be declared final 3 139
LocalVariableCouldBeFinal Local variable 'backing' could be declared final 3 146
LocalVariableCouldBeFinal Local variable 'view' could be declared final 3 147

fr/univtln/bruno/samples/java101/tp3/queue/QueueExamples.java

Rule Violation Priority Line
ClassWithOnlyPrivateConstructorsShouldBeFinal This class has only private constructors and may be final 1 12
LocalVariableCouldBeFinal Local variable 'q' could be declared final 3 24
GuardLogStatement Logger calls should be surrounded by log level guards. 2 29
GuardLogStatement Logger calls should be surrounded by log level guards. 2 30
LocalVariableCouldBeFinal Local variable 'd' could be declared final 3 40
GuardLogStatement Logger calls should be surrounded by log level guards. 2 45
LocalVariableCouldBeFinal Local variable 'stack' could be declared final 3 53
GuardLogStatement Logger calls should be surrounded by log level guards. 2 57
LooseCoupling Avoid using implementation types like 'PriorityQueue'; use the interface instead 3 65
LocalVariableCouldBeFinal Local variable 'pq' could be declared final 3 65
ControlStatementBraces This statement should have braces 3 71
GuardLogStatement Logger calls should be surrounded by log level guards. 2 71
LooseCoupling Avoid using implementation types like 'PriorityQueue'; use the interface instead 3 73
LocalVariableCouldBeFinal Local variable 'max' could be declared final 3 73
ControlStatementBraces This statement should have braces 3 76
GuardLogStatement Logger calls should be surrounded by log level guards. 2 76
LooseCoupling Avoid using implementation types like 'PriorityQueue'; use the interface instead 3 84
LocalVariableCouldBeFinal Local variable 'byName' could be declared final 3 84
ControlStatementBraces This statement should have braces 3 89
GuardLogStatement Logger calls should be surrounded by log level guards. 2 89
LooseCoupling Avoid using implementation types like 'PriorityQueue'; use the interface instead 3 91
LocalVariableCouldBeFinal Local variable 'byAge' could be declared final 3 91
LocalVariableCouldBeFinal Local variable 'p' could be declared final 3 95
GuardLogStatement Logger calls should be surrounded by log level guards. 2 96
MissingOverride The method 'compareTo(Task)' is missing an @Override annotation. 3 108
OverrideBothEqualsAndHashCodeOnComparable When implementing Comparable, both equals() and hashCode() should be overridden 3 108
MethodArgumentCouldBeFinal Parameter 'o' is not assigned and could be declared final 3 108
LooseCoupling Avoid using implementation types like 'PriorityQueue'; use the interface instead 3 112
LocalVariableCouldBeFinal Local variable 'tasks' could be declared final 3 112
LocalVariableCouldBeFinal Local variable 't' could be declared final 3 118
GuardLogStatement Logger calls should be surrounded by log level guards. 2 119
LocalVariableCouldBeFinal Local variable 'window' could be declared final 3 131
LocalVariableCouldBeFinal Local variable 'size' could be declared final 3 132
LocalVariableCouldBeFinal Local variable 'v' could be declared final 3 133
ControlStatementBraces This statement should have braces 3 134

fr/univtln/bruno/samples/java101/tp3/set/DedupCollections.java

Rule Violation Priority Line
ClassWithOnlyPrivateConstructorsShouldBeFinal This class has only private constructors and may be final 1 22
MethodArgumentCouldBeFinal Parameter 'withDup' is not assigned and could be declared final 3 36
LocalVariableCouldBeFinal Local variable 'uniqueOrder' could be declared final 3 37
MethodArgumentCouldBeFinal Parameter 'values' is not assigned and could be declared final 3 46
LocalVariableCouldBeFinal Local variable 'ordered' could be declared final 3 47
UseExplicitTypes Use Explicit Types 3 47

fr/univtln/bruno/samples/java101/tp3/set/SetExamples.java

Rule Violation Priority Line
ClassWithOnlyPrivateConstructorsShouldBeFinal This class has only private constructors and may be final 1 15
LocalVariableCouldBeFinal Local variable 'people' could be declared final 3 29
LocalVariableCouldBeFinal Local variable 'addedDuplicate' could be declared final 3 33
GuardLogStatement Logger calls should be surrounded by log level guards. 2 36
LocalVariableCouldBeFinal Local variable 'ordered' could be declared final 3 47
LocalVariableCouldBeFinal Local variable 'sorted' could be declared final 3 57
LocalVariableCouldBeFinal Local variable 'byAge' could be declared final 3 63
LocalVariableCouldBeFinal Local variable 's1' could be declared final 3 74
LocalVariableCouldBeFinal Local variable 's2' could be declared final 3 75
LocalVariableCouldBeFinal Local variable 'union' could be declared final 3 76
LocalVariableCouldBeFinal Local variable 'inter' could be declared final 3 78
LocalVariableCouldBeFinal Local variable 'diff' could be declared final 3 80
LocalVariableCouldBeFinal Local variable 'sym' could be declared final 3 82
LocalVariableCouldBeFinal Local variable 'withDup' could be declared final 3 96
UnnecessaryFullyQualifiedName Unnecessary qualifier 'fr.univtln.bruno.samples.java101.tp3.set': 'DedupCollections' is already in scope because it is declared in the same package 4 97
LocalVariableCouldBeFinal Local variable 'nav' could be declared final 3 106
GuardLogStatement Logger calls should be surrounded by log level guards. 2 107
GuardLogStatement Logger calls should be surrounded by log level guards. 2 108
LocalVariableCouldBeFinal Local variable 'imm' could be declared final 3 119
LocalVariableCouldBeFinal Local variable 'mutable' could be declared final 3 125
LocalVariableCouldBeFinal Local variable 'view' could be declared final 3 126

fr/univtln/bruno/samples/java101/tp3/BookTest.java

Rule Violation Priority Line
MethodNamingConventions The JUnit 5 test method name 'of_validatesArguments' doesn't match '[a-z][a-zA-Z0-9]*' 1 12
UnitTestContainsTooManyAsserts Unit tests should not contain more than 1 assert(s). 3 12
AvoidDuplicateLiterals The String literal "Title" appears 4 times in this file; the first occurrence is on line 13 3 13
AvoidDuplicateLiterals The String literal "Author" appears 4 times in this file; the first occurrence is on line 13 3 13
AvoidDuplicateLiterals The String literal "978" appears 4 times in this file; the first occurrence is on line 14 3 14
MethodNamingConventions The JUnit 5 test method name 'compareTo_consistent_ordering' doesn't match '[a-z][a-zA-Z0-9]*' 1 21
UnitTestContainsTooManyAsserts Unit tests should not contain more than 1 assert(s). 3 21
LocalVariableCouldBeFinal Local variable 'b1' could be declared final 3 22
LocalVariableCouldBeFinal Local variable 'b2' could be declared final 3 23
LocalVariableCouldBeFinal Local variable 'b3' could be declared final 3 24

fr/univtln/bruno/samples/java101/tp3/CompareConsistencyTest.java

Rule Violation Priority Line
MethodNamingConventions The JUnit 5 test method name 'person_compareTo_consistentWithEquals' doesn't match '[a-z][a-zA-Z0-9]*' 1 10
UnitTestContainsTooManyAsserts Unit tests should not contain more than 1 assert(s). 3 10
LocalVariableCouldBeFinal Local variable 'p1' could be declared final 3 11
LocalVariableCouldBeFinal Local variable 'p2' could be declared final 3 12
MethodNamingConventions The JUnit 5 test method name 'book_compareTo_consistentWithEquals' doesn't match '[a-z][a-zA-Z0-9]*' 1 18
UnitTestContainsTooManyAsserts Unit tests should not contain more than 1 assert(s). 3 18
LocalVariableCouldBeFinal Local variable 'b1' could be declared final 3 19
LocalVariableCouldBeFinal Local variable 'b2' could be declared final 3 20

fr/univtln/bruno/samples/java101/tp3/PersonTest.java

Rule Violation Priority Line
MethodNamingConventions The JUnit 5 test method name 'of_validatesArguments' doesn't match '[a-z][a-zA-Z0-9]*' 1 10
UnitTestContainsTooManyAsserts Unit tests should not contain more than 1 assert(s). 3 10
MethodNamingConventions The JUnit 5 test method name 'compareTo_ordersByLastThenFirstThenAge' doesn't match '[a-z][a-zA-Z0-9]*' 1 22
UnitTestContainsTooManyAsserts Unit tests should not contain more than 1 assert(s). 3 22
LocalVariableCouldBeFinal Local variable 'a' could be declared final 3 23
LocalVariableCouldBeFinal Local variable 'b' could be declared final 3 24
LocalVariableCouldBeFinal Local variable 'c' could be declared final 3 25
MethodNamingConventions The JUnit 5 test method name 'fullName_returnsConcatenation' doesn't match '[a-z][a-zA-Z0-9]*' 1 34