Fork me on GitHub

Résultats PMD

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

Violations By Priority

Priority 1

fr/paris/lutece/plugins/announce/business/AnnounceSort.java

Rule Violation Ligne
ClassWithOnlyPrivateConstructorsShouldBeFinal A class which only has private constructors should be final 41134
FieldNamingConventions The final field name '_strSortColumn' doesn't match '[a-z][a-zA-Z0-9]*' 77
FieldNamingConventions The final field name '_bSortAsc' doesn't match '[a-z][a-zA-Z0-9]*' 78

fr/paris/lutece/plugins/announce/service/announcesearch/AnnounceLuceneSearchEngine.java

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

fr/paris/lutece/plugins/announce/service/announcesearch/AnnounceSearchItem.java

Rule Violation Ligne
ConstructorCallsOverridableMethod Overridable method 'setCategoryId' called during object construction 79

fr/paris/lutece/plugins/announce/web/AnnounceApp.java

Rule Violation Ligne
FieldNamingConventions The constant name '_captchaSecurityService' doesn't match '[A-Z][A-Z_0-9]*' 251
FieldNamingConventions The final field name '_dateFormat' doesn't match '[a-z][a-zA-Z0-9]*' 262

fr/paris/lutece/plugins/announce/web/CategoryJspBean.java

Rule Violation Ligne
FieldNamingConventions The constant name '_captchaSecurityService' doesn't match '[A-Z][A-Z_0-9]*' 154

Priority 2

fr/paris/lutece/plugins/announce/service/AnnounceSubscriptionProvider.java

Rule Violation Ligne
AvoidUsingVolatile Use of modifier volatile is not recommended. 90

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

Rule Violation Ligne
AvoidUsingVolatile Use of modifier volatile is not recommended. 50

fr/paris/lutece/plugins/announce/service/announcesearch/AnnounceSearchService.java

Rule Violation Ligne
AvoidUsingVolatile Use of modifier volatile is not recommended. 97
AvoidUsingVolatile Use of modifier volatile is not recommended. 99

Priority 3

fr/paris/lutece/plugins/announce/business/Announce.java

Rule Violation Ligne
ExcessivePublicCount This class has a bunch of public methods and attributes 34625
TooManyFields Too many fields 53625
SingularField Perhaps '_datePublication' could be replaced by a local variable. 77
UnusedPrivateField Avoid unused private fields such as '_datePublication'. 77
CloneMethodReturnTypeMustMatchClassName The return type of the clone() method must be the class name when implements Cloneable 577589
CloneThrowsCloneNotSupportedException clone() method should throw CloneNotSupportedException 577589

fr/paris/lutece/plugins/announce/business/AnnounceDAO.java

Rule Violation Ligne
TooManyMethods This class has too many methods, consider refactoring it. 50605
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 127154
ConfusingTernary Avoid if (x != y) ..; else ..; 288295
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 300

fr/paris/lutece/plugins/announce/business/AnnounceDTO.java

Rule Violation Ligne
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 51
CallSuperInConstructor It is a good practice to call super() in a constructor 5659
CallSuperInConstructor It is a good practice to call super() in a constructor 6783

fr/paris/lutece/plugins/announce/business/AnnounceHome.java

Rule Violation Ligne
TooManyMethods This class has too many methods, consider refactoring it. 58489
CommentRequired Public method and constructor comments are required 313318

fr/paris/lutece/plugins/announce/business/AnnounceNotify.java

Rule Violation Ligne
CommentRequired Header comments are required 3661
CommentRequired Public method and constructor comments are required 4245
CommentRequired Public method and constructor comments are required 4750
CommentRequired Public method and constructor comments are required 5255
CommentRequired Public method and constructor comments are required 5760

fr/paris/lutece/plugins/announce/business/AnnounceNotifyDAO.java

Rule Violation Ligne
CommentRequired Header comments are required 42111
CommentRequired Public method and constructor comments are required 97110

fr/paris/lutece/plugins/announce/business/AnnounceNotifyHome.java

Rule Violation Ligne
CommentRequired Header comments are required 4367
CommentRequired Public method and constructor comments are required 5356
CommentRequired Public method and constructor comments are required 5861
CommentRequired Public method and constructor comments are required 6366

fr/paris/lutece/plugins/announce/business/AnnounceSearchFilterDAO.java

Rule Violation Ligne
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 108124
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 118
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 119

fr/paris/lutece/plugins/announce/business/Category.java

Rule Violation Ligne
CloneMethodReturnTypeMustMatchClassName The return type of the clone() method must be the class name when implements Cloneable 341353
CloneThrowsCloneNotSupportedException clone() method should throw CloneNotSupportedException 341353

fr/paris/lutece/plugins/announce/business/CategoryDAO.java

Rule Violation Ligne
TooManyMethods This class has too many methods, consider refactoring it. 47330

fr/paris/lutece/plugins/announce/business/CategoryHome.java

Rule Violation Ligne
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 114
AvoidReassigningLoopVariables Avoid reassigning the loop control variable 'entry' 235
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 242

fr/paris/lutece/plugins/announce/business/IAnnounceDAO.java

Rule Violation Ligne
TooManyMethods This class has too many methods, consider refactoring it. 46278
CommentRequired Public method and constructor comments are required 173

fr/paris/lutece/plugins/announce/business/IAnnounceNotifyDAO.java

Rule Violation Ligne
CommentRequired Header comments are required 4048
CommentRequired Public method and constructor comments are required 43
CommentRequired Public method and constructor comments are required 45
CommentRequired Public method and constructor comments are required 47

fr/paris/lutece/plugins/announce/business/ICategoryDAO.java

Rule Violation Ligne
CommentRequired Public method and constructor comments are required 141

fr/paris/lutece/plugins/announce/business/ISectorDAO.java

Rule Violation Ligne
TooManyMethods This class has too many methods, consider refactoring it. 47163

