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/extend/modules/hit/business/HitHome.java

Rule Violation Line
ClassWithOnlyPrivateConstructorsShouldBeFinal A class which only has private constructors should be final 10117

fr/paris/lutece/plugins/extend/service/ExtendableResourceRemovalListener.java

Rule Violation Line
DoubleCheckedLocking Double checked locking is not thread safe in Java. 103118
DoubleCheckedLocking Double checked locking is not thread safe in Java. 125140

fr/paris/lutece/plugins/extend/service/extender/ResourceExtenderCacheService.java

Rule Violation Line
ConstructorCallsOverridableMethod Overridable method 'getName' called during object construction 51

fr/paris/lutece/plugins/extend/service/extender/facade/ResourceExtenderServiceFacade.java

Rule Violation Line
ClassWithOnlyPrivateConstructorsShouldBeFinal A class which only has private constructors should be final 16166

fr/paris/lutece/plugins/extend/util/ExtendErrorException.java

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

fr/paris/lutece/plugins/extend/web/component/NoConfigResourceExtenderComponent.java

Rule Violation Line
EmptyMethodInAbstractClassShouldBeAbstract An empty method in an abstract class should be abstract instead 6568
EmptyMethodInAbstractClassShouldBeAbstract An empty method in an abstract class should be abstract instead 7477

Priority 2

fr/paris/lutece/plugins/extend/modules/hit/web/component/HitResourceExtenderComponent.java

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

fr/paris/lutece/plugins/extend/web/ResourceExtenderJspBean.java

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

Priority 3

fr/paris/lutece/plugins/extend/business/DefaultExtendableResource.java

Rule Violation Line
UncommentedEmptyConstructor Document empty constructor 5153

fr/paris/lutece/plugins/extend/business/DefaultExtendableResourceDAO.java

Rule Violation Line
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 5667

fr/paris/lutece/plugins/extend/business/extender/ResourceExtenderDAO.java

Rule Violation Line
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 96110
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 171
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 192
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 214
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 235
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 243

fr/paris/lutece/plugins/extend/business/extender/ResourceExtenderDTOFilter.java

Rule Violation Line
UncommentedEmptyConstructor Document empty constructor 8789
IdenticalCatchBranches 'catch' branch identical to 'IllegalAccessException' branch 124127
PositionLiteralsFirstInComparisons Position literals first in String comparisons 401
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 453

fr/paris/lutece/plugins/extend/business/extender/history/ResourceExtenderHistoryDAO.java

Rule Violation Line
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 92110
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 148
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 184

fr/paris/lutece/plugins/extend/business/extender/history/ResourceExtenderHistoryFilter.java

Rule Violation Line
ExcessivePublicCount This class has a bunch of public methods and attributes 34804
TooManyFields Too many fields 53804
GodClass Possible God Class (WMC=73, ATFD=23, TCC=4.374%) 53804
TooManyMethods This class has too many methods, consider refactoring it. 54804
InefficientStringBuffering Avoid concatenating nonliterals in a StringBuffer/StringBuilder constructor or append(). 687
CyclomaticComplexity The method 'setFilterValues(DAOUtil)' has a cyclomatic complexity of 10. 700748
NPathComplexity The method 'setFilterValues(DAOUtil)' has an NPath complexity of 512 700748
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 793

fr/paris/lutece/plugins/extend/modules/hit/business/HitDAO.java

Rule Violation Line
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 97111
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 240
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 244

fr/paris/lutece/plugins/extend/modules/hit/business/HitHome.java

Rule Violation Line
CommentRequired Header comments are required 10117

fr/paris/lutece/plugins/extend/modules/hit/service/HitAddOnService.java

Rule Violation Line
UnnecessaryReturn Avoid unnecessary return statements 77

fr/paris/lutece/plugins/extend/modules/hit/service/IHitService.java

Rule Violation Line
UnnecessaryModifier Unnecessary modifier 'public' on method 'findIdMostHitedResources': the method is declared in an interface type 120

