PMD Results

The following document contains the results of PMD 5.0.2.

Files

org/andromda/cartridges/hibernate/HibernateProfile.java

Violation Line
Variables that are final and static should be all capitals, 'profile' is not all capitals. 20
Avoid excessively long variable names like TAGGEDVALUE_HIBERNATE_XML_TAG_NAME 30
Avoid excessively long variable names like TAGGEDVALUE_HIBERNATE_GENERATOR_CLASS 42
Avoid excessively long variable names like TAGGEDVALUE_HIBERNATE_USE_NAMED_PARAMETERS 53
Avoid excessively long variable names like TAGGEDVALUE_EJB_TRANSACTION_TYPE 64
Avoid excessively long variable names like TAGGEDVALUE_HIBERNATE_INHERITANCE 80
Avoid excessively long variable names like TAGGEDVALUE_HIBERNATE_OUTER_JOIN 86
Avoid excessively long variable names like TAGGEDVALUE_HIBERNATE_USE_QUERY_CACHE 92
Avoid excessively long variable names like TAGGEDVALUE_HIBERNATE_ENTITY_CACHE 98
Avoid excessively long variable names like TAGGEDVALUE_HIBERNATE_ENTITY_DYNAMIC_INSERT 104
Avoid excessively long variable names like TAGGEDVALUE_HIBERNATE_ENTITY_DYNAMIC_UPDATE 111
Avoid excessively long variable names like TAGGEDVALUE_HIBERNATE_ASSOCIATION_CACHE 118
Avoid excessively long variable names like TAGGEDVALUE_HIBERNATE_EHCACHE_MAX_ELEMENTS 129
Avoid excessively long variable names like TAGGEDVALUE_HIBERNATE_EHCACHE_ETERNAL 136
Avoid excessively long variable names like TAGGEDVALUE_HIBERNATE_EHCACHE_TIME_TO_IDLE 142
Avoid excessively long variable names like TAGGEDVALUE_HIBERNATE_EHCACHE_TIME_TO_LIVE 149
Avoid excessively long variable names like TAGGEDVALUE_HIBERNATE_EHCACHE_OVERFLOW_TO_DISK 156
Avoid excessively long variable names like TAGGEDVALUE_HIBERNATE_ENTITYCACHE_DISTRIBUTED 163
Avoid excessively long variable names like TAGGEDVALUE_HIBERNATE_ASSOCIATIONCACHE_DISTRIBUTED 170
Avoid excessively long variable names like TAGGEDVALUE_HIBERNATE_ASSOCIATION_COLLECTION_TYPE 177
Avoid excessively long variable names like TAGGEDVALUE_HIBERNATE_ASSOCIATION_SORT_TYPE 183
Avoid excessively long variable names like TAGGEDVALUE_HIBERNATE_ASSOCIATION_ORDER_BY_COLUMNS 190
Avoid excessively long variable names like TAGGEDVALUE_HIBERNATE_ASSOCIATION_WHERE_CLAUSE 196
Avoid excessively long variable names like TAGGEDVALUE_HIBERNATE_ASSOCIATION_INDEX 203
Avoid excessively long variable names like TAGGEDVALUE_HIBERNATE_ASSOCIATION_INDEX_TYPE 209
Avoid excessively long variable names like TAGGEDVALUE_HIBERNATE_VERSION_PROPERTY 216
Avoid excessively long variable names like TAGGEDVALUE_ENTITY_DISCRIMINATOR_COLUMN 233
Avoid excessively long variable names like TAGGEDVALUE_ENTITY_DISCRIMINATOR_TYPE 240
Avoid excessively long variable names like TAGGEDVALUE_ENTITY_DISCRIMINATOR_VALUE 246
Avoid excessively long variable names like TAGGEDVALUE_HIBERNATE_PROPERTY_INSERT 252
Avoid excessively long variable names like TAGGEDVALUE_HIBERNATE_PROPERTY_UPDATE 258