fr/paris/lutece/plugins/announce/business/IndexerActionDAO.java

Rule Violation Ligne
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 8093

fr/paris/lutece/plugins/announce/business/IndexerActionHome.java

Rule Violation Ligne
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 65113
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 121124

fr/paris/lutece/plugins/announce/business/SectorDAO.java

Rule Violation Ligne
TooManyMethods This class has too many methods, consider refactoring it. 50345

fr/paris/lutece/plugins/announce/business/portlet/LastAnnouncesPortlet.java

Rule Violation Ligne
CallSuperInConstructor It is a good practice to call super() in a constructor 6669
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 106

fr/paris/lutece/plugins/announce/business/portlet/LastAnnouncesPortletHome.java

Rule Violation Ligne
NonThreadSafeSingleton Singleton is not thread safe 7174

fr/paris/lutece/plugins/announce/business/portlet/MyAnnouncesPortlet.java

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

fr/paris/lutece/plugins/announce/business/portlet/MyAnnouncesPortletHome.java

Rule Violation Ligne
NonThreadSafeSingleton Singleton is not thread safe 7174

fr/paris/lutece/plugins/announce/service/AnnounceCacheService.java

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

fr/paris/lutece/plugins/announce/service/AnnounceResourceIdService.java

Rule Violation Ligne
DataClass The class 'AnnounceResourceIdService' is suspected to be a Data Class (WOC=0.000%, NOPA=4, NOAM=0, WMC=1) 50144
CallSuperInConstructor It is a good practice to call super() in a constructor 7477
ShortVariable Avoid variables with short names like rt 85
ShortVariable Avoid variables with short names like p 91

fr/paris/lutece/plugins/announce/service/AnnounceResponseImageResourceProvider.java

Rule Violation Ligne
CyclomaticComplexity The method 'isImageAuthorized(int, HttpServletRequest)' has a cyclomatic complexity of 10. 83122
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 150163

fr/paris/lutece/plugins/announce/service/AnnounceService.java

Rule Violation Ligne
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 34519
GodClass Possible God Class (WMC=55, ATFD=78, TCC=3.571%) 87519
CyclomaticComplexity The method 'getHtmlAnnounceForm(Announce, Category, Locale, boolean, HttpServletRequest)' has a cyclomatic complexity of 12. 136205
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 138
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 161168
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 177181
ExcessiveMethodLength Avoid really long methods. 223327
NPathComplexity The method 'getHtmlEntry(AnnounceDTO, int, StringBuffer, Locale, boolean, HttpServletRequest)' has an NPath complexity of 2000 223327
LinguisticNaming Linguistics Antipattern - The getter 'getHtmlEntry' should not return void linguistically 223327
CyclomaticComplexity The method 'getHtmlEntry(AnnounceDTO, int, StringBuffer, Locale, boolean, HttpServletRequest)' has a cyclomatic complexity of 21. 223327
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 225
EmptyCatchBlock Avoid empty catch blocks 288291
CyclomaticComplexity The method 'getResponseEntry(HttpServletRequest, int, List, boolean, Locale, AnnounceDTO)' has a cyclomatic complexity of 11. 370442
AvoidReassigningLoopVariables Avoid reassigning the loop control variable 'field' 380
ConfusingTernary Avoid if (x != y) ..; else ..; 401415

fr/paris/lutece/plugins/announce/service/AnnounceSessionListener.java

Rule Violation Ligne
ShortVariable Avoid variables with short names like se 51
ShortVariable Avoid variables with short names like se 60

fr/paris/lutece/plugins/announce/service/AnnounceSubscriptionProvider.java

Rule Violation Ligne
TooManyMethods This class has too many methods, consider refactoring it. 62511
NonThreadSafeSingleton Singleton is not thread safe 108111
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 124
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 137
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 151
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 175
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 198
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 212
CommentRequired Public method and constructor comments are required 507510

fr/paris/lutece/plugins/announce/service/CategoryResourceIdService.java

Rule Violation Ligne
DataClass The class 'CategoryResourceIdService' is suspected to be a Data Class (WOC=0.000%, NOPA=4, NOAM=0, WMC=1) 52144
CallSuperInConstructor It is a good practice to call super() in a constructor 7477
ShortVariable Avoid variables with short names like rt 85
ShortVariable Avoid variables with short names like p 91

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

Rule Violation Ligne
CyclomaticComplexity The method 'moveDownEntryOrder(int, Entry)' has a cyclomatic complexity of 16. 77172
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 104137
CyclomaticComplexity The method 'moveUpEntryOrder(int, Entry)' has a cyclomatic complexity of 13. 182256
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 207237

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

Rule Violation Ligne
NonThreadSafeSingleton Singleton is not thread safe 6871

fr/paris/lutece/plugins/announce/service/SectorResourceIdService.java

Rule Violation Ligne
CallSuperInConstructor It is a good practice to call super() in a constructor 7275
ShortVariable Avoid variables with short names like rt 83
ShortVariable Avoid variables with short names like p 89

fr/paris/lutece/plugins/announce/service/announcesearch/AnnounceLuceneSearchEngine.java

