PMD Results

The following document contains the results of PMD 4.3.

Files

de/fub/mi/idenpa/client/I_IssuanceServiceClient.java

ViolationLine
Avoid modifiers which are implied by the context47
Avoid modifiers which are implied by the context56
Avoid modifiers which are implied by the context64

de/fub/mi/idenpa/client/I_ProverService.java

ViolationLine
Avoid modifiers which are implied by the context44 - 45
Avoid modifiers which are implied by the context57
Avoid modifiers which are implied by the context65

de/fub/mi/idenpa/client/I_RevocationServiceClient.java

ViolationLine
Avoid modifiers which are implied by the context46
Avoid modifiers which are implied by the context55

de/fub/mi/idenpa/client/I_UICallbackInvoker.java

ViolationLine
Avoid modifiers which are implied by the context45
Avoid modifiers which are implied by the context54

de/fub/mi/idenpa/client/UICallbackResult.java

ViolationLine
Parameter 't' is not assigned and could be declared final49
Parameter 'errorMsg' is not assigned and could be declared final49
Parameter 'resultData' is not assigned and could be declared final59

de/fub/mi/idenpa/client/impl/IssuanceServiceClient.java

ViolationLine
Private field 'm_objMgr' could be made final; it is only initialized in the declaration or constructor.56
Parameter 'msStore' is not assigned and could be declared final65
Parameter 'credStore' is not assigned and could be declared final66
Parameter 'tmpStore' is not assigned and could be declared final66
Parameter 'request' is not assigned and could be declared final75
Local variable 'dr' could be declared final81
Avoid using Literals in Conditional Statements82
Parameter 'request' is not assigned and could be declared final102
Local variable 'ir' could be declared final108
Avoid using Literals in Conditional Statements109
Parameter 'response' is not assigned and could be declared final125
Local variable 'ir' could be declared final131
Avoid using Literals in Conditional Statements132

de/fub/mi/idenpa/client/impl/ProverService.java

ViolationLine
Private field 'm_objMgr' could be made final; it is only initialized in the declaration or constructor.56
Parameter 'msStore' is not assigned and could be declared final65
Parameter 'credStore' is not assigned and could be declared final66
Parameter 'proofStore' is not assigned and could be declared final66
Parameter 'request' is not assigned and could be declared final74
Found 'DD'-anomaly for variable 'result' (lines '77'-'79').77 - 79
Parameter 'parser' is not assigned and could be declared final92
Local variable 'resp' could be declared final98
Avoid using Literals in Conditional Statements99
Parameter 'request' is not assigned and could be declared final116
Parameter 'callbackInvoker' is not assigned and could be declared final117
Local variable 'parser' could be declared final123
Local variable 'uiresult' could be declared final124 - 125
Local variable 'presp' could be declared final128 - 129
Avoid using Literals in Conditional Statements130
Avoid empty if statements133 - 135

de/fub/mi/idenpa/client/impl/RevocationServiceClient.java

ViolationLine
The class 'RevocationServiceClient' has a Cyclomatic Complexity of 5 (Highest = 10).50 - 159
Private field 'm_objProver' could be made final; it is only initialized in the declaration or constructor.57
Private field 'm_objCredStore' could be made final; it is only initialized in the declaration or constructor.60
Parameter 'proverService' is not assigned and could be declared final68
Parameter 'credStore' is not assigned and could be declared final69
Parameter 'request' is not assigned and could be declared final78
Parameter 'callbackInvoker' is not assigned and could be declared final79
Local variable 'preq' could be declared final90
Local variable 'presp' could be declared final97 - 98
Avoid using Literals in Conditional Statements100
The method 'revoke' has a Cyclomatic Complexity of 10.123 - 157
Parameter 'values' is not assigned and could be declared final123
Parameter 'pkUri' is not assigned and could be declared final123
Found 'DD'-anomaly for variable 'result' (lines '126'-'148').126 - 148
Substitute calls to size() == 0 (or size() != 0) with calls to isEmpty()128
Local variable 'creds' could be declared final129
Found 'DD'-anomaly for variable 'foundCert' (lines '134'-'138').134 - 138
Local variable 'val' could be declared final136
Deeply nested if..then statements are hard to read137 - 140
Deeply nested if..then statements are hard to read142 - 150

de/fub/mi/idenpa/client/workflow/IssuanceManager.java