org/andromda/cartridges/hibernate/HibernateUtils.java

Violation Line
Parameter 'services' is not assigned and could be declared final 28
Parameter 'object' is not assigned and could be declared final 35
Found non-transient, non-static member. Please mark as transient or provide accessors. 49
Parameter 'hibernateVersionPropertyValue' is not assigned and could be declared final 118
Parameter 'hibernateVersionPropertyValue' is not assigned and could be declared final 134
Parameter 'hibernateVersionPropertyValue' is not assigned and could be declared final 150
Found non-transient, non-static member. Please mark as transient or provide accessors. 163
Parameter 'hibernateVersionPropertyValue' is not assigned and could be declared final 190
Parameter 'hibernateXMLPersistencePropertyValue' is not assigned and could be declared final 191
Avoid excessively long variable names like hibernateXMLPersistencePropertyValue 191
Found non-transient, non-static member. Please mark as transient or provide accessors. 197
Parameter 'hibernateMappingStrategy' is not assigned and could be declared final 202
Parameter 'hibernateMappingStrategy' is not assigned and could be declared final 220
Parameter 'hibernateMappingStrategy' is not assigned and could be declared final 232
Avoid variables with short names like DF 250
When instantiating a SimpleDateFormat object, specify a Locale 250
Parameter 'format' is not assigned and could be declared final 257
Static DateFormatter objects should be accessed in a synchronized manner 263
Static DateFormatter objects should be accessed in a synchronized manner 273

org/andromda/cartridges/hibernate/metafacades/HibernateAssociationEndLogicImpl.java

Violation Line
Parameter 'metaObject' is not assigned and could be declared final 36
Parameter 'context' is not assigned and could be declared final 37
Variables that are final and static should be all capitals, 'collectionTypes' is not all capitals. 70
Avoid excessively long variable names like COMPOSITION_DEFINES_EAGER_LOADING 85
Avoid excessively long variable names like PROPERTY_ASSOCIATION_END_OUTERJOIN 90
Useless parentheses. 124 - 126
Unnecessary wrapper object creation 141
Avoid if (x != y) ..; else ..; 146 - 173
These nested if statements could be combined 197 - 211
Unnecessary wrapper object creation 197
Local variable 'lazyString' could be declared final 223
Local variable 'compositionDefinesEagerLoading' could be declared final 230 - 232
Unnecessary wrapper object creation 231
Use bitwise inversion to invert boolean values 236
Unnecessary wrapper object creation 241
Useless parentheses. 258
Useless parentheses. 258
No need to check for null before an instanceof 270
Local variable 'entity' could be declared final 272
Local variable 'version' could be declared final 376
Useless parentheses. 382
Local variable 'type' could be declared final 396
Useless parentheses. 398
Local variable 'entity' could be declared final 400
Useless parentheses. 402
These nested if statements could be combined 491 - 497
Useless parentheses. 511
Assigning an Object to null is a code smell. Consider refactoring. 517
A method should have only one exit point, and that should be the last statement in the method 523
Assigning an Object to null is a code smell. Consider refactoring. 548
Local variable 'element' could be declared final 556
Assigning an Object to null is a code smell. Consider refactoring. 571
Avoid if (x != y) ..; else ..; 571
Use bitwise inversion to invert boolean values 584
Use bitwise inversion to invert boolean values 616
Local variable 'implementation' could be declared final 637
Unnecessary wrapper object creation 661
Avoid excessively long variable names like isBidirectionalOrderedListParent 704
Local variable 'biDirectional' could be declared final 705
Useless parentheses. 707
Local variable 'otherEnd' could be declared final 709
Local variable 'otherEnd' could be declared final 727
Local variable 'property' could be declared final 740
Local variable 'isBiDirectional' could be declared final 801
Useless parentheses. 812
Assigning an Object to null is a code smell. Consider refactoring. 812
Assigning an Object to null is a code smell. Consider refactoring. 832
Useless parentheses. 832

