PMD Results

The following document contains the results of PMD 6.55.0.

Violations By Priority

Priority 3

gov/nist/secauto/metaschema/maven/plugin/AbstractMetaschemaMojo.java

Rule Violation Line
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 230

gov/nist/secauto/metaschema/maven/plugin/GenerateSchemaMojo.java

Rule Violation Line
ImmutableField Private field 'inlineDefinitions' could be made final; it is only initialized in the declaration or constructor. 102
RedundantFieldInitializer Avoid using redundant field initializer for 'inlineChoiceDefinitions' 111
ImmutableField Private field 'inlineChoiceDefinitions' could be made final; it is only initialized in the declaration or constructor. 111
CyclomaticComplexity The method 'generate(Set)' has a cyclomatic complexity of 10. 156200
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 215
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 225
CognitiveComplexity The method 'execute()' has a cognitive complexity of 22, current threshold is 15 247319
CyclomaticComplexity The method 'execute()' has a cyclomatic complexity of 16. 247319
NPathComplexity The method 'execute()' has an NPath complexity of 492, current threshold is 200 247319
ConfusingTernary Avoid if (x != y) ..; else ..; 259264
CollapsibleIfStatements These nested if statements could be combined 271273
CollapsibleIfStatements These nested if statements could be combined 295297

gov/nist/secauto/metaschema/maven/plugin/GenerateSourcesMojo.java

Rule Violation Line
CognitiveComplexity The method 'execute()' has a cognitive complexity of 23, current threshold is 15 129201
CyclomaticComplexity The method 'execute()' has a cyclomatic complexity of 18. 129201
NPathComplexity The method 'execute()' has an NPath complexity of 984, current threshold is 200 129201
ConfusingTernary Avoid if (x != y) ..; else ..; 141146
CollapsibleIfStatements These nested if statements could be combined 154156
CollapsibleIfStatements These nested if statements could be combined 178180

gov/nist/secauto/metaschema/metaschema_maven_plugin/HelpMojo.java

Rule Violation Line
GodClass Possible God Class (WMC=78, ATFD=23, TCC=6.667%) 28446
IdenticalCatchBranches 'catch' branch identical to 'IOException' branch 8386
IdenticalCatchBranches 'catch' branch identical to 'IOException' branch 8790
CyclomaticComplexity The method 'execute()' has a cyclomatic complexity of 11. 97160
NPathComplexity The method 'execute()' has an NPath complexity of 256, current threshold is 200 97160
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 191
OnlyOneReturn A method should have only one exit point, and that should be the last statement in the method 210
CognitiveComplexity The method 'writeGoal(StringBuilder, String, Element)' has a cognitive complexity of 15, current threshold is 15 219257
CyclomaticComplexity The method 'writeGoal(StringBuilder, String, Element)' has a cyclomatic complexity of 11. 219257
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 346
LinguisticNaming Linguistics Antipattern - The transform method 'toLines' should not return void linguistically 368409
OnlyOneReturn A method should have only one exit point, and that should be the last statement in the method 441

Priority 4

gov/nist/secauto/metaschema/metaschema_maven_plugin/HelpMojo.java

Rule Violation Line
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'java.lang.String' due to existing implicit import 'java.lang.*' 43
UselessParentheses Useless parentheses. 229
UselessParentheses Useless parentheses. 278
UselessParentheses Useless parentheses. 288

Files

gov/nist/secauto/metaschema/maven/plugin/AbstractMetaschemaMojo.java

Rule Violation Priority Line
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 230

gov/nist/secauto/metaschema/maven/plugin/GenerateSchemaMojo.java

Rule Violation Priority Line
ImmutableField Private field 'inlineDefinitions' could be made final; it is only initialized in the declaration or constructor. 3 102
RedundantFieldInitializer Avoid using redundant field initializer for 'inlineChoiceDefinitions' 3 111
ImmutableField Private field 'inlineChoiceDefinitions' could be made final; it is only initialized in the declaration or constructor. 3 111
CyclomaticComplexity The method 'generate(Set)' has a cyclomatic complexity of 10. 3 156200
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 215
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 225
CognitiveComplexity The method 'execute()' has a cognitive complexity of 22, current threshold is 15 3 247319
CyclomaticComplexity The method 'execute()' has a cyclomatic complexity of 16. 3 247319
NPathComplexity The method 'execute()' has an NPath complexity of 492, current threshold is 200 3 247319
ConfusingTernary Avoid if (x != y) ..; else ..; 3 259264
CollapsibleIfStatements These nested if statements could be combined 3 271273
CollapsibleIfStatements These nested if statements could be combined 3 295297

gov/nist/secauto/metaschema/maven/plugin/GenerateSourcesMojo.java

Rule Violation Priority Line
CognitiveComplexity The method 'execute()' has a cognitive complexity of 23, current threshold is 15 3 129201
CyclomaticComplexity The method 'execute()' has a cyclomatic complexity of 18. 3 129201
NPathComplexity The method 'execute()' has an NPath complexity of 984, current threshold is 200 3 129201
ConfusingTernary Avoid if (x != y) ..; else ..; 3 141146
CollapsibleIfStatements These nested if statements could be combined 3 154156
CollapsibleIfStatements These nested if statements could be combined 3 178180

gov/nist/secauto/metaschema/metaschema_maven_plugin/HelpMojo.java

Rule Violation Priority Line
GodClass Possible God Class (WMC=78, ATFD=23, TCC=6.667%) 3 28446
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'java.lang.String' due to existing implicit import 'java.lang.*' 4 43
IdenticalCatchBranches 'catch' branch identical to 'IOException' branch 3 8386
IdenticalCatchBranches 'catch' branch identical to 'IOException' branch 3 8790
CyclomaticComplexity The method 'execute()' has a cyclomatic complexity of 11. 3 97160
NPathComplexity The method 'execute()' has an NPath complexity of 256, current threshold is 200 3 97160
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 191
OnlyOneReturn A method should have only one exit point, and that should be the last statement in the method 3 210
CognitiveComplexity The method 'writeGoal(StringBuilder, String, Element)' has a cognitive complexity of 15, current threshold is 15 3 219257
CyclomaticComplexity The method 'writeGoal(StringBuilder, String, Element)' has a cyclomatic complexity of 11. 3 219257
UselessParentheses Useless parentheses. 4 229
UselessParentheses Useless parentheses. 4 278
UselessParentheses Useless parentheses. 4 288
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 346
LinguisticNaming Linguistics Antipattern - The transform method 'toLines' should not return void linguistically 3 368409
OnlyOneReturn A method should have only one exit point, and that should be the last statement in the method 3 441