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 39–238
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) 64–65
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 64–65
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 64–65
LocalVariableCouldBeFinal Local variable 'groups' could be declared final 64–65
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 64–65
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. 86–100
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 112–115
MethodArgumentCouldBeFinal Parameter 'group' is not assigned and could be declared final 112
MissingOverride The method 'removeGroup(Group)' is missing an @Override annotation. 112–115
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 129–142
MethodArgumentCouldBeFinal Parameter 'group' is not assigned and could be declared final 129
MissingOverride The method 'renameGroup(Group, String)' is missing an @Override annotation. 129–142
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. 153–170
MethodArgumentCouldBeFinal Parameter 'groupName' is not assigned and could be declared final 153
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 158–159
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 158–159
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 158–159
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 158–159
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 182–186
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 221–222
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 39–211
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 39–211
BeanMembersShouldSerialize Found non-transient, non-static member. Please mark as transient or provide accessors. 41
MissingOverride The method 'getAllPermissions()' is missing an @Override annotation. 50–63
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 77–90
MissingOverride The method 'renamePermission(Permission, String)' is missing an @Override annotation. 77–90
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. 101–118
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 106–107
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 106–107
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 106–107
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 106–107
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. 130–142
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 130–142
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 154–158
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 193–195
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 39–218
AtLeastOneConstructor Each class should declare at least one constructor 39–218
BeanMembersShouldSerialize Found non-transient, non-static member. Please mark as transient or provide accessors. 41
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 55–69
MethodArgumentCouldBeFinal Parameter 'role' is not assigned and could be declared final 55
MissingOverride The method 'renameRole(Role, String)' is missing an @Override annotation. 55–69
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. 80–97
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 85–86
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 85–86
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 85–86
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 85–86
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. 106–119
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 131–135
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 147–166
MissingOverride The method 'removeRole(Role)' is missing an @Override annotation. 147–166
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 201–202
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 38–233
AtLeastOneConstructor Each class should declare at least one constructor 38–233
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. 53–70
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) 58–59
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 58–59
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) 58–59
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 58–59
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) 89–90
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 89–90
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 89–90
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 89–90
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. 114–127
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. 139–142
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. 170–182
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 216–217
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 44–261
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. 58–81
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. 91–122
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. 132–155
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. 163–170
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. 175–178
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. 204–207
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. 222–260
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 ..; 234–241
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 ..; 251–258

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

Rule Violation Line
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 40–200
AtLeastOneConstructor Each class should declare at least one constructor 40–200
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. 56–97
CyclomaticComplexity The method 'grant(User, Group)' has a cyclomatic complexity of 10. 56–97
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 56–97
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. 111–152
MethodArgumentCouldBeFinal Parameter 'group' is not assigned and could be declared final 111
CyclomaticComplexity The method 'revoke(User, Group)' has a cyclomatic complexity of 10. 111–152
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 111–152
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 166–186
MissingOverride The method 'revokeAll(User)' is missing an @Override annotation. 166–186
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 44–353
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 44–353
GodClass Possible God Class (WMC=59, ATFD=25, TCC=0.000%) 44–353
BeanMembersShouldSerialize Found non-transient, non-static member. Please mark as transient or provide accessors. 46
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 60–88
MethodArgumentCouldBeFinal Parameter 'group' is not assigned and could be declared final 60
MissingOverride The method 'revoke(Group, Role)' is missing an @Override annotation. 60–88
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. 102–131
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 102–131
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. 145–173
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 145–173
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. 187–215
MethodArgumentCouldBeFinal Parameter 'group' is not assigned and could be declared final 187
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 187–215
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. 229–270
MethodArgumentCouldBeFinal Parameter 'group' is not assigned and could be declared final 229
MissingOverride The method 'revoke(User, Group)' is missing an @Override annotation. 229–270
MethodArgumentCouldBeFinal Parameter 'user' is not assigned and could be declared final 229
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 229–270
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 284–313
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. 284–313
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 43–279
GodClass Possible God Class (WMC=51, ATFD=27, TCC=0.000%) 43–279
AtLeastOneConstructor Each class should declare at least one constructor 43–279
BeanMembersShouldSerialize Found non-transient, non-static member. Please mark as transient or provide accessors. 45
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 59–89
MethodArgumentCouldBeFinal Parameter 'role' is not assigned and could be declared final 59
MissingOverride The method 'grant(Role, Permission)' is missing an @Override annotation. 59–89
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 103–131
MethodArgumentCouldBeFinal Parameter 'role' is not assigned and could be declared final 103
MissingOverride The method 'revoke(Role, Permission)' is missing an @Override annotation. 103–131
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. 159–199
CyclomaticComplexity The method 'grant(User, Group, Role)' has a cyclomatic complexity of 12. 159–199
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. 215–269
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. 215–269
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'). 61–70
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'group' (lines '61'-'77'). 61–77
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'group' (lines '70'-'77'). 70–77
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'groupExists' (lines '131'-'132'). 131–132
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'groups' (lines '158'-'170'). 158–170
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'group' (lines '215'-'237'). 215–237
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'group' (lines '215'-'227'). 215–227
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'group' (lines '227'-'237'). 227–237

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

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

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

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

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

