PMD Results

The following document contains the results of PMD 6.29.0.

Violations By Priority

Priority 2

org/apache/fulcrum/security/memory/MemoryHelper.java

Rule Violation Line
IntegerInstantiation Avoid instantiating Integer objects. Call Integer.valueOf() instead. 42

Priority 3

org/apache/fulcrum/security/memory/MemoryGroupManagerImpl.java

Rule Violation Line
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 38164
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 41
CallSuperInConstructor It is a good practice to call super() in a constructor 4346
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 45
AssignmentToNonFinalStatic Possible unsafe assignment to a non-final static field in a constructor. 45
MissingOverride The method 'getAllGroups()' is missing an @Override annotation. 5861
MethodArgumentCouldBeFinal Parameter 'group' is not assigned and could be declared final 73
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 7394
MissingOverride The method 'removeGroup(Group)' is missing an @Override annotation. 7394
UnusedAssignment The initializer for variable 'groupExists' is never used (overwritten on line 78) 75
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 89
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 91
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 108129
MethodArgumentCouldBeFinal Parameter 'name' is not assigned and could be declared final 108
MissingOverride The method 'renameGroup(Group, String)' is missing an @Override annotation. 108129
MethodArgumentCouldBeFinal Parameter 'group' is not assigned and could be declared final 108
UnusedAssignment The initializer for variable 'groupExists' is never used (overwritten on line 113) 110
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 125
MissingOverride The method 'checkExists(String)' is missing an @Override annotation. 140143
MethodArgumentCouldBeFinal Parameter 'groupName' is not assigned and could be declared final 140
MethodArgumentCouldBeFinal Parameter 'group' is not assigned and could be declared final 155
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 155162

org/apache/fulcrum/security/memory/MemoryHelper.java

Rule Violation Line
UseUtilityClass All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 3562
RedundantFieldInitializer Avoid using redundant field initializer for 'uniqueId' 38
MethodArgumentCouldBeFinal Parameter 'securityEntities' is not assigned and could be declared final 50
MethodArgumentCouldBeFinal Parameter 'name' is not assigned and could be declared final 50
LocalVariableCouldBeFinal Local variable 'securityEntity' could be declared final 53
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 55

org/apache/fulcrum/security/memory/MemoryPermissionManagerImpl.java

Rule Violation Line
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 39157
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 42
CallSuperInConstructor It is a good practice to call super() in a constructor 4446
MissingOverride The method 'getAllPermissions()' is missing an @Override annotation. 5861
MethodArgumentCouldBeFinal Parameter 'name' is not assigned and could be declared final 75
MissingOverride The method 'renamePermission(Permission, String)' is missing an @Override annotation. 7595
MethodArgumentCouldBeFinal Parameter 'permission' is not assigned and could be declared final 75
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 7595
UnusedAssignment The initializer for variable 'permissionExists' is never used (overwritten on line 80) 77
MethodArgumentCouldBeFinal Parameter 'permissionName' is not assigned and could be declared final 106
MissingOverride The method 'checkExists(String)' is missing an @Override annotation. 106109
MethodArgumentCouldBeFinal Parameter 'permission' is not assigned and could be declared final 121
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 121139
MissingOverride The method 'removePermission(Permission)' is missing an @Override annotation. 121139
UnusedAssignment The initializer for variable 'permissionExists' is never used (overwritten on line 126) 123
MethodArgumentCouldBeFinal Parameter 'permission' is not assigned and could be declared final 151
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 151156

org/apache/fulcrum/security/memory/MemoryRoleManagerImpl.java

Rule Violation Line
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 39160
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 42
CallSuperInConstructor It is a good practice to call super() in a constructor 4447
MethodArgumentCouldBeFinal Parameter 'role' is not assigned and could be declared final 64
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 6484
MissingOverride The method 'renameRole(Role, String)' is missing an @Override annotation. 6484
MethodArgumentCouldBeFinal Parameter 'name' is not assigned and could be declared final 64
UnusedAssignment The initializer for variable 'roleExists' is never used (overwritten on line 69) 66
MissingOverride The method 'checkExists(String)' is missing an @Override annotation. 9396
MethodArgumentCouldBeFinal Parameter 'roleName' is not assigned and could be declared final 93
MissingOverride The method 'getAllRoles()' is missing an @Override annotation. 105108
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 120128
MethodArgumentCouldBeFinal Parameter 'role' is not assigned and could be declared final 120
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 125
MissingOverride The method 'removeRole(Role)' is missing an @Override annotation. 140159
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 140159
MethodArgumentCouldBeFinal Parameter 'role' is not assigned and could be declared final 140
UnusedAssignment The initializer for variable 'roleExists' is never used (overwritten on line 145) 142
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 149