org/andromda/cartridges/hibernate/metafacades/HibernateAssociationLogicImpl.java

Violation Line
Parameter 'metaObject' is not assigned and could be declared final 22
Parameter 'context' is not assigned and could be declared final 23
Unnecessary wrapper object creation 73
Unnecessary wrapper object creation 117
Local variable 'distributed' could be declared final 127
Unnecessary wrapper object creation 128
Local variable 'distributedCachingEnabled' could be declared final 128
Local variable 'entityCacheDistributed' could be declared final 132 - 133
A method should have only one exit point, and that should be the last statement in the method 134
Unnecessary wrapper object creation 134

org/andromda/cartridges/hibernate/metafacades/HibernateEmbeddedValueLogicImpl.java

Violation Line
Parameter 'metaObject' is not assigned and could be declared final 26
Parameter 'context' is not assigned and could be declared final 27
Local variable 'value' could be declared final 39
Unnecessary wrapper object creation 42

org/andromda/cartridges/hibernate/metafacades/HibernateEntityAttributeLogicImpl.java

Violation Line
Parameter 'metaObject' is not assigned and could be declared final 31
Parameter 'context' is not assigned and could be declared final 32
Local variable 'entity' could be declared final 48
Prefer StringBuffer over += for concatenating strings 76
Parameter 'prefix' is not assigned and could be declared final 110
Parameter 'name' is not assigned and could be declared final 111
Local variable 'maxSqlNameLength' could be declared final 119 - 120
Unnecessary wrapper object creation 134
Unnecessary wrapper object creation 154
Unnecessary wrapper object creation 165
Local variable 'prop' could be declared final 177
Avoid using if statements without curly braces 178 - 179
Avoid using if...else statements without curly braces 199
Avoid using if...else statements without curly braces 201
Assigning an Object to null is a code smell. Consider refactoring. 205
Useless parentheses. 205

org/andromda/cartridges/hibernate/metafacades/HibernateEntityLogicImpl.java

Violation Line
This class has too many methods, consider refactoring it. 41 - 872
Parameter 'metaObject' is not assigned and could be declared final 48
Parameter 'context' is not assigned and could be declared final 49
Avoid excessively long variable names like INHERITANCE_STRATEGY_UNION_SUBCLASS 77
Variables that are final and static should be all capitals, 'inheritanceStrategies' is not all capitals. 82
Avoid excessively long variable names like DEFAULT_HIBERNATE_GENERATOR_CLASS 112
Avoid excessively long variable names like HIBERNATE_GENERATOR_CLASS_FOREIGN 117
Avoid excessively long variable names like HIBERNATE_GENERATOR_CLASS_ASSIGNED 122
Avoid excessively long variable names like HIBERNATE_GENERATOR_CLASS_SEQUENCE 123
Local variable 'result' could be declared final 159
No need to check for null before an instanceof 162
Local variable 'superElement' could be declared final 164
Local variable 'superEntity' could be declared final 180
Useless parentheses. 181
Prefer StringBuffer over += for concatenating strings 186
Avoid if (x != y) ..; else ..; 186
Parameter 'entity' is not assigned and could be declared final 213
Local variable 'properties' could be declared final 233
Useless parentheses. 239
Local variable 'version' could be declared final 289
Local variable 'version' could be declared final 303
Unnecessary wrapper object creation 306
Local variable 'entityNamePattern' could be declared final 417
Local variable 'implNamePattern' could be declared final 430 - 431
Useless parentheses. 499
Unnecessary wrapper object creation 513
Unnecessary wrapper object creation 541
Unnecessary wrapper object creation 585
Local variable 'distributed' could be declared final 594
Local variable 'distributedCachingEnabled' could be declared final 595
Unnecessary wrapper object creation 595
Local variable 'entityCacheDistributed' could be declared final 599 - 600
Unnecessary wrapper object creation 601
A method should have only one exit point, and that should be the last statement in the method 601
Useless parentheses. 613
Useless parentheses. 613
Useless parentheses. 625
Useless parentheses. 654
Useless parentheses. 671
Local variable 'facade' could be declared final 673
Useless parentheses. 695
Local variable 'abstractConcreteEntity' could be declared final 706 - 707
Useless parentheses. 711
Unnecessary wrapper object creation 741
Unnecessary wrapper object creation 756
Useless parentheses. 765
Assigning an Object to null is a code smell. Consider refactoring. 831
Useless parentheses. 831
Unnecessary wrapper object creation 861

