Fork me on GitHub

Résultats PMD

Le document suivant contient les résultats de PMD 6.13.0.

Violations By Priority

Priority 1

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

Rule Violation Ligne
FormalParameterNamingConventions The method parameter name '_plugin' doesn't match '[a-z][a-zA-Z0-9]*' 245

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

Rule Violation Ligne
FieldNamingConventions The field name 'idSector' doesn't match '_[a-z][a-zA-Z0-9]*' 39
FieldNamingConventions The field name 'name' doesn't match '_[a-z][a-zA-Z0-9]*' 40

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

Rule Violation Ligne
FieldNamingConventions The field name 'sirensiret' doesn't match '_[a-z][a-zA-Z0-9]*' 61
FieldNamingConventions The field name 'numero' doesn't match '_[a-z][a-zA-Z0-9]*' 63
FieldNamingConventions The field name 'voie' doesn't match '_[a-z][a-zA-Z0-9]*' 65
FieldNamingConventions The field name 'codepostal' doesn't match '_[a-z][a-zA-Z0-9]*' 67
FieldNamingConventions The field name 'ville' doesn't match '_[a-z][a-zA-Z0-9]*' 69
FieldNamingConventions The field name 'typeunit' doesn't match '_[a-z][a-zA-Z0-9]*' 71
FieldNamingConventions The field name 'pays' doesn't match '_[a-z][a-zA-Z0-9]*' 73

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

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

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

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

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

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

Priority 2

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

Rule Violation Ligne
GuardLogStatement Logger calls should be surrounded by log level guards. 67
GuardLogStatement Logger calls should be surrounded by log level guards. 71
GuardLogStatement Logger calls should be surrounded by log level guards. 75

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

Rule Violation Ligne
GuardLogStatement Logger calls should be surrounded by log level guards. 199

Priority 3

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

Rule Violation Ligne
MissingOverride The method 'setIdAction(int)' is missing an @Override annotation. 6164
MissingOverride The method 'getIdAction()' is missing an @Override annotation. 7174
MissingOverride The method 'setLocale(Locale)' is missing an @Override annotation. 8285
MissingOverride The method 'getUrl()' is missing an @Override annotation. 9295
MissingOverride The method 'setUrl(String)' is missing an @Override annotation. 103106
MissingOverride The method 'getNameKey()' is missing an @Override annotation. 113116
MissingOverride The method 'getName()' is missing an @Override annotation. 123126
MissingOverride The method 'setNameKey(String)' is missing an @Override annotation. 134137
MissingOverride The method 'getDescriptionKey()' is missing an @Override annotation. 144147
MissingOverride The method 'getDescription()' is missing an @Override annotation. 154157
MissingOverride The method 'setDescriptionKey(String)' is missing an @Override annotation. 165168
MissingOverride The method 'getIcon()' is missing an @Override annotation. 175178
MissingOverride The method 'setIcon(String)' is missing an @Override annotation. 186189
MissingOverride The method 'getPermission()' is missing an @Override annotation. 196199
MissingOverride The method 'setPermission(String)' is missing an @Override annotation. 207210

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

Rule Violation Ligne
IdenticalCatchBranches 'catch' branch identical to 'BeanDefinitionStoreException' branch 6972
IdenticalCatchBranches 'catch' branch identical to 'BeanDefinitionStoreException' branch 7376

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

Rule Violation Ligne
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/unit/IUnitDAO.java

Rule Violation Ligne
TooManyMethods This class has too many methods, consider refactoring it. 45248
UnnecessaryModifier Unnecessary modifier 'public' on method 'selectAllSectors': the method is declared in an interface type 243
CommentRequired Public method and constructor comments are required 245
CommentRequired Public method and constructor comments are required 247

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

Rule Violation Ligne
CommentRequired Header comments are required 3662
DataClass The class 'Sector' is suspected to be a Data Class (WOC=0.000%, NOPA=0, NOAM=4, WMC=4) 3662

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

Rule Violation Ligne
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 75
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 75
ImmutableField Private field '_mapAttributes' could be made final; it is only initialized in the declaration or constructor. 75
CommentRequired Enum comments are required 7781

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

Rule Violation Ligne
TooManyMethods This class has too many methods, consider refactoring it. 49662
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 113136
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 183
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 223
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 332
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 362
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 382
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 401411
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 441
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 465
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 493
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 580
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 623
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 646

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