org/apache/fulcrum/security/memory/MemoryUserManagerImpl.java

Rule Violation Line
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 37121
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 41
CallSuperInConstructor It is a good practice to call super() in a constructor 4346
MethodArgumentCouldBeFinal Parameter 'userName' is not assigned and could be declared final 61
MissingOverride The method 'checkExists(String)' is missing an @Override annotation. 6163
MissingOverride The method 'getAllUsers()' is missing an @Override annotation. 7274
MissingOverride The method 'removeUser(User)' is missing an @Override annotation. 8486
MethodArgumentCouldBeFinal Parameter 'user' is not assigned and could be declared final 84
MethodArgumentCouldBeFinal Parameter 'user' is not assigned and could be declared final 96
MissingOverride The method 'saveUser(User)' is missing an @Override annotation. 111120
MethodArgumentCouldBeFinal Parameter 'user' is not assigned and could be declared final 111
UnusedAssignment The initializer for variable 'userExists' is never used (overwritten on line 113) 112

org/apache/fulcrum/security/memory/basic/MemoryModelManagerImpl.java

Rule Violation Line
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 38161
AtLeastOneConstructor Each class should declare at least one constructor 38161
MethodArgumentCouldBeFinal Parameter 'user' is not assigned and could be declared final 52
MethodArgumentCouldBeFinal Parameter 'group' is not assigned and could be declared final 52
MissingOverride The method 'grant(User, Group)' is missing an @Override annotation. 5280
UnusedAssignment The initializer for variable 'groupExists' is never used (overwritten on line 58) 54
UnusedAssignment The initializer for variable 'userExists' is never used (overwritten on line 59) 55
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 58
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 59
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 67
MissingOverride The method 'revoke(User, Group)' is missing an @Override annotation. 95123
MethodArgumentCouldBeFinal Parameter 'group' is not assigned and could be declared final 95
MethodArgumentCouldBeFinal Parameter 'user' is not assigned and could be declared final 95
UnusedAssignment The initializer for variable 'groupExists' is never used (overwritten on line 101) 97
UnusedAssignment The initializer for variable 'userExists' is never used (overwritten on line 102) 98
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 101
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 102
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 110
MethodArgumentCouldBeFinal Parameter 'user' is not assigned and could be declared final 137
MissingOverride The method 'revokeAll(User)' is missing an @Override annotation. 137159
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 137159
UnusedAssignment The initializer for variable 'userExists' is never used (overwritten on line 142) 139
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 142
LocalVariableCouldBeFinal Local variable 'group' could be declared final 145
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 153

org/apache/fulcrum/security/memory/dynamic/MemoryModelManagerImpl.java

Rule Violation Line
GodClass Possible God Class (WMC=54, ATFD=24, TCC=0.000%) 41237
AtLeastOneConstructor Each class should declare at least one constructor 41237
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 41237
MethodArgumentCouldBeFinal Parameter 'user' is not assigned and could be declared final 53
MissingOverride The method 'grant(User, Group)' is missing an @Override annotation. 5374
MethodArgumentCouldBeFinal Parameter 'group' is not assigned and could be declared final 53
UnusedAssignment The initializer for variable 'groupExists' is never used (overwritten on line 57) 54
UnusedAssignment The initializer for variable 'userExists' is never used (overwritten on line 58) 55
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 57
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 58
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 64
AvoidDuplicateLiterals The String literal "Unknown group '" appears 4 times in this file; the first occurrence is on line 69 69
MissingOverride The method 'revoke(User, Group)' is missing an @Override annotation. 85106
MethodArgumentCouldBeFinal Parameter 'group' is not assigned and could be declared final 85
MethodArgumentCouldBeFinal Parameter 'user' is not assigned and could be declared final 85
UnusedAssignment The initializer for variable 'groupExists' is never used (overwritten on line 89) 86
UnusedAssignment The initializer for variable 'userExists' is never used (overwritten on line 90) 87
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 89
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 90
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 96
MissingOverride The method 'grant(Group, Role)' is missing an @Override annotation. 117137
MethodArgumentCouldBeFinal Parameter 'group' is not assigned and could be declared final 117
MethodArgumentCouldBeFinal Parameter 'role' is not assigned and could be declared final 117
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 117137
UnusedAssignment The initializer for variable 'groupExists' is never used (overwritten on line 121) 118
UnusedAssignment The initializer for variable 'roleExists' is never used (overwritten on line 122) 119
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 121
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 122
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 128
AvoidDuplicateLiterals The String literal "Unknown role '" appears 4 times in this file; the first occurrence is on line 135 135
MethodArgumentCouldBeFinal Parameter 'group' is not assigned and could be declared final 148
MissingOverride The method 'revoke(Group, Role)' is missing an @Override annotation. 148169
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 148169
MethodArgumentCouldBeFinal Parameter 'role' is not assigned and could be declared final 148
UnusedAssignment The initializer for variable 'groupExists' is never used (overwritten on line 152) 149
UnusedAssignment The initializer for variable 'roleExists' is never used (overwritten on line 153) 150
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 152
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 153
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 159
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 180202
MissingOverride The method 'grant(Role, Permission)' is missing an @Override annotation. 180202
MethodArgumentCouldBeFinal Parameter 'permission' is not assigned and could be declared final 180
MethodArgumentCouldBeFinal Parameter 'role' is not assigned and could be declared final 180
UnusedAssignment The initializer for variable 'roleExists' is never used (overwritten on line 185) 182
UnusedAssignment The initializer for variable 'permissionExists' is never used (overwritten on line 186) 183
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 185
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 186
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 192
MethodArgumentCouldBeFinal Parameter 'permission' is not assigned and could be declared final 213
MethodArgumentCouldBeFinal Parameter 'role' is not assigned and could be declared final 213
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 213235
MissingOverride The method 'revoke(Role, Permission)' is missing an @Override annotation. 213235
UnusedAssignment The initializer for variable 'roleExists' is never used (overwritten on line 218) 215
UnusedAssignment The initializer for variable 'permissionExists' is never used (overwritten on line 219) 216
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 218
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 219
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 225