Rule Violation Ligne
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 34402
NPathComplexity The method 'getSearchResults(AnnounceSearchFilter, Plugin, List, int, int)' has an NPath complexity of 3457 82210
NcssCount The method 'getSearchResults(AnnounceSearchFilter, Plugin, List, int, int)' has a NCSS line count of 70. 82210
ExcessiveMethodLength Avoid really long methods. 82210
CyclomaticComplexity The method 'getSearchResults(AnnounceSearchFilter, Plugin, List, int, int)' has a cyclomatic complexity of 17. 82210
OptimizableToArrayCall This call to Collection.toArray() may be optimizable 173
OptimizableToArrayCall This call to Collection.toArray() may be optimizable 173
OptimizableToArrayCall This call to Collection.toArray() may be optimizable 174
UseUnderscoresInNumericLiterals Number 1000000 should separate every third digit with an underscore 176
ShortVariable Avoid variables with short names like si 199
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 203
ExcessiveMethodLength Avoid really long methods. 216369
NPathComplexity The method 'getSearchResultsBis(AnnounceSearchFilter, Plugin, List, int, int, AnnounceSort)' has an NPath complexity of 20737 216369
NcssCount The method 'getSearchResultsBis(AnnounceSearchFilter, Plugin, List, int, int, AnnounceSort)' has a NCSS line count of 81. 216369
CyclomaticComplexity The method 'getSearchResultsBis(AnnounceSearchFilter, Plugin, List, int, int, AnnounceSort)' has a cyclomatic complexity of 20. 216369
OptimizableToArrayCall This call to Collection.toArray() may be optimizable 316
OptimizableToArrayCall This call to Collection.toArray() may be optimizable 316
OptimizableToArrayCall This call to Collection.toArray() may be optimizable 317
UseUnderscoresInNumericLiterals Number 1000000 should separate every third digit with an underscore 319
ShortVariable Avoid variables with short names like si 328
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 363

fr/paris/lutece/plugins/announce/service/announcesearch/AnnounceSearchService.java

Rule Violation Ligne
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 34463
UseUnderscoresInNumericLiterals Number 1000000 should separate every third digit with an underscore 94
ImmutableField Private field '_indexer' could be made final; it is only initialized in the declaration or constructor. 101
ImmutableField Private field '_nWriterMergeFactor' could be made final; it is only initialized in the declaration or constructor. 102
ImmutableField Private field '_nWriterMaxSectorLength' could be made final; it is only initialized in the declaration or constructor. 103
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 134
NonThreadSafeSingleton Singleton is not thread safe 147150
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 186
CommentRequired Public method and constructor comments are required 196215
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 207
ShortVariable Avoid variables with short names like ir 228
InsufficientStringBufferDeclaration StringBuffer constructor is initialized with size 16, but has at least 134 characters appended. 248
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 308
NonThreadSafeSingleton Singleton is not thread safe 456459

fr/paris/lutece/plugins/announce/service/announcesearch/DefaultAnnounceIndexer.java

Rule Violation Ligne
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 34424
ShortVariable Avoid variables with short names like it 113
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 132206
ConfusingTernary Avoid if (x != y) ..; else ..; 138203
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 193
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 285
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 304
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 336
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 337
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 338
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 339

fr/paris/lutece/plugins/announce/service/announcesearch/IAnnounceSearchEngine.java

Rule Violation Ligne
CommentRequired Public method and constructor comments are required 66

fr/paris/lutece/plugins/announce/service/daemon/AnnounceExpirationDaemon.java

Rule Violation Ligne
LinguisticNaming Linguistics Antipattern - The variable 'hasN' indicates linguistically it is a boolean, but it is 'int' 82

fr/paris/lutece/plugins/announce/service/daemon/AnnounceSubscriptionDaemon.java

Rule Violation Ligne
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 80
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 125
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 147
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 150
PositionLiteralsFirstInComparisons Position literals first in String comparisons 159

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

Rule Violation Ligne
CyclomaticComplexity The method 'getResponseData(Entry, HttpServletRequest, List, Locale)' has a cyclomatic complexity of 19. 114212
NPathComplexity The method 'getResponseData(Entry, HttpServletRequest, List, Locale)' has an NPath complexity of 1569 114212
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 137143
ConfusingTernary Avoid if (x != y) ..; else ..; 147
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 153165
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 173176
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 183193
ConfusingTernary Avoid if (x != y) ..; else ..; 189

fr/paris/lutece/plugins/announce/service/search/AnnounceIndexer.java

Rule Violation Ligne
PositionLiteralsFirstInCaseInsensitiveComparisons Position literals first in String comparisons for EqualsIgnoreCase 115

fr/paris/lutece/plugins/announce/utils/AnnounceUtils.java

Rule Violation Ligne
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 100
AssignmentInOperand Avoid assignments in operands 100

fr/paris/lutece/plugins/announce/web/AnnounceApp.java

