PMD Results

The following document contains the results of PMD 5.0.5.

Files

org/andromda/repositories/mdr/MDRXmiReferenceResolver.java

Violation Line
Private field 'referenceResolver' could be made final; it is only initialized in the declaration or constructor. 14
It is a good practice to call super() in a constructor 2227
Parameter 'extents' is not assigned and could be declared final 23
Parameter 'moduleSearchPath' is not assigned and could be declared final 24
Parameter 'arg0' is not assigned and could be declared final 32

org/andromda/repositories/mdr/MDRXmiReferenceResolverContext.java

Violation Line
Found non-transient, non-static member. Please mark as transient or provide accessors. 30
Private field 'moduleSearchPaths' could be made final; it is only initialized in the declaration or constructor. 30
Variables that are final and static should be all capitals, 'logger' is not all capitals. 31
Variables that are final and static should be all capitals, 'urlMap' is not all capitals. 32
Parameter 'extents' is not assigned and could be declared final 42
Parameter 'config' is not assigned and could be declared final 43
Parameter 'moduleSearchPaths' is not assigned and could be declared final 44
Local variable 'exts' could be declared final 64
Local variable 'suffixWithExt' could be declared final 65
Deeply nested if..then statements are hard to read 7780
Deeply nested if..then statements are hard to read 8185
Deeply nested if..then statements are hard to read 8690
Found non-transient, non-static member. Please mark as transient or provide accessors. 112
Avoid instantiating new objects inside loops 140
Deeply nested if..then statements are hard to read 141144
Deeply nested if..then statements are hard to read 145155
Avoid empty catch blocks 151154
Prefer StringBuffer over += for concatenating strings 160
Parameter 'systemId' is not assigned and could be declared final 179
Local variable 'lastSlash' could be declared final 181
Local variable 'suffix' could be declared final 184
A method should have only one exit point, and that should be the last statement in the method 185
Consider simply returning the value vs storing it in local variable 'suffix' 185
Local variable 'dot' could be declared final 204
These nested if statements could be combined 216232
Local variable 'suffixNum' could be declared final 218
Deeply nested if..then statements are hard to read 221224
Local variable 'suffix' could be declared final 225
Deeply nested if..then statements are hard to read 227230
Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 254
Assigning an Object to null is a code smell. Consider refactoring. 256
Assigning an Object to null is a code smell. Consider refactoring. 260

org/andromda/repositories/mdr/MDRepositoryFacade.java

Violation Line
Variables that are final and static should be all capitals, 'logger' is not all capitals. 43
Found non-transient, non-static member. Please mark as transient or provide accessors. 44
Avoid using redundant field initializer for 'modelFacade' 44
Private field 'repository' could be made final; it is only initialized in the declaration or constructor. 45
Avoid using redundant field initializer for 'repository' 45
Found non-transient, non-static member. Please mark as transient or provide accessors. 45
Found non-transient, non-static member. Please mark as transient or provide accessors. 49
Avoid using redundant field initializer for 'model' 53
Found non-transient, non-static member. Please mark as transient or provide accessors. 53
Found non-transient, non-static member. Please mark as transient or provide accessors. 76
Avoid using redundant field initializer for 'open' 76
Field open has the same name as a method 76
Parameter 'uris' is not assigned and could be declared final 116
Parameter 'moduleSearchPath' is not assigned and could be declared final 117
A catch statement should never catch throwable since it includes errors. 127
A catch statement should never catch throwable since it includes errors. 168
Parameter 'model' is not assigned and could be declared final 189
Parameter 'outputLocation' is not assigned and could be declared final 190
Parameter 'xmiVersion' is not assigned and could be declared final 191
Found non-transient, non-static member. Please mark as transient or provide accessors. 221
Found non-transient, non-static member. Please mark as transient or provide accessors. 236
Found non-transient, non-static member. Please mark as transient or provide accessors. 251
Private field 'xmiReaderFactoryInstances' could be made final; it is only initialized in the declaration or constructor. 251
Use block level rather than method level synchronization 260286
Local variable 'instance' could be declared final 271
Parameter 'model' is not assigned and could be declared final 297
Parameter 'outputLocation' is not assigned and could be declared final 298
Avoid reassigning parameters such as 'xmiVersion' 299
Avoid reassigning parameters such as 'encoding' 300
Assigning an Object to null is a code smell. Consider refactoring. 338
A catch statement should never catch throwable since it includes errors. 340
Found non-transient, non-static member. Please mark as transient or provide accessors. 346
Parameter 'modelAccessFacade' is not assigned and could be declared final 353
A catch statement should never catch throwable since it includes errors. 372
Avoid if (x != y) ..; else ..; 377384
Assigning an Object to null is a code smell. Consider refactoring. 383
A method/constructor shouldnt explicitly throw java.lang.Exception 400
Local variable 'start' could be declared final 402
Local variable 'duration' could be declared final 435
Assigning an Object to null is a code smell. Consider refactoring. 447
Assigning an Object to null is a code smell. Consider refactoring. 448
Local variable 'model' could be declared final 454
A method/constructor shouldnt explicitly throw java.lang.Exception 474
Avoid declaring a variable if it is unreferenced before a possible exit point. 480
Local variable 'start' could be declared final 480
A catch statement should never catch throwable since it includes errors. 505
Local variable 'duration' could be declared final 517
A method/constructor shouldnt explicitly throw java.lang.Exception 539
A catch statement should never catch throwable since it includes errors. 569