Fork me on GitHub

PMD Results

The following document contains the results of PMD 5.3.5.

Files

fr/paris/lutece/plugins/mylutece/modules/directory/authentication/BaseAuthentication.java

Violation Line
Possible God class (WMC=54, ATFD=59, TCC=0.0) 34475
A high number of imports can indicate a high degree of coupling within an object. 34475
The class 'BaseAuthentication' has a Cyclomatic Complexity of 2 (Highest = 21). 92475
The class 'BaseAuthentication' has a Standard Cyclomatic Complexity of 2 (Highest = 14). 92475
The class 'BaseAuthentication' has a Modified Cyclomatic Complexity of 2 (Highest = 14). 92475
Avoid really long methods. 147251
The method 'login' has a Modified Cyclomatic Complexity of 14. 147251
The method login() has an NPath complexity of 5346 147251
The method 'login' has a Cyclomatic Complexity of 21. 147251
The method 'login' has a Standard Cyclomatic Complexity of 14. 147251
Unnecessary use of fully qualified name 'java.util.Date' due to existing import 'java.util.Date' 155
Unnecessary use of fully qualified name 'java.sql.Timestamp' due to existing import 'java.sql.Timestamp' 155
Deeply nested if..then statements are hard to read 179186
Unnecessary use of fully qualified name 'java.util.Date' due to existing import 'java.util.Date' 243
Document empty method 258259
Singleton is not thread safe 429432
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 460

fr/paris/lutece/plugins/mylutece/modules/directory/authentication/business/IMyluteceDirectoryDAO.java

Violation Line
Avoid unused imports such as 'fr.paris.lutece.util.sql.DAOUtil' 37
Avoid unused imports such as 'fr.paris.lutece.util.sql.DAOUtil' 37

fr/paris/lutece/plugins/mylutece/modules/directory/authentication/business/MyluteceDirectoryDAO.java

Violation Line
These nested if statements could be combined 109113

fr/paris/lutece/plugins/mylutece/modules/directory/authentication/business/MyluteceDirectoryHome.java

Violation Line
Avoid unused imports such as 'java.util.Date' 56
Avoid unused imports such as 'java.util.Date' 56
Avoid declaring a variable if it is unreferenced before a possible exit point. 86
Avoid using Literals in Conditional Statements 91

fr/paris/lutece/plugins/mylutece/modules/directory/authentication/business/MyluteceDirectoryUserDAO.java

Violation Line
Possible God class (WMC=61, ATFD=81, TCC=0.008547008547008548) 34647
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 519
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 547
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 574

fr/paris/lutece/plugins/mylutece/modules/directory/authentication/business/MyluteceDirectoryUserHome.java

Violation Line
Possible God class (WMC=47, ATFD=18, TCC=0.004301075268817204) 34553
Avoid declaring a variable if it is unreferenced before a possible exit point. 193
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 207
Avoid using Literals in Conditional Statements 297
Avoid declaring a variable if it is unreferenced before a possible exit point. 333
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 351
Unnecessary use of fully qualified name 'java.sql.Timestamp' due to existing import 'java.sql.Timestamp' 550

fr/paris/lutece/plugins/mylutece/modules/directory/authentication/business/MyluteceDirectoryUserRoleRemovalListener.java

Violation Line
Avoid unnecessary if..then..else statements when returning booleans 6770
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 67

fr/paris/lutece/plugins/mylutece/modules/directory/authentication/business/key/IMyluteceDirectoryUserKeyDAO.java

Violation Line
Avoid modifiers which are implied by the context 81

fr/paris/lutece/plugins/mylutece/modules/directory/authentication/business/parameter/MyluteceDirectoryParameterHome.java

Violation Line
Consider simply returning the value vs storing it in local variable 'nValue' 111

fr/paris/lutece/plugins/mylutece/modules/directory/authentication/service/IMyluteceDirectoryService.java

Violation Line
Avoid modifiers which are implied by the context 84
The String literal "mylutece-directory.transactionManager" appears 8 times in this file; the first occurrence is on line 251 251

fr/paris/lutece/plugins/mylutece/modules/directory/authentication/service/MyluteceDirectoryAccountLifeTimeDaemon.java

Violation Line
Use explicit scoping instead of the default package private level 5051

fr/paris/lutece/plugins/mylutece/modules/directory/authentication/service/MyluteceDirectoryAccountLifeTimeService.java

Violation Line
Private field 'listMailEntryId' could be made final; it is only initialized in the declaration or constructor. 89
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 232
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 233
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 234
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 235
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 236
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 237
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 238
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 239
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 240
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 257
Avoid variables with short names like i 266

