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/crm/business/demand/Demand.java

Rule Violation Line
FormalParameterNamingConventions The method parameter name '_strRemoteId' doesn't match '[a-z][a-zA-Z0-9]*' 237

fr/paris/lutece/plugins/crm/business/demand/DemandType.java

Rule Violation Line
FormalParameterNamingConventions The method parameter name '_bUseIdCrmUser' doesn't match '[a-z][a-zA-Z0-9]*' 501
FormalParameterNamingConventions The method parameter name '_bNeedAuthentication' doesn't match '[a-z][a-zA-Z0-9]*' 521
FormalParameterNamingConventions The method parameter name '_bNeedValidation' doesn't match '[a-z][a-zA-Z0-9]*' 541

fr/paris/lutece/plugins/crm/business/portlet/DemandTypePortlet.java

Rule Violation Line
FormalParameterNamingConventions The method parameter name '_nIdCategory' doesn't match '[a-z][a-zA-Z0-9]*' 151

fr/paris/lutece/plugins/crm/business/user/CRMUser.java

Rule Violation Line
FormalParameterNamingConventions The method parameter name '_bMustBeUpdated' doesn't match '[a-z][a-zA-Z0-9]*' 235

fr/paris/lutece/plugins/crm/service/listener/CRMDemandTypeRemovalListenerService.java

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

fr/paris/lutece/plugins/crm/service/listener/CRMUserModificationListenerService.java

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

fr/paris/lutece/plugins/crm/util/constants/CRMConstants.java

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

Priority 2

fr/paris/lutece/plugins/crm/business/demand/DemandType.java

Rule Violation Line
BooleanInstantiation Avoid instantiating Boolean objects; reference Boolean.TRUE or Boolean.FALSE or call Boolean.valueOf() instead. 480
BooleanInstantiation Avoid instantiating Boolean objects; reference Boolean.TRUE or Boolean.FALSE or call Boolean.valueOf() instead. 481

Priority 3

fr/paris/lutece/plugins/crm/business/demand/DemandDAO.java

Rule Violation Line
TooManyMethods This class has too many methods, consider refactoring it. 53502
MissingOverride The method 'newPrimaryKey(Plugin)' is missing an @Override annotation. 8398
MissingOverride The method 'insert(Demand, Plugin)' is missing an @Override annotation. 103129
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 103129
MissingOverride The method 'load(int, Plugin)' is missing an @Override annotation. 134159
MissingOverride The method 'store(Demand, Plugin)' is missing an @Override annotation. 197218
MissingOverride The method 'delete(int, Plugin)' is missing an @Override annotation. 223230
MissingOverride The method 'selectAll(Plugin)' is missing an @Override annotation. 235259
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 237
MissingOverride The method 'selectByFilter(DemandFilter, IPaginationProperties, Plugin)' is missing an @Override annotation. 264298
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 266
InefficientStringBuffering Avoid concatenating nonliterals in a StringBuffer/StringBuilder constructor or append(). 271
CyclomaticComplexity The method 'buildSQLQuery(DemandFilter)' has a cyclomatic complexity of 14. 307398
NPathComplexity The method 'buildSQLQuery(DemandFilter)' has an NPath complexity of 960 307398
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 417
SimpleDateFormatNeedsLocale When instantiating a SimpleDateFormat object, specify a Locale 452
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 455
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 468
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 469
MissingOverride The method 'countByFilter(DemandFilter, Plugin)' is missing an @Override annotation. 480501
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 483
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 484

fr/paris/lutece/plugins/crm/business/demand/DemandFilter.java

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

fr/paris/lutece/plugins/crm/business/demand/DemandSort.java

Rule Violation Line
UncommentedEmptyConstructor Document empty constructor 4850

fr/paris/lutece/plugins/crm/business/demand/DemandStatusCRMDAO.java

Rule Violation Line
MissingOverride The method 'load(int, Plugin)' is missing an @Override annotation. 5574
MissingOverride The method 'selectAll(Plugin)' is missing an @Override annotation. 7998
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 84

fr/paris/lutece/plugins/crm/business/demand/DemandType.java

Rule Violation Line
TooManyFields Too many fields 57546
MissingOverride The method 'getWorkgroup()' is missing an @Override annotation. 334337
ConfusingTernary Avoid if (x != y) ..; else ..; 373383
ConfusingTernary Avoid if (x != y) ..; else ..; 385395
ConfusingTernary Avoid if (x != y) ..; else ..; 478
ConfusingTernary Avoid if (x != y) ..; else ..; 479
UnnecessaryConversionTemporary Avoid unnecessary temporaries when converting primitives to Strings 480
UnnecessaryConversionTemporary Avoid unnecessary temporaries when converting primitives to Strings 481

fr/paris/lutece/plugins/crm/business/demand/DemandTypeCategoryRemovalListener.java

Rule Violation Line
MissingOverride The method 'canBeRemoved(String)' is missing an @Override annotation. 6180
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 73
MissingOverride The method 'getRemovalRefusedMessage(String, Locale)' is missing an @Override annotation. 9194

fr/paris/lutece/plugins/crm/business/demand/DemandTypeDAO.java

