Fork me on GitHub

PMD Results

The following document contains the results of PMD 6.13.0.

Violations By Priority

Priority 1

fr/paris/lutece/plugins/directories/util/DirectoriesConstants.java

Rule Violation Line
ClassNamingConventions The utility class name 'DirectoriesConstants' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' 4186

fr/paris/lutece/plugins/directories/web/DoDownloadFile.java

Rule Violation Line
ClassNamingConventions The utility class name 'DoDownloadFile' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' 59122

Priority 3

fr/paris/lutece/plugins/directories/business/DirectoryEntity.java

Rule Violation Line
ConfusingTernary Avoid if (x != y) ..; else ..; 147
ConfusingTernary Avoid if (x != y) ..; else ..; 156

fr/paris/lutece/plugins/directories/service/EntryService.java

Rule Violation Line
GodClass Possible God Class (WMC=56, ATFD=115, TCC=12.088%) 62523
LinguisticNaming Linguistics Antipattern - The getter 'getHtmlEntry' should not return void linguistically 97118
AvoidReassigningLoopVariables Avoid reassigning the loop control variable 'field' 104
LinguisticNaming Linguistics Antipattern - The getter 'getHtmlEntryReadOnly' should not return void linguistically 130153
AvoidReassigningLoopVariables Avoid reassigning the loop control variable 'field' 137
CyclomaticComplexity The method 'moveDownEntryOrder(int, Entry)' has a cyclomatic complexity of 16. 225306
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 246276
CyclomaticComplexity The method 'moveUpEntryOrder(int, Entry)' has a cyclomatic complexity of 13. 316379
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 335362
LinguisticNaming Linguistics Antipattern - The getter 'getEntryFields' should not return void linguistically 509521
AvoidReassigningLoopVariables Avoid reassigning the loop control variable 'field' 516

fr/paris/lutece/plugins/directories/service/EntryTypeService.java

Rule Violation Line
NonThreadSafeSingleton Singleton is not thread safe 6972

fr/paris/lutece/plugins/directories/service/entrytype/EntryTypeImage.java

Rule Violation Line
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 113

fr/paris/lutece/plugins/directories/service/entrytype/EntryTypeMyLuteceUserPicker.java

Rule Violation Line
CyclomaticComplexity The method 'getRequestData(Entry, HttpServletRequest, Locale)' has a cyclomatic complexity of 12. 104213
NPathComplexity The method 'getRequestData(Entry, HttpServletRequest, Locale)' has an NPath complexity of 864 104213
ExcessiveMethodLength Avoid really long methods. 104213
NcssCount The method 'getRequestData(Entry, HttpServletRequest, Locale)' has a NCSS line count of 63. 104213
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 107
ConfusingTernary Avoid if (x != y) ..; else ..; 109
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 109
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 110
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 111
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 112
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 114
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 117
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 118
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 119
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 120
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 121
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 122
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 124
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 125
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 233
CyclomaticComplexity The method 'checkEntryErrors(Entry, Field, String, String, List, boolean, Locale)' has a cyclomatic complexity of 13. 270327

fr/paris/lutece/plugins/directories/service/entrytype/EntryTypeRadioButton.java

Rule Violation Line
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 107
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 108
ConfusingTernary Avoid if (x != y) ..; else ..; 108
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 109
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 110
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 111
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 112
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 113
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 114
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 116

fr/paris/lutece/plugins/directories/service/entrytype/EntryTypeSelect.java

Rule Violation Line
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 125128

fr/paris/lutece/plugins/directories/web/AbstractDirectoriesManagerJspBean.java

Rule Violation Line
SingularField Perhaps '_nDefaultItemsPerPage' could be replaced by a local variable. 68

fr/paris/lutece/plugins/directories/web/DirectoriesApp.java

Rule Violation Line
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 82
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 125

fr/paris/lutece/plugins/directories/web/DirectoryEntriesJspBean.java

