PMD Results

The following document contains the results of PMD 4.2.2.

Files

org/apache/jsieve/Argument.java

Violation Line
Avoid modifiers which are implied by the context 33

org/apache/jsieve/Arguments.java

Violation Line
Found 'DD'-anomaly for variable 'testList' (lines '82'-'83'). 82 - 83
Avoid assignments in operands 83
Found 'DU'-anomaly for variable 'testList' (lines '83'-'88'). 83 - 88
A method should have only one exit point, and that should be the last statement in the method 85

org/apache/jsieve/BaseSieveContext.java

Violation Line
It is a good practice to call super() in a constructor 44 - 53

org/apache/jsieve/Command.java

Violation Line
Avoid using final local variables, turn them into fields 157
Avoid using final local variables, turn them into fields 158 - 159

org/apache/jsieve/CommandManager.java

Violation Line
Avoid modifiers which are implied by the context 41
Avoid modifiers which are implied by the context 51

org/apache/jsieve/CommandManagerImpl.java

Violation Line
Found 'DD'-anomaly for variable 'cmdClass' (lines '56'-'58'). 56 - 58
Found 'DU'-anomaly for variable 'cmdClass' (lines '58'-'67'). 58 - 67
Found 'DD'-anomaly for variable 'isSupported' (lines '99'-'102'). 99 - 102
Avoid empty catch blocks 103 - 104
Avoid using final local variables, turn them into fields 120

org/apache/jsieve/Commands.java

Violation Line
An empty statement (semicolon) not part of a loop 84

org/apache/jsieve/ComparatorManager.java

Violation Line
Avoid modifiers which are implied by the context 42
Avoid modifiers which are implied by the context 51
Avoid modifiers which are implied by the context 58

org/apache/jsieve/ComparatorManagerImpl.java

Violation Line
Avoid using final local variables, turn them into fields 46
Found 'DD'-anomaly for variable 'comparatorClass' (lines '100'-'102'). 100 - 102
Found 'DU'-anomaly for variable 'comparatorClass' (lines '102'-'112'). 102 - 112
A method should have only one exit point, and that should be the last statement in the method 160

org/apache/jsieve/ConfigurationManager.java

Violation Line
Found 'DD'-anomaly for variable 'stream' (lines '158'-'163'). 158 - 163
Avoid using final local variables, turn them into fields 160 - 161
Avoid using final local variables, turn them into fields 231
Avoid using final local variables, turn them into fields 232 - 233
Avoid using final local variables, turn them into fields 241
Avoid using final local variables, turn them into fields 242

org/apache/jsieve/Constants.java

Violation Line
Each class should declare at least one constructor 21 - 35

org/apache/jsieve/Executable.java

Violation Line
Avoid modifiers which are implied by the context 29 - 30

org/apache/jsieve/ExecutableCommand.java

Violation Line
Avoid modifiers which are implied by the context 44 - 45

org/apache/jsieve/NumberArgument.java

Violation Line
Found 'DD'-anomaly for variable 'endIndex' (lines '94'-'98'). 94 - 98
Found 'DD'-anomaly for variable 'endIndex' (lines '94'-'101'). 94 - 101
Found 'DD'-anomaly for variable 'endIndex' (lines '94'-'104'). 94 - 104
Found 'DD'-anomaly for variable 'magnitude' (lines '95'-'97'). 95 - 97
Found 'DD'-anomaly for variable 'magnitude' (lines '95'-'100'). 95 - 100
Found 'DD'-anomaly for variable 'magnitude' (lines '95'-'103'). 95 - 103

org/apache/jsieve/ScriptCoordinate.java

Violation Line
Avoid using final local variables, turn them into fields 114
Avoid using final local variables, turn them into fields 115
Avoid using final local variables, turn them into fields 136
Avoid using final local variables, turn them into fields 137
Avoid using final local variables, turn them into fields 151

org/apache/jsieve/SieveFactory.java

Violation Line
Avoid using final local variables, turn them into fields 101 - 102
Avoid using final local variables, turn them into fields 144 - 145
Avoid empty catch blocks 155 - 157