Rule Violation Ligne
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 341728
ExcessiveClassLength Avoid really long classes. 1151728
GodClass Possible God Class (WMC=115, ATFD=247, TCC=23.441%) 1151728
CyclomaticComplexity The class 'AnnounceApp' has a total cyclomatic complexity of 115 (highest 23). 1151728
ImmutableField Private field '_announceService' could be made final; it is only initialized in the declaration or constructor. 254
NPathComplexity The method 'getSearchAnnounces(HttpServletRequest)' has an NPath complexity of 3072 287372
CyclomaticComplexity The method 'getSearchAnnounces(HttpServletRequest)' has a cyclomatic complexity of 13. 287372
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 335
ConfusingTernary Avoid if (x != y) ..; else ..; 347
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 347
ConfusingTernary Avoid if (x != y) ..; else ..; 348
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 348
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 389
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 434
ConfusingTernary Avoid if (x != y) ..; else ..; 444468
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 516
ConfusingTernary Avoid if (x != y) ..; else ..; 520534
MissingBreakInSwitch A switch statement does not contain a break 541556
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 589
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 629
CyclomaticComplexity The method 'getViewAnnounce(HttpServletRequest)' has a cyclomatic complexity of 20. 673762
NPathComplexity The method 'getViewAnnounce(HttpServletRequest)' has an NPath complexity of 1305 673762
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 683
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 715
CyclomaticComplexity The method 'getViewUserAnnounces(HttpServletRequest)' has a cyclomatic complexity of 11. 774838
NPathComplexity The method 'getViewUserAnnounces(HttpServletRequest)' has an NPath complexity of 432 774838
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 795
AddEmptyString Do not add empty strings 796
ConfusingTernary Avoid if (x != y) ..; else ..; 828
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 828
CommentRequired Public method and constructor comments are required 874895
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 998
NcssCount The method 'doCreateAnnounce(HttpServletRequest, Sector, Category, Announce, LuteceUser)' has a NCSS line count of 67. 10311145
CyclomaticComplexity The method 'doCreateAnnounce(HttpServletRequest, Sector, Category, Announce, LuteceUser)' has a cyclomatic complexity of 22. 10311145
ExcessiveMethodLength Avoid really long methods. 10311145
NPathComplexity The method 'doCreateAnnounce(HttpServletRequest, Sector, Category, Announce, LuteceUser)' has an NPath complexity of 28672 10311145
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 1037
MissingBreakInSwitch A switch statement does not contain a break 10491064
NcssCount The method 'doModifyAnnounce(HttpServletRequest, Announce)' has a NCSS line count of 68. 11581277
NPathComplexity The method 'doModifyAnnounce(HttpServletRequest, Announce)' has an NPath complexity of 28672 11581277
ExcessiveMethodLength Avoid really long methods. 11581277
CyclomaticComplexity The method 'doModifyAnnounce(HttpServletRequest, Announce)' has a cyclomatic complexity of 22. 11581277
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 1165
MissingBreakInSwitch A switch statement does not contain a break 11871202
ConfusingTernary Avoid if (x != y) ..; else ..; 1352
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 1389
ExcessiveMethodLength Avoid really long methods. 14501577
NPathComplexity The method 'getAnnounceFilterFromRequest(HttpServletRequest)' has an NPath complexity of 157476 14501577
CyclomaticComplexity The method 'getAnnounceFilterFromRequest(HttpServletRequest)' has a cyclomatic complexity of 23. 14501577
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 1614
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 1618
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 1622
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 1626
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 1630

fr/paris/lutece/plugins/announce/web/AnnounceJspBean.java

Rule Violation Ligne
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 34469
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 212
CyclomaticComplexity The method 'getPreviewAnnounce(HttpServletRequest)' has a cyclomatic complexity of 13. 241300
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 254
AvoidDuplicateLiterals The String literal "User '" appears 5 times in this file; the first occurrence is on line 319 319

fr/paris/lutece/plugins/announce/web/AnnounceUserJspBean.java

Rule Violation Ligne
ImmutableField Private field '_nDefaultItemsPerPage' could be made final; it is only initialized in the declaration or constructor. 92
ConfusingTernary Avoid if (x != y) ..; else ..; 135151
AddEmptyString Do not add empty strings 169

fr/paris/lutece/plugins/announce/web/AnnounceWorkflowJspBean.java

Rule Violation Ligne
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 105
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 143152

fr/paris/lutece/plugins/announce/web/CategoryEntryJspBean.java

Rule Violation Ligne
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 34786
TooManyMethods This class has too many methods, consider refactoring it. 77786
ImmutableField Private field '_entryService' could be made final; it is only initialized in the declaration or constructor. 130
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 139
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 180
NPathComplexity The method 'doCreateEntry(HttpServletRequest)' has an NPath complexity of 234 205272
CyclomaticComplexity The method 'doCreateEntry(HttpServletRequest)' has a cyclomatic complexity of 13. 205272
AvoidReassigningLoopVariables Avoid reassigning the loop control variable 'field' 302
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 310
CyclomaticComplexity The method 'doModifyEntry(HttpServletRequest)' has a cyclomatic complexity of 11. 344411
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 363366
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 377386
ConfusingTernary Avoid if (x != y) ..; else ..; 377386
ConfusingTernary Avoid if (x != y) ..; else ..; 398405
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 451
CyclomaticComplexity The method 'doChangeOrderEntry(HttpServletRequest)' has a cyclomatic complexity of 11. 626682

fr/paris/lutece/plugins/announce/web/CategoryFieldJspBean.java

Rule Violation Ligne
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 133
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 456
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 457
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 458

fr/paris/lutece/plugins/announce/web/CategoryJspBean.java

Rule Violation Ligne
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 34622
ImmutableField Private field '_announceService' could be made final; it is only initialized in the declaration or constructor. 157
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 196
AddEmptyString Do not add empty strings 198
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 273
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 274
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 275
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 276
ConfusingTernary Avoid if (x != y) ..; else ..; 276
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 277
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 278
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 363
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 399
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 400
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 401
ConfusingTernary Avoid if (x != y) ..; else ..; 402
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 402
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 403
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 404

fr/paris/lutece/plugins/announce/web/SectorJspBean.java

Rule Violation Ligne
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 156
AddEmptyString Do not add empty strings 158
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 280
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 281

fr/paris/lutece/plugins/announce/web/portlet/LastAnnouncesPortletJspBean.java

Rule Violation Ligne
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 81
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 99
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 117

fr/paris/lutece/plugins/announce/web/portlet/MyAnnouncesPortletJspBean.java

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

Priority 4

fr/paris/lutece/plugins/announce/business/Announce.java

Rule Violation Ligne
BooleanGetMethodName A getX() method which returns a boolean should be named isX() 132135
BooleanGetMethodName A getX() method which returns a boolean should be named isX() 153156
BooleanGetMethodName A getX() method which returns a boolean should be named isX() 300303
BooleanGetMethodName A getX() method which returns a boolean should be named isX() 447450

fr/paris/lutece/plugins/announce/business/AnnounceSort.java

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

fr/paris/lutece/plugins/announce/business/Category.java

Rule Violation Ligne
BooleanGetMethodName A getX() method which returns a boolean should be named isX() 199202
BooleanGetMethodName A getX() method which returns a boolean should be named isX() 220223
BooleanGetMethodName A getX() method which returns a boolean should be named isX() 321324

fr/paris/lutece/plugins/announce/business/Sector.java

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

