PMD Results

The following document contains the results of PMD 5.0.5.

Files

org/andromda/maven/plugin/AbstractAndroMDAMojo.java

Violation Line
Found non-transient, non-static member. Please mark as transient or provide accessors. 37
Found non-transient, non-static member. Please mark as transient or provide accessors. 48
Found non-transient, non-static member. Please mark as transient or provide accessors. 77
Found non-transient, non-static member. Please mark as transient or provide accessors. 86
Found non-transient, non-static member. Please mark as transient or provide accessors. 93
Comment is too large: Line too long 123
A catch statement should never catch throwable since it includes errors. 131
An instanceof check is being performed on the caught exception. Create a separate catch clause for this exception type. 135
An instanceof check is being performed on the caught exception. Create a separate catch clause for this exception type. 135
A method/constructor shouldnt explicitly throw java.lang.Exception 151
Parameter 'configurationUri' is not assigned and could be declared final 156
Parameter 'project' is not assigned and could be declared final 164
Parameter 'settings' is not assigned and could be declared final 174
Parameter 'propertyFiles' is not assigned and could be declared final 184

org/andromda/maven/plugin/AndroMDAMojo.java

Violation Line
Found non-transient, non-static member. Please mark as transient or provide accessors. 30
Avoid using redundant field initializer for 'skipProcessing' 39
Found non-transient, non-static member. Please mark as transient or provide accessors. 39
Private field 'skipProcessing' could be made final; it is only initialized in the declaration or constructor. 39
Found non-transient, non-static member. Please mark as transient or provide accessors. 46
Found non-transient, non-static member. Please mark as transient or provide accessors. 54
Parameter 'lastModifiedCheck' is not assigned and could be declared final 59
Parameter 'buildSourceDirectory' is not assigned and could be declared final 67
Parameter 'modelOutputHistory' is not assigned and could be declared final 75
Local variable 'date' could be declared final 96
Deeply nested if..then statements are hard to read 99102
Avoid if (x != y) ..; else ..; 107
Local variable 'repositoryCount' could be declared final 131
Local variable 'newDate' could be declared final 142

org/andromda/maven/plugin/MagicDrawExportEMFXMIMojo.java

Violation Line
This final field could be made static 32
Found non-transient, non-static member. Please mark as transient or provide accessors. 32
Found non-transient, non-static member. Please mark as transient or provide accessors. 39
Local variable 'repositoryCount' could be declared final 55
Local variable 'uris' could be declared final 68
A catch statement should never catch throwable since it includes errors. 79
The method exportFile() has an NPath complexity of 960 85180
A method/constructor shouldnt explicitly throw java.lang.Exception 85
Parameter 'dest' is not assigned and could be declared final 85
Avoid declaring a variable if it is unreferenced before a possible exit point. 87
Avoid declaring a variable if it is unreferenced before a possible exit point. 88
A method should have only one exit point, and that should be the last statement in the method 94
New exception is thrown in catch block, original stack trace may be lost 104
New exception is thrown in catch block, original stack trace may be lost 115
New exception is thrown in catch block, original stack trace may be lost 129
Local variable 'destFile' could be declared final 132
Avoid if (x != y) ..; else ..; 133150
Local variable 'formatter' could be declared final 141
When instantiating a SimpleDateFormat object, specify a Locale 141
Local variable 'command' could be declared final 157160
Local variable 'process' could be declared final 161
Avoid variables with short names like is 165
Local variable 'is' could be declared final 165
Avoid assignments in operands 168
Avoid instantiating new objects inside loops 170
Local variable 'err' could be declared final 174
Found non-transient, non-static member. Please mark as transient or provide accessors. 185
Avoid using redundant field initializer for 'checkedMagicDraw' 185
Found non-transient, non-static member. Please mark as transient or provide accessors. 190
Found non-transient, non-static member. Please mark as transient or provide accessors. 195
Local variable 'home' could be declared final 211
Local variable 'os' could be declared final 218
Avoid variables with short names like os 218
Local variable 'pluginName115' could be declared final 225
Local variable 'pluginName116' could be declared final 226
Local variable 'pluginName15' could be declared final 227

org/andromda/maven/plugin/HelpMojo.java

Violation Line
Comment is too large: Line too long 11
The class 'HelpMojo' has a Cyclomatic Complexity of 7 (Highest = 26). 19389
Found non-transient, non-static member. Please mark as transient or provide accessors. 27
Found non-transient, non-static member. Please mark as transient or provide accessors. 34
Found non-transient, non-static member. Please mark as transient or provide accessors. 41
Found non-transient, non-static member. Please mark as transient or provide accessors. 48
The method execute() has an NCSS line count of 141 52254
The method execute() has an NPath complexity of 75000 52254
The method 'execute' has a Cyclomatic Complexity of 26. 52254
Avoid really long methods. 52254
Local variable 'sb' could be declared final 66
Avoid variables with short names like sb 66
The String literal "" appears 34 times in this file; the first occurrence is on line 69 69
The String literal "Available parameters:" appears 5 times in this file; the first occurrence is on line 88 88
The String literal "allowMultipleRuns (Default: false)" appears 4 times in this file; the first occurrence is on line 91 91
The String literal "Do we allow the code generation to run multiple times? Yes for AndroMDA server, no for all other cases unless overridden. This prevents multiple code generation runs while creating site documentation, generate-sources phase can run more than 8 times for each model when initiated by many of the reporting plugins." appears 4 times in this file; the first occurrence is on line 92 92
The String literal "Required: Yes" appears 8 times in this file; the first occurrence is on line 93 93
The String literal "configurationUri" appears 4 times in this file; the first occurrence is on line 96 96
The String literal "This is the URI to the AndroMDA configuration file." appears 4 times in this file; the first occurrence is on line 97 97
The String literal "Expression: file:${project.basedir}/conf/andromda.xml" appears 4 times in this file; the first occurrence is on line 99 99
The String literal "propertyFiles" appears 4 times in this file; the first occurrence is on line 107 107
The String literal "(no description available)" appears 4 times in this file; the first occurrence is on line 108 108
The String literal "Expression: ${project.build.filters}" appears 4 times in this file; the first occurrence is on line 109 109
Parameter 'repeat' is not assigned and could be declared final 265
Parameter 'str' is not assigned and could be declared final 265
Local variable 'buffer' could be declared final 267
Avoid variables with short names like sb 285
Parameter 'sb' is not assigned and could be declared final 285
Parameter 'description' is not assigned and could be declared final 285
Parameter 'indent' is not assigned and could be declared final 285
Local variable 'it' could be declared final 287
Parameter 'indent' is not assigned and could be declared final 303
Parameter 'indentSize' is not assigned and could be declared final 303
Parameter 'lineLength' is not assigned and could be declared final 303
Parameter 'text' is not assigned and could be declared final 303
Local variable 'lines' could be declared final 305
Local variable 'ind' could be declared final 307
Local variable 'plainLines' could be declared final 308
Parameter 'line' is not assigned and could be declared final 325
Parameter 'lines' is not assigned and could be declared final 325
Parameter 'indentSize' is not assigned and could be declared final 325
Parameter 'lineLength' is not assigned and could be declared final 325
Local variable 'lineIndent' could be declared final 327
Local variable 'buf' could be declared final 328
Local variable 'tokens' could be declared final 329
Local variable 'token' could be declared final 332
Local variable 'c' could be declared final 348
Avoid variables with short names like c 348
Parameter 'line' is not assigned and could be declared final 372