org/apache/jsieve/SieveParserVisitorImpl.java

Violation Line
Found 'DU'-anomaly for variable 'children' (lines '99'-'111'). 99 - 111
Found 'DD'-anomaly for variable 'argument' (lines '100'-'103'). 100 - 103
Found 'DD'-anomaly for variable 'argument' (lines '100'-'105'). 100 - 105
Found 'DD'-anomaly for variable 'children' (lines '118'-'119'). 118 - 119
Found 'DD'-anomaly for variable 'testList' (lines '123'-'128'). 123 - 128
Found 'DD'-anomaly for variable 'testList' (lines '123'-'130'). 123 - 130
Found 'DD'-anomaly for variable 'testList' (lines '128'-'128'). 128
Found 'DD'-anomaly for variable 'testList' (lines '128'-'130'). 128 - 130
Found 'DD'-anomaly for variable 'testList' (lines '130'-'128'). 130 - 128
Found 'DD'-anomaly for variable 'testList' (lines '130'-'130'). 130
Found 'DD'-anomaly for variable 'children' (lines '163'-'164'). 163 - 164
Found 'DD'-anomaly for variable 'arguments' (lines '168'-'173'). 168 - 173
Found 'DD'-anomaly for variable 'block' (lines '169'-'175'). 169 - 175
Found 'DD'-anomaly for variable 'arguments' (lines '173'-'173'). 173
Found 'DD'-anomaly for variable 'block' (lines '175'-'175'). 175
Avoid using final local variables, turn them into fields 179
Avoid using final local variables, turn them into fields 234
Found 'DD'-anomaly for variable 'children' (lines '258'-'259'). 258 - 259
Found 'DD'-anomaly for variable 'arguments' (lines '263'-'267'). 263 - 267
Found 'DD'-anomaly for variable 'arguments' (lines '267'-'267'). 267

org/apache/jsieve/SieveValidationVisitor.java

Violation Line
Avoid using final local variables, turn them into fields 94
Avoid using final local variables, turn them into fields 121
Avoid using final local variables, turn them into fields 130
Avoid using final local variables, turn them into fields 136
Avoid using final local variables, turn them into fields 160
Avoid using final local variables, turn them into fields 162
These nested if statements could be combined 165 - 168
Avoid using final local variables, turn them into fields 174
Avoid using final local variables, turn them into fields 176
Avoid using final local variables, turn them into fields 178

org/apache/jsieve/StringListArgument.java

Violation Line
Found 'DD'-anomaly for variable 'list' (lines '55'-'56'). 55 - 56
Avoid assignments in operands 56
Found 'DU'-anomaly for variable 'list' (lines '56'-'61'). 56 - 61
A method should have only one exit point, and that should be the last statement in the method 58

org/apache/jsieve/Test.java

Violation Line
Avoid instantiating Boolean objects; reference Boolean.TRUE or Boolean.FALSE or call Boolean.valueOf() instead. 48
Avoid using final local variables, turn them into fields 64
Avoid using final local variables, turn them into fields 65

org/apache/jsieve/TestList.java

Violation Line
Avoid instantiating Boolean objects; reference Boolean.TRUE or Boolean.FALSE or call Boolean.valueOf() instead. 77
Found 'DD'-anomaly for variable 'result' (lines '90'-'92'). 90 - 92
Found 'DD'-anomaly for variable 'result' (lines '110'-'112'). 110 - 112

org/apache/jsieve/TestManager.java

Violation Line
Avoid modifiers which are implied by the context 42

org/apache/jsieve/TestManagerImpl.java

Violation Line
Found 'DD'-anomaly for variable 'testClass' (lines '57'-'60'). 57 - 60
Found 'DU'-anomaly for variable 'testClass' (lines '60'-'69'). 60 - 69
Avoid using final local variables, turn them into fields 104

org/apache/jsieve/commands/AbstractActionCommand.java

Violation Line
Avoid unnecessary constructors - the compiler will generate these for you 40 - 42

org/apache/jsieve/commands/AbstractBodyCommand.java

Violation Line
Avoid unnecessary constructors - the compiler will generate these for you 34 - 36