Rule Violation Line
GodClass Possible God Class (WMC=48, ATFD=160, TCC=6.593%) 50654
TooManyMethods This class has too many methods, consider refactoring it. 51654
MissingOverride The method 'newPrimaryKey(Plugin)' is missing an @Override annotation. 86101
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 106156
MissingOverride The method 'insert(DemandType, Plugin)' is missing an @Override annotation. 106156
MissingOverride The method 'load(int, Plugin)' is missing an @Override annotation. 161194
MissingOverride The method 'store(DemandType, Plugin)' is missing an @Override annotation. 199243
MissingOverride The method 'delete(int, Plugin)' is missing an @Override annotation. 248254
MissingOverride The method 'selectAll(Plugin)' is missing an @Override annotation. 259297
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 261
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 263
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 264
MissingOverride The method 'selectByIdCategoryAndDate(int, java.util.Date, Plugin)' is missing an @Override annotation. 302346
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 304
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 306
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 307
MissingOverride The method 'selectByOrder(int, Plugin)' is missing an @Override annotation. 351385
MissingOverride The method 'selectMaxOrder(Plugin)' is missing an @Override annotation. 390406
MissingOverride The method 'selectDemandTypesByFilter(DemandTypeFilter, Plugin)' is missing an @Override annotation. 411450
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 413
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 415
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 416
MissingOverride The method 'selectNoDateEndDemandTypes(Plugin)' is missing an @Override annotation. 455489
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 457
CyclomaticComplexity The method 'buildSQLQuery(DemandTypeFilter)' has a cyclomatic complexity of 10. 498564
NPathComplexity The method 'buildSQLQuery(DemandTypeFilter)' has an NPath complexity of 512 498564
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 583
CyclomaticComplexity The method 'setFilterValues(DemandTypeFilter, DAOUtil)' has a cyclomatic complexity of 10. 603653
NPathComplexity The method 'setFilterValues(DemandTypeFilter, DAOUtil)' has an NPath complexity of 512 603653

fr/paris/lutece/plugins/crm/business/demand/DemandTypeFilter.java

Rule Violation Line
ImmutableField Private field '_strUrlDelete' could be made final; it is only initialized in the declaration or constructor. 62

fr/paris/lutece/plugins/crm/business/demand/DemandTypeHome.java

Rule Violation Line
TooManyMethods This class has too many methods, consider refactoring it. 50202

fr/paris/lutece/plugins/crm/business/demand/DemandTypeRoleRemovalListener.java

Rule Violation Line
MissingOverride The method 'canBeRemoved(String)' is missing an @Override annotation. 6179
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 72
MissingOverride The method 'getRemovalRefusedMessage(String, Locale)' is missing an @Override annotation. 9093

fr/paris/lutece/plugins/crm/business/demand/DemandTypeWorkgroupRemovalListener.java

Rule Violation Line
MissingOverride The method 'canBeRemoved(String)' is missing an @Override annotation. 5977
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 70
MissingOverride The method 'getRemovalRefusedMessage(String, Locale)' is missing an @Override annotation. 8892

fr/paris/lutece/plugins/crm/business/demand/IDemandTypeDAO.java

Rule Violation Line
TooManyMethods This class has too many methods, consider refactoring it. 46159

fr/paris/lutece/plugins/crm/business/demand/IPaginationProperties.java

Rule Violation Line
CommentRequired Public method and constructor comments are required 56
CommentRequired Public method and constructor comments are required 58

fr/paris/lutece/plugins/crm/business/demand/PaginationFilterSortManager.java

Rule Violation Line
TooManyMethods This class has too many methods, consider refactoring it. 60417
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 317318

fr/paris/lutece/plugins/crm/business/demand/PaginationPropertiesImpl.java

Rule Violation Line
CommentRequired Public method and constructor comments are required 7073
MissingOverride The method 'getFirstResult()' is missing an @Override annotation. 7073
CommentRequired Public method and constructor comments are required 7578
MissingOverride The method 'getPageSize()' is missing an @Override annotation. 7578
MissingOverride The method 'getItemsPerPage()' is missing an @Override annotation. 8083
CommentRequired Public method and constructor comments are required 8083
CommentRequired Public method and constructor comments are required 8588
MissingOverride The method 'getPageIndex()' is missing an @Override annotation. 8588

fr/paris/lutece/plugins/crm/business/demand/category/CategoryDAO.java

Rule Violation Line
MissingOverride The method 'newPrimaryKey(Plugin)' is missing an @Override annotation. 6280
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 85102
MissingOverride The method 'insert(Category, Plugin)' is missing an @Override annotation. 85102
MissingOverride The method 'load(int, Plugin)' is missing an @Override annotation. 107129
MissingOverride The method 'delete(int, Plugin)' is missing an @Override annotation. 134141
MissingOverride The method 'store(Category, Plugin)' is missing an @Override annotation. 146159
MissingOverride The method 'selectCategoriesList(Plugin)' is missing an @Override annotation. 164185
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 166
MissingOverride The method 'selectFirstCategory(Plugin)' is missing an @Override annotation. 190211

fr/paris/lutece/plugins/crm/business/notification/NotificationDAO.java

Rule Violation Line
MissingOverride The method 'newPrimaryKey(Plugin)' is missing an @Override annotation. 7186
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 91117
MissingOverride The method 'insert(Notification, Plugin)' is missing an @Override annotation. 91117
MissingOverride The method 'load(int, Plugin)' is missing an @Override annotation. 122146
MissingOverride The method 'store(Notification, Plugin)' is missing an @Override annotation. 151169
MissingOverride The method 'delete(int, Plugin)' is missing an @Override annotation. 174180
MissingOverride The method 'deleteByIdDemand(int, Plugin)' is missing an @Override annotation. 185191
MissingOverride The method 'selectAll(Plugin)' is missing an @Override annotation. 196224
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 199
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 200
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 203
MissingOverride The method 'selectNotificationsByFilter(NotificationFilter, Plugin)' is missing an @Override annotation. 229258
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 231
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 233
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 234
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 304

fr/paris/lutece/plugins/crm/business/portlet/DemandTypePortlet.java

Rule Violation Line
UncommentedEmptyConstructor Document empty constructor 6668
CallSuperInConstructor It is a good practice to call super() in a constructor 6668
UnnecessaryConstructor Avoid unnecessary constructors - the compiler will generate these for you 6668
MissingOverride The method 'getXml(HttpServletRequest)' is missing an @Override annotation. 77133
ConfusingTernary Avoid if (x != y) ..; else ..; 8289
ConfusingTernary Avoid if (x != y) ..; else ..; 95125
ConfusingTernary Avoid if (x != y) ..; else ..; 98108
UnnecessaryLocalBeforeReturn Consider simply returning the value vs storing it in local variable 'str' 132
MissingOverride The method 'getXmlDocument(HttpServletRequest)' is missing an @Override annotation. 163166
MissingOverride The method 'remove()' is missing an @Override annotation. 179182
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 188

