PMD Results

The following document contains the results of PMD 4.3.

Files

de/fub/mi/idenpa/sp/E_ConfigKey.java

ViolationLine
Parameter 'optional' is not assigned and could be declared final76
Parameter 'type' is not assigned and could be declared final76
Parameter 'cfg' is not assigned and could be declared final106
Avoid using Literals in Conditional Statements112
Avoid empty catch blocks115
Parameter 'cfg' is not assigned and could be declared final132
Parameter 'cfg' is not assigned and could be declared final152
Avoid using Literals in Conditional Statements158
Avoid empty catch blocks162
Parameter 'cfg' is not assigned and could be declared final179
Local variable 'result' could be declared final180
Parameter 'cfg' is not assigned and could be declared final193
Local variable 'params' could be declared final196
Local variable 'param' could be declared final198
Local variable 'map' could be declared final201
Avoid using Literals in Conditional Statements202
Deeply nested if..then statements are hard to read203 - 204
Avoid using Literals in Conditional Statements203
Avoid instantiating new objects inside loops204
Parameter 'param' is not assigned and could be declared final225
Parameter 'cfg' is not assigned and could be declared final225
Local variable 'keyval' could be declared final232
Prefer StringBuffer over += for concatenating strings236
Assigning an Object to null is a code smell. Consider refactoring.244
Assigning an Object to null is a code smell. Consider refactoring.245
Private field 'm_objId' could be made final; it is only initialized in the declaration or constructor.265
Private field 'm_objDest' could be made final; it is only initialized in the declaration or constructor.268
Parameter 'id' is not assigned and could be declared final276
Parameter 'dest' is not assigned and could be declared final276

de/fub/mi/idenpa/sp/I_ProverServiceClient.java

ViolationLine
Avoid modifiers which are implied by the context46
Avoid modifiers which are implied by the context56
Avoid modifiers which are implied by the context67

de/fub/mi/idenpa/sp/I_VerificationServiceClient.java

ViolationLine
Avoid modifiers which are implied by the context42
Avoid modifiers which are implied by the context45
Avoid modifiers which are implied by the context48
Avoid modifiers which are implied by the context59
Avoid modifiers which are implied by the context67

de/fub/mi/idenpa/sp/I_VerifierConfig.java

ViolationLine
Avoid modifiers which are implied by the context43
Avoid modifiers which are implied by the context46
Avoid modifiers which are implied by the context49
Avoid modifiers which are implied by the context52
Avoid modifiers which are implied by the context55
Avoid modifiers which are implied by the context58
Avoid modifiers which are implied by the context66
Avoid modifiers which are implied by the context75
Avoid modifiers which are implied by the context83
Avoid modifiers which are implied by the context90
Avoid modifiers which are implied by the context97
Avoid modifiers which are implied by the context104
Avoid modifiers which are implied by the context113
Avoid modifiers which are implied by the context121
Avoid modifiers which are implied by the context129

de/fub/mi/idenpa/sp/I_VerifierRepository.java

ViolationLine
Avoid modifiers which are implied by the context41
Avoid modifiers which are implied by the context49
Avoid modifiers which are implied by the context57
Avoid modifiers which are implied by the context65

de/fub/mi/idenpa/sp/ServiceHandler.java

ViolationLine
A class which only has private constructors should be final35 - 119
Private field 'm_objStorage' could be made final; it is only initialized in the declaration or constructor.41
Parameter 'storage' is not assigned and could be declared final55
Use block level rather than method level synchronization65 - 67
Use block level rather than method level synchronization76 - 79
Parameter 'storage' is not assigned and could be declared final76
Use block level rather than method level synchronization86 - 88

de/fub/mi/idenpa/sp/StorageWrapper.java

