Fork me on GitHub

PMD Results

The following document contains the results of PMD 7.19.0.

Violations By Priority

Priority 3

dev/metaschema/databind/DefaultBindingContext.java

Rule Violation Line
ExhaustiveSwitchHasDefault The switch block is exhaustive even without the default case 178–190
ExhaustiveSwitchHasDefault The switch block is exhaustive even without the default case 215–227

dev/metaschema/databind/IBindingContext.java

Rule Violation Line
CloseResource Ensure that resources like this ValidationConfig object are closed after use 500
ExhaustiveSwitchHasDefault The switch block is exhaustive even without the default case 904–930

dev/metaschema/databind/codegen/ClassUtils.java

Rule Violation Line
GodClass Possible God Class (WMC=51, ATFD=10, TCC=0.000%) 22
CyclomaticComplexity The method 'splitWords(String)' has a cyclomatic complexity of 11. 151
AvoidInstantiatingObjectsInLoops Avoid instantiating new objects inside loops 161
AvoidInstantiatingObjectsInLoops Avoid instantiating new objects inside loops 167
CognitiveComplexity The method 'getPackageFromNamespace(String)' has a cognitive complexity of 20, current threshold is 15 195
CyclomaticComplexity The method 'getPackageFromNamespace(String)' has a cyclomatic complexity of 12. 195
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 218–220
CognitiveComplexity The method 'normalizePackagePart(String)' has a cognitive complexity of 17, current threshold is 15 244
CyclomaticComplexity The method 'normalizePackagePart(String)' has a cyclomatic complexity of 11. 244
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 256
FieldDeclarationsShouldBeAtStartOfClass Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 288

dev/metaschema/databind/codegen/IProduction.java

Rule Violation Line
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 99
AvoidInstantiatingObjectsInLoops Avoid instantiating new objects inside loops 105

dev/metaschema/databind/codegen/config/DefaultBindingConfiguration.java

Rule Violation Line
CouplingBetweenObjects A value of 45 may denote a high amount of coupling within the class (threshold: 20) 6–789
GodClass Possible God Class (WMC=83, ATFD=50, TCC=0.667%) 49
CyclomaticComplexity The class 'DefaultBindingConfiguration' has a total cyclomatic complexity of 83 (highest 9). 49
AvoidInstantiatingObjectsInLoops Avoid instantiating new objects inside loops 493
AvoidInstantiatingObjectsInLoops Avoid instantiating new objects inside loops 608

dev/metaschema/databind/codegen/config/DefaultDefinitionBindingConfiguration.java

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

dev/metaschema/databind/codegen/impl/AnnotationGenerator.java

Rule Violation Line
CyclomaticComplexity The class 'AnnotationGenerator' has a total cyclomatic complexity of 83 (highest 8). 68

dev/metaschema/databind/codegen/typeinfo/AbstractModelInstanceTypeInfo.java

Rule Violation Line
EnumComparison Enums should be compared using == 66
EnumComparison Enums should be compared using == 93
EnumComparison Enums should be compared using == 133
EnumComparison Enums should be compared using == 140

dev/metaschema/databind/codegen/typeinfo/AbstractNamedModelInstanceTypeInfo.java

Rule Violation Line
EnumComparison Enums should be compared using == 181
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 183–186
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 193–196

dev/metaschema/databind/codegen/typeinfo/ChoiceGroupTypeInfoImpl.java

Rule Violation Line
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 95–98
EnumComparison Enums should be compared using == 101
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 215–219
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 249–253

dev/metaschema/databind/io/AbstractProblemHandler.java

Rule Violation Line
GodClass Possible God Class (WMC=70, ATFD=33, TCC=0.000%) 36
CyclomaticComplexity The method 'validateRequiredFields(IBoundDefinitionModelComplex, Collection<? extends IBoundProperty<?>>, ValidationContext)' has a cyclomatic complexity of 10. 107
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 135–138
CognitiveComplexity The method 'formatMissingPropertiesMessage(IBoundDefinitionModelComplex, List<IBoundProperty<?>>, List<IBoundProperty<?>>, List<IBoundProperty<?>>, ValidationContext)' has a cognitive complexity of 29, current threshold is 15 198
CyclomaticComplexity The method 'formatMissingPropertiesMessage(IBoundDefinitionModelComplex, List<IBoundProperty<?>>, List<IBoundProperty<?>>, List<IBoundProperty<?>>, ValidationContext)' has a cyclomatic complexity of 15. 198
InsufficientStringBufferDeclaration StringBuilder has been initialized with size 16, but has at least 18 characters appended. 205
ConfusingTernary Avoid if (x != y) ..; else ..; 213–215
ConfusingTernary Avoid if (x != y) ..; else ..; 214–215
ConfusingTernary Avoid if (x != y) ..; else ..; 221–223
ConfusingTernary Avoid if (x != y) ..; else ..; 222–223
ExhaustiveSwitchHasDefault The switch block is exhaustive even without the default case 279–291
UnusedFormalParameter Avoid unused method parameters such as 'context'. 380
UnusedFormalParameter Avoid unused method parameters such as 'context'. 397
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 398
UnusedFormalParameter Avoid unused method parameters such as 'context'. 435
UnusedFormalParameter Avoid unused method parameters such as 'context'. 494

