PMD Results

The following document contains the results of PMD 6.29.0.

Violations By Priority

Priority 3

org/apache/fulcrum/security/hibernate/HibernateGroupManagerImpl.java

Rule Violation Line
AtLeastOneConstructor Each class should declare at least one constructor 39238
BeanMembersShouldSerialize Found non-transient, non-static member. Please mark as transient or provide accessors. 45
MethodArgumentCouldBeFinal Parameter 'name' is not assigned and could be declared final 59
UnusedAssignment The initializer for variable 'group' is never used (overwritten on line 70) 61
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 6465
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 6465
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 6465
LocalVariableCouldBeFinal Local variable 'groups' could be declared final 6465
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 6465
AvoidDuplicateLiterals The String literal "from " appears 4 times in this file; the first occurrence is on line 65 65
UseLocaleWithCaseConversions When doing a String.toLowerCase()/toUpperCase() call, use a Locale 65
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 66
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 66
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 70
MissingOverride The method 'getAllGroups()' is missing an @Override annotation. 86100
LocalVariableCouldBeFinal Local variable 'groupSet' could be declared final 88
LocalVariableCouldBeFinal Local variable 'groups' could be declared final 92
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 92
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 92
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 92
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 112115
MethodArgumentCouldBeFinal Parameter 'group' is not assigned and could be declared final 112
MissingOverride The method 'removeGroup(Group)' is missing an @Override annotation. 112115
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 114
MethodArgumentCouldBeFinal Parameter 'name' is not assigned and could be declared final 129
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 129142
MethodArgumentCouldBeFinal Parameter 'group' is not assigned and could be declared final 129
MissingOverride The method 'renameGroup(Group, String)' is missing an @Override annotation. 129142
UnusedAssignment The initializer for variable 'groupExists' is never used (overwritten on line 132) 131
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 136
MissingOverride The method 'checkExists(String)' is missing an @Override annotation. 153170
MethodArgumentCouldBeFinal Parameter 'groupName' is not assigned and could be declared final 153
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 158159
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 158159
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 158159
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 158159
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 165
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 165
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 169
MethodArgumentCouldBeFinal Parameter 'group' is not assigned and could be declared final 182
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 182186
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 184
MethodArgumentCouldBeFinal Parameter 'id' is not assigned and could be declared final 212
ShortVariable Avoid variables with short names like id 212
LocalVariableCouldBeFinal Local variable 'groups' could be declared final 221222
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 223
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 223
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 227

org/apache/fulcrum/security/hibernate/HibernatePermissionManagerImpl.java

Rule Violation Line
AtLeastOneConstructor Each class should declare at least one constructor 39211
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 39211
BeanMembersShouldSerialize Found non-transient, non-static member. Please mark as transient or provide accessors. 41
MissingOverride The method 'getAllPermissions()' is missing an @Override annotation. 5063
LocalVariableCouldBeFinal Local variable 'permissionSet' could be declared final 52
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 55
LocalVariableCouldBeFinal Local variable 'permissions' could be declared final 55
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 55
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 55
MethodArgumentCouldBeFinal Parameter 'permission' is not assigned and could be declared final 77
MethodArgumentCouldBeFinal Parameter 'name' is not assigned and could be declared final 77
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 7790
MissingOverride The method 'renamePermission(Permission, String)' is missing an @Override annotation. 7790
UnusedAssignment The initializer for variable 'permissionExists' is never used (overwritten on line 80) 79
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 84
MethodArgumentCouldBeFinal Parameter 'permissionName' is not assigned and could be declared final 101
MissingOverride The method 'checkExists(String)' is missing an @Override annotation. 101118
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 106107
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 106107
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 106107
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 106107
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 113
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 113
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 117
MethodArgumentCouldBeFinal Parameter 'permission' is not assigned and could be declared final 130
MissingOverride The method 'removePermission(Permission)' is missing an @Override annotation. 130142
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 130142
UnusedAssignment The initializer for variable 'permissionExists' is never used (overwritten on line 133) 132
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 136
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 154158
MethodArgumentCouldBeFinal Parameter 'permission' is not assigned and could be declared final 154
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 156
ShortVariable Avoid variables with short names like id 184
MethodArgumentCouldBeFinal Parameter 'id' is not assigned and could be declared final 184
LocalVariableCouldBeFinal Local variable 'permissions' could be declared final 193195
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 196
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 196
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 200

org/apache/fulcrum/security/hibernate/HibernateRoleManagerImpl.java

Rule Violation Line
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 39218
AtLeastOneConstructor Each class should declare at least one constructor 39218
BeanMembersShouldSerialize Found non-transient, non-static member. Please mark as transient or provide accessors. 41
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 5569
MethodArgumentCouldBeFinal Parameter 'role' is not assigned and could be declared final 55
MissingOverride The method 'renameRole(Role, String)' is missing an @Override annotation. 5569
MethodArgumentCouldBeFinal Parameter 'name' is not assigned and could be declared final 55
UnusedAssignment The initializer for variable 'roleExists' is never used (overwritten on line 58) 57
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 62
MethodArgumentCouldBeFinal Parameter 'roleName' is not assigned and could be declared final 80
MissingOverride The method 'checkExists(String)' is missing an @Override annotation. 8097
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 8586
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 8586
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 8586
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 8586
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 92
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 92
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 96
MissingOverride The method 'getAllRoles()' is missing an @Override annotation. 106119
LocalVariableCouldBeFinal Local variable 'roleSet' could be declared final 108
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 111
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 111
LocalVariableCouldBeFinal Local variable 'roles' could be declared final 111
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 111
MethodArgumentCouldBeFinal Parameter 'role' is not assigned and could be declared final 131
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 131135
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 133
MethodArgumentCouldBeFinal Parameter 'role' is not assigned and could be declared final 147
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 147166
MissingOverride The method 'removeRole(Role)' is missing an @Override annotation. 147166
UnusedAssignment The initializer for variable 'roleExists' is never used (overwritten on line 152) 149
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 155
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 162
ShortVariable Avoid variables with short names like id 192
MethodArgumentCouldBeFinal Parameter 'id' is not assigned and could be declared final 192
LocalVariableCouldBeFinal Local variable 'roles' could be declared final 201202
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 203
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 203
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 207

org/apache/fulcrum/security/hibernate/HibernateUserManagerImpl.java