org/andromda/cartridges/hibernate/metafacades/HibernateEnumerationLogicImpl.java

Violation Line
Parameter 'metaObject' is not assigned and could be declared final 23
Parameter 'context' is not assigned and could be declared final 24
Local variable 'enumPackageName' could be declared final 80
Avoid if (x != y) ..; else ..; 81 - 85
A method should have only one exit point, and that should be the last statement in the method 82

org/andromda/cartridges/hibernate/metafacades/HibernateFinderMethodArgumentLogicImpl.java

Violation Line
Parameter 'metaObject' is not assigned and could be declared final 21
Parameter 'context' is not assigned and could be declared final 22
Local variable 'setterName' could be declared final 39
Local variable 'specializedSetters' could be declared final 40 - 41
Unnecessary wrapper object creation 41
Local variable 'classifier' could be declared final 42

org/andromda/cartridges/hibernate/metafacades/HibernateFinderMethodLogicImpl.java

Violation Line
Parameter 'metaObject' is not assigned and could be declared final 25
Parameter 'context' is not assigned and could be declared final 26
Local variable 'value' could be declared final 44
Local variable 'variableName' could be declared final 56
Local variable 'arguments' could be declared final 58
Prefer StringBuffer over += for concatenating strings 61
Local variable 'argumentIt' could be declared final 62
This for loop could be simplified to a while loop 63 - 76
Local variable 'argument' could be declared final 65
Deeply nested if..then statements are hard to read 67 - 70
Prefer StringBuffer over += for concatenating strings 71
Deeply nested if..then statements are hard to read 72 - 75
Prefer StringBuffer over += for concatenating strings 74
Found non-transient, non-static member. Please mark as transient or provide accessors. 85
Avoid using redundant field initializer for 'translatedQuery' 85
Local variable 'useNamedParameters' could be declared final 111 - 112
Unnecessary wrapper object creation 111
Unnecessary wrapper object creation 129
Unnecessary wrapper object creation 134

org/andromda/cartridges/hibernate/metafacades/HibernateGlobals.java

