Fork me on GitHub

PMD Results

The following document contains the results of PMD 7.4.0.

Violations By Priority

Priority 3

gov/nist/secauto/oscal/lib/OscalModelConstants.java

Rule Violation Line
DataClass The class 'OscalModelConstants' is suspected to be a Data Class (WOC=0.000%, NOPA=18, NOAM=0, WMC=1) 16

gov/nist/secauto/oscal/lib/model/control/AbstractParameter.java

Rule Violation Line
CyclomaticComplexity The method 'build()' has a cyclomatic complexity of 11. 161
NPathComplexity The method 'build()' has an NPath complexity of 1024, current threshold is 200 161

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 131

gov/nist/secauto/oscal/lib/model/control/catalog/AbstractCatalogGroup.java

Rule Violation Line
CyclomaticComplexity The method 'build()' has a cyclomatic complexity of 10. 129
NPathComplexity The method 'build()' has an NPath complexity of 256, current threshold is 200 129

gov/nist/secauto/oscal/lib/model/util/AllowedValueCollectingNodeItemVisitor.java

Rule Violation Line
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 34

gov/nist/secauto/oscal/lib/profile/resolver/ProfileResolver.java

Rule Violation Line
CouplingBetweenObjects High amount of different objects as members denotes a high coupling 6746
GodClass Possible God Class (WMC=74, ATFD=108, TCC=0.855%) 86
LooseCoupling Avoid using implementation types like 'Stack'; use the interface instead 211
LooseCoupling Avoid using implementation types like 'Stack'; use the interface instead 227
LooseCoupling Avoid using implementation types like 'Stack'; use the interface instead 258
LooseCoupling Avoid using implementation types like 'Stack'; use the interface instead 315
LooseCoupling Avoid using implementation types like 'Stack'; use the interface instead 342
LooseCoupling Avoid using implementation types like 'Stack'; use the interface instead 461
LooseCoupling Avoid using implementation types like 'Stack'; use the interface instead 471

gov/nist/secauto/oscal/lib/profile/resolver/alter/AddVisitor.java

Rule Violation Line
CouplingBetweenObjects High amount of different objects as members denotes a high coupling 6726
CognitiveComplexity The method 'handleChild(TargetType, Supplier<? extends List<T>>, Supplier<? extends List<T>>, Function<T, Boolean>, Context)' has a cognitive complexity of 23, current threshold is 15 328
CyclomaticComplexity The method 'handleChild(TargetType, Supplier<? extends List<T>>, Supplier<? extends List<T>>, Function<T, Boolean>, Context)' has a cyclomatic complexity of 16. 328
DataClass The class 'Context' is suspected to be a Data Class (WOC=25.000%, NOPA=0, NOAM=9, WMC=39) 513
CognitiveComplexity The constructor 'Context(Control, Position, String, MarkupLine, List<Parameter>, List<Property>, List<Link>, List<ControlPart>)' has a cognitive complexity of 16, current threshold is 15 549
CyclomaticComplexity The constructor 'Context(Control, Position, String, MarkupLine, List<Parameter>, List<Property>, List<Link>, List<ControlPart>)' has a cyclomatic complexity of 19. 549
NPathComplexity The constructor 'Context(Control, Position, String, MarkupLine, List<Parameter>, List<Property>, List<Link>, List<ControlPart>)' has an NPath complexity of 1024, current threshold is 200 549
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 709

gov/nist/secauto/oscal/lib/profile/resolver/alter/RemoveVisitor.java

Rule Violation Line
CognitiveComplexity The method 'handle(TargetType, Supplier<? extends Collection<T>>, Function<T, Boolean>, Context)' has a cognitive complexity of 18, current threshold is 15 143
CyclomaticComplexity The method 'handle(TargetType, Supplier<? extends Collection<T>>, Function<T, Boolean>, Context)' has a cyclomatic complexity of 11. 143
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 195
DataClass The class 'Context' is suspected to be a Data Class (WOC=28.571%, NOPA=0, NOAM=5, WMC=26) 307
CyclomaticComplexity The method 'isApplicableTo(Object)' has a cyclomatic complexity of 10. 428
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 459

gov/nist/secauto/oscal/lib/profile/resolver/policy/ReferenceCountingVisitor.java