org/apache/fulcrum/security/memory/turbine/MemoryTurbineModelManagerImpl.java

Rule Violation Line
AtLeastOneConstructor Each class should declare at least one constructor 43233
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 43233
GodClass Possible God Class (WMC=49, ATFD=26, TCC=0.000%) 43233
MethodArgumentCouldBeFinal Parameter 'role' is not assigned and could be declared final 57
MethodArgumentCouldBeFinal Parameter 'permission' is not assigned and could be declared final 57
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 5785
MissingOverride The method 'grant(Role, Permission)' is missing an @Override annotation. 5785
UnusedAssignment The initializer for variable 'roleExists' is never used (overwritten on line 63) 59
UnusedAssignment The initializer for variable 'permissionExists' is never used (overwritten on line 64) 60
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 63
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 64
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 72
AvoidDuplicateLiterals The String literal "Unknown role '" appears 4 times in this file; the first occurrence is on line 79 79
MissingOverride The method 'revoke(Role, Permission)' is missing an @Override annotation. 99127
MethodArgumentCouldBeFinal Parameter 'role' is not assigned and could be declared final 99
MethodArgumentCouldBeFinal Parameter 'permission' is not assigned and could be declared final 99
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 99127
UnusedAssignment The initializer for variable 'roleExists' is never used (overwritten on line 105) 101
UnusedAssignment The initializer for variable 'permissionExists' is never used (overwritten on line 106) 102
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 105
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 106
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 114
MethodArgumentCouldBeFinal Parameter 'group' is not assigned and could be declared final 129
MissingOverride The method 'grant(User, Group, Role)' is missing an @Override annotation. 129169
MethodArgumentCouldBeFinal Parameter 'user' is not assigned and could be declared final 129
CyclomaticComplexity The method 'grant(User, Group, Role)' has a cyclomatic complexity of 12. 129169
MethodArgumentCouldBeFinal Parameter 'role' is not assigned and could be declared final 129
UnusedAssignment The initializer for variable 'roleExists' is never used (overwritten on line 136) 131
UnusedAssignment The initializer for variable 'userExists' is never used (overwritten on line 137) 132
UnusedAssignment The initializer for variable 'groupExists' is never used (overwritten on line 138) 133
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 136
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 137
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 138
LocalVariableCouldBeFinal Local variable 'ugr' could be declared final 141
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 151
MethodArgumentCouldBeFinal Parameter 'user' is not assigned and could be declared final 171
CyclomaticComplexity The method 'revoke(User, Group, Role)' has a cyclomatic complexity of 18. 171223
MethodArgumentCouldBeFinal Parameter 'group' is not assigned and could be declared final 171
MethodArgumentCouldBeFinal Parameter 'role' is not assigned and could be declared final 171
MissingOverride The method 'revoke(User, Group, Role)' is missing an @Override annotation. 171223
UnusedAssignment The initializer for variable 'roleExists' is never used (overwritten on line 178) 173
UnusedAssignment The initializer for variable 'userExists' is never used (overwritten on line 179) 174
UnusedAssignment The initializer for variable 'groupExists' is never used (overwritten on line 180) 175
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
LocalVariableCouldBeFinal Local variable 'ugr' could be declared final 184
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 186
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 186
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 186
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 205
MethodArgumentCouldBeFinal Parameter 'oldRole' is not assigned and could be declared final 226
MethodArgumentCouldBeFinal Parameter 'newRole' is not assigned and could be declared final 226
MethodArgumentCouldBeFinal Parameter 'user' is not assigned and could be declared final 226
LocalVariableCouldBeFinal Local variable 'group' could be declared final 229

