PMD Results

The following document contains the results of PMD 4.2.2.

Files

org/apache/jsieve/Argument.java

ViolationLine
Avoid modifiers which are implied by the context33

org/apache/jsieve/Arguments.java

ViolationLine
Found 'DD'-anomaly for variable 'testList' (lines '82'-'83').82 - 83
Avoid assignments in operands83
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 method85

org/apache/jsieve/BaseSieveContext.java

ViolationLine
It is a good practice to call super() in a constructor47 - 56

org/apache/jsieve/Command.java

ViolationLine
Avoid using final local variables, turn them into fields157
Avoid using final local variables, turn them into fields158 - 159

org/apache/jsieve/CommandManager.java

ViolationLine
Avoid modifiers which are implied by the context40
Avoid modifiers which are implied by the context50

org/apache/jsieve/CommandManagerImpl.java

ViolationLine
Found 'DD'-anomaly for variable 'cmdClass' (lines '52'-'54').52 - 54
Found 'DU'-anomaly for variable 'cmdClass' (lines '54'-'63').54 - 63
Found 'DD'-anomaly for variable 'isSupported' (lines '95'-'98').95 - 98
Avoid empty catch blocks99 - 100
Avoid using final local variables, turn them into fields116

org/apache/jsieve/ComparatorManager.java

ViolationLine
Avoid modifiers which are implied by the context41

org/apache/jsieve/ComparatorManagerImpl.java

ViolationLine
Found 'DD'-anomaly for variable 'comparatorClass' (lines '53'-'55').53 - 55
Found 'DU'-anomaly for variable 'comparatorClass' (lines '55'-'65').55 - 65

org/apache/jsieve/ConfigurationManager.java

ViolationLine
Found 'DD'-anomaly for variable 'stream' (lines '110'-'115').110 - 115
Avoid using final local variables, turn them into fields112 - 113

org/apache/jsieve/Executable.java

ViolationLine
Avoid modifiers which are implied by the context29 - 30

org/apache/jsieve/ExecutableCommand.java

ViolationLine
Avoid modifiers which are implied by the context44 - 45

org/apache/jsieve/NumberArgument.java

ViolationLine
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

ViolationLine
Avoid using final local variables, turn them into fields114
Avoid using final local variables, turn them into fields115
Avoid using final local variables, turn them into fields136
Avoid using final local variables, turn them into fields137
Avoid using final local variables, turn them into fields151

org/apache/jsieve/SieveFactory.java

ViolationLine
Avoid using final local variables, turn them into fields96 - 97
Avoid empty catch blocks146 - 148

org/apache/jsieve/SieveParserVisitorImpl.java

ViolationLine
Found 'DU'-anomaly for variable 'children' (lines '97'-'109').97 - 109
Found 'DD'-anomaly for variable 'argument' (lines '98'-'101').98 - 101
Found 'DD'-anomaly for variable 'argument' (lines '98'-'103').98 - 103
Found 'DD'-anomaly for variable 'children' (lines '115'-'116').115 - 116
Found 'DD'-anomaly for variable 'testList' (lines '120'-'125').120 - 125
Found 'DD'-anomaly for variable 'testList' (lines '120'-'127').120 - 127
Found 'DD'-anomaly for variable 'testList' (lines '125'-'125').125
Found 'DD'-anomaly for variable 'testList' (lines '125'-'127').125 - 127
Found 'DD'-anomaly for variable 'testList' (lines '127'-'125').127 - 125
Found 'DD'-anomaly for variable 'testList' (lines '127'-'127').127
Found 'DD'-anomaly for variable 'children' (lines '155'-'156').155 - 156
Found 'DD'-anomaly for variable 'arguments' (lines '160'-'165').160 - 165
Found 'DD'-anomaly for variable 'block' (lines '161'-'167').161 - 167
Found 'DD'-anomaly for variable 'arguments' (lines '165'-'165').165
Found 'DD'-anomaly for variable 'block' (lines '167'-'167').167
Avoid using final local variables, turn them into fields171
Avoid using final local variables, turn them into fields224
Found 'DD'-anomaly for variable 'children' (lines '246'-'247').246 - 247
Found 'DD'-anomaly for variable 'arguments' (lines '251'-'255').251 - 255
Found 'DD'-anomaly for variable 'arguments' (lines '255'-'255').255

org/apache/jsieve/SieveValidationVisitor.java

ViolationLine
Avoid using final local variables, turn them into fields81
Avoid using final local variables, turn them into fields120
Avoid using final local variables, turn them into fields122

org/apache/jsieve/StringListArgument.java

ViolationLine
Found 'DD'-anomaly for variable 'list' (lines '55'-'56').55 - 56
Avoid assignments in operands56
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 method58

org/apache/jsieve/Test.java

