Fork me on GitHub

PMD Results

The following document contains the results of PMD 7.5.0.

Violations By Priority

Priority 3

gov/nist/secauto/metaschema/cli/CLI.java

Rule Violation Line
DoubleBraceInitialization Double-brace initialization should be avoided 4750

gov/nist/secauto/metaschema/cli/commands/AbstractConvertSubcommand.java

Rule Violation Line
NPathComplexity The method 'execute()' has an NPath complexity of 672, current threshold is 200 143
CloseResource Ensure that resources like this OutputStreamWriter object are closed after use 201

gov/nist/secauto/metaschema/cli/commands/AbstractValidateContentCommand.java

Rule Violation Line
LambdaCanBeMethodReference Lambda expression could be written as a method reference: `Enum::name` 152
NcssCount The method 'execute()' has a NCSS line count of 80. 195
CognitiveComplexity The method 'execute()' has a cognitive complexity of 47, current threshold is 15 195
CyclomaticComplexity The method 'execute()' has a cyclomatic complexity of 35. 195
NPathComplexity The method 'execute()' has an NPath complexity of 1128960, current threshold is 200 195
LambdaCanBeMethodReference Lambda expression could be written as a method reference: `Enum::name` 249
LambdaCanBeMethodReference Lambda expression could be written as a method reference: `Enum::name` 266

gov/nist/secauto/metaschema/cli/commands/GenerateDiagramCommand.java

Rule Violation Line
CognitiveComplexity The method 'executeCommand(CallingContext, CommandLine)' has a cognitive complexity of 25, current threshold is 15 107
CyclomaticComplexity The method 'executeCommand(CallingContext, CommandLine)' has a cyclomatic complexity of 13. 107
NPathComplexity The method 'executeCommand(CallingContext, CommandLine)' has an NPath complexity of 384, current threshold is 200 107
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 182

gov/nist/secauto/metaschema/cli/commands/GenerateSchemaCommand.java

Rule Violation Line
LambdaCanBeMethodReference Lambda expression could be written as a method reference: `Enum::name` 117
CognitiveComplexity The method 'executeCommand(CallingContext, CommandLine)' has a cognitive complexity of 29, current threshold is 15 148
CyclomaticComplexity The method 'executeCommand(CallingContext, CommandLine)' has a cyclomatic complexity of 16. 148
NPathComplexity The method 'executeCommand(CallingContext, CommandLine)' has an NPath complexity of 1440, current threshold is 200 148

gov/nist/secauto/metaschema/cli/commands/metapath/EvaluateMetapathCommand.java

Rule Violation Line
CouplingBetweenObjects High amount of different objects as members denotes a high coupling 6220
CognitiveComplexity The method 'executeCommand(CallingContext, CommandLine)' has a cognitive complexity of 22, current threshold is 15 124
CyclomaticComplexity The method 'executeCommand(CallingContext, CommandLine)' has a cyclomatic complexity of 12. 124
NPathComplexity The method 'executeCommand(CallingContext, CommandLine)' has an NPath complexity of 290, current threshold is 200 124
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 187
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 188
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 216

gov/nist/secauto/metaschema/cli/commands/metapath/ListFunctionsSubcommand.java

Rule Violation Line
CognitiveComplexity The method 'executeCommand(CallingContext, CommandLine)' has a cognitive complexity of 22, current threshold is 15 65
AvoidInstantiatingObjectsInLoops Avoid instantiating new objects inside loops 94

Priority 4

gov/nist/secauto/metaschema/cli/commands/MetaschemaCommands.java

Rule Violation Line
UnnecessaryFullyQualifiedName Unnecessary qualifier 'MetaschemaCommands': 'METASCHEMA_OPTION' is already in scope because it is declared in an enclosing type 60

Priority 5

gov/nist/secauto/metaschema/cli/commands/AbstractValidateContentCommand.java

Rule Violation Line
InvalidLogMessageFormat Too many arguments, expected 0 argument but found 1 321

Files

gov/nist/secauto/metaschema/cli/CLI.java

Rule Violation Priority Line
DoubleBraceInitialization Double-brace initialization should be avoided 3 4750

gov/nist/secauto/metaschema/cli/commands/AbstractConvertSubcommand.java

Rule Violation Priority Line
NPathComplexity The method 'execute()' has an NPath complexity of 672, current threshold is 200 3 143
CloseResource Ensure that resources like this OutputStreamWriter object are closed after use 3 201

gov/nist/secauto/metaschema/cli/commands/AbstractValidateContentCommand.java