fr/paris/lutece/plugins/announce/service/announcesearch/DefaultAnnounceIndexer.java

Rule Violation Ligne
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' 219
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' 231
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' 256
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' 259
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' 259

Fichiers

fr/paris/lutece/plugins/announce/business/Announce.java

Rule Violation Priority Ligne
ExcessivePublicCount This class has a bunch of public methods and attributes 3 34625
TooManyFields Too many fields 3 53625
SingularField Perhaps '_datePublication' could be replaced by a local variable. 3 77
UnusedPrivateField Avoid unused private fields such as '_datePublication'. 3 77
BooleanGetMethodName A getX() method which returns a boolean should be named isX() 4 132135
BooleanGetMethodName A getX() method which returns a boolean should be named isX() 4 153156
BooleanGetMethodName A getX() method which returns a boolean should be named isX() 4 300303
BooleanGetMethodName A getX() method which returns a boolean should be named isX() 4 447450
CloneMethodReturnTypeMustMatchClassName The return type of the clone() method must be the class name when implements Cloneable 3 577589
CloneThrowsCloneNotSupportedException clone() method should throw CloneNotSupportedException 3 577589

fr/paris/lutece/plugins/announce/business/AnnounceDAO.java

Rule Violation Priority Ligne
TooManyMethods This class has too many methods, consider refactoring it. 3 50605
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 127154
ConfusingTernary Avoid if (x != y) ..; else ..; 3 288295
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 300

fr/paris/lutece/plugins/announce/business/AnnounceDTO.java

Rule Violation Priority Ligne
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 51
CallSuperInConstructor It is a good practice to call super() in a constructor 3 5659
CallSuperInConstructor It is a good practice to call super() in a constructor 3 6783

fr/paris/lutece/plugins/announce/business/AnnounceHome.java

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

fr/paris/lutece/plugins/announce/business/AnnounceNotify.java

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 3661
CommentRequired Public method and constructor comments are required 3 4245
CommentRequired Public method and constructor comments are required 3 4750
CommentRequired Public method and constructor comments are required 3 5255
CommentRequired Public method and constructor comments are required 3 5760

fr/paris/lutece/plugins/announce/business/AnnounceNotifyDAO.java

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 42111
CommentRequired Public method and constructor comments are required 3 97110

fr/paris/lutece/plugins/announce/business/AnnounceNotifyHome.java

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 4367
CommentRequired Public method and constructor comments are required 3 5356
CommentRequired Public method and constructor comments are required 3 5861
CommentRequired Public method and constructor comments are required 3 6366

fr/paris/lutece/plugins/announce/business/AnnounceSearchFilterDAO.java

Rule Violation Priority Ligne
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 108124
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 118
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 119

fr/paris/lutece/plugins/announce/business/AnnounceSort.java

Rule Violation Priority Ligne
ClassWithOnlyPrivateConstructorsShouldBeFinal A class which only has private constructors should be final 1 41134
FieldNamingConventions The final field name '_strSortColumn' doesn't match '[a-z][a-zA-Z0-9]*' 1 77
FieldNamingConventions The final field name '_bSortAsc' doesn't match '[a-z][a-zA-Z0-9]*' 1 78
BooleanGetMethodName A getX() method which returns a boolean should be named isX() 4 109112

fr/paris/lutece/plugins/announce/business/Category.java

Rule Violation Priority Ligne
BooleanGetMethodName A getX() method which returns a boolean should be named isX() 4 199202
BooleanGetMethodName A getX() method which returns a boolean should be named isX() 4 220223
BooleanGetMethodName A getX() method which returns a boolean should be named isX() 4 321324
CloneMethodReturnTypeMustMatchClassName The return type of the clone() method must be the class name when implements Cloneable 3 341353
CloneThrowsCloneNotSupportedException clone() method should throw CloneNotSupportedException 3 341353

fr/paris/lutece/plugins/announce/business/CategoryDAO.java

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

fr/paris/lutece/plugins/announce/business/CategoryHome.java

Rule Violation Priority Ligne
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 114
AvoidReassigningLoopVariables Avoid reassigning the loop control variable 'entry' 3 235
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 242

fr/paris/lutece/plugins/announce/business/IAnnounceDAO.java

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

fr/paris/lutece/plugins/announce/business/IAnnounceNotifyDAO.java

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 4048
CommentRequired Public method and constructor comments are required 3 43
CommentRequired Public method and constructor comments are required 3 45
CommentRequired Public method and constructor comments are required 3 47

fr/paris/lutece/plugins/announce/business/ICategoryDAO.java

Rule Violation Priority Ligne
CommentRequired Public method and constructor comments are required 3 141

fr/paris/lutece/plugins/announce/business/ISectorDAO.java

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

fr/paris/lutece/plugins/announce/business/IndexerActionDAO.java

Rule Violation Priority Ligne
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 8093

fr/paris/lutece/plugins/announce/business/IndexerActionHome.java

Rule Violation Priority Ligne
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 65113
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 121124

fr/paris/lutece/plugins/announce/business/Sector.java

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

fr/paris/lutece/plugins/announce/business/SectorDAO.java

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

fr/paris/lutece/plugins/announce/business/portlet/LastAnnouncesPortlet.java

Rule Violation Priority Ligne
CallSuperInConstructor It is a good practice to call super() in a constructor 3 6669
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 106

fr/paris/lutece/plugins/announce/business/portlet/LastAnnouncesPortletHome.java

Rule Violation Priority Ligne
NonThreadSafeSingleton Singleton is not thread safe 3 7174

fr/paris/lutece/plugins/announce/business/portlet/MyAnnouncesPortlet.java

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

fr/paris/lutece/plugins/announce/business/portlet/MyAnnouncesPortletHome.java

Rule Violation Priority Ligne
NonThreadSafeSingleton Singleton is not thread safe 3 7174