fr/paris/lutece/plugins/extend/modules/hit/web/action/HitInstallerPluginAction.java

Rule Violation Line
UncommentedEmptyMethodBody Document empty method body 7475

fr/paris/lutece/plugins/extend/modules/hit/web/component/HitResourceExtenderComponent.java

Rule Violation Line
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 119
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 119
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 140
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 140

fr/paris/lutece/plugins/extend/service/ExtendableResourceManager.java

Rule Violation Line
CollapsibleIfStatements These nested if statements could be combined 109112

fr/paris/lutece/plugins/extend/service/ExtendableResourceRemovalListener.java

Rule Violation Line
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 71

fr/paris/lutece/plugins/extend/service/ExtendableResourceResourceIdService.java

Rule Violation Line
DataClass The class 'ExtendableResourceResourceIdService' is suspected to be a Data Class (WOC=0.000%, NOPA=4, NOAM=0, WMC=1) 56168
CallSuperInConstructor It is a good practice to call super() in a constructor 8184
ShortVariable Avoid variables with short names like rt 92
ShortVariable Avoid variables with short names like p 98
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 137
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 137
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 138
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 139
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 140
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 141

fr/paris/lutece/plugins/extend/service/content/ExtendableContentPostProcessor.java

Rule Violation Line
CyclomaticComplexity The method 'process(HttpServletRequest, String)' has a cyclomatic complexity of 15. 142247
ExcessiveMethodLength Avoid really long methods. 142247
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 161
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 161
ShortVariable Avoid variables with short names like sb 167
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 168
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 169
UnusedLocalVariable Avoid unused local variables such as 'strMarker'. 189
CollapsibleIfStatements These nested if statements could be combined 225231

fr/paris/lutece/plugins/extend/service/converter/ExtenderStringMapper.java

Rule Violation Line
MissingBreakInSwitch A switch statement does not contain a break 7498

fr/paris/lutece/plugins/extend/service/extender/IResourceExtenderService.java

Rule Violation Line
TooManyMethods This class has too many methods, consider refactoring it. 58332
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 236237

fr/paris/lutece/plugins/extend/service/extender/ResourceExtenderCacheService.java

Rule Violation Line
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the ResourceExtenderCacheService constructor if you want a default access modifier 4952
CallSuperInConstructor It is a good practice to call super() in a constructor 4952

fr/paris/lutece/plugins/extend/service/extender/ResourceExtenderService.java

Rule Violation Line
TooManyMethods This class has too many methods, consider refactoring it. 68565
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 292
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 297
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 371
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 371
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 400401
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 536
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 536
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 540
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 540

fr/paris/lutece/plugins/extend/service/extender/config/ResourceExtenderConfigService.java

Rule Violation Line
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 170

fr/paris/lutece/plugins/extend/service/extender/facade/ExtenderType.java

Rule Violation Line
DefaultPackage Use explicit scoping instead of the default package private level 17
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the _t field if you want a default access modifier 17
ShortVariable Avoid variables with short names like _t 17
ImmutableField Private field '_strType' could be made final; it is only initialized in the declaration or constructor. 21
ShortVariable Avoid variables with short names like t 49
ShortVariable Avoid variables with short names like t 71
ControlStatementBraces This statement should have braces 116
ControlStatementBraces This statement should have braces 133
ControlStatementBraces This statement should have braces 151
ControlStatementBraces This statement should have braces 169

fr/paris/lutece/plugins/extend/service/extender/facade/IExtendableResourceResult.java

Rule Violation Line
CommentRequired Header comments are required 319

fr/paris/lutece/plugins/extend/service/extender/facade/InfoExtenderException.java

Rule Violation Line
CommentRequired Header comments are required 331

fr/paris/lutece/plugins/extend/service/extender/facade/ResourceExtenderServiceFacade.java

Rule Violation Line
ConfusingTernary Avoid if (x != y) ..; else ..; 160
ConfusingTernary Avoid if (x != y) ..; else ..; 161

fr/paris/lutece/plugins/extend/service/extender/history/IResourceExtenderHistoryService.java