Rule Violation Priority Line
LambdaCanBeMethodReference Lambda expression could be written as a method reference: `Enum::name` 3 152
NcssCount The method 'execute()' has a NCSS line count of 80. 3 195
CognitiveComplexity The method 'execute()' has a cognitive complexity of 47, current threshold is 15 3 195
CyclomaticComplexity The method 'execute()' has a cyclomatic complexity of 35. 3 195
NPathComplexity The method 'execute()' has an NPath complexity of 1128960, current threshold is 200 3 195
LambdaCanBeMethodReference Lambda expression could be written as a method reference: `Enum::name` 3 249
LambdaCanBeMethodReference Lambda expression could be written as a method reference: `Enum::name` 3 266
InvalidLogMessageFormat Too many arguments, expected 0 argument but found 1 5 321

gov/nist/secauto/metaschema/cli/commands/GenerateDiagramCommand.java

Rule Violation Priority Line
CognitiveComplexity The method 'executeCommand(CallingContext, CommandLine)' has a cognitive complexity of 25, current threshold is 15 3 107
CyclomaticComplexity The method 'executeCommand(CallingContext, CommandLine)' has a cyclomatic complexity of 13. 3 107
NPathComplexity The method 'executeCommand(CallingContext, CommandLine)' has an NPath complexity of 384, current threshold is 200 3 107
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 182

gov/nist/secauto/metaschema/cli/commands/GenerateSchemaCommand.java

Rule Violation Priority Line
LambdaCanBeMethodReference Lambda expression could be written as a method reference: `Enum::name` 3 117
CognitiveComplexity The method 'executeCommand(CallingContext, CommandLine)' has a cognitive complexity of 29, current threshold is 15 3 148
CyclomaticComplexity The method 'executeCommand(CallingContext, CommandLine)' has a cyclomatic complexity of 16. 3 148
NPathComplexity The method 'executeCommand(CallingContext, CommandLine)' has an NPath complexity of 1440, current threshold is 200 3 148

gov/nist/secauto/metaschema/cli/commands/MetaschemaCommands.java

Rule Violation Priority Line
UnnecessaryFullyQualifiedName Unnecessary qualifier 'MetaschemaCommands': 'METASCHEMA_OPTION' is already in scope because it is declared in an enclosing type 4 60

gov/nist/secauto/metaschema/cli/commands/metapath/EvaluateMetapathCommand.java

Rule Violation Priority Line
CouplingBetweenObjects High amount of different objects as members denotes a high coupling 3 6220
CognitiveComplexity The method 'executeCommand(CallingContext, CommandLine)' has a cognitive complexity of 22, current threshold is 15 3 124
CyclomaticComplexity The method 'executeCommand(CallingContext, CommandLine)' has a cyclomatic complexity of 12. 3 124
NPathComplexity The method 'executeCommand(CallingContext, CommandLine)' has an NPath complexity of 290, current threshold is 200 3 124
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 187
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 188
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 216

gov/nist/secauto/metaschema/cli/commands/metapath/ListFunctionsSubcommand.java

Rule Violation Priority Line
CognitiveComplexity The method 'executeCommand(CallingContext, CommandLine)' has a cognitive complexity of 22, current threshold is 15 3 65
AvoidInstantiatingObjectsInLoops Avoid instantiating new objects inside loops 3 94

Suppressed Violations