ViolationLine
Avoid using final local variables, turn them into fields51
Avoid using final local variables, turn them into fields52
Avoid using final local variables, turn them into fields53
Avoid instantiating Boolean objects; reference Boolean.TRUE or Boolean.FALSE or call Boolean.valueOf() instead.54

org/apache/jsieve/TestList.java

ViolationLine
Avoid instantiating Boolean objects; reference Boolean.TRUE or Boolean.FALSE or call Boolean.valueOf() instead.85

org/apache/jsieve/TestManager.java

ViolationLine
Avoid modifiers which are implied by the context41

org/apache/jsieve/TestManagerImpl.java

ViolationLine
Found 'DD'-anomaly for variable 'testClass' (lines '54'-'57').54 - 57
Found 'DU'-anomaly for variable 'testClass' (lines '57'-'66').57 - 66
Avoid using final local variables, turn them into fields101

org/apache/jsieve/commands/AbstractActionCommand.java

ViolationLine
Avoid unnecessary constructors - the compiler will generate these for you39 - 41

org/apache/jsieve/commands/AbstractBodyCommand.java

ViolationLine
Avoid unnecessary constructors - the compiler will generate these for you34 - 36

org/apache/jsieve/commands/AbstractCommand.java

ViolationLine
Avoid unnecessary constructors - the compiler will generate these for you39 - 41

org/apache/jsieve/commands/AbstractConditionalCommand.java

ViolationLine
Avoid unnecessary constructors - the compiler will generate these for you38 - 40
Found 'DU'-anomaly for variable 'oldManager' (lines '56'-'67').56 - 67

org/apache/jsieve/commands/AbstractControlCommand.java

ViolationLine
Avoid unnecessary constructors - the compiler will generate these for you32 - 34

org/apache/jsieve/commands/AbstractPrologCommand.java

ViolationLine
Avoid unnecessary constructors - the compiler will generate these for you37 - 39

org/apache/jsieve/commands/Discard.java

ViolationLine
Avoid unnecessary constructors - the compiler will generate these for you37 - 39

org/apache/jsieve/commands/Else.java

ViolationLine
Avoid unnecessary constructors - the compiler will generate these for you36 - 38
A method should have only one exit point, and that should be the last statement in the method60

org/apache/jsieve/commands/Elsif.java

ViolationLine
Avoid unnecessary constructors - the compiler will generate these for you37 - 39
A method should have only one exit point, and that should be the last statement in the method62

org/apache/jsieve/commands/If.java

ViolationLine
Avoid unnecessary constructors - the compiler will generate these for you36 - 38
A method should have only one exit point, and that should be the last statement in the method61

org/apache/jsieve/commands/Keep.java

ViolationLine
Avoid unnecessary constructors - the compiler will generate these for you37 - 39

org/apache/jsieve/commands/Redirect.java

ViolationLine
Avoid unnecessary constructors - the compiler will generate these for you39 - 41

org/apache/jsieve/commands/Require.java

ViolationLine
Avoid unnecessary constructors - the compiler will generate these for you43 - 45
Avoid empty catch blocks85 - 87

org/apache/jsieve/commands/Stop.java

ViolationLine
Avoid unnecessary constructors - the compiler will generate these for you37 - 39

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

ViolationLine
Avoid unnecessary constructors - the compiler will generate these for you49 - 51
Found 'DU'-anomaly for variable 'logLevel' (lines '59'-'111').59 - 111
Found 'DD'-anomaly for variable 'message' (lines '60'-'97').60 - 97
Found 'DU'-anomaly for variable 'message' (lines '60'-'111').60 - 111
Found 'DU'-anomaly for variable 'logLevel' (lines '80'-'111').80 - 111

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

ViolationLine
Avoid modifiers which are implied by the context27
Avoid modifiers which are implied by the context29
Avoid modifiers which are implied by the context31
Avoid modifiers which are implied by the context33
Avoid modifiers which are implied by the context35
Avoid modifiers which are implied by the context37

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

ViolationLine
Avoid unnecessary constructors - the compiler will generate these for you43 - 45
Found 'DU'-anomaly for variable 'destination' (lines '63'-'81').63 - 81
Found 'DD'-anomaly for variable 'isDuplicate' (lines '69'-'72').69 - 72
Found 'DD'-anomaly for variable 'isDuplicate' (lines '72'-'72').72

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

ViolationLine
Avoid unnecessary constructors - the compiler will generate these for you50 - 52

org/apache/jsieve/comparators/AsciiCasemap.java

ViolationLine
Avoid unnecessary constructors - the compiler will generate these for you35 - 37

org/apache/jsieve/comparators/AsciiNumeric.java

ViolationLine
Avoid unnecessary constructors - the compiler will generate these for you33 - 35

org/apache/jsieve/comparators/ComparatorNames.java