org/apache/fulcrum/security/memory/turbine/MemoryTurbineUserManagerImpl.java

Rule Violation Line
AtLeastOneConstructor Each class should declare at least one constructor 3788
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3788
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 57
MethodArgumentCouldBeFinal Parameter 'user' is not assigned and could be declared final 70
ControlStatementBraces This statement should have braces 77
IfElseStmtsMustUseBraces Avoid using if...else statements without curly braces 77
IfStmtsMustUseBraces Avoid using if statements without curly braces 8182
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 81
LiteralsFirstInComparisons Position literals first in String comparisons 81
ControlStatementBraces This statement should have braces 82

Priority 4

org/apache/fulcrum/security/memory/MemoryPermissionManagerImpl.java

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

org/apache/fulcrum/security/memory/MemoryRoleManagerImpl.java

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

Priority 5

org/apache/fulcrum/security/memory/MemoryGroupManagerImpl.java

Rule Violation Line
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'groupExists' (lines '75'-'78'). 7578
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'groupExists' (lines '110'-'113'). 110113

org/apache/fulcrum/security/memory/MemoryHelper.java

Rule Violation Line
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'exists' (lines '52'-'57'). 5257
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'exists' (lines '57'-'57'). 57

org/apache/fulcrum/security/memory/MemoryPermissionManagerImpl.java

Rule Violation Line
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'permissionExists' (lines '77'-'80'). 7780
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'permissionExists' (lines '123'-'126'). 123126

org/apache/fulcrum/security/memory/MemoryRoleManagerImpl.java

Rule Violation Line
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'roleExists' (lines '66'-'69'). 6669
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'roleExists' (lines '142'-'145'). 142145

org/apache/fulcrum/security/memory/MemoryUserManagerImpl.java

Rule Violation Line
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'userExists' (lines '112'-'113'). 112113

org/apache/fulcrum/security/memory/basic/MemoryModelManagerImpl.java

Rule Violation Line
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'groupExists' (lines '54'-'58'). 5458
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'userExists' (lines '55'-'59'). 5559
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'groupExists' (lines '97'-'101'). 97101
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'userExists' (lines '98'-'102'). 98102
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'userExists' (lines '139'-'142'). 139142

org/apache/fulcrum/security/memory/dynamic/MemoryModelManagerImpl.java

Rule Violation Line
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'groupExists' (lines '54'-'57'). 5457
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'userExists' (lines '55'-'58'). 5558
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'groupExists' (lines '86'-'89'). 8689
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'userExists' (lines '87'-'90'). 8790
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'groupExists' (lines '118'-'121'). 118121
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'roleExists' (lines '119'-'122'). 119122
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'groupExists' (lines '149'-'152'). 149152
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'roleExists' (lines '150'-'153'). 150153
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'roleExists' (lines '182'-'185'). 182185
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'permissionExists' (lines '183'-'186'). 183186
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'roleExists' (lines '215'-'218'). 215218
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'permissionExists' (lines '216'-'219'). 216219

org/apache/fulcrum/security/memory/turbine/MemoryTurbineModelManagerImpl.java

Rule Violation Line
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'roleExists' (lines '59'-'63'). 5963
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'permissionExists' (lines '60'-'64'). 6064
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'roleExists' (lines '101'-'105'). 101105
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'permissionExists' (lines '102'-'106'). 102106
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'roleExists' (lines '131'-'136'). 131136
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'userExists' (lines '132'-'137'). 132137
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'groupExists' (lines '133'-'138'). 133138
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'roleExists' (lines '173'-'178'). 173178
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'userExists' (lines '174'-'179'). 174179
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'groupExists' (lines '175'-'180'). 175180
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'ugrFound' (lines '183'-'188'). 183188

org/apache/fulcrum/security/memory/turbine/MemoryTurbineUserManagerImpl.java

Rule Violation Line
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'user' (lines '52'-'59'). 5259
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'isAnon' (lines '72'-'82'). 7282
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'isAnon' (lines '72'-'77'). 7277
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'isAnon' (lines '72'-'74'). 7274

