The following document contains the results of PMD 4.2.2.
Violation | Line |
---|---|
Private field 'className' could be made final; it is only initialized in the declaration or constructor. | 36 |
Private field 'method' could be made final; it is only initialized in the declaration or constructor. | 37 |
Private field 'frameCount' could be made final; it is only initialized in the declaration or constructor. | 38 |
Avoid variables with short names like s | 233 |
Avoid concatenating nonliterals in a StringBuffer constructor or append(). | 235 |
Avoid appending characters as strings in StringBuffer.append. | 240 |
Avoid variables with short names like s | 247 |
Avoid appending characters as strings in StringBuffer.append. | 249 |
Avoid variables with short names like o | 267 |
Violation | Line |
---|---|
This class has too many methods, consider refactoring it. | 37 - 318 |
Private field 'activations' could be made final; it is only initialized in the declaration or constructor. | 40 |
Avoid variables with short names like o | 271 |
Avoid excessively long variable names like otherActivationList | 274 |
Violation | Line |
---|---|
Private field 'argo' could be made final; it is only initialized in the declaration or constructor. | 55 |
Private field 'model' could be made final; it is only initialized in the declaration or constructor. | 56 |
Private field 'diagrams' could be made final; it is only initialized in the declaration or constructor. | 57 |
Avoid variables with short names like n | 97 |
Caught exception is rethrown, original stack trace may be lost | 132 |
Violation | Line |
---|---|
Private field 'builder' could be made final; it is only initialized in the declaration or constructor. | 55 |
Private field 'sequenceDiagrams' could be made final; it is only initialized in the declaration or constructor. | 56 |
Violation | Line |
---|---|
Abstract classes should be named AbstractXXX | 33 - 117 |
Private field 'name' could be made final; it is only initialized in the declaration or constructor. | 34 |
Private field 'fill' could be made final; it is only initialized in the declaration or constructor. | 35 |
Private field 'fillColor' could be made final; it is only initialized in the declaration or constructor. | 36 |
Private field 'stroke' could be made final; it is only initialized in the declaration or constructor. | 37 |
Private field 'strokeColor' could be made final; it is only initialized in the declaration or constructor. | 38 |
Violation | Line |
---|---|
Private field 'description' could be made final; it is only initialized in the declaration or constructor. | 33 |
Private field 'href' could be made final; it is only initialized in the declaration or constructor. | 34 |
Private field 'figs' could be made final; it is only initialized in the declaration or constructor. | 36 |
Private field 'privateAttributes' could be made final; it is only initialized in the declaration or constructor. | 37 |
Violation | Line |
---|---|
Avoid variables with short names like x1 | 28 |
Avoid variables with short names like y1 | 28 |
Avoid variables with short names like x2 | 28 |
Avoid variables with short names like y2 | 28 |
Violation | Line |
---|---|
Avoid excessively long variable names like FIG_SEQ_LINK_CLASS | 26 |
Avoid variables with short names like x | 28 |
Avoid variables with short names like y | 28 |
Avoid unused constructor parameters such as 'y'. | 28 - 40 |
Avoid unused constructor parameters such as 'x'. | 28 - 40 |
Violation | Line |
---|---|
Avoid excessively long variable names like FIG_SEQ_OBJECT_CLASS | 33 |
Private field 'objectName' could be made final; it is only initialized in the declaration or constructor. | 36 |
Avoid variables with short names like x | 37 |
Private field 'x' could be made final; it is only initialized in the declaration or constructor. | 37 |
Avoid variables with short names like y | 38 |
Private field 'y' could be made final; it is only initialized in the declaration or constructor. | 38 |
Private field 'dynObjects' could be made final; it is only initialized in the declaration or constructor. | 39 |
Avoid excessively long variable names like dynObjectsActivation | 40 |
Private field 'dynObjectsActivation' could be made final; it is only initialized in the declaration or constructor. | 40 |
Private field 'startPortNumbers' could be made final; it is only initialized in the declaration or constructor. | 41 |
Avoid variables with short names like x | 43 |
Avoid variables with short names like y | 43 |
Avoid excessively long variable names like activationDynObject | 91 |
Violation | Line |
---|---|
Private field 'description' could be made final; it is only initialized in the declaration or constructor. | 33 |
Private field 'points' could be made final; it is only initialized in the declaration or constructor. | 34 |
Avoid variables with short names like x1 | 36 |
Avoid variables with short names like y1 | 36 |
Avoid variables with short names like x2 | 36 |
Avoid variables with short names like y2 | 37 |
Violation | Line |
---|---|
Avoid variables with short names like x1 | 31 |
Avoid variables with short names like y1 | 31 |
Avoid variables with short names like x2 | 31 |
Avoid variables with short names like y2 | 31 |
Violation | Line |
---|---|
Avoid variables with short names like x | 29 |
Avoid variables with short names like y | 30 |
Avoid variables with short names like x | 34 |
Avoid variables with short names like y | 34 |
Violation | Line |
---|---|
Avoid excessively long variable names like FIG_SEQ_STIMULUS_CLASS | 26 |
Violation | Line |
---|---|
Avoid variables with short names like x | 33 |
Avoid variables with short names like y | 34 |
Avoid variables with short names like x | 38 |
Avoid variables with short names like y | 38 |
Violation | Line |
---|---|
A class which only has private constructors should be final | 25 - 52 |
Avoid variables with short names like ON | 26 |
Private field 'value' could be made final; it is only initialized in the declaration or constructor. | 29 |
Private field 'description' could be made final; it is only initialized in the declaration or constructor. | 30 |
Violation | Line |
---|---|
A class which only has private constructors should be final | 27 - 54 |
Private field 'color' could be made final; it is only initialized in the declaration or constructor. | 31 |
Private field 'description' could be made final; it is only initialized in the declaration or constructor. | 32 |
Violation | Line |
---|---|
A class which only has private constructors should be final | 25 - 52 |
Avoid variables with short names like ON | 26 |
Private field 'value' could be made final; it is only initialized in the declaration or constructor. | 29 |
Private field 'description' could be made final; it is only initialized in the declaration or constructor. | 30 |
Violation | Line |
---|---|
A class which only has private constructors should be final | 27 - 54 |
Private field 'color' could be made final; it is only initialized in the declaration or constructor. | 31 |
Private field 'description' could be made final; it is only initialized in the declaration or constructor. | 32 |
Violation | Line |
---|---|
Avoid excessively long variable names like UML_SEQUENCE_DIAGRAM_CLASS | 65 |
Private field 'namespace' could be made final; it is only initialized in the declaration or constructor. | 72 |
Private field 'mockObjectMap' could be made final; it is only initialized in the declaration or constructor. | 73 |
Private field 'builder' could be made final; it is only initialized in the declaration or constructor. | 74 |
Private field 'figObjectMap' could be made final; it is only initialized in the declaration or constructor. | 76 |
Private field 'figObjects' could be made final; it is only initialized in the declaration or constructor. | 78 |
Private field 'figLinks' could be made final; it is only initialized in the declaration or constructor. | 79 |
Private field 'figStimuli' could be made final; it is only initialized in the declaration or constructor. | 80 |
Violation | Line |
---|---|
Private field 'namespace' could be made final; it is only initialized in the declaration or constructor. | 102 |
Private field 'diagram' could be made final; it is only initialized in the declaration or constructor. | 103 |
Private field 'addedClasses' could be made final; it is only initialized in the declaration or constructor. | 104 |
Private field 'addedObjects' could be made final; it is only initialized in the declaration or constructor. | 106 |
Avoid if (x != y) ..; else ..; | 162 - 166 |
Avoid if (x != y) ..; else ..; | 182 - 186 |
Avoid unused method parameters such as 'name'. | 193 - 207 |
Avoid if (x != y) ..; else ..; | 211 - 215 |
Violation | Line |
---|---|
A class which only has private constructors should be final | 38 - 72 |
Avoid variables with short names like sb | 52 |
Avoid variables with short names like b | 54 |
Avoid concatenating nonliterals in a StringBuffer constructor or append(). | 55 |
Violation | Line |
---|---|
Private field 'excludePattern' could be made final; it is only initialized in the declaration or constructor. | 30 |
Violation | Line |
---|---|
Private field 'classLoader' could be made final; it is only initialized in the declaration or constructor. | 62 |
Deeply nested if..then statements are hard to read | 98 - 100 |
Avoid variables with short names like m1 | 118 |
Avoid variables with short names like m2 | 118 |
Avoid variables with short names like c1 | 121 |
Avoid variables with short names like c2 | 122 |
Violation | Line |
---|---|
A high number of imports can indicate a high degree of coupling within an object. | 23 - 600 |
This class has too many methods, consider refactoring it. | 70 - 600 |
The class 'EventThread' has a Cyclomatic Complexity of 3 (Highest = 14). | 70 - 600 |
Avoid variables with short names like vm | 72 |
It is somewhat confusing to have a field name with the same name as a method | 77 |
Private field 'traceMap' could be made final; it is only initialized in the declaration or constructor. | 85 |
Avoid variables with short names like vm | 145 |
Avoid variables with short names like it | 168 |
The method 'setEventRequests' has a Cyclomatic Complexity of 14. | 194 - 262 |
Avoid if (x != y) ..; else ..; | 197 - 261 |
Avoid excessively long variable names like qualifiedMethodName | 269 |
Avoid excessively long variable names like currentBoundaryMethod | 324 |
Avoid excessively long variable names like stopWhenActivationDone | 326 |
Avoid excessively long variable names like qualifiedMethodName | 364 |
Avoid excessively long variable names like qualifiedMethodName | 399 |
Avoid unused method parameters such as 'event'. | 414 - 421 |
Avoid unused method parameters such as 'event'. | 458 - 460 |
Caught exception is rethrown, original stack trace may be lost | 483 |
The method 'handleEvent' has a Cyclomatic Complexity of 11. | 497 - 521 |
Avoid throwing raw exception types. | 519 |
Use block level rather than method level synchronization | 523 - 542 |
Avoid unused method parameters such as 'event'. | 544 - 546 |
Avoid unused method parameters such as 'event'. | 583 - 586 |
Avoid unused method parameters such as 'event'. | 588 - 593 |
Avoid variables with short names like s | 595 |
Violation | Line |
---|---|
Private field 'formatters' could be made final; it is only initialized in the declaration or constructor. | 42 |
Avoid variables with short names like s | 90 |
Violation | Line |
---|---|
This class has too many methods, consider refactoring it. | 49 - 512 |
The class 'Main' has a Cyclomatic Complexity of 4 (Highest = 24). | 49 - 512 |
Too many fields | 49 - 512 |
Private field 'attachAddress' could be made final; it is only initialized in the declaration or constructor. | 56 |
Private field 'classpath' could be made final; it is only initialized in the declaration or constructor. | 59 |
Private field 'readFilename' could be made final; it is only initialized in the declaration or constructor. | 60 |
Private field 'saveFilename' could be made final; it is only initialized in the declaration or constructor. | 61 |
Private field 'outFilename' could be made final; it is only initialized in the declaration or constructor. | 62 |
Private field 'formatter' could be made final; it is only initialized in the declaration or constructor. | 63 |
Private field 'quiet' could be made final; it is only initialized in the declaration or constructor. | 64 |
Private field 'trace' could be made final; it is only initialized in the declaration or constructor. | 65 |
Private field 'startMethod' could be made final; it is only initialized in the declaration or constructor. | 66 |
Private field 'includePatterns' could be made final; it is only initialized in the declaration or constructor. | 67 |
Private field 'stdExcludes' could be made final; it is only initialized in the declaration or constructor. | 69 |
Private field 'shouldRun' could be made final; it is only initialized in the declaration or constructor. | 70 |
The constructor 'Main' has a Cyclomatic Complexity of 24. | 100 - 165 |
Position literals first in String comparisons | 110 |
Position literals first in String comparisons | 112 |
Position literals first in String comparisons | 114 |
Position literals first in String comparisons | 116 |
Position literals first in String comparisons | 116 |
Position literals first in String comparisons | 118 |
Position literals first in String comparisons | 120 |
Position literals first in String comparisons | 122 |
Position literals first in String comparisons | 124 |
Position literals first in String comparisons | 126 |
Position literals first in String comparisons | 128 |
Position literals first in String comparisons | 130 |
Position literals first in String comparisons | 132 |
Position literals first in String comparisons | 134 |
Position literals first in String comparisons | 136 |
Avoid variables with short names like sb | 146 |
Avoid if (x != y) ..; else ..; | 177 - 183 |
Avoid if (x != y) ..; else ..; | 179 - 183 |
Avoid excessively long variable names like filteredActivations | 191 |
Avoid excessively long variable names like filteredActivations | 204 |
Avoid excessively long variable names like classExclusionFilter | 210 |
Avoid variables with short names like in | 249 |
Private field 'rootActivations' could be made final; it is only initialized in the declaration or constructor. | 312 |
Private field 'classname' could be made final; it is only initialized in the declaration or constructor. | 313 |
Private field 'arguments' could be made final; it is only initialized in the declaration or constructor. | 314 |
Private field 'attachAddress' could be made final; it is only initialized in the declaration or constructor. | 316 |
Private field 'startMethod' could be made final; it is only initialized in the declaration or constructor. | 317 |
Private field 'trace' could be made final; it is only initialized in the declaration or constructor. | 318 |
Avoid variables with short names like vm | 319 |
Private field 'includes' could be made final; it is only initialized in the declaration or constructor. | 322 |
Private field 'excludes' could be made final; it is only initialized in the declaration or constructor. | 323 |
Avoid excessively long variable names like connectorArguments | 403 |
Avoid throwing raw exception types. | 408 |
Avoid throwing raw exception types. | 410 |
A switch with less than 3 branches is inefficient, use a if statement instead. | 419 - 426 |
Avoid excessively long variable names like connectorArguments | 427 |
Avoid throwing raw exception types. | 436 |
Avoid throwing raw exception types. | 438 |
Avoid throwing raw exception types. | 440 |
Caught exception is rethrown, original stack trace may be lost | 440 - 441 |
Avoid throwing raw exception types. | 457 |
Violation | Line |
---|---|
String.indexOf(char) is faster than String.indexOf(String). | 42 |
String.indexOf(char) is faster than String.indexOf(String). | 43 |
Violation | Line |
---|---|
Avoid variables with short names like o | 92 |
Violation | Line |
---|---|
Private field 'objectMap' could be made final; it is only initialized in the declaration or constructor. | 38 |
Violation | Line |
---|---|
Avoid excessively long variable names like DEFAULT_PNG_FILE_EXTENSION | 42 |
Violation | Line |
---|---|
Private field 'activationList' could be made final; it is only initialized in the declaration or constructor. | 44 |
Avoid excessively long variable names like qualifiedClassName | 173 |
Avoid excessively long variable names like lastInnerClassSeperator | 177 |
Consider simply returning the value vs storing it in local variable 'methodName' | 185 |
Violation | Line |
---|---|
Avoid variables with short names like in | 48 |
Avoid variables with short names like in | 65 |
Violation | Line |
---|---|
This class has too many methods, consider refactoring it. | 46 - 368 |
Avoid excessively long variable names like LIFE_LINE_LEFT_MARGIN | 54 |
Avoid excessively long variable names like LIFE_LINE_TOP_MARGIN | 55 |
Avoid excessively long variable names like LIFE_LINE_EXTRA_HEIGHT | 56 |
Avoid excessively long variable names like NUM_ROWS_BETWEEN_DIAGRAMS | 57 |
Avoid excessively long variable names like EXTRA_DIAGRAM_WIDTH | 58 |
Avoid excessively long variable names like EXTRA_DIAGRAM_HEIGHT | 59 |
Avoid excessively long variable names like HEADER_LEFT_MARGIN | 60 |
Avoid excessively long variable names like HEADER_VERTICAL_SHIFT | 62 |
Avoid excessively long variable names like INDENT_FIRST_ARROW | 63 |
Avoid excessively long variable names like ARROW_VERTICAL_MARGIN | 66 |
Avoid excessively long variable names like ACTIVATION_BOX_WIDTH | 69 |
Avoid excessively long variable names like ACTIVATION_BOX_TOP_MARGIN | 70 |
Avoid excessively long variable names like ACTIVATION_BOX_BOTTOM_MARGIN | 71 |
Avoid excessively long variable names like METHOD_NAME_BOTTOM_MARGIN | 72 |
Private field 'builder' could be made final; it is only initialized in the declaration or constructor. | 74 |
Avoid excessively long variable names like groupActivationBoxes | 83 |
Avoid variables with short names like x | 170 |
Avoid variables with short names like y | 171 |
String.indexOf(char) is faster than String.indexOf(String). | 175 |
String.indexOf(char) is faster than String.indexOf(String). | 176 |
Avoid variables with short names like y | 191 |
Use equals() to compare object references. | 222 |
Avoid variables with short names like x1 | 230 |
Avoid variables with short names like y1 | 233 |
Avoid variables with short names like x2 | 234 |
Avoid variables with short names like y2 | 235 |
Avoid variables with short names like x3 | 236 |
Avoid variables with short names like y3 | 237 |
Avoid variables with short names like x4 | 238 |
Avoid variables with short names like y4 | 239 |
The String literal "stroke" appears 5 times in this file; the first occurrence is on line 245 | 245 |
Avoid variables with short names like x1 | 257 |
Avoid variables with short names like y1 | 261 |
Avoid variables with short names like x2 | 262 |
Avoid variables with short names like y2 | 265 |
Avoid variables with short names like x1 | 284 |
Avoid variables with short names like y1 | 284 |
Avoid unused method parameters such as 'y2'. | 284 - 298 |
Avoid variables with short names like x2 | 285 |
Avoid variables with short names like y2 | 285 |
Avoid variables with short names like x | 287 |
Avoid variables with short names like y | 293 |
Avoid variables with short names like x1 | 300 |
Avoid variables with short names like y1 | 300 |
Avoid variables with short names like x2 | 300 |
Avoid variables with short names like y2 | 300 |
Avoid unused method parameters such as 'y1'. | 300 - 320 |
Use equals() to compare object references. | 329 |
Avoid variables with short names like x | 330 |
Avoid variables with short names like y | 333 |
Avoid variables with short names like x1 | 353 |
Avoid variables with short names like y1 | 354 |
Avoid variables with short names like x2 | 355 |
Avoid variables with short names like y2 | 356 |
Violation | Line |
---|---|
Private field 'text' could be made final; it is only initialized in the declaration or constructor. | 34 |
Violation | Line |
---|---|
This class has too many methods, consider refactoring it. | 35 - 567 |
Consider simply returning the value vs storing it in local variable 'result' | 133 |
Consider simply returning the value vs storing it in local variable 'text' | 191 |
Consider simply returning the value vs storing it in local variable 'attributeValue' | 239 |
Avoid variables with short names like s | 308 |
The class 'NodePrinter' has a Cyclomatic Complexity of 4 (Highest = 11). | 369 - 515 |
StringBuffers can grow quite a lot, and so may become a source of memory leak (if the owning class has a long life time). | 373 |
StringBuffer constructor is initialized with size 16, but has at least 18 characters appended. | 373 |
It is somewhat confusing to have a field name with the same name as a method | 375 |
The method 'visit' has a Cyclomatic Complexity of 11. | 401 - 452 |
Avoid concatenating nonliterals in a StringBuffer constructor or append(). | 411 |
Avoid if (x != y) ..; else ..; | 412 - 420 |
StringBuffer.append is called 2 consecutive times with literal Strings. Use a single append with a single String. | 413 - 414 |
Avoid concatenating nonliterals in a StringBuffer constructor or append(). | 426 |
Avoid appending characters as strings in StringBuffer.append. | 431 |
Avoid appending characters as strings in StringBuffer.append. | 434 |
Avoid appending characters as strings in StringBuffer.append. | 479 |
Avoid variables with short names like sb | 491 |
Private field 'tag' could be made final; it is only initialized in the declaration or constructor. | 518 |
Private field 'text' could be made final; it is only initialized in the declaration or constructor. | 519 |
Document empty method | 542 - 543 |
Avoid using implementation types like 'ArrayList'; use the interface instead | 547 |
Private field 'nodes' could be made final; it is only initialized in the declaration or constructor. | 547 |