fr/paris/lutece/plugins/crm/business/portlet/DemandTypePortletDAO.java

Rule Violation Line
ShortVariable Avoid variables with short names like p 59
ShortVariable Avoid variables with short names like p 131

fr/paris/lutece/plugins/crm/business/portlet/DemandTypePortletHome.java

Rule Violation Line
AssignmentToNonFinalStatic Possible unsafe assignment to a non-final static field in a constructor. 52
CallSuperInConstructor It is a good practice to call super() in a constructor 5763
NonThreadSafeSingleton Singleton is not thread safe 7275
MissingOverride The method 'getPortletTypeId()' is missing an @Override annotation. 8591
UnnecessaryLocalBeforeReturn Consider simply returning the value vs storing it in local variable 'strPortletTypeId' 90
MissingOverride The method 'getDAO()' is missing an @Override annotation. 98101

fr/paris/lutece/plugins/crm/business/user/CRMUserAttributeDAO.java

Rule Violation Line
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 5870
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 90
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 90

fr/paris/lutece/plugins/crm/business/user/CRMUserDAO.java

Rule Violation Line
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 146
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 187
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 238
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 260
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 279
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 301

fr/paris/lutece/plugins/crm/business/user/CRMUserFilter.java

Rule Violation Line
IdenticalCatchBranches 'catch' branch identical to 'IllegalAccessException' branch 9598
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 101
InefficientStringBuffering Avoid concatenating nonliterals in a StringBuffer/StringBuilder constructor or append(). 337
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 436

fr/paris/lutece/plugins/crm/service/category/CategoryService.java

Rule Violation Line
UncommentedEmptyConstructor Document empty constructor 6466
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 7376
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 171
ConfusingTernary Avoid if (x != y) ..; else ..; 173180
CommentRequired Public method and constructor comments are required 209212

fr/paris/lutece/plugins/crm/service/daemon/DemandCleanerDaemon.java

Rule Violation Line
MissingOverride The method 'run()' is missing an @Override annotation. 6099

fr/paris/lutece/plugins/crm/service/demand/DemandService.java

Rule Violation Line
TooManyMethods This class has too many methods, consider refactoring it. 67355
UncommentedEmptyConstructor Document empty constructor 7375
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 261
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 261
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 293
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 293
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 308

fr/paris/lutece/plugins/crm/service/demand/DemandStatusCRMService.java

Rule Violation Line
UncommentedEmptyConstructor Document empty constructor 5658

fr/paris/lutece/plugins/crm/service/demand/DemandTypeService.java

Rule Violation Line
TooManyMethods This class has too many methods, consider refactoring it. 73461
UncommentedEmptyConstructor Document empty constructor 7981
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 145150
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 254
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 275
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 275

fr/paris/lutece/plugins/crm/service/demand/DemandWebService.java

Rule Violation Line
UncommentedEmptyConstructor Document empty constructor 5961
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 88
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 88
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 94

fr/paris/lutece/plugins/crm/service/listener/CRMDemandTypeRemovalListenerService.java

Rule Violation Line
NonThreadSafeSingleton Singleton is not thread safe 6366

fr/paris/lutece/plugins/crm/service/listener/CRMUserModificationListenerService.java

Rule Violation Line
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 51
ImmutableField Private field '_listRegisteredListeners' could be made final; it is only initialized in the declaration or constructor. 51
CallSuperInConstructor It is a good practice to call super() in a constructor 5658
NonThreadSafeSingleton Singleton is not thread safe 6770
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 99

fr/paris/lutece/plugins/crm/service/notification/NotificationService.java

Rule Violation Line
UncommentedEmptyConstructor Document empty constructor 5860

fr/paris/lutece/plugins/crm/service/parameters/AdvancedParametersService.java

Rule Violation Line
UncommentedEmptyConstructor Document empty constructor 5355

fr/paris/lutece/plugins/crm/service/user/CRMUserAttributesService.java

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

fr/paris/lutece/plugins/crm/service/user/CRMUserService.java

Rule Violation Line
UncommentedEmptyConstructor Document empty constructor 5860
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 155

fr/paris/lutece/plugins/crm/util/CrmUtils.java

Rule Violation Line
CommentRequired Header comments are required 661
UseUtilityClass All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 761
ConfusingTernary Avoid if (x != y) ..; else ..; 5158

fr/paris/lutece/plugins/crm/util/IListenerDemandType.java

Rule Violation Line
CommentRequired Header comments are required 3942

fr/paris/lutece/plugins/crm/util/ListUtils.java

Rule Violation Line
UseUtilityClass All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 86162
AvoidDuplicateLiterals The String literal "Erreur lors de la création d'une liste pour combo : " appears 4 times in this file; the first occurrence is on line 122 122
IdenticalCatchBranches 'catch' branch identical to 'IllegalAccessException' branch 124127
IdenticalCatchBranches 'catch' branch identical to 'IllegalAccessException' branch 128131
IdenticalCatchBranches 'catch' branch identical to 'IllegalAccessException' branch 132135
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 132

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

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

fr/paris/lutece/plugins/crm/util/TargetEnum.java

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

fr/paris/lutece/plugins/crm/web/CRMApp.java