Files

org/apache/fulcrum/security/memory/MemoryGroupManagerImpl.java

Rule Violation Priority Line
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 38164
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 41
CallSuperInConstructor It is a good practice to call super() in a constructor 3 4346
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 45
AssignmentToNonFinalStatic Possible unsafe assignment to a non-final static field in a constructor. 3 45
MissingOverride The method 'getAllGroups()' is missing an @Override annotation. 3 5861
MethodArgumentCouldBeFinal Parameter 'group' is not assigned and could be declared final 3 73
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 7394
MissingOverride The method 'removeGroup(Group)' is missing an @Override annotation. 3 7394
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'groupExists' (lines '75'-'78'). 5 7578
UnusedAssignment The initializer for variable 'groupExists' is never used (overwritten on line 78) 3 75
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 89
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 91
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 108129
MethodArgumentCouldBeFinal Parameter 'name' is not assigned and could be declared final 3 108
MissingOverride The method 'renameGroup(Group, String)' is missing an @Override annotation. 3 108129
MethodArgumentCouldBeFinal Parameter 'group' is not assigned and could be declared final 3 108
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'groupExists' (lines '110'-'113'). 5 110113
UnusedAssignment The initializer for variable 'groupExists' is never used (overwritten on line 113) 3 110
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 125
MissingOverride The method 'checkExists(String)' is missing an @Override annotation. 3 140143
MethodArgumentCouldBeFinal Parameter 'groupName' is not assigned and could be declared final 3 140
MethodArgumentCouldBeFinal Parameter 'group' is not assigned and could be declared final 3 155
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 155162

org/apache/fulcrum/security/memory/MemoryHelper.java

Rule Violation Priority Line
UseUtilityClass All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 3 3562
RedundantFieldInitializer Avoid using redundant field initializer for 'uniqueId' 3 38
IntegerInstantiation Avoid instantiating Integer objects. Call Integer.valueOf() instead. 2 42
MethodArgumentCouldBeFinal Parameter 'securityEntities' is not assigned and could be declared final 3 50
MethodArgumentCouldBeFinal Parameter 'name' is not assigned and could be declared final 3 50
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'exists' (lines '52'-'57'). 5 5257
LocalVariableCouldBeFinal Local variable 'securityEntity' could be declared final 3 53
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 55
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'exists' (lines '57'-'57'). 5 57

org/apache/fulcrum/security/memory/MemoryPermissionManagerImpl.java

Rule Violation Priority Line
UnusedImports Avoid unused imports such as 'org.apache.fulcrum.security.util.EntityExistsException' 4 27
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 39157
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 42
CallSuperInConstructor It is a good practice to call super() in a constructor 3 4446
MissingOverride The method 'getAllPermissions()' is missing an @Override annotation. 3 5861
MethodArgumentCouldBeFinal Parameter 'name' is not assigned and could be declared final 3 75
MissingOverride The method 'renamePermission(Permission, String)' is missing an @Override annotation. 3 7595
MethodArgumentCouldBeFinal Parameter 'permission' is not assigned and could be declared final 3 75
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 7595
UnusedAssignment The initializer for variable 'permissionExists' is never used (overwritten on line 80) 3 77
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'permissionExists' (lines '77'-'80'). 5 7780
MethodArgumentCouldBeFinal Parameter 'permissionName' is not assigned and could be declared final 3 106
MissingOverride The method 'checkExists(String)' is missing an @Override annotation. 3 106109
MethodArgumentCouldBeFinal Parameter 'permission' is not assigned and could be declared final 3 121
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 121139
MissingOverride The method 'removePermission(Permission)' is missing an @Override annotation. 3 121139
UnusedAssignment The initializer for variable 'permissionExists' is never used (overwritten on line 126) 3 123
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'permissionExists' (lines '123'-'126'). 5 123126
MethodArgumentCouldBeFinal Parameter 'permission' is not assigned and could be declared final 3 151
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 151156

org/apache/fulcrum/security/memory/MemoryRoleManagerImpl.java