ViolationLine
Private field 'm_objCredStore' could be made final; it is only initialized in the declaration or constructor.62
Private field 'm_objMsStore' could be made final; it is only initialized in the declaration or constructor.65
Private field 'm_objTmpStore' could be made final; it is only initialized in the declaration or constructor.68
Parameter 'credStore' is not assigned and could be declared final81
Parameter 'tmpStore' is not assigned and could be declared final81
Parameter 'msStorage' is not assigned and could be declared final81
Parameter 'request' is not assigned and could be declared final96
Local variable 'cred' could be declared final98
Local variable 'replyTo' could be declared final99
Local variable 'ipk' could be declared final100
Local variable 'gp' could be declared final101
Local variable 'returnIssueDataRequestType' could be declared final109 - 110
Parameter 'request' is not assigned and could be declared final123
Found 'DD'-anomaly for variable 'result' (lines '125'-'153').125 - 153
Local variable 'nonce' could be declared final127
Local variable 'replyTo' could be declared final128
Local variable 'serviceId' could be declared final129
Local variable 'attribData' could be declared final135
If you run in Java5 and have concurrent access, you should use ConcurrentHashMap implementation137
Found 'DD'-anomaly for variable 'attributes' (lines '137'-'146').137 - 146
Local variable 'encs' could be declared final139
Local variable 'value' could be declared final141
Local variable 'key' could be declared final142
Found 'DD'-anomaly for variable 'resultMsg' (lines '151'-'152').151 - 152
Parameter 'content' is not assigned and could be declared final171
Found 'DD'-anomaly for variable 'result' (lines '174'-'185').174 - 185
Avoid using Literals in Conditional Statements182

de/fub/mi/idenpa/client/workflow/IssueContext.java

ViolationLine
This class has too many methods, consider refactoring it.66 - 548
Too many fields66 - 548
Parameter 'replyTo' is not assigned and could be declared final138
Parameter 'cred' is not assigned and could be declared final138
Parameter 'ipk' is not assigned and could be declared final138
Parameter 'gp' is not assigned and could be declared final138
Parameter 'tmpStorage' is not assigned and could be declared final139
Parameter 'msStorage' is not assigned and could be declared final139
Parameter 's' is not assigned and could be declared final171
Found 'DD'-anomaly for variable 'result' (lines '174'-'177').174 - 177
Found 'DD'-anomaly for variable 'masterSecret' (lines '198'-'200').198 - 200
Avoid using Literals in Conditional Statements204
Found 'DU'-anomaly for variable 'masterSecret' (lines '205'-'212').205 - 212
Local variable 'returnString' could be declared final222
Parameter 'nonce' is not assigned and could be declared final245
Found 'DD'-anomaly for variable 'result' (lines '248'-'272').248 - 272
Local variable 'masterSecret' could be declared final251
Local variable 'values' could be declared final252
Local variable 'iter' could be declared final256
Local variable 'key' could be declared final258
Local variable 'value' could be declared final259
Local variable 'mapVal' could be declared final266
Local variable 'msg' could be declared final268
Local variable 'oresult' could be declared final271
Avoid using Literals in Conditional Statements292
Parameter 'message' is not assigned and could be declared final305
Found 'DD'-anomaly for variable 'result' (lines '308'-'312').308 - 312
Local variable 'msg' could be declared final310
Avoid using Literals in Conditional Statements311
Avoid using Literals in Conditional Statements313
Local variable 'attribs' could be declared final314
Deeply nested if..then statements are hard to read315 - 324
Avoid using Literals in Conditional Statements315
Local variable 'iter' could be declared final316
Local variable 'attrib' could be declared final318
Local variable 'returnString' could be declared final345
Local variable 'returnString' could be declared final358
Parameter 'values' is not assigned and could be declared final369
Local variable 'returnString' could be declared final398
Parameter 'contentAsB64' is not assigned and could be declared final408
Parameter 'storage' is not assigned and could be declared final421
Local variable 'skFile' could be declared final435
Local variable 'pkFile' could be declared final436
Local variable 'sysParams' could be declared final438
Local variable 'skUri' could be declared final439
Local variable 'pkUri' could be declared final440
Local variable 'result' could be declared final459
Avoid if (x != y) ..; else ..;462 - 471
Avoid using Literals in Conditional Statements462
Local variable 'idm' could be declared final464
Parameter 'nonce' is not assigned and could be declared final496
Parameter 'serviceID' is not assigned and could be declared final509
Parameter 'enc' is not assigned and could be declared final535
Found 'DD'-anomaly for variable 'result' (lines '538'-'540').538 - 540
Avoid using Literals in Conditional Statements539

de/fub/mi/idenpa/client/workflow/ProveContext.java

