Fork me on GitHub

PMD Results

The following document contains the results of PMD 5.2.3.

Files

splitlog-api: the public APIs - com/github/triceo/splitlog/api/LogWatchBuilder.java

Violation Line
This class has too many methods, consider refactoring it. 31390
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 72
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 73
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 74
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 75
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 76
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 77
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 78
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 79
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 80
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 81
StringBuffer constructor is initialized with size 16, but has at least 139 characters appended. 265
Avoid appending characters as strings in StringBuffer.append. 280

splitlog-api: the public APIs - com/github/triceo/splitlog/logging/SplitlogLoggerFactory.java

Violation Line
All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 26154
Use block level rather than method level synchronization 5263
Use block level rather than method level synchronization 100115
Avoid unnecessary if..then..else statements when returning booleans 109113
Use block level rather than method level synchronization 122136
Use block level rather than method level synchronization 141152

splitlog-core: the client library - com/github/triceo/splitlog/AbstractCommonFollower.java

Violation Line
This class has too many methods, consider refactoring it. 37192

splitlog-core: the client library - com/github/triceo/splitlog/ConsumerManager.java

Violation Line
This class has too many methods, consider refactoring it. 24212
Use block level rather than method level synchronization 4446
Use block level rather than method level synchronization 4951
Use block level rather than method level synchronization 5456
Use block level rather than method level synchronization 6870
Use block level rather than method level synchronization 7375
Use block level rather than method level synchronization 137153
Use block level rather than method level synchronization 183188
Use block level rather than method level synchronization 191199
StringBuffer constructor is initialized with size 16, but has at least 32 characters appended. 203
Avoid appending characters as strings in StringBuffer.append. 208

splitlog-core: the client library - com/github/triceo/splitlog/DefaultFollower.java

Violation Line
Use block level rather than method level synchronization 98107
StringBuffer constructor is initialized with size 16, but has at least 48 characters appended. 164
Avoid appending characters as strings in StringBuffer.append. 169

splitlog-core: the client library - com/github/triceo/splitlog/DefaultLogWatch.java

Violation Line
Possible God class (WMC=54, ATFD=10, TCC=0.0) 1354
This class has too many methods, consider refactoring it. 39354
Avoid protected methods in a final class that doesnt extend anything other than Object. Change to private or package access. 9395
Use block level rather than method level synchronization 138140
Use block level rather than method level synchronization 143145
Use block level rather than method level synchronization 228247
Use block level rather than method level synchronization 250263
Use block level rather than method level synchronization 277290
Avoid if (x != y) ..; else ..; 278282
Use block level rather than method level synchronization 308321
Use block level rather than method level synchronization 324326
Use block level rather than method level synchronization 329331
StringBuffer constructor is initialized with size 16, but has at least 48 characters appended. 345
Avoid appending characters as strings in StringBuffer.append. 350

splitlog-core: the client library - com/github/triceo/splitlog/DefaultMergingFollower.java

Violation Line
Use block level rather than method level synchronization 9198
Avoid if (x != y) ..; else ..; 137146
StringBuffer constructor is initialized with size 16, but has at least 67 characters appended. 166
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 167
StringBuffer (or StringBuilder).append is called 2 consecutive times with literal Strings. Use a single append with a single combined String. 167
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 168
StringBuffer (or StringBuilder).append is called 2 consecutive times with literal Strings. Use a single append with a single combined String. 168
Avoid appending characters as strings in StringBuffer.append. 169

splitlog-core: the client library - com/github/triceo/splitlog/DefaultMessage.java

Violation Line
StringBuffer constructor is initialized with size 16, but has at least 27 characters appended. 246
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 247
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 248
StringBuffer (or StringBuilder).append is called 2 consecutive times with literal Strings. Use a single append with a single combined String. 249
Avoid appending characters as strings in StringBuffer.append. 249
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 249
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 250
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 251
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 252
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 253
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 254
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 255
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 256
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 257
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 258
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 259
Avoid appending characters as strings in StringBuffer.append. 260

splitlog-core: the client library - com/github/triceo/splitlog/DefaultMessageConsumer.java

Violation Line
The class 'DefaultMessageConsumer' has a Standard Cyclomatic Complexity of 3 (Highest = 10). 990
The class 'DefaultMessageConsumer' has a Modified Cyclomatic Complexity of 3 (Highest = 10). 990
The class 'DefaultMessageConsumer' has a Cyclomatic Complexity of 3 (Highest = 10). 990
The method 'equals' has a Cyclomatic Complexity of 10. 2450
The method 'equals' has a Modified Cyclomatic Complexity of 10. 2450
The method 'equals' has a Standard Cyclomatic Complexity of 10. 2450
StringBuffer constructor is initialized with size 16, but has at least 27 characters appended. 78
Avoid appending characters as strings in StringBuffer.append. 86