Rule Violation Priority Line
UnusedImports Avoid unused imports such as 'org.apache.fulcrum.security.util.EntityExistsException' 4 27
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 39160
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 42
CallSuperInConstructor It is a good practice to call super() in a constructor 3 4447
MethodArgumentCouldBeFinal Parameter 'role' is not assigned and could be declared final 3 64
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 6484
MissingOverride The method 'renameRole(Role, String)' is missing an @Override annotation. 3 6484
MethodArgumentCouldBeFinal Parameter 'name' is not assigned and could be declared final 3 64
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'roleExists' (lines '66'-'69'). 5 6669
UnusedAssignment The initializer for variable 'roleExists' is never used (overwritten on line 69) 3 66
MissingOverride The method 'checkExists(String)' is missing an @Override annotation. 3 9396
MethodArgumentCouldBeFinal Parameter 'roleName' is not assigned and could be declared final 3 93
MissingOverride The method 'getAllRoles()' is missing an @Override annotation. 3 105108
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 120128
MethodArgumentCouldBeFinal Parameter 'role' is not assigned and could be declared final 3 120
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 125
MissingOverride The method 'removeRole(Role)' is missing an @Override annotation. 3 140159
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 140159
MethodArgumentCouldBeFinal Parameter 'role' is not assigned and could be declared final 3 140
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'roleExists' (lines '142'-'145'). 5 142145
UnusedAssignment The initializer for variable 'roleExists' is never used (overwritten on line 145) 3 142
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 149

org/apache/fulcrum/security/memory/MemoryUserManagerImpl.java

Rule Violation Priority Line
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 37121
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 41
CallSuperInConstructor It is a good practice to call super() in a constructor 3 4346
MethodArgumentCouldBeFinal Parameter 'userName' is not assigned and could be declared final 3 61
MissingOverride The method 'checkExists(String)' is missing an @Override annotation. 3 6163
MissingOverride The method 'getAllUsers()' is missing an @Override annotation. 3 7274
MissingOverride The method 'removeUser(User)' is missing an @Override annotation. 3 8486
MethodArgumentCouldBeFinal Parameter 'user' is not assigned and could be declared final 3 84
MethodArgumentCouldBeFinal Parameter 'user' is not assigned and could be declared final 3 96
MissingOverride The method 'saveUser(User)' is missing an @Override annotation. 3 111120
MethodArgumentCouldBeFinal Parameter 'user' is not assigned and could be declared final 3 111
UnusedAssignment The initializer for variable 'userExists' is never used (overwritten on line 113) 3 112
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'userExists' (lines '112'-'113'). 5 112113

org/apache/fulcrum/security/memory/basic/MemoryModelManagerImpl.java

Rule Violation Priority Line
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 38161
AtLeastOneConstructor Each class should declare at least one constructor 3 38161
MethodArgumentCouldBeFinal Parameter 'user' is not assigned and could be declared final 3 52
MethodArgumentCouldBeFinal Parameter 'group' is not assigned and could be declared final 3 52
MissingOverride The method 'grant(User, Group)' is missing an @Override annotation. 3 5280
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'groupExists' (lines '54'-'58'). 5 5458
UnusedAssignment The initializer for variable 'groupExists' is never used (overwritten on line 58) 3 54
UnusedAssignment The initializer for variable 'userExists' is never used (overwritten on line 59) 3 55
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'userExists' (lines '55'-'59'). 5 5559
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 58
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 59
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 67
MissingOverride The method 'revoke(User, Group)' is missing an @Override annotation. 3 95123
MethodArgumentCouldBeFinal Parameter 'group' is not assigned and could be declared final 3 95
MethodArgumentCouldBeFinal Parameter 'user' is not assigned and could be declared final 3 95
UnusedAssignment The initializer for variable 'groupExists' is never used (overwritten on line 101) 3 97
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'groupExists' (lines '97'-'101'). 5 97101
UnusedAssignment The initializer for variable 'userExists' is never used (overwritten on line 102) 3 98
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'userExists' (lines '98'-'102'). 5 98102
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 101
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 102
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 110
MethodArgumentCouldBeFinal Parameter 'user' is not assigned and could be declared final 3 137
MissingOverride The method 'revokeAll(User)' is missing an @Override annotation. 3 137159
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 137159
UnusedAssignment The initializer for variable 'userExists' is never used (overwritten on line 142) 3 139
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'userExists' (lines '139'-'142'). 5 139142
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 142
LocalVariableCouldBeFinal Local variable 'group' could be declared final 3 145
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 153

org/apache/fulcrum/security/memory/dynamic/MemoryModelManagerImpl.java