Rule Violation Line
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 38233
AtLeastOneConstructor Each class should declare at least one constructor 38233
BeanMembersShouldSerialize Found non-transient, non-static member. Please mark as transient or provide accessors. 40
MissingOverride The method 'checkExists(String)' is missing an @Override annotation. 5370
MethodArgumentCouldBeFinal Parameter 'userName' is not assigned and could be declared final 53
UnusedAssignment The initializer for variable 'users' is never used (overwritten on line 58) 55
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 5859
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 5859
AvoidDuplicateLiterals The String literal "from " appears 4 times in this file; the first occurrence is on line 58 58
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 5859
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 5859
UseLocaleWithCaseConversions When doing a String.toLowerCase()/toUpperCase() call, use a Locale 59
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 65
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 65
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 69
MethodArgumentCouldBeFinal Parameter 'userName' is not assigned and could be declared final 84
UnusedAssignment The initializer for variable 'users' is never used (overwritten on line 89) 86
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 8990
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 8990
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 8990
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 8990
UseLocaleWithCaseConversions When doing a String.toLowerCase()/toUpperCase() call, use a Locale 90
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 96
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 96
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 100
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 100
MissingOverride The method 'getAllUsers()' is missing an @Override annotation. 114127
LocalVariableCouldBeFinal Local variable 'userSet' could be declared final 116
LocalVariableCouldBeFinal Local variable 'users' could be declared final 119
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 119
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 119
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 119
MissingOverride The method 'removeUser(User)' is missing an @Override annotation. 139142
MethodArgumentCouldBeFinal Parameter 'user' is not assigned and could be declared final 139
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 141
MethodArgumentCouldBeFinal Parameter 'user' is not assigned and could be declared final 154
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 156
MethodArgumentCouldBeFinal Parameter 'user' is not assigned and could be declared final 170
MissingOverride The method 'saveUser(User)' is missing an @Override annotation. 170182
UnusedAssignment The initializer for variable 'userExists' is never used (overwritten on line 173) 172
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 176
MethodArgumentCouldBeFinal Parameter 'id' is not assigned and could be declared final 208
ShortVariable Avoid variables with short names like id 208
LocalVariableCouldBeFinal Local variable 'users' could be declared final 216217
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 218
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 218
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 222

org/apache/fulcrum/security/hibernate/PersistenceHelper.java

Rule Violation Line
AvoidUncheckedExceptionsInSignatures A method or constructor should not explicitly declare unchecked exceptions in its 'throws' clause 46

org/apache/fulcrum/security/hibernate/PersistenceHelperDefaultImpl.java

Rule Violation Line
AtLeastOneConstructor Each class should declare at least one constructor 44261
BeanMembersShouldSerialize Found non-transient, non-static member. Please mark as transient or provide accessors. 46
BeanMembersShouldSerialize Found non-transient, non-static member. Please mark as transient or provide accessors. 48
MethodArgumentCouldBeFinal Parameter 'entity' is not assigned and could be declared final 58
MissingOverride The method 'removeEntity(SecurityEntity)' is missing an @Override annotation. 5881
LocalVariableCouldBeFinal Local variable 'session' could be declared final 64
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 65
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 66
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 68
MethodArgumentCouldBeFinal Parameter 'entity' is not assigned and could be declared final 91
MissingOverride The method 'updateEntity(SecurityEntity)' is missing an @Override annotation. 91122
LocalVariableCouldBeFinal Local variable 'session' could be declared final 97
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 98
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 99
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 101
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 105
MethodArgumentCouldBeFinal Parameter 'entity' is not assigned and could be declared final 132
MissingOverride The method 'addEntity(SecurityEntity)' is missing an @Override annotation. 132155
LocalVariableCouldBeFinal Local variable 'session' could be declared final 138
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 139
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 140
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 142
MissingOverride The method 'retrieveSession()' is missing an @Override annotation. 163170
AvoidUncheckedExceptionsInSignatures A method or constructor should not explicitly declare unchecked exceptions in its 'throws' clause 163
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 167
MissingOverride The method 'getConfiguration()' is missing an @Override annotation. 175178
MethodArgumentCouldBeFinal Parameter 'sessionFactory' is not assigned and could be declared final 186
AvoidUncheckedExceptionsInSignatures A method or constructor should not explicitly declare unchecked exceptions in its 'throws' clause 196
MissingOverride The method 'initialize()' is missing an @Override annotation. 204207
SignatureDeclareThrowsException A method/constructor should not explicitly throw java.lang.Exception 204
MethodArgumentCouldBeFinal Parameter 'conf' is not assigned and could be declared final 222
MissingOverride The method 'configure(org.apache.avalon.framework.configuration.Configuration)' is missing an @Override annotation. 222260
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 227
LocalVariableCouldBeFinal Local variable 'props' could be declared final 227
LocalVariableCouldBeFinal Local variable 'prop' could be declared final 229
LocalVariableCouldBeFinal Local variable 'value' could be declared final 231
LocalVariableCouldBeFinal Local variable 'key' could be declared final 232
ConfusingTernary Avoid if (x != y) ..; else ..; 234241
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 245
LocalVariableCouldBeFinal Local variable 'maps' could be declared final 245
LocalVariableCouldBeFinal Local variable 'map' could be declared final 247
LocalVariableCouldBeFinal Local variable 'value' could be declared final 249
ConfusingTernary Avoid if (x != y) ..; else ..; 251258

org/apache/fulcrum/security/hibernate/basic/HibernateModelManagerImpl.java

Rule Violation Line
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 40200
AtLeastOneConstructor Each class should declare at least one constructor 40200
BeanMembersShouldSerialize Found non-transient, non-static member. Please mark as transient or provide accessors. 42
MethodArgumentCouldBeFinal Parameter 'group' is not assigned and could be declared final 56
MissingOverride The method 'grant(User, Group)' is missing an @Override annotation. 5697
CyclomaticComplexity The method 'grant(User, Group)' has a cyclomatic complexity of 10. 5697
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 5697
MethodArgumentCouldBeFinal Parameter 'user' is not assigned and could be declared final 56
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 64
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 65
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 68
LocalVariableCouldBeFinal Local variable 'session' could be declared final 68
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 69
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 72
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 73
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 75
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 78
MethodArgumentCouldBeFinal Parameter 'user' is not assigned and could be declared final 111
MissingOverride The method 'revoke(User, Group)' is missing an @Override annotation. 111152
MethodArgumentCouldBeFinal Parameter 'group' is not assigned and could be declared final 111
CyclomaticComplexity The method 'revoke(User, Group)' has a cyclomatic complexity of 10. 111152
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 111152
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 119
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 120
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 123
LocalVariableCouldBeFinal Local variable 'session' could be declared final 123
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 124
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 127
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 128
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 130
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 133
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 166186
MissingOverride The method 'revokeAll(User)' is missing an @Override annotation. 166186
MethodArgumentCouldBeFinal Parameter 'user' is not assigned and could be declared final 166
UnusedAssignment The initializer for variable 'userExists' is never used (overwritten on line 169) 168
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 169
LocalVariableCouldBeFinal Local variable 'groups' could be declared final 172
LocalVariableCouldBeFinal Local variable 'group2' could be declared final 174
LocalVariableCouldBeFinal Local variable 'group' could be declared final 176

org/apache/fulcrum/security/hibernate/dynamic/HibernateModelManagerImpl.java