dev/metaschema/databind/io/Format.java

Rule Violation Line
ExhaustiveSwitchHasDefault The switch block is exhaustive even without the default case 127–138

dev/metaschema/databind/io/FormatDetector.java

Rule Violation Line
ExhaustiveSwitchHasDefault The switch block is exhaustive even without the default case 109–118

dev/metaschema/databind/io/ModelDetector.java

Rule Violation Line
ExhaustiveSwitchHasDefault The switch block is exhaustive even without the default case 130–150
EnumComparison Enums should be compared using == 207

dev/metaschema/databind/io/ValidationContext.java

Rule Violation Line
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 160
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 163–165
InsufficientStringBufferDeclaration StringBuilder has been initialized with size 34, but has at least 53 characters appended. 216
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 216
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 221
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 222

dev/metaschema/databind/io/json/MetaschemaJsonReader.java

Rule Violation Line
CloseResource Ensure that resources like this JsonParser object are closed after use 191
EnumComparison Enums should be compared using == 247
EnumComparison Enums should be compared using == 255
EnumComparison Enums should be compared using == 256
UnnecessaryWarningSuppression Unnecessary suppression "PMD.CyclomaticComplexity" in @SuppressWarnings annotation 624
UnusedFormalParameter Avoid unused method parameters such as 'resource'. 629
CognitiveComplexity The method 'accept(IBoundDefinitionModelComplex, IBoundObject, IJsonProblemHandler)' has a cognitive complexity of 25, current threshold is 15 708
CyclomaticComplexity The method 'accept(IBoundDefinitionModelComplex, IBoundObject, IJsonProblemHandler)' has a cyclomatic complexity of 13. 708
EnumComparison Enums should be compared using == 734
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 769–771
AvoidInstantiatingObjectsInLoops Avoid instantiating new objects inside loops 770
EnumComparison Enums should be compared using == 972
EnumComparison Enums should be compared using == 1006

dev/metaschema/databind/io/json/MetaschemaJsonWriter.java

Rule Violation Line
GodClass Possible God Class (WMC=56, ATFD=36, TCC=23.810%) 58
CyclomaticComplexity The method 'writeFieldValue(IBoundFieldValue, Object)' has a cyclomatic complexity of 10. 123
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 145–148
CognitiveComplexity The method 'writeAnyContent(IBoundObject, IFeatureComplexItemValueHandler)' has a cognitive complexity of 15, current threshold is 15 298
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 308–319
EnumComparison Enums should be compared using == 435
EnumComparison Enums should be compared using == 436

dev/metaschema/databind/io/xml/DefaultXmlProblemHandler.java

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

dev/metaschema/databind/io/xml/MetaschemaXmlReader.java

Rule Violation Line
GodClass Possible God Class (WMC=48, ATFD=53, TCC=11.111%) 71
CyclomaticComplexity The method 'readModelInstances(IBoundDefinitionModelAssembly, IBoundObject)' has a cyclomatic complexity of 13. 278

dev/metaschema/databind/io/xml/MetaschemaXmlWriter.java

Rule Violation Line
CouplingBetweenObjects A value of 39 may denote a high amount of coupling within the class (threshold: 20) 6–441
GodClass Possible God Class (WMC=48, ATFD=42, TCC=0.000%) 164
CognitiveComplexity The method 'writeAssemblyModel(IBoundObject, IBoundDefinitionModelAssembly)' has a cognitive complexity of 15, current threshold is 15 208
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 223–232

dev/metaschema/databind/io/xml/XmlDomUtil.java

Rule Violation Line
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 106–108
CognitiveComplexity The method 'createDomElement(Document, StartElement)' has a cognitive complexity of 19, current threshold is 15 141
CyclomaticComplexity The method 'createDomElement(Document, StartElement)' has a cyclomatic complexity of 13. 141

dev/metaschema/databind/model/IBoundInstanceModelGroupedNamed.java

Rule Violation Line
EnumComparison Enums should be compared using == 31

dev/metaschema/databind/model/IBoundInstanceModelNamed.java

Rule Violation Line
EnumComparison Enums should be compared using == 45

dev/metaschema/databind/model/impl/AssemblyModelGenerator.java

Rule Violation Line
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 116
AvoidInstantiatingObjectsInLoops Avoid instantiating new objects inside loops 122–123
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 167
AvoidInstantiatingObjectsInLoops Avoid instantiating new objects inside loops 177

dev/metaschema/databind/model/impl/BoundInstanceModelChoice.java

Rule Violation Line
DanglingJavadoc Javadoc comment does not belong to any class, method or field 26–32

dev/metaschema/databind/model/impl/IFeatureInstanceModelGroupAs.java

Rule Violation Line
EnumComparison Enums should be compared using == 39

dev/metaschema/databind/model/impl/InstanceModelAssemblyComplex.java

Rule Violation Line
DanglingJavadoc Javadoc comment does not belong to any class, method or field 37–40

dev/metaschema/databind/model/impl/InstanceModelChoiceGroup.java

Rule Violation Line
DanglingJavadoc Javadoc comment does not belong to any class, method or field 44–49

dev/metaschema/databind/model/impl/InstanceModelFieldComplex.java