Violation Line
Avoid excessively long variable names like HIBERNATE_MAPPING_STRATEGY_SUBCLASS 19
Avoid excessively long variable names like HIBERNATE_MAPPING_STRATEGY_HIERARCHY 24
Avoid excessively long variable names like HIBERNATE_MAPPING_STRATEGY_CONCRETE 29
Avoid excessively long variable names like HIBERNATE_XML_PERSISTENCE_ID_AS_ATTRIBUTE 40
Use explicit scoping instead of the default package private level 40
Use explicit scoping instead of the default package private level 65
Use explicit scoping instead of the default package private level 70
Avoid excessively long variable names like HIBERNATE_CASCADE_ALL_DELETE_ORPHAN 75
Use explicit scoping instead of the default package private level 75
Use explicit scoping instead of the default package private level 80
Use explicit scoping instead of the default package private level 85
Use explicit scoping instead of the default package private level 90
Use explicit scoping instead of the default package private level 96
Avoid excessively long variable names like PROPERTY_IMPLEMENTATION_OPERATION_NAME_PREFIX 96
Use explicit scoping instead of the default package private level 102
Use explicit scoping instead of the default package private level 107
Use explicit scoping instead of the default package private level 112
Use explicit scoping instead of the default package private level 117
Avoid excessively long variable names like HIBERNATE_EHCACHE_OVERFLOW_TO_DISK 122
Use explicit scoping instead of the default package private level 122
Use explicit scoping instead of the default package private level 127
Avoid excessively long variable names like HIBERNATE_ENTITYCACHE_DISTRIBUTED 127
Use explicit scoping instead of the default package private level 132
Use explicit scoping instead of the default package private level 137
Use explicit scoping instead of the default package private level 142
Avoid excessively long variable names like HIBERNATE_ASSOCIATION_COLLECTION_TYPE 142
Use explicit scoping instead of the default package private level 147
Use explicit scoping instead of the default package private level 153
Avoid excessively long variable names like ENTITY_IMPLEMENTATION_NAME_PATTERN 159
Use explicit scoping instead of the default package private level 159
Use explicit scoping instead of the default package private level 165
Avoid excessively long variable names like EMBEDDED_VALUE_IMPLEMENTATION_NAME_PATTERN 165
Use explicit scoping instead of the default package private level 171
Use explicit scoping instead of the default package private level 176
Use explicit scoping instead of the default package private level 181
Use explicit scoping instead of the default package private level 186
Use explicit scoping instead of the default package private level 191
Use explicit scoping instead of the default package private level 199
Use explicit scoping instead of the default package private level 206
Use explicit scoping instead of the default package private level 211
Use explicit scoping instead of the default package private level 216
Use explicit scoping instead of the default package private level 223

org/andromda/cartridges/hibernate/metafacades/HibernateMetafacadeUtils.java

Violation Line
All methods are static. Consider using Singleton instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 20 - 133
Use explicit scoping instead of the default package private level 29 - 64
Parameter 'classifier' is not assigned and could be declared final 30
Parameter 'defaultViewType' is not assigned and could be declared final 31
Local variable 'viewTypeValue' could be declared final 37
Parameter 'object' is not assigned and could be declared final 47
Use explicit scoping instead of the default package private level 76 - 89
Parameter 'packageName' is not assigned and could be declared final 77
Parameter 'name' is not assigned and could be declared final 78
Parameter 'suffix' is not assigned and could be declared final 79
Local variable 'fullyQualifiedName' could be declared final 81
Parameter 'operations' is not assigned and could be declared final 96
Use explicit scoping instead of the default package private level 96 - 108
Local variable 'businessOperations' could be declared final 98 - 106
Parameter 'object' is not assigned and could be declared final 102
Use explicit scoping instead of the default package private level 117 - 132
Parameter 'operation' is not assigned and could be declared final 117
Parameter 'defaultUseNamedParameters' is not assigned and could be declared final 118
Local variable 'useNamedParametersValue' could be declared final 124 - 125
Unnecessary wrapper object creation 128

org/andromda/cartridges/hibernate/metafacades/HibernateServiceLogicImpl.java

Violation Line
Parameter 'metaObject' is not assigned and could be declared final 21
Parameter 'context' is not assigned and could be declared final 22
Local variable 'jndiName' could be declared final 33
Local variable 'jndiNamePrefix' could be declared final 34
Local variable 'defaultViewType' could be declared final 51
Assigning an Object to null is a code smell. Consider refactoring. 63

org/andromda/cartridges/hibernate/metafacades/HibernateServiceOperationLogicImpl.java

Violation Line
Parameter 'metaObject' is not assigned and could be declared final 21
Parameter 'context' is not assigned and could be declared final 22
Avoid excessively long variable names like SERVICE_OPERATION_TRANSACTION_TYPE 30

org/andromda/cartridges/hibernate/metafacades/HibernateTypeLogicImpl.java

Violation Line
Variables that are final and static should be all capitals, 'logger' is not all capitals. 23
Parameter 'metaObject' is not assigned and could be declared final 31
Parameter 'context' is not assigned and could be declared final 32
A catch statement should never catch throwable since it includes errors. 80