Rule Violation Line
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 34867
CyclomaticComplexity The class 'CRMApp' has a total cyclomatic complexity of 98 (highest 18). 93867
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 93867
ImmutableField Private field '_demandTypeService' could be made final; it is only initialized in the declaration or constructor. 106
ImmutableField Private field '_demandService' could be made final; it is only initialized in the declaration or constructor. 107
ImmutableField Private field '_categoryService' could be made final; it is only initialized in the declaration or constructor. 108
ImmutableField Private field '_notificationService' could be made final; it is only initialized in the declaration or constructor. 109
ImmutableField Private field '_statusCRMService' could be made final; it is only initialized in the declaration or constructor. 110
ImmutableField Private field '_crmUserService' could be made final; it is only initialized in the declaration or constructor. 111
ImmutableField Private field '_crmUserAttributesService' could be made final; it is only initialized in the declaration or constructor. 112
ImmutableField Private field '_advancedParametersService' could be made final; it is only initialized in the declaration or constructor. 113
CyclomaticComplexity The method 'getPage(HttpServletRequest, int, Plugin)' has a cyclomatic complexity of 11. 133191
EmptyCatchBlock Avoid empty catch blocks 142145
NPathComplexity The method 'getCRMHomePage(HttpServletRequest, LuteceUser)' has an NPath complexity of 18434 203332
CyclomaticComplexity The method 'getCRMHomePage(HttpServletRequest, LuteceUser)' has a cyclomatic complexity of 18. 203332
NcssCount The method 'getCRMHomePage(HttpServletRequest, LuteceUser)' has a NCSS line count of 74. 203332
ExcessiveMethodLength Avoid really long methods. 203332
ConfusingTernary Avoid if (x != y) ..; else ..; 206
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 208
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 208
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 292
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 292
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 293
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 293
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 364
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 364
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 417
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 417
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 452
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 452
CyclomaticComplexity The method 'doModifyCRMUser(HttpServletRequest, LuteceUser)' has a cyclomatic complexity of 11. 475525
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 487
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 487
CollapsibleIfStatements These nested if statements could be combined 510513
LinguisticNaming Linguistics Antipattern - The getter 'getDemandRemovingConfirmationMessage' should not return void linguistically 537594
CyclomaticComplexity The method 'getDemandRemovingConfirmationMessage(HttpServletRequest, LuteceUser)' has a cyclomatic complexity of 11. 537594
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 557
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 615
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 615
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 630
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 630
CyclomaticComplexity The method 'doOpenDemandType(HttpServletRequest)' has a cyclomatic complexity of 13. 650726
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 685
CyclomaticComplexity The method 'doEditDemand(HttpServletRequest)' has a cyclomatic complexity of 12. 735788
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 758
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 824
SimpleDateFormatNeedsLocale When instantiating a SimpleDateFormat object, specify a Locale 844
ShortVariable Avoid variables with short names like d 847
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 853
ShortVariable Avoid variables with short names like t 858

fr/paris/lutece/plugins/crm/web/category/CategoryJspBean.java

Rule Violation Line
ImmutableField Private field '_categoryService' could be made final; it is only initialized in the declaration or constructor. 81
SingularField Perhaps '_nDefaultItemsPerPage' could be replaced by a local variable. 82
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 104105
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 107
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 107
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 129
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 129
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 254
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 254
ConfusingTernary Avoid if (x != y) ..; else ..; 292304

fr/paris/lutece/plugins/crm/web/demand/DemandTypeJspBean.java

Rule Violation Line
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 34816
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 79816
CyclomaticComplexity The class 'DemandTypeJspBean' has a total cyclomatic complexity of 95 (highest 27). 79816
ImmutableField Private field '_advancedParametersService' could be made final; it is only initialized in the declaration or constructor. 95
ImmutableField Private field '_demandTypeService' could be made final; it is only initialized in the declaration or constructor. 96
ImmutableField Private field '_demandService' could be made final; it is only initialized in the declaration or constructor. 97
ImmutableField Private field '_categoryService' could be made final; it is only initialized in the declaration or constructor. 98
SingularField Perhaps '_nDefaultItemsPerPage' could be replaced by a local variable. 100
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 122123
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 125
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 125
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 155
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 155
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 176
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 176
ConfusingTernary Avoid if (x != y) ..; else ..; 289311
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 291
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 291
ExcessiveMethodLength Avoid really long methods. 529643
NcssCount The method 'getDemandTypeData(HttpServletRequest, DemandType)' has a NCSS line count of 65. 529643
CyclomaticComplexity The method 'getDemandTypeData(HttpServletRequest, DemandType)' has a cyclomatic complexity of 27. 529643
NPathComplexity The method 'getDemandTypeData(HttpServletRequest, DemandType)' has an NPath complexity of 175502 529643
ConfusingTernary Avoid if (x != y) ..; else ..; 579589
ConfusingTernary Avoid if (x != y) ..; else ..; 596606
CollapsibleIfStatements These nested if statements could be combined 612615
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 667
CyclomaticComplexity The method 'doSearchDemandTypesList(HttpServletRequest)' has a cyclomatic complexity of 20. 700786
NPathComplexity The method 'doSearchDemandTypesList(HttpServletRequest)' has an NPath complexity of 6146 700786
CollapsibleIfStatements These nested if statements could be combined 739742
CollapsibleIfStatements These nested if statements could be combined 752755

fr/paris/lutece/plugins/crm/web/portlet/DemandTypePortletJspBean.java

Rule Violation Line
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 52151
ImmutableField Private field '_categoryService' could be made final; it is only initialized in the declaration or constructor. 56
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 64
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 80
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 102
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 131

Priority 4

fr/paris/lutece/plugins/crm/business/demand/DemandFilter.java

Rule Violation Line
BooleanGetMethodName A getX() method which returns a boolean should be named isX() 101104

fr/paris/lutece/plugins/crm/business/demand/DemandTypeFilter.java

Rule Violation Line
BooleanGetMethodName A getX() method which returns a boolean should be named isX() 107110

fr/paris/lutece/plugins/crm/business/notification/NotificationFilter.java

Rule Violation Line
BooleanGetMethodName A getX() method which returns a boolean should be named isX() 8689

Files

fr/paris/lutece/plugins/crm/business/demand/Demand.java

Rule Violation Priority Line
FormalParameterNamingConventions The method parameter name '_strRemoteId' doesn't match '[a-z][a-zA-Z0-9]*' 1 237

fr/paris/lutece/plugins/crm/business/demand/DemandDAO.java