ViolationLine
Avoid modifiers which are implied by the context27
Avoid modifiers which are implied by the context29

org/apache/jsieve/comparators/ComparatorUtils.java

ViolationLine
Found 'DD'-anomaly for variable 'isMatched' (lines '60'-'62').60 - 62
Found 'DD'-anomaly for variable 'isMatched' (lines '60'-'64').60 - 64
Found 'DD'-anomaly for variable 'isMatched' (lines '60'-'67').60 - 67
Avoid using final local variables, turn them into fields88
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 fields149
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

ViolationLine
Avoid modifiers which are implied by the context36

org/apache/jsieve/comparators/Equals.java

ViolationLine
Avoid modifiers which are implied by the context35

org/apache/jsieve/comparators/MatchTypeTags.java

ViolationLine
Avoid modifiers which are implied by the context27
Avoid modifiers which are implied by the context29
Avoid modifiers which are implied by the context31

org/apache/jsieve/comparators/Matches.java

ViolationLine
Avoid modifiers which are implied by the context37

org/apache/jsieve/comparators/Octet.java

ViolationLine
Avoid unnecessary constructors - the compiler will generate these for you35 - 37

org/apache/jsieve/mail/ActionKeep.java

ViolationLine
Avoid unnecessary constructors - the compiler will generate these for you31 - 33

org/apache/jsieve/mail/MailAdapter.java

ViolationLine
Avoid modifiers which are implied by the context80
Avoid modifiers which are implied by the context89
Avoid modifiers which are implied by the context101
Avoid modifiers which are implied by the context122
Avoid modifiers which are implied by the context132
Avoid modifiers which are implied by the context140
Avoid modifiers which are implied by the context145
Avoid modifiers which are implied by the context162
Avoid modifiers which are implied by the context173
Avoid modifiers which are implied by the context198 - 199
Avoid modifiers which are implied by the context204 - 221
Avoid modifiers which are implied by the context212
Avoid modifiers which are implied by the context220

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

ViolationLine
Avoid modifiers which are implied by the context40
Avoid modifiers which are implied by the context49
Avoid modifiers which are implied by the context69

org/apache/jsieve/parser/SieveNode.java

ViolationLine
Avoid unnecessary constructors - the compiler will generate these for you38 - 40
Avoid using final local variables, turn them into fields139
Avoid using final local variables, turn them into fields140
Avoid using final local variables, turn them into fields141
Avoid using final local variables, turn them into fields142
Avoid using final local variables, turn them into fields143 - 144
Avoid using final local variables, turn them into fields155
Avoid using final local variables, turn them into fields159
Avoid using final local variables, turn them into fields168
Avoid using final local variables, turn them into fields169
Avoid using final local variables, turn them into fields171
Avoid using final local variables, turn them into fields192

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

ViolationLine
Each class should declare at least one constructor24 - 30

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

ViolationLine
Avoid using final local variables, turn them into fields73
Avoid using final local variables, turn them into fields84 - 85
Avoid using final local variables, turn them into fields103
Avoid using final local variables, turn them into fields106
Avoid using final local variables, turn them into fields114
Avoid using final local variables, turn them into fields115
Avoid using final local variables, turn them into fields123
Avoid using final local variables, turn them into fields124

org/apache/jsieve/tests/AbstractCompatatorTest.java

ViolationLine
Avoid unnecessary constructors - the compiler will generate these for you40 - 42
Found 'DU'-anomaly for variable 'addressPart' (lines '63'-'141').63 - 141
Found 'DU'-anomaly for variable 'comparator' (lines '64'-'141').64 - 141
Found 'DU'-anomaly for variable 'matchType' (lines '65'-'141').65 - 141
Found 'DD'-anomaly for variable 'headerNames' (lines '66'-'118').66 - 118
Found 'DU'-anomaly for variable 'headerNames' (lines '66'-'141').66 - 141
Found 'DU'-anomaly for variable 'keys' (lines '67'-'141').67 - 141
Found 'DD'-anomaly for variable 'keys' (lines '67'-'128').67 - 128
Found 'DU'-anomaly for variable 'addressPart' (lines '82'-'141').82 - 141
Found 'DU'-anomaly for variable 'comparator' (lines '94'-'141').94 - 141
Found 'DU'-anomaly for variable 'matchType' (lines '103'-'141').103 - 141
Found 'DU'-anomaly for variable 'keys' (lines '128'-'141').128 - 141

org/apache/jsieve/tests/AbstractTest.java

ViolationLine
Avoid unnecessary constructors - the compiler will generate these for you47 - 49
Avoid using final local variables, turn them into fields98
Avoid using final local variables, turn them into fields104 - 105

org/apache/jsieve/tests/Address.java