fr/paris/lutece/plugins/announce/service/AnnounceCacheService.java

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

fr/paris/lutece/plugins/announce/service/AnnounceResourceIdService.java

Rule Violation Priority Ligne
DataClass The class 'AnnounceResourceIdService' is suspected to be a Data Class (WOC=0.000%, NOPA=4, NOAM=0, WMC=1) 3 50144
CallSuperInConstructor It is a good practice to call super() in a constructor 3 7477
ShortVariable Avoid variables with short names like rt 3 85
ShortVariable Avoid variables with short names like p 3 91

fr/paris/lutece/plugins/announce/service/AnnounceResponseImageResourceProvider.java

Rule Violation Priority Ligne
CyclomaticComplexity The method 'isImageAuthorized(int, HttpServletRequest)' has a cyclomatic complexity of 10. 3 83122
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 150163

fr/paris/lutece/plugins/announce/service/AnnounceService.java

Rule Violation Priority Ligne
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 3 34519
GodClass Possible God Class (WMC=55, ATFD=78, TCC=3.571%) 3 87519
CyclomaticComplexity The method 'getHtmlAnnounceForm(Announce, Category, Locale, boolean, HttpServletRequest)' has a cyclomatic complexity of 12. 3 136205
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 138
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 161168
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 177181
ExcessiveMethodLength Avoid really long methods. 3 223327
NPathComplexity The method 'getHtmlEntry(AnnounceDTO, int, StringBuffer, Locale, boolean, HttpServletRequest)' has an NPath complexity of 2000 3 223327
LinguisticNaming Linguistics Antipattern - The getter 'getHtmlEntry' should not return void linguistically 3 223327
CyclomaticComplexity The method 'getHtmlEntry(AnnounceDTO, int, StringBuffer, Locale, boolean, HttpServletRequest)' has a cyclomatic complexity of 21. 3 223327
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 225
EmptyCatchBlock Avoid empty catch blocks 3 288291
CyclomaticComplexity The method 'getResponseEntry(HttpServletRequest, int, List, boolean, Locale, AnnounceDTO)' has a cyclomatic complexity of 11. 3 370442
AvoidReassigningLoopVariables Avoid reassigning the loop control variable 'field' 3 380
ConfusingTernary Avoid if (x != y) ..; else ..; 3 401415

fr/paris/lutece/plugins/announce/service/AnnounceSessionListener.java

Rule Violation Priority Ligne
ShortVariable Avoid variables with short names like se 3 51
ShortVariable Avoid variables with short names like se 3 60

fr/paris/lutece/plugins/announce/service/AnnounceSubscriptionProvider.java

Rule Violation Priority Ligne
TooManyMethods This class has too many methods, consider refactoring it. 3 62511
AvoidUsingVolatile Use of modifier volatile is not recommended. 2 90
NonThreadSafeSingleton Singleton is not thread safe 3 108111
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 124
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 137
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 151
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 175
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 198
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 212
CommentRequired Public method and constructor comments are required 3 507510

fr/paris/lutece/plugins/announce/service/CategoryResourceIdService.java

Rule Violation Priority Ligne
DataClass The class 'CategoryResourceIdService' is suspected to be a Data Class (WOC=0.000%, NOPA=4, NOAM=0, WMC=1) 3 52144
CallSuperInConstructor It is a good practice to call super() in a constructor 3 7477
ShortVariable Avoid variables with short names like rt 3 85
ShortVariable Avoid variables with short names like p 3 91

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

Rule Violation Priority Ligne
CyclomaticComplexity The method 'moveDownEntryOrder(int, Entry)' has a cyclomatic complexity of 16. 3 77172
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 3 104137
CyclomaticComplexity The method 'moveUpEntryOrder(int, Entry)' has a cyclomatic complexity of 13. 3 182256
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 3 207237

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

Rule Violation Priority Ligne
AvoidUsingVolatile Use of modifier volatile is not recommended. 2 50
NonThreadSafeSingleton Singleton is not thread safe 3 6871

fr/paris/lutece/plugins/announce/service/SectorResourceIdService.java

Rule Violation Priority Ligne
CallSuperInConstructor It is a good practice to call super() in a constructor 3 7275
ShortVariable Avoid variables with short names like rt 3 83
ShortVariable Avoid variables with short names like p 3 89

fr/paris/lutece/plugins/announce/service/announcesearch/AnnounceLuceneSearchEngine.java

Rule Violation Priority Ligne
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 3 34402
FieldNamingConventions The final field name '_dayFormat' doesn't match '[a-z][a-zA-Z0-9]*' 1 76
NPathComplexity The method 'getSearchResults(AnnounceSearchFilter, Plugin, List, int, int)' has an NPath complexity of 3457 3 82210
NcssCount The method 'getSearchResults(AnnounceSearchFilter, Plugin, List, int, int)' has a NCSS line count of 70. 3 82210
ExcessiveMethodLength Avoid really long methods. 3 82210
CyclomaticComplexity The method 'getSearchResults(AnnounceSearchFilter, Plugin, List, int, int)' has a cyclomatic complexity of 17. 3 82210
OptimizableToArrayCall This call to Collection.toArray() may be optimizable 3 173
OptimizableToArrayCall This call to Collection.toArray() may be optimizable 3 173
OptimizableToArrayCall This call to Collection.toArray() may be optimizable 3 174
UseUnderscoresInNumericLiterals Number 1000000 should separate every third digit with an underscore 3 176
ShortVariable Avoid variables with short names like si 3 199
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 203
ExcessiveMethodLength Avoid really long methods. 3 216369
NPathComplexity The method 'getSearchResultsBis(AnnounceSearchFilter, Plugin, List, int, int, AnnounceSort)' has an NPath complexity of 20737 3 216369
NcssCount The method 'getSearchResultsBis(AnnounceSearchFilter, Plugin, List, int, int, AnnounceSort)' has a NCSS line count of 81. 3 216369
CyclomaticComplexity The method 'getSearchResultsBis(AnnounceSearchFilter, Plugin, List, int, int, AnnounceSort)' has a cyclomatic complexity of 20. 3 216369
OptimizableToArrayCall This call to Collection.toArray() may be optimizable 3 316
OptimizableToArrayCall This call to Collection.toArray() may be optimizable 3 316
OptimizableToArrayCall This call to Collection.toArray() may be optimizable 3 317
UseUnderscoresInNumericLiterals Number 1000000 should separate every third digit with an underscore 3 319
ShortVariable Avoid variables with short names like si 3 328
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 363