Rule Violation Line
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 34470
ImmutableField Private field '_entryService' could be made final; it is only initialized in the declaration or constructor. 105
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 114
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 135150
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 159
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 179
CyclomaticComplexity The method 'doCreateEntry(HttpServletRequest)' has a cyclomatic complexity of 11. 201250
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 267
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 267
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 289
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 298301
ConfusingTernary Avoid if (x != y) ..; else ..; 308315
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 308315
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 410

fr/paris/lutece/plugins/directories/web/DirectoryFieldsJspBean.java

Rule Violation Line
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 131
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 139
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 202
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 284
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 285
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 286
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 351

fr/paris/lutece/plugins/directories/web/DirectoryJspBean.java

Rule Violation Line
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 110
ConfusingTernary Avoid if (x != y) ..; else ..; 127

fr/paris/lutece/plugins/directories/web/DirectoryResponseJspBean.java

Rule Violation Line
AddEmptyString Do not add empty strings 170

fr/paris/lutece/plugins/directories/web/DoDownloadFile.java

Rule Violation Line
ConfusingTernary Avoid if (x != y) ..; else ..; 95
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 96117
ShortVariable Avoid variables with short names like os 109

Priority 4

fr/paris/lutece/plugins/directories/service/entrytype/EntryTypeSelect.java

Rule Violation Line
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.directories.util.DirectoriesConstants' 36
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.genericattributes.business.GenericAttributeError' 41
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.genericattributes.business.MandatoryError' 42
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.genericattributes.util.GenericAttributesUtils' 44
UnusedImports Avoid unused imports such as 'fr.paris.lutece.portal.service.i18n.I18nService' 45
UnusedImports Avoid unused imports such as 'fr.paris.lutece.portal.service.message.AdminMessage' 46
UnusedImports Avoid unused imports such as 'fr.paris.lutece.portal.service.message.AdminMessageService' 47
UnusedImports Avoid unused imports such as 'org.apache.commons.lang.StringUtils' 49
UnusedImports Avoid unused imports such as 'java.util.List' 51

Files

fr/paris/lutece/plugins/directories/business/DirectoryEntity.java

Rule Violation Priority Line
ConfusingTernary Avoid if (x != y) ..; else ..; 3 147
ConfusingTernary Avoid if (x != y) ..; else ..; 3 156

fr/paris/lutece/plugins/directories/service/EntryService.java

Rule Violation Priority Line
GodClass Possible God Class (WMC=56, ATFD=115, TCC=12.088%) 3 62523
LinguisticNaming Linguistics Antipattern - The getter 'getHtmlEntry' should not return void linguistically 3 97118
AvoidReassigningLoopVariables Avoid reassigning the loop control variable 'field' 3 104
LinguisticNaming Linguistics Antipattern - The getter 'getHtmlEntryReadOnly' should not return void linguistically 3 130153
AvoidReassigningLoopVariables Avoid reassigning the loop control variable 'field' 3 137
CyclomaticComplexity The method 'moveDownEntryOrder(int, Entry)' has a cyclomatic complexity of 16. 3 225306
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 3 246276
CyclomaticComplexity The method 'moveUpEntryOrder(int, Entry)' has a cyclomatic complexity of 13. 3 316379
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 3 335362
LinguisticNaming Linguistics Antipattern - The getter 'getEntryFields' should not return void linguistically 3 509521
AvoidReassigningLoopVariables Avoid reassigning the loop control variable 'field' 3 516

fr/paris/lutece/plugins/directories/service/EntryTypeService.java

Rule Violation Priority Line
NonThreadSafeSingleton Singleton is not thread safe 3 6972

fr/paris/lutece/plugins/directories/service/entrytype/EntryTypeImage.java

Rule Violation Priority Line
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 113

fr/paris/lutece/plugins/directories/service/entrytype/EntryTypeMyLuteceUserPicker.java