Rule Violation Priority Line
TooManyMethods This class has too many methods, consider refactoring it. 3 53502
MissingOverride The method 'newPrimaryKey(Plugin)' is missing an @Override annotation. 3 8398
MissingOverride The method 'insert(Demand, Plugin)' is missing an @Override annotation. 3 103129
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 103129
MissingOverride The method 'load(int, Plugin)' is missing an @Override annotation. 3 134159
MissingOverride The method 'store(Demand, Plugin)' is missing an @Override annotation. 3 197218
MissingOverride The method 'delete(int, Plugin)' is missing an @Override annotation. 3 223230
MissingOverride The method 'selectAll(Plugin)' is missing an @Override annotation. 3 235259
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 237
MissingOverride The method 'selectByFilter(DemandFilter, IPaginationProperties, Plugin)' is missing an @Override annotation. 3 264298
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 266
InefficientStringBuffering Avoid concatenating nonliterals in a StringBuffer/StringBuilder constructor or append(). 3 271
CyclomaticComplexity The method 'buildSQLQuery(DemandFilter)' has a cyclomatic complexity of 14. 3 307398
NPathComplexity The method 'buildSQLQuery(DemandFilter)' has an NPath complexity of 960 3 307398
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 417
SimpleDateFormatNeedsLocale When instantiating a SimpleDateFormat object, specify a Locale 3 452
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 455
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 468
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 469
MissingOverride The method 'countByFilter(DemandFilter, Plugin)' is missing an @Override annotation. 3 480501
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 483
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 484

fr/paris/lutece/plugins/crm/business/demand/DemandFilter.java

Rule Violation Priority Line
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 72
BooleanGetMethodName A getX() method which returns a boolean should be named isX() 4 101104

fr/paris/lutece/plugins/crm/business/demand/DemandSort.java

Rule Violation Priority Line
UncommentedEmptyConstructor Document empty constructor 3 4850

fr/paris/lutece/plugins/crm/business/demand/DemandStatusCRMDAO.java

Rule Violation Priority Line
MissingOverride The method 'load(int, Plugin)' is missing an @Override annotation. 3 5574
MissingOverride The method 'selectAll(Plugin)' is missing an @Override annotation. 3 7998
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 84

fr/paris/lutece/plugins/crm/business/demand/DemandType.java

Rule Violation Priority Line
TooManyFields Too many fields 3 57546
MissingOverride The method 'getWorkgroup()' is missing an @Override annotation. 3 334337
ConfusingTernary Avoid if (x != y) ..; else ..; 3 373383
ConfusingTernary Avoid if (x != y) ..; else ..; 3 385395
ConfusingTernary Avoid if (x != y) ..; else ..; 3 478
ConfusingTernary Avoid if (x != y) ..; else ..; 3 479
BooleanInstantiation Avoid instantiating Boolean objects; reference Boolean.TRUE or Boolean.FALSE or call Boolean.valueOf() instead. 2 480
UnnecessaryConversionTemporary Avoid unnecessary temporaries when converting primitives to Strings 3 480
UnnecessaryConversionTemporary Avoid unnecessary temporaries when converting primitives to Strings 3 481
BooleanInstantiation Avoid instantiating Boolean objects; reference Boolean.TRUE or Boolean.FALSE or call Boolean.valueOf() instead. 2 481
FormalParameterNamingConventions The method parameter name '_bUseIdCrmUser' doesn't match '[a-z][a-zA-Z0-9]*' 1 501
FormalParameterNamingConventions The method parameter name '_bNeedAuthentication' doesn't match '[a-z][a-zA-Z0-9]*' 1 521
FormalParameterNamingConventions The method parameter name '_bNeedValidation' doesn't match '[a-z][a-zA-Z0-9]*' 1 541

fr/paris/lutece/plugins/crm/business/demand/DemandTypeCategoryRemovalListener.java

Rule Violation Priority Line
MissingOverride The method 'canBeRemoved(String)' is missing an @Override annotation. 3 6180
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 3 73
MissingOverride The method 'getRemovalRefusedMessage(String, Locale)' is missing an @Override annotation. 3 9194

fr/paris/lutece/plugins/crm/business/demand/DemandTypeDAO.java

Rule Violation Priority Line
GodClass Possible God Class (WMC=48, ATFD=160, TCC=6.593%) 3 50654
TooManyMethods This class has too many methods, consider refactoring it. 3 51654
MissingOverride The method 'newPrimaryKey(Plugin)' is missing an @Override annotation. 3 86101
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 106156
MissingOverride The method 'insert(DemandType, Plugin)' is missing an @Override annotation. 3 106156
MissingOverride The method 'load(int, Plugin)' is missing an @Override annotation. 3 161194
MissingOverride The method 'store(DemandType, Plugin)' is missing an @Override annotation. 3 199243
MissingOverride The method 'delete(int, Plugin)' is missing an @Override annotation. 3 248254
MissingOverride The method 'selectAll(Plugin)' is missing an @Override annotation. 3 259297
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 261
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 263
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 264
MissingOverride The method 'selectByIdCategoryAndDate(int, java.util.Date, Plugin)' is missing an @Override annotation. 3 302346
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 304
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 306
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 307
MissingOverride The method 'selectByOrder(int, Plugin)' is missing an @Override annotation. 3 351385
MissingOverride The method 'selectMaxOrder(Plugin)' is missing an @Override annotation. 3 390406
MissingOverride The method 'selectDemandTypesByFilter(DemandTypeFilter, Plugin)' is missing an @Override annotation. 3 411450
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 413
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 415
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 416
MissingOverride The method 'selectNoDateEndDemandTypes(Plugin)' is missing an @Override annotation. 3 455489
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 457
CyclomaticComplexity The method 'buildSQLQuery(DemandTypeFilter)' has a cyclomatic complexity of 10. 3 498564
NPathComplexity The method 'buildSQLQuery(DemandTypeFilter)' has an NPath complexity of 512 3 498564
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 583
CyclomaticComplexity The method 'setFilterValues(DemandTypeFilter, DAOUtil)' has a cyclomatic complexity of 10. 3 603653
NPathComplexity The method 'setFilterValues(DemandTypeFilter, DAOUtil)' has an NPath complexity of 512 3 603653