fr/paris/lutece/plugins/announce/service/announcesearch/AnnounceSearchItem.java

Rule Violation Priority Ligne
ConstructorCallsOverridableMethod Overridable method 'setCategoryId' called during object construction 1 79

fr/paris/lutece/plugins/announce/service/announcesearch/AnnounceSearchService.java

Rule Violation Priority Ligne
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 3 34463
UseUnderscoresInNumericLiterals Number 1000000 should separate every third digit with an underscore 3 94
AvoidUsingVolatile Use of modifier volatile is not recommended. 2 97
AvoidUsingVolatile Use of modifier volatile is not recommended. 2 99
ImmutableField Private field '_indexer' could be made final; it is only initialized in the declaration or constructor. 3 101
ImmutableField Private field '_nWriterMergeFactor' could be made final; it is only initialized in the declaration or constructor. 3 102
ImmutableField Private field '_nWriterMaxSectorLength' could be made final; it is only initialized in the declaration or constructor. 3 103
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 134
NonThreadSafeSingleton Singleton is not thread safe 3 147150
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 186
CommentRequired Public method and constructor comments are required 3 196215
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 207
ShortVariable Avoid variables with short names like ir 3 228
InsufficientStringBufferDeclaration StringBuffer constructor is initialized with size 16, but has at least 134 characters appended. 3 248
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 308
NonThreadSafeSingleton Singleton is not thread safe 3 456459

fr/paris/lutece/plugins/announce/service/announcesearch/DefaultAnnounceIndexer.java

Rule Violation Priority Ligne
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 3 34424
ShortVariable Avoid variables with short names like it 3 113
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 132206
ConfusingTernary Avoid if (x != y) ..; else ..; 3 138203
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 3 193
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' 4 219
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' 4 231
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' 4 256
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' 4 259
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' 4 259
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 285
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 3 304
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 336
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 337
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 338
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 339

fr/paris/lutece/plugins/announce/service/announcesearch/IAnnounceSearchEngine.java

Rule Violation Priority Ligne
CommentRequired Public method and constructor comments are required 3 66

fr/paris/lutece/plugins/announce/service/daemon/AnnounceExpirationDaemon.java

Rule Violation Priority Ligne
LinguisticNaming Linguistics Antipattern - The variable 'hasN' indicates linguistically it is a boolean, but it is 'int' 3 82

fr/paris/lutece/plugins/announce/service/daemon/AnnounceSubscriptionDaemon.java

Rule Violation Priority Ligne
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 80
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 125
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 3 147
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 150
PositionLiteralsFirstInComparisons Position literals first in String comparisons 3 159

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

Rule Violation Priority Ligne
CyclomaticComplexity The method 'getResponseData(Entry, HttpServletRequest, List, Locale)' has a cyclomatic complexity of 19. 3 114212
NPathComplexity The method 'getResponseData(Entry, HttpServletRequest, List, Locale)' has an NPath complexity of 1569 3 114212
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 137143
ConfusingTernary Avoid if (x != y) ..; else ..; 3 147
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 153165
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 173176
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 183193
ConfusingTernary Avoid if (x != y) ..; else ..; 3 189

fr/paris/lutece/plugins/announce/service/search/AnnounceIndexer.java

Rule Violation Priority Ligne
PositionLiteralsFirstInCaseInsensitiveComparisons Position literals first in String comparisons for EqualsIgnoreCase 3 115

fr/paris/lutece/plugins/announce/utils/AnnounceUtils.java

Rule Violation Priority Ligne
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 100
AssignmentInOperand Avoid assignments in operands 3 100

fr/paris/lutece/plugins/announce/web/AnnounceApp.java