Rule Violation Line
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 112

fr/paris/lutece/plugins/extend/service/extender/history/ResourceExtenderHistoryService.java

Rule Violation Line
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 102103
ConfusingTernary Avoid if (x != y) ..; else ..; 111

fr/paris/lutece/plugins/extend/service/type/ExtendableResourceTypeService.java

Rule Violation Line
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 87

fr/paris/lutece/plugins/extend/util/ExtendErrorException.java

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

fr/paris/lutece/plugins/extend/util/ExtendUtils.java

Rule Violation Line
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 87

fr/paris/lutece/plugins/extend/util/OperatorEnum.java

Rule Violation Line
UnnecessaryModifier Unnecessary modifier 'private' on constructor 'OperatorEnum(int, String)': enum constructors are implicitly private 6064
MissingOverride The method 'toString()' is missing an @Override annotation. 8184

fr/paris/lutece/plugins/extend/web/ResourceExtenderJspBean.java

Rule Violation Line
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 341101
ExcessiveClassLength Avoid really long classes. 901101
CyclomaticComplexity The class 'ResourceExtenderJspBean' has a total cyclomatic complexity of 89 (highest 10). 901101
ImmutableField Private field '_resourceExtenderSearchFields' could be made final; it is only initialized in the declaration or constructor. 163
ImmutableField Private field '_resourceTypeService' could be made final; it is only initialized in the declaration or constructor. 164
ImmutableField Private field '_extenderService' could be made final; it is only initialized in the declaration or constructor. 165
ImmutableField Private field '_extenderComponentManager' could be made final; it is only initialized in the declaration or constructor. 166
ImmutableField Private field '_resourceManager' could be made final; it is only initialized in the declaration or constructor. 167
ImmutableField Private field '_defaultResourceService' could be made final; it is only initialized in the declaration or constructor. 168
ImmutableField Private field '_resourceExtenderHistoryService' could be made final; it is only initialized in the declaration or constructor. 169
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 200
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 200
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 243
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 243
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 339
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 376
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 376
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 604
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 604
CyclomaticComplexity The method 'doCreateResourceExtender(HttpServletRequest)' has a cyclomatic complexity of 10. 623689
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 681684
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 731
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 796
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 821
UnnecessaryLocalBeforeReturn Consider simply returning the value vs storing it in local variable 'action' 1036
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 1087

fr/paris/lutece/plugins/extend/web/action/CreateResourceExtenderPluginAction.java

Rule Violation Line
UncommentedEmptyMethodBody Document empty method body 8182

fr/paris/lutece/plugins/extend/web/action/ModifyDefaultConfigPluginAction.java

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

fr/paris/lutece/plugins/extend/web/action/ResourceExtenderSearchFields.java

Rule Violation Line
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 246247

fr/paris/lutece/plugins/extend/web/component/ResourceExtenderComponentManager.java

Rule Violation Line
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 34395
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 206
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 206
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 235
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 235
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 279
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 279
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 319320
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 322
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 322
CyclomaticComplexity The method 'doSaveConfig(ResourceExtenderDTO, HttpServletRequest)' has a cyclomatic complexity of 10. 341394
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 352361
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 363391
IdenticalCatchBranches 'catch' branch identical to 'IllegalAccessException' branch 373376
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 381

fr/paris/lutece/plugins/extend/web/servlet/ExtendContent.java

Rule Violation Line
IdenticalCatchBranches 'catch' branch identical to 'IllegalAccessException' branch 7982

Priority 4

fr/paris/lutece/plugins/extend/business/extender/config/IExtenderConfigDAO.java

Rule Violation Line
GenericsNaming Generics names should be a one letter long and upper case. 44

fr/paris/lutece/plugins/extend/modules/hit/business/Hit.java

Rule Violation Line
ShortClassName Avoid short class names like Hit 45127

Files

fr/paris/lutece/plugins/extend/business/DefaultExtendableResource.java

Rule Violation Priority Line
UncommentedEmptyConstructor Document empty constructor 3 5153