ViolationLine
A class which only has private constructors should be final33 - 136
Private field 'm_objCfg' could be made final; it is only initialized in the declaration or constructor.39
Parameter 'cfg' is not assigned and could be declared final50
Parameter 'verifierRepo' is not assigned and could be declared final61
Parameter 'cfg' is not assigned and could be declared final61
Use block level rather than method level synchronization71 - 73
Use block level rather than method level synchronization82 - 85
Parameter 'cfg' is not assigned and could be declared final82
Use block level rather than method level synchronization92 - 94
Use block level rather than method level synchronization122 - 125
Parameter 'verifierRepo' is not assigned and could be declared final122
Parameter 'cfg' is not assigned and could be declared final122

de/fub/mi/idenpa/sp/VerifierRepository.java

ViolationLine
A class which only has private constructors should be final41 - 176
Private field 'm_objCfg' could be made final; it is only initialized in the declaration or constructor.55
Private field 'm_objVerifierRepo' could be made final; it is only initialized in the declaration or constructor.58
Private field 'm_objTimeRepo' could be made final; it is only initialized in the declaration or constructor.61
Parameter 'cfg' is not assigned and could be declared final69
Use block level rather than method level synchronization84 - 89
Parameter 'config' is not assigned and could be declared final84
Avoid using Literals in Conditional Statements85
Parameter 'specUri' is not assigned and could be declared final103
Found 'DD'-anomaly for variable 'result' (lines '104'-'106').104 - 106
Local variable 'id' could be declared final107
Parameter 'uuid' is not assigned and could be declared final120
Found 'DD'-anomaly for variable 'result' (lines '121'-'123').121 - 123
Avoid if (x != y) ..; else ..;124 - 129
Avoid using Literals in Conditional Statements124
Parameter 'uuid' is not assigned and could be declared final139
Found 'DD'-anomaly for variable 'result' (lines '140'-'142').140 - 142
Avoid if (x != y) ..; else ..;143 - 147
Avoid using Literals in Conditional Statements143
Local variable 'currentTime' could be declared final157
Found 'DU'-anomaly for variable 'currentTime' (lines '157'-'174').157 - 174
Local variable 'iter' could be declared final159
Local variable 'candidates' could be declared final160
Local variable 'key' could be declared final162
Local variable 'val' could be declared final163

de/fub/mi/idenpa/sp/VerifierService.java

ViolationLine
Private field 'm_objCfg' could be made final; it is only initialized in the declaration or constructor.61
Private field 'm_strStructId' could be made final; it is only initialized in the declaration or constructor.70
Parameter 'specUri' is not assigned and could be declared final84
Parameter 'cfg' is not assigned and could be declared final84
Avoid using Literals in Conditional Statements97
Local variable 'result' could be declared final113
Parameter 'msg' is not assigned and could be declared final136
Local variable 'returnString' could be declared final139
Avoid reassigning parameters such as 'resultUri'151
Parameter 'proof' is not assigned and could be declared final151
Found 'DD'-anomaly for variable 'result' (lines '154'-'162').154 - 162
Local variable 'encs' could be declared final158
Local variable 'isValid' could be declared final160
Avoid using Literals in Conditional Statements166
Parameter 'str' is not assigned and could be declared final184
Found 'DD'-anomaly for variable 'result' (lines '187'-'189').187 - 189
Parameter 'enc' is not assigned and could be declared final207
Found 'DD'-anomaly for variable 'result' (lines '210'-'213').210 - 213
Avoid using Literals in Conditional Statements212
Found 'DD'-anomaly for variable 'result' (lines '229'-'232').229 - 232
Avoid using Literals in Conditional Statements231
Found 'DD'-anomaly for variable 'result' (lines '248'-'254').248 - 254
Avoid using Literals in Conditional Statements250
Local variable 'values' could be declared final252
Avoid using Literals in Conditional Statements253
Local variable 'iter' could be declared final255
Local variable 'key' could be declared final257
Avoid instantiating new objects inside loops260
Local variable 'result' could be declared final285
Avoid using Literals in Conditional Statements287
Local variable 'encs' could be declared final289
Parameter 'name' is not assigned and could be declared final305
Found 'DD'-anomaly for variable 'result' (lines '308'-'311').308 - 311
Local variable 'result' could be declared final327
Avoid using Literals in Conditional Statements329
Local variable 'values' could be declared final331
Local variable 'iter' could be declared final332
Local variable 'key' could be declared final334
Parameter 'resultUri' is not assigned and could be declared final350