fr/paris/lutece/plugins/crm/business/demand/DemandTypeFilter.java

Rule Violation Priority Line
ImmutableField Private field '_strUrlDelete' could be made final; it is only initialized in the declaration or constructor. 3 62
BooleanGetMethodName A getX() method which returns a boolean should be named isX() 4 107110

fr/paris/lutece/plugins/crm/business/demand/DemandTypeHome.java

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

fr/paris/lutece/plugins/crm/business/demand/DemandTypeRoleRemovalListener.java

Rule Violation Priority Line
MissingOverride The method 'canBeRemoved(String)' is missing an @Override annotation. 3 6179
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 3 72
MissingOverride The method 'getRemovalRefusedMessage(String, Locale)' is missing an @Override annotation. 3 9093

fr/paris/lutece/plugins/crm/business/demand/DemandTypeWorkgroupRemovalListener.java

Rule Violation Priority Line
MissingOverride The method 'canBeRemoved(String)' is missing an @Override annotation. 3 5977
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 3 70
MissingOverride The method 'getRemovalRefusedMessage(String, Locale)' is missing an @Override annotation. 3 8892

fr/paris/lutece/plugins/crm/business/demand/IDemandTypeDAO.java

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

fr/paris/lutece/plugins/crm/business/demand/IPaginationProperties.java

Rule Violation Priority Line
CommentRequired Public method and constructor comments are required 3 56
CommentRequired Public method and constructor comments are required 3 58

fr/paris/lutece/plugins/crm/business/demand/PaginationFilterSortManager.java

Rule Violation Priority Line
TooManyMethods This class has too many methods, consider refactoring it. 3 60417
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 317318

fr/paris/lutece/plugins/crm/business/demand/PaginationPropertiesImpl.java

Rule Violation Priority Line
CommentRequired Public method and constructor comments are required 3 7073
MissingOverride The method 'getFirstResult()' is missing an @Override annotation. 3 7073
CommentRequired Public method and constructor comments are required 3 7578
MissingOverride The method 'getPageSize()' is missing an @Override annotation. 3 7578
MissingOverride The method 'getItemsPerPage()' is missing an @Override annotation. 3 8083
CommentRequired Public method and constructor comments are required 3 8083
CommentRequired Public method and constructor comments are required 3 8588
MissingOverride The method 'getPageIndex()' is missing an @Override annotation. 3 8588

fr/paris/lutece/plugins/crm/business/demand/category/CategoryDAO.java

Rule Violation Priority Line
MissingOverride The method 'newPrimaryKey(Plugin)' is missing an @Override annotation. 3 6280
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 85102
MissingOverride The method 'insert(Category, Plugin)' is missing an @Override annotation. 3 85102
MissingOverride The method 'load(int, Plugin)' is missing an @Override annotation. 3 107129
MissingOverride The method 'delete(int, Plugin)' is missing an @Override annotation. 3 134141
MissingOverride The method 'store(Category, Plugin)' is missing an @Override annotation. 3 146159
MissingOverride The method 'selectCategoriesList(Plugin)' is missing an @Override annotation. 3 164185
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 166
MissingOverride The method 'selectFirstCategory(Plugin)' is missing an @Override annotation. 3 190211

fr/paris/lutece/plugins/crm/business/notification/NotificationDAO.java

Rule Violation Priority Line
MissingOverride The method 'newPrimaryKey(Plugin)' is missing an @Override annotation. 3 7186
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 91117
MissingOverride The method 'insert(Notification, Plugin)' is missing an @Override annotation. 3 91117
MissingOverride The method 'load(int, Plugin)' is missing an @Override annotation. 3 122146
MissingOverride The method 'store(Notification, Plugin)' is missing an @Override annotation. 3 151169
MissingOverride The method 'delete(int, Plugin)' is missing an @Override annotation. 3 174180
MissingOverride The method 'deleteByIdDemand(int, Plugin)' is missing an @Override annotation. 3 185191
MissingOverride The method 'selectAll(Plugin)' is missing an @Override annotation. 3 196224
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 199
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 200
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 203
MissingOverride The method 'selectNotificationsByFilter(NotificationFilter, Plugin)' is missing an @Override annotation. 3 229258
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 231
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 233
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 234
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 304

fr/paris/lutece/plugins/crm/business/notification/NotificationFilter.java

Rule Violation Priority Line
BooleanGetMethodName A getX() method which returns a boolean should be named isX() 4 8689

fr/paris/lutece/plugins/crm/business/portlet/DemandTypePortlet.java

Rule Violation Priority Line
UncommentedEmptyConstructor Document empty constructor 3 6668
CallSuperInConstructor It is a good practice to call super() in a constructor 3 6668
UnnecessaryConstructor Avoid unnecessary constructors - the compiler will generate these for you 3 6668
MissingOverride The method 'getXml(HttpServletRequest)' is missing an @Override annotation. 3 77133
ConfusingTernary Avoid if (x != y) ..; else ..; 3 8289
ConfusingTernary Avoid if (x != y) ..; else ..; 3 95125
ConfusingTernary Avoid if (x != y) ..; else ..; 3 98108
UnnecessaryLocalBeforeReturn Consider simply returning the value vs storing it in local variable 'str' 3 132
FormalParameterNamingConventions The method parameter name '_nIdCategory' doesn't match '[a-z][a-zA-Z0-9]*' 1 151
MissingOverride The method 'getXmlDocument(HttpServletRequest)' is missing an @Override annotation. 3 163166
MissingOverride The method 'remove()' is missing an @Override annotation. 3 179182
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 188

fr/paris/lutece/plugins/crm/business/portlet/DemandTypePortletDAO.java