Rule Violation Line
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'users' (lines '55'-'58'). 55–58
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'users' (lines '58'-'70'). 58–70
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'users' (lines '86'-'89'). 86–89
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'users' (lines '89'-'105'). 89–105
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'userExists' (lines '172'-'173'). 172–173
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'user' (lines '210'-'232'). 210–232
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'user' (lines '210'-'222'). 210–222
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'user' (lines '222'-'232'). 222–232

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

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

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

Rule Violation Line
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'groupExists' (lines '58'-'64'). 58–64
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'userExists' (lines '59'-'65'). 59–65
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'transaction' (lines '60'-'69'). 60–69
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'transaction' (lines '60'-'97'). 60–97
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'transaction' (lines '75'-'97'). 75–97
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'groupExists' (lines '113'-'119'). 113–119
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'userExists' (lines '114'-'120'). 114–120
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'transaction' (lines '115'-'124'). 115–124
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'transaction' (lines '115'-'152'). 115–152
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'transaction' (lines '130'-'152'). 130–152
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'userExists' (lines '168'-'169'). 168–169

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

Rule Violation Line
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'groupExists' (lines '62'-'66'). 62–66
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'roleExists' (lines '63'-'67'). 63–67
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'roleExists' (lines '104'-'108'). 104–108
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'permissionExists' (lines '105'-'109'). 105–109
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'roleExists' (lines '147'-'151'). 147–151
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'permissionExists' (lines '148'-'152'). 148–152
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'groupExists' (lines '189'-'193'). 189–193
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'userExists' (lines '190'-'194'). 190–194
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'groupExists' (lines '231'-'237'). 231–237
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'userExists' (lines '232'-'238'). 232–238
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'transaction' (lines '233'-'242'). 233–242
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'transaction' (lines '233'-'270'). 233–270
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'transaction' (lines '248'-'270'). 248–270
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'groupExists' (lines '286'-'290'). 286–290
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'roleExists' (lines '287'-'291'). 287–291

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

Rule Violation Line
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'roleExists' (lines '61'-'65'). 61–65
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'permissionExists' (lines '62'-'66'). 62–66
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'roleExists' (lines '105'-'109'). 105–109
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'permissionExists' (lines '106'-'110'). 106–110
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'roleExists' (lines '161'-'166'). 161–166
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'userExists' (lines '162'-'167'). 162–167
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'groupExists' (lines '163'-'168'). 163–168
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'roleExists' (lines '217'-'222'). 217–222
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'userExists' (lines '218'-'223'). 218–223
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'groupExists' (lines '219'-'224'). 219–224
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'ugrFound' (lines '227'-'232'). 227–232

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 39–238
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 61–70
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'group' (lines '61'-'77'). 5 61–77
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 64–65
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 64–65
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 64–65
LocalVariableCouldBeFinal Local variable 'groups' could be declared final 3 64–65
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 64–65
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 70–77
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 3 70
MissingOverride The method 'getAllGroups()' is missing an @Override annotation. 3 86–100
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 112–115
MethodArgumentCouldBeFinal Parameter 'group' is not assigned and could be declared final 3 112
MissingOverride The method 'removeGroup(Group)' is missing an @Override annotation. 3 112–115
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 129–142
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 129–142
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'groupExists' (lines '131'-'132'). 5 131–132
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 153–170
MethodArgumentCouldBeFinal Parameter 'groupName' is not assigned and could be declared final 3 153
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 158–159
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 158–159
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 158–159
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'groups' (lines '158'-'170'). 5 158–170
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 158–159
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 182–186
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 215–237
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'group' (lines '215'-'227'). 5 215–227
LocalVariableCouldBeFinal Local variable 'groups' could be declared final 3 221–222
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 227–237
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 39–211
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 39–211
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 50–63
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 77–90
MissingOverride The method 'renamePermission(Permission, String)' is missing an @Override annotation. 3 77–90
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 79–80
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 101–118
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 106–107
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 106–107
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 106–107
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 106–107
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'permissions' (lines '106'-'118'). 5 106–118
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 130–142
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 130–142
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 132–133
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 136
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 154–158
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 187–210
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'permission' (lines '187'-'200'). 5 187–200
LocalVariableCouldBeFinal Local variable 'permissions' could be declared final 3 193–195
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 200–210

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 39–218
AtLeastOneConstructor Each class should declare at least one constructor 3 39–218
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 55–69
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 55–69
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 57–58
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 80–97
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'roles' (lines '85'-'97'). 5 85–97
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 85–86
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 85–86
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 85–86
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 85–86
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 106–119
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 131–135
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 147–166
MissingOverride The method 'removeRole(Role)' is missing an @Override annotation. 3 147–166
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 149–152
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 195–207
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'role' (lines '195'-'217'). 5 195–217
LocalVariableCouldBeFinal Local variable 'roles' could be declared final 3 201–202
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 207–217
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 38–233
AtLeastOneConstructor Each class should declare at least one constructor 3 38–233
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 53–70
MethodArgumentCouldBeFinal Parameter 'userName' is not assigned and could be declared final 3 53
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'users' (lines '55'-'58'). 5 55–58
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 58–59
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 58–59
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 58–70
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 58–59
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 58–59
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 86–89
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'users' (lines '89'-'105'). 5 89–105
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 89–90
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 89–90
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 89–90
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 89–90
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 114–127
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 139–142
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 170–182
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'userExists' (lines '172'-'173'). 5 172–173
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 210–232
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'user' (lines '210'-'222'). 5 210–222
LocalVariableCouldBeFinal Local variable 'users' could be declared final 3 216–217
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 222–232
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 44–261
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 58–81
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'transaction' (lines '60'-'65'). 5 60–65
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 68–81
MethodArgumentCouldBeFinal Parameter 'entity' is not assigned and could be declared final 3 91
MissingOverride The method 'updateEntity(SecurityEntity)' is missing an @Override annotation. 3 91–122
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'transaction' (lines '93'-'98'). 5 93–98
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 101–122
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 132–155
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'transaction' (lines '134'-'139'). 5 134–139
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 142–155
MissingOverride The method 'retrieveSession()' is missing an @Override annotation. 3 163–170
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 175–178
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 204–207
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 222–260
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 234–241
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 251–258

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