Rule Violation Priority Line
CyclomaticComplexity The method 'getRequestData(Entry, HttpServletRequest, Locale)' has a cyclomatic complexity of 12. 3 104213
NPathComplexity The method 'getRequestData(Entry, HttpServletRequest, Locale)' has an NPath complexity of 864 3 104213
ExcessiveMethodLength Avoid really long methods. 3 104213
NcssCount The method 'getRequestData(Entry, HttpServletRequest, Locale)' has a NCSS line count of 63. 3 104213
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 107
ConfusingTernary Avoid if (x != y) ..; else ..; 3 109
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 109
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 110
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 111
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 112
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 114
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 117
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 118
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 119
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 120
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 121
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 122
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 124
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 125
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 233
CyclomaticComplexity The method 'checkEntryErrors(Entry, Field, String, String, List, boolean, Locale)' has a cyclomatic complexity of 13. 3 270327

fr/paris/lutece/plugins/directories/service/entrytype/EntryTypeRadioButton.java

Rule Violation Priority Line
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 107
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 108
ConfusingTernary Avoid if (x != y) ..; else ..; 3 108
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 109
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 110
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 111
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 112
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 113
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 114
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 116

fr/paris/lutece/plugins/directories/service/entrytype/EntryTypeSelect.java

Rule Violation Priority Line
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.directories.util.DirectoriesConstants' 4 36
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.genericattributes.business.GenericAttributeError' 4 41
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.genericattributes.business.MandatoryError' 4 42
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.genericattributes.util.GenericAttributesUtils' 4 44
UnusedImports Avoid unused imports such as 'fr.paris.lutece.portal.service.i18n.I18nService' 4 45
UnusedImports Avoid unused imports such as 'fr.paris.lutece.portal.service.message.AdminMessage' 4 46
UnusedImports Avoid unused imports such as 'fr.paris.lutece.portal.service.message.AdminMessageService' 4 47
UnusedImports Avoid unused imports such as 'org.apache.commons.lang.StringUtils' 4 49
UnusedImports Avoid unused imports such as 'java.util.List' 4 51
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 125128

fr/paris/lutece/plugins/directories/util/DirectoriesConstants.java

Rule Violation Priority Line
ClassNamingConventions The utility class name 'DirectoriesConstants' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' 1 4186

fr/paris/lutece/plugins/directories/web/AbstractDirectoriesManagerJspBean.java

Rule Violation Priority Line
SingularField Perhaps '_nDefaultItemsPerPage' could be replaced by a local variable. 3 68

fr/paris/lutece/plugins/directories/web/DirectoriesApp.java

Rule Violation Priority Line
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 3 82
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 3 125

fr/paris/lutece/plugins/directories/web/DirectoryEntriesJspBean.java

Rule Violation Priority Line
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 3 34470
ImmutableField Private field '_entryService' could be made final; it is only initialized in the declaration or constructor. 3 105
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 3 114
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 135150
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 3 159
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 179
CyclomaticComplexity The method 'doCreateEntry(HttpServletRequest)' has a cyclomatic complexity of 11. 3 201250
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 267
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 267
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 289
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 298301
ConfusingTernary Avoid if (x != y) ..; else ..; 3 308315
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 308315
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 410

fr/paris/lutece/plugins/directories/web/DirectoryFieldsJspBean.java

Rule Violation Priority Line
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 3 131
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 139
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 202
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 284
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 285
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 286
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 3 351

fr/paris/lutece/plugins/directories/web/DirectoryJspBean.java

Rule Violation Priority Line
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 110
ConfusingTernary Avoid if (x != y) ..; else ..; 3 127

fr/paris/lutece/plugins/directories/web/DirectoryResponseJspBean.java

Rule Violation Priority Line
AddEmptyString Do not add empty strings 3 170

fr/paris/lutece/plugins/directories/web/DoDownloadFile.java

Rule Violation Priority Line
ClassNamingConventions The utility class name 'DoDownloadFile' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' 1 59122
ConfusingTernary Avoid if (x != y) ..; else ..; 3 95
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 96117
ShortVariable Avoid variables with short names like os 3 109