Rule Violation Line
AtLeastOneConstructor Each class should declare at least one constructor 44353
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 44353
GodClass Possible God Class (WMC=59, ATFD=25, TCC=0.000%) 44353
BeanMembersShouldSerialize Found non-transient, non-static member. Please mark as transient or provide accessors. 46
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 6088
MethodArgumentCouldBeFinal Parameter 'group' is not assigned and could be declared final 60
MissingOverride The method 'revoke(Group, Role)' is missing an @Override annotation. 6088
MethodArgumentCouldBeFinal Parameter 'role' is not assigned and could be declared final 60
UnusedAssignment The initializer for variable 'groupExists' is never used (overwritten on line 66) 62
UnusedAssignment The initializer for variable 'roleExists' is never used (overwritten on line 67) 63
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 66
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 67
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 72
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 76
AvoidDuplicateLiterals The String literal "Unknown group '" appears 4 times in this file; the first occurrence is on line 82 82
AvoidDuplicateLiterals The String literal "Unknown role '" appears 4 times in this file; the first occurrence is on line 86 86
MissingOverride The method 'grant(Role, Permission)' is missing an @Override annotation. 102131
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 102131
MethodArgumentCouldBeFinal Parameter 'permission' is not assigned and could be declared final 102
MethodArgumentCouldBeFinal Parameter 'role' is not assigned and could be declared final 102
UnusedAssignment The initializer for variable 'roleExists' is never used (overwritten on line 108) 104
UnusedAssignment The initializer for variable 'permissionExists' is never used (overwritten on line 109) 105
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 108
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 109
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 115
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 116
MissingOverride The method 'revoke(Role, Permission)' is missing an @Override annotation. 145173
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 145173
MethodArgumentCouldBeFinal Parameter 'permission' is not assigned and could be declared final 145
MethodArgumentCouldBeFinal Parameter 'role' is not assigned and could be declared final 145
UnusedAssignment The initializer for variable 'roleExists' is never used (overwritten on line 151) 147
UnusedAssignment The initializer for variable 'permissionExists' is never used (overwritten on line 152) 148
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 151
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 152
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 157
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 158
MissingOverride The method 'grant(User, Group)' is missing an @Override annotation. 187215
MethodArgumentCouldBeFinal Parameter 'group' is not assigned and could be declared final 187
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 187215
MethodArgumentCouldBeFinal Parameter 'user' is not assigned and could be declared final 187
UnusedAssignment The initializer for variable 'groupExists' is never used (overwritten on line 193) 189
UnusedAssignment The initializer for variable 'userExists' is never used (overwritten on line 194) 190
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 193
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 194
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 199
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 200
CyclomaticComplexity The method 'revoke(User, Group)' has a cyclomatic complexity of 10. 229270
MethodArgumentCouldBeFinal Parameter 'group' is not assigned and could be declared final 229
MissingOverride The method 'revoke(User, Group)' is missing an @Override annotation. 229270
MethodArgumentCouldBeFinal Parameter 'user' is not assigned and could be declared final 229
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 229270
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 237
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 238
LocalVariableCouldBeFinal Local variable 'session' could be declared final 241
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 241
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 242
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 245
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 246
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 248
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 284313
MethodArgumentCouldBeFinal Parameter 'role' is not assigned and could be declared final 284
MethodArgumentCouldBeFinal Parameter 'group' is not assigned and could be declared final 284
MissingOverride The method 'grant(Group, Role)' is missing an @Override annotation. 284313
UnusedAssignment The initializer for variable 'groupExists' is never used (overwritten on line 290) 286
UnusedAssignment The initializer for variable 'roleExists' is never used (overwritten on line 291) 287
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 290
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 291
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 296
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 297
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 301
MethodArgumentCouldBeFinal Parameter 'delegatee' is not assigned and could be declared final 332
MethodArgumentCouldBeFinal Parameter 'delegator' is not assigned and could be declared final 332
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 336
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 337
MethodArgumentCouldBeFinal Parameter 'delegator' is not assigned and could be declared final 345
MethodArgumentCouldBeFinal Parameter 'delegatee' is not assigned and could be declared final 345
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 350
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 351

org/apache/fulcrum/security/hibernate/turbine/HibernateModelManagerImpl.java

Rule Violation Line
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 43279
GodClass Possible God Class (WMC=51, ATFD=27, TCC=0.000%) 43279
AtLeastOneConstructor Each class should declare at least one constructor 43279
BeanMembersShouldSerialize Found non-transient, non-static member. Please mark as transient or provide accessors. 45
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 5989
MethodArgumentCouldBeFinal Parameter 'role' is not assigned and could be declared final 59
MissingOverride The method 'grant(Role, Permission)' is missing an @Override annotation. 5989
MethodArgumentCouldBeFinal Parameter 'permission' is not assigned and could be declared final 59
UnusedAssignment The initializer for variable 'roleExists' is never used (overwritten on line 65) 61
UnusedAssignment The initializer for variable 'permissionExists' is never used (overwritten on line 66) 62
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 65
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 66
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 72
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 73
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 77
AvoidDuplicateLiterals The String literal "Unknown role '" appears 4 times in this file; the first occurrence is on line 83 83
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 103131
MethodArgumentCouldBeFinal Parameter 'role' is not assigned and could be declared final 103
MissingOverride The method 'revoke(Role, Permission)' is missing an @Override annotation. 103131
MethodArgumentCouldBeFinal Parameter 'permission' is not assigned and could be declared final 103
UnusedAssignment The initializer for variable 'roleExists' is never used (overwritten on line 109) 105
UnusedAssignment The initializer for variable 'permissionExists' is never used (overwritten on line 110) 106
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 109
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 110
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 115
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 116
MethodArgumentCouldBeFinal Parameter 'group' is not assigned and could be declared final 159
MethodArgumentCouldBeFinal Parameter 'role' is not assigned and could be declared final 159
MethodArgumentCouldBeFinal Parameter 'user' is not assigned and could be declared final 159
MissingOverride The method 'grant(User, Group, Role)' is missing an @Override annotation. 159199
CyclomaticComplexity The method 'grant(User, Group, Role)' has a cyclomatic complexity of 12. 159199
UnusedAssignment The initializer for variable 'roleExists' is never used (overwritten on line 166) 161
UnusedAssignment The initializer for variable 'userExists' is never used (overwritten on line 167) 162
UnusedAssignment The initializer for variable 'groupExists' is never used (overwritten on line 168) 163
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 166
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 167
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 168
LocalVariableCouldBeFinal Local variable 'ugr' could be declared final 171
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 178
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 179
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 180
CyclomaticComplexity The method 'revoke(User, Group, Role)' has a cyclomatic complexity of 18. 215269
MethodArgumentCouldBeFinal Parameter 'user' is not assigned and could be declared final 215
MethodArgumentCouldBeFinal Parameter 'group' is not assigned and could be declared final 215
MethodArgumentCouldBeFinal Parameter 'role' is not assigned and could be declared final 215
MissingOverride The method 'revoke(User, Group, Role)' is missing an @Override annotation. 215269
UnusedAssignment The initializer for variable 'roleExists' is never used (overwritten on line 222) 217
UnusedAssignment The initializer for variable 'userExists' is never used (overwritten on line 223) 218
UnusedAssignment The initializer for variable 'groupExists' is never used (overwritten on line 224) 219
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 222
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 223
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 224
LocalVariableCouldBeFinal Local variable 'ugr' could be declared final 228
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 230
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 230
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 230
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 238
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 239
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 240
MethodArgumentCouldBeFinal Parameter 'oldRole' is not assigned and could be declared final 272
MethodArgumentCouldBeFinal Parameter 'user' is not assigned and could be declared final 272
MethodArgumentCouldBeFinal Parameter 'newRole' is not assigned and could be declared final 272
LocalVariableCouldBeFinal Local variable 'group' could be declared final 275