Rule Violation Line
CouplingBetweenObjects High amount of different objects as members denotes a high coupling 6646
GodClass Possible God Class (WMC=63, ATFD=46, TCC=3.333%) 55
CyclomaticComplexity The method 'entityDispatch(IEntityItem, Context)' has a cyclomatic complexity of 10. 525

gov/nist/secauto/oscal/lib/profile/resolver/selection/ControlSelectionState.java

Rule Violation Line
CognitiveComplexity The method 'getSelectionState(IModelNodeItem<?, ?>)' has a cognitive complexity of 15, current threshold is 15 61

gov/nist/secauto/oscal/lib/profile/resolver/support/BasicIndexer.java

Rule Violation Line
CouplingBetweenObjects High amount of different objects as members denotes a high coupling 6378
GodClass Possible God Class (WMC=50, ATFD=38, TCC=9.881%) 42
CyclomaticComplexity The method 'isSelected(IEntityItem)' has a cyclomatic complexity of 11. 102

gov/nist/secauto/oscal/lib/profile/resolver/support/IIdentifierMapper.java

Rule Violation Line
CyclomaticComplexity The method 'mapByItemType(ItemType, String)' has a cyclomatic complexity of 10. 56

gov/nist/secauto/oscal/lib/profile/resolver/support/IIndexer.java

Rule Violation Line
CognitiveComplexity The method 'logIndex(IIndexer, Level)' has a cognitive complexity of 16, current threshold is 15 112

Files

gov/nist/secauto/oscal/lib/OscalModelConstants.java

Rule Violation Priority Line
DataClass The class 'OscalModelConstants' is suspected to be a Data Class (WOC=0.000%, NOPA=18, NOAM=0, WMC=1) 3 16

gov/nist/secauto/oscal/lib/model/control/AbstractParameter.java

Rule Violation Priority Line
CyclomaticComplexity The method 'build()' has a cyclomatic complexity of 11. 3 161
NPathComplexity The method 'build()' has an NPath complexity of 1024, current threshold is 200 3 161

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 131

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 129
NPathComplexity The method 'build()' has an NPath complexity of 256, current threshold is 200 3 129

gov/nist/secauto/oscal/lib/model/util/AllowedValueCollectingNodeItemVisitor.java

Rule Violation Priority Line
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 34

gov/nist/secauto/oscal/lib/profile/resolver/ProfileResolver.java

Rule Violation Priority Line
CouplingBetweenObjects High amount of different objects as members denotes a high coupling 3 6746
GodClass Possible God Class (WMC=74, ATFD=108, TCC=0.855%) 3 86
LooseCoupling Avoid using implementation types like 'Stack'; use the interface instead 3 211
LooseCoupling Avoid using implementation types like 'Stack'; use the interface instead 3 227
LooseCoupling Avoid using implementation types like 'Stack'; use the interface instead 3 258
LooseCoupling Avoid using implementation types like 'Stack'; use the interface instead 3 315
LooseCoupling Avoid using implementation types like 'Stack'; use the interface instead 3 342
LooseCoupling Avoid using implementation types like 'Stack'; use the interface instead 3 461
LooseCoupling Avoid using implementation types like 'Stack'; use the interface instead 3 471

gov/nist/secauto/oscal/lib/profile/resolver/alter/AddVisitor.java

Rule Violation Priority Line
CouplingBetweenObjects High amount of different objects as members denotes a high coupling 3 6726
CognitiveComplexity The method 'handleChild(TargetType, Supplier<? extends List<T>>, Supplier<? extends List<T>>, Function<T, Boolean>, Context)' has a cognitive complexity of 23, current threshold is 15 3 328
CyclomaticComplexity The method 'handleChild(TargetType, Supplier<? extends List<T>>, Supplier<? extends List<T>>, Function<T, Boolean>, Context)' has a cyclomatic complexity of 16. 3 328
DataClass The class 'Context' is suspected to be a Data Class (WOC=25.000%, NOPA=0, NOAM=9, WMC=39) 3 513
CognitiveComplexity The constructor 'Context(Control, Position, String, MarkupLine, List<Parameter>, List<Property>, List<Link>, List<ControlPart>)' has a cognitive complexity of 16, current threshold is 15 3 549
CyclomaticComplexity The constructor 'Context(Control, Position, String, MarkupLine, List<Parameter>, List<Property>, List<Link>, List<ControlPart>)' has a cyclomatic complexity of 19. 3 549
NPathComplexity The constructor 'Context(Control, Position, String, MarkupLine, List<Parameter>, List<Property>, List<Link>, List<ControlPart>)' has an NPath complexity of 1024, current threshold is 200 3 549
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 709