Rule Violation Ligne
TooManyMethods This class has too many methods, consider refactoring it. 49277
CommentRequired Public method and constructor comments are required 248251
CommentRequired Public method and constructor comments are required 266270
CommentRequired Public method and constructor comments are required 272275

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

Rule Violation Ligne
CallSuperInConstructor It is a good practice to call super() in a constructor 5255

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

Rule Violation Ligne
TooManyMethods This class has too many methods, consider refactoring it. 58319
AvoidDuplicateLiterals The String literal "unittree.transactionManager" appears 4 times in this file; the first occurrence is on line 266 266
CommentRequired Public method and constructor comments are required 305
CommentRequired Public method and constructor comments are required 307
CommentRequired Public method and constructor comments are required 309
CommentRequired Public method and constructor comments are required 311
CommentRequired Public method and constructor comments are required 313
CommentRequired Public method and constructor comments are required 315
CommentRequired Public method and constructor comments are required 317

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

Rule Violation Ligne
CallSuperInConstructor It is a good practice to call super() in a constructor 8285
MissingOverride The method 'register()' is missing an @Override annotation. 90139
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. 148159
MissingOverride The method 'getTitle(String, Locale)' is missing an @Override annotation. 170185

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

Rule Violation Ligne
TooManyMethods This class has too many methods, consider refactoring it. 73725
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 200
CyclomaticComplexity The method 'getListActions(String, Locale, Unit, AdminUser)' has a cyclomatic complexity of 13. 229284
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 246
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 248
ConfusingTernary Avoid if (x != y) ..; else ..; 252259
CollapsibleIfStatements These nested if statements could be combined 268279
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 472
AvoidDuplicateLiterals The String literal "unittree.transactionManager" appears 4 times in this file; the first occurrence is on line 503 503
LinguisticNaming Linguistics Antipattern - The getter 'getXMLUnit' should not return void linguistically 583605
ConfusingTernary Avoid if (x != y) ..; else ..; 626640
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 654
ConfusingTernary Avoid if (x != y) ..; else ..; 661669
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 684
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 685
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 692
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 698
UnnecessaryLocalBeforeReturn Consider simply returning the value vs storing it in local variable 'listUnits' 723

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

Rule Violation Ligne
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 83
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 107
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 192
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 196
CyclomaticComplexity The method 'isUserAvailable(AdminUser, AdminUser, Unit, boolean)' has a cyclomatic complexity of 10. 290325
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 294
CollapsibleIfStatements These nested if statements could be combined 318321
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 339

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

Rule Violation Ligne
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 341200
CyclomaticComplexity The class 'UnitJspBean' has a total cyclomatic complexity of 149 (highest 18). 901200
ExcessiveClassLength Avoid really long classes. 901200
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. 177
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 228
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 228
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 235
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 238
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 238
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 300
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 300
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 345
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 345
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 423
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 423
CyclomaticComplexity The method 'getModifyUser(HttpServletRequest)' has a cyclomatic complexity of 12. 452502
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 493
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 493
NPathComplexity The method 'getMoveUser(HttpServletRequest)' has an NPath complexity of 600 513586
CyclomaticComplexity The method 'getMoveUser(HttpServletRequest)' has a cyclomatic complexity of 17. 513586
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 576
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 576
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 669
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 678
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 753
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 762
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 815
CyclomaticComplexity The method 'doAddUsers(HttpServletRequest)' has a cyclomatic complexity of 11. 837884
CyclomaticComplexity The method 'doMoveUser(HttpServletRequest)' has a cyclomatic complexity of 18. 9331021
NPathComplexity The method 'doMoveUser(HttpServletRequest)' has an NPath complexity of 1280 9331021
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 937
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 1008
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 1059
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 1101
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 1115
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 1139
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 1139

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

Rule Violation Ligne
NPathComplexity The method 'fillModelForUserSearchForm(List, String, HttpServletRequest, Map, Unit)' has an NPath complexity of 832 113195
CyclomaticComplexity The method 'fillModelForUserSearchForm(List, String, HttpServletRequest, Map, Unit)' has a cyclomatic complexity of 15. 113195
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 130
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 175176
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 179

Priority 4

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

Rule Violation Ligne
ShortClassName Avoid short class names like Unit 48290

Fichiers

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

