PMD Results
The following document contains the results of PMD 6.55.0.
Violations By Priority
Priority 3
gov/nist/secauto/oscal/lib/OscalBindingContext.java
Rule | Violation | Line |
---|---|---|
CyclomaticComplexity | The method 'getBoundClassForXmlQName(QName)' has a cyclomatic complexity of 10. | 187–217 |
gov/nist/secauto/oscal/lib/metapath/function/library/HasOscalNamespace.java
Rule | Violation | Line |
---|---|---|
AvoidUncheckedExceptionsInSignatures | A method or constructor should not explicitly declare unchecked exceptions in its 'throws' clause | 152 |
gov/nist/secauto/oscal/lib/model/control/AbstractParameter.java
Rule | Violation | Line |
---|---|---|
CyclomaticComplexity | The method 'build()' has a cyclomatic complexity of 11. | 182–217 |
NPathComplexity | The method 'build()' has an NPath complexity of 1024, current threshold is 200 | 182–217 |
gov/nist/secauto/oscal/lib/model/control/AbstractPart.java
Rule | Violation | Line |
---|---|---|
NPathComplexity | The method 'build()' has an NPath complexity of 256, current threshold is 200 | 152–182 |
gov/nist/secauto/oscal/lib/model/control/catalog/AbstractCatalogGroup.java
Rule | Violation | Line |
---|---|---|
CyclomaticComplexity | The method 'build()' has a cyclomatic complexity of 10. | 149–181 |
NPathComplexity | The method 'build()' has an NPath complexity of 256, current threshold is 200 | 149–181 |
gov/nist/secauto/oscal/lib/model/metadata/AbstractProperty.java
Rule | Violation | Line |
---|---|---|
NullAssignment | Assigning an Object to null is a code smell. Consider refactoring. | 118 |
gov/nist/secauto/oscal/lib/profile/resolver/ProfileResolver.java
Rule | Violation | Line |
---|---|---|
GodClass | Possible God Class (WMC=69, ATFD=195, TCC=2.462%) | 97–716 |
gov/nist/secauto/oscal/lib/profile/resolver/alter/AddVisitor.java
Rule | Violation | Line |
---|---|---|
CognitiveComplexity | The method 'handleChild(TargetType, Supplier, Supplier, Function, Context)' has a cognitive complexity of 23, current threshold is 15 | 349–416 |
CyclomaticComplexity | The method 'handleChild(TargetType, Supplier, Supplier, Function, Context)' has a cyclomatic complexity of 16. | 349–416 |
DataClass | The class 'Context' is suspected to be a Data Class (WOC=23.077%, NOPA=0, NOAM=9, WMC=40) | 536–753 |
CognitiveComplexity | The constructor 'Context(Control, Position, String, MarkupLine, List, List, List, List)' has a cognitive complexity of 18, current threshold is 15 | 572–646 |
CyclomaticComplexity | The constructor 'Context(Control, Position, String, MarkupLine, List, List, List, List)' has a cyclomatic complexity of 19. | 572–646 |
NPathComplexity | The constructor 'Context(Control, Position, String, MarkupLine, List, List, List, List)' has an NPath complexity of 640, current threshold is 200 | 572–646 |
StringToString | Avoid calling toString() on String objects; this is unnecessary. | 737 |
gov/nist/secauto/oscal/lib/profile/resolver/alter/RemoveVisitor.java
Rule | Violation | Line |
---|---|---|
CognitiveComplexity | The method 'handle(TargetType, Supplier, Function, Context)' has a cognitive complexity of 18, current threshold is 15 | 163–198 |
CyclomaticComplexity | The method 'handle(TargetType, Supplier, Function, Context)' has a cyclomatic complexity of 11. | 163–198 |
UseObjectForClearerAPI | Rather than using a lot of String arguments, consider using a container object for those values. | 219–225 |
DataClass | The class 'Context' is suspected to be a Data Class (WOC=28.571%, NOPA=0, NOAM=5, WMC=26) | 333–503 |
CyclomaticComplexity | The method 'isApplicableTo(Object)' has a cyclomatic complexity of 10. | 454–502 |
StringToString | Avoid calling toString() on String objects; this is unnecessary. | 485 |
gov/nist/secauto/oscal/lib/profile/resolver/policy/ReferenceCountingVisitor.java
Rule | Violation | Line |
---|---|---|
GodClass | Possible God Class (WMC=63, ATFD=144, TCC=3.333%) | 72–626 |
CyclomaticComplexity | The method 'entityDispatch(IEntityItem, Context)' has a cyclomatic complexity of 10. | 505–535 |
gov/nist/secauto/oscal/lib/profile/resolver/selection/ControlSelectionState.java
Rule | Violation | Line |
---|---|---|
CognitiveComplexity | The method 'getSelectionState(IRequiredValueModelNodeItem)' has a cognitive complexity of 15, current threshold is 15 | 79–122 |
gov/nist/secauto/oscal/lib/profile/resolver/support/BasicIndexer.java
Rule | Violation | Line |
---|---|---|
GodClass | Possible God Class (WMC=50, ATFD=59, TCC=9.881%) | 62–397 |
CyclomaticComplexity | The method 'isSelected(IEntityItem)' has a cyclomatic complexity of 11. | 121–155 |
gov/nist/secauto/oscal/lib/profile/resolver/support/IIdentifierMapper.java
Rule | Violation | Line |
---|---|---|
CyclomaticComplexity | The method 'mapByItemType(IEntityItem.ItemType, String)' has a cyclomatic complexity of 10. | 77–106 |
Files
gov/nist/secauto/oscal/lib/OscalBindingContext.java
Rule | Violation | Priority | Line |
---|---|---|---|
CyclomaticComplexity | The method 'getBoundClassForXmlQName(QName)' has a cyclomatic complexity of 10. | 3 | 187–217 |
gov/nist/secauto/oscal/lib/metapath/function/library/HasOscalNamespace.java
Rule | Violation | Priority | Line |
---|---|---|---|
AvoidUncheckedExceptionsInSignatures | A method or constructor should not explicitly declare unchecked exceptions in its 'throws' clause | 3 | 152 |
gov/nist/secauto/oscal/lib/model/control/AbstractParameter.java
Rule | Violation | Priority | Line |
---|---|---|---|
CyclomaticComplexity | The method 'build()' has a cyclomatic complexity of 11. | 3 | 182–217 |
NPathComplexity | The method 'build()' has an NPath complexity of 1024, current threshold is 200 | 3 | 182–217 |
gov/nist/secauto/oscal/lib/model/control/AbstractPart.java
Rule | Violation | Priority | Line |
---|---|---|---|
NPathComplexity | The method 'build()' has an NPath complexity of 256, current threshold is 200 | 3 | 152–182 |
gov/nist/secauto/oscal/lib/model/control/catalog/AbstractCatalogGroup.java
Rule | Violation | Priority | Line |
---|---|---|---|
CyclomaticComplexity | The method 'build()' has a cyclomatic complexity of 10. | 3 | 149–181 |
NPathComplexity | The method 'build()' has an NPath complexity of 256, current threshold is 200 | 3 | 149–181 |
gov/nist/secauto/oscal/lib/model/metadata/AbstractProperty.java
Rule | Violation | Priority | Line |
---|---|---|---|
NullAssignment | Assigning an Object to null is a code smell. Consider refactoring. | 3 | 118 |
gov/nist/secauto/oscal/lib/profile/resolver/ProfileResolver.java
Rule | Violation | Priority | Line |
---|---|---|---|
GodClass | Possible God Class (WMC=69, ATFD=195, TCC=2.462%) | 3 | 97–716 |
gov/nist/secauto/oscal/lib/profile/resolver/alter/AddVisitor.java
Rule | Violation | Priority | Line |
---|---|---|---|
CognitiveComplexity | The method 'handleChild(TargetType, Supplier, Supplier, Function, Context)' has a cognitive complexity of 23, current threshold is 15 | 3 | 349–416 |
CyclomaticComplexity | The method 'handleChild(TargetType, Supplier, Supplier, Function, Context)' has a cyclomatic complexity of 16. | 3 | 349–416 |
DataClass | The class 'Context' is suspected to be a Data Class (WOC=23.077%, NOPA=0, NOAM=9, WMC=40) | 3 | 536–753 |
CognitiveComplexity | The constructor 'Context(Control, Position, String, MarkupLine, List, List, List, List)' has a cognitive complexity of 18, current threshold is 15 | 3 | 572–646 |
CyclomaticComplexity | The constructor 'Context(Control, Position, String, MarkupLine, List, List, List, List)' has a cyclomatic complexity of 19. | 3 | 572–646 |
NPathComplexity | The constructor 'Context(Control, Position, String, MarkupLine, List, List, List, List)' has an NPath complexity of 640, current threshold is 200 | 3 | 572–646 |
StringToString | Avoid calling toString() on String objects; this is unnecessary. | 3 | 737 |
gov/nist/secauto/oscal/lib/profile/resolver/alter/RemoveVisitor.java
Rule | Violation | Priority | Line |
---|---|---|---|
CognitiveComplexity | The method 'handle(TargetType, Supplier, Function, Context)' has a cognitive complexity of 18, current threshold is 15 | 3 | 163–198 |
CyclomaticComplexity | The method 'handle(TargetType, Supplier, Function, Context)' has a cyclomatic complexity of 11. | 3 | 163–198 |
UseObjectForClearerAPI | Rather than using a lot of String arguments, consider using a container object for those values. | 3 | 219–225 |
DataClass | The class 'Context' is suspected to be a Data Class (WOC=28.571%, NOPA=0, NOAM=5, WMC=26) | 3 | 333–503 |
CyclomaticComplexity | The method 'isApplicableTo(Object)' has a cyclomatic complexity of 10. | 3 | 454–502 |
StringToString | Avoid calling toString() on String objects; this is unnecessary. | 3 | 485 |
gov/nist/secauto/oscal/lib/profile/resolver/policy/ReferenceCountingVisitor.java
Rule | Violation | Priority | Line |
---|---|---|---|
GodClass | Possible God Class (WMC=63, ATFD=144, TCC=3.333%) | 3 | 72–626 |
CyclomaticComplexity | The method 'entityDispatch(IEntityItem, Context)' has a cyclomatic complexity of 10. | 3 | 505–535 |
gov/nist/secauto/oscal/lib/profile/resolver/selection/ControlSelectionState.java
Rule | Violation | Priority | Line |
---|---|---|---|
CognitiveComplexity | The method 'getSelectionState(IRequiredValueModelNodeItem)' has a cognitive complexity of 15, current threshold is 15 | 3 | 79–122 |
gov/nist/secauto/oscal/lib/profile/resolver/support/BasicIndexer.java
Rule | Violation | Priority | Line |
---|---|---|---|
GodClass | Possible God Class (WMC=50, ATFD=59, TCC=9.881%) | 3 | 62–397 |
CyclomaticComplexity | The method 'isSelected(IEntityItem)' has a cyclomatic complexity of 11. | 3 | 121–155 |
gov/nist/secauto/oscal/lib/profile/resolver/support/IIdentifierMapper.java
Rule | Violation | Priority | Line |
---|---|---|---|
CyclomaticComplexity | The method 'mapByItemType(IEntityItem.ItemType, String)' has a cyclomatic complexity of 10. | 3 | 77–106 |
Suppressed Violations
Filename | Rule message | Suppression type | Reason |
---|---|---|---|
gov/nist/secauto/oscal/lib/OscalUtils.java | A method should have only one exit point, and that should be the last statement in the method | annotation | - |
gov/nist/secauto/oscal/lib/metapath/function/library/HasOscalNamespace.java | Linguistics Antipattern - The method 'hasNamespace' indicates linguistically it returns a boolean, but it returns 'IBooleanItem' | annotation | - |
gov/nist/secauto/oscal/lib/metapath/function/library/HasOscalNamespace.java | A method should have only one exit point, and that should be the last statement in the method | annotation | - |
gov/nist/secauto/oscal/lib/metapath/function/library/HasOscalNamespace.java | A method should have only one exit point, and that should be the last statement in the method | annotation | - |
gov/nist/secauto/oscal/lib/metapath/function/library/HasOscalNamespace.java | A method should have only one exit point, and that should be the last statement in the method | annotation | - |
gov/nist/secauto/oscal/lib/metapath/function/library/HasOscalNamespace.java | A method should have only one exit point, and that should be the last statement in the method | annotation | - |
gov/nist/secauto/oscal/lib/metapath/function/library/ResolveProfile.java | A method should have only one exit point, and that should be the last statement in the method | annotation | - |
gov/nist/secauto/oscal/lib/metapath/function/library/ResolveProfile.java | A method should have only one exit point, and that should be the last statement in the method | annotation | - |
gov/nist/secauto/oscal/lib/model/control/AbstractPart.java | Avoid using short method names | annotation | - |
gov/nist/secauto/oscal/lib/profile/resolver/ModifyPhaseUtils.java | A method should have only one exit point, and that should be the last statement in the method | annotation | - |
gov/nist/secauto/oscal/lib/profile/resolver/ModifyPhaseUtils.java | A method should have only one exit point, and that should be the last statement in the method | annotation | - |
gov/nist/secauto/oscal/lib/profile/resolver/ModifyPhaseUtils.java | A method should have only one exit point, and that should be the last statement in the method | annotation | - |
gov/nist/secauto/oscal/lib/profile/resolver/ProfileResolver.java | Avoid using exceptions as flow control. | annotation | - |
gov/nist/secauto/oscal/lib/profile/resolver/policy/ReferenceCountingVisitor.java | Avoid unused private methods such as 'getSource()'. | annotation | - |
gov/nist/secauto/oscal/lib/profile/resolver/selection/DefaultControlSelectionFilter.java | A switch statement does not contain a break | annotation | - |
gov/nist/secauto/oscal/lib/profile/resolver/selection/Import.java | Deeply nested if..then statements are hard to read | annotation | - |
gov/nist/secauto/oscal/lib/profile/resolver/support/BasicIndexer.java | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | annotation | - |