fr/paris/lutece/plugins/extend/business/DefaultExtendableResourceDAO.java

Rule Violation Priority Line
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 5667

fr/paris/lutece/plugins/extend/business/extender/ResourceExtenderDAO.java

Rule Violation Priority Line
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 96110
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 171
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 192
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 214
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 235
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 243

fr/paris/lutece/plugins/extend/business/extender/ResourceExtenderDTOFilter.java

Rule Violation Priority Line
UncommentedEmptyConstructor Document empty constructor 3 8789
IdenticalCatchBranches 'catch' branch identical to 'IllegalAccessException' branch 3 124127
PositionLiteralsFirstInComparisons Position literals first in String comparisons 3 401
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 453

fr/paris/lutece/plugins/extend/business/extender/config/IExtenderConfigDAO.java

Rule Violation Priority Line
GenericsNaming Generics names should be a one letter long and upper case. 4 44

fr/paris/lutece/plugins/extend/business/extender/history/ResourceExtenderHistoryDAO.java

Rule Violation Priority Line
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 92110
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 148
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 184

fr/paris/lutece/plugins/extend/business/extender/history/ResourceExtenderHistoryFilter.java

Rule Violation Priority Line
ExcessivePublicCount This class has a bunch of public methods and attributes 3 34804
TooManyFields Too many fields 3 53804
GodClass Possible God Class (WMC=73, ATFD=23, TCC=4.374%) 3 53804
TooManyMethods This class has too many methods, consider refactoring it. 3 54804
InefficientStringBuffering Avoid concatenating nonliterals in a StringBuffer/StringBuilder constructor or append(). 3 687
CyclomaticComplexity The method 'setFilterValues(DAOUtil)' has a cyclomatic complexity of 10. 3 700748
NPathComplexity The method 'setFilterValues(DAOUtil)' has an NPath complexity of 512 3 700748
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 793

fr/paris/lutece/plugins/extend/modules/hit/business/Hit.java

Rule Violation Priority Line
ShortClassName Avoid short class names like Hit 4 45127

fr/paris/lutece/plugins/extend/modules/hit/business/HitDAO.java

Rule Violation Priority Line
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 97111
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 240
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 244

fr/paris/lutece/plugins/extend/modules/hit/business/HitHome.java

Rule Violation Priority Line
CommentRequired Header comments are required 3 10117
ClassWithOnlyPrivateConstructorsShouldBeFinal A class which only has private constructors should be final 1 10117

fr/paris/lutece/plugins/extend/modules/hit/service/HitAddOnService.java

Rule Violation Priority Line
UnnecessaryReturn Avoid unnecessary return statements 3 77

fr/paris/lutece/plugins/extend/modules/hit/service/IHitService.java

Rule Violation Priority Line
UnnecessaryModifier Unnecessary modifier 'public' on method 'findIdMostHitedResources': the method is declared in an interface type 3 120

fr/paris/lutece/plugins/extend/modules/hit/web/action/HitInstallerPluginAction.java

Rule Violation Priority Line
UncommentedEmptyMethodBody Document empty method body 3 7475

fr/paris/lutece/plugins/extend/modules/hit/web/component/HitResourceExtenderComponent.java

Rule Violation Priority Line
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 119
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 119
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 140
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 140
GuardLogStatement Logger calls should be surrounded by log level guards. 2 171
GuardLogStatement Logger calls should be surrounded by log level guards. 2 198

fr/paris/lutece/plugins/extend/service/ExtendableResourceManager.java

Rule Violation Priority Line
CollapsibleIfStatements These nested if statements could be combined 3 109112

fr/paris/lutece/plugins/extend/service/ExtendableResourceRemovalListener.java

Rule Violation Priority Line
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 3 71
DoubleCheckedLocking Double checked locking is not thread safe in Java. 1 103118
DoubleCheckedLocking Double checked locking is not thread safe in Java. 1 125140

fr/paris/lutece/plugins/extend/service/ExtendableResourceResourceIdService.java

