Fork me on GitHub

PMD Results

The following document contains the results of PMD 7.5.0.

Violations By Priority

Priority 3

gov/nist/secauto/metaschema/schemagen/FlagInstanceFilter.java

Rule Violation Line
CompareObjectsWithEquals Use equals() to compare object references. 64

gov/nist/secauto/metaschema/schemagen/ModuleIndex.java

Rule Violation Line
UnusedPrivateField Avoid unused private fields such as 'LOGGER'. 37
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 39

gov/nist/secauto/metaschema/schemagen/datatype/AbstractDatatypeManager.java

Rule Violation Line
AvoidSynchronizedStatement Use ReentrantLock rather than synchronization 6875

gov/nist/secauto/metaschema/schemagen/datatype/CompositeDatatypeProvider.java

Rule Violation Line
LambdaCanBeMethodReference Lambda expression could be written as a method reference: `IDatatypeContent::getTypeName` 43

gov/nist/secauto/metaschema/schemagen/json/IDefineableJsonSchema.java

Rule Violation Line
ShortMethodName Avoid using short method names 143
ShortMethodName Avoid using short method names 148

gov/nist/secauto/metaschema/schemagen/json/JsonSchemaGenerator.java

Rule Violation Line
LambdaCanBeMethodReference Lambda expression could be written as a method reference: `DefinitionEntry::getDefinition` 95

gov/nist/secauto/metaschema/schemagen/json/impl/AbstractDefineableJsonSchema.java

Rule Violation Line
AvoidSynchronizedStatement Use ReentrantLock rather than synchronization 2329

gov/nist/secauto/metaschema/schemagen/json/impl/AbstractDefinitionJsonSchema.java

Rule Violation Line
OnlyOneReturn A method should have only one exit point, and that should be the last statement in the method 111
OnlyOneReturn A method should have only one exit point, and that should be the last statement in the method 114

gov/nist/secauto/metaschema/schemagen/json/impl/AbstractModelDefinitionJsonSchema.java

Rule Violation Line
DataClass The class 'AbstractModelDefinitionJsonSchema' is suspected to be a Data Class (WOC=28.571%, NOPA=0, NOAM=5, WMC=15) 26
CompareObjectsWithEquals Use equals() to compare object references. 63
OnlyOneReturn A method should have only one exit point, and that should be the last statement in the method 175
OnlyOneReturn A method should have only one exit point, and that should be the last statement in the method 178

gov/nist/secauto/metaschema/schemagen/json/impl/ChoiceGroupInstanceJsonProperty.java

Rule Violation Line
UnusedFormalParameter Avoid unused constructor parameters such as 'state'. 32

gov/nist/secauto/metaschema/schemagen/json/impl/FieldDefinitionJsonSchema.java

Rule Violation Line
AvoidInstantiatingObjectsInLoops Avoid instantiating new objects inside loops 77

gov/nist/secauto/metaschema/schemagen/json/impl/JsonGenerationState.java

Rule Violation Line
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 46
AvoidSynchronizedStatement Use ReentrantLock rather than synchronization 103114
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 175
LambdaCanBeMethodReference Lambda expression could be written as a method reference: `DefinitionEntry::isRoot` 178
LambdaCanBeMethodReference Lambda expression could be written as a method reference: `DefinitionEntry::getDefinition` 179

gov/nist/secauto/metaschema/schemagen/json/impl/MetadataUtils.java

Rule Violation Line
CyclomaticComplexity The method 'toJsonValue(Object, IDataTypeAdapter<?>)' has a cyclomatic complexity of 17. 75

gov/nist/secauto/metaschema/schemagen/json/impl/NamedModelInstanceJsonProperty.java

Rule Violation Line
UnusedFormalParameter Avoid unused constructor parameters such as 'state'. 28

gov/nist/secauto/metaschema/schemagen/json/impl/builder/KeyedObjectBuilder.java

Rule Violation Line
CognitiveComplexity The method 'build(ObjectNode, IJsonGenerationState)' has a cognitive complexity of 16, current threshold is 15 28

gov/nist/secauto/metaschema/schemagen/xml/datatype/AbstractXmlDatatypeProvider.java

Rule Violation Line
AvoidSynchronizedStatement Use ReentrantLock rather than synchronization 3447

gov/nist/secauto/metaschema/schemagen/xml/datatype/XmlCoreDatatypeProvider.java

Rule Violation Line
LambdaCanBeMethodReference Lambda expression could be written as a method reference: `Attribute::getValue` 47
UnnecessaryCast Unnecessary cast (IDatatypeContent) 5861
LambdaCanBeMethodReference Lambda expression could be written as a method reference: `IDatatypeContent::getTypeName` 62

gov/nist/secauto/metaschema/schemagen/xml/datatype/XmlDatatypeManager.java

Rule Violation Line
LambdaCanBeMethodReference Lambda expression could be written as a method reference: `used::contains` 41