Priority 4

org/apache/fulcrum/security/hibernate/HibernateGroupManagerImpl.java

Rule Violation Line
UnusedImports Avoid unused imports such as 'org.apache.fulcrum.security.util.EntityExistsException' 26
UselessParentheses Useless parentheses. 169

org/apache/fulcrum/security/hibernate/HibernatePermissionManagerImpl.java

Rule Violation Line
UnusedImports Avoid unused imports such as 'org.apache.fulcrum.security.util.EntityExistsException' 26
UselessParentheses Useless parentheses. 117

org/apache/fulcrum/security/hibernate/HibernateRoleManagerImpl.java

Rule Violation Line
UnusedImports Avoid unused imports such as 'org.apache.fulcrum.security.util.EntityExistsException' 26
UselessParentheses Useless parentheses. 96

org/apache/fulcrum/security/hibernate/HibernateUserManagerImpl.java

Rule Violation Line
UnusedImports Avoid unused imports such as 'org.apache.fulcrum.security.util.EntityExistsException' 26
UselessParentheses Useless parentheses. 69

org/apache/fulcrum/security/hibernate/PersistenceHelperDefaultImpl.java

Rule Violation Line
UnusedImports Avoid unused imports such as 'org.apache.fulcrum.security.util.UnknownEntityException' 28

Priority 5

org/apache/fulcrum/security/hibernate/HibernateGroupManagerImpl.java

Rule Violation Line
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'group' (lines '61'-'70'). 6170
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'group' (lines '61'-'77'). 6177
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'group' (lines '70'-'77'). 7077
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'groupExists' (lines '131'-'132'). 131132
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'groups' (lines '158'-'170'). 158170
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'group' (lines '215'-'237'). 215237
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'group' (lines '215'-'227'). 215227
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'group' (lines '227'-'237'). 227237

org/apache/fulcrum/security/hibernate/HibernatePermissionManagerImpl.java

Rule Violation Line
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'permissionExists' (lines '79'-'80'). 7980
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'permissions' (lines '106'-'118'). 106118
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'permissionExists' (lines '132'-'133'). 132133
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'permission' (lines '187'-'210'). 187210
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'permission' (lines '187'-'200'). 187200
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'permission' (lines '200'-'210'). 200210

org/apache/fulcrum/security/hibernate/HibernateRoleManagerImpl.java

Rule Violation Line
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'roleExists' (lines '57'-'58'). 5758
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'roles' (lines '85'-'97'). 8597
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'roleExists' (lines '149'-'152'). 149152
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'role' (lines '195'-'207'). 195207
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'role' (lines '195'-'217'). 195217
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'role' (lines '207'-'217'). 207217

org/apache/fulcrum/security/hibernate/HibernateUserManagerImpl.java

Rule Violation Line
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'users' (lines '55'-'58'). 5558
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'users' (lines '58'-'70'). 5870
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'users' (lines '86'-'89'). 8689
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'users' (lines '89'-'105'). 89105
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'userExists' (lines '172'-'173'). 172173
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'user' (lines '210'-'232'). 210232
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'user' (lines '210'-'222'). 210222
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'user' (lines '222'-'232'). 222232

org/apache/fulcrum/security/hibernate/PersistenceHelperDefaultImpl.java

Rule Violation Line
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'transaction' (lines '60'-'65'). 6065
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'transaction' (lines '68'-'81'). 6881
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'transaction' (lines '93'-'98'). 9398
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'transaction' (lines '101'-'122'). 101122
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'transaction' (lines '134'-'139'). 134139
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'transaction' (lines '142'-'155'). 142155

org/apache/fulcrum/security/hibernate/basic/HibernateModelManagerImpl.java

Rule Violation Line
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'groupExists' (lines '58'-'64'). 5864
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'userExists' (lines '59'-'65'). 5965
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'transaction' (lines '60'-'69'). 6069
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'transaction' (lines '60'-'97'). 6097
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'transaction' (lines '75'-'97'). 7597
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'groupExists' (lines '113'-'119'). 113119
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'userExists' (lines '114'-'120'). 114120
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'transaction' (lines '115'-'124'). 115124
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'transaction' (lines '115'-'152'). 115152
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'transaction' (lines '130'-'152'). 130152
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'userExists' (lines '168'-'169'). 168169

org/apache/fulcrum/security/hibernate/dynamic/HibernateModelManagerImpl.java

Rule Violation Line
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'groupExists' (lines '62'-'66'). 6266
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'roleExists' (lines '63'-'67'). 6367
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'roleExists' (lines '104'-'108'). 104108
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'permissionExists' (lines '105'-'109'). 105109
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'roleExists' (lines '147'-'151'). 147151
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'permissionExists' (lines '148'-'152'). 148152
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'groupExists' (lines '189'-'193'). 189193
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'userExists' (lines '190'-'194'). 190194
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'groupExists' (lines '231'-'237'). 231237
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'userExists' (lines '232'-'238'). 232238
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'transaction' (lines '233'-'242'). 233242
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'transaction' (lines '233'-'270'). 233270
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'transaction' (lines '248'-'270'). 248270
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'groupExists' (lines '286'-'290'). 286290
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'roleExists' (lines '287'-'291'). 287291

org/apache/fulcrum/security/hibernate/turbine/HibernateModelManagerImpl.java

Rule Violation Line
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'roleExists' (lines '61'-'65'). 6165
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'permissionExists' (lines '62'-'66'). 6266
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'roleExists' (lines '105'-'109'). 105109
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'permissionExists' (lines '106'-'110'). 106110
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'roleExists' (lines '161'-'166'). 161166
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'userExists' (lines '162'-'167'). 162167
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'groupExists' (lines '163'-'168'). 163168
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'roleExists' (lines '217'-'222'). 217222
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'userExists' (lines '218'-'223'). 218223
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'groupExists' (lines '219'-'224'). 219224
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'ugrFound' (lines '227'-'232'). 227232

Files

org/apache/fulcrum/security/hibernate/HibernateGroupManagerImpl.java