Rule Violation Priority Line
DataClass The class 'ExtendableResourceResourceIdService' is suspected to be a Data Class (WOC=0.000%, NOPA=4, NOAM=0, WMC=1) 3 56168
CallSuperInConstructor It is a good practice to call super() in a constructor 3 8184
ShortVariable Avoid variables with short names like rt 3 92
ShortVariable Avoid variables with short names like p 3 98
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 137
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 3 137
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 138
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 139
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 140
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 141

fr/paris/lutece/plugins/extend/service/content/ExtendableContentPostProcessor.java

Rule Violation Priority Line
CyclomaticComplexity The method 'process(HttpServletRequest, String)' has a cyclomatic complexity of 15. 3 142247
ExcessiveMethodLength Avoid really long methods. 3 142247
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 161
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 161
ShortVariable Avoid variables with short names like sb 3 167
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 168
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 169
UnusedLocalVariable Avoid unused local variables such as 'strMarker'. 3 189
CollapsibleIfStatements These nested if statements could be combined 3 225231

fr/paris/lutece/plugins/extend/service/converter/ExtenderStringMapper.java

Rule Violation Priority Line
MissingBreakInSwitch A switch statement does not contain a break 3 7498

fr/paris/lutece/plugins/extend/service/extender/IResourceExtenderService.java

Rule Violation Priority Line
TooManyMethods This class has too many methods, consider refactoring it. 3 58332
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 3 236237

fr/paris/lutece/plugins/extend/service/extender/ResourceExtenderCacheService.java

Rule Violation Priority Line
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the ResourceExtenderCacheService constructor if you want a default access modifier 3 4952
CallSuperInConstructor It is a good practice to call super() in a constructor 3 4952
ConstructorCallsOverridableMethod Overridable method 'getName' called during object construction 1 51

fr/paris/lutece/plugins/extend/service/extender/ResourceExtenderService.java

Rule Violation Priority Line
TooManyMethods This class has too many methods, consider refactoring it. 3 68565
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 292
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 297
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 371
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 371
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 3 400401
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 536
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 536
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 540
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 540

fr/paris/lutece/plugins/extend/service/extender/config/ResourceExtenderConfigService.java

Rule Violation Priority Line
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 170

fr/paris/lutece/plugins/extend/service/extender/facade/ExtenderType.java

Rule Violation Priority Line
DefaultPackage Use explicit scoping instead of the default package private level 3 17
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the _t field if you want a default access modifier 3 17
ShortVariable Avoid variables with short names like _t 3 17
ImmutableField Private field '_strType' could be made final; it is only initialized in the declaration or constructor. 3 21
ShortVariable Avoid variables with short names like t 3 49
ShortVariable Avoid variables with short names like t 3 71
ControlStatementBraces This statement should have braces 3 116
ControlStatementBraces This statement should have braces 3 133
ControlStatementBraces This statement should have braces 3 151
ControlStatementBraces This statement should have braces 3 169

fr/paris/lutece/plugins/extend/service/extender/facade/IExtendableResourceResult.java

Rule Violation Priority Line
CommentRequired Header comments are required 3 319

fr/paris/lutece/plugins/extend/service/extender/facade/InfoExtenderException.java

Rule Violation Priority Line
CommentRequired Header comments are required 3 331

fr/paris/lutece/plugins/extend/service/extender/facade/ResourceExtenderServiceFacade.java

Rule Violation Priority Line
ClassWithOnlyPrivateConstructorsShouldBeFinal A class which only has private constructors should be final 1 16166
ConfusingTernary Avoid if (x != y) ..; else ..; 3 160
ConfusingTernary Avoid if (x != y) ..; else ..; 3 161

fr/paris/lutece/plugins/extend/service/extender/history/IResourceExtenderHistoryService.java

Rule Violation Priority Line
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 3 112

fr/paris/lutece/plugins/extend/service/extender/history/ResourceExtenderHistoryService.java

Rule Violation Priority Line
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 3 102103
ConfusingTernary Avoid if (x != y) ..; else ..; 3 111