Rule Violation Priority Line
GodClass Possible God Class (WMC=54, ATFD=24, TCC=0.000%) 3 41237
AtLeastOneConstructor Each class should declare at least one constructor 3 41237
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 41237
MethodArgumentCouldBeFinal Parameter 'user' is not assigned and could be declared final 3 53
MissingOverride The method 'grant(User, Group)' is missing an @Override annotation. 3 5374
MethodArgumentCouldBeFinal Parameter 'group' is not assigned and could be declared final 3 53
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'groupExists' (lines '54'-'57'). 5 5457
UnusedAssignment The initializer for variable 'groupExists' is never used (overwritten on line 57) 3 54
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'userExists' (lines '55'-'58'). 5 5558
UnusedAssignment The initializer for variable 'userExists' is never used (overwritten on line 58) 3 55
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 57
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 58
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 64
AvoidDuplicateLiterals The String literal "Unknown group '" appears 4 times in this file; the first occurrence is on line 69 3 69
MissingOverride The method 'revoke(User, Group)' is missing an @Override annotation. 3 85106
MethodArgumentCouldBeFinal Parameter 'group' is not assigned and could be declared final 3 85
MethodArgumentCouldBeFinal Parameter 'user' is not assigned and could be declared final 3 85
UnusedAssignment The initializer for variable 'groupExists' is never used (overwritten on line 89) 3 86
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'groupExists' (lines '86'-'89'). 5 8689
UnusedAssignment The initializer for variable 'userExists' is never used (overwritten on line 90) 3 87
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'userExists' (lines '87'-'90'). 5 8790
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 89
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 90
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 96
MissingOverride The method 'grant(Group, Role)' is missing an @Override annotation. 3 117137
MethodArgumentCouldBeFinal Parameter 'group' is not assigned and could be declared final 3 117
MethodArgumentCouldBeFinal Parameter 'role' is not assigned and could be declared final 3 117
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 117137
UnusedAssignment The initializer for variable 'groupExists' is never used (overwritten on line 121) 3 118
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'groupExists' (lines '118'-'121'). 5 118121
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'roleExists' (lines '119'-'122'). 5 119122
UnusedAssignment The initializer for variable 'roleExists' is never used (overwritten on line 122) 3 119
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 121
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 122
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 128
AvoidDuplicateLiterals The String literal "Unknown role '" appears 4 times in this file; the first occurrence is on line 135 3 135
MethodArgumentCouldBeFinal Parameter 'group' is not assigned and could be declared final 3 148
MissingOverride The method 'revoke(Group, Role)' is missing an @Override annotation. 3 148169
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 148169
MethodArgumentCouldBeFinal Parameter 'role' is not assigned and could be declared final 3 148
UnusedAssignment The initializer for variable 'groupExists' is never used (overwritten on line 152) 3 149
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'groupExists' (lines '149'-'152'). 5 149152
UnusedAssignment The initializer for variable 'roleExists' is never used (overwritten on line 153) 3 150
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'roleExists' (lines '150'-'153'). 5 150153
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 152
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 153
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 159
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 180202
MissingOverride The method 'grant(Role, Permission)' is missing an @Override annotation. 3 180202
MethodArgumentCouldBeFinal Parameter 'permission' is not assigned and could be declared final 3 180
MethodArgumentCouldBeFinal Parameter 'role' is not assigned and could be declared final 3 180
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'roleExists' (lines '182'-'185'). 5 182185
UnusedAssignment The initializer for variable 'roleExists' is never used (overwritten on line 185) 3 182
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'permissionExists' (lines '183'-'186'). 5 183186
UnusedAssignment The initializer for variable 'permissionExists' is never used (overwritten on line 186) 3 183
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 185
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 186
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 192
MethodArgumentCouldBeFinal Parameter 'permission' is not assigned and could be declared final 3 213
MethodArgumentCouldBeFinal Parameter 'role' is not assigned and could be declared final 3 213
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 213235
MissingOverride The method 'revoke(Role, Permission)' is missing an @Override annotation. 3 213235
UnusedAssignment The initializer for variable 'roleExists' is never used (overwritten on line 218) 3 215
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'roleExists' (lines '215'-'218'). 5 215218
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'permissionExists' (lines '216'-'219'). 5 216219
UnusedAssignment The initializer for variable 'permissionExists' is never used (overwritten on line 219) 3 216
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 218
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 219
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 225

org/apache/fulcrum/security/memory/turbine/MemoryTurbineModelManagerImpl.java