Rule Violation Priority Line
UnusedImports Avoid unused imports such as 'org.apache.fulcrum.security.util.EntityExistsException' 4 26
AtLeastOneConstructor Each class should declare at least one constructor 3 39238
BeanMembersShouldSerialize Found non-transient, non-static member. Please mark as transient or provide accessors. 3 45
MethodArgumentCouldBeFinal Parameter 'name' is not assigned and could be declared final 3 59
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'group' (lines '61'-'70'). 5 6170
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'group' (lines '61'-'77'). 5 6177
UnusedAssignment The initializer for variable 'group' is never used (overwritten on line 70) 3 61
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 6465
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 6465
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 6465
LocalVariableCouldBeFinal Local variable 'groups' could be declared final 3 6465
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 6465
AvoidDuplicateLiterals The String literal "from " appears 4 times in this file; the first occurrence is on line 65 3 65
UseLocaleWithCaseConversions When doing a String.toLowerCase()/toUpperCase() call, use a Locale 3 65
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 3 66
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 3 66
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'group' (lines '70'-'77'). 5 7077
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 3 70
MissingOverride The method 'getAllGroups()' is missing an @Override annotation. 3 86100
LocalVariableCouldBeFinal Local variable 'groupSet' could be declared final 3 88
LocalVariableCouldBeFinal Local variable 'groups' could be declared final 3 92
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 92
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 92
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 92
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 112115
MethodArgumentCouldBeFinal Parameter 'group' is not assigned and could be declared final 3 112
MissingOverride The method 'removeGroup(Group)' is missing an @Override annotation. 3 112115
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 114
MethodArgumentCouldBeFinal Parameter 'name' is not assigned and could be declared final 3 129
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 129142
MethodArgumentCouldBeFinal Parameter 'group' is not assigned and could be declared final 3 129
MissingOverride The method 'renameGroup(Group, String)' is missing an @Override annotation. 3 129142
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'groupExists' (lines '131'-'132'). 5 131132
UnusedAssignment The initializer for variable 'groupExists' is never used (overwritten on line 132) 3 131
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 136
MissingOverride The method 'checkExists(String)' is missing an @Override annotation. 3 153170
MethodArgumentCouldBeFinal Parameter 'groupName' is not assigned and could be declared final 3 153
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 158159
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 158159
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 158159
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'groups' (lines '158'-'170'). 5 158170
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 158159
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 3 165
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 165
UselessParentheses Useless parentheses. 4 169
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 3 169
MethodArgumentCouldBeFinal Parameter 'group' is not assigned and could be declared final 3 182
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 182186
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 184
MethodArgumentCouldBeFinal Parameter 'id' is not assigned and could be declared final 3 212
ShortVariable Avoid variables with short names like id 3 212
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'group' (lines '215'-'237'). 5 215237
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'group' (lines '215'-'227'). 5 215227
LocalVariableCouldBeFinal Local variable 'groups' could be declared final 3 221222
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 3 223
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 3 223
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'group' (lines '227'-'237'). 5 227237
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 3 227

org/apache/fulcrum/security/hibernate/HibernatePermissionManagerImpl.java

Rule Violation Priority Line
UnusedImports Avoid unused imports such as 'org.apache.fulcrum.security.util.EntityExistsException' 4 26
AtLeastOneConstructor Each class should declare at least one constructor 3 39211
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 39211
BeanMembersShouldSerialize Found non-transient, non-static member. Please mark as transient or provide accessors. 3 41
MissingOverride The method 'getAllPermissions()' is missing an @Override annotation. 3 5063
LocalVariableCouldBeFinal Local variable 'permissionSet' could be declared final 3 52
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 55
LocalVariableCouldBeFinal Local variable 'permissions' could be declared final 3 55
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 55
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 55
MethodArgumentCouldBeFinal Parameter 'permission' is not assigned and could be declared final 3 77
MethodArgumentCouldBeFinal Parameter 'name' is not assigned and could be declared final 3 77
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 7790
MissingOverride The method 'renamePermission(Permission, String)' is missing an @Override annotation. 3 7790
UnusedAssignment The initializer for variable 'permissionExists' is never used (overwritten on line 80) 3 79
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'permissionExists' (lines '79'-'80'). 5 7980
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 84
MethodArgumentCouldBeFinal Parameter 'permissionName' is not assigned and could be declared final 3 101
MissingOverride The method 'checkExists(String)' is missing an @Override annotation. 3 101118
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 106107
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 106107
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 106107
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 106107
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'permissions' (lines '106'-'118'). 5 106118
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 113
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 3 113
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 3 117
UselessParentheses Useless parentheses. 4 117
MethodArgumentCouldBeFinal Parameter 'permission' is not assigned and could be declared final 3 130
MissingOverride The method 'removePermission(Permission)' is missing an @Override annotation. 3 130142
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 130142
UnusedAssignment The initializer for variable 'permissionExists' is never used (overwritten on line 133) 3 132
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'permissionExists' (lines '132'-'133'). 5 132133
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 136
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 154158
MethodArgumentCouldBeFinal Parameter 'permission' is not assigned and could be declared final 3 154
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 156
ShortVariable Avoid variables with short names like id 3 184
MethodArgumentCouldBeFinal Parameter 'id' is not assigned and could be declared final 3 184
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'permission' (lines '187'-'210'). 5 187210
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'permission' (lines '187'-'200'). 5 187200
LocalVariableCouldBeFinal Local variable 'permissions' could be declared final 3 193195
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 3 196
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 3 196
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 3 200
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'permission' (lines '200'-'210'). 5 200210

org/apache/fulcrum/security/hibernate/HibernateRoleManagerImpl.java

Rule Violation Priority Line
UnusedImports Avoid unused imports such as 'org.apache.fulcrum.security.util.EntityExistsException' 4 26
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 39218
AtLeastOneConstructor Each class should declare at least one constructor 3 39218
BeanMembersShouldSerialize Found non-transient, non-static member. Please mark as transient or provide accessors. 3 41
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 5569
MethodArgumentCouldBeFinal Parameter 'role' is not assigned and could be declared final 3 55
MissingOverride The method 'renameRole(Role, String)' is missing an @Override annotation. 3 5569
MethodArgumentCouldBeFinal Parameter 'name' is not assigned and could be declared final 3 55
UnusedAssignment The initializer for variable 'roleExists' is never used (overwritten on line 58) 3 57
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'roleExists' (lines '57'-'58'). 5 5758
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 62
MethodArgumentCouldBeFinal Parameter 'roleName' is not assigned and could be declared final 3 80
MissingOverride The method 'checkExists(String)' is missing an @Override annotation. 3 8097
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'roles' (lines '85'-'97'). 5 8597
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 8586
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 8586
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 8586
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 8586
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 92
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 3 92
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 3 96
UselessParentheses Useless parentheses. 4 96
MissingOverride The method 'getAllRoles()' is missing an @Override annotation. 3 106119
LocalVariableCouldBeFinal Local variable 'roleSet' could be declared final 3 108
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 111
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 111
LocalVariableCouldBeFinal Local variable 'roles' could be declared final 3 111
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 111
MethodArgumentCouldBeFinal Parameter 'role' is not assigned and could be declared final 3 131
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 131135
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 133
MethodArgumentCouldBeFinal Parameter 'role' is not assigned and could be declared final 3 147
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 147166
MissingOverride The method 'removeRole(Role)' is missing an @Override annotation. 3 147166
UnusedAssignment The initializer for variable 'roleExists' is never used (overwritten on line 152) 3 149
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'roleExists' (lines '149'-'152'). 5 149152
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 155
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 162
ShortVariable Avoid variables with short names like id 3 192
MethodArgumentCouldBeFinal Parameter 'id' is not assigned and could be declared final 3 192
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'role' (lines '195'-'207'). 5 195207
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'role' (lines '195'-'217'). 5 195217
LocalVariableCouldBeFinal Local variable 'roles' could be declared final 3 201202
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 3 203
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 3 203
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'role' (lines '207'-'217'). 5 207217
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 3 207