org/apache/jsieve/commands/AbstractCommand.java

Violation Line
Avoid unnecessary constructors - the compiler will generate these for you 39 - 41

org/apache/jsieve/commands/AbstractConditionalCommand.java

Violation Line
Avoid unnecessary constructors - the compiler will generate these for you 38 - 40
Found 'DU'-anomaly for variable 'oldManager' (lines '55'-'66'). 55 - 66

org/apache/jsieve/commands/AbstractControlCommand.java

Violation Line
Avoid unnecessary constructors - the compiler will generate these for you 32 - 34

org/apache/jsieve/commands/AbstractPrologCommand.java

Violation Line
Avoid unnecessary constructors - the compiler will generate these for you 37 - 39

org/apache/jsieve/commands/Discard.java

Violation Line
Avoid unnecessary constructors - the compiler will generate these for you 37 - 39

org/apache/jsieve/commands/Else.java

Violation Line
Avoid unnecessary constructors - the compiler will generate these for you 36 - 38
A method should have only one exit point, and that should be the last statement in the method 60

org/apache/jsieve/commands/Elsif.java

Violation Line
Avoid unnecessary constructors - the compiler will generate these for you 37 - 39
A method should have only one exit point, and that should be the last statement in the method 62

org/apache/jsieve/commands/If.java

Violation Line
Avoid unnecessary constructors - the compiler will generate these for you 35 - 37
A method should have only one exit point, and that should be the last statement in the method 60
Avoid using final local variables, turn them into fields 63

org/apache/jsieve/commands/Keep.java

Violation Line
Avoid unnecessary constructors - the compiler will generate these for you 37 - 39

org/apache/jsieve/commands/Redirect.java

Violation Line
Avoid unnecessary constructors - the compiler will generate these for you 39 - 41

org/apache/jsieve/commands/Require.java

Violation Line
Avoid unnecessary constructors - the compiler will generate these for you 46 - 48
Avoid using final local variables, turn them into fields 63 - 64
Avoid using final local variables, turn them into fields 83
Avoid empty catch blocks 93 - 95

org/apache/jsieve/commands/Stop.java

Violation Line
Avoid unnecessary constructors - the compiler will generate these for you 37 - 39

org/apache/jsieve/commands/extensions/Log.java

Violation Line
Avoid unnecessary constructors - the compiler will generate these for you 57 - 59
Found 'DU'-anomaly for variable 'logLevel' (lines '67'-'119'). 67 - 119
Found 'DD'-anomaly for variable 'message' (lines '68'-'105'). 68 - 105
Found 'DU'-anomaly for variable 'message' (lines '68'-'119'). 68 - 119
Avoid using final local variables, turn them into fields 73
Avoid using final local variables, turn them into fields 78
Avoid using final local variables, turn them into fields 80
Found 'DU'-anomaly for variable 'logLevel' (lines '88'-'119'). 88 - 119
Avoid using final local variables, turn them into fields 101

org/apache/jsieve/commands/extensions/LogLevelTags.java

Violation Line
Avoid modifiers which are implied by the context 27
Avoid modifiers which are implied by the context 29
Avoid modifiers which are implied by the context 31
Avoid modifiers which are implied by the context 33
Avoid modifiers which are implied by the context 35
Avoid modifiers which are implied by the context 37

org/apache/jsieve/commands/optional/FileInto.java

Violation Line
Avoid unnecessary constructors - the compiler will generate these for you 41 - 43
Avoid using final local variables, turn them into fields 61 - 62
Found 'DU'-anomaly for variable 'destination' (lines '61'-'80'). 61 - 80
Found 'DD'-anomaly for variable 'isDuplicate' (lines '66'-'68'). 66 - 68

org/apache/jsieve/commands/optional/Reject.java

Violation Line
Avoid unnecessary constructors - the compiler will generate these for you 50 - 52
Avoid using final local variables, turn them into fields 67 - 68

org/apache/jsieve/comparators/AsciiCasemap.java

Violation Line
Avoid unnecessary constructors - the compiler will generate these for you 35 - 37