Rule Violation Priority Line
ShortVariable Avoid variables with short names like p 3 59
ShortVariable Avoid variables with short names like p 3 131

fr/paris/lutece/plugins/crm/business/portlet/DemandTypePortletHome.java

Rule Violation Priority Line
AssignmentToNonFinalStatic Possible unsafe assignment to a non-final static field in a constructor. 3 52
CallSuperInConstructor It is a good practice to call super() in a constructor 3 5763
NonThreadSafeSingleton Singleton is not thread safe 3 7275
MissingOverride The method 'getPortletTypeId()' is missing an @Override annotation. 3 8591
UnnecessaryLocalBeforeReturn Consider simply returning the value vs storing it in local variable 'strPortletTypeId' 3 90
MissingOverride The method 'getDAO()' is missing an @Override annotation. 3 98101

fr/paris/lutece/plugins/crm/business/user/CRMUser.java

Rule Violation Priority Line
FormalParameterNamingConventions The method parameter name '_bMustBeUpdated' doesn't match '[a-z][a-zA-Z0-9]*' 1 235

fr/paris/lutece/plugins/crm/business/user/CRMUserAttributeDAO.java

Rule Violation Priority Line
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 5870
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 90
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 90

fr/paris/lutece/plugins/crm/business/user/CRMUserDAO.java

Rule Violation Priority Line
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 146
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 187
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 238
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 260
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 279
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 301

fr/paris/lutece/plugins/crm/business/user/CRMUserFilter.java

Rule Violation Priority Line
IdenticalCatchBranches 'catch' branch identical to 'IllegalAccessException' branch 3 9598
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 101
InefficientStringBuffering Avoid concatenating nonliterals in a StringBuffer/StringBuilder constructor or append(). 3 337
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 436

fr/paris/lutece/plugins/crm/service/category/CategoryService.java

Rule Violation Priority Line
UncommentedEmptyConstructor Document empty constructor 3 6466
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 7376
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 171
ConfusingTernary Avoid if (x != y) ..; else ..; 3 173180
CommentRequired Public method and constructor comments are required 3 209212

fr/paris/lutece/plugins/crm/service/daemon/DemandCleanerDaemon.java

Rule Violation Priority Line
MissingOverride The method 'run()' is missing an @Override annotation. 3 6099

fr/paris/lutece/plugins/crm/service/demand/DemandService.java

Rule Violation Priority Line
TooManyMethods This class has too many methods, consider refactoring it. 3 67355
UncommentedEmptyConstructor Document empty constructor 3 7375
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 261
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 261
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 293
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 293
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 308

fr/paris/lutece/plugins/crm/service/demand/DemandStatusCRMService.java

Rule Violation Priority Line
UncommentedEmptyConstructor Document empty constructor 3 5658

fr/paris/lutece/plugins/crm/service/demand/DemandTypeService.java

Rule Violation Priority Line
TooManyMethods This class has too many methods, consider refactoring it. 3 73461
UncommentedEmptyConstructor Document empty constructor 3 7981
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 145150
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 254
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 275
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 275

fr/paris/lutece/plugins/crm/service/demand/DemandWebService.java

Rule Violation Priority Line
UncommentedEmptyConstructor Document empty constructor 3 5961
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 88
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 88
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 94

fr/paris/lutece/plugins/crm/service/listener/CRMDemandTypeRemovalListenerService.java

Rule Violation Priority Line
ClassWithOnlyPrivateConstructorsShouldBeFinal A class which only has private constructors should be final 1 4486
NonThreadSafeSingleton Singleton is not thread safe 3 6366

fr/paris/lutece/plugins/crm/service/listener/CRMUserModificationListenerService.java

Rule Violation Priority Line
ClassWithOnlyPrivateConstructorsShouldBeFinal A class which only has private constructors should be final 1 47107
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 51
ImmutableField Private field '_listRegisteredListeners' could be made final; it is only initialized in the declaration or constructor. 3 51
CallSuperInConstructor It is a good practice to call super() in a constructor 3 5658
NonThreadSafeSingleton Singleton is not thread safe 3 6770
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 3 99

fr/paris/lutece/plugins/crm/service/notification/NotificationService.java

Rule Violation Priority Line
UncommentedEmptyConstructor Document empty constructor 3 5860

fr/paris/lutece/plugins/crm/service/parameters/AdvancedParametersService.java

Rule Violation Priority Line
UncommentedEmptyConstructor Document empty constructor 3 5355

fr/paris/lutece/plugins/crm/service/user/CRMUserAttributesService.java

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

fr/paris/lutece/plugins/crm/service/user/CRMUserService.java

Rule Violation Priority Line
UncommentedEmptyConstructor Document empty constructor 3 5860
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 155

fr/paris/lutece/plugins/crm/util/CrmUtils.java

Rule Violation Priority Line
CommentRequired Header comments are required 3 661
UseUtilityClass All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 3 761
ConfusingTernary Avoid if (x != y) ..; else ..; 3 5158

fr/paris/lutece/plugins/crm/util/IListenerDemandType.java

Rule Violation Priority Line
CommentRequired Header comments are required 3 3942

fr/paris/lutece/plugins/crm/util/ListUtils.java

Rule Violation Priority Line
UseUtilityClass All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 3 86162
AvoidDuplicateLiterals The String literal "Erreur lors de la création d'une liste pour combo : " appears 4 times in this file; the first occurrence is on line 122 3 122
IdenticalCatchBranches 'catch' branch identical to 'IllegalAccessException' branch 3 124127
IdenticalCatchBranches 'catch' branch identical to 'IllegalAccessException' branch 3 128131
IdenticalCatchBranches 'catch' branch identical to 'IllegalAccessException' branch 3 132135
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 132

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

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

fr/paris/lutece/plugins/crm/util/TargetEnum.java

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

fr/paris/lutece/plugins/crm/util/constants/CRMConstants.java

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

fr/paris/lutece/plugins/crm/web/CRMApp.java