Rule Violation Line
DanglingJavadoc Javadoc comment does not belong to any class, method or field 39–42
CyclomaticComplexity The method 'newInstance(Field, DefinitionField, IBoundDefinitionModelAssembly)' has a cyclomatic complexity of 12. 85
CognitiveComplexity The constructor 'InstanceModelFieldComplex(Field, BoundField, IGroupAs, DefinitionField, IBoundDefinitionModelAssembly)' has a cognitive complexity of 16, current threshold is 15 141
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 168–170

dev/metaschema/databind/model/impl/InstanceModelFieldScalar.java

Rule Violation Line
DanglingJavadoc Javadoc comment does not belong to any class, method or field 43–46

dev/metaschema/databind/model/impl/InstanceModelGroupedAssembly.java

Rule Violation Line
DanglingJavadoc Javadoc comment does not belong to any class, method or field 30–33

dev/metaschema/databind/model/impl/InstanceModelGroupedFieldComplex.java

Rule Violation Line
DanglingJavadoc Javadoc comment does not belong to any class, method or field 33–36

dev/metaschema/databind/model/info/IItemValueHandler.java

Rule Violation Line
DanglingJavadoc Javadoc comment does not belong to any class, method or field 15–21

dev/metaschema/databind/model/info/IModelInstanceCollectionInfo.java

Rule Violation Line
CognitiveComplexity The method 'of(IBoundInstanceModel<T>)' has a cognitive complexity of 19, current threshold is 15 48
CyclomaticComplexity The method 'of(IBoundInstanceModel<T>)' has a cyclomatic complexity of 17. 48
EnumComparison Enums should be compared using == 83
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 84–91

dev/metaschema/databind/model/metaschema/BindingConstraintLoader.java

Rule Violation Line
CouplingBetweenObjects A value of 31 may denote a high amount of coupling within the class (threshold: 20) 6–290
DanglingJavadoc Javadoc comment does not belong to any class, method or field 50–57
CognitiveComplexity The method 'parseResource(URI, Deque<URI>)' has a cognitive complexity of 20, current threshold is 15 84
CyclomaticComplexity The method 'parseResource(URI, Deque<URI>)' has a cyclomatic complexity of 12. 84

dev/metaschema/databind/model/metaschema/BindingModuleLoader.java

Rule Violation Line
DanglingJavadoc Javadoc comment does not belong to any class, method or field 29–42

dev/metaschema/databind/model/metaschema/IBindingModuleLoader.java

Rule Violation Line
DanglingJavadoc Javadoc comment does not belong to any class, method or field 14–26

dev/metaschema/databind/model/metaschema/IModelConstraintsBase.java

Rule Violation Line
DanglingJavadoc Javadoc comment does not belong to any class, method or field 10–13

dev/metaschema/databind/model/metaschema/ITargetedConstraintBase.java

Rule Violation Line
DanglingJavadoc Javadoc comment does not belong to any class, method or field 10–13

dev/metaschema/databind/model/metaschema/ModuleLoadingPostProcessor.java

Rule Violation Line
DanglingJavadoc Javadoc comment does not belong to any class, method or field 18–23

dev/metaschema/databind/model/metaschema/impl/AbstractAbsoluteModelGenerator.java

Rule Violation Line
DanglingJavadoc Javadoc comment does not belong to any class, method or field 41–46

dev/metaschema/databind/model/metaschema/impl/AssemblyModelGenerator.java

Rule Violation Line
DanglingJavadoc Javadoc comment does not belong to any class, method or field 31–35

dev/metaschema/databind/model/metaschema/impl/BindingConstants.java

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

dev/metaschema/databind/model/metaschema/impl/ChoiceGroupModelGenerator.java

Rule Violation Line
DanglingJavadoc Javadoc comment does not belong to any class, method or field 27–31

dev/metaschema/databind/model/metaschema/impl/ChoiceModelGenerator.java

Rule Violation Line
DanglingJavadoc Javadoc comment does not belong to any class, method or field 28–32

dev/metaschema/databind/model/metaschema/impl/ConstraintBindingSupport.java

Rule Violation Line
DanglingJavadoc Javadoc comment does not belong to any class, method or field 63–68
GodClass Possible God Class (WMC=73, ATFD=55, TCC=0.000%) 69
CyclomaticComplexity The method 'parse(IModelConstrained, IModelConstraintsBase, ISource)' has a cyclomatic complexity of 10. 155

dev/metaschema/databind/model/metaschema/impl/InstanceModelAssemblyInline.java

Rule Violation Line
CouplingBetweenObjects A value of 24 may denote a high amount of coupling within the class (threshold: 20) 6–245

dev/metaschema/databind/model/metaschema/impl/InstanceModelFieldInline.java

Rule Violation Line
CouplingBetweenObjects A value of 24 may denote a high amount of coupling within the class (threshold: 20) 6–240

dev/metaschema/databind/model/metaschema/impl/InstanceModelGroupedAssemblyInline.java

Rule Violation Line
CouplingBetweenObjects A value of 21 may denote a high amount of coupling within the class (threshold: 20) 6–215

dev/metaschema/databind/model/metaschema/impl/InstanceModelGroupedFieldInline.java

Rule Violation Line
CouplingBetweenObjects A value of 21 may denote a high amount of coupling within the class (threshold: 20) 6–216

