PMD Results

The following document contains the results of PMD 4.3.

Files

net/sourceforge/pmd/RuleSet.java

ViolationLine
A catch statement that catches an exception only to rethrow it should be avoided.221 - 223
A catch statement should never catch throwable since it includes errors.223

net/sourceforge/pmd/cli/PMDCommandLineInterface.java

ViolationLine
Avoid unused imports such as 'net.sourceforge.pmd.lang.LanguageVersion'11

net/sourceforge/pmd/cli/PMDParameters.java

ViolationLine
Avoid unused imports such as 'com.beust.jcommander.IParameterValidator'11

net/sourceforge/pmd/cpd/CsTokenizer.java

ViolationLine
No need to call String.valueOf to append to a string.54
No need to call String.valueOf to append to a string.62
No need to call String.valueOf to append to a string.62
No need to call String.valueOf to append to a string.67
No need to call String.valueOf to append to a string.67
No need to call String.valueOf to append to a string.85
No need to call String.valueOf to append to a string.85
No need to call String.valueOf to append to a string.103

net/sourceforge/pmd/cpd/JavaTokenizer.java

ViolationLine
Avoid unused local variables such as 'popped'.129
Avoid empty while statements130

net/sourceforge/pmd/dcd/graph/MemberNode.java

ViolationLine
Avoid unused private fields such as 'decoration'.26

net/sourceforge/pmd/lang/ast/AbstractNode.java

ViolationLine
JUnit 4 tests that execute tests should use the @Test annotation111 - 113
JUnit 4 tests that execute tests should use the @Test annotation127 - 129
JUnit 4 tests that execute tests should use the @Test annotation135 - 137
JUnit 4 tests that execute tests should use the @Test annotation143 - 145

net/sourceforge/pmd/lang/ast/xpath/saxon/AbstractNodeInfo.java

ViolationLine
Ensure you override both equals() and hashCode()105

net/sourceforge/pmd/lang/dfa/SequenceChecker.java

ViolationLine
Avoid unused private fields such as 'type'.33

net/sourceforge/pmd/lang/ecmascript/ast/EcmascriptTreeBuilder.java

ViolationLine
Avoid unused local variables such as 'problemStart'.220

net/sourceforge/pmd/lang/java/rule/comments/CommentContentRule.java

ViolationLine
Perhaps 'wordsAreRegex' could be replaced by a local variable.30
Avoid unused private fields such as 'wordsAreRegex'.30

net/sourceforge/pmd/lang/java/rule/comments/CommentRequiredRule.java

ViolationLine
Perhaps 'label' could be replaced by a local variable.17

net/sourceforge/pmd/lang/java/rule/comments/HeaderCommentsRule.java

ViolationLine
Perhaps 'label' could be replaced by a local variable.30

net/sourceforge/pmd/lang/java/rule/logging/MoreThanOneLoggerRule.java

ViolationLine
A catch statement should never catch throwable since it includes errors.27
A catch statement should never catch throwable since it includes errors.33

net/sourceforge/pmd/lang/java/typeresolution/ClassTypeResolver.java

ViolationLine
A catch statement should never catch throwable since it includes errors.663

net/sourceforge/pmd/lang/java/typeresolution/PMDASMClassLoader.java

ViolationLine
Avoid unused imports such as 'java.util.Collections'8

net/sourceforge/pmd/lang/ast/JavaCharStream.java

ViolationLine
A catch statement should never catch throwable since it includes errors.126

net/sourceforge/pmd/lang/ast/SimpleCharStream.java

ViolationLine
A catch statement should never catch throwable since it includes errors.78

net/sourceforge/pmd/lang/ast/TokenMgrError.java

ViolationLine
Overriding method merely calls super117 - 119

net/sourceforge/pmd/lang/java/ast/JavaParser.java

