Fork me on GitHub

PMD Results

The following document contains the results of PMD 7.19.0.

Violations By Priority

Priority 3

dev/metaschema/cli/processor/CallingContext.java

Rule Violation Line
GodClass Possible God Class (WMC=74, ATFD=38, TCC=3.953%) 46
AvoidCatchingGenericException Avoid catching RuntimeException in try-catch block 319
AvoidCatchingGenericException Avoid catching RuntimeException in try-catch block 325
EnumComparison Enums should be compared using == 331
EnumComparison Enums should be compared using == 334
FieldDeclarationsShouldBeAtStartOfClass Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 546
CyclomaticComplexity The method 'wrapText(String, int, String)' has a cyclomatic complexity of 10. 588

dev/metaschema/cli/processor/command/ShellCompletionCommand.java

Rule Violation Line
PreserveStackTrace Thrown exception does not preserve the stack trace of exception 'ex' on all code paths 155
CloseResource Ensure that resources like this PrintWriter object are closed after use 189

dev/metaschema/cli/processor/completion/CompletionScriptGenerator.java

Rule Violation Line
GodClass Possible God Class (WMC=47, ATFD=32, TCC=7.576%) 26
InsufficientStringBufferDeclaration StringBuilder has been initialized with size 16, but has at least 750 characters appended. 85
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 89
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 89
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 18 consecutive times with literals. Use a single append with a single combined String. 89
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 90
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 93
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 94
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 95
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 96
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 97
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 98
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 99
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 100
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 101
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 102
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 105
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 106
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 107
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 108
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 109
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 110
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 113
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 4 consecutive times with literals. Use a single append with a single combined String. 113
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 114
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 121
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 121
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 128
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 6 consecutive times with literals. Use a single append with a single combined String. 128
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 129
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 130
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 131
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 132
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 135
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 135
InsufficientStringBufferDeclaration StringBuilder has been initialized with size 16, but has at least 398 characters appended. 147
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 151
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 151
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 152
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 152
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 152
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 153
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 156
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 3 consecutive times with literals. Use a single append with a single combined String. 156
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 157
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 161
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 163
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 10 consecutive times with literals. Use a single append with a single combined String. 163
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 165
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 166
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 167
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 169
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 170
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 171
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 172
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 173
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 178
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 4 consecutive times with literals. Use a single append with a single combined String. 178
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 179
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 180
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 181
CognitiveComplexity The method 'generateBashCommandCase(StringBuilder, ICommand, int)' has a cognitive complexity of 25, current threshold is 15 188
CyclomaticComplexity The method 'generateBashCommandCase(StringBuilder, ICommand, int)' has a cyclomatic complexity of 10. 188
ConfusingTernary Avoid if (x != y) ..; else ..; 197253
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 202
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 203
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 204
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 209
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 217
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 218
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 227230
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 232
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 233
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 245
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 249
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 258
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 280
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 289
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 289
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 289
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 298
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 302
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 315
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 321
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 321
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 330
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 330
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 333

Files

dev/metaschema/cli/processor/CallingContext.java

Rule Violation Priority Line
GodClass Possible God Class (WMC=74, ATFD=38, TCC=3.953%) 3 46
AvoidCatchingGenericException Avoid catching RuntimeException in try-catch block 3 319
AvoidCatchingGenericException Avoid catching RuntimeException in try-catch block 3 325
EnumComparison Enums should be compared using == 3 331
EnumComparison Enums should be compared using == 3 334
FieldDeclarationsShouldBeAtStartOfClass Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 3 546
CyclomaticComplexity The method 'wrapText(String, int, String)' has a cyclomatic complexity of 10. 3 588

dev/metaschema/cli/processor/command/ShellCompletionCommand.java

Rule Violation Priority Line
PreserveStackTrace Thrown exception does not preserve the stack trace of exception 'ex' on all code paths 3 155
CloseResource Ensure that resources like this PrintWriter object are closed after use 3 189

dev/metaschema/cli/processor/completion/CompletionScriptGenerator.java

Rule Violation Priority Line
GodClass Possible God Class (WMC=47, ATFD=32, TCC=7.576%) 3 26
InsufficientStringBufferDeclaration StringBuilder has been initialized with size 16, but has at least 750 characters appended. 3 85
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 89
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 89
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 18 consecutive times with literals. Use a single append with a single combined String. 3 89
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 90
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 93
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 94
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 95
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 96
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 97
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 98
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 99
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 100
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 101
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 102
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 105
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 106
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 107
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 108
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 109
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 110
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 113
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 4 consecutive times with literals. Use a single append with a single combined String. 3 113
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 114
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 121
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 3 121
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 128
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 6 consecutive times with literals. Use a single append with a single combined String. 3 128
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 129
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 130
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 131
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 132
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 135
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 135
InsufficientStringBufferDeclaration StringBuilder has been initialized with size 16, but has at least 398 characters appended. 3 147
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 151
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 3 151
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 152
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 152
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 3 152
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 153
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 156
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 3 consecutive times with literals. Use a single append with a single combined String. 3 156
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 157
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 161
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 163
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 10 consecutive times with literals. Use a single append with a single combined String. 3 163
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 165
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 166
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 167
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 169
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 170
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 171
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 172
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 173
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 178
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 4 consecutive times with literals. Use a single append with a single combined String. 3 178
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 179
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 180
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 181
CognitiveComplexity The method 'generateBashCommandCase(StringBuilder, ICommand, int)' has a cognitive complexity of 25, current threshold is 15 3 188
CyclomaticComplexity The method 'generateBashCommandCase(StringBuilder, ICommand, int)' has a cyclomatic complexity of 10. 3 188
ConfusingTernary Avoid if (x != y) ..; else ..; 3 197253
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 202
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 203
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 204
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 209
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 217
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 218
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 227230
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 232
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 233
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 245
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 249
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 3 258
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 280
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 289
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 289
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 3 289
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 298
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 302
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 315
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 321
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 321
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 330
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 330
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 333

Suppressed Violations

Filename Rule message Suppression type Reason
dev/metaschema/cli/processor/CLIProcessor.java Ensure that resources like this LoggerContext object are closed after use //nopmd not closable here
dev/metaschema/cli/processor/CallingContext.java Avoid using implementation types like 'LinkedList'; use the interface instead @suppresswarnings
dev/metaschema/cli/processor/command/AbstractParentCommand.java Avoid unused method parameters such as 'commandLine'. @suppresswarnings