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/unittree/business/assignment/UnitAssignmentType.java

Rule Violation Line
FieldNamingConventions The final field name '_strAssignmentTypeCode' doesn't match '[a-z][a-zA-Z0-9]*' 47

fr/paris/lutece/plugins/unittree/service/UnitErrorException.java

Rule Violation Line
FieldNamingConventions The final field name '_strI18nErrorMessage' doesn't match '[a-z][a-zA-Z0-9]*' 44

fr/paris/lutece/plugins/unittree/service/assignment/UnitAssignmentService.java

Rule Violation Line
FieldNamingConventions The constant name '_plugin' doesn't match '[A-Z][A-Z_0-9]*' 53

fr/paris/lutece/plugins/unittree/service/unit/UnitAttributeManager.java

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

fr/paris/lutece/plugins/unittree/service/unit/UnitUserAttributeManager.java

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

Priority 2

fr/paris/lutece/plugins/unittree/business/action/ActionFactory.java

Rule Violation Line
GuardLogStatement Logger calls should be surrounded by log level guards. 102

fr/paris/lutece/plugins/unittree/web/UnitJspBean.java

Rule Violation Line
GuardLogStatement Logger calls should be surrounded by log level guards. 201

Priority 3

fr/paris/lutece/plugins/unittree/business/action/AbstractAction.java

Rule Violation Line
MissingOverride The method 'setIdAction(int)' is missing an @Override annotation. 61–64
MissingOverride The method 'getIdAction()' is missing an @Override annotation. 71–74
MissingOverride The method 'setLocale(Locale)' is missing an @Override annotation. 82–85
MissingOverride The method 'getUrl()' is missing an @Override annotation. 92–95
MissingOverride The method 'setUrl(String)' is missing an @Override annotation. 103–106
MissingOverride The method 'getNameKey()' is missing an @Override annotation. 113–116
MissingOverride The method 'getName()' is missing an @Override annotation. 123–126
MissingOverride The method 'setNameKey(String)' is missing an @Override annotation. 134–137
MissingOverride The method 'getDescriptionKey()' is missing an @Override annotation. 144–147
MissingOverride The method 'getDescription()' is missing an @Override annotation. 154–157
MissingOverride The method 'setDescriptionKey(String)' is missing an @Override annotation. 165–168
MissingOverride The method 'getIcon()' is missing an @Override annotation. 175–178
MissingOverride The method 'setIcon(String)' is missing an @Override annotation. 186–189
MissingOverride The method 'getPermission()' is missing an @Override annotation. 196–199
MissingOverride The method 'setPermission(String)' is missing an @Override annotation. 207–210

fr/paris/lutece/plugins/unittree/business/action/ActionFactory.java

Rule Violation Line
ShortVariable Avoid variables with short names like e 80

fr/paris/lutece/plugins/unittree/business/action/IAction.java

Rule Violation Line
MissingOverride The method 'setLocale(Locale)' is missing an @Override annotation. 69
MissingOverride The method 'getPermission()' is missing an @Override annotation. 150

fr/paris/lutece/plugins/unittree/business/assignment/UnitAssignmentDAO.java

Rule Violation Line
TooManyMethods This class has too many methods, consider refactoring it. 49–412
CyclomaticComplexity The method 'filterBuildSql(UnitAssignmentFilter)' has a cyclomatic complexity of 11. 260–302
CyclomaticComplexity The method 'filterInsertData(UnitAssignmentFilter, DAOUtil)' has a cyclomatic complexity of 11. 311–346

fr/paris/lutece/plugins/unittree/business/assignment/UnitAssignmentFilter.java

Rule Violation Line
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 53
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 54
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 55

fr/paris/lutece/plugins/unittree/business/unit/IUnitDAO.java

Rule Violation Line
TooManyMethods This class has too many methods, consider refactoring it. 46–251

fr/paris/lutece/plugins/unittree/business/unit/TreeUnit.java

Rule Violation Line
DataClass The class 'TreeUnit' is suspected to be a Data Class (WOC=14.286%, NOPA=0, NOAM=4, WMC=7) 44–116

fr/paris/lutece/plugins/unittree/business/unit/Unit.java

Rule Violation Line
ImmutableField Private field '_mapAttributes' could be made final; it is only initialized in the declaration or constructor. 62
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 62

fr/paris/lutece/plugins/unittree/business/unit/UnitDAO.java

Rule Violation Line
TooManyMethods This class has too many methods, consider refactoring it. 51–567
MissingOverride The method 'getAllSubUnitsId(int, Plugin)' is missing an @Override annotation. 242–258
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 244
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 373–383
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 494

fr/paris/lutece/plugins/unittree/business/unit/UnitHome.java

Rule Violation Line
TooManyMethods This class has too many methods, consider refactoring it. 51–286