Rule Violation Priority Line
AtLeastOneConstructor Each class should declare at least one constructor 3 43233
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 43233
GodClass Possible God Class (WMC=49, ATFD=26, TCC=0.000%) 3 43233
MethodArgumentCouldBeFinal Parameter 'role' is not assigned and could be declared final 3 57
MethodArgumentCouldBeFinal Parameter 'permission' is not assigned and could be declared final 3 57
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 5785
MissingOverride The method 'grant(Role, Permission)' is missing an @Override annotation. 3 5785
UnusedAssignment The initializer for variable 'roleExists' is never used (overwritten on line 63) 3 59
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'roleExists' (lines '59'-'63'). 5 5963
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'permissionExists' (lines '60'-'64'). 5 6064
UnusedAssignment The initializer for variable 'permissionExists' is never used (overwritten on line 64) 3 60
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 63
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 64
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 72
AvoidDuplicateLiterals The String literal "Unknown role '" appears 4 times in this file; the first occurrence is on line 79 3 79
MissingOverride The method 'revoke(Role, Permission)' is missing an @Override annotation. 3 99127
MethodArgumentCouldBeFinal Parameter 'role' is not assigned and could be declared final 3 99
MethodArgumentCouldBeFinal Parameter 'permission' is not assigned and could be declared final 3 99
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 99127
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'roleExists' (lines '101'-'105'). 5 101105
UnusedAssignment The initializer for variable 'roleExists' is never used (overwritten on line 105) 3 101
UnusedAssignment The initializer for variable 'permissionExists' is never used (overwritten on line 106) 3 102
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'permissionExists' (lines '102'-'106'). 5 102106
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 105
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 106
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 114
MethodArgumentCouldBeFinal Parameter 'group' is not assigned and could be declared final 3 129
MissingOverride The method 'grant(User, Group, Role)' is missing an @Override annotation. 3 129169
MethodArgumentCouldBeFinal Parameter 'user' is not assigned and could be declared final 3 129
CyclomaticComplexity The method 'grant(User, Group, Role)' has a cyclomatic complexity of 12. 3 129169
MethodArgumentCouldBeFinal Parameter 'role' is not assigned and could be declared final 3 129
UnusedAssignment The initializer for variable 'roleExists' is never used (overwritten on line 136) 3 131
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'roleExists' (lines '131'-'136'). 5 131136
UnusedAssignment The initializer for variable 'userExists' is never used (overwritten on line 137) 3 132
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'userExists' (lines '132'-'137'). 5 132137
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'groupExists' (lines '133'-'138'). 5 133138
UnusedAssignment The initializer for variable 'groupExists' is never used (overwritten on line 138) 3 133
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 136
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 137
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 138
LocalVariableCouldBeFinal Local variable 'ugr' could be declared final 3 141
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 151
MethodArgumentCouldBeFinal Parameter 'user' is not assigned and could be declared final 3 171
CyclomaticComplexity The method 'revoke(User, Group, Role)' has a cyclomatic complexity of 18. 3 171223
MethodArgumentCouldBeFinal Parameter 'group' is not assigned and could be declared final 3 171
MethodArgumentCouldBeFinal Parameter 'role' is not assigned and could be declared final 3 171
MissingOverride The method 'revoke(User, Group, Role)' is missing an @Override annotation. 3 171223
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'roleExists' (lines '173'-'178'). 5 173178
UnusedAssignment The initializer for variable 'roleExists' is never used (overwritten on line 178) 3 173
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'userExists' (lines '174'-'179'). 5 174179
UnusedAssignment The initializer for variable 'userExists' is never used (overwritten on line 179) 3 174
UnusedAssignment The initializer for variable 'groupExists' is never used (overwritten on line 180) 3 175
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'groupExists' (lines '175'-'180'). 5 175180
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
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'ugrFound' (lines '183'-'188'). 5 183188
LocalVariableCouldBeFinal Local variable 'ugr' could be declared final 3 184
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 186
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 186
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 186
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 205
MethodArgumentCouldBeFinal Parameter 'oldRole' is not assigned and could be declared final 3 226
MethodArgumentCouldBeFinal Parameter 'newRole' is not assigned and could be declared final 3 226
MethodArgumentCouldBeFinal Parameter 'user' is not assigned and could be declared final 3 226
LocalVariableCouldBeFinal Local variable 'group' could be declared final 3 229

org/apache/fulcrum/security/memory/turbine/MemoryTurbineUserManagerImpl.java

Rule Violation Priority Line
AtLeastOneConstructor Each class should declare at least one constructor 3 3788
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 3788
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'user' (lines '52'-'59'). 5 5259
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 3 57
MethodArgumentCouldBeFinal Parameter 'user' is not assigned and could be declared final 3 70
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'isAnon' (lines '72'-'82'). 5 7282
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'isAnon' (lines '72'-'77'). 5 7277
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'isAnon' (lines '72'-'74'). 5 7274
ControlStatementBraces This statement should have braces 3 77
IfElseStmtsMustUseBraces Avoid using if...else statements without curly braces 3 77
IfStmtsMustUseBraces Avoid using if statements without curly braces 3 8182
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 81
LiteralsFirstInComparisons Position literals first in String comparisons 3 81
ControlStatementBraces This statement should have braces 3 82