PMD Results
The following document contains the results of PMD 7.7.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/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 41 may denote a high amount of coupling within the class (threshold: 20) | 6–737 |
GodClass | Possible God Class (WMC=73, ATFD=109, TCC=0.308%) | 84 |
LooseCoupling | Avoid using implementation types like 'Stack'; use the interface instead | 201 |
LooseCoupling | Avoid using implementation types like 'Stack'; use the interface instead | 217 |
LooseCoupling | Avoid using implementation types like 'Stack'; use the interface instead | 248 |
LooseCoupling | Avoid using implementation types like 'Stack'; use the interface instead | 305 |
LooseCoupling | Avoid using implementation types like 'Stack'; use the interface instead | 333 |
LooseCoupling | Avoid using implementation types like 'Stack'; use the interface instead | 452 |
LooseCoupling | Avoid using implementation types like 'Stack'; use the interface instead | 462 |
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. | 429 |
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) | 6–645 |
GodClass | Possible God Class (WMC=63, ATFD=46, TCC=3.333%) | 54 |
CyclomaticComplexity | The method 'entityDispatch(IEntityItem, Context)' has a cyclomatic complexity of 10. | 524 |
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) | 6–378 |
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. | 57 |
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 |
gov/nist/secauto/oscal/lib/LibOscalVersion.java
Rule | Violation | Line |
---|---|---|
UnusedPrivateField | Avoid unused private fields such as 'BUILD_VERSION'. | 15 |
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/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 41 may denote a high amount of coupling within the class (threshold: 20) | 3 | 6–737 |
GodClass | Possible God Class (WMC=73, ATFD=109, TCC=0.308%) | 3 | 84 |
LooseCoupling | Avoid using implementation types like 'Stack'; use the interface instead | 3 | 201 |
LooseCoupling | Avoid using implementation types like 'Stack'; use the interface instead | 3 | 217 |
LooseCoupling | Avoid using implementation types like 'Stack'; use the interface instead | 3 | 248 |
LooseCoupling | Avoid using implementation types like 'Stack'; use the interface instead | 3 | 305 |
LooseCoupling | Avoid using implementation types like 'Stack'; use the interface instead | 3 | 333 |
LooseCoupling | Avoid using implementation types like 'Stack'; use the interface instead | 3 | 452 |
LooseCoupling | Avoid using implementation types like 'Stack'; use the interface instead | 3 | 462 |
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 | 429 |
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 | 6–645 |
GodClass | Possible God Class (WMC=63, ATFD=46, TCC=3.333%) | 3 | 54 |
CyclomaticComplexity | The method 'entityDispatch(IEntityItem, Context)' has a cyclomatic complexity of 10. | 3 | 524 |
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 | 6–378 |
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 | 57 |
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 |
gov/nist/secauto/oscal/lib/LibOscalVersion.java
Rule | Violation | Priority | Line |
---|---|---|---|
UnusedPrivateField | Avoid unused private fields such as 'BUILD_VERSION'. | 3 | 15 |
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 642 is caught in this block. | @suppresswarnings | |
gov/nist/secauto/oscal/lib/profile/resolver/ProfileResolver.java | Exception thrown at line 569 is caught in this block. | @suppresswarnings | |
gov/nist/secauto/oscal/lib/profile/resolver/ProfileResolver.java | Exception thrown at line 670 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 '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 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 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 a cyclomatic complexity of 17. | @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/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 |