dev/metaschema/databind/model/metaschema/impl/ModelSupport.java

Rule Violation Line
CouplingBetweenObjects A value of 21 may denote a high amount of coupling within the class (threshold: 20) 6–379

Files

dev/metaschema/databind/DefaultBindingContext.java

Rule Violation Priority Line
ExhaustiveSwitchHasDefault The switch block is exhaustive even without the default case 3 178–190
ExhaustiveSwitchHasDefault The switch block is exhaustive even without the default case 3 215–227

dev/metaschema/databind/IBindingContext.java

Rule Violation Priority Line
CloseResource Ensure that resources like this ValidationConfig object are closed after use 3 500
ExhaustiveSwitchHasDefault The switch block is exhaustive even without the default case 3 904–930

dev/metaschema/databind/codegen/ClassUtils.java

Rule Violation Priority Line
GodClass Possible God Class (WMC=51, ATFD=10, TCC=0.000%) 3 22
CyclomaticComplexity The method 'splitWords(String)' has a cyclomatic complexity of 11. 3 151
AvoidInstantiatingObjectsInLoops Avoid instantiating new objects inside loops 3 161
AvoidInstantiatingObjectsInLoops Avoid instantiating new objects inside loops 3 167
CognitiveComplexity The method 'getPackageFromNamespace(String)' has a cognitive complexity of 20, current threshold is 15 3 195
CyclomaticComplexity The method 'getPackageFromNamespace(String)' has a cyclomatic complexity of 12. 3 195
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 218–220
CognitiveComplexity The method 'normalizePackagePart(String)' has a cognitive complexity of 17, current threshold is 15 3 244
CyclomaticComplexity The method 'normalizePackagePart(String)' has a cyclomatic complexity of 11. 3 244
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 256
FieldDeclarationsShouldBeAtStartOfClass Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 3 288

dev/metaschema/databind/codegen/IProduction.java

Rule Violation Priority Line
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 99
AvoidInstantiatingObjectsInLoops Avoid instantiating new objects inside loops 3 105

dev/metaschema/databind/codegen/config/DefaultBindingConfiguration.java

Rule Violation Priority Line
CouplingBetweenObjects A value of 45 may denote a high amount of coupling within the class (threshold: 20) 3 6–789
GodClass Possible God Class (WMC=83, ATFD=50, TCC=0.667%) 3 49
CyclomaticComplexity The class 'DefaultBindingConfiguration' has a total cyclomatic complexity of 83 (highest 9). 3 49
AvoidInstantiatingObjectsInLoops Avoid instantiating new objects inside loops 3 493
AvoidInstantiatingObjectsInLoops Avoid instantiating new objects inside loops 3 608

dev/metaschema/databind/codegen/config/DefaultDefinitionBindingConfiguration.java

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

dev/metaschema/databind/codegen/impl/AnnotationGenerator.java

Rule Violation Priority Line
CyclomaticComplexity The class 'AnnotationGenerator' has a total cyclomatic complexity of 83 (highest 8). 3 68

dev/metaschema/databind/codegen/typeinfo/AbstractModelInstanceTypeInfo.java

Rule Violation Priority Line
EnumComparison Enums should be compared using == 3 66
EnumComparison Enums should be compared using == 3 93
EnumComparison Enums should be compared using == 3 133
EnumComparison Enums should be compared using == 3 140

dev/metaschema/databind/codegen/typeinfo/AbstractNamedModelInstanceTypeInfo.java

Rule Violation Priority Line
EnumComparison Enums should be compared using == 3 181
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 183–186
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 193–196

dev/metaschema/databind/codegen/typeinfo/ChoiceGroupTypeInfoImpl.java

Rule Violation Priority Line
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 95–98
EnumComparison Enums should be compared using == 3 101
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 215–219
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 249–253

dev/metaschema/databind/io/AbstractProblemHandler.java

Rule Violation Priority Line
GodClass Possible God Class (WMC=70, ATFD=33, TCC=0.000%) 3 36
CyclomaticComplexity The method 'validateRequiredFields(IBoundDefinitionModelComplex, Collection<? extends IBoundProperty<?>>, ValidationContext)' has a cyclomatic complexity of 10. 3 107
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 135–138
CognitiveComplexity The method 'formatMissingPropertiesMessage(IBoundDefinitionModelComplex, List<IBoundProperty<?>>, List<IBoundProperty<?>>, List<IBoundProperty<?>>, ValidationContext)' has a cognitive complexity of 29, current threshold is 15 3 198
CyclomaticComplexity The method 'formatMissingPropertiesMessage(IBoundDefinitionModelComplex, List<IBoundProperty<?>>, List<IBoundProperty<?>>, List<IBoundProperty<?>>, ValidationContext)' has a cyclomatic complexity of 15. 3 198
InsufficientStringBufferDeclaration StringBuilder has been initialized with size 16, but has at least 18 characters appended. 3 205
ConfusingTernary Avoid if (x != y) ..; else ..; 3 213–215
ConfusingTernary Avoid if (x != y) ..; else ..; 3 214–215
ConfusingTernary Avoid if (x != y) ..; else ..; 3 221–223
ConfusingTernary Avoid if (x != y) ..; else ..; 3 222–223
ExhaustiveSwitchHasDefault The switch block is exhaustive even without the default case 3 279–291
UnusedFormalParameter Avoid unused method parameters such as 'context'. 3 380
UnusedFormalParameter Avoid unused method parameters such as 'context'. 3 397
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 398
UnusedFormalParameter Avoid unused method parameters such as 'context'. 3 435
UnusedFormalParameter Avoid unused method parameters such as 'context'. 3 494