de/fub/mi/idenpa/sp/exception/ConfigurationException.java

ViolationLine
Private field 'm_objKey' could be made final; it is only initialized in the declaration or constructor.37
Private field 'm_strVal' could be made final; it is only initialized in the declaration or constructor.40
Parameter 'value' is not assigned and could be declared final48
Parameter 'key' is not assigned and could be declared final48

de/fub/mi/idenpa/sp/exception/VerifierServiceInitException.java

ViolationLine
Parameter 't' is not assigned and could be declared final38

de/fub/mi/idenpa/sp/impl/ProverServiceClient.java

ViolationLine
Private field 'm_objRepo' could be made final; it is only initialized in the declaration or constructor.60
Parameter 'storage' is not assigned and could be declared final67
Parameter 'proofUri' is not assigned and could be declared final75
Local variable 'service' could be declared final81
Avoid if (x != y) ..; else ..;82 - 88
Avoid using Literals in Conditional Statements82
Local variable 'preq' could be declared final83
Avoid using Literals in Conditional Statements84
Parameter 'response' is not assigned and could be declared final98
Parameter 'resultUri' is not assigned and could be declared final99
Avoid using Literals in Conditional Statements107
Local variable 'uuid' could be declared final108
Local variable 'proofStr' could be declared final109
Avoid if (x != y) ..; else ..;110 - 134
Local variable 'p' could be declared final111
Found 'DU'-anomaly for variable 'p' (lines '111'-'144').111 - 144
Local variable 'service' could be declared final112
Avoid if (x != y) ..; else ..;113 - 122
Avoid using Literals in Conditional Statements113
Local variable 'pres' could be declared final114
Avoid using Literals in Conditional Statements115
Avoid using Literals in Conditional Statements125
Avoid if (x != y) ..; else ..;128 - 133
Avoid using Literals in Conditional Statements128
Parameter 'response' is not assigned and could be declared final150
Parameter 'issuerUri' is not assigned and could be declared final151
Parameter 'resultUri' is not assigned and could be declared final151
Parameter 'vClient' is not assigned and could be declared final151
Avoid using Literals in Conditional Statements158
Local variable 'pres' could be declared final159
Avoid using Literals in Conditional Statements161
Local variable 'service' could be declared final163 - 164
Local variable 'encNames' could be declared final165
Substitute calls to size() == 0 (or size() != 0) with calls to isEmpty()166
Local variable 'enc' could be declared final167 - 168
Avoid if (x != y) ..; else ..;169 - 178
Avoid using Literals in Conditional Statements169
Local variable 'vreq' could be declared final170 - 172
Avoid using Literals in Conditional Statements173

de/fub/mi/idenpa/sp/impl/VerificationServiceClient.java

ViolationLine
Private field 'm_objRepo' could be made final; it is only initialized in the declaration or constructor.56
Private field 'm_objCfg' could be made final; it is only initialized in the declaration or constructor.59
Parameter 'verifierRepo' is not assigned and could be declared final67
Parameter 'cfg' is not assigned and could be declared final68
Parameter 'enc' is not assigned and could be declared final77
Avoid reassigning parameters such as 'issuer'78
Parameter 'replyTo' is not assigned and could be declared final78
Parameter 'uuid' is not assigned and could be declared final78
Local variable 'service' could be declared final85
Avoid using Literals in Conditional Statements86
Local variable 'issuerUrl' could be declared final87 - 88
Avoid using Literals in Conditional Statements89
Avoid using Literals in Conditional Statements94
Found 'DD'-anomaly for variable 'strEnc' (lines '102'-'103').102 - 103
Parameter 'response' is not assigned and could be declared final121
Avoid using Literals in Conditional Statements128
Found 'DD'-anomaly for variable 'statusType' (lines '130'-'132').130 - 132
Found 'DD'-anomaly for variable 'statusType' (lines '130'-'134').130 - 134
Local variable 'uuid' could be declared final137
Local variable 'service' could be declared final138