PMD Results

The following document contains the results of PMD 5.0.5.

Files

org/andromda/translation/ocl/validation/OCLCollections.java

Violation Line
This class has a bunch of public methods and attributes 1858
All methods are static. Consider using Singleton instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 25858
This class has too many methods, consider refactoring it. 25858
Parameter 'item' is not assigned and could be declared final 34
Useless parentheses. 109
Useless parentheses. 109
Useless parentheses. 156
Use bitwise inversion to invert boolean values 171
Local variable 'object' could be declared final 273
Avoid using short method names 373375
Parameter 'index' is not assigned and could be declared final 454
Parameter 'item' is not assigned and could be declared final 455
Assigning an Object to null is a code smell. Consider refactoring. 567
Avoid reassigning parameters such as 'object' 837

org/andromda/translation/ocl/validation/OCLExpressions.java

Violation Line
This class has a bunch of public methods and attributes 11090
Avoid really long classes. 91090
All methods are static. Consider using Singleton instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 101090
This class has too many methods, consider refactoring it. 101090
Useless parentheses. 20
Do not use the short type 53
Do not use the short type 54
Useless parentheses. 128
Do not use the short type 229
Do not use the short type 230
Do not use the short type 349
Do not use the short type 350
Useless parentheses. 424
Do not use the short type 462
Do not use the short type 463
Do not use the short type 644
Avoid instantiating Integer objects. Call Integer.valueOf() instead. 690
Do not use the short type 701
Avoid instantiating Short objects. Call Short.valueOf() instead 707
Do not use the short type 891
Do not use the short type 947

org/andromda/translation/ocl/validation/OCLIntrospector.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. 19173
Variables that are final and static should be all capitals, 'logger' is not all capitals. 20
Unnecessary final modifier in final class 3070
Avoid reassigning parameters such as 'feature' 32
Avoid catching NullPointerException; consider removing the cause of the NPE. 46
Avoid empty catch blocks 4649
Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 46
A catch statement that catches an exception only to rethrow it should be avoided. 5056
A catch statement should never catch throwable since it includes errors. 57
An instanceof check is being performed on the caught exception. Create a separate catch clause for this exception type. 63
Avoid reassigning parameters such as 'feature' 83
Local variable 'parenIndex' could be declared final 90
Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 97
Avoid empty catch blocks 97100
Avoid catching NullPointerException; consider removing the cause of the NPE. 97
A catch statement should never catch throwable since it includes errors. 101
Local variable 'trace' could be declared final 104
Prefer StringBuffer over += for concatenating strings 108
Unnecessary final modifier in final class 120137
A method/constructor shouldnt explicitly throw java.lang.Exception 124
Local variable 'argumentTypes' could be declared final 130
Unnecessary final modifier in final class 139155
Avoid reassigning parameters such as 'throwable' 164
Unnecessary final modifier in final class 164172
Local variable 'root' could be declared final 166

org/andromda/translation/ocl/validation/OCLIntrospectorException.java

Violation Line
Parameter 'parent' is not assigned and could be declared final 20
Parameter 'message' is not assigned and could be declared final 32

org/andromda/translation/ocl/validation/OCLPredicateFeatures.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. 1433
Variables that are final and static should be all capitals, 'features' is not all capitals. 21
Use explicit scoping instead of the default package private level 2932

org/andromda/translation/ocl/validation/OCLResultEnsurer.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. 1245
Parameter 'result' is not assigned and could be declared final 29
Parameter 'result' is not assigned and could be declared final 41

org/andromda/translation/ocl/validation/ValidationJavaTranslator.java