ViolationLine
Avoid unused imports such as 'net.sourceforge.pmd.PMD'4
Avoid unused imports such as 'net.sourceforge.pmd.lang.ast.TokenMgrError'6
An empty statement (semicolon) not part of a loop133
An empty statement (semicolon) not part of a loop139
An empty statement (semicolon) not part of a loop166
An empty statement (semicolon) not part of a loop180
An empty statement (semicolon) not part of a loop188
A catch statement should never catch throwable since it includes errors.195
An empty statement (semicolon) not part of a loop227
A catch statement should never catch throwable since it includes errors.238
An empty statement (semicolon) not part of a loop273
An empty statement (semicolon) not part of a loop284
A catch statement should never catch throwable since it includes errors.287
An empty statement (semicolon) not part of a loop318
A catch statement should never catch throwable since it includes errors.433
An empty statement (semicolon) not part of a loop483
An empty statement (semicolon) not part of a loop504
An empty statement (semicolon) not part of a loop512
An empty statement (semicolon) not part of a loop520
A catch statement should never catch throwable since it includes errors.523
Avoid unused local variables such as 'extendsMoreThanOne'.548
An empty statement (semicolon) not part of a loop556
A catch statement should never catch throwable since it includes errors.566
An empty statement (semicolon) not part of a loop599
A catch statement should never catch throwable since it includes errors.608
An empty statement (semicolon) not part of a loop652
A catch statement should never catch throwable since it includes errors.655
An empty statement (semicolon) not part of a loop690
An empty statement (semicolon) not part of a loop702
An empty statement (semicolon) not part of a loop711
An empty statement (semicolon) not part of a loop724
An empty statement (semicolon) not part of a loop732
An empty statement (semicolon) not part of a loop767
An empty statement (semicolon) not part of a loop778
A catch statement should never catch throwable since it includes errors.781
An empty statement (semicolon) not part of a loop816
An empty statement (semicolon) not part of a loop824
A catch statement should never catch throwable since it includes errors.826
An empty statement (semicolon) not part of a loop860
A catch statement should never catch throwable since it includes errors.870
An empty statement (semicolon) not part of a loop905
A catch statement should never catch throwable since it includes errors.907
An empty statement (semicolon) not part of a loop940
A catch statement should never catch throwable since it includes errors.949
An empty statement (semicolon) not part of a loop1007
A catch statement should never catch throwable since it includes errors.1016
A catch statement should never catch throwable since it includes errors.1115
An empty statement (semicolon) not part of a loop1148
A catch statement should never catch throwable since it includes errors.1158
An empty statement (semicolon) not part of a loop1193
A catch statement should never catch throwable since it includes errors.1195
An empty statement (semicolon) not part of a loop1227
A catch statement should never catch throwable since it includes errors.1294
An empty statement (semicolon) not part of a loop1356
An empty statement (semicolon) not part of a loop1366
An empty statement (semicolon) not part of a loop1374
A catch statement should never catch throwable since it includes errors.1377
An empty statement (semicolon) not part of a loop1410
An empty statement (semicolon) not part of a loop1421
A catch statement should never catch throwable since it includes errors.1435
An empty statement (semicolon) not part of a loop1471
A catch statement should never catch throwable since it includes errors.1480
An empty statement (semicolon) not part of a loop1525
An empty statement (semicolon) not part of a loop1537
A catch statement should never catch throwable since it includes errors.1540
An empty statement (semicolon) not part of a loop1572
An empty statement (semicolon) not part of a loop1597
An empty statement (semicolon) not part of a loop1614
A catch statement should never catch throwable since it includes errors.1617
An empty statement (semicolon) not part of a loop1651
An empty statement (semicolon) not part of a loop1662
An empty statement (semicolon) not part of a loop1668
An empty statement (semicolon) not part of a loop1673
A catch statement should never catch throwable since it includes errors.1683
An empty statement (semicolon) not part of a loop1750
An empty statement (semicolon) not part of a loop1758
A catch statement should never catch throwable since it includes errors.1771
An empty statement (semicolon) not part of a loop1805
A catch statement should never catch throwable since it includes errors.1808
A catch statement should never catch throwable since it includes errors.1858
An empty statement (semicolon) not part of a loop1901
An empty statement (semicolon) not part of a loop1912
A catch statement should never catch throwable since it includes errors.1926
An empty statement (semicolon) not part of a loop1959
An empty statement (semicolon) not part of a loop1964
An empty statement (semicolon) not part of a loop1974
A catch statement should never catch throwable since it includes errors.1980
An empty statement (semicolon) not part of a loop2015
A catch statement should never catch throwable since it includes errors.2038
An empty statement (semicolon) not part of a loop2086
A catch statement should never catch throwable since it includes errors.2094
A catch statement should never catch throwable since it includes errors.2135
A catch statement should never catch throwable since it includes errors.2249
An empty statement (semicolon) not part of a loop2284
An empty statement (semicolon) not part of a loop2313
A catch statement should never catch throwable since it includes errors.2322
An empty statement (semicolon) not part of a loop2371
A catch statement should never catch throwable since it includes errors.2373
An empty statement (semicolon) not part of a loop2502
A catch statement should never catch throwable since it includes errors.2504
An empty statement (semicolon) not part of a loop2536
A catch statement should never catch throwable since it includes errors.2545
An empty statement (semicolon) not part of a loop2577
A catch statement should never catch throwable since it includes errors.2586
An empty statement (semicolon) not part of a loop2618
A catch statement should never catch throwable since it includes errors.2627
An empty statement (semicolon) not part of a loop2659
A catch statement should never catch throwable since it includes errors.2668
An empty statement (semicolon) not part of a loop2700
A catch statement should never catch throwable since it includes errors.2709
An empty statement (semicolon) not part of a loop2742
A catch statement should never catch throwable since it includes errors.2764
An empty statement (semicolon) not part of a loop2799
A catch statement should never catch throwable since it includes errors.2801
An empty statement (semicolon) not part of a loop2836
A catch statement should never catch throwable since it includes errors.2866
An empty statement (semicolon) not part of a loop2897
A catch statement should never catch throwable since it includes errors.2919
An empty statement (semicolon) not part of a loop2952
A catch statement should never catch throwable since it includes errors.2974
An empty statement (semicolon) not part of a loop3008
A catch statement should never catch throwable since it includes errors.3034
A catch statement should never catch throwable since it includes errors.3117
A catch statement should never catch throwable since it includes errors.3146
A catch statement should never catch throwable since it includes errors.3175
A catch statement should never catch throwable since it includes errors.3258
An empty statement (semicolon) not part of a loop3371
A catch statement should never catch throwable since it includes errors.3373
A catch statement should never catch throwable since it includes errors.3419
An empty statement (semicolon) not part of a loop3450
A catch statement should never catch throwable since it includes errors.3456
A catch statement should never catch throwable since it includes errors.3489
Avoid unused local variables such as 't'.3514
A catch statement should never catch throwable since it includes errors.3565
A catch statement should never catch throwable since it includes errors.3629
A catch statement should never catch throwable since it includes errors.3700
An empty statement (semicolon) not part of a loop3803
A catch statement should never catch throwable since it includes errors.3806
An empty statement (semicolon) not part of a loop3838
A catch statement should never catch throwable since it includes errors.3847
An empty statement (semicolon) not part of a loop3889
An empty statement (semicolon) not part of a loop3903
A catch statement should never catch throwable since it includes errors.3918
An empty statement (semicolon) not part of a loop3956
An empty statement (semicolon) not part of a loop3964
An empty statement (semicolon) not part of a loop3980
A catch statement should never catch throwable since it includes errors.3995
A catch statement should never catch throwable since it includes errors.4103
A catch statement should never catch throwable since it includes errors.4134
An empty statement (semicolon) not part of a loop4165
A catch statement should never catch throwable since it includes errors.4175
An empty statement (semicolon) not part of a loop4216
A catch statement should never catch throwable since it includes errors.4223
An empty statement (semicolon) not part of a loop4255
An empty statement (semicolon) not part of a loop4281
A catch statement should never catch throwable since it includes errors.4290
An empty statement (semicolon) not part of a loop4385
A catch statement should never catch throwable since it includes errors.4395
An empty statement (semicolon) not part of a loop4432
An empty statement (semicolon) not part of a loop4442
A catch statement should never catch throwable since it includes errors.4450
A catch statement should never catch throwable since it includes errors.4493
An empty statement (semicolon) not part of a loop4533
A catch statement should never catch throwable since it includes errors.4538
A catch statement should never catch throwable since it includes errors.4570
A catch statement should never catch throwable since it includes errors.4604
An empty statement (semicolon) not part of a loop4698
An empty statement (semicolon) not part of a loop4734
An empty statement (semicolon) not part of a loop4766
A catch statement should never catch throwable since it includes errors.4777
A catch statement should never catch throwable since it includes errors.4840
An empty statement (semicolon) not part of a loop4872
A catch statement should never catch throwable since it includes errors.4881
A catch statement should never catch throwable since it includes errors.4909
An empty statement (semicolon) not part of a loop4944
An empty statement (semicolon) not part of a loop4968
An empty statement (semicolon) not part of a loop5018
A catch statement should never catch throwable since it includes errors.5021
A catch statement should never catch throwable since it includes errors.5051
A catch statement should never catch throwable since it includes errors.5083
An empty statement (semicolon) not part of a loop5117
An empty statement (semicolon) not part of a loop5124
An empty statement (semicolon) not part of a loop5138
A catch statement should never catch throwable since it includes errors.5140
An empty statement (semicolon) not part of a loop5173
A catch statement should never catch throwable since it includes errors.5176
An empty statement (semicolon) not part of a loop5207
A catch statement should never catch throwable since it includes errors.5214
An empty statement (semicolon) not part of a loop5246
A catch statement should never catch throwable since it includes errors.5269
A catch statement should never catch throwable since it includes errors.5301
A catch statement should never catch throwable since it includes errors.5330
An empty statement (semicolon) not part of a loop5368
A catch statement should never catch throwable since it includes errors.5371
A catch statement should never catch throwable since it includes errors.5462
An empty statement (semicolon) not part of a loop5498
A catch statement should never catch throwable since it includes errors.5504
A catch statement should never catch throwable since it includes errors.5536
A catch statement should never catch throwable since it includes errors.5571
An empty statement (semicolon) not part of a loop5603
A catch statement should never catch throwable since it includes errors.5612
A catch statement should never catch throwable since it includes errors.5643
A catch statement should never catch throwable since it includes errors.5712
An empty statement (semicolon) not part of a loop5775
An empty statement (semicolon) not part of a loop5788
An empty statement (semicolon) not part of a loop5793
A catch statement should never catch throwable since it includes errors.5796
A catch statement should never catch throwable since it includes errors.5830
An empty statement (semicolon) not part of a loop5885
A catch statement should never catch throwable since it includes errors.5894
A catch statement should never catch throwable since it includes errors.5993
An empty statement (semicolon) not part of a loop6031
A catch statement should never catch throwable since it includes errors.6037
A catch statement should never catch throwable since it includes errors.6066
System.arraycopy is more efficient9808 - 9810