fr/paris/lutece/plugins/unittree/service/UnitErrorException.java

Rule Violation Line
CallSuperInConstructor It is a good practice to call super() in a constructor 52–55

fr/paris/lutece/plugins/unittree/service/selection/IParametrableConfigurationHandler.java

Rule Violation Line
CommentRequired Header comments are required 42–84
CommentRequired Public method and constructor comments are required 81
CommentRequired Public method and constructor comments are required 83

fr/paris/lutece/plugins/unittree/service/unit/IUnitRemovalListener.java

Rule Violation Line
CommentRequired Header comments are required 38–48

fr/paris/lutece/plugins/unittree/service/unit/IUnitService.java

Rule Violation Line
AvoidDuplicateLiterals The String literal "unittree.transactionManager" appears 4 times in this file; the first occurrence is on line 290 290
UnnecessaryModifier Unnecessary modifier 'public' on method 'populateTreeUnit': the method is declared in an interface type 350

fr/paris/lutece/plugins/unittree/service/unit/MokeUnitRemovalListener.java

Rule Violation Line
CommentRequired Header comments are required 38–53

fr/paris/lutece/plugins/unittree/service/unit/UnitResourceIdService.java

Rule Violation Line
CallSuperInConstructor It is a good practice to call super() in a constructor 82–85
MissingOverride The method 'register()' is missing an @Override annotation. 90–139
ShortVariable Avoid variables with short names like rt 92
ShortVariable Avoid variables with short names like p 98
MissingOverride The method 'getResourceIdList(Locale)' is missing an @Override annotation. 148–159
MissingOverride The method 'getTitle(String, Locale)' is missing an @Override annotation. 170–185

fr/paris/lutece/plugins/unittree/service/unit/UnitService.java

Rule Violation Line
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 34–746
MissingOverride The method 'getUnitWithNoChildren()' is missing an @Override annotation. 445–448
AvoidDuplicateLiterals The String literal "unittree.transactionManager" appears 4 times in this file; the first occurrence is on line 577 577
LinguisticNaming Linguistics Antipattern - The getter 'getXMLUnit' should not return void linguistically 659–684
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 701

fr/paris/lutece/plugins/unittree/service/unit/UnitUserService.java

Rule Violation Line
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 194

fr/paris/lutece/plugins/unittree/web/UnitJspBean.java

Rule Violation Line
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 34–1171
CyclomaticComplexity The class 'UnitJspBean' has a total cyclomatic complexity of 142 (highest 18). 91–1171
ExcessiveClassLength Avoid really long classes. 91–1171
ImmutableField Private field '_unitService' could be made final; it is only initialized in the declaration or constructor. 173
ImmutableField Private field '_unitUserService' could be made final; it is only initialized in the declaration or constructor. 174
ImmutableField Private field '_bAdminAvatar' could be made final; it is only initialized in the declaration or constructor. 178
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 232
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 235
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 308
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 353
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 431
NPathComplexity The method 'getMoveUser(HttpServletRequest)' has an NPath complexity of 600 460–533
CyclomaticComplexity The method 'getMoveUser(HttpServletRequest)' has a cyclomatic complexity of 17. 460–533
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 523
CyclomaticComplexity The method 'doCreateUnit(HttpServletRequest)' has a cyclomatic complexity of 10. 575–646
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 630
NPathComplexity The method 'doModifyUnit(HttpServletRequest)' has an NPath complexity of 576 655–732
CyclomaticComplexity The method 'doModifyUnit(HttpServletRequest)' has a cyclomatic complexity of 11. 655–732
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 719
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 786
CyclomaticComplexity The method 'doAddUsers(HttpServletRequest)' has a cyclomatic complexity of 11. 810–857
NPathComplexity The method 'doMoveUser(HttpServletRequest)' has an NPath complexity of 1280 866–954
CyclomaticComplexity The method 'doMoveUser(HttpServletRequest)' has a cyclomatic complexity of 18. 866–954
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 870
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 941
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 992
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 1034
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 1071
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 1157

fr/paris/lutece/plugins/unittree/web/action/UnitUserSearchFields.java

Rule Violation Line
CyclomaticComplexity The method 'fillModelForUserSearchForm(List, String, HttpServletRequest, Map, Unit)' has a cyclomatic complexity of 12. 114–189
NPathComplexity The method 'fillModelForUserSearchForm(List, String, HttpServletRequest, Map, Unit)' has an NPath complexity of 208 114–189

Priority 4

fr/paris/lutece/plugins/unittree/business/unit/Unit.java

Rule Violation Line
ShortClassName Avoid short class names like Unit 48–253

fr/paris/lutece/plugins/unittree/business/unit/UnitHome.java

Rule Violation Line
UnusedImports Avoid unused imports such as 'java.util.HashSet' 41