fr/paris/lutece/plugins/mylutece/modules/directory/authentication/service/MyluteceDirectoryAnonymizationDaemon.java

Violation Line
Use explicit scoping instead of the default package private level 4950

fr/paris/lutece/plugins/mylutece/modules/directory/authentication/service/MyluteceDirectoryAnonymizationService.java

Violation Line
The class 'MyluteceDirectoryAnonymizationService' has a Cyclomatic Complexity of 4 (Highest = 10). 65165
The class 'MyluteceDirectoryAnonymizationService' has a Modified Cyclomatic Complexity of 4 (Highest = 10). 65165
The class 'MyluteceDirectoryAnonymizationService' has a Standard Cyclomatic Complexity of 4 (Highest = 10). 65165
The method 'anonymizeUser' has a Cyclomatic Complexity of 10. 92155
The method 'anonymizeUser' has a Modified Cyclomatic Complexity of 10. 92155
The method 'anonymizeUser' has a Standard Cyclomatic Complexity of 10. 92155
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 145

fr/paris/lutece/plugins/mylutece/modules/directory/authentication/service/MyluteceDirectoryResourceIdService.java

Violation Line
Avoid variables with short names like rt 62
Avoid variables with short names like p 67

fr/paris/lutece/plugins/mylutece/modules/directory/authentication/service/MyluteceDirectoryService.java

Violation Line
A high number of imports can indicate a high degree of coupling within an object. 34920
Possible God class (WMC=93, ATFD=128, TCC=0.01282051282051282) 34920
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 467
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 530
The String literal "mylutece-directory.transactionManager" appears 10 times in this file; the first occurrence is on line 561 561
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 801
Avoid reassigning parameters such as 'strPassword' 832
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 865
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 896

fr/paris/lutece/plugins/mylutece/modules/directory/authentication/service/MyluteceDirectoryUserFieldListenerService.java

Violation Line
A class which only has private constructors should be final 4564

fr/paris/lutece/plugins/mylutece/modules/directory/authentication/service/key/IMyluteceDirectoryUserKeyService.java

Violation Line
Avoid modifiers which are implied by the context 67

fr/paris/lutece/plugins/mylutece/modules/directory/authentication/service/workflow/TaskDisableMyluteceDirectoryAccount.java

Violation Line
Private field '_myluteceDirectoryService' could be made final; it is only initialized in the declaration or constructor. 66
Document empty method 9899

fr/paris/lutece/plugins/mylutece/modules/directory/authentication/service/workflow/TaskEnableMyluteceDirectoryAccount.java

Violation Line
Private field '_myluteceDirectoryService' could be made final; it is only initialized in the declaration or constructor. 66
Document empty method 9899

fr/paris/lutece/plugins/mylutece/modules/directory/authentication/web/FormErrors.java

Violation Line
Private field '_mapErrors' could be made final; it is only initialized in the declaration or constructor. 49
Private field '_mapLastValues' could be made final; it is only initialized in the declaration or constructor. 50

fr/paris/lutece/plugins/mylutece/modules/directory/authentication/web/MyLuteceDirectoryApp.java