org/apache/fulcrum/security/hibernate/HibernateUserManagerImpl.java

Rule Violation Priority Line
UnusedImports Avoid unused imports such as 'org.apache.fulcrum.security.util.EntityExistsException' 4 26
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 38233
AtLeastOneConstructor Each class should declare at least one constructor 3 38233
BeanMembersShouldSerialize Found non-transient, non-static member. Please mark as transient or provide accessors. 3 40
MissingOverride The method 'checkExists(String)' is missing an @Override annotation. 3 5370
MethodArgumentCouldBeFinal Parameter 'userName' is not assigned and could be declared final 3 53
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'users' (lines '55'-'58'). 5 5558
UnusedAssignment The initializer for variable 'users' is never used (overwritten on line 58) 3 55
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 5859
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 5859
AvoidDuplicateLiterals The String literal "from " appears 4 times in this file; the first occurrence is on line 58 3 58
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'users' (lines '58'-'70'). 5 5870
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 5859
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 5859
UseLocaleWithCaseConversions When doing a String.toLowerCase()/toUpperCase() call, use a Locale 3 59
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 65
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 3 65
UselessParentheses Useless parentheses. 4 69
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 3 69
MethodArgumentCouldBeFinal Parameter 'userName' is not assigned and could be declared final 3 84
UnusedAssignment The initializer for variable 'users' is never used (overwritten on line 89) 3 86
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'users' (lines '86'-'89'). 5 8689
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'users' (lines '89'-'105'). 5 89105
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 8990
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 8990
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 8990
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 8990
UseLocaleWithCaseConversions When doing a String.toLowerCase()/toUpperCase() call, use a Locale 3 90
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 3 96
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 96
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 100
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 3 100
MissingOverride The method 'getAllUsers()' is missing an @Override annotation. 3 114127
LocalVariableCouldBeFinal Local variable 'userSet' could be declared final 3 116
LocalVariableCouldBeFinal Local variable 'users' could be declared final 3 119
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 119
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 119
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 119
MissingOverride The method 'removeUser(User)' is missing an @Override annotation. 3 139142
MethodArgumentCouldBeFinal Parameter 'user' is not assigned and could be declared final 3 139
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 141
MethodArgumentCouldBeFinal Parameter 'user' is not assigned and could be declared final 3 154
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 156
MethodArgumentCouldBeFinal Parameter 'user' is not assigned and could be declared final 3 170
MissingOverride The method 'saveUser(User)' is missing an @Override annotation. 3 170182
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'userExists' (lines '172'-'173'). 5 172173
UnusedAssignment The initializer for variable 'userExists' is never used (overwritten on line 173) 3 172
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 176
MethodArgumentCouldBeFinal Parameter 'id' is not assigned and could be declared final 3 208
ShortVariable Avoid variables with short names like id 3 208
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'user' (lines '210'-'232'). 5 210232
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'user' (lines '210'-'222'). 5 210222
LocalVariableCouldBeFinal Local variable 'users' could be declared final 3 216217
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 3 218
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 3 218
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'user' (lines '222'-'232'). 5 222232
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 3 222

org/apache/fulcrum/security/hibernate/PersistenceHelper.java

Rule Violation Priority Line
AvoidUncheckedExceptionsInSignatures A method or constructor should not explicitly declare unchecked exceptions in its 'throws' clause 3 46

org/apache/fulcrum/security/hibernate/PersistenceHelperDefaultImpl.java

Rule Violation Priority Line
UnusedImports Avoid unused imports such as 'org.apache.fulcrum.security.util.UnknownEntityException' 4 28
AtLeastOneConstructor Each class should declare at least one constructor 3 44261
BeanMembersShouldSerialize Found non-transient, non-static member. Please mark as transient or provide accessors. 3 46
BeanMembersShouldSerialize Found non-transient, non-static member. Please mark as transient or provide accessors. 3 48
MethodArgumentCouldBeFinal Parameter 'entity' is not assigned and could be declared final 3 58
MissingOverride The method 'removeEntity(SecurityEntity)' is missing an @Override annotation. 3 5881
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'transaction' (lines '60'-'65'). 5 6065
LocalVariableCouldBeFinal Local variable 'session' could be declared final 3 64
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 3 65
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 3 66
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 68
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'transaction' (lines '68'-'81'). 5 6881
MethodArgumentCouldBeFinal Parameter 'entity' is not assigned and could be declared final 3 91
MissingOverride The method 'updateEntity(SecurityEntity)' is missing an @Override annotation. 3 91122
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'transaction' (lines '93'-'98'). 5 9398
LocalVariableCouldBeFinal Local variable 'session' could be declared final 3 97
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 3 98
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 3 99
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 101
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'transaction' (lines '101'-'122'). 5 101122
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 105
MethodArgumentCouldBeFinal Parameter 'entity' is not assigned and could be declared final 3 132
MissingOverride The method 'addEntity(SecurityEntity)' is missing an @Override annotation. 3 132155
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'transaction' (lines '134'-'139'). 5 134139
LocalVariableCouldBeFinal Local variable 'session' could be declared final 3 138
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 3 139
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 3 140
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 142
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'transaction' (lines '142'-'155'). 5 142155
MissingOverride The method 'retrieveSession()' is missing an @Override annotation. 3 163170
AvoidUncheckedExceptionsInSignatures A method or constructor should not explicitly declare unchecked exceptions in its 'throws' clause 3 163
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 167
MissingOverride The method 'getConfiguration()' is missing an @Override annotation. 3 175178
MethodArgumentCouldBeFinal Parameter 'sessionFactory' is not assigned and could be declared final 3 186
AvoidUncheckedExceptionsInSignatures A method or constructor should not explicitly declare unchecked exceptions in its 'throws' clause 3 196
MissingOverride The method 'initialize()' is missing an @Override annotation. 3 204207
SignatureDeclareThrowsException A method/constructor should not explicitly throw java.lang.Exception 3 204
MethodArgumentCouldBeFinal Parameter 'conf' is not assigned and could be declared final 3 222
MissingOverride The method 'configure(org.apache.avalon.framework.configuration.Configuration)' is missing an @Override annotation. 3 222260
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 227
LocalVariableCouldBeFinal Local variable 'props' could be declared final 3 227
LocalVariableCouldBeFinal Local variable 'prop' could be declared final 3 229
LocalVariableCouldBeFinal Local variable 'value' could be declared final 3 231
LocalVariableCouldBeFinal Local variable 'key' could be declared final 3 232
ConfusingTernary Avoid if (x != y) ..; else ..; 3 234241
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 245
LocalVariableCouldBeFinal Local variable 'maps' could be declared final 3 245
LocalVariableCouldBeFinal Local variable 'map' could be declared final 3 247
LocalVariableCouldBeFinal Local variable 'value' could be declared final 3 249
ConfusingTernary Avoid if (x != y) ..; else ..; 3 251258