dev/metaschema/databind/io/Format.java

Rule Violation Priority Line
ExhaustiveSwitchHasDefault The switch block is exhaustive even without the default case 3 127–138

dev/metaschema/databind/io/FormatDetector.java

Rule Violation Priority Line
ExhaustiveSwitchHasDefault The switch block is exhaustive even without the default case 3 109–118

dev/metaschema/databind/io/ModelDetector.java

Rule Violation Priority Line
ExhaustiveSwitchHasDefault The switch block is exhaustive even without the default case 3 130–150
EnumComparison Enums should be compared using == 3 207

dev/metaschema/databind/io/ValidationContext.java

Rule Violation Priority Line
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 160
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 163–165
InsufficientStringBufferDeclaration StringBuilder has been initialized with size 34, but has at least 53 characters appended. 3 216
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 3 216
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 221
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 222

dev/metaschema/databind/io/json/MetaschemaJsonReader.java

Rule Violation Priority Line
CloseResource Ensure that resources like this JsonParser object are closed after use 3 191
EnumComparison Enums should be compared using == 3 247
EnumComparison Enums should be compared using == 3 255
EnumComparison Enums should be compared using == 3 256
UnnecessaryWarningSuppression Unnecessary suppression "PMD.CyclomaticComplexity" in @SuppressWarnings annotation 3 624
UnusedFormalParameter Avoid unused method parameters such as 'resource'. 3 629
CognitiveComplexity The method 'accept(IBoundDefinitionModelComplex, IBoundObject, IJsonProblemHandler)' has a cognitive complexity of 25, current threshold is 15 3 708
CyclomaticComplexity The method 'accept(IBoundDefinitionModelComplex, IBoundObject, IJsonProblemHandler)' has a cyclomatic complexity of 13. 3 708
EnumComparison Enums should be compared using == 3 734
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 769–771
AvoidInstantiatingObjectsInLoops Avoid instantiating new objects inside loops 3 770
EnumComparison Enums should be compared using == 3 972
EnumComparison Enums should be compared using == 3 1006

dev/metaschema/databind/io/json/MetaschemaJsonWriter.java

Rule Violation Priority Line
GodClass Possible God Class (WMC=56, ATFD=36, TCC=23.810%) 3 58
CyclomaticComplexity The method 'writeFieldValue(IBoundFieldValue, Object)' has a cyclomatic complexity of 10. 3 123
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 145–148
CognitiveComplexity The method 'writeAnyContent(IBoundObject, IFeatureComplexItemValueHandler)' has a cognitive complexity of 15, current threshold is 15 3 298
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 308–319
EnumComparison Enums should be compared using == 3 435
EnumComparison Enums should be compared using == 3 436

dev/metaschema/databind/io/xml/DefaultXmlProblemHandler.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 53
FieldDeclarationsShouldBeAtStartOfClass Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 3 55

dev/metaschema/databind/io/xml/MetaschemaXmlReader.java

Rule Violation Priority Line
GodClass Possible God Class (WMC=48, ATFD=53, TCC=11.111%) 3 71
CyclomaticComplexity The method 'readModelInstances(IBoundDefinitionModelAssembly, IBoundObject)' has a cyclomatic complexity of 13. 3 278

dev/metaschema/databind/io/xml/MetaschemaXmlWriter.java

Rule Violation Priority Line
CouplingBetweenObjects A value of 39 may denote a high amount of coupling within the class (threshold: 20) 3 6–441
GodClass Possible God Class (WMC=48, ATFD=42, TCC=0.000%) 3 164
CognitiveComplexity The method 'writeAssemblyModel(IBoundObject, IBoundDefinitionModelAssembly)' has a cognitive complexity of 15, current threshold is 15 3 208
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 223–232

dev/metaschema/databind/io/xml/XmlDomUtil.java

Rule Violation Priority Line
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 106–108
CognitiveComplexity The method 'createDomElement(Document, StartElement)' has a cognitive complexity of 19, current threshold is 15 3 141
CyclomaticComplexity The method 'createDomElement(Document, StartElement)' has a cyclomatic complexity of 13. 3 141

dev/metaschema/databind/model/IBoundInstanceModelGroupedNamed.java

Rule Violation Priority Line
EnumComparison Enums should be compared using == 3 31

dev/metaschema/databind/model/IBoundInstanceModelNamed.java

Rule Violation Priority Line
EnumComparison Enums should be compared using == 3 45

dev/metaschema/databind/model/impl/AssemblyModelGenerator.java

Rule Violation Priority Line
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 116
AvoidInstantiatingObjectsInLoops Avoid instantiating new objects inside loops 3 122–123
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 167
AvoidInstantiatingObjectsInLoops Avoid instantiating new objects inside loops 3 177

dev/metaschema/databind/model/impl/BoundInstanceModelChoice.java

Rule Violation Priority Line
DanglingJavadoc Javadoc comment does not belong to any class, method or field 3 26–32