org/apache/jsieve/comparators/AsciiNumeric.java

Violation Line
Avoid unnecessary constructors - the compiler will generate these for you 35 - 37
Avoid using final local variables, turn them into fields 43
Avoid using final local variables, turn them into fields 54
Avoid using final local variables, turn them into fields 55
Avoid using final local variables, turn them into fields 65
Avoid using final local variables, turn them into fields 70
Avoid using final local variables, turn them into fields 82
Avoid using final local variables, turn them into fields 83

org/apache/jsieve/comparators/ComparatorNames.java

Violation Line
Avoid modifiers which are implied by the context 27
Avoid modifiers which are implied by the context 29

org/apache/jsieve/comparators/ComparatorUtils.java

Violation Line
Found 'DD'-anomaly for variable 'isMatched' (lines '61'-'63'). 61 - 63
Found 'DD'-anomaly for variable 'isMatched' (lines '61'-'65'). 61 - 65
Found 'DD'-anomaly for variable 'isMatched' (lines '61'-'68'). 61 - 68
Avoid using final local variables, turn them into fields 88
Found 'DD'-anomaly for variable 'lastCharWasStar' (lines '147'-'178'). 147 - 178
Found 'DU'-anomaly for variable 'lastCharWasStar' (lines '147'-'181'). 147 - 181
Avoid using final local variables, turn them into fields 149
Found 'DU'-anomaly for variable 'lastCharWasStar' (lines '178'-'181'). 178 - 181
Found 'DD'-anomaly for variable 'lastCharWasStar' (lines '178'-'178'). 178

org/apache/jsieve/comparators/Contains.java

Violation Line
Avoid modifiers which are implied by the context 40

org/apache/jsieve/comparators/Equals.java

Violation Line
Avoid modifiers which are implied by the context 35

org/apache/jsieve/comparators/MatchTypeTags.java

Violation Line
Avoid modifiers which are implied by the context 27
Avoid modifiers which are implied by the context 29
Avoid modifiers which are implied by the context 31

org/apache/jsieve/comparators/Matches.java

Violation Line
Avoid modifiers which are implied by the context 37

org/apache/jsieve/comparators/Octet.java

Violation Line
Avoid unnecessary constructors - the compiler will generate these for you 35 - 37

org/apache/jsieve/mail/ActionKeep.java

Violation Line
Avoid unnecessary constructors - the compiler will generate these for you 31 - 33

org/apache/jsieve/mail/MailAdapter.java

Violation Line
Avoid modifiers which are implied by the context 86
Avoid modifiers which are implied by the context 95
Avoid modifiers which are implied by the context 107
Avoid modifiers which are implied by the context 128
Avoid modifiers which are implied by the context 138
Avoid modifiers which are implied by the context 146
Avoid modifiers which are implied by the context 151
Avoid modifiers which are implied by the context 168
Avoid modifiers which are implied by the context 178
Avoid modifiers which are implied by the context 203 - 204
Avoid modifiers which are implied by the context 209 - 226
Avoid modifiers which are implied by the context 217
Avoid modifiers which are implied by the context 225

org/apache/jsieve/mail/MailUtils.java

Violation Line
An empty statement (semicolon) not part of a loop 56
Avoid using final local variables, turn them into fields 57

org/apache/jsieve/mail/optional/EnvelopeAccessors.java

Violation Line
Avoid modifiers which are implied by the context 40
Avoid modifiers which are implied by the context 49
Avoid modifiers which are implied by the context 69

org/apache/jsieve/parser/SieveNode.java

Violation Line
Avoid unnecessary constructors - the compiler will generate these for you 38 - 40
Avoid using final local variables, turn them into fields 139
Avoid using final local variables, turn them into fields 140
Avoid using final local variables, turn them into fields 141
Avoid using final local variables, turn them into fields 142
Avoid using final local variables, turn them into fields 143 - 144
Avoid using final local variables, turn them into fields 155
Avoid using final local variables, turn them into fields 159
Avoid using final local variables, turn them into fields 168
Avoid using final local variables, turn them into fields 169
Avoid using final local variables, turn them into fields 171
Avoid using final local variables, turn them into fields 192

