The following document contains the results of PMD 5.0.5.
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. | 10–106 |
Parameter 'javaFormat' is not assigned and could be declared final | 37 |
The String literal "%%%" appears 4 times in this file; the first occurrence is on line 50 | 50 |
Parameter 'perlFormat' is not assigned and could be declared final | 70 |
Local variable 'timeFormatPattern' could be declared final | 76 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 85 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 86 |
Violation | Line |
---|---|
Comment is too large: Line too long | 28 |
All methods are static. Consider using Singleton instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. | 34–658 |
The field name indicates a constant but its modifiers do not | 36 |
Variables should start with a lowercase character, 'MAX_FILE_SIZE' starts with uppercase character. | 36 |
Only variables that are final should contain underscores (except for underscores in standard prefix/suffix), 'MAX_FILE_SIZE' is not final. | 36 |
Avoid using redundant field initializer for 'filesScanned' | 38 |
Avoid using redundant field initializer for 'filesModified' | 39 |
Avoid using redundant field initializer for 'fileReplacements' | 40 |
Avoid unnecessary constructors - the compiler will generate these for you | 45–48 |
Parameter 'args' is not assigned and could be declared final | 54 |
System.out.print is used | 73 |
Avoid if (x != y) ..; else ..; | 79–87 |
Avoid instantiating new objects inside loops | 86 |
System.out.print is used | 117 |
Avoid printStackTrace(); use a logger call instead. | 123 |
System.out.print is used | 126 |
System.out.print is used | 127 |
System.out.print is used | 135 |
System.out.print is used | 136 |
System.out.print is used | 137 |
Parameter 'dir' is not assigned and could be declared final | 148 |
Local variable 'fileFilter' could be declared final | 152 |
Local variable 'notTargetFileFilter' could be declared final | 153 |
Local variable 'dirFilter' could be declared final | 154 |
Local variable 'files' could be declared final | 155 |
Local variable 'file' could be declared final | 156 |
Local variable 'ext' could be declared final | 162 |
Parameter 'file' is not assigned and could be declared final | 210 |
Local variable 'filename' could be declared final | 215 |
Local variable 'lastDot' could be declared final | 217 |
A method should have only one exit point, and that should be the last statement in the method | 224 |
System.out.print is used | 233 |
System.out.print is used | 244 |
A method should have only one exit point, and that should be the last statement in the method | 245 |
Parameter 'file' is not assigned and could be declared final | 256 |
Local variable 'location' could be declared final | 264 |
Local variable 'fileFilter' could be declared final | 265 |
Local variable 'dirFilter' could be declared final | 266 |
Local variable 'archiveFiles' could be declared final | 267 |
Local variable 'archiveFile' could be declared final | 268 |
Local variable 'replacement' could be declared final | 271 |
Parameter 'file' is not assigned and could be declared final | 289 |
A method should have only one exit point, and that should be the last statement in the method | 295 |
System.out.print is used | 304 |
System.out.print is used | 305 |
A method should have only one exit point, and that should be the last statement in the method | 306 |
System.out.print is used | 318 |
Avoid if (x != y) ..; else ..; | 321–329 |
System.out.print is used | 323 |
System.out.print is used | 330 |
The method unpack() has an NPath complexity of 288 | 362–445 |
Avoid reassigning parameters such as 'location' | 364 |
Avoid reassigning parameters such as 'location' | 364 |
The String literal "/" appears 4 times in this file; the first occurrence is on line 375 | 375 |
Local variable 'buf' could be declared final | 404 |
Local variable 'entryName' could be declared final | 413 |
Local variable 'newFile' could be declared final | 416 |
Avoid instantiating new objects inside loops | 416 |
Local variable 'directory' could be declared final | 417 |
Avoid using if statements without curly braces | 421–422 |
These nested if statements could be combined | 421–422 |
Avoid instantiating new objects inside loops | 425 |
Local variable 'output' could be declared final | 425 |
Avoid instantiating new objects inside loops | 426 |
Avoid variables with short names like n | 428 |
Avoid assignments in operands | 429 |
Avoid using while statements without curly braces | 429–430 |
Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 440 |
Avoid printStackTrace(); use a logger call instead. | 442 |
Local variable 'pathFile' could be declared final | 466 |
Avoid variables with short names like n | 472 |
Avoid assignments in operands | 473–477 |
Avoid reassigning parameters such as 'contents' | 495 |
Local variable 'replacement' could be declared final | 498 |
Parameter 'contents' is not assigned and could be declared final | 512 |
Parameter 'replacement' is not assigned and could be declared final | 512 |
Local variable 'matcher' could be declared final | 515 |
Avoid variables with short names like sb | 516 |
Local variable 'ignorePattern' could be declared final | 521 |
Comment is too large: Line too long | 542 |
Parameter 'string' is not assigned and could be declared final | 548 |
Avoid reassigning parameters such as 'results' | 548 |
Local variable 'components' could be declared final | 550 |
Comment is too large: Line too long | 563 |
Comment is too large: Line too long | 569 |
Comment is too large: Line too long | 571 |
Comment is too large: Line too long | 572 |
Avoid unused method parameters such as 'treatAsPackageNames'. | 575 |
Avoid unused method parameters such as 'fileName'. | 575 |
Parameter 'treatAsPackageNames' is not assigned and could be declared final | 575 |
Parameter 'fileName' is not assigned and could be declared final | 575 |
Parameter 'mappings' is not assigned and could be declared final | 575 |
Avoid unused method parameters such as 'mappings'. | 575 |
Comment is too large: Line too long | 580 |
Local variable 'replacement' could be declared final | 581 |
Comment is too large: Line too long | 627 |
Use explicit scoping instead of the default package private level | 634 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 634 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 635 |
Use explicit scoping instead of the default package private level | 635 |
Use explicit scoping instead of the default package private level | 636 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 636 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 637 |
Use explicit scoping instead of the default package private level | 637 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 638 |
Use explicit scoping instead of the default package private level | 638 |
Use explicit scoping instead of the default package private level | 639 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 639 |
Parameter 'ignorePatternsIn' is not assigned and could be declared final | 648 |
Parameter 'deleteStrIn' is not assigned and could be declared final | 648 |
Parameter 'replacement' is not assigned and could be declared final | 648 |
Parameter 'replaceWithIn' is not assigned and could be declared final | 648 |
Parameter 'regexIn' is not assigned and could be declared final | 648 |
Violation | Line |
---|---|
The class 'JavaTypeConverter' has a Cyclomatic Complexity of 11 (Highest = 21). | 17–353 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 19 |
Parameter 'commaSeparatedIgnoreList' is not assigned and could be declared final | 26 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 40 |
Use explicit scoping instead of the default package private level | 40 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 41 |
Use explicit scoping instead of the default package private level | 41 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 42 |
Use explicit scoping instead of the default package private level | 42 |
The String literal "java.lang.Integer" appears 10 times in this file; the first occurrence is on line 57 | 57 |
The String literal "int" appears 18 times in this file; the first occurrence is on line 57 | 57 |
The String literal "java.lang.String.valueOf({0})" appears 5 times in this file; the first occurrence is on line 58 | 58 |
The String literal "java.lang.String" appears 38 times in this file; the first occurrence is on line 58 | 58 |
The String literal "long" appears 24 times in this file; the first occurrence is on line 59 | 59 |
The String literal "double" appears 16 times in this file; the first occurrence is on line 60 | 60 |
The String literal "float" appears 16 times in this file; the first occurrence is on line 61 | 61 |
The String literal "boolean" appears 12 times in this file; the first occurrence is on line 62 | 62 |
The String literal "({0} == null ? null : {0}.toString())" appears 8 times in this file; the first occurrence is on line 64 | 64 |
The String literal "java.lang.Long" appears 10 times in this file; the first occurrence is on line 68 | 68 |
The String literal "java.lang.Double" appears 8 times in this file; the first occurrence is on line 79 | 79 |
The String literal "java.lang.Float" appears 8 times in this file; the first occurrence is on line 90 | 90 |
The String literal "java.math.BigInteger" appears 18 times in this file; the first occurrence is on line 101 | 101 |
The String literal "java.math.BigDecimal" appears 18 times in this file; the first occurrence is on line 111 | 111 |
The String literal "java.lang.Boolean" appears 4 times in this file; the first occurrence is on line 137 | 137 |
The String literal "{0}" appears 11 times in this file; the first occurrence is on line 148 | 148 |
The String literal "java.util.Date" appears 10 times in this file; the first occurrence is on line 151 | 151 |
The String literal "java.sql.Timestamp" appears 10 times in this file; the first occurrence is on line 153 | 153 |
The String literal "java.sql.Time" appears 8 times in this file; the first occurrence is on line 155 | 155 |
The String literal "java.sql.Date" appears 8 times in this file; the first occurrence is on line 157 | 157 |
The String literal "({0} == null ? 0 : {0}.getTime())" appears 4 times in this file; the first occurrence is on line 177 | 177 |
The String literal "java.lang.Character" appears 6 times in this file; the first occurrence is on line 186 | 186 |
The String literal "java.lang.Object" appears 12 times in this file; the first occurrence is on line 189 | 189 |
The String literal "{0} == null ? null : {0}.toString()" appears 5 times in this file; the first occurrence is on line 189 | 189 |
The String literal "char" appears 4 times in this file; the first occurrence is on line 201 | 201 |
The method typeConvert() has an NPath complexity of 329 | 215–303 |
The method 'typeConvert' has a Cyclomatic Complexity of 21. | 215–303 |
Assigning an Object to null is a code smell. Consider refactoring. | 225 |
Assigning an Object to null is a code smell. Consider refactoring. | 233 |
Local variable 'interimValue' could be declared final | 260–263 |
Local variable 'interimValue' could be declared final | 288–291 |
Variables that are final and static should be all capitals, 'javaLangList' is not all capitals. | 305 |
Avoid reassigning parameters such as 'name' | 315 |
A method should have only one exit point, and that should be the last statement in the method | 319 |
These nested if statements could be combined | 345–349 |
Useless parentheses. | 346 |
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. | 25–565 |
Variables that are final and static should be all capitals, 'logger' is not all capitals. | 29 |
A method should have only one exit point, and that should be the last statement in the method | 51 |
A method should have only one exit point, and that should be the last statement in the method | 72 |
Local variable 'part' could be declared final | 77 |
Avoid reassigning parameters such as 'string' | 100 |
Local variable 'buf' could be declared final | 105 |
Local variable 'index' could be declared final | 106 |
A method should have only one exit point, and that should be the last statement in the method | 147 |
A method should have only one exit point, and that should be the last statement in the method | 164 |
A method should have only one exit point, and that should be the last statement in the method | 210 |
Local variable 'line' could be declared final | 259 |
Avoid reassigning parameters such as 'multiLines' | 276 |
Avoid reassigning parameters such as 'multiLines' | 276 |
Local variable 'firstChar' could be declared final | 313 |
Parameter 'string' is not assigned and could be declared final | 337 |
The String literal "" appears 4 times in this file; the first occurrence is on line 340 | 340 |
Avoid reassigning parameters such as 'indentation' | 450 |
A method should have only one exit point, and that should be the last statement in the method | 469 |
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. | 28–179 |
Avoid if (x != y) ..; else ..; | 154–161 |
Local variable 'sortByNum' could be declared final | 163 |
Avoid instantiating new objects inside loops | 170 |
Violation | Line |
---|---|
A catch statement should never catch throwable since it includes errors. | 86 |
Parameter 'nullsFirst' is not assigned and could be declared final | 158 |
Private field 'value' could be made final; it is only initialized in the declaration or constructor. | 184 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 184 |
Violation | Line |
---|---|
Variables that are final and static should be all capitals, 'comparators' is not all capitals. | 34 |
A catch statement should never catch throwable since it includes errors. | 51 |
Avoid throwing raw exception types. | 53 |
Avoid using if statements without curly braces | 57 |
Avoid empty catch blocks | 57 |
Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 57 |
Assigning an Object to null is a code smell. Consider refactoring. | 58 |
Avoid using redundant field initializer for 'comparator' | 62 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 62 |
Parameter 'sortCriteria' is not assigned and could be declared final | 68 |
Parameter 'objectB' is not assigned and could be declared final | 82 |
A catch statement should never catch throwable since it includes errors. | 154 |
Avoid reassigning parameters such as 'propertyName' | 170 |
Local variable 'index' could be declared final | 176 |
Avoid if (x != y) ..; else ..; | 177–203 |
Local variable 'simpleProp' could be declared final | 179–181 |
These nested if statements could be combined | 187–195 |
A catch statement should never catch throwable since it includes errors. | 248 |
Violation | Line |
---|---|
Parameter 'objectA' is not assigned and could be declared final | 26 |
Parameter 'objectB' is not assigned and could be declared final | 27 |
Local variable 'aAsBoolean' could be declared final | 29 |
Local variable 'bAsBoolean' could be declared final | 30 |
Violation | Line |
---|---|
Parameter 'objectA' is not assigned and could be declared final | 26 |
Parameter 'objectB' is not assigned and could be declared final | 27 |
Local variable 'aAsCalendar' could be declared final | 29 |
Local variable 'bAsCalendar' could be declared final | 30 |
Violation | Line |
---|---|
Found non-transient, non-static member. Please mark as transient or provide accessors. | 18 |
Avoid using redundant field initializer for 'collator' | 18 |
Parameter 'objectA' is not assigned and could be declared final | 28 |
Parameter 'objectB' is not assigned and could be declared final | 29 |
Local variable 'aAsCharacter' could be declared final | 31 |
Local variable 'bAsCharacter' could be declared final | 32 |
Violation | Line |
---|---|
Parameter 'msg' is not assigned and could be declared final | 22 |
Violation | Line |
---|---|
Found non-transient, non-static member. Please mark as transient or provide accessors. | 18 |
Avoid using redundant field initializer for 'collator' | 18 |
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. | 16–147 |
Parameter 'word' is not assigned and could be declared final | 23 |
Avoid using if statements without curly braces | 25 |
A method should have only one exit point, and that should be the last statement in the method | 25 |
A method should have only one exit point, and that should be the last statement in the method | 34 |
Parameter 'word' is not assigned and could be declared final | 100 |
A method should have only one exit point, and that should be the last statement in the method | 102 |
Avoid using if statements without curly braces | 102 |
A method should have only one exit point, and that should be the last statement in the method | 111 |
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. | 14–226 |
Variables that are final and static should be all capitals, 'plurals' is not all capitals. | 15 |
Variables that are final and static should be all capitals, 'uncountables' is not all capitals. | 17 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 24 |
Found non-transient, non-static member. Please mark as transient or provide accessors. | 26 |
Parameter 'pattern' is not assigned and could be declared final | 32 |
Parameter 'replace' is not assigned and could be declared final | 32 |
Parameter 'regexp' is not assigned and could be declared final | 43 |
Parameter 'replace' is not assigned and could be declared final | 43 |
Parameter 'pattern' is not assigned and could be declared final | 123 |
Parameter 'strings' is not assigned and could be declared final | 133 |
Local variable 'string' could be declared final | 135 |
Parameter 'patterns' is not assigned and could be declared final | 146 |
Local variable 'string' could be declared final | 148 |
Parameter 'patterns' is not assigned and could be declared final | 159 |
Local variable 'string' could be declared final | 161 |
Parameter 'replace' is not assigned and could be declared final | 173 |
Parameter 'pattern' is not assigned and could be declared final | 173 |
Parameter 'end' is not assigned and could be declared final | 182 |
Parameter 'str' is not assigned and could be declared final | 193 |
Local variable 'pattern' could be declared final | 196 |
Local variable 'matcher' could be declared final | 198 |
A method should have only one exit point, and that should be the last statement in the method | 201 |
Local variable 'rules' could be declared final | 205 |
Local variable 'inflection' could be declared final | 206 |
Local variable 'pattern' could be declared final | 208 |
Local variable 'replace' could be declared final | 209 |
Local variable 'matcher' could be declared final | 210 |
A method should have only one exit point, and that should be the last statement in the method | 213 |