dev/metaschema/databind/model/impl/IFeatureInstanceModelGroupAs.java

Rule Violation Priority Line
EnumComparison Enums should be compared using == 3 39

dev/metaschema/databind/model/impl/InstanceModelAssemblyComplex.java

Rule Violation Priority Line
DanglingJavadoc Javadoc comment does not belong to any class, method or field 3 37–40

dev/metaschema/databind/model/impl/InstanceModelChoiceGroup.java

Rule Violation Priority Line
DanglingJavadoc Javadoc comment does not belong to any class, method or field 3 44–49

dev/metaschema/databind/model/impl/InstanceModelFieldComplex.java

Rule Violation Priority Line
DanglingJavadoc Javadoc comment does not belong to any class, method or field 3 39–42
CyclomaticComplexity The method 'newInstance(Field, DefinitionField, IBoundDefinitionModelAssembly)' has a cyclomatic complexity of 12. 3 85
CognitiveComplexity The constructor 'InstanceModelFieldComplex(Field, BoundField, IGroupAs, DefinitionField, IBoundDefinitionModelAssembly)' has a cognitive complexity of 16, current threshold is 15 3 141
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 168–170

dev/metaschema/databind/model/impl/InstanceModelFieldScalar.java

Rule Violation Priority Line
DanglingJavadoc Javadoc comment does not belong to any class, method or field 3 43–46

dev/metaschema/databind/model/impl/InstanceModelGroupedAssembly.java

Rule Violation Priority Line
DanglingJavadoc Javadoc comment does not belong to any class, method or field 3 30–33

dev/metaschema/databind/model/impl/InstanceModelGroupedFieldComplex.java

Rule Violation Priority Line
DanglingJavadoc Javadoc comment does not belong to any class, method or field 3 33–36

dev/metaschema/databind/model/info/IItemValueHandler.java

Rule Violation Priority Line
DanglingJavadoc Javadoc comment does not belong to any class, method or field 3 15–21

dev/metaschema/databind/model/info/IModelInstanceCollectionInfo.java

Rule Violation Priority Line
CognitiveComplexity The method 'of(IBoundInstanceModel<T>)' has a cognitive complexity of 19, current threshold is 15 3 48
CyclomaticComplexity The method 'of(IBoundInstanceModel<T>)' has a cyclomatic complexity of 17. 3 48
EnumComparison Enums should be compared using == 3 83
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 84–91

dev/metaschema/databind/model/metaschema/BindingConstraintLoader.java

Rule Violation Priority Line
CouplingBetweenObjects A value of 31 may denote a high amount of coupling within the class (threshold: 20) 3 6–290
DanglingJavadoc Javadoc comment does not belong to any class, method or field 3 50–57
CognitiveComplexity The method 'parseResource(URI, Deque<URI>)' has a cognitive complexity of 20, current threshold is 15 3 84
CyclomaticComplexity The method 'parseResource(URI, Deque<URI>)' has a cyclomatic complexity of 12. 3 84

dev/metaschema/databind/model/metaschema/BindingModuleLoader.java

Rule Violation Priority Line
DanglingJavadoc Javadoc comment does not belong to any class, method or field 3 29–42

dev/metaschema/databind/model/metaschema/IBindingModuleLoader.java

Rule Violation Priority Line
DanglingJavadoc Javadoc comment does not belong to any class, method or field 3 14–26

dev/metaschema/databind/model/metaschema/IModelConstraintsBase.java

Rule Violation Priority Line
DanglingJavadoc Javadoc comment does not belong to any class, method or field 3 10–13

dev/metaschema/databind/model/metaschema/ITargetedConstraintBase.java

Rule Violation Priority Line
DanglingJavadoc Javadoc comment does not belong to any class, method or field 3 10–13

dev/metaschema/databind/model/metaschema/ModuleLoadingPostProcessor.java

Rule Violation Priority Line
DanglingJavadoc Javadoc comment does not belong to any class, method or field 3 18–23

dev/metaschema/databind/model/metaschema/impl/AbstractAbsoluteModelGenerator.java

Rule Violation Priority Line
DanglingJavadoc Javadoc comment does not belong to any class, method or field 3 41–46

dev/metaschema/databind/model/metaschema/impl/AssemblyModelGenerator.java

Rule Violation Priority Line
DanglingJavadoc Javadoc comment does not belong to any class, method or field 3 31–35

dev/metaschema/databind/model/metaschema/impl/BindingConstants.java

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

dev/metaschema/databind/model/metaschema/impl/ChoiceGroupModelGenerator.java

Rule Violation Priority Line
DanglingJavadoc Javadoc comment does not belong to any class, method or field 3 27–31

dev/metaschema/databind/model/metaschema/impl/ChoiceModelGenerator.java

Rule Violation Priority Line
DanglingJavadoc Javadoc comment does not belong to any class, method or field 3 28–32

dev/metaschema/databind/model/metaschema/impl/ConstraintBindingSupport.java

Rule Violation Priority Line
DanglingJavadoc Javadoc comment does not belong to any class, method or field 3 63–68
GodClass Possible God Class (WMC=73, ATFD=55, TCC=0.000%) 3 69
CyclomaticComplexity The method 'parse(IModelConstrained, IModelConstraintsBase, ISource)' has a cyclomatic complexity of 10. 3 155