org/apache/jsieve/parser/address/AddressNode.java

Violation Line
Each class should declare at least one constructor 24 - 30

org/apache/jsieve/parser/address/SieveAddressBuilder.java

Violation Line
Avoid using final local variables, turn them into fields 73
Avoid using final local variables, turn them into fields 84
Avoid using final local variables, turn them into fields 103
Avoid using final local variables, turn them into fields 106
Avoid using final local variables, turn them into fields 114
Avoid using final local variables, turn them into fields 115
Avoid using final local variables, turn them into fields 123
Avoid using final local variables, turn them into fields 124

org/apache/jsieve/tests/AbstractCompatatorTest.java

Violation Line
Avoid unnecessary constructors - the compiler will generate these for you 47 - 49
Found 'DU'-anomaly for variable 'addressPart' (lines '70'-'148'). 70 - 148
Found 'DU'-anomaly for variable 'comparator' (lines '71'-'148'). 71 - 148
Found 'DU'-anomaly for variable 'matchType' (lines '72'-'148'). 72 - 148
Found 'DD'-anomaly for variable 'headerNames' (lines '73'-'125'). 73 - 125
Found 'DU'-anomaly for variable 'headerNames' (lines '73'-'148'). 73 - 148
Found 'DU'-anomaly for variable 'keys' (lines '74'-'148'). 74 - 148
Found 'DD'-anomaly for variable 'keys' (lines '74'-'135'). 74 - 135
Found 'DU'-anomaly for variable 'addressPart' (lines '89'-'148'). 89 - 148
Found 'DU'-anomaly for variable 'comparator' (lines '101'-'148'). 101 - 148
Found 'DU'-anomaly for variable 'matchType' (lines '110'-'148'). 110 - 148
Found 'DU'-anomaly for variable 'keys' (lines '135'-'148'). 135 - 148
Found 'DD'-anomaly for variable 'isMatched' (lines '167'-'169'). 167 - 169
Found 'DD'-anomaly for variable 'isMatched' (lines '195'-'197'). 195 - 197

org/apache/jsieve/tests/AbstractTest.java

Violation Line
Avoid unnecessary constructors - the compiler will generate these for you 47 - 49
Avoid using final local variables, turn them into fields 98
Avoid using final local variables, turn them into fields 104 - 105

org/apache/jsieve/tests/Address.java

Violation Line
Avoid unnecessary constructors - the compiler will generate these for you 40 - 42
Avoid using final local variables, turn them into fields 47 - 48
Avoid using final local variables, turn them into fields 49
Avoid using final local variables, turn them into fields 68
Avoid using final local variables, turn them into fields 69
Avoid using final local variables, turn them into fields 72
Found 'DD'-anomaly for variable 'matchKey' (lines '81'-'83'). 81 - 83
Found 'DD'-anomaly for variable 'matchKey' (lines '81'-'85'). 81 - 85

org/apache/jsieve/tests/AddressPartTags.java

Violation Line
Avoid modifiers which are implied by the context 27
Avoid modifiers which are implied by the context 29
Avoid modifiers which are implied by the context 31

org/apache/jsieve/tests/AllOf.java

Violation Line
Avoid unnecessary constructors - the compiler will generate these for you 35 - 37

org/apache/jsieve/tests/AnyOf.java

Violation Line
Avoid unnecessary constructors - the compiler will generate these for you 35 - 37

org/apache/jsieve/tests/ComparatorTags.java

Violation Line
Avoid modifiers which are implied by the context 27

org/apache/jsieve/tests/ExecutableTest.java

Violation Line
Avoid modifiers which are implied by the context 43 - 44

org/apache/jsieve/tests/Exists.java

Violation Line
Avoid unnecessary constructors - the compiler will generate these for you 39 - 41
Avoid using final local variables, turn them into fields 50 - 51
Found 'DD'-anomaly for variable 'found' (lines '53'-'56'). 53 - 56

org/apache/jsieve/tests/False.java

Violation Line
Avoid unnecessary constructors - the compiler will generate these for you 34 - 36