ViolationLine
Avoid unnecessary constructors - the compiler will generate these for you37 - 39
Avoid using final local variables, turn them into fields44 - 45
Avoid using final local variables, turn them into fields46
Avoid using final local variables, turn them into fields65
Avoid using final local variables, turn them into fields66
Avoid using final local variables, turn them into fields69
Found 'DD'-anomaly for variable 'matchKey' (lines '78'-'80').78 - 80
Found 'DD'-anomaly for variable 'matchKey' (lines '78'-'82').78 - 82

org/apache/jsieve/tests/AddressPartTags.java

ViolationLine
Avoid modifiers which are implied by the context27
Avoid modifiers which are implied by the context29
Avoid modifiers which are implied by the context31

org/apache/jsieve/tests/AllOf.java

ViolationLine
Avoid unnecessary constructors - the compiler will generate these for you38 - 40

org/apache/jsieve/tests/AnyOf.java

ViolationLine
Avoid unnecessary constructors - the compiler will generate these for you38 - 40

org/apache/jsieve/tests/ComparatorTags.java

ViolationLine
Avoid modifiers which are implied by the context27

org/apache/jsieve/tests/ExecutableTest.java

ViolationLine
Avoid modifiers which are implied by the context43 - 44

org/apache/jsieve/tests/Exists.java

ViolationLine
Avoid unnecessary constructors - the compiler will generate these for you39 - 41

org/apache/jsieve/tests/False.java

ViolationLine
Avoid unnecessary constructors - the compiler will generate these for you34 - 36

org/apache/jsieve/tests/Header.java

ViolationLine
Avoid unnecessary constructors - the compiler will generate these for you46 - 48
Found 'DU'-anomaly for variable 'comparator' (lines '69'-'141').69 - 141
Found 'DU'-anomaly for variable 'matchType' (lines '70'-'141').70 - 141
Found 'DU'-anomaly for variable 'headerNames' (lines '71'-'141').71 - 141
Found 'DD'-anomaly for variable 'headerNames' (lines '71'-'118').71 - 118
Found 'DU'-anomaly for variable 'keys' (lines '72'-'141').72 - 141
Found 'DD'-anomaly for variable 'keys' (lines '72'-'128').72 - 128
Found 'DU'-anomaly for variable 'comparator' (lines '93'-'141').93 - 141
Found 'DU'-anomaly for variable 'matchType' (lines '103'-'141').103 - 141
A method should have only one exit point, and that should be the last statement in the method196
Avoid using final local variables, turn them into fields227

org/apache/jsieve/tests/Not.java

ViolationLine
Avoid unnecessary constructors - the compiler will generate these for you39 - 41
Found 'DU'-anomaly for variable 'result' (lines '49'-'61').49 - 61
Found 'DD'-anomaly for variable 'result' (lines '49'-'56').49 - 56

org/apache/jsieve/tests/Size.java

ViolationLine
Avoid unnecessary constructors - the compiler will generate these for you41 - 43
Found 'DD'-anomaly for variable 'comparator' (lines '57'-'67').57 - 67
Found 'DU'-anomaly for variable 'comparator' (lines '57'-'91').57 - 91
Found 'DU'-anomaly for variable 'size' (lines '58'-'91').58 - 91
Found 'DD'-anomaly for variable 'size' (lines '58'-'80').58 - 80
Found 'DD'-anomaly for variable 'isTestPassed' (lines '104'-'106').104 - 106
Found 'DD'-anomaly for variable 'isTestPassed' (lines '104'-'108').104 - 108

org/apache/jsieve/tests/True.java

ViolationLine
Avoid unnecessary constructors - the compiler will generate these for you34 - 36

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

ViolationLine
Assigning an Object to null is a code smell. Consider refactoring.44
Found 'DD'-anomaly for variable 'body' (lines '85'-'86').85 - 86
A method should have only one exit point, and that should be the last statement in the method93

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

ViolationLine
Avoid unnecessary constructors - the compiler will generate these for you42 - 44
Found 'DD'-anomaly for variable 'matchAddress' (lines '73'-'75').73 - 75
Found 'DD'-anomaly for variable 'matchAddress' (lines '73'-'90').73 - 90
Found 'DD'-anomaly for variable 'matchAddress' (lines '75'-'99').75 - 99
Found 'DD'-anomaly for variable 'localEnd' (lines '78'-'84').78 - 84
Found 'DD'-anomaly for variable 'localEnd' (lines '78'-'87').78 - 87
Found 'DD'-anomaly for variable 'domainStart' (lines '79'-'85').79 - 85
Found 'DD'-anomaly for variable 'domainStart' (lines '79'-'88').79 - 88
Found 'DD'-anomaly for variable 'matchAddress' (lines '90'-'99').90 - 99
Found 'DD'-anomaly for variable 'matchKey' (lines '96'-'98').96 - 98
Found 'DD'-anomaly for variable 'matchKey' (lines '96'-'101').96 - 101