gov/nist/secauto/oscal/lib/profile/resolver/alter/RemoveVisitor.java

Rule Violation Priority Line
CognitiveComplexity The method 'handle(TargetType, Supplier<? extends Collection<T>>, Function<T, Boolean>, Context)' has a cognitive complexity of 18, current threshold is 15 3 143
CyclomaticComplexity The method 'handle(TargetType, Supplier<? extends Collection<T>>, Function<T, Boolean>, Context)' has a cyclomatic complexity of 11. 3 143
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 3 195
DataClass The class 'Context' is suspected to be a Data Class (WOC=28.571%, NOPA=0, NOAM=5, WMC=26) 3 307
CyclomaticComplexity The method 'isApplicableTo(Object)' has a cyclomatic complexity of 10. 3 428
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 459

gov/nist/secauto/oscal/lib/profile/resolver/policy/ReferenceCountingVisitor.java

Rule Violation Priority Line
CouplingBetweenObjects High amount of different objects as members denotes a high coupling 3 6646
GodClass Possible God Class (WMC=63, ATFD=46, TCC=3.333%) 3 55
CyclomaticComplexity The method 'entityDispatch(IEntityItem, Context)' has a cyclomatic complexity of 10. 3 525

gov/nist/secauto/oscal/lib/profile/resolver/selection/ControlSelectionState.java

Rule Violation Priority Line
CognitiveComplexity The method 'getSelectionState(IModelNodeItem<?, ?>)' has a cognitive complexity of 15, current threshold is 15 3 61

gov/nist/secauto/oscal/lib/profile/resolver/support/BasicIndexer.java

Rule Violation Priority Line
CouplingBetweenObjects High amount of different objects as members denotes a high coupling 3 6378
GodClass Possible God Class (WMC=50, ATFD=38, TCC=9.881%) 3 42
CyclomaticComplexity The method 'isSelected(IEntityItem)' has a cyclomatic complexity of 11. 3 102

gov/nist/secauto/oscal/lib/profile/resolver/support/IIdentifierMapper.java

Rule Violation Priority Line
CyclomaticComplexity The method 'mapByItemType(ItemType, String)' has a cyclomatic complexity of 10. 3 56

gov/nist/secauto/oscal/lib/profile/resolver/support/IIndexer.java

Rule Violation Priority Line
CognitiveComplexity The method 'logIndex(IIndexer, Level)' has a cognitive complexity of 16, current threshold is 15 3 112

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 @suppresswarnings
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' @suppresswarnings
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 @suppresswarnings
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 @suppresswarnings
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 @suppresswarnings
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 @suppresswarnings
gov/nist/secauto/oscal/lib/model/control/AbstractPart.java Avoid using short method names @suppresswarnings
gov/nist/secauto/oscal/lib/model/metadata/AbstractProperty.java Assigning an Object to null is a code smell. Consider refactoring. @suppresswarnings
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 @suppresswarnings
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 @suppresswarnings
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 @suppresswarnings
gov/nist/secauto/oscal/lib/profile/resolver/ProfileResolver.java Exception thrown at line 679 is caught in this block. @suppresswarnings
gov/nist/secauto/oscal/lib/profile/resolver/ProfileResolver.java Exception thrown at line 651 is caught in this block. @suppresswarnings
gov/nist/secauto/oscal/lib/profile/resolver/ProfileResolver.java Exception thrown at line 578 is caught in this block. @suppresswarnings
gov/nist/secauto/oscal/lib/profile/resolver/policy/ReferenceCountingVisitor.java Avoid unused private methods such as 'getSource()'. @suppresswarnings
gov/nist/secauto/oscal/lib/profile/resolver/selection/Import.java Deeply nested if..then statements are hard to read @suppresswarnings