Rule Violation Priority Ligne
MissingOverride The method 'setIdAction(int)' is missing an @Override annotation. 3 6164
MissingOverride The method 'getIdAction()' is missing an @Override annotation. 3 7174
MissingOverride The method 'setLocale(Locale)' is missing an @Override annotation. 3 8285
MissingOverride The method 'getUrl()' is missing an @Override annotation. 3 9295
MissingOverride The method 'setUrl(String)' is missing an @Override annotation. 3 103106
MissingOverride The method 'getNameKey()' is missing an @Override annotation. 3 113116
MissingOverride The method 'getName()' is missing an @Override annotation. 3 123126
MissingOverride The method 'setNameKey(String)' is missing an @Override annotation. 3 134137
MissingOverride The method 'getDescriptionKey()' is missing an @Override annotation. 3 144147
MissingOverride The method 'getDescription()' is missing an @Override annotation. 3 154157
MissingOverride The method 'setDescriptionKey(String)' is missing an @Override annotation. 3 165168
MissingOverride The method 'getIcon()' is missing an @Override annotation. 3 175178
MissingOverride The method 'setIcon(String)' is missing an @Override annotation. 3 186189
MissingOverride The method 'getPermission()' is missing an @Override annotation. 3 196199
MissingOverride The method 'setPermission(String)' is missing an @Override annotation. 3 207210

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

Rule Violation Priority Ligne
GuardLogStatement Logger calls should be surrounded by log level guards. 2 67
IdenticalCatchBranches 'catch' branch identical to 'BeanDefinitionStoreException' branch 3 6972
GuardLogStatement Logger calls should be surrounded by log level guards. 2 71
IdenticalCatchBranches 'catch' branch identical to 'BeanDefinitionStoreException' branch 3 7376
GuardLogStatement Logger calls should be surrounded by log level guards. 2 75

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

Rule Violation Priority Ligne
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/unit/IUnitDAO.java

Rule Violation Priority Ligne
TooManyMethods This class has too many methods, consider refactoring it. 3 45248
UnnecessaryModifier Unnecessary modifier 'public' on method 'selectAllSectors': the method is declared in an interface type 3 243
FormalParameterNamingConventions The method parameter name '_plugin' doesn't match '[a-z][a-zA-Z0-9]*' 1 245
CommentRequired Public method and constructor comments are required 3 245
CommentRequired Public method and constructor comments are required 3 247

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

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 3662
DataClass The class 'Sector' is suspected to be a Data Class (WOC=0.000%, NOPA=0, NOAM=4, WMC=4) 3 3662
FieldNamingConventions The field name 'idSector' doesn't match '_[a-z][a-zA-Z0-9]*' 1 39
FieldNamingConventions The field name 'name' doesn't match '_[a-z][a-zA-Z0-9]*' 1 40

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

Rule Violation Priority Ligne
ShortClassName Avoid short class names like Unit 4 48290
FieldNamingConventions The field name 'sirensiret' doesn't match '_[a-z][a-zA-Z0-9]*' 1 61
FieldNamingConventions The field name 'numero' doesn't match '_[a-z][a-zA-Z0-9]*' 1 63
FieldNamingConventions The field name 'voie' doesn't match '_[a-z][a-zA-Z0-9]*' 1 65
FieldNamingConventions The field name 'codepostal' doesn't match '_[a-z][a-zA-Z0-9]*' 1 67
FieldNamingConventions The field name 'ville' doesn't match '_[a-z][a-zA-Z0-9]*' 1 69
FieldNamingConventions The field name 'typeunit' doesn't match '_[a-z][a-zA-Z0-9]*' 1 71
FieldNamingConventions The field name 'pays' doesn't match '_[a-z][a-zA-Z0-9]*' 1 73
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 75
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 75
ImmutableField Private field '_mapAttributes' could be made final; it is only initialized in the declaration or constructor. 3 75
CommentRequired Enum comments are required 3 7781

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

Rule Violation Priority Ligne
TooManyMethods This class has too many methods, consider refactoring it. 3 49662
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 113136
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 183
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 223
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 332
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 362
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 382
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 401411
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 441
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 465
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 493
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 580
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 623
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 646

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

