PMD Results

The following document contains the results of PMD 5.0.2.

Files

org/andromda/cartridges/ejb/EJBProfile.java

Violation Line
Avoid excessively long variable names like TAGGEDVALUE_EJB_TRANSACTION_TYPE 48
Avoid excessively long variable names like TAGGEDVALUE_EJB_NO_SYNTHETIC_CREATE_METHOD 52

org/andromda/cartridges/ejb/EJBScriptHelper.java

Violation Line
Parameter 'includeNames' is not assigned and could be declared final 27
Parameter 'includeTypes' is not assigned and could be declared final 27
Parameter 'attributes' is not assigned and could be declared final 27
A method should have only one exit point, and that should be the last statement in the method 31
Avoid variables with short names like sb 34
Local variable 'sb' could be declared final 34
Local variable 'attr' could be declared final 39
Parameter 'visibility' is not assigned and could be declared final 62
Parameter 'list' is not assigned and could be declared final 62
Local variable 'result' could be declared final 64
Local variable 'elem' could be declared final 65

org/andromda/cartridges/ejb/metafacades/EJBAssociationEndFacadeLogicImpl.java

Violation Line
Parameter 'metaObject' is not assigned and could be declared final 17
Parameter 'context' is not assigned and could be declared final 17

org/andromda/cartridges/ejb/metafacades/EJBAssociationFacadeLogicImpl.java

Violation Line
Parameter 'context' is not assigned and could be declared final 20
Parameter 'metaObject' is not assigned and could be declared final 20

org/andromda/cartridges/ejb/metafacades/EJBEntityAttributeFacadeLogicImpl.java

Violation Line
Parameter 'metaObject' is not assigned and could be declared final 21
Parameter 'context' is not assigned and could be declared final 21

org/andromda/cartridges/ejb/metafacades/EJBEntityFacadeLogicImpl.java

Violation Line
Parameter 'metaObject' is not assigned and could be declared final 39
Parameter 'context' is not assigned and could be declared final 40
Variables that are final and static should be all capitals, 'logger' is not all capitals. 48
Local variable 'iter' could be declared final 56
Local variable 'dep' could be declared final 59
A method should have only one exit point, and that should be the last statement in the method 66
Local variable 'attr' could be declared final 73
A method should have only one exit point, and that should be the last statement in the method 75
Local variable 'decorator' could be declared final 79
A method should have only one exit point, and that should be the last statement in the method 93
Local variable 'result' could be declared final 95
No need to check for null before an instanceof 98
Local variable 'entity' could be declared final 100
Local variable 'result' could be declared final 121
Local variable 'associationEnd' could be declared final 124
Local variable 'target' could be declared final 125
Local variable 'value' could be declared final 129 - 130
Local variable 'generateCmr' could be declared final 131
Parameter 'follow' is not assigned and could be declared final 166
Parameter 'follow' is not assigned and could be declared final 178
Local variable 'retval' could be declared final 180
Local variable 'ops' could be declared final 184
Avoid variables with short names like op 187
Local variable 'op' could be declared final 187
Parameter 'follow' is not assigned and could be declared final 220
Parameter 'follow' is not assigned and could be declared final 232
Local variable 'jndiName' could be declared final 245
Local variable 'jndiNamePrefix' could be declared final 246
Local variable 'businessOperations' could be declared final 286
Local variable 'operation' could be declared final 287
Local variable 'businessOperation' could be declared final 291
Local variable 'dependencies' could be declared final 306
Parameter 'object' is not assigned and could be declared final 311
Local variable 'dep' could be declared final 316
Parameter 'identifier' is not assigned and could be declared final 330
Local variable 'attr' could be declared final 332
A method should have only one exit point, and that should be the last statement in the method 336
Parameter 'strAttr' is not assigned and could be declared final 345
Local variable 'collAttrib' could be declared final 347
Local variable 'attr' could be declared final 348
A method should have only one exit point, and that should be the last statement in the method 352
Avoid variables with short names like op 361
Parameter 'op' is not assigned and could be declared final 361
Local variable 'collOps' could be declared final 363
Local variable 'operation' could be declared final 364
A method should have only one exit point, and that should be the last statement in the method 368
Local variable 'property' could be declared final 382
A catch statement should never catch throwable since it includes errors. 395
Local variable 'errMsg' could be declared final 397

org/andromda/cartridges/ejb/metafacades/EJBFinderMethodFacadeLogicImpl.java