org/apache/fulcrum/security/hibernate/basic/HibernateModelManagerImpl.java

Rule Violation Priority Line
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 40200
AtLeastOneConstructor Each class should declare at least one constructor 3 40200
BeanMembersShouldSerialize Found non-transient, non-static member. Please mark as transient or provide accessors. 3 42
MethodArgumentCouldBeFinal Parameter 'group' is not assigned and could be declared final 3 56
MissingOverride The method 'grant(User, Group)' is missing an @Override annotation. 3 5697
CyclomaticComplexity The method 'grant(User, Group)' has a cyclomatic complexity of 10. 3 5697
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 5697
MethodArgumentCouldBeFinal Parameter 'user' is not assigned and could be declared final 3 56
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'groupExists' (lines '58'-'64'). 5 5864
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'userExists' (lines '59'-'65'). 5 5965
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'transaction' (lines '60'-'69'). 5 6069
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'transaction' (lines '60'-'97'). 5 6097
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 64
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 65
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 68
LocalVariableCouldBeFinal Local variable 'session' could be declared final 3 68
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 3 69
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 3 72
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 3 73
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'transaction' (lines '75'-'97'). 5 7597
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 75
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 78
MethodArgumentCouldBeFinal Parameter 'user' is not assigned and could be declared final 3 111
MissingOverride The method 'revoke(User, Group)' is missing an @Override annotation. 3 111152
MethodArgumentCouldBeFinal Parameter 'group' is not assigned and could be declared final 3 111
CyclomaticComplexity The method 'revoke(User, Group)' has a cyclomatic complexity of 10. 3 111152
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 111152
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'groupExists' (lines '113'-'119'). 5 113119
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'userExists' (lines '114'-'120'). 5 114120
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'transaction' (lines '115'-'124'). 5 115124
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'transaction' (lines '115'-'152'). 5 115152
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 119
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 120
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 123
LocalVariableCouldBeFinal Local variable 'session' could be declared final 3 123
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 3 124
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 3 127
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 3 128
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'transaction' (lines '130'-'152'). 5 130152
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 130
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 133
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 166186
MissingOverride The method 'revokeAll(User)' is missing an @Override annotation. 3 166186
MethodArgumentCouldBeFinal Parameter 'user' is not assigned and could be declared final 3 166
UnusedAssignment The initializer for variable 'userExists' is never used (overwritten on line 169) 3 168
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'userExists' (lines '168'-'169'). 5 168169
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 169
LocalVariableCouldBeFinal Local variable 'groups' could be declared final 3 172
LocalVariableCouldBeFinal Local variable 'group2' could be declared final 3 174
LocalVariableCouldBeFinal Local variable 'group' could be declared final 3 176

org/apache/fulcrum/security/hibernate/dynamic/HibernateModelManagerImpl.java

Rule Violation Priority Line
AtLeastOneConstructor Each class should declare at least one constructor 3 44353
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 44353
GodClass Possible God Class (WMC=59, ATFD=25, TCC=0.000%) 3 44353
BeanMembersShouldSerialize Found non-transient, non-static member. Please mark as transient or provide accessors. 3 46
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 6088
MethodArgumentCouldBeFinal Parameter 'group' is not assigned and could be declared final 3 60
MissingOverride The method 'revoke(Group, Role)' is missing an @Override annotation. 3 6088
MethodArgumentCouldBeFinal Parameter 'role' is not assigned and could be declared final 3 60
UnusedAssignment The initializer for variable 'groupExists' is never used (overwritten on line 66) 3 62
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'groupExists' (lines '62'-'66'). 5 6266
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'roleExists' (lines '63'-'67'). 5 6367
UnusedAssignment The initializer for variable 'roleExists' is never used (overwritten on line 67) 3 63
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 66
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 67
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 72
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 76
AvoidDuplicateLiterals The String literal "Unknown group '" appears 4 times in this file; the first occurrence is on line 82 3 82
AvoidDuplicateLiterals The String literal "Unknown role '" appears 4 times in this file; the first occurrence is on line 86 3 86
MissingOverride The method 'grant(Role, Permission)' is missing an @Override annotation. 3 102131
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 102131
MethodArgumentCouldBeFinal Parameter 'permission' is not assigned and could be declared final 3 102
MethodArgumentCouldBeFinal Parameter 'role' is not assigned and could be declared final 3 102
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'roleExists' (lines '104'-'108'). 5 104108
UnusedAssignment The initializer for variable 'roleExists' is never used (overwritten on line 108) 3 104
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'permissionExists' (lines '105'-'109'). 5 105109
UnusedAssignment The initializer for variable 'permissionExists' is never used (overwritten on line 109) 3 105
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 108
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 109
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 115
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 116
MissingOverride The method 'revoke(Role, Permission)' is missing an @Override annotation. 3 145173
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 145173
MethodArgumentCouldBeFinal Parameter 'permission' is not assigned and could be declared final 3 145
MethodArgumentCouldBeFinal Parameter 'role' is not assigned and could be declared final 3 145
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'roleExists' (lines '147'-'151'). 5 147151
UnusedAssignment The initializer for variable 'roleExists' is never used (overwritten on line 151) 3 147
UnusedAssignment The initializer for variable 'permissionExists' is never used (overwritten on line 152) 3 148
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'permissionExists' (lines '148'-'152'). 5 148152
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 151
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 152
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 157
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 158
MissingOverride The method 'grant(User, Group)' is missing an @Override annotation. 3 187215
MethodArgumentCouldBeFinal Parameter 'group' is not assigned and could be declared final 3 187
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 187215
MethodArgumentCouldBeFinal Parameter 'user' is not assigned and could be declared final 3 187
UnusedAssignment The initializer for variable 'groupExists' is never used (overwritten on line 193) 3 189
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'groupExists' (lines '189'-'193'). 5 189193
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'userExists' (lines '190'-'194'). 5 190194
UnusedAssignment The initializer for variable 'userExists' is never used (overwritten on line 194) 3 190
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 193
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 194
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 199
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 200
CyclomaticComplexity The method 'revoke(User, Group)' has a cyclomatic complexity of 10. 3 229270
MethodArgumentCouldBeFinal Parameter 'group' is not assigned and could be declared final 3 229
MissingOverride The method 'revoke(User, Group)' is missing an @Override annotation. 3 229270
MethodArgumentCouldBeFinal Parameter 'user' is not assigned and could be declared final 3 229
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 229270
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'groupExists' (lines '231'-'237'). 5 231237
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'userExists' (lines '232'-'238'). 5 232238
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'transaction' (lines '233'-'242'). 5 233242
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'transaction' (lines '233'-'270'). 5 233270
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 237
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 238
LocalVariableCouldBeFinal Local variable 'session' could be declared final 3 241
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 241
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 3 242
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 3 245
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 3 246
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 248
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'transaction' (lines '248'-'270'). 5 248270
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 284313
MethodArgumentCouldBeFinal Parameter 'role' is not assigned and could be declared final 3 284
MethodArgumentCouldBeFinal Parameter 'group' is not assigned and could be declared final 3 284
MissingOverride The method 'grant(Group, Role)' is missing an @Override annotation. 3 284313
UnusedAssignment The initializer for variable 'groupExists' is never used (overwritten on line 290) 3 286
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'groupExists' (lines '286'-'290'). 5 286290
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'roleExists' (lines '287'-'291'). 5 287291
UnusedAssignment The initializer for variable 'roleExists' is never used (overwritten on line 291) 3 287
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 290
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 291
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 296
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 297
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 301
MethodArgumentCouldBeFinal Parameter 'delegatee' is not assigned and could be declared final 3 332
MethodArgumentCouldBeFinal Parameter 'delegator' is not assigned and could be declared final 3 332
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 336
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 337
MethodArgumentCouldBeFinal Parameter 'delegator' is not assigned and could be declared final 3 345
MethodArgumentCouldBeFinal Parameter 'delegatee' is not assigned and could be declared final 3 345
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 350
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 351