Rule Violation Priority Line
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 40–200
AtLeastOneConstructor Each class should declare at least one constructor 3 40–200
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 56–97
CyclomaticComplexity The method 'grant(User, Group)' has a cyclomatic complexity of 10. 3 56–97
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 56–97
MethodArgumentCouldBeFinal Parameter 'user' is not assigned and could be declared final 3 56
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'groupExists' (lines '58'-'64'). 5 58–64
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'userExists' (lines '59'-'65'). 5 59–65
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'transaction' (lines '60'-'69'). 5 60–69
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'transaction' (lines '60'-'97'). 5 60–97
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 75–97
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 111–152
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 111–152
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 111–152
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'groupExists' (lines '113'-'119'). 5 113–119
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'userExists' (lines '114'-'120'). 5 114–120
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'transaction' (lines '115'-'124'). 5 115–124
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'transaction' (lines '115'-'152'). 5 115–152
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 130–152
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 166–186
MissingOverride The method 'revokeAll(User)' is missing an @Override annotation. 3 166–186
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 168–169
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 44–353
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 44–353
GodClass Possible God Class (WMC=59, ATFD=25, TCC=0.000%) 3 44–353
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 60–88
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 60–88
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 62–66
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'roleExists' (lines '63'-'67'). 5 63–67
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 102–131
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 102–131
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 104–108
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 105–109
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 145–173
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 145–173
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 147–151
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 148–152
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 187–215
MethodArgumentCouldBeFinal Parameter 'group' is not assigned and could be declared final 3 187
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 187–215
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 189–193
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'userExists' (lines '190'-'194'). 5 190–194
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 229–270
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 229–270
MethodArgumentCouldBeFinal Parameter 'user' is not assigned and could be declared final 3 229
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 229–270
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'groupExists' (lines '231'-'237'). 5 231–237
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'userExists' (lines '232'-'238'). 5 232–238
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'transaction' (lines '233'-'242'). 5 233–242
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'transaction' (lines '233'-'270'). 5 233–270
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 248–270
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 284–313
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 284–313
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 286–290
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'roleExists' (lines '287'-'291'). 5 287–291
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 43–279
GodClass Possible God Class (WMC=51, ATFD=27, TCC=0.000%) 3 43–279
AtLeastOneConstructor Each class should declare at least one constructor 3 43–279
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 59–89
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 59–89
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 61–65
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 62–66
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 103–131
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 103–131
MethodArgumentCouldBeFinal Parameter 'permission' is not assigned and could be declared final 3 103
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'roleExists' (lines '105'-'109'). 5 105–109
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 106–110
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 159–199
CyclomaticComplexity The method 'grant(User, Group, Role)' has a cyclomatic complexity of 12. 3 159–199
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 161–166
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 162–167
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 163–168
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 215–269
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 215–269
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 217–222
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'userExists' (lines '218'-'223'). 5 218–223
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 219–224
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 227–232
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