Files

fr/paris/lutece/plugins/unittree/business/action/AbstractAction.java

Rule Violation Priority Line
MissingOverride The method 'setIdAction(int)' is missing an @Override annotation. 3 61–64
MissingOverride The method 'getIdAction()' is missing an @Override annotation. 3 71–74
MissingOverride The method 'setLocale(Locale)' is missing an @Override annotation. 3 82–85
MissingOverride The method 'getUrl()' is missing an @Override annotation. 3 92–95
MissingOverride The method 'setUrl(String)' is missing an @Override annotation. 3 103–106
MissingOverride The method 'getNameKey()' is missing an @Override annotation. 3 113–116
MissingOverride The method 'getName()' is missing an @Override annotation. 3 123–126
MissingOverride The method 'setNameKey(String)' is missing an @Override annotation. 3 134–137
MissingOverride The method 'getDescriptionKey()' is missing an @Override annotation. 3 144–147
MissingOverride The method 'getDescription()' is missing an @Override annotation. 3 154–157
MissingOverride The method 'setDescriptionKey(String)' is missing an @Override annotation. 3 165–168
MissingOverride The method 'getIcon()' is missing an @Override annotation. 3 175–178
MissingOverride The method 'setIcon(String)' is missing an @Override annotation. 3 186–189
MissingOverride The method 'getPermission()' is missing an @Override annotation. 3 196–199
MissingOverride The method 'setPermission(String)' is missing an @Override annotation. 3 207–210

fr/paris/lutece/plugins/unittree/business/action/ActionFactory.java

Rule Violation Priority Line
ShortVariable Avoid variables with short names like e 3 80
GuardLogStatement Logger calls should be surrounded by log level guards. 2 102

fr/paris/lutece/plugins/unittree/business/action/IAction.java

Rule Violation Priority Line
MissingOverride The method 'setLocale(Locale)' is missing an @Override annotation. 3 69
MissingOverride The method 'getPermission()' is missing an @Override annotation. 3 150

fr/paris/lutece/plugins/unittree/business/assignment/UnitAssignmentDAO.java

Rule Violation Priority Line
TooManyMethods This class has too many methods, consider refactoring it. 3 49–412
CyclomaticComplexity The method 'filterBuildSql(UnitAssignmentFilter)' has a cyclomatic complexity of 11. 3 260–302
CyclomaticComplexity The method 'filterInsertData(UnitAssignmentFilter, DAOUtil)' has a cyclomatic complexity of 11. 3 311–346

fr/paris/lutece/plugins/unittree/business/assignment/UnitAssignmentFilter.java

Rule Violation Priority Line
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 53
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 54
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 55

fr/paris/lutece/plugins/unittree/business/assignment/UnitAssignmentType.java

Rule Violation Priority Line
FieldNamingConventions The final field name '_strAssignmentTypeCode' doesn't match '[a-z][a-zA-Z0-9]*' 1 47

fr/paris/lutece/plugins/unittree/business/unit/IUnitDAO.java

Rule Violation Priority Line
TooManyMethods This class has too many methods, consider refactoring it. 3 46–251

fr/paris/lutece/plugins/unittree/business/unit/TreeUnit.java

Rule Violation Priority Line
DataClass The class 'TreeUnit' is suspected to be a Data Class (WOC=14.286%, NOPA=0, NOAM=4, WMC=7) 3 44–116

fr/paris/lutece/plugins/unittree/business/unit/Unit.java

Rule Violation Priority Line
ShortClassName Avoid short class names like Unit 4 48–253
ImmutableField Private field '_mapAttributes' could be made final; it is only initialized in the declaration or constructor. 3 62
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 62

fr/paris/lutece/plugins/unittree/business/unit/UnitDAO.java

Rule Violation Priority Line
TooManyMethods This class has too many methods, consider refactoring it. 3 51–567
MissingOverride The method 'getAllSubUnitsId(int, Plugin)' is missing an @Override annotation. 3 242–258
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 244
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 373–383
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 494

fr/paris/lutece/plugins/unittree/business/unit/UnitHome.java

Rule Violation Priority Line
UnusedImports Avoid unused imports such as 'java.util.HashSet' 4 41
TooManyMethods This class has too many methods, consider refactoring it. 3 51–286

fr/paris/lutece/plugins/unittree/service/UnitErrorException.java

Rule Violation Priority Line
FieldNamingConventions The final field name '_strI18nErrorMessage' doesn't match '[a-z][a-zA-Z0-9]*' 1 44
CallSuperInConstructor It is a good practice to call super() in a constructor 3 52–55

fr/paris/lutece/plugins/unittree/service/assignment/UnitAssignmentService.java

Rule Violation Priority Line
FieldNamingConventions The constant name '_plugin' doesn't match '[A-Z][A-Z_0-9]*' 1 53