org/apache/fulcrum/security/hibernate/turbine/HibernateModelManagerImpl.java

Rule Violation Priority Line
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 43279
GodClass Possible God Class (WMC=51, ATFD=27, TCC=0.000%) 3 43279
AtLeastOneConstructor Each class should declare at least one constructor 3 43279
BeanMembersShouldSerialize Found non-transient, non-static member. Please mark as transient or provide accessors. 3 45
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 5989
MethodArgumentCouldBeFinal Parameter 'role' is not assigned and could be declared final 3 59
MissingOverride The method 'grant(Role, Permission)' is missing an @Override annotation. 3 5989
MethodArgumentCouldBeFinal Parameter 'permission' is not assigned and could be declared final 3 59
UnusedAssignment The initializer for variable 'roleExists' is never used (overwritten on line 65) 3 61
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'roleExists' (lines '61'-'65'). 5 6165
UnusedAssignment The initializer for variable 'permissionExists' is never used (overwritten on line 66) 3 62
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'permissionExists' (lines '62'-'66'). 5 6266
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 65
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 66
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 72
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 73
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 77
AvoidDuplicateLiterals The String literal "Unknown role '" appears 4 times in this file; the first occurrence is on line 83 3 83
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 103131
MethodArgumentCouldBeFinal Parameter 'role' is not assigned and could be declared final 3 103
MissingOverride The method 'revoke(Role, Permission)' is missing an @Override annotation. 3 103131
MethodArgumentCouldBeFinal Parameter 'permission' is not assigned and could be declared final 3 103
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'roleExists' (lines '105'-'109'). 5 105109
UnusedAssignment The initializer for variable 'roleExists' is never used (overwritten on line 109) 3 105
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'permissionExists' (lines '106'-'110'). 5 106110
UnusedAssignment The initializer for variable 'permissionExists' is never used (overwritten on line 110) 3 106
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 109
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 110
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 115
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 116
MethodArgumentCouldBeFinal Parameter 'group' is not assigned and could be declared final 3 159
MethodArgumentCouldBeFinal Parameter 'role' is not assigned and could be declared final 3 159
MethodArgumentCouldBeFinal Parameter 'user' is not assigned and could be declared final 3 159
MissingOverride The method 'grant(User, Group, Role)' is missing an @Override annotation. 3 159199
CyclomaticComplexity The method 'grant(User, Group, Role)' has a cyclomatic complexity of 12. 3 159199
UnusedAssignment The initializer for variable 'roleExists' is never used (overwritten on line 166) 3 161
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'roleExists' (lines '161'-'166'). 5 161166
UnusedAssignment The initializer for variable 'userExists' is never used (overwritten on line 167) 3 162
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'userExists' (lines '162'-'167'). 5 162167
UnusedAssignment The initializer for variable 'groupExists' is never used (overwritten on line 168) 3 163
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'groupExists' (lines '163'-'168'). 5 163168
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 166
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 167
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 168
LocalVariableCouldBeFinal Local variable 'ugr' could be declared final 3 171
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 178
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 179
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 180
CyclomaticComplexity The method 'revoke(User, Group, Role)' has a cyclomatic complexity of 18. 3 215269
MethodArgumentCouldBeFinal Parameter 'user' is not assigned and could be declared final 3 215
MethodArgumentCouldBeFinal Parameter 'group' is not assigned and could be declared final 3 215
MethodArgumentCouldBeFinal Parameter 'role' is not assigned and could be declared final 3 215
MissingOverride The method 'revoke(User, Group, Role)' is missing an @Override annotation. 3 215269
UnusedAssignment The initializer for variable 'roleExists' is never used (overwritten on line 222) 3 217
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'roleExists' (lines '217'-'222'). 5 217222
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'userExists' (lines '218'-'223'). 5 218223
UnusedAssignment The initializer for variable 'userExists' is never used (overwritten on line 223) 3 218
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'groupExists' (lines '219'-'224'). 5 219224
UnusedAssignment The initializer for variable 'groupExists' is never used (overwritten on line 224) 3 219
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 222
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 223
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 224
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'ugrFound' (lines '227'-'232'). 5 227232
LocalVariableCouldBeFinal Local variable 'ugr' could be declared final 3 228
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 230
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 230
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 230
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 238
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 239
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 240
MethodArgumentCouldBeFinal Parameter 'oldRole' is not assigned and could be declared final 3 272
MethodArgumentCouldBeFinal Parameter 'user' is not assigned and could be declared final 3 272
MethodArgumentCouldBeFinal Parameter 'newRole' is not assigned and could be declared final 3 272
LocalVariableCouldBeFinal Local variable 'group' could be declared final 3 275