splitlog-core: the client library - com/github/triceo/splitlog/DefaultMessageMetric.java

Violation Line
Use block level rather than method level synchronization 5459
Use block level rather than method level synchronization 6270
Avoid if (x != y) ..; else ..; 6569
Use block level rather than method level synchronization 7883
Use block level rather than method level synchronization 8694
Avoid if (x != y) ..; else ..; 8993
Use block level rather than method level synchronization 102113
StringBuffer constructor is initialized with size 16, but has at least 59 characters appended. 126
Avoid appending characters as strings in StringBuffer.append. 135

splitlog-core: the client library - com/github/triceo/splitlog/LogWatchStorageManager.java

Violation Line
Use block level rather than method level synchronization 4758
Use block level rather than method level synchronization 6072
Avoid protected methods in a final class that doesnt extend anything other than Object. Change to private or package access. 88109
Use block level rather than method level synchronization 88109
Use block level rather than method level synchronization 122130
Use block level rather than method level synchronization 142163
Avoid protected methods in a final class that doesnt extend anything other than Object. Change to private or package access. 142163
Avoid protected methods in a final class that doesnt extend anything other than Object. Change to private or package access. 177179
Use block level rather than method level synchronization 189197
Use block level rather than method level synchronization 207209
Use block level rather than method level synchronization 221223
Use block level rather than method level synchronization 228234
Use block level rather than method level synchronization 236249

splitlog-core: the client library - com/github/triceo/splitlog/LogWatchTailingManager.java

Violation Line
Avoid protected methods in a final class that doesnt extend anything other than Object. Change to private or package access. 6780
Avoid protected methods in a final class that doesnt extend anything other than Object. Change to private or package access. 8287
Avoid protected methods in a final class that doesnt extend anything other than Object. Change to private or package access. 89129
Avoid protected methods in a final class that doesnt extend anything other than Object. Change to private or package access. 178190

splitlog-core: the client library - com/github/triceo/splitlog/MessageBuilder.java

Violation Line
Use block level rather than method level synchronization 4649
Use block level rather than method level synchronization 6676
Use block level rather than method level synchronization 8289
Use block level rather than method level synchronization 91100
Use block level rather than method level synchronization 115117

splitlog-core: the client library - com/github/triceo/splitlog/MessageStore.java

Violation Line
Use block level rather than method level synchronization 6575
Use block level rather than method level synchronization 98123
Use block level rather than method level synchronization 144150
Use block level rather than method level synchronization 172190
Use block level rather than method level synchronization 197199
Use block level rather than method level synchronization 217219
Use block level rather than method level synchronization 230232

splitlog-core: the client library - com/github/triceo/splitlog/expectations/AbstractExpectation.java

Violation Line
Avoid using redundant field initializer for 'stash' 45
Avoid if (x != y) ..; else ..; 103108
A method/constructor shouldnt explicitly throw java.lang.Exception 116
A method/constructor shouldnt explicitly throw java.lang.Exception 116

splitlog-core: the client library - com/github/triceo/splitlog/expectations/AbstractExpectationManager.java

Violation Line
Use block level rather than method level synchronization 4756
Use block level rather than method level synchronization 6668
Use block level rather than method level synchronization 7887
Use block level rather than method level synchronization 109116

splitlog-core: the client library - com/github/triceo/splitlog/formatters/UnifyingMessageFormatter.java

Violation Line
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 24
Avoid appending characters as strings in StringBuffer.append. 24
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 25
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 26
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 27
Avoid appending characters as strings in StringBuffer.append. 28
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 28
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 29
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 30
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 31
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 32
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 33
Avoid appending characters as strings in StringBuffer.append. 34

splitlog-core: the client library - com/github/triceo/splitlog/splitters/JBossServerLogTailSplitter.java

Violation Line
Position literals first in String comparisons 60
Position literals first in String comparisons 60
Position literals first in String comparisons 72
Position literals first in String comparisons 74
Position literals first in String comparisons 76
Position literals first in String comparisons 78
Position literals first in String comparisons 80
Position literals first in String comparisons 96
Position literals first in String comparisons 98

splitlog-core: the client library - com/github/triceo/splitlog/splitters/exceptions/DefaultExceptionDescriptor.java

