Fork me on GitHub

PMD Results

The following document contains the results of PMD 7.10.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=17, NOAM=0, WMC=1) 12

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 133

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/metadata/IProperty.java

Rule Violation Line
FieldDeclarationsShouldBeAtStartOfClass Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 25
FieldDeclarationsShouldBeAtStartOfClass Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 28

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 A value of 42 may denote a high amount of coupling within the class (threshold: 20) 6756
GodClass Possible God Class (WMC=75, ATFD=109, TCC=0.923%) 84
LooseCoupling Avoid using implementation types like 'Stack'; use the interface instead 206
LooseCoupling Avoid using implementation types like 'Stack'; use the interface instead 222
LooseCoupling Avoid using implementation types like 'Stack'; use the interface instead 253
LooseCoupling Avoid using implementation types like 'Stack'; use the interface instead 313
LooseCoupling Avoid using implementation types like 'Stack'; use the interface instead 341
LooseCoupling Avoid using implementation types like 'Stack'; use the interface instead 466
LooseCoupling Avoid using implementation types like 'Stack'; use the interface instead 476
ExhaustiveSwitchHasDefault The switch block is exhaustive even without the default case 513523

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

Rule Violation Line
ExhaustiveSwitchHasDefault The switch block is exhaustive even without the default case 354374
ExhaustiveSwitchHasDefault The switch block is exhaustive even without the default case 719740

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=24) 307
ExhaustiveSwitchHasDefault The switch block is exhaustive even without the default case 442472

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

Rule Violation Line
CouplingBetweenObjects A value of 31 may denote a high amount of coupling within the class (threshold: 20) 6647
GodClass Possible God Class (WMC=63, ATFD=41, TCC=3.333%) 54
CyclomaticComplexity The method 'entityDispatch(IEntityItem, Context)' has a cyclomatic complexity of 10. 527
ExhaustiveSwitchHasDefault The switch block is exhaustive even without the default case 529556

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 A value of 22 may denote a high amount of coupling within the class (threshold: 20) 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
ExhaustiveSwitchHasDefault The switch block is exhaustive even without the default case 104134

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. 57
ExhaustiveSwitchHasDefault The switch block is exhaustive even without the default case 6184

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 113

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=17, NOAM=0, WMC=1) 3 12

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 133

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/metadata/IProperty.java

Rule Violation Priority Line
FieldDeclarationsShouldBeAtStartOfClass Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 3 25
FieldDeclarationsShouldBeAtStartOfClass Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 3 28

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 A value of 42 may denote a high amount of coupling within the class (threshold: 20) 3 6756
GodClass Possible God Class (WMC=75, ATFD=109, TCC=0.923%) 3 84
LooseCoupling Avoid using implementation types like 'Stack'; use the interface instead 3 206
LooseCoupling Avoid using implementation types like 'Stack'; use the interface instead 3 222
LooseCoupling Avoid using implementation types like 'Stack'; use the interface instead 3 253
LooseCoupling Avoid using implementation types like 'Stack'; use the interface instead 3 313
LooseCoupling Avoid using implementation types like 'Stack'; use the interface instead 3 341
LooseCoupling Avoid using implementation types like 'Stack'; use the interface instead 3 466
LooseCoupling Avoid using implementation types like 'Stack'; use the interface instead 3 476
ExhaustiveSwitchHasDefault The switch block is exhaustive even without the default case 3 513523

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

Rule Violation Priority Line
ExhaustiveSwitchHasDefault The switch block is exhaustive even without the default case 3 354374
ExhaustiveSwitchHasDefault The switch block is exhaustive even without the default case 3 719740

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=24) 3 307
ExhaustiveSwitchHasDefault The switch block is exhaustive even without the default case 3 442472

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

Rule Violation Priority Line
CouplingBetweenObjects A value of 31 may denote a high amount of coupling within the class (threshold: 20) 3 6647
GodClass Possible God Class (WMC=63, ATFD=41, TCC=3.333%) 3 54
CyclomaticComplexity The method 'entityDispatch(IEntityItem, Context)' has a cyclomatic complexity of 10. 3 527
ExhaustiveSwitchHasDefault The switch block is exhaustive even without the default case 3 529556

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 A value of 22 may denote a high amount of coupling within the class (threshold: 20) 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
ExhaustiveSwitchHasDefault The switch block is exhaustive even without the default case 3 104134

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 57
ExhaustiveSwitchHasDefault The switch block is exhaustive even without the default case 3 6184

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 113

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/metapath/function/library/ResolveReference.java Avoid unused method parameters such as 'function'. @suppresswarnings
gov/nist/secauto/oscal/lib/metapath/function/library/ResolveReference.java Avoid unused method parameters such as 'dynamicContext'. @suppresswarnings
gov/nist/secauto/oscal/lib/metapath/function/library/ResolveReference.java Avoid unused method parameters such as 'function'. @suppresswarnings
gov/nist/secauto/oscal/lib/metapath/function/library/ResolveReference.java Avoid unused method parameters such as 'dynamicContext'. @suppresswarnings
gov/nist/secauto/oscal/lib/metapath/function/library/ResolveReference.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/ResolveReference.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 583 is caught in this block. @suppresswarnings
gov/nist/secauto/oscal/lib/profile/resolver/ProfileResolver.java Exception thrown at line 656 is caught in this block. @suppresswarnings
gov/nist/secauto/oscal/lib/profile/resolver/ProfileResolver.java Exception thrown at line 684 is caught in this block. @suppresswarnings
gov/nist/secauto/oscal/lib/profile/resolver/alter/AddVisitor.java A value of 33 may denote a high amount of coupling within the class (threshold: 20) @suppresswarnings
gov/nist/secauto/oscal/lib/profile/resolver/alter/AddVisitor.java The method 'newContext(Control, Position, String, MarkupLine, List<Parameter>, List<Property>, List<Link>, List<ControlPart>)' has a cognitive complexity of 16, current threshold is 15 @suppresswarnings
gov/nist/secauto/oscal/lib/profile/resolver/alter/AddVisitor.java 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 @suppresswarnings
gov/nist/secauto/oscal/lib/profile/resolver/alter/AddVisitor.java The method 'newContext(Control, Position, String, MarkupLine, List<Parameter>, List<Property>, List<Link>, List<ControlPart>)' has a cyclomatic complexity of 17. @suppresswarnings
gov/nist/secauto/oscal/lib/profile/resolver/alter/AddVisitor.java The method 'handleChild(TargetType, Supplier<? extends List<T>>, Supplier<? extends List<T>>, Function<T, Boolean>, Context)' has a cyclomatic complexity of 16. @suppresswarnings
gov/nist/secauto/oscal/lib/profile/resolver/alter/AddVisitor.java The method 'newContext(Control, Position, String, MarkupLine, List<Parameter>, List<Property>, List<Link>, List<ControlPart>)' has an NPath complexity of 768, current threshold is 200 @suppresswarnings
gov/nist/secauto/oscal/lib/profile/resolver/selection/Import.java Deeply nested if..then statements are hard to read @suppresswarnings