Rule Violation Priority Ligne
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 3 341728
ExcessiveClassLength Avoid really long classes. 3 1151728
GodClass Possible God Class (WMC=115, ATFD=247, TCC=23.441%) 3 1151728
CyclomaticComplexity The class 'AnnounceApp' has a total cyclomatic complexity of 115 (highest 23). 3 1151728
FieldNamingConventions The constant name '_captchaSecurityService' doesn't match '[A-Z][A-Z_0-9]*' 1 251
ImmutableField Private field '_announceService' could be made final; it is only initialized in the declaration or constructor. 3 254
FieldNamingConventions The final field name '_dateFormat' doesn't match '[a-z][a-zA-Z0-9]*' 1 262
NPathComplexity The method 'getSearchAnnounces(HttpServletRequest)' has an NPath complexity of 3072 3 287372
CyclomaticComplexity The method 'getSearchAnnounces(HttpServletRequest)' has a cyclomatic complexity of 13. 3 287372
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 335
ConfusingTernary Avoid if (x != y) ..; else ..; 3 347
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 347
ConfusingTernary Avoid if (x != y) ..; else ..; 3 348
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 348
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 389
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 434
ConfusingTernary Avoid if (x != y) ..; else ..; 3 444468
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 516
ConfusingTernary Avoid if (x != y) ..; else ..; 3 520534
MissingBreakInSwitch A switch statement does not contain a break 3 541556
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 589
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 629
CyclomaticComplexity The method 'getViewAnnounce(HttpServletRequest)' has a cyclomatic complexity of 20. 3 673762
NPathComplexity The method 'getViewAnnounce(HttpServletRequest)' has an NPath complexity of 1305 3 673762
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 683
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 715
CyclomaticComplexity The method 'getViewUserAnnounces(HttpServletRequest)' has a cyclomatic complexity of 11. 3 774838
NPathComplexity The method 'getViewUserAnnounces(HttpServletRequest)' has an NPath complexity of 432 3 774838
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 795
AddEmptyString Do not add empty strings 3 796
ConfusingTernary Avoid if (x != y) ..; else ..; 3 828
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 828
CommentRequired Public method and constructor comments are required 3 874895
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 3 998
NcssCount The method 'doCreateAnnounce(HttpServletRequest, Sector, Category, Announce, LuteceUser)' has a NCSS line count of 67. 3 10311145
CyclomaticComplexity The method 'doCreateAnnounce(HttpServletRequest, Sector, Category, Announce, LuteceUser)' has a cyclomatic complexity of 22. 3 10311145
ExcessiveMethodLength Avoid really long methods. 3 10311145
NPathComplexity The method 'doCreateAnnounce(HttpServletRequest, Sector, Category, Announce, LuteceUser)' has an NPath complexity of 28672 3 10311145
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 1037
MissingBreakInSwitch A switch statement does not contain a break 3 10491064
NcssCount The method 'doModifyAnnounce(HttpServletRequest, Announce)' has a NCSS line count of 68. 3 11581277
NPathComplexity The method 'doModifyAnnounce(HttpServletRequest, Announce)' has an NPath complexity of 28672 3 11581277
ExcessiveMethodLength Avoid really long methods. 3 11581277
CyclomaticComplexity The method 'doModifyAnnounce(HttpServletRequest, Announce)' has a cyclomatic complexity of 22. 3 11581277
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 1165
MissingBreakInSwitch A switch statement does not contain a break 3 11871202
ConfusingTernary Avoid if (x != y) ..; else ..; 3 1352
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 1389
ExcessiveMethodLength Avoid really long methods. 3 14501577
NPathComplexity The method 'getAnnounceFilterFromRequest(HttpServletRequest)' has an NPath complexity of 157476 3 14501577
CyclomaticComplexity The method 'getAnnounceFilterFromRequest(HttpServletRequest)' has a cyclomatic complexity of 23. 3 14501577
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 1614
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 1618
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 1622
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 1626
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 1630

fr/paris/lutece/plugins/announce/web/AnnounceJspBean.java

Rule Violation Priority Ligne
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 3 34469
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 212
CyclomaticComplexity The method 'getPreviewAnnounce(HttpServletRequest)' has a cyclomatic complexity of 13. 3 241300
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 254
AvoidDuplicateLiterals The String literal "User '" appears 5 times in this file; the first occurrence is on line 319 3 319

fr/paris/lutece/plugins/announce/web/AnnounceUserJspBean.java

Rule Violation Priority Ligne
ImmutableField Private field '_nDefaultItemsPerPage' could be made final; it is only initialized in the declaration or constructor. 3 92
ConfusingTernary Avoid if (x != y) ..; else ..; 3 135151
AddEmptyString Do not add empty strings 3 169

fr/paris/lutece/plugins/announce/web/AnnounceWorkflowJspBean.java

Rule Violation Priority Ligne
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 105
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 143152

fr/paris/lutece/plugins/announce/web/CategoryEntryJspBean.java

Rule Violation Priority Ligne
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 3 34786
TooManyMethods This class has too many methods, consider refactoring it. 3 77786
ImmutableField Private field '_entryService' could be made final; it is only initialized in the declaration or constructor. 3 130
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 3 139
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 180
NPathComplexity The method 'doCreateEntry(HttpServletRequest)' has an NPath complexity of 234 3 205272
CyclomaticComplexity The method 'doCreateEntry(HttpServletRequest)' has a cyclomatic complexity of 13. 3 205272
AvoidReassigningLoopVariables Avoid reassigning the loop control variable 'field' 3 302
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 310
CyclomaticComplexity The method 'doModifyEntry(HttpServletRequest)' has a cyclomatic complexity of 11. 3 344411
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 363366
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 377386
ConfusingTernary Avoid if (x != y) ..; else ..; 3 377386
ConfusingTernary Avoid if (x != y) ..; else ..; 3 398405
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 451
CyclomaticComplexity The method 'doChangeOrderEntry(HttpServletRequest)' has a cyclomatic complexity of 11. 3 626682

fr/paris/lutece/plugins/announce/web/CategoryFieldJspBean.java

Rule Violation Priority Ligne
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 133
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 456
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 457
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 458

fr/paris/lutece/plugins/announce/web/CategoryJspBean.java

Rule Violation Priority Ligne
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 3 34622
FieldNamingConventions The constant name '_captchaSecurityService' doesn't match '[A-Z][A-Z_0-9]*' 1 154
ImmutableField Private field '_announceService' could be made final; it is only initialized in the declaration or constructor. 3 157
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 196
AddEmptyString Do not add empty strings 3 198
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 273
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 274
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 275
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 276
ConfusingTernary Avoid if (x != y) ..; else ..; 3 276
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 277
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 278
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 363
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 399
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 400
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 401
ConfusingTernary Avoid if (x != y) ..; else ..; 3 402
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 402
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 403
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 404

fr/paris/lutece/plugins/announce/web/SectorJspBean.java

Rule Violation Priority Ligne
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 156
AddEmptyString Do not add empty strings 3 158
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 280
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 281

fr/paris/lutece/plugins/announce/web/portlet/LastAnnouncesPortletJspBean.java

Rule Violation Priority Ligne
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 81
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 99
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 117

fr/paris/lutece/plugins/announce/web/portlet/MyAnnouncesPortletJspBean.java

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