Rule Violation Priority Ligne
TooManyMethods This class has too many methods, consider refactoring it. 3 49277
CommentRequired Public method and constructor comments are required 3 248251
CommentRequired Public method and constructor comments are required 3 266270
CommentRequired Public method and constructor comments are required 3 272275

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

Rule Violation Priority Ligne
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 5255

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

Rule Violation Priority Ligne
TooManyMethods This class has too many methods, consider refactoring it. 3 58319
AvoidDuplicateLiterals The String literal "unittree.transactionManager" appears 4 times in this file; the first occurrence is on line 266 3 266
CommentRequired Public method and constructor comments are required 3 305
CommentRequired Public method and constructor comments are required 3 307
CommentRequired Public method and constructor comments are required 3 309
CommentRequired Public method and constructor comments are required 3 311
CommentRequired Public method and constructor comments are required 3 313
CommentRequired Public method and constructor comments are required 3 315
CommentRequired Public method and constructor comments are required 3 317

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

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

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

Rule Violation Priority Ligne
CallSuperInConstructor It is a good practice to call super() in a constructor 3 8285
MissingOverride The method 'register()' is missing an @Override annotation. 3 90139
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 148159
MissingOverride The method 'getTitle(String, Locale)' is missing an @Override annotation. 3 170185

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

Rule Violation Priority Ligne
TooManyMethods This class has too many methods, consider refactoring it. 3 73725
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 200
CyclomaticComplexity The method 'getListActions(String, Locale, Unit, AdminUser)' has a cyclomatic complexity of 13. 3 229284
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 246
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 3 248
ConfusingTernary Avoid if (x != y) ..; else ..; 3 252259
CollapsibleIfStatements These nested if statements could be combined 3 268279
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 472
AvoidDuplicateLiterals The String literal "unittree.transactionManager" appears 4 times in this file; the first occurrence is on line 503 3 503
LinguisticNaming Linguistics Antipattern - The getter 'getXMLUnit' should not return void linguistically 3 583605
ConfusingTernary Avoid if (x != y) ..; else ..; 3 626640
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 654
ConfusingTernary Avoid if (x != y) ..; else ..; 3 661669
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 684
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 685
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 3 692
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 698
UnnecessaryLocalBeforeReturn Consider simply returning the value vs storing it in local variable 'listUnits' 3 723

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

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

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

Rule Violation Priority Ligne
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 83
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 107
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 192
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 3 196
CyclomaticComplexity The method 'isUserAvailable(AdminUser, AdminUser, Unit, boolean)' has a cyclomatic complexity of 10. 3 290325
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 3 294
CollapsibleIfStatements These nested if statements could be combined 3 318321
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 339

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

Rule Violation Priority Ligne
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 3 341200
CyclomaticComplexity The class 'UnitJspBean' has a total cyclomatic complexity of 149 (highest 18). 3 901200
ExcessiveClassLength Avoid really long classes. 3 901200
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 177
GuardLogStatement Logger calls should be surrounded by log level guards. 2 199
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 228
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 228
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 235
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 238
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 238
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 300
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 300
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 345
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 345
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 423
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 423
CyclomaticComplexity The method 'getModifyUser(HttpServletRequest)' has a cyclomatic complexity of 12. 3 452502
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 493
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 493
NPathComplexity The method 'getMoveUser(HttpServletRequest)' has an NPath complexity of 600 3 513586
CyclomaticComplexity The method 'getMoveUser(HttpServletRequest)' has a cyclomatic complexity of 17. 3 513586
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 576
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 576
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 3 669
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 678
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 3 753
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 762
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 815
CyclomaticComplexity The method 'doAddUsers(HttpServletRequest)' has a cyclomatic complexity of 11. 3 837884
CyclomaticComplexity The method 'doMoveUser(HttpServletRequest)' has a cyclomatic complexity of 18. 3 9331021
NPathComplexity The method 'doMoveUser(HttpServletRequest)' has an NPath complexity of 1280 3 9331021
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 937
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 1008
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 1059
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 1101
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 1115
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 1139
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 1139

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

Rule Violation Priority Ligne
NPathComplexity The method 'fillModelForUserSearchForm(List, String, HttpServletRequest, Map, Unit)' has an NPath complexity of 832 3 113195
CyclomaticComplexity The method 'fillModelForUserSearchForm(List, String, HttpServletRequest, Map, Unit)' has a cyclomatic complexity of 15. 3 113195
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 130
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 175176
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 179