dev/metaschema/databind/model/metaschema/impl/InstanceModelAssemblyInline.java

Rule Violation Priority Line
CouplingBetweenObjects A value of 24 may denote a high amount of coupling within the class (threshold: 20) 3 6–245

dev/metaschema/databind/model/metaschema/impl/InstanceModelFieldInline.java

Rule Violation Priority Line
CouplingBetweenObjects A value of 24 may denote a high amount of coupling within the class (threshold: 20) 3 6–240

dev/metaschema/databind/model/metaschema/impl/InstanceModelGroupedAssemblyInline.java

Rule Violation Priority Line
CouplingBetweenObjects A value of 21 may denote a high amount of coupling within the class (threshold: 20) 3 6–215

dev/metaschema/databind/model/metaschema/impl/InstanceModelGroupedFieldInline.java

Rule Violation Priority Line
CouplingBetweenObjects A value of 21 may denote a high amount of coupling within the class (threshold: 20) 3 6–216

dev/metaschema/databind/model/metaschema/impl/ModelSupport.java

Rule Violation Priority Line
CouplingBetweenObjects A value of 21 may denote a high amount of coupling within the class (threshold: 20) 3 6–379

Suppressed Violations

Filename Rule message Suppression type Reason
dev/metaschema/databind/AbstractModuleLoaderStrategy.java Exception thrown at line 94 is caught in this block. @suppresswarnings
dev/metaschema/databind/AbstractModuleLoaderStrategy.java If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation @suppresswarnings
dev/metaschema/databind/AbstractModuleLoaderStrategy.java If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation @suppresswarnings
dev/metaschema/databind/AbstractModuleLoaderStrategy.java If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation @suppresswarnings
dev/metaschema/databind/DefaultBindingContext.java A value of 23 may denote a high amount of coupling within the class (threshold: 20) @suppresswarnings
dev/metaschema/databind/codegen/ProductionImpl.java If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation //nopmd - immutable
dev/metaschema/databind/codegen/ProductionImpl.java If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation //nopmd - immutable
dev/metaschema/databind/codegen/config/IPropertyBindingConfiguration.java Annotate this interface with @FunctionalInterface or with @SuppressWarnings("PMD.ImplicitFunctionalInterface") to clarify your intent. @suppresswarnings
dev/metaschema/databind/codegen/impl/AnnotationGenerator.java A value of 39 may denote a high amount of coupling within the class (threshold: 20) @suppresswarnings
dev/metaschema/databind/codegen/impl/AnnotationGenerator.java Possible God Class (WMC=83, ATFD=109, TCC=0.654%) @suppresswarnings
dev/metaschema/databind/codegen/typeinfo/ChoiceGroupTypeInfoImpl.java The method 'buildBindingAnnotation(Builder, Builder, Builder)' has a cyclomatic complexity of 10. @suppresswarnings
dev/metaschema/databind/codegen/typeinfo/ChoiceGroupTypeInfoImpl.java The method 'buildBindingAnnotation(Builder, Builder, Builder)' has an NPath complexity of 288, current threshold is 200 @suppresswarnings
dev/metaschema/databind/codegen/typeinfo/ChoiceGroupTypeInfoImpl.java If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation @suppresswarnings
dev/metaschema/databind/codegen/typeinfo/ChoiceGroupTypeInfoImpl.java Avoid instantiating new objects inside loops //nopmd needed
dev/metaschema/databind/codegen/typeinfo/DefaultMetaschemaClassFactory.java A value of 34 may denote a high amount of coupling within the class (threshold: 20) @suppresswarnings
dev/metaschema/databind/codegen/typeinfo/DefaultMetaschemaClassFactory.java Possible God Class (WMC=54, ATFD=67, TCC=0.952%) @suppresswarnings
dev/metaschema/databind/codegen/typeinfo/DefaultMetaschemaClassFactory.java Avoid catching RuntimeException in try-catch block //nopmd - intended
dev/metaschema/databind/codegen/typeinfo/DefaultTypeResolver.java A value of 33 may denote a high amount of coupling within the class (threshold: 20) @suppresswarnings
dev/metaschema/databind/io/AbstractDeserializer.java Avoid catching Exception in try-catch block //nopmd - this is intentional
dev/metaschema/databind/io/DefaultBoundLoader.java A value of 23 may denote a high amount of coupling within the class (threshold: 20) @suppresswarnings
dev/metaschema/databind/io/DefaultBoundLoader.java Assigning an Object to null is a code smell. Consider refactoring. @suppresswarnings
dev/metaschema/databind/io/DeserializationFeature.java The class 'DeserializationFeature' is suspected to be a Data Class (WOC=0.000%, NOPA=8, NOAM=0, WMC=1) @suppresswarnings
dev/metaschema/databind/io/ModelDetector.java Assigning an Object to null is a code smell. Consider refactoring. @suppresswarnings
dev/metaschema/databind/io/json/MetaschemaJsonReader.java A value of 44 may denote a high amount of coupling within the class (threshold: 20) @suppresswarnings
dev/metaschema/databind/io/json/MetaschemaJsonReader.java The method 'buildJsonValue(JsonParser)' has a cyclomatic complexity of 12. @suppresswarnings
dev/metaschema/databind/io/json/MetaschemaJsonReader.java The method 'readObjectRoot(IBoundDefinitionModelComplex, String)' has a cyclomatic complexity of 12. @suppresswarnings
dev/metaschema/databind/io/json/MetaschemaJsonReader.java Possible God Class (WMC=71, ATFD=59, TCC=1.323%) @suppresswarnings
dev/metaschema/databind/io/json/MetaschemaJsonReader.java Ensure that resources like this JsonParser object are closed after use @suppresswarnings
dev/metaschema/databind/io/json/MetaschemaJsonReader.java Ensure that resources like this JsonParser object are closed after use @suppresswarnings
dev/metaschema/databind/io/json/MetaschemaJsonReader.java Ensure that resources like this JsonParser object are closed after use @suppresswarnings
dev/metaschema/databind/io/json/MetaschemaJsonReader.java Ensure that resources like this JsonParser object are closed after use @suppresswarnings
dev/metaschema/databind/io/json/MetaschemaJsonReader.java Ensure that resources like this JsonParser object are closed after use @suppresswarnings
dev/metaschema/databind/io/json/MetaschemaJsonReader.java Ensure that resources like this JsonParser object are closed after use @suppresswarnings
dev/metaschema/databind/io/json/MetaschemaJsonReader.java Ensure that resources like this JsonParser object are closed after use @suppresswarnings
dev/metaschema/databind/io/json/MetaschemaJsonReader.java Ensure that resources like this JsonParser object are closed after use @suppresswarnings
dev/metaschema/databind/io/json/MetaschemaJsonReader.java If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation //nopmd not concurrent
dev/metaschema/databind/io/json/MetaschemaJsonReader.java If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation @suppresswarnings
dev/metaschema/databind/io/json/MetaschemaJsonWriter.java A value of 39 may denote a high amount of coupling within the class (threshold: 20) @suppresswarnings
dev/metaschema/databind/io/json/MetaschemaJsonWriter.java Assigning an Object to null is a code smell. Consider refactoring. @suppresswarnings
dev/metaschema/databind/io/xml/DefaultXmlSerializer.java A throw statement in a finally block makes the control flow hard to understand. //nopmd - exception handling is needed
dev/metaschema/databind/io/xml/MetaschemaXmlReader.java A value of 45 may denote a high amount of coupling within the class (threshold: 20) @suppresswarnings
dev/metaschema/databind/model/IBoundDefinitionModelFieldComplex.java Assigning an Object to null is a code smell. Consider refactoring. @suppresswarnings
dev/metaschema/databind/model/IBoundDefinitionModelFieldComplex.java Assigning an Object to null is a code smell. Consider refactoring. @suppresswarnings
dev/metaschema/databind/model/annotations/ModelUtil.java Assigning an Object to null is a code smell. Consider refactoring. //nopmd - intentional
dev/metaschema/databind/model/annotations/NullJavaTypeAdapter.java Avoid unused method parameters such as 'item'. @suppresswarnings
dev/metaschema/databind/model/impl/ConstraintFactory.java A value of 45 may denote a high amount of coupling within the class (threshold: 20) @suppresswarnings
dev/metaschema/databind/model/impl/ConstraintFactory.java Assigning an Object to null is a code smell. Consider refactoring. @suppresswarnings
dev/metaschema/databind/model/impl/DefinitionAssembly.java A value of 22 may denote a high amount of coupling within the class (threshold: 20) @suppresswarnings
dev/metaschema/databind/model/impl/DefinitionField.java A value of 25 may denote a high amount of coupling within the class (threshold: 20) @suppresswarnings
dev/metaschema/databind/model/impl/FieldSupport.java You should not modify visibility of constructors, methods or fields using setAccessible() @suppresswarnings
dev/metaschema/databind/model/impl/InstanceModelChoiceGroup.java A value of 22 may denote a high amount of coupling within the class (threshold: 20) @suppresswarnings
dev/metaschema/databind/model/info/IFeatureComplexItemValueHandler.java Avoid throwing raw exception type RuntimeException. @suppresswarnings
dev/metaschema/databind/model/info/IFeatureComplexItemValueHandler.java Avoid throwing raw exception type RuntimeException. @suppresswarnings
dev/metaschema/databind/model/metaschema/BindingConstraintLoader.java Avoid instantiating new objects inside loops @suppresswarnings
dev/metaschema/databind/model/metaschema/impl/AbstractAbsoluteModelGenerator.java This abstract class does not have any abstract methods @suppresswarnings
dev/metaschema/databind/model/metaschema/impl/BindingModule.java A value of 33 may denote a high amount of coupling within the class (threshold: 20) @suppresswarnings
dev/metaschema/databind/model/metaschema/impl/BindingModule.java Avoid instantiating new objects inside loops @suppresswarnings
dev/metaschema/databind/model/metaschema/impl/BindingModule.java Avoid instantiating new objects inside loops @suppresswarnings
dev/metaschema/databind/model/metaschema/impl/BindingModule.java Avoid instantiating new objects inside loops @suppresswarnings
dev/metaschema/databind/model/metaschema/impl/ConstraintBindingSupport.java A value of 54 may denote a high amount of coupling within the class (threshold: 20) @suppresswarnings