PMD Results

The following document contains the results of PMD 5.0.2.

Files

org/andromda/repositories/emf/EMFRepositoryFacade.java

Violation Line
Abstract classes should be named AbstractXXX 32 - 280
Variables that are final and static should be all capitals, 'logger' is not all capitals. 38
Found non-transient, non-static member. Please mark as transient or provide accessors. 43
Found non-transient, non-static member. Please mark as transient or provide accessors. 55
Private field 'loadOptions' could be made final; it is only initialized in the declaration or constructor. 60
Found non-transient, non-static member. Please mark as transient or provide accessors. 60
The method readModel() has an NPath complexity of 217 77 - 141
Local variable 'modelResource' could be declared final 85
Local variable 'errors' could be declared final 92
Local variable 'warnings' could be declared final 97
Local variable 'i' could be declared final 110
Local variable 'eObject' could be declared final 113
Line too long 114
Local variable 'crossRefIterator' could be declared final 115
Line too long 123
Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 125
Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 131
Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 137
Parameter 'modelUris' is not assigned and could be declared final 176
Parameter 'moduleSearchPaths' is not assigned and could be declared final 177
Parameter 'stream' is not assigned and could be declared final 226
Parameter 'modelUri' is not assigned and could be declared final 227
Parameter 'moduleSearchPaths' is not assigned and could be declared final 228
Parameter 'modelIn' is not assigned and could be declared final 239
Parameter 'location' is not assigned and could be declared final 240
Parameter 'version' is not assigned and could be declared final 241
Parameter 'encoding' is not assigned and could be declared final 242
Parameter 'modelIn' is not assigned and could be declared final 254
Parameter 'location' is not assigned and could be declared final 255
Parameter 'version' is not assigned and could be declared final 256
Assigning an Object to null is a code smell. Consider refactoring. 277

org/andromda/repositories/emf/EMFRepositoryFacadeUtils.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. 14 - 51
Use explicit scoping instead of the default package private level 31 - 50
Avoid reassigning parameters such as 'uri' 31

org/andromda/repositories/emf/EMFURIConverter.java

Violation Line
It is a good practice to call super() in a constructor 34 - 45
Parameter 'uriMap' is not assigned and could be declared final 34
It is a good practice to call super() in a constructor 54 - 64
Found non-transient, non-static member. Please mark as transient or provide accessors. 69
Private field 'moduleSearchPaths' could be made final; it is only initialized in the declaration or constructor. 69
Found non-transient, non-static member. Please mark as transient or provide accessors. 74
Variables that are final and static should be all capitals, 'logger' is not all capitals. 79
The method normalize() has an NPath complexity of 3685 86 - 185
These nested if statements could be combined 91 - 181
Avoid if (x != y) ..; else ..; 93 - 180
Local variable 'now1' could be declared final 100
Avoid instantiating new objects inside loops 100
Local variable 'ms1' could be declared final 102
Avoid instantiating new objects inside loops 102
Deeply nested if..then statements are hard to read 103 - 112
Avoid variables with short names like ms 105
Local variable 'ms' could be declared final 105
The String literal " ms" appears 4 times in this file; the first occurrence is on line 105 105
Useless parentheses. 105
Local variable 'now' could be declared final 118
Avoid instantiating new objects inside loops 118
Deeply nested if..then statements are hard to read 121 - 152
Avoid instantiating new objects inside loops 127
Local variable 'ms2' could be declared final 127
Local variable 'ms' could be declared final 128
Avoid variables with short names like ms 128
Useless parentheses. 128
Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 131
Assigning an Object to null is a code smell. Consider refactoring. 133
Assigning an Object to null is a code smell. Consider refactoring. 137
Local variable 'ms2' could be declared final 141
Avoid instantiating new objects inside loops 141
Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 154
Local variable 'ms2' could be declared final 160
Avoid instantiating new objects inside loops 160
Useless parentheses. 161
Local variable 'ms' could be declared final 161
Avoid variables with short names like ms 161
Deeply nested if..then statements are hard to read 162 - 165
Deeply nested if..then statements are hard to read 170 - 175