ViolationLine
The class 'ProveContext' has a Cyclomatic Complexity of 3 (Highest = 20).62 - 449
Private field 'm_objProofUri' could be made final; it is only initialized in the declaration or constructor.69
Private field 'm_objCredStore' could be made final; it is only initialized in the declaration or constructor.75
Private field 'm_objMsStore' could be made final; it is only initialized in the declaration or constructor.84
Private field 'm_strNonce' could be made final; it is only initialized in the declaration or constructor.87
Private field 'm_objReplyTo' could be made final; it is only initialized in the declaration or constructor.90
Parameter 'replyTo' is not assigned and could be declared final105
Parameter 'nonce' is not assigned and could be declared final105
Parameter 'proof' is not assigned and could be declared final105
Parameter 'msStorage' is not assigned and could be declared final106
Parameter 'storage' is not assigned and could be declared final106
Parameter 'replyTo' is not assigned and could be declared final126
Parameter 'nonce' is not assigned and could be declared final126
Parameter 'proof' is not assigned and could be declared final126
Parameter 'msStorage' is not assigned and could be declared final127
Parameter 'storage' is not assigned and could be declared final127
Avoid unused private methods such as 'parseUri(String)'.143
Parameter 's' is not assigned and could be declared final143
Found 'DD'-anomaly for variable 'result' (lines '146'-'149').146 - 149
Avoid using Literals in Conditional Statements175
Avoid using Literals in Conditional Statements179
Avoid using Literals in Conditional Statements183
Avoid using Literals in Conditional Statements191
Local variable 'returnProof' could be declared final209
Avoid really long methods.222 - 342
The method 'createProof' has a Cyclomatic Complexity of 20.222 - 342
Parameter 'nonce' is not assigned and could be declared final222
Local variable 'masterSecret' could be declared final227
Local variable 'credMap' could be declared final230
Found 'DU'-anomaly for variable 'credMap' (lines '230'-'342').230 - 342
Local variable 'vencMap' could be declared final231
Found 'DU'-anomaly for variable 'vencMap' (lines '231'-'342').231 - 342
Local variable 'credPkMap' could be declared final234
Found 'DU'-anomaly for variable 'credPkMap' (lines '234'-'342').234 - 342
Found 'DU'-anomaly for variable 'hasVe' (lines '237'-'342').237 - 342
Found 'DD'-anomaly for variable 'hasVe' (lines '237'-'264').237 - 264
Avoid using Literals in Conditional Statements238
Local variable 'pred' could be declared final242
Local variable 'clpred' could be declared final244
Local variable 'credUri' could be declared final245 - 246
Local variable 'ipkUri' could be declared final247 - 248
Local variable 'credInst' could be declared final249 - 250
Avoid if (x != y) ..; else ..;251 - 261
Avoid using Literals in Conditional Statements251
Local variable 'tmpName' could be declared final252
Found 'DU'-anomaly for variable 'hasVe' (lines '264'-'342').264 - 342
Found 'DD'-anomaly for variable 'hasVe' (lines '264'-'264').264
Local variable 'pred' could be declared final272
Local variable 'verpred' could be declared final275
Local variable 'credPkUri' could be declared final278
Local variable 'name' could be declared final281
Local variable 'cred' could be declared final282
Deeply nested if..then statements are hard to read285 - 301
Local variable 'value' could be declared final288 - 289
Avoid using Literals in Conditional Statements290
Local variable 'pkUri' could be declared final291 - 292
Local variable 'label' could be declared final293
Local variable 'pk' could be declared final294
Local variable 'random' could be declared final295
Local variable 'vencName' could be declared final296
Local variable 'enc' could be declared final297 - 298
Avoid instantiating new objects inside loops297 - 298
Substitute calls to size() == 0 (or size() != 0) with calls to isEmpty()314
Avoid using Literals in Conditional Statements314
Local variable 'returnString' could be declared final364
Found 'DD'-anomaly for variable 'result' (lines '389'-'391').389 - 391
Local variable 'returnString' could be declared final405
Avoid using Literals in Conditional Statements418
Parameter 'storage' is not assigned and could be declared final430

de/fub/mi/idenpa/client/workflow/ProverManager.java

ViolationLine
Private field 'm_objCredStore' could be made final; it is only initialized in the declaration or constructor.53
Private field 'm_objMsStore' could be made final; it is only initialized in the declaration or constructor.56
Private field 'm_objProofStore' could be made final; it is only initialized in the declaration or constructor.59
Parameter 'credStore' is not assigned and could be declared final72
Parameter 'proofStore' is not assigned and could be declared final72
Parameter 'msStorage' is not assigned and could be declared final72
Parameter 'request' is not assigned and could be declared final86
Found 'DD'-anomaly for variable 'result' (lines '89'-'106').89 - 106
Local variable 'nonce' could be declared final91
Local variable 'replyTo' could be declared final92
Local variable 'proofSpec' could be declared final93
Found 'DD'-anomaly for variable 'proof' (lines '97'-'100').97 - 100
Found 'DD'-anomaly for variable 'error' (lines '98'-'104').98 - 104
Parameter 'parser' is not assigned and could be declared final123
Found 'DD'-anomaly for variable 'result' (lines '126'-'132').126 - 132
Local variable 'resultMsg' could be declared final131

de/fub/mi/idenpa/client/workflow/exception/ConditionFailureException.java

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

de/fub/mi/idenpa/client/workflow/exception/IdenpaException.java

ViolationLine
Document empty constructor36
It is a good practice to call super() in a constructor36
Parameter 's' is not assigned and could be declared final43
Parameter 't' is not assigned and could be declared final52

de/fub/mi/idenpa/client/workflow/exception/InputParameterException.java

ViolationLine
Private field 'm_numType' could be made final; it is only initialized in the declaration or constructor.49
Parameter 's' is not assigned and could be declared final57
Parameter 'type' is not assigned and could be declared final57

de/fub/mi/idenpa/client/workflow/exception/RecipentInitializationException.java

ViolationLine
Parameter 't' is not assigned and could be declared final39
Parameter 's' is not assigned and could be declared final48