fr/paris/lutece/plugins/unittree/service/selection/IParametrableConfigurationHandler.java

Rule Violation Priority Line
CommentRequired Header comments are required 3 42–84
CommentRequired Public method and constructor comments are required 3 81
CommentRequired Public method and constructor comments are required 3 83

fr/paris/lutece/plugins/unittree/service/unit/IUnitRemovalListener.java

Rule Violation Priority Line
CommentRequired Header comments are required 3 38–48

fr/paris/lutece/plugins/unittree/service/unit/IUnitService.java

Rule Violation Priority Line
AvoidDuplicateLiterals The String literal "unittree.transactionManager" appears 4 times in this file; the first occurrence is on line 290 3 290
UnnecessaryModifier Unnecessary modifier 'public' on method 'populateTreeUnit': the method is declared in an interface type 3 350

fr/paris/lutece/plugins/unittree/service/unit/MokeUnitRemovalListener.java

Rule Violation Priority Line
CommentRequired Header comments are required 3 38–53

fr/paris/lutece/plugins/unittree/service/unit/UnitAttributeManager.java

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

fr/paris/lutece/plugins/unittree/service/unit/UnitResourceIdService.java

Rule Violation Priority Line
CallSuperInConstructor It is a good practice to call super() in a constructor 3 82–85
MissingOverride The method 'register()' is missing an @Override annotation. 3 90–139
ShortVariable Avoid variables with short names like rt 3 92
ShortVariable Avoid variables with short names like p 3 98
MissingOverride The method 'getResourceIdList(Locale)' is missing an @Override annotation. 3 148–159
MissingOverride The method 'getTitle(String, Locale)' is missing an @Override annotation. 3 170–185

fr/paris/lutece/plugins/unittree/service/unit/UnitService.java

Rule Violation Priority Line
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 3 34–746
MissingOverride The method 'getUnitWithNoChildren()' is missing an @Override annotation. 3 445–448
AvoidDuplicateLiterals The String literal "unittree.transactionManager" appears 4 times in this file; the first occurrence is on line 577 3 577
LinguisticNaming Linguistics Antipattern - The getter 'getXMLUnit' should not return void linguistically 3 659–684
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 701

fr/paris/lutece/plugins/unittree/service/unit/UnitUserAttributeManager.java

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

fr/paris/lutece/plugins/unittree/service/unit/UnitUserService.java

Rule Violation Priority Line
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 194

fr/paris/lutece/plugins/unittree/web/UnitJspBean.java

Rule Violation Priority Line
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 3 34–1171
CyclomaticComplexity The class 'UnitJspBean' has a total cyclomatic complexity of 142 (highest 18). 3 91–1171
ExcessiveClassLength Avoid really long classes. 3 91–1171
ImmutableField Private field '_unitService' could be made final; it is only initialized in the declaration or constructor. 3 173
ImmutableField Private field '_unitUserService' could be made final; it is only initialized in the declaration or constructor. 3 174
ImmutableField Private field '_bAdminAvatar' could be made final; it is only initialized in the declaration or constructor. 3 178
GuardLogStatement Logger calls should be surrounded by log level guards. 2 201
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 232
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 235
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 308
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 353
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 431
NPathComplexity The method 'getMoveUser(HttpServletRequest)' has an NPath complexity of 600 3 460–533
CyclomaticComplexity The method 'getMoveUser(HttpServletRequest)' has a cyclomatic complexity of 17. 3 460–533
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 523
CyclomaticComplexity The method 'doCreateUnit(HttpServletRequest)' has a cyclomatic complexity of 10. 3 575–646
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 630
NPathComplexity The method 'doModifyUnit(HttpServletRequest)' has an NPath complexity of 576 3 655–732
CyclomaticComplexity The method 'doModifyUnit(HttpServletRequest)' has a cyclomatic complexity of 11. 3 655–732
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 719
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 786
CyclomaticComplexity The method 'doAddUsers(HttpServletRequest)' has a cyclomatic complexity of 11. 3 810–857
NPathComplexity The method 'doMoveUser(HttpServletRequest)' has an NPath complexity of 1280 3 866–954
CyclomaticComplexity The method 'doMoveUser(HttpServletRequest)' has a cyclomatic complexity of 18. 3 866–954
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 870
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 941
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 992
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 1034
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 1071
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 1157

fr/paris/lutece/plugins/unittree/web/action/UnitUserSearchFields.java

Rule Violation Priority Line
CyclomaticComplexity The method 'fillModelForUserSearchForm(List, String, HttpServletRequest, Map, Unit)' has a cyclomatic complexity of 12. 3 114–189
NPathComplexity The method 'fillModelForUserSearchForm(List, String, HttpServletRequest, Map, Unit)' has an NPath complexity of 208 3 114–189