Filename Rule message Suppression type Reason
gov/nist/secauto/metaschema/cli/CLI.java Avoid short class names like CLI @suppresswarnings
gov/nist/secauto/metaschema/cli/commands/AbstractConvertSubcommand.java A method should have only one exit point, and that should be the last statement in the method @suppresswarnings
gov/nist/secauto/metaschema/cli/commands/AbstractConvertSubcommand.java A method should have only one exit point, and that should be the last statement in the method @suppresswarnings
gov/nist/secauto/metaschema/cli/commands/AbstractConvertSubcommand.java A method should have only one exit point, and that should be the last statement in the method @suppresswarnings
gov/nist/secauto/metaschema/cli/commands/AbstractConvertSubcommand.java A method should have only one exit point, and that should be the last statement in the method @suppresswarnings
gov/nist/secauto/metaschema/cli/commands/AbstractConvertSubcommand.java A method should have only one exit point, and that should be the last statement in the method @suppresswarnings
gov/nist/secauto/metaschema/cli/commands/AbstractConvertSubcommand.java The method 'execute()' has a cognitive complexity of 25, current threshold is 15 @suppresswarnings
gov/nist/secauto/metaschema/cli/commands/AbstractConvertSubcommand.java The method 'execute()' has a cyclomatic complexity of 14. @suppresswarnings
gov/nist/secauto/metaschema/cli/commands/AbstractValidateContentCommand.java A method should have only one exit point, and that should be the last statement in the method @suppresswarnings
gov/nist/secauto/metaschema/cli/commands/AbstractValidateContentCommand.java A method should have only one exit point, and that should be the last statement in the method @suppresswarnings
gov/nist/secauto/metaschema/cli/commands/AbstractValidateContentCommand.java A method should have only one exit point, and that should be the last statement in the method @suppresswarnings
gov/nist/secauto/metaschema/cli/commands/AbstractValidateContentCommand.java A method should have only one exit point, and that should be the last statement in the method @suppresswarnings
gov/nist/secauto/metaschema/cli/commands/AbstractValidateContentCommand.java A method should have only one exit point, and that should be the last statement in the method @suppresswarnings
gov/nist/secauto/metaschema/cli/commands/AbstractValidateContentCommand.java A method should have only one exit point, and that should be the last statement in the method @suppresswarnings
gov/nist/secauto/metaschema/cli/commands/AbstractValidateContentCommand.java A method should have only one exit point, and that should be the last statement in the method @suppresswarnings
gov/nist/secauto/metaschema/cli/commands/AbstractValidateContentCommand.java A method should have only one exit point, and that should be the last statement in the method @suppresswarnings
gov/nist/secauto/metaschema/cli/commands/AbstractValidateContentCommand.java A method should have only one exit point, and that should be the last statement in the method @suppresswarnings
gov/nist/secauto/metaschema/cli/commands/AbstractValidateContentCommand.java A method should have only one exit point, and that should be the last statement in the method @suppresswarnings
gov/nist/secauto/metaschema/cli/commands/AbstractValidateContentCommand.java A method should have only one exit point, and that should be the last statement in the method @suppresswarnings
gov/nist/secauto/metaschema/cli/commands/AbstractValidateContentCommand.java A method should have only one exit point, and that should be the last statement in the method @suppresswarnings
gov/nist/secauto/metaschema/cli/commands/GenerateDiagramCommand.java A method should have only one exit point, and that should be the last statement in the method @suppresswarnings
gov/nist/secauto/metaschema/cli/commands/GenerateDiagramCommand.java A method should have only one exit point, and that should be the last statement in the method @suppresswarnings
gov/nist/secauto/metaschema/cli/commands/GenerateDiagramCommand.java A method should have only one exit point, and that should be the last statement in the method @suppresswarnings
gov/nist/secauto/metaschema/cli/commands/GenerateDiagramCommand.java A method should have only one exit point, and that should be the last statement in the method @suppresswarnings
gov/nist/secauto/metaschema/cli/commands/GenerateDiagramCommand.java A method should have only one exit point, and that should be the last statement in the method @suppresswarnings
gov/nist/secauto/metaschema/cli/commands/GenerateDiagramCommand.java A method should have only one exit point, and that should be the last statement in the method @suppresswarnings
gov/nist/secauto/metaschema/cli/commands/GenerateSchemaCommand.java A method should have only one exit point, and that should be the last statement in the method @suppresswarnings
gov/nist/secauto/metaschema/cli/commands/GenerateSchemaCommand.java A method should have only one exit point, and that should be the last statement in the method @suppresswarnings
gov/nist/secauto/metaschema/cli/commands/GenerateSchemaCommand.java A method should have only one exit point, and that should be the last statement in the method @suppresswarnings
gov/nist/secauto/metaschema/cli/commands/GenerateSchemaCommand.java A method should have only one exit point, and that should be the last statement in the method @suppresswarnings
gov/nist/secauto/metaschema/cli/commands/GenerateSchemaCommand.java A method should have only one exit point, and that should be the last statement in the method @suppresswarnings
gov/nist/secauto/metaschema/cli/commands/GenerateSchemaCommand.java Ensure that resources like this OutputStream object are closed after use @suppresswarnings
gov/nist/secauto/metaschema/cli/commands/metapath/EvaluateMetapathCommand.java A method should have only one exit point, and that should be the last statement in the method @suppresswarnings
gov/nist/secauto/metaschema/cli/commands/metapath/EvaluateMetapathCommand.java A method should have only one exit point, and that should be the last statement in the method @suppresswarnings
gov/nist/secauto/metaschema/cli/commands/metapath/EvaluateMetapathCommand.java A method should have only one exit point, and that should be the last statement in the method @suppresswarnings
gov/nist/secauto/metaschema/cli/commands/metapath/EvaluateMetapathCommand.java A method should have only one exit point, and that should be the last statement in the method @suppresswarnings
gov/nist/secauto/metaschema/cli/commands/metapath/EvaluateMetapathCommand.java A method should have only one exit point, and that should be the last statement in the method @suppresswarnings
gov/nist/secauto/metaschema/cli/commands/metapath/EvaluateMetapathCommand.java A method should have only one exit point, and that should be the last statement in the method @suppresswarnings
gov/nist/secauto/metaschema/cli/commands/metapath/EvaluateMetapathCommand.java A method should have only one exit point, and that should be the last statement in the method @suppresswarnings