Violation Line
Parameter 'context' is not assigned and could be declared final 23
Parameter 'metaObject' is not assigned and could be declared final 23
Local variable 'value' could be declared final 40
Local variable 'variableName' could be declared final 52
Prefer StringBuffer over += for concatenating strings 57
Local variable 'parameters' could be declared final 58
Deeply nested if..then statements are hard to read 59 - 72
Local variable 'parameterIt' could be declared final 61
Local variable 'test' could be declared final 64
Local variable 'param' could be declared final 65
Prefer StringBuffer over += for concatenating strings 66
Prefer StringBuffer over += for concatenating strings 69

org/andromda/cartridges/ejb/metafacades/EJBMetafacadeUtils.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. 23 - 233
Use explicit scoping instead of the default package private level 30 - 51
Parameter 'classifier' is not assigned and could be declared final 30
Parameter 'follow' is not assigned and could be declared final 30
The String literal "classifer" appears 8 times in this file; the first occurrence is on line 32 32
Local variable 'retval' could be declared final 33
Avoid variables with short names like op 37
Parameter 'classifier' is not assigned and could be declared final 59
Use explicit scoping instead of the default package private level 59 - 72
Parameter 'classifier' is not assigned and could be declared final 80
Use explicit scoping instead of the default package private level 80 - 109
Local variable 'viewTypeValue' could be declared final 86
Parameter 'object' is not assigned and could be declared final 92
Parameter 'classifier' is not assigned and could be declared final 117
Use explicit scoping instead of the default package private level 117 - 132
Local variable 'current' could be declared final 120
A method should have only one exit point, and that should be the last statement in the method 123
Local variable 'retval' could be declared final 125
Use explicit scoping instead of the default package private level 141 - 147
Parameter 'classifier' is not assigned and could be declared final 141
Local variable 'retval' could be declared final 144
Parameter 'follow' is not assigned and could be declared final 159
Avoid reassigning parameters such as 'classifier' 159
Use explicit scoping instead of the default package private level 159 - 183
Avoid reassigning parameters such as 'classifier' 159
Local variable 'attributes' could be declared final 163
Parameter 'object' is not assigned and could be declared final 176
Avoid reassigning parameters such as 'classifier' 194
Use explicit scoping instead of the default package private level 194 - 218
Parameter 'follow' is not assigned and could be declared final 194
Avoid reassigning parameters such as 'classifier' 194
Local variable 'attributes' could be declared final 198
Parameter 'object' is not assigned and could be declared final 211
Use explicit scoping instead of the default package private level 226 - 231
Parameter 'classifier' is not assigned and could be declared final 226

org/andromda/cartridges/ejb/metafacades/EJBOperationFacadeLogicImpl.java

Violation Line
Parameter 'context' is not assigned and could be declared final 22
Parameter 'metaObject' is not assigned and could be declared final 22

org/andromda/cartridges/ejb/metafacades/EJBPrimaryKeyFacadeLogicImpl.java

Violation Line
Parameter 'metaObject' is not assigned and could be declared final 20
Parameter 'context' is not assigned and could be declared final 20
Local variable 'primaryKeys' could be declared final 43
Local variable 'pkField' could be declared final 46

org/andromda/cartridges/ejb/metafacades/EJBSessionAttributeFacadeLogicImpl.java

Violation Line
Parameter 'context' is not assigned and could be declared final 20
Parameter 'metaObject' is not assigned and could be declared final 20

org/andromda/cartridges/ejb/metafacades/EJBSessionFacadeLogicImpl.java

Violation Line
Parameter 'context' is not assigned and could be declared final 26
Parameter 'metaObject' is not assigned and could be declared final 26
Parameter 'follow' is not assigned and could be declared final 36
Unnecessary use of fully qualified name 'java.util.Collection' due to existing import 'java.util.Collection' 36
Parameter 'follow' is not assigned and could be declared final 80
Parameter 'follow' is not assigned and could be declared final 90
Local variable 'jndiName' could be declared final 101
Local variable 'jndiNamePrefix' could be declared final 102
Local variable 'operations' could be declared final 176
Parameter 'object' is not assigned and could be declared final 179

org/andromda/cartridges/ejb/metafacades/ValueObjectFacadeLogicImpl.java

Violation Line
Parameter 'metaObject' is not assigned and could be declared final 24
Parameter 'context' is not assigned and could be declared final 25
Local variable 'buffer' could be declared final 42
Local variable 'token' could be declared final 45
Local variable 'generalization' could be declared final 81
Assigning an Object to null is a code smell. Consider refactoring. 82