fr/paris/lutece/plugins/extend/service/type/ExtendableResourceTypeService.java

Rule Violation Priority Line
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 87

fr/paris/lutece/plugins/extend/util/ExtendErrorException.java

Rule Violation Priority Line
FieldNamingConventions The final field name '_strErrorMessage' 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/extend/util/ExtendUtils.java

Rule Violation Priority Line
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 3 87

fr/paris/lutece/plugins/extend/util/OperatorEnum.java

Rule Violation Priority Line
UnnecessaryModifier Unnecessary modifier 'private' on constructor 'OperatorEnum(int, String)': enum constructors are implicitly private 3 6064
MissingOverride The method 'toString()' is missing an @Override annotation. 3 8184

fr/paris/lutece/plugins/extend/web/ResourceExtenderJspBean.java

Rule Violation Priority Line
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 3 341101
ExcessiveClassLength Avoid really long classes. 3 901101
CyclomaticComplexity The class 'ResourceExtenderJspBean' has a total cyclomatic complexity of 89 (highest 10). 3 901101
ImmutableField Private field '_resourceExtenderSearchFields' could be made final; it is only initialized in the declaration or constructor. 3 163
ImmutableField Private field '_resourceTypeService' could be made final; it is only initialized in the declaration or constructor. 3 164
ImmutableField Private field '_extenderService' could be made final; it is only initialized in the declaration or constructor. 3 165
ImmutableField Private field '_extenderComponentManager' could be made final; it is only initialized in the declaration or constructor. 3 166
ImmutableField Private field '_resourceManager' could be made final; it is only initialized in the declaration or constructor. 3 167
ImmutableField Private field '_defaultResourceService' could be made final; it is only initialized in the declaration or constructor. 3 168
ImmutableField Private field '_resourceExtenderHistoryService' could be made final; it is only initialized in the declaration or constructor. 3 169
GuardLogStatement Logger calls should be surrounded by log level guards. 2 195
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 200
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 200
GuardLogStatement Logger calls should be surrounded by log level guards. 2 238
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 243
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 243
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 339
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 376
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 376
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 604
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 604
CyclomaticComplexity The method 'doCreateResourceExtender(HttpServletRequest)' has a cyclomatic complexity of 10. 3 623689
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 681684
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 731
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 796
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 821
UnnecessaryLocalBeforeReturn Consider simply returning the value vs storing it in local variable 'action' 3 1036
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 1087

fr/paris/lutece/plugins/extend/web/action/CreateResourceExtenderPluginAction.java

Rule Violation Priority Line
UncommentedEmptyMethodBody Document empty method body 3 8182

fr/paris/lutece/plugins/extend/web/action/ModifyDefaultConfigPluginAction.java

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

fr/paris/lutece/plugins/extend/web/action/ResourceExtenderSearchFields.java

Rule Violation Priority Line
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 246247

fr/paris/lutece/plugins/extend/web/component/NoConfigResourceExtenderComponent.java

Rule Violation Priority Line
EmptyMethodInAbstractClassShouldBeAbstract An empty method in an abstract class should be abstract instead 1 6568
EmptyMethodInAbstractClassShouldBeAbstract An empty method in an abstract class should be abstract instead 1 7477

fr/paris/lutece/plugins/extend/web/component/ResourceExtenderComponentManager.java

Rule Violation Priority Line
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 3 34395
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 206
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 206
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 235
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 235
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 279
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 279
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 319320
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 322
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 322
CyclomaticComplexity The method 'doSaveConfig(ResourceExtenderDTO, HttpServletRequest)' has a cyclomatic complexity of 10. 3 341394
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 352361
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 363391
IdenticalCatchBranches 'catch' branch identical to 'IllegalAccessException' branch 3 373376
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 3 381

fr/paris/lutece/plugins/extend/web/servlet/ExtendContent.java

Rule Violation Priority Line
IdenticalCatchBranches 'catch' branch identical to 'IllegalAccessException' branch 3 7982