gov/nist/secauto/metaschema/schemagen/xml/datatype/XmlProseCompositDatatypeProvider.java

Rule Violation Line
LambdaCanBeMethodReference Lambda expression could be written as a method reference: `IDatatypeContent::getTypeName` 40

gov/nist/secauto/metaschema/schemagen/xml/impl/XmlGenerationState.java

Rule Violation Line
AvoidSynchronizedStatement Use ReentrantLock rather than synchronization 94100

gov/nist/secauto/metaschema/schemagen/xml/schematype/XmlSimpleTypeUnion.java

Rule Violation Line
LambdaCanBeMethodReference Lambda expression could be written as a method reference: `IXmlType::getTypeReference` 72

Priority 4

gov/nist/secauto/metaschema/schemagen/json/IDefineableJsonSchema.java

Rule Violation Line
ShortClassName Avoid short class names like IKey 134

gov/nist/secauto/metaschema/schemagen/json/impl/builder/AbstractCollectionBuilder.java

Rule Violation Line
ShortClassName Avoid short class names like Type 111

Files

gov/nist/secauto/metaschema/schemagen/FlagInstanceFilter.java

Rule Violation Priority Line
CompareObjectsWithEquals Use equals() to compare object references. 3 64

gov/nist/secauto/metaschema/schemagen/ModuleIndex.java

Rule Violation Priority Line
UnusedPrivateField Avoid unused private fields such as 'LOGGER'. 3 37
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 39

gov/nist/secauto/metaschema/schemagen/datatype/AbstractDatatypeManager.java

Rule Violation Priority Line
AvoidSynchronizedStatement Use ReentrantLock rather than synchronization 3 6875

gov/nist/secauto/metaschema/schemagen/datatype/CompositeDatatypeProvider.java

Rule Violation Priority Line
LambdaCanBeMethodReference Lambda expression could be written as a method reference: `IDatatypeContent::getTypeName` 3 43

gov/nist/secauto/metaschema/schemagen/json/IDefineableJsonSchema.java

Rule Violation Priority Line
ShortClassName Avoid short class names like IKey 4 134
ShortMethodName Avoid using short method names 3 143
ShortMethodName Avoid using short method names 3 148

gov/nist/secauto/metaschema/schemagen/json/JsonSchemaGenerator.java

Rule Violation Priority Line
LambdaCanBeMethodReference Lambda expression could be written as a method reference: `DefinitionEntry::getDefinition` 3 95

gov/nist/secauto/metaschema/schemagen/json/impl/AbstractDefineableJsonSchema.java

Rule Violation Priority Line
AvoidSynchronizedStatement Use ReentrantLock rather than synchronization 3 2329

gov/nist/secauto/metaschema/schemagen/json/impl/AbstractDefinitionJsonSchema.java

Rule Violation Priority Line
OnlyOneReturn A method should have only one exit point, and that should be the last statement in the method 3 111
OnlyOneReturn A method should have only one exit point, and that should be the last statement in the method 3 114

gov/nist/secauto/metaschema/schemagen/json/impl/AbstractModelDefinitionJsonSchema.java

Rule Violation Priority Line
DataClass The class 'AbstractModelDefinitionJsonSchema' is suspected to be a Data Class (WOC=28.571%, NOPA=0, NOAM=5, WMC=15) 3 26
CompareObjectsWithEquals Use equals() to compare object references. 3 63
OnlyOneReturn A method should have only one exit point, and that should be the last statement in the method 3 175
OnlyOneReturn A method should have only one exit point, and that should be the last statement in the method 3 178

gov/nist/secauto/metaschema/schemagen/json/impl/ChoiceGroupInstanceJsonProperty.java

Rule Violation Priority Line
UnusedFormalParameter Avoid unused constructor parameters such as 'state'. 3 32

gov/nist/secauto/metaschema/schemagen/json/impl/FieldDefinitionJsonSchema.java

Rule Violation Priority Line
AvoidInstantiatingObjectsInLoops Avoid instantiating new objects inside loops 3 77

gov/nist/secauto/metaschema/schemagen/json/impl/JsonGenerationState.java

Rule Violation Priority Line
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 46
AvoidSynchronizedStatement Use ReentrantLock rather than synchronization 3 103114
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 175
LambdaCanBeMethodReference Lambda expression could be written as a method reference: `DefinitionEntry::isRoot` 3 178
LambdaCanBeMethodReference Lambda expression could be written as a method reference: `DefinitionEntry::getDefinition` 3 179

gov/nist/secauto/metaschema/schemagen/json/impl/MetadataUtils.java

Rule Violation Priority Line
CyclomaticComplexity The method 'toJsonValue(Object, IDataTypeAdapter<?>)' has a cyclomatic complexity of 17. 3 75

gov/nist/secauto/metaschema/schemagen/json/impl/NamedModelInstanceJsonProperty.java