Rule Violation Priority Line
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 3 34867
CyclomaticComplexity The class 'CRMApp' has a total cyclomatic complexity of 98 (highest 18). 3 93867
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 93867
ImmutableField Private field '_demandTypeService' could be made final; it is only initialized in the declaration or constructor. 3 106
ImmutableField Private field '_demandService' could be made final; it is only initialized in the declaration or constructor. 3 107
ImmutableField Private field '_categoryService' could be made final; it is only initialized in the declaration or constructor. 3 108
ImmutableField Private field '_notificationService' could be made final; it is only initialized in the declaration or constructor. 3 109
ImmutableField Private field '_statusCRMService' could be made final; it is only initialized in the declaration or constructor. 3 110
ImmutableField Private field '_crmUserService' could be made final; it is only initialized in the declaration or constructor. 3 111
ImmutableField Private field '_crmUserAttributesService' could be made final; it is only initialized in the declaration or constructor. 3 112
ImmutableField Private field '_advancedParametersService' could be made final; it is only initialized in the declaration or constructor. 3 113
CyclomaticComplexity The method 'getPage(HttpServletRequest, int, Plugin)' has a cyclomatic complexity of 11. 3 133191
EmptyCatchBlock Avoid empty catch blocks 3 142145
NPathComplexity The method 'getCRMHomePage(HttpServletRequest, LuteceUser)' has an NPath complexity of 18434 3 203332
CyclomaticComplexity The method 'getCRMHomePage(HttpServletRequest, LuteceUser)' has a cyclomatic complexity of 18. 3 203332
NcssCount The method 'getCRMHomePage(HttpServletRequest, LuteceUser)' has a NCSS line count of 74. 3 203332
ExcessiveMethodLength Avoid really long methods. 3 203332
ConfusingTernary Avoid if (x != y) ..; else ..; 3 206
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 208
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 208
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 292
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 292
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 293
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 293
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 364
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 364
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 417
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 417
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 452
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 452
CyclomaticComplexity The method 'doModifyCRMUser(HttpServletRequest, LuteceUser)' has a cyclomatic complexity of 11. 3 475525
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 487
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 487
CollapsibleIfStatements These nested if statements could be combined 3 510513
LinguisticNaming Linguistics Antipattern - The getter 'getDemandRemovingConfirmationMessage' should not return void linguistically 3 537594
CyclomaticComplexity The method 'getDemandRemovingConfirmationMessage(HttpServletRequest, LuteceUser)' has a cyclomatic complexity of 11. 3 537594
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 557
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 615
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 615
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 630
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 630
CyclomaticComplexity The method 'doOpenDemandType(HttpServletRequest)' has a cyclomatic complexity of 13. 3 650726
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 685
CyclomaticComplexity The method 'doEditDemand(HttpServletRequest)' has a cyclomatic complexity of 12. 3 735788
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 758
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 824
SimpleDateFormatNeedsLocale When instantiating a SimpleDateFormat object, specify a Locale 3 844
ShortVariable Avoid variables with short names like d 3 847
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 853
ShortVariable Avoid variables with short names like t 3 858

fr/paris/lutece/plugins/crm/web/category/CategoryJspBean.java

Rule Violation Priority Line
ImmutableField Private field '_categoryService' could be made final; it is only initialized in the declaration or constructor. 3 81
SingularField Perhaps '_nDefaultItemsPerPage' could be replaced by a local variable. 3 82
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 104105
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 107
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 107
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 129
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 129
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 254
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 254
ConfusingTernary Avoid if (x != y) ..; else ..; 3 292304

fr/paris/lutece/plugins/crm/web/demand/DemandTypeJspBean.java

Rule Violation Priority Line
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 3 34816
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 79816
CyclomaticComplexity The class 'DemandTypeJspBean' has a total cyclomatic complexity of 95 (highest 27). 3 79816
ImmutableField Private field '_advancedParametersService' could be made final; it is only initialized in the declaration or constructor. 3 95
ImmutableField Private field '_demandTypeService' could be made final; it is only initialized in the declaration or constructor. 3 96
ImmutableField Private field '_demandService' could be made final; it is only initialized in the declaration or constructor. 3 97
ImmutableField Private field '_categoryService' could be made final; it is only initialized in the declaration or constructor. 3 98
SingularField Perhaps '_nDefaultItemsPerPage' could be replaced by a local variable. 3 100
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 122123
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 125
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 125
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 155
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 155
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 176
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 176
ConfusingTernary Avoid if (x != y) ..; else ..; 3 289311
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 291
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 291
ExcessiveMethodLength Avoid really long methods. 3 529643
NcssCount The method 'getDemandTypeData(HttpServletRequest, DemandType)' has a NCSS line count of 65. 3 529643
CyclomaticComplexity The method 'getDemandTypeData(HttpServletRequest, DemandType)' has a cyclomatic complexity of 27. 3 529643
NPathComplexity The method 'getDemandTypeData(HttpServletRequest, DemandType)' has an NPath complexity of 175502 3 529643
ConfusingTernary Avoid if (x != y) ..; else ..; 3 579589
ConfusingTernary Avoid if (x != y) ..; else ..; 3 596606
CollapsibleIfStatements These nested if statements could be combined 3 612615
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 667
CyclomaticComplexity The method 'doSearchDemandTypesList(HttpServletRequest)' has a cyclomatic complexity of 20. 3 700786
NPathComplexity The method 'doSearchDemandTypesList(HttpServletRequest)' has an NPath complexity of 6146 3 700786
CollapsibleIfStatements These nested if statements could be combined 3 739742
CollapsibleIfStatements These nested if statements could be combined 3 752755

fr/paris/lutece/plugins/crm/web/portlet/DemandTypePortletJspBean.java

Rule Violation Priority Line
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 52151
ImmutableField Private field '_categoryService' could be made final; it is only initialized in the declaration or constructor. 3 56
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 64
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 80
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 102
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 131