Violation Line
This class has a bunch of public methods and attributes 11580
Avoid really long classes. 281580
The class 'ValidationJavaTranslator' has a Cyclomatic Complexity of 2 (Highest = 21). 281580
This class has too many methods, consider refactoring it. 301580
Avoid using redundant field initializer for 'features' 31
Local variable 'featuresUri' could be declared final 37
Assigning an Object to null is a code smell. Consider refactoring. 46
A catch statement should never catch throwable since it includes errors. 48
Parameter 'node' is not assigned and could be declared final 63
Local variable 'temp' could be declared final 67
Comment is too large: Line too long 79
Parameter 'node' is not assigned and could be declared final 81
Local variable 'temp' could be declared final 86
Avoid using for statements without curly braces 8788
Comment is too large: Line too long 92
Parameter 'node' is not assigned and could be declared final 94
Local variable 'temp' could be declared final 99
Avoid using for statements without curly braces 100101
Comment is too large: Line too long 105
Parameter 'node' is not assigned and could be declared final 107
Local variable 'temp' could be declared final 110
Avoid using for statements without curly braces 111112
Comment is too large: Line too long 116
Parameter 'node' is not assigned and could be declared final 118
Comment is too large: Line too long 127
Parameter 'node' is not assigned and could be declared final 129
Parameter 'node' is not assigned and could be declared final 143
Parameter 'node' is not assigned and could be declared final 152
Parameter 'node' is not assigned and could be declared final 162
Parameter 'node' is not assigned and could be declared final 171
Parameter 'node' is not assigned and could be declared final 182
Parameter 'node' is not assigned and could be declared final 204
Local variable 'variableDeclaration' could be declared final 209
Local variable 'variableName' could be declared final 210
Local variable 'variableValue' could be declared final 215
Parameter 'node' is not assigned and could be declared final 224
Parameter 'node' is not assigned and could be declared final 234
Avoid using if...else statements without curly braces 237
Avoid using if...else statements without curly braces 239
Comment is too large: Line too long 247
Parameter 'node' is not assigned and could be declared final 249
Comment is too large: Line too long 255
Parameter 'node' is not assigned and could be declared final 257
Avoid using if statements without curly braces 261262
Local variable 'temp' could be declared final 264
Avoid using for statements without curly braces 265266
Comment is too large: Line too long 270
Parameter 'node' is not assigned and could be declared final 272
Avoid using if statements without curly braces 277278
Comment is too large: Line too long 282
Parameter 'node' is not assigned and could be declared final 284
Comment is too large: Line too long 291
Parameter 'node' is not assigned and could be declared final 293
Document empty method 294295
Comment is too large: Line too long 298
Parameter 'node' is not assigned and could be declared final 300
Document empty method 301302
Comment is too large: Line too long 305
Parameter 'node' is not assigned and could be declared final 307
Document empty method 308309
Comment is too large: Line too long 312
Parameter 'node' is not assigned and could be declared final 314
Document empty method 315316
Comment is too large: Line too long 319
Parameter 'node' is not assigned and could be declared final 321
The String literal "(" appears 4 times in this file; the first occurrence is on line 325 325
The String literal ")" appears 5 times in this file; the first occurrence is on line 327 327
Comment is too large: Line too long 345
Parameter 'node' is not assigned and could be declared final 347
Local variable 'temp' could be declared final 351
Avoid using for statements without curly braces 352353
Comment is too large: Line too long 358
Parameter 'node' is not assigned and could be declared final 360
Local variable 'expression' could be declared final 363
Local variable 'featureCall' could be declared final 368
Local variable 'featureCallExpression' could be declared final 369
Parameter 'node' is not assigned and could be declared final 390
Local variable 'type' could be declared final 392
Parameter 'node' is not assigned and could be declared final 403
Local variable 'type' could be declared final 405
Parameter 'node' is not assigned and could be declared final 421
These nested if statements could be combined 439442
Prefer StringBuffer over += for concatenating strings 441
Parameter 'featureCall' is not assigned and could be declared final 451
The String literal ",\"" appears 5 times in this file; the first occurrence is on line 456 456
Parameter 'featureCall' is not assigned and could be declared final 468
Local variable 'parameters' could be declared final 476
Comment is too large: Line too long 491
Parameter 'node' is not assigned and could be declared final 493
Parameter 'argument' is not assigned and could be declared final 504
Parameter 'navigationalPath' is not assigned and could be declared final 516
Parameter 'navigationalPath' is not assigned and could be declared final 527
Avoid if (x != y) ..; else ..; 530
Avoid really long methods. 537642
Parameter 'node' is not assigned and could be declared final 537
The method caseAFeaturePrimaryExpression() has an NPath complexity of 2412 537642
The method 'caseAFeaturePrimaryExpression' has a Cyclomatic Complexity of 21. 537642
Useless parentheses. 544
Local variable 'featureExpression' could be declared final 545
Local variable 'expression' could be declared final 551
Local variable 'unaryExpression' could be declared final 563
Use bitwise inversion to invert boolean values 596
These nested if statements could be combined 636639
The method handleArrowFeatureCall() has an NPath complexity of 3920 651745
Parameter 'featureCall' is not assigned and could be declared final 651
Local variable 'params' could be declared final 653
Local variable 'arrow' could be declared final 659660
Local variable 'resultNavigationalPath' could be declared final 669
Local variable 'featureCallName' could be declared final 681
Local variable 'parameters' could be declared final 682
Local variable 'parameterList' could be declared final 690
Local variable 'expressions' could be declared final 693
Local variable 'expression' could be declared final 711
Avoid using if statements without curly braces 724725
Parameter 'node' is not assigned and could be declared final 750
Parameter 'node' is not assigned and could be declared final 772
Parameter 'node' is not assigned and could be declared final 781
Comment is too large: Line too long 787
Parameter 'node' is not assigned and could be declared final 789
Comment is too large: Line too long 797
Parameter 'node' is not assigned and could be declared final 799
Local variable 'tails' could be declared final 806
Comment is too large: Line too long 815
Parameter 'node' is not assigned and could be declared final 817
Comment is too large: Line too long 835
Parameter 'node' is not assigned and could be declared final 837
Avoid using redundant field initializer for 'requiresBooleanConversion' 859
Found non-transient, non-static member. Please mark as transient or provide accessors. 859
Comment is too large: Line too long 862
Parameter 'node' is not assigned and could be declared final 864
Local variable 'parent' could be declared final 871
Local variable 'tails' could be declared final 875
Comment is too large: Line too long 902
Parameter 'node' is not assigned and could be declared final 904
Parameter 'node' is not assigned and could be declared final 912
Parameter 'tAnd' is not assigned and could be declared final 920
Parameter 'tOr' is not assigned and could be declared final 928
Parameter 'tXor' is not assigned and could be declared final 936
Parameter 'tImplies' is not assigned and could be declared final 944
Parameter 'tNot' is not assigned and could be declared final 955
Parameter 'tPlus' is not assigned and could be declared final 963
Parameter 'tMinus' is not assigned and could be declared final 971
Parameter 'tMult' is not assigned and could be declared final 979
Parameter 'tDiv' is not assigned and could be declared final 987
Parameter 'tEqual' is not assigned and could be declared final 995
Parameter 'tNotEqual' is not assigned and could be declared final 1003
Parameter 'tLt' is not assigned and could be declared final 1011
Parameter 'tLteq' is not assigned and could be declared final 1019
Parameter 'tGt' is not assigned and could be declared final 1027
Parameter 'tGteq' is not assigned and could be declared final 1035
Parameter 'tInv' is not assigned and could be declared final 1043
Document empty method 10441045
Parameter 'tDef' is not assigned and could be declared final 1050
Document empty method 10511052
Parameter 'tLet' is not assigned and could be declared final 1057
Document empty method 10581059
Parameter 'tColon' is not assigned and could be declared final 1064
Document empty method 10651066
Parameter 'tlBrace' is not assigned and could be declared final 1071
Parameter 'tlBracket' is not assigned and could be declared final 1079
Parameter 'tlParen' is not assigned and could be declared final 1087
Parameter 'trBrace' is not assigned and could be declared final 1095
Parameter 'trBracket' is not assigned and could be declared final 1103
Parameter 'trParen' is not assigned and could be declared final 1111
Parameter 'tContext' is not assigned and could be declared final 1119
Document empty method 11201121
Parameter 'tBoolean' is not assigned and could be declared final 1126
Comment is too large: Line too long 1132
Parameter 'tApostrophe' is not assigned and could be declared final 1134
Parameter 'tBlank' is not assigned and could be declared final 1142
Comment is too large: Line too long 1148
Parameter 'tCollection' is not assigned and could be declared final 1150
Parameter 'tSingleLineComment' is not assigned and could be declared final 1158
Parameter 'tEndif' is not assigned and could be declared final 1166
Document empty method 11671168
Parameter 'tAttr' is not assigned and could be declared final 1173
Document empty method 11741175
Parameter 'tBag' is not assigned and could be declared final 1180
Document empty method 11811182
Parameter 'tBar' is not assigned and could be declared final 1187
Document empty method 11881189
Parameter 'tBody' is not assigned and could be declared final 1194
Document empty method 11951196
Comment is too large: Line too long 1199
Parameter 'tCommercialAt' is not assigned and could be declared final 1201
Document empty method 12021203
Parameter 'tDerive' is not assigned and could be declared final 1208
Document empty method 12091210
Comment is too large: Line too long 1213
Parameter 'tEndpackage' is not assigned and could be declared final 1215
Document empty method 12161217
Parameter 'tEnum' is not assigned and could be declared final 1222
Document empty method 12231224
Parameter 'tIn' is not assigned and could be declared final 1229
Document empty method 12301231
Parameter 'tInit' is not assigned and could be declared final 1236
Document empty method 12371238
Parameter 'tInt' is not assigned and could be declared final 1243
Comment is too large: Line too long 1249
Parameter 'tIsSentOperator' is not assigned and could be declared final 1251
Document empty method 12521253
Comment is too large: Line too long 1256
Parameter 'tMessageOperator' is not assigned and could be declared final 1258
Document empty method 12591260
Parameter 'tNewLine' is not assigned and could be declared final 1265
Document empty method 12661267
Parameter 'tOper' is not assigned and could be declared final 1272
Document empty method 12731274
Comment is too large: Line too long 1277
Parameter 'tOrderedset' is not assigned and could be declared final 1279
Document empty method 12801281
Parameter 'tPackage' is not assigned and could be declared final 1286
Document empty method 12871288
Parameter 'tPost' is not assigned and could be declared final 1293
Document empty method 12941295
Parameter 'tPre' is not assigned and could be declared final 1300
Document empty method 13011302
Parameter 'tArrow' is not assigned and could be declared final 1307
Document empty method 13081309
Parameter 'tIf' is not assigned and could be declared final 1314
Parameter 'tElse' is not assigned and could be declared final 1322
Parameter 'tThen' is not assigned and could be declared final 1330
Document empty method 13311332
Parameter 'tRange' is not assigned and could be declared final 1337
Document empty method 13381339
Parameter 'tReal' is not assigned and could be declared final 1344
Parameter 'tComma' is not assigned and could be declared final 1352
Parameter 'tDot' is not assigned and could be declared final 1360
Parameter 'tSemicolon' is not assigned and could be declared final 1368
Document empty method 13691370
Parameter 'tUnknown' is not assigned and could be declared final 1375
Document empty method 13761377
Comment is too large: Line too long 1380
Parameter 'tScopeOperator' is not assigned and could be declared final 1382
Parameter 'tSequence' is not assigned and could be declared final 1390
Document empty method 13911392
Parameter 'tSet' is not assigned and could be declared final 1397
Document empty method 13981399
Parameter 'tStringLit' is not assigned and could be declared final 1405
Parameter 'tTab' is not assigned and could be declared final 1414
Document empty method 14151416
Parameter 'tTuple' is not assigned and could be declared final 1421
Document empty method 14221423
Parameter 'tTupletype' is not assigned and could be declared final 1428
Document empty method 14291430
Found non-transient, non-static member. Please mark as transient or provide accessors. 1432
Found non-transient, non-static member. Please mark as transient or provide accessors. 1438
Found non-transient, non-static member. Please mark as transient or provide accessors. 1446
Parameter 'object' is not assigned and could be declared final 1448
Parameter 'appendix' is not assigned and could be declared final 1458
Parameter 'appendix' is not assigned and could be declared final 1463
Avoid using while statements without curly braces 1494
Avoid empty while statements 1494
Parameter 'variableName' is not assigned and could be declared final 1498
Local variable 'variableMap' could be declared final 1502
A method should have only one exit point, and that should be the last statement in the method 1505
Avoid using if statements without curly braces 15181519
Parameter 'variableValue' is not assigned and could be declared final 1522
Parameter 'variableName' is not assigned and could be declared final 1522
It is a good practice to call super() in a constructor 15401543

org/andromda/translation/ocl/validation/ValidationTranslatorException.java

Violation Line
Avoid variables with short names like th 19
Parameter 'th' is not assigned and could be declared final 19
Parameter 'msg' is not assigned and could be declared final 29
Avoid variables with short names like th 40
Parameter 'msg' is not assigned and could be declared final 40
Parameter 'th' is not assigned and could be declared final 40