Violation Line
A high number of imports can indicate a high degree of coupling within an object. 341434
Possible God class (WMC=150, ATFD=295, TCC=0.2045977011494253) 341434
Avoid unused imports such as 'java.util.regex.Matcher' 44
Avoid unused imports such as 'java.util.regex.Matcher' 44
Avoid unused imports such as 'java.util.regex.Pattern' 45
Avoid unused imports such as 'java.util.regex.Pattern' 45
No need to import a type that lives in the same package 75
The class 'MyLuteceDirectoryApp' has a Standard Cyclomatic Complexity of 4 (Highest = 19). 1101434
The class 'MyLuteceDirectoryApp' has a Cyclomatic Complexity of 5 (Highest = 21). 1101434
Avoid really long classes. 1101434
The class 'MyLuteceDirectoryApp' has a Modified Cyclomatic Complexity of 4 (Highest = 19). 1101434
Avoid unused private fields such as 'PARAMETER_ACTION_MODIFY_ACCOUNT'. 158
Avoid unused private fields such as 'ERROR_LOGIN_ACCENTS_OR_BLANK'. 183
Avoid unused private fields such as 'PROPERTY_ERROR_LOGIN_ACCENTS'. 241
Private field '_myluteceDirectoryService' could be made final; it is only initialized in the declaration or constructor. 271
Private field '_securityService' could be made final; it is only initialized in the declaration or constructor. 272
Private field '_attributeMappingService' could be made final; it is only initialized in the declaration or constructor. 273
Private field '_userKeyService' could be made final; it is only initialized in the declaration or constructor. 274
Private field '_parameterService' could be made final; it is only initialized in the declaration or constructor. 275
Private field '_recordService' could be made final; it is only initialized in the declaration or constructor. 276
The method 'getPage' has a Modified Cyclomatic Complexity of 12. 301361
The method 'getPage' has a Standard Cyclomatic Complexity of 12. 301361
The method 'getPage' has a Cyclomatic Complexity of 16. 301361
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 469
Avoid declaring a variable if it is unreferenced before a possible exit point. 469
Avoid variables with short names like t 489
Avoid reassigning parameters such as 'formErrors' 513
The method 'getCreateAccountPage' has a Cyclomatic Complexity of 11. 513592
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 516
Avoid variables with short names like t 586
The method 'doCreateAccount' has a Modified Cyclomatic Complexity of 19. 599771
The method doCreateAccount() has an NPath complexity of 419328 599771
Avoid really long methods. 599771
The method 'doCreateAccount' has a Cyclomatic Complexity of 21. 599771
The method 'doCreateAccount' has a Standard Cyclomatic Complexity of 19. 599771
Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 716
Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 754
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 781
Avoid variables with short names like t 791
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 807
Avoid variables with short names like t 817
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 852
Avoid variables with short names like t 866
The method 'doModifyAccount' has a Cyclomatic Complexity of 18. 879999
Avoid really long methods. 879999
The method 'doModifyAccount' has a Modified Cyclomatic Complexity of 14. 879999
The method 'doModifyAccount' has a Standard Cyclomatic Complexity of 14. 879999
Avoid declaring a variable if it is unreferenced before a possible exit point. 883
Avoid declaring a variable if it is unreferenced before a possible exit point. 889
Avoid declaring a variable if it is unreferenced before a possible exit point. 891
Avoid declaring a variable if it is unreferenced before a possible exit point. 892
Avoid declaring a variable if it is unreferenced before a possible exit point. 893
The method 'doSendPassword' has a Modified Cyclomatic Complexity of 12. 10261129
The method 'doSendPassword' has a Standard Cyclomatic Complexity of 12. 10261129
Avoid really long methods. 10261129
The method 'doSendPassword' has a Cyclomatic Complexity of 18. 10261129
The method doSendPassword() has an NPath complexity of 4140 10261129
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 1031
The method 'doSendLogin' has a Cyclomatic Complexity of 13. 11371210
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 1142
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 1273
Avoid variables with short names like t 1285
The method 'updateAccount' has a Cyclomatic Complexity of 12. 13801428

fr/paris/lutece/plugins/mylutece/modules/directory/authentication/web/MyluteceDirectoryJspBean.java

Violation Line
A high number of imports can indicate a high degree of coupling within an object. 34641
Avoid unused imports such as 'fr.paris.lutece.plugins.workflowcore.business.action.ActionFilter' 62
Avoid unused imports such as 'fr.paris.lutece.plugins.workflowcore.business.action.ActionFilter' 62
Avoid unused imports such as 'fr.paris.lutece.plugins.workflowcore.service.action.ActionService' 63
Avoid unused imports such as 'fr.paris.lutece.plugins.workflowcore.service.action.ActionService' 63
Avoid unused imports such as 'fr.paris.lutece.util.ReferenceItem' 80
Avoid unused imports such as 'fr.paris.lutece.util.ReferenceItem' 80
The class 'MyluteceDirectoryJspBean' has a Standard Cyclomatic Complexity of 4 (Highest = 10). 90641
The class 'MyluteceDirectoryJspBean' has a Modified Cyclomatic Complexity of 4 (Highest = 10). 90641
The class 'MyluteceDirectoryJspBean' has a Cyclomatic Complexity of 4 (Highest = 12). 90641
Private field '_nDefaultItemsPerPage' could be made final; it is only initialized in the declaration or constructor. 152
Private field '_myluteceDirectoryService' could be made final; it is only initialized in the declaration or constructor. 156
Private field '_attributeMappingService' could be made final; it is only initialized in the declaration or constructor. 157
It is a good practice to call super() in a constructor 162164
Avoid unnecessary constructors - the compiler will generate these for you 162164
Document empty constructor 162164
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 194
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 201
The method 'getManageMappings' has a Cyclomatic Complexity of 12. 225313
The method 'getManageMappings' has a Standard Cyclomatic Complexity of 10. 225313
The method getManageMappings() has an NPath complexity of 390 225313
The method 'getManageMappings' has a Modified Cyclomatic Complexity of 10. 225313
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 245
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 285
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 334
These nested if statements could be combined 350353
Avoid empty catch blocks 404406
Avoid declaring a variable if it is unreferenced before a possible exit point. 429
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 504
Avoid declaring a variable if it is unreferenced before a possible exit point. 520
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 557