Violation Line
The class 'DefaultExceptionDescriptor' has a Modified Cyclomatic Complexity of 3 (Highest = 14). 17201
The class 'DefaultExceptionDescriptor' has a Standard Cyclomatic Complexity of 3 (Highest = 14). 17201
The class 'DefaultExceptionDescriptor' has a Cyclomatic Complexity of 3 (Highest = 14). 17201
Avoid empty if statements 3739
Avoid empty if statements 3739
Avoid instantiation through private constructors from outside of the constructors class. 4849
Avoid instantiating new objects inside loops 4849
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 82
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 84
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 85
The method 'equals' has a Standard Cyclomatic Complexity of 14. 96132
The method 'equals' has a Cyclomatic Complexity of 14. 96132
The method 'equals' has a Modified Cyclomatic Complexity of 14. 96132
The method equals() has an NPath complexity of 1024 96132
StringBuffer constructor is initialized with size 16, but has at least 28 characters appended. 183
Avoid appending characters as strings in StringBuffer.append. 197

splitlog-core: the client library - com/github/triceo/splitlog/splitters/exceptions/ExceptionParser.java

Violation Line
Use block level rather than method level synchronization 7899
Avoid instantiating new objects inside loops 160
Switch statements should have a default label 187201

splitlog-core: the client library - com/github/triceo/splitlog/splitters/exceptions/StackTraceEndLine.java

Violation Line
StringBuffer constructor is initialized with size 16, but has at least 36 characters appended. 17
Avoid appending characters as strings in StringBuffer.append. 18

splitlog-core: the client library - com/github/triceo/splitlog/splitters/exceptions/StackTraceEndParser.java

Violation Line
Avoid if (x != y) ..; else ..; 1019
Avoid if (x != y) ..; else ..; 1216

splitlog-core: the client library - com/github/triceo/splitlog/splitters/exceptions/StackTraceLine.java

Violation Line
The class 'StackTraceLine' has a Cyclomatic Complexity of 2 (Highest = 13). 3111
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 24
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 26
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 28
The constructor 'StackTraceLine' has a Cyclomatic Complexity of 13. 3961
Avoid if (x != y) ..; else ..; 4549
Avoid if (x != y) ..; else ..; 5056
StringBuffer constructor is initialized with size 16, but has at least 38 characters appended. 89
Avoid appending characters as strings in StringBuffer.append. 107

splitlog-core: the client library - com/github/triceo/splitlog/splitters/exceptions/StackTraceParser.java

Violation Line
The class 'StackTraceParser' has a Standard Cyclomatic Complexity of 11 (Highest = 10). 549
The class 'StackTraceParser' has a Cyclomatic Complexity of 13 (Highest = 12). 549
The class 'StackTraceParser' has a Modified Cyclomatic Complexity of 11 (Highest = 10). 549
The method 'parse' has a Cyclomatic Complexity of 12. 847
The method parse() has an NPath complexity of 300 847
The method 'parse' has a Standard Cyclomatic Complexity of 10. 847
The method 'parse' has a Modified Cyclomatic Complexity of 10. 847
Avoid declaring a variable if it is unreferenced before a possible exit point. 14
Avoid declaring a variable if it is unreferenced before a possible exit point. 15
Position literals first in String comparisons 22
Position literals first in String comparisons 28

splitlog-core: the client library - com/github/triceo/splitlog/util/LogUtil.java

Violation Line
All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 1051
Switch statements should have a default label 3349

splitlog-core: the client library - com/github/triceo/splitlog/util/SplitlogThreadFactory.java

Violation Line
Avoid using java.lang.ThreadGroup; it is not thread safe 16

splitlog-core: the client library - org/apache/commons/io/input/fork/Tailer.java

Violation Line
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 303
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 305
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 310
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 312
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 314
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 316

splitlog-core: the client library - org/apache/commons/io/input/fork/TailerRun.java

Violation Line
The class 'TailerRun' has a Standard Cyclomatic Complexity of 4 (Highest = 11). 17221
The class 'TailerRun' has a Cyclomatic Complexity of 4 (Highest = 11). 17221
The class 'TailerRun' has a Modified Cyclomatic Complexity of 4 (Highest = 11). 17221
Avoid using redundant field initializer for 'last' 44
Avoid using redundant field initializer for 'position' 54
Avoid using redundant field initializer for 'reader' 55
A switch statement does not contain a break 107128
Avoid instantiating new objects inside loops 110
Avoid instantiating new objects inside loops 123
The method 'run' has a Standard Cyclomatic Complexity of 11. 138219
The method 'run' has a Modified Cyclomatic Complexity of 11. 138219
The method 'run' has a Cyclomatic Complexity of 11. 138219