net/sourceforge/pmd/lang/java/ast/JavaParserTokenManager.java

ViolationLine
Avoid unused imports such as 'net.sourceforge.pmd.PMD'4
Avoid unused private fields such as 'lengthOfMatch'.2062

net/sourceforge/pmd/lang/jsp/ast/JJTJspParserState.java

ViolationLine
Avoid instantiating Integer objects. Call Integer.valueOf() instead.79

net/sourceforge/pmd/lang/jsp/ast/JspParser.java

ViolationLine
Avoid unused imports such as 'net.sourceforge.pmd.lang.ast.TokenMgrError'5
A catch statement should never catch throwable since it includes errors.58
An empty statement (semicolon) not part of a loop90
An empty statement (semicolon) not part of a loop111
An empty statement (semicolon) not part of a loop119
An empty statement (semicolon) not part of a loop140
An empty statement (semicolon) not part of a loop167
A catch statement should never catch throwable since it includes errors.195
An empty statement (semicolon) not part of a loop269
A catch statement should never catch throwable since it includes errors.278
An empty statement (semicolon) not part of a loop418
A catch statement should never catch throwable since it includes errors.428
An empty statement (semicolon) not part of a loop605
An empty statement (semicolon) not part of a loop646
An empty statement (semicolon) not part of a loop668
A catch statement should never catch throwable since it includes errors.683
A catch statement should never catch throwable since it includes errors.714
An empty statement (semicolon) not part of a loop758
An empty statement (semicolon) not part of a loop803
An empty statement (semicolon) not part of a loop848
A catch statement should never catch throwable since it includes errors.883
An empty statement (semicolon) not part of a loop960
An empty statement (semicolon) not part of a loop993
A catch statement should never catch throwable since it includes errors.1002
An empty statement (semicolon) not part of a loop1039
An empty statement (semicolon) not part of a loop1051
An empty statement (semicolon) not part of a loop1056
A catch statement should never catch throwable since it includes errors.1059
Avoid unused local variables such as 'tagName'.1124
An empty statement (semicolon) not part of a loop1133
An empty statement (semicolon) not part of a loop1150
A catch statement should never catch throwable since it includes errors.1172
System.arraycopy is more efficient1706 - 1708

net/sourceforge/pmd/lang/jsp/ast/JspParserTokenManager.java

ViolationLine
Avoid unused local variables such as 'l'.1231
Avoid unused local variables such as 'l'.1784
Avoid unused local variables such as 'l'.1942
Avoid unused local variables such as 'l'.2162
Avoid unused local variables such as 'i1'.2365
Avoid unused local variables such as 'l1'.2366
Avoid unused local variables such as 'i2'.2367
Avoid unused local variables such as 'l2'.2368
Avoid unused local variables such as 'l'.2407
Avoid unused local variables such as 'l'.2435
Avoid unused local variables such as 'i1'.2447
Avoid unused local variables such as 'l1'.2448
Avoid unused local variables such as 'i2'.2449
Avoid unused local variables such as 'l2'.2450
Avoid unused local variables such as 'l'.3009
Avoid unused local variables such as 'l'.3158
Avoid unused local variables such as 'l'.3488
Avoid unused local variables such as 'i1'.3500
Avoid unused local variables such as 'l1'.3501
Avoid unused local variables such as 'i2'.3502
Avoid unused local variables such as 'l2'.3503
Avoid unused private fields such as 'lengthOfMatch'.3933