The following document contains the results of PMD 5.0.5.
Violation | Line |
---|---|
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. | 51 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 56 |
Comment is too large: Line too long | 66 |
Avoid using redundant field initializer for 'skipProcessing' | 85 |
Avoid instantiating new objects inside loops | 110 |
Violation | Line |
---|---|
Avoid variables with short names like cl | 41 |
Local variable 'cl' could be declared final | 41 |
System.out.print is used | 44 |
Local variable 'ucl' could be declared final | 46 |
Local variable 'urls' could be declared final | 47 |
Local variable 'url' could be declared final | 48 |
System.out.print is used | 49 |
Avoid empty catch blocks | 55–58 |
Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 55 |
System.out.print is used | 60 |
Avoid variables with short names like th | 62 |
System.out.print is used | 64 |
A catch statement should never catch throwable since it includes errors. | 69 |
An instanceof check is being performed on the caught exception. Create a separate catch clause for this exception type. | 71 |
Violation | Line |
---|---|
Avoid declaring a variable if it is unreferenced before a possible exit point. | 38 |
Local variable 'andromdapp' could be declared final | 38 |
A catch statement should never catch throwable since it includes errors. | 53 |
An instanceof check is being performed on the caught exception. Create a separate catch clause for this exception type. | 55 |
Violation | Line |
---|---|
Abstract classes should be named AbstractXXX | 16–62 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 25 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 32 |
Violation | Line |
---|---|
Found non-transient, non-static member. Please mark as transient or provide accessors. | 16 |
Private field 'bean' could be made final; it is only initialized in the declaration or constructor. | 16 |
It is a good practice to call super() in a constructor | 21–24 |
Use block level rather than method level synchronization | 29–49 |
Parameter 'key' is not assigned and could be declared final | 29 |
Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 44 |
Avoid empty catch blocks | 44–47 |
Violation | Line |
---|---|
A high number of imports can indicate a high degree of coupling within an object. | 1–588 |
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. | 51 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 56 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 66 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 73 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 80 |
Private field 'goals' could be made final; it is only initialized in the declaration or constructor. | 87 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 87 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 99 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 106 |
Private field 'executionProperties' could be made final; it is only initialized in the declaration or constructor. | 106 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 133 |
Avoid really long methods. | 138–250 |
Avoid if (x != y) ..; else ..; | 144–244 |
The String literal "" appears 5 times in this file; the first occurrence is on line 160 | 160 |
Local variable 'index' could be declared final | 161 |
Do not explicitly trigger a garbage collection. | 207 |
String.trim().length()==0 is an inefficient way to validate an empty String. | 216 |
A catch statement should never catch throwable since it includes errors. | 228 |
Avoid printStackTrace(); use a logger call instead. | 230 |
A catch statement should never catch throwable since it includes errors. | 246 |
Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 273 |
Avoid empty catch blocks | 273–276 |
System.out.print is used | 287 |
System.out.print is used | 312 |
System.out.print is used | 323 |
System.out.print is used | 332 |
Assigning an Object to null is a code smell. Consider refactoring. | 352 |
Comment is too large: Line too long | 381 |
Parameter 'sortProjects' is not assigned and could be declared final | 392 |
Local variable 'executed' could be declared final | 396 |
Avoid if (x != y) ..; else ..; | 401–428 |
A catch statement should never catch throwable since it includes errors. | 482 |
Avoid if (x != y) ..; else ..; | 513–529 |
Avoid if (x != y) ..; else ..; | 549 |
Avoid instantiating new objects inside loops | 558 |
Avoid instantiating new objects inside loops | 577 |
Violation | Line |
---|---|
Found non-transient, non-static member. Please mark as transient or provide accessors. | 27 |
Private field 'includes' could be made final; it is only initialized in the declaration or constructor. | 41 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 41 |
Private field 'excludes' could be made final; it is only initialized in the declaration or constructor. | 48 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 48 |
A catch statement should never catch throwable since it includes errors. | 109 |
Avoid instantiating new objects inside loops | 146–148 |
Violation | Line |
---|---|
A high number of imports can indicate a high degree of coupling within an object. | 1–462 |
Too many fields | 46–462 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 52 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 59 |
Private field 'includes' could be made final; it is only initialized in the declaration or constructor. | 68 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 68 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 75 |
Private field 'excludes' could be made final; it is only initialized in the declaration or constructor. | 82 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 82 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 89 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 96 |
Private field 'repositoryVariableName' could be made final; it is only initialized in the declaration or constructor. | 96 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 105 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 114 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 121 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 126 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 131 |
Private field 'classpathArtifactTypes' could be made final; it is only initialized in the declaration or constructor. | 138 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 138 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 146 |
Private field 'resolveTransitiveDependencies' could be made final; it is only initialized in the declaration or constructor. | 146 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 153 |
Private field 'skipProcessing' could be made final; it is only initialized in the declaration or constructor. | 161 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 161 |
Avoid using redundant field initializer for 'skipProcessing' | 161 |
A catch statement should never catch throwable since it includes errors. | 199 |
A method/constructor shouldnt explicitly throw java.lang.Exception | 212 |
Avoid instantiating new objects inside loops | 217 |
Private field 'projects' could be made final; it is only initialized in the declaration or constructor. | 222 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 222 |
A method/constructor shouldnt explicitly throw java.lang.Exception | 232 |
Local variable 'pom' could be declared final | 237 |
Avoid if (x != y) ..; else ..; | 243–254 |
A method/constructor shouldnt explicitly throw java.lang.Exception | 273 |
Avoid instantiating new objects inside loops | 277 |
Deeply nested if..then statements are hard to read | 322–348 |
Avoid if (x != y) ..; else ..; | 368–381 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 389 |
Avoid if (x != y) ..; else ..; | 405–421 |
Avoid instantiating new objects inside loops | 409 |
A method/constructor shouldnt explicitly throw java.lang.Exception | 433 |
Local variable 'poms' could be declared final | 447 |
Avoid instantiating new objects inside loops | 451–453 |
Violation | Line |
---|---|
Private field 'driver' could be made final; it is only initialized in the declaration or constructor. | 21 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 21 |
Parameter 'driver' is not assigned and could be declared final | 26 |
Parameter 'url' is not assigned and could be declared final | 34 |
Parameter 'url' is not assigned and could be declared final | 44 |
Parameter 'properties' is not assigned and could be declared final | 45 |
Parameter 'url' is not assigned and could be declared final | 73 |
Parameter 'properties' is not assigned and could be declared final | 74 |
Local variable 'method' could be declared final | 104 |
Avoid empty catch blocks | 107–111 |
Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 107 |
Violation | Line |
---|---|
Found non-transient, non-static member. Please mark as transient or provide accessors. | 18 |
Private field 'includes' could be made final; it is only initialized in the declaration or constructor. | 33 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 33 |
Private field 'excludes' could be made final; it is only initialized in the declaration or constructor. | 38 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 38 |
Violation | Line |
---|---|
Avoid modifiers which are implied by the context | 22 |
A method/constructor shouldnt explicitly throw java.lang.Exception | 22 |
Violation | Line |
---|---|
Parameter 'message' is not assigned and could be declared final | 18 |
Parameter 'message' is not assigned and could be declared final | 30 |
Parameter 'parent' is not assigned and could be declared final | 31 |
Parameter 'message' is not assigned and could be declared final | 41 |
Violation | Line |
---|---|
A high number of imports can indicate a high degree of coupling within an object. | 1–591 |
Too many fields | 53–591 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 61 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 69 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 76 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 83 |
Private field 'properties' could be made final; it is only initialized in the declaration or constructor. | 90 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 90 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 97 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 105 |
Private field 'executeScripts' could be made final; it is only initialized in the declaration or constructor. | 105 |
Field executeScripts has the same name as a method | 105 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 111 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 121 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 128 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 136 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 144 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 152 |
Private field 'jdbcPassword' could be made final; it is only initialized in the declaration or constructor. | 159 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 159 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 167 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 174 |
The method execute() has an NPath complexity of 328 | 179–276 |
Deeply nested if..then statements are hard to read | 208–213 |
Deeply nested if..then statements are hard to read | 226–231 |
Avoid instantiating new objects inside loops | 235 |
Assigning an Object to null is a code smell. Consider refactoring. | 246 |
A catch statement should never catch throwable since it includes errors. | 258 |
Avoid empty catch blocks | 270–273 |
Avoid if (x != y) ..; else ..; | 285 |
Avoid if (x != y) ..; else ..; | 300–319 |
Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 310 |
Avoid instantiating new objects inside loops | 352 |
Avoid if (x != y) ..; else ..; | 436 |
A method/constructor shouldnt explicitly throw java.lang.Exception | 449 |
Local variable 'driver' could be declared final | 451 |
A method/constructor shouldnt explicitly throw java.lang.Exception | 475 |
Ensure that resources like this Statement object are closed after use | 484 |
Deeply nested if..then statements are hard to read | 505–512 |
Avoid instantiating new objects inside loops | 513 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 534 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 539 |
Avoid using implementation types like 'HashMap'; use the interface instead | 569 |
Variables that are final and static should be all capitals, 'tasksCache' is not all capitals. | 569 |
Violation | Line |
---|---|
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. | 49 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 56 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 63 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 70 |
Local variable 'rootPath' could be declared final | 94 |
A catch statement should never catch throwable since it includes errors. | 114 |
These nested if statements could be combined | 158–171 |
Local variable 'fileName' could be declared final | 188 |
Avoid instantiating new objects inside loops | 190 |
Violation | Line |
---|---|
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 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 57 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 67 |
Avoid using redundant field initializer for 'isWindows' | 82 |
Avoid really long methods. | 98–239 |
The method execute() has an NPath complexity of 2597 | 98–239 |
Avoid instantiating new objects inside loops | 153–154 |
Avoid instantiating new objects inside loops | 163 |
Avoid instantiating new objects inside loops | 165–167 |
Avoid if (x != y) ..; else ..; | 169–178 |
The String literal " to " appears 4 times in this file; the first occurrence is on line 190 | 190 |
Avoid if (x != y) ..; else ..; | 204–211 |
Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 235 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 244 |
Avoid instantiating new objects inside loops | 286–288 |
A method/constructor shouldnt explicitly throw java.lang.Exception | 304 |
Local variable 'freader' could be declared final | 311 |
Avoid instantiating new objects inside loops | 311 |
Avoid instantiating new objects inside loops | 334 |
Avoid instantiating new objects inside loops | 335 |
Avoid empty catch blocks | 346–349 |
Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 346 |
Violation | Line |
---|---|
A catch statement should never catch throwable since it includes errors. | 38 |
Violation | Line |
---|---|
The class 'ClasspathWriter' has a Cyclomatic Complexity of 7 (Highest = 22). | 31–328 |
The method 'write' has a Cyclomatic Complexity of 22. | 61–267 |
The method write() has an NPath complexity of 11520 | 61–267 |
Avoid really long methods. | 61–267 |
Avoid long parameter lists. | 61–72 |
A method/constructor shouldnt explicitly throw java.lang.Exception | 73 |
Avoid if (x != y) ..; else ..; | 116–128 |
These nested if statements could be combined | 196–204 |
This call to String.startsWith can be rewritten using String.charAt(0) | 248 |
Avoid reassigning parameters such as 'rootDirectory' | 280 |
Avoid instantiating new objects inside loops | 287 |
This call to String.startsWith can be rewritten using String.charAt(0) | 293 |
Violation | Line |
---|---|
Abstract classes should be named AbstractXXX | 15–46 |
This abstract class does not have any abstract methods | 15–46 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 18 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 21 |
Consider simply returning the value vs storing it in local variable 'file' | 43 |
Violation | Line |
---|---|
Found non-transient, non-static member. Please mark as transient or provide accessors. | 17 |
Violation | Line |
---|---|
A method/constructor shouldnt explicitly throw java.lang.Exception | 35 |
Violation | Line |
---|---|
Found non-transient, non-static member. Please mark as transient or provide accessors. | 12 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 14 |
Violation | Line |
---|---|
Comment is too large: Line too long | 20 |
Local variable 'outputPath' could be declared final | 26–28 |
Violation | Line |
---|---|
Abstract classes should be named AbstractXXX | 23–271 |
The Logger variable declaration does not contain the static and final modifiers | 29 |
Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 71 |
Avoid empty catch blocks | 71–74 |
Avoid empty catch blocks | 80–83 |
Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 80 |
Avoid throwing raw exception types. | 86 |
Consider simply returning the value vs storing it in local variable 'value' | 131 |
Parameter 'connection' is not assigned and could be declared final | 175 |
Unnecessary use of fully qualified name 'java.util.Map' due to existing import 'java.util.Map' | 176 |
Parameter 'options' is not assigned and could be declared final | 176 |
A method/constructor shouldnt explicitly throw java.lang.Exception | 177 |
A method/constructor shouldnt explicitly throw java.lang.Exception | 214 |
A method/constructor shouldnt explicitly throw java.lang.Exception | 242 |
Local variable 'path' could be declared final | 263 |
Avoid instantiating new objects inside loops | 265–267 |
Violation | Line |
---|---|
Avoid excessively long variable names like HIBERNATE_PROPERTIES_TEMP_DIRECTORY | 26 |
Variables that are final and static should be all capitals, 'random' is not all capitals. | 29 |
Comment is too large: Line too long | 31 |
A method/constructor shouldnt explicitly throw java.lang.Exception | 36 |
StringBuffer constructor is initialized with size 16, but has at least 97 characters appended. | 50 |
StringBuffer (or StringBuilder).append is called 2 consecutive times with literal Strings. Use a single append with a single combined String. | 51 |
StringBuffer (or StringBuilder).append is called 2 consecutive times with literal Strings. Use a single append with a single combined String. | 52 |
Avoid using redundant field initializer for 'jdbcDriverJarLoader' | 70 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 70 |
Violation | Line |
---|---|
Avoid excessively long variable names like HIBERNATE_PROPERTIES_TEMP_DIRECTORY | 19 |
Variables that are final and static should be all capitals, 'random' is not all capitals. | 38 |
Comment is too large: Line too long | 40 |
A method/constructor shouldnt explicitly throw java.lang.Exception | 42 |
StringBuffer constructor is initialized with size 16, but has at least 127 characters appended. | 56 |
StringBuffer (or StringBuilder).append is called 2 consecutive times with literal Strings. Use a single append with a single combined String. | 57 |
StringBuffer (or StringBuilder).append is called 2 consecutive times with literal Strings. Use a single append with a single combined String. | 58 |
StringBuffer (or StringBuilder).append is called 2 consecutive times with literal Strings. Use a single append with a single combined String. | 59 |
Violation | Line |
---|---|
Found non-transient, non-static member. Please mark as transient or provide accessors. | 32 |
Unnecessary final modifier in final class | 41–49 |
Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 86 |
A catch statement should never catch throwable since it includes errors. | 140 |
Avoid printStackTrace(); use a logger call instead. | 142 |
Local variable 'argumentTypes' could be declared final | 170 |
Parameter 'ctClass' is not assigned and could be declared final | 190 |
Local variable 'name' could be declared final | 193 |
Violation | Line |
---|---|
Parameter 'message' is not assigned and could be declared final | 20 |
Parameter 'parent' is not assigned and could be declared final | 21 |
Parameter 'message' is not assigned and could be declared final | 31 |
Parameter 'parent' is not assigned and could be declared final | 41 |
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. | 19–96 |
Variables that are final and static should be all capitals, 'projectCache' is not all capitals. | 23 |
Use block level rather than method level synchronization | 34–66 |
Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 56 |
Deeply nested if..then statements are hard to read | 58–61 |
Avoid instantiating new objects inside loops | 86–88 |
Violation | Line |
---|---|
It is somewhat confusing to have a field name matching the declaring class name | 13 |
Private field 'projects' could be made final; it is only initialized in the declaration or constructor. | 13 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 13 |
Field instance has the same name as a method | 18 |
Singleton is not thread safe | 27–30 |
Use block level rather than method level synchronization | 50–53 |
Assigning an Object to null is a code smell. Consider refactoring. | 61 |
Violation | Line |
---|---|
Comment is too large: Line too long | 11 |
The class 'HelpMojo' has a Cyclomatic Complexity of 11 (Highest = 46). | 19–599 |
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 a Cyclomatic Complexity of 46. | 52–464 |
Avoid really long methods. | 52–464 |
The method execute() has an NCSS line count of 293 | 52–464 |
The method execute() has an NPath complexity of 234375000 | 52–464 |
Avoid variables with short names like sb | 66 |
Local variable 'sb' could be declared final | 66 |
The String literal "Available parameters:" appears 10 times in this file; the first occurrence is on line 88 | 88 |
The String literal "(no description available)" appears 7 times in this file; the first occurrence is on line 92 | 92 |
The String literal "Required: Yes" appears 10 times in this file; the first occurrence is on line 185 | 185 |
Parameter 'repeat' is not assigned and could be declared final | 475 |
Parameter 'str' is not assigned and could be declared final | 475 |
Local variable 'buffer' could be declared final | 477 |
Parameter 'indent' is not assigned and could be declared final | 495 |
Avoid variables with short names like sb | 495 |
Parameter 'sb' is not assigned and could be declared final | 495 |
Parameter 'description' is not assigned and could be declared final | 495 |
Local variable 'it' could be declared final | 497 |
Parameter 'text' is not assigned and could be declared final | 513 |
Parameter 'indentSize' is not assigned and could be declared final | 513 |
Parameter 'indent' is not assigned and could be declared final | 513 |
Parameter 'lineLength' is not assigned and could be declared final | 513 |
Local variable 'lines' could be declared final | 515 |
Local variable 'ind' could be declared final | 517 |
Local variable 'plainLines' could be declared final | 518 |
Parameter 'lineLength' is not assigned and could be declared final | 535 |
Parameter 'line' is not assigned and could be declared final | 535 |
Parameter 'indentSize' is not assigned and could be declared final | 535 |
Parameter 'lines' is not assigned and could be declared final | 535 |
Local variable 'lineIndent' could be declared final | 537 |
Local variable 'buf' could be declared final | 538 |
Local variable 'tokens' could be declared final | 539 |
Local variable 'token' could be declared final | 542 |
Local variable 'c' could be declared final | 558 |
Avoid variables with short names like c | 558 |
Parameter 'line' is not assigned and could be declared final | 582 |