Rule Violation Priority Line
UnusedFormalParameter Avoid unused constructor parameters such as 'state'. 3 28

gov/nist/secauto/metaschema/schemagen/json/impl/builder/AbstractCollectionBuilder.java

Rule Violation Priority Line
ShortClassName Avoid short class names like Type 4 111

gov/nist/secauto/metaschema/schemagen/json/impl/builder/KeyedObjectBuilder.java

Rule Violation Priority Line
CognitiveComplexity The method 'build(ObjectNode, IJsonGenerationState)' has a cognitive complexity of 16, current threshold is 15 3 28

gov/nist/secauto/metaschema/schemagen/xml/datatype/AbstractXmlDatatypeProvider.java

Rule Violation Priority Line
AvoidSynchronizedStatement Use ReentrantLock rather than synchronization 3 3447

gov/nist/secauto/metaschema/schemagen/xml/datatype/XmlCoreDatatypeProvider.java

Rule Violation Priority Line
LambdaCanBeMethodReference Lambda expression could be written as a method reference: `Attribute::getValue` 3 47
UnnecessaryCast Unnecessary cast (IDatatypeContent) 3 5861
LambdaCanBeMethodReference Lambda expression could be written as a method reference: `IDatatypeContent::getTypeName` 3 62

gov/nist/secauto/metaschema/schemagen/xml/datatype/XmlDatatypeManager.java

Rule Violation Priority Line
LambdaCanBeMethodReference Lambda expression could be written as a method reference: `used::contains` 3 41

gov/nist/secauto/metaschema/schemagen/xml/datatype/XmlProseCompositDatatypeProvider.java

Rule Violation Priority Line
LambdaCanBeMethodReference Lambda expression could be written as a method reference: `IDatatypeContent::getTypeName` 3 40

gov/nist/secauto/metaschema/schemagen/xml/impl/XmlGenerationState.java

Rule Violation Priority Line
AvoidSynchronizedStatement Use ReentrantLock rather than synchronization 3 94100

gov/nist/secauto/metaschema/schemagen/xml/schematype/XmlSimpleTypeUnion.java

Rule Violation Priority Line
LambdaCanBeMethodReference Lambda expression could be written as a method reference: `IXmlType::getTypeReference` 3 72

Suppressed Violations

Filename Rule message Suppression type Reason
gov/nist/secauto/metaschema/schemagen/AbstractSchemaGenerator.java Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block //nopmd need to catch close exception
gov/nist/secauto/metaschema/schemagen/AbstractSchemaGenerator.java A catch statement that catches an exception only to rethrow it should be avoided. //nopmd avoid nesting same exception
gov/nist/secauto/metaschema/schemagen/datatype/AbstractDatatypeManager.java If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation //nopmd - intentional
gov/nist/secauto/metaschema/schemagen/datatype/AbstractDatatypeManager.java If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation //nopmd - intentional
gov/nist/secauto/metaschema/schemagen/json/JsonSchemaGenerator.java Ensure that resources like this JsonGenerator object are closed after use //nopmd not owned
gov/nist/secauto/metaschema/schemagen/json/JsonSchemaGenerator.java If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation //nopmd no concurrent access
gov/nist/secauto/metaschema/schemagen/json/impl/AssemblyDefinitionJsonSchema.java Avoid instantiating new objects inside loops //nopmd - intentional
gov/nist/secauto/metaschema/schemagen/json/impl/DataTypeRestrictionDefinitionJsonSchema.java Avoid instantiating new objects inside loops //nopmd unavoidable
gov/nist/secauto/metaschema/schemagen/json/impl/DataTypeRestrictionDefinitionJsonSchema.java Avoid instantiating new objects inside loops //nopmd unavoidable
gov/nist/secauto/metaschema/schemagen/json/impl/JsonGenerationState.java Ensure that resources like this JsonGenerator object are closed after use //nopmd not closable here
gov/nist/secauto/metaschema/schemagen/xml/XmlSchemaGenerator.java High amount of different objects as members denotes a high coupling //nopmd
gov/nist/secauto/metaschema/schemagen/xml/XmlSchemaGenerator.java If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation //nopmd concurrency not needed
gov/nist/secauto/metaschema/schemagen/xml/impl/DocumentationGenerator.java The method 'generateDocumentation(String, MarkupLine, List<MarkupMultiline>, String, XmlGenerationState)' has a cyclomatic complexity of 10. //nopmd acceptable complexity
gov/nist/secauto/metaschema/schemagen/xml/schematype/XmlComplexTypeAssemblyDefinition.java The method 'generateModelInstance(IModelInstanceAbsolute, XmlGenerationState)' has a cyclomatic complexity of 12. //nopmd acceptable complexity
gov/nist/secauto/metaschema/schemagen/xml/schematype/XmlSimpleTypeUnion.java The method 'generate(XmlGenerationState)' has a cyclomatic complexity of 10. //nopmd unavoidable complexity