PMD Results

The following document contains the results of PMD 5.0.2.

Files

org/andromda/timetracker/domain/Timecard.java

Violation Line
Avoid unused imports such as 'java.io.Serializable' 8
Avoid unused imports such as 'java.io.Serializable' 8
Parameter 'status' is not assigned and could be declared final 63
Parameter 'comments' is not assigned and could be declared final 63
Parameter 'startDate' is not assigned and could be declared final 63
Parameter 'startDate' is not assigned and could be declared final 77
Parameter 'comments' is not assigned and could be declared final 77
Parameter 'approver' is not assigned and could be declared final 77
Parameter 'submitter' is not assigned and could be declared final 77
Parameter 'status' is not assigned and could be declared final 77
Parameter 'criteria' is not assigned and could be declared final 89
Parameter 'o' is not assigned and could be declared final 100
The method compareTo() has an NPath complexity of 217 100 - 123
Avoid variables with short names like o 100
Avoid if (x != y) ..; else ..; 103 - 121
Avoid if (x != y) ..; else ..; 111
Useless parentheses. 111
Avoid if (x != y) ..; else ..; 115
Useless parentheses. 115
Useless parentheses. 119
Avoid if (x != y) ..; else ..; 119

org/andromda/timetracker/domain/TimecardDaoImpl.java

Violation Line
Found non-transient, non-static member. Please mark as transient or provide accessors. 23
Private field 'logger' could be made final; it is only initialized in the declaration or constructor. 23
Parameter 'criteria' is not assigned and could be declared final 29
Local variable 'timecardCriteria' could be declared final 32
Local variable 'timecards' could be declared final 66
Parameter 'sourceEntity' is not assigned and could be declared final 79
Parameter 'targetVO' is not assigned and could be declared final 80
Overriding method merely calls super 97 - 101
Avoid unused method parameters such as 'timecardSummaryVO'. 109
Parameter 'timecardSummaryVO' is not assigned and could be declared final 109
Parameter 'timecardSummaryVO' is not assigned and could be declared final 128
Local variable 'entity' could be declared final 131
Parameter 'sourceVO' is not assigned and could be declared final 141
Parameter 'targetEntity' is not assigned and could be declared final 142
Parameter 'copyIfNull' is not assigned and could be declared final 143

org/andromda/timetracker/domain/UserDaoImpl.java

Violation Line
Parameter 'sourceEntity' is not assigned and could be declared final 26
Parameter 'targetVO' is not assigned and could be declared final 27
Line too long 32
Line too long 33
Line too long 34
Overriding method merely calls super 41 - 45
Parameter 'userVO' is not assigned and could be declared final 52
Avoid unused method parameters such as 'userVO'. 52
Parameter 'userVO' is not assigned and could be declared final 71
Local variable 'entity' could be declared final 74
Parameter 'sourceVO' is not assigned and could be declared final 84
Parameter 'targetEntity' is not assigned and could be declared final 85
Parameter 'copyIfNull' is not assigned and could be declared final 86
Parameter 'sourceEntity' is not assigned and could be declared final 100
Parameter 'targetVO' is not assigned and could be declared final 101
Local variable 'srcRoles' could be declared final 106
Avoid variables with short names like i 108
Local variable 'srcRole' could be declared final 109
Parameter 'userDetailsVO' is not assigned and could be declared final 122
Avoid empty catch blocks 131 - 134
Parameter 'userDetailsVO' is not assigned and could be declared final 147
Local variable 'entity' could be declared final 149
Parameter 'sourceVO' is not assigned and could be declared final 159
Parameter 'targetEntity' is not assigned and could be declared final 160
Parameter 'copyIfNull' is not assigned and could be declared final 161
Local variable 'roles' could be declared final 168
Local variable 'userRoleVO' could be declared final 170
System.out.print is used 172

org/andromda/timetracker/domain/UserRoleDaoImpl.java

Violation Line
Parameter 'sourceEntity' is not assigned and could be declared final 21
Parameter 'targetVO' is not assigned and could be declared final 22
Overriding method merely calls super 32 - 36
Parameter 'userRoleVO' is not assigned and could be declared final 43
Avoid empty catch blocks 52 - 55
Parameter 'userRoleVO' is not assigned and could be declared final 68
Local variable 'entity' could be declared final 71
Parameter 'sourceVO' is not assigned and could be declared final 81
Parameter 'targetEntity' is not assigned and could be declared final 82
Parameter 'copyIfNull' is not assigned and could be declared final 83

org/andromda/timetracker/service/TimeTrackingServiceBean.java

Violation Line
Line too long 23
Avoid unnecessary constructors - the compiler will generate these for you 33 - 36
Parameter 'criteria' is not assigned and could be declared final 44
A method/constructor shouldnt explicitly throw java.lang.Exception 45
A method/constructor shouldnt explicitly throw java.lang.Exception 45
Local variable 'timecards' could be declared final 47
This call to Collection.toArray() may be optimizable 49

org/andromda/timetracker/service/UserServiceBean.java

Violation Line
Line too long 25
Avoid unnecessary constructors - the compiler will generate these for you 35 - 38
A method/constructor shouldnt explicitly throw java.lang.Exception 47
A method/constructor shouldnt explicitly throw java.lang.Exception 47
Local variable 'userVOs' could be declared final 49
This call to Collection.toArray() may be optimizable 50
Parameter 'userDetailVO' is not assigned and could be declared final 57
A method/constructor shouldnt explicitly throw java.lang.Exception 58
A method/constructor shouldnt explicitly throw java.lang.Exception 58
Parameter 'username' is not assigned and could be declared final 69
A method/constructor shouldnt explicitly throw java.lang.Exception 69
A method/constructor shouldnt explicitly throw java.lang.Exception 69
Local variable 'user' could be declared final 73
New exception is thrown in catch block, original stack trace may be lost 78
Parameter 'userVO' is not assigned and could be declared final 86
A method/constructor shouldnt explicitly throw java.lang.Exception 87
A method/constructor shouldnt explicitly throw java.lang.Exception 87