fr/paris/lutece/plugins/mylutece/modules/directory/authentication/web/MyluteceDirectoryUserJspBean.java

Violation Line
Possible God class (WMC=146, ATFD=279, TCC=0.2962962962962963) 341547
A high number of imports can indicate a high degree of coupling within an object. 341547
The class 'MyluteceDirectoryUserJspBean' has a Modified Cyclomatic Complexity of 4 (Highest = 14). 1041547
The class 'MyluteceDirectoryUserJspBean' has a Standard Cyclomatic Complexity of 4 (Highest = 14). 1041547
Avoid really long classes. 1041547
The class 'MyluteceDirectoryUserJspBean' has a Cyclomatic Complexity of 5 (Highest = 21). 1041547
Avoid excessively long variable names like PROPERTY_MESSAGE_CONFIRM_MODIFY_PASSWORD_ENCRYPTION 142
Private field '_nDefaultItemsPerPage' could be made final; it is only initialized in the declaration or constructor. 266
Avoid using implementation types like 'HashMap'; use the interface instead 269
Avoid using implementation types like 'HashMap'; use the interface instead 269
Private field '_myluteceDirectoryService' could be made final; it is only initialized in the declaration or constructor. 270
Private field '_parameterService' could be made final; it is only initialized in the declaration or constructor. 271
Private field '_anonymizationService' could be made final; it is only initialized in the declaration or constructor. 272
Document empty constructor 278280
It is a good practice to call super() in a constructor 278280
Avoid unnecessary constructors - the compiler will generate these for you 278280
Avoid really long methods. 289440
The method getManageRecords() has an NPath complexity of 676 289440
The method 'getManageRecords' has a Standard Cyclomatic Complexity of 13. 289440
The method 'getManageRecords' has a Modified Cyclomatic Complexity of 13. 289440
The method 'getManageRecords' has a Cyclomatic Complexity of 14. 289440
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 294
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 302
Avoid declaring a variable if it is unreferenced before a possible exit point. 317
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 401
The method getModifyUser() has an NPath complexity of 225 449503
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 463
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 470
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 481
The method 'doCreateUser' has a Cyclomatic Complexity of 11. 559617
The method doCreateUser() has an NPath complexity of 600 559617
Avoid declaring a variable if it is unreferenced before a possible exit point. 564
Avoid declaring a variable if it is unreferenced before a possible exit point. 580
Avoid really long methods. 625747
The method 'doModifyUser' has a Modified Cyclomatic Complexity of 14. 625747
The method 'doModifyUser' has a Cyclomatic Complexity of 21. 625747
The method doModifyUser() has an NPath complexity of 11880 625747
The method 'doModifyUser' has a Standard Cyclomatic Complexity of 14. 625747
Avoid declaring a variable if it is unreferenced before a possible exit point. 630
Avoid declaring a variable if it is unreferenced before a possible exit point. 633
Avoid declaring a variable if it is unreferenced before a possible exit point. 642643
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 833
Avoid declaring a variable if it is unreferenced before a possible exit point. 887
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 916
Assigning an Object to null is a code smell. Consider refactoring. 975
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 1210
Avoid declaring a variable if it is unreferenced before a possible exit point. 1294
The method 'getModifyAccountLifeTimeEmails' has a Cyclomatic Complexity of 14. 13331440
The method 'getModifyAccountLifeTimeEmails' has a Standard Cyclomatic Complexity of 14. 13331440
The method getModifyAccountLifeTimeEmails() has an NPath complexity of 300 13331440
Avoid really long methods. 13331440
The method 'getModifyAccountLifeTimeEmails' has a Modified Cyclomatic Complexity of 14. 13331440
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 1337
The method 'doModifyAccountLifeTimeEmails' has a Modified Cyclomatic Complexity of 12. 14471532
The method 'doModifyAccountLifeTimeEmails' has a Standard Cyclomatic Complexity of 12. 14471532
The method 'doModifyAccountLifeTimeEmails' has a Cyclomatic Complexity of 12. 14471532