org/apache/jsieve/tests/Header.java

Violation Line
Avoid unnecessary constructors - the compiler will generate these for you 50 - 52
Found 'DU'-anomaly for variable 'comparator' (lines '73'-'145'). 73 - 145
Found 'DU'-anomaly for variable 'matchType' (lines '74'-'145'). 74 - 145
Found 'DU'-anomaly for variable 'headerNames' (lines '75'-'145'). 75 - 145
Found 'DD'-anomaly for variable 'headerNames' (lines '75'-'122'). 75 - 122
Found 'DU'-anomaly for variable 'keys' (lines '76'-'145'). 76 - 145
Found 'DD'-anomaly for variable 'keys' (lines '76'-'132'). 76 - 132
Avoid using final local variables, turn them into fields 85
Found 'DU'-anomaly for variable 'comparator' (lines '97'-'145'). 97 - 145
Found 'DU'-anomaly for variable 'matchType' (lines '107'-'145'). 107 - 145
Avoid using final local variables, turn them into fields 120
Avoid using final local variables, turn them into fields 130
A method should have only one exit point, and that should be the last statement in the method 198
Found 'DD'-anomaly for variable 'isMatched' (lines '225'-'227'). 225 - 227

org/apache/jsieve/tests/Not.java

Violation Line
Avoid unnecessary constructors - the compiler will generate these for you 38 - 40
Found 'DU'-anomaly for variable 'result' (lines '48'-'57'). 48 - 57
Found 'DD'-anomaly for variable 'result' (lines '48'-'54'). 48 - 54

org/apache/jsieve/tests/Size.java

Violation Line
Avoid unnecessary constructors - the compiler will generate these for you 42 - 44
Found 'DD'-anomaly for variable 'comparator' (lines '58'-'68'). 58 - 68
Found 'DU'-anomaly for variable 'comparator' (lines '58'-'92'). 58 - 92
Found 'DU'-anomaly for variable 'size' (lines '59'-'92'). 59 - 92
Found 'DD'-anomaly for variable 'size' (lines '59'-'81'). 59 - 81
Avoid using final local variables, turn them into fields 66
Avoid using final local variables, turn them into fields 79
Found 'DD'-anomaly for variable 'isTestPassed' (lines '105'-'107'). 105 - 107
Found 'DD'-anomaly for variable 'isTestPassed' (lines '105'-'109'). 105 - 109

org/apache/jsieve/tests/True.java

Violation Line
Avoid unnecessary constructors - the compiler will generate these for you 34 - 36

org/apache/jsieve/tests/optional/Body.java

Violation Line
Assigning an Object to null is a code smell. Consider refactoring. 44
Avoid using final local variables, turn them into fields 52
A method should have only one exit point, and that should be the last statement in the method 90

org/apache/jsieve/tests/optional/Envelope.java

Violation Line
Avoid unnecessary constructors - the compiler will generate these for you 45 - 47
Found 'DD'-anomaly for variable 'matchAddress' (lines '71'-'73'). 71 - 73
Found 'DD'-anomaly for variable 'matchAddress' (lines '71'-'88'). 71 - 88
Found 'DD'-anomaly for variable 'matchAddress' (lines '73'-'97'). 73 - 97
Found 'DD'-anomaly for variable 'localEnd' (lines '76'-'82'). 76 - 82
Found 'DD'-anomaly for variable 'localEnd' (lines '76'-'85'). 76 - 85
Found 'DD'-anomaly for variable 'domainStart' (lines '77'-'83'). 77 - 83
Found 'DD'-anomaly for variable 'domainStart' (lines '77'-'86'). 77 - 86
Found 'DD'-anomaly for variable 'matchAddress' (lines '88'-'97'). 88 - 97
Found 'DD'-anomaly for variable 'matchKey' (lines '94'-'96'). 94 - 96
Found 'DD'-anomaly for variable 'matchKey' (lines '94'-'99'). 94 - 99
Avoid using final local variables, turn them into fields 109
Found 'DD'-anomaly for variable 'isMatched' (lines '110'-'112'). 110 - 112