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/announce/business/AnnounceSort.java

Rule Violation Line
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 Line
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 Line
ConstructorCallsOverridableMethod Overridable method 'setCategoryId' called during object construction 79

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

Rule Violation Line
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 Line
FieldNamingConventions The constant name '_captchaSecurityService' doesn't match '[A-Z][A-Z_0-9]*' 155

Priority 2

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

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

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

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

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

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

Priority 3

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

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

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

Rule Violation Line
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 Line
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 Line
TooManyMethods This class has too many methods, consider refactoring it. 58492
CommentRequired Public method and constructor comments are required 313318

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

Rule Violation Line
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 Line
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 Line
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 Line
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 Line
CloneThrowsCloneNotSupportedException clone() method should throw CloneNotSupportedException 341353
CloneMethodReturnTypeMustMatchClassName The return type of the clone() method must be the class name when implements Cloneable 341353

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

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

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

Rule Violation Line
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 Line
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 Line
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 Line
CommentRequired Public method and constructor comments are required 141

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

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

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

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

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

Rule Violation Line
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 Line
TooManyMethods This class has too many methods, consider refactoring it. 50345

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

Rule Violation Line
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 Line
NonThreadSafeSingleton Singleton is not thread safe 7174

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

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

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

Rule Violation Line
NonThreadSafeSingleton Singleton is not thread safe 7174

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

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

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

Rule Violation Line
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 Line
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 Line
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
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
NPathComplexity The method 'getHtmlEntry(AnnounceDTO, int, StringBuffer, Locale, boolean, HttpServletRequest)' has an NPath complexity of 2000 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 Line
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 Line
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 Line
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 Line
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 Line
NonThreadSafeSingleton Singleton is not thread safe 6871

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

Rule Violation Line
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 Line
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 34402
CyclomaticComplexity The method 'getSearchResults(AnnounceSearchFilter, Plugin, List, int, int)' has a cyclomatic complexity of 17. 82210
NcssCount The method 'getSearchResults(AnnounceSearchFilter, Plugin, List, int, int)' has a NCSS line count of 70. 82210
NPathComplexity The method 'getSearchResults(AnnounceSearchFilter, Plugin, List, int, int)' has an NPath complexity of 3457 82210
ExcessiveMethodLength Avoid really long methods. 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 Line
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 34464
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 135
NonThreadSafeSingleton Singleton is not thread safe 148151
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 187
CommentRequired Public method and constructor comments are required 197216
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 208
ShortVariable Avoid variables with short names like ir 229
InsufficientStringBufferDeclaration StringBuffer constructor is initialized with size 16, but has at least 147 characters appended. 249
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 255
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 280
NonThreadSafeSingleton Singleton is not thread safe 425428
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 433454
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 456463
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 461

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

Rule Violation Line
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 34440
ShortVariable Avoid variables with short names like it 117
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 139213
ConfusingTernary Avoid if (x != y) ..; else ..; 145210
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 200
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 292
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 311
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 343
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 344
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 345
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 346

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

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

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

Rule Violation Line
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 Line
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 Line
NPathComplexity The method 'getResponseData(Entry, HttpServletRequest, List, Locale)' has an NPath complexity of 1569 114212
CyclomaticComplexity The method 'getResponseData(Entry, HttpServletRequest, List, Locale)' has a cyclomatic complexity of 19. 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 Line
PositionLiteralsFirstInCaseInsensitiveComparisons Position literals first in String comparisons for EqualsIgnoreCase 115

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

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

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

Rule Violation Line
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 341729
GodClass Possible God Class (WMC=115, ATFD=248, TCC=23.441%) 1151729
CyclomaticComplexity The class 'AnnounceApp' has a total cyclomatic complexity of 115 (highest 23). 1151729
ExcessiveClassLength Avoid really long classes. 1151729
ImmutableField Private field '_announceService' could be made final; it is only initialized in the declaration or constructor. 254
CyclomaticComplexity The method 'getSearchAnnounces(HttpServletRequest)' has a cyclomatic complexity of 13. 287372
NPathComplexity The method 'getSearchAnnounces(HttpServletRequest)' has an NPath complexity of 3072 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
NPathComplexity The method 'getViewAnnounce(HttpServletRequest)' has an NPath complexity of 1305 673762
CyclomaticComplexity The method 'getViewAnnounce(HttpServletRequest)' has a cyclomatic complexity of 20. 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
NPathComplexity The method 'getViewUserAnnounces(HttpServletRequest)' has an NPath complexity of 432 774838
CyclomaticComplexity The method 'getViewUserAnnounces(HttpServletRequest)' has a cyclomatic complexity of 11. 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
ExcessiveMethodLength Avoid really long methods. 10311146
CyclomaticComplexity The method 'doCreateAnnounce(HttpServletRequest, Sector, Category, Announce, LuteceUser)' has a cyclomatic complexity of 22. 10311146
NcssCount The method 'doCreateAnnounce(HttpServletRequest, Sector, Category, Announce, LuteceUser)' has a NCSS line count of 67. 10311146
NPathComplexity The method 'doCreateAnnounce(HttpServletRequest, Sector, Category, Announce, LuteceUser)' has an NPath complexity of 28672 10311146
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
ExcessiveMethodLength Avoid really long methods. 11591278
NcssCount The method 'doModifyAnnounce(HttpServletRequest, Announce)' has a NCSS line count of 68. 11591278
NPathComplexity The method 'doModifyAnnounce(HttpServletRequest, Announce)' has an NPath complexity of 28672 11591278
CyclomaticComplexity The method 'doModifyAnnounce(HttpServletRequest, Announce)' has a cyclomatic complexity of 22. 11591278
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 1166
MissingBreakInSwitch A switch statement does not contain a break 11881203
ConfusingTernary Avoid if (x != y) ..; else ..; 1353
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 1390
ExcessiveMethodLength Avoid really long methods. 14511578
NPathComplexity The method 'getAnnounceFilterFromRequest(HttpServletRequest)' has an NPath complexity of 157476 14511578
CyclomaticComplexity The method 'getAnnounceFilterFromRequest(HttpServletRequest)' has a cyclomatic complexity of 23. 14511578
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 1615
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 1619
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 1623
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 1627
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 1631

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

Rule Violation Line
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 211
CyclomaticComplexity The method 'getPreviewAnnounce(HttpServletRequest)' has a cyclomatic complexity of 13. 240300
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 Line
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 Line
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 107
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 146155

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

Rule Violation Line
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
CyclomaticComplexity The method 'doCreateEntry(HttpServletRequest)' has a cyclomatic complexity of 13. 205272
NPathComplexity The method 'doCreateEntry(HttpServletRequest)' has an NPath complexity of 234 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
ConfusingTernary Avoid if (x != y) ..; else ..; 377386
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 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 Line
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 Line
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 34629
ImmutableField Private field '_announceService' could be made final; it is only initialized in the declaration or constructor. 158
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 197
AddEmptyString Do not add empty strings 199
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 278
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 279
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 280
ConfusingTernary Avoid if (x != y) ..; else ..; 281
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 281
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 282
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 283
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 369
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 405
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 406
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 407
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 408
ConfusingTernary Avoid if (x != y) ..; else ..; 408
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 409
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 410
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 532

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

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

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

Rule Violation Line
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 Line
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 Line
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 Line
BooleanGetMethodName A getX() method which returns a boolean should be named isX() 109112

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

Rule Violation Line
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 Line
BooleanGetMethodName A getX() method which returns a boolean should be named isX() 171174

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

Rule Violation Line
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' 226
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' 238
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' 263
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' 266
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' 266

Files

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

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

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

Rule Violation Priority Line
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 Line
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 Line
TooManyMethods This class has too many methods, consider refactoring it. 3 58492
CommentRequired Public method and constructor comments are required 3 313318

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

Rule Violation Priority Line
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 Line
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 Line
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 Line
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 Line
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 Line
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
CloneThrowsCloneNotSupportedException clone() method should throw CloneNotSupportedException 3 341353
CloneMethodReturnTypeMustMatchClassName The return type of the clone() method must be the class name when implements Cloneable 3 341353

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

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

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

Rule Violation Priority Line
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 Line
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 Line
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 Line
CommentRequired Public method and constructor comments are required 3 141

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

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

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

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

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

Rule Violation Priority Line
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 Line
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 Line
TooManyMethods This class has too many methods, consider refactoring it. 3 50345

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

Rule Violation Priority Line
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 Line
NonThreadSafeSingleton Singleton is not thread safe 3 7174

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

Rule Violation Priority Line
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 Line
NonThreadSafeSingleton Singleton is not thread safe 3 7174

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

Rule Violation Priority Line
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 Line
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 Line
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 Line
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
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
NPathComplexity The method 'getHtmlEntry(AnnounceDTO, int, StringBuffer, Locale, boolean, HttpServletRequest)' has an NPath complexity of 2000 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 Line
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 Line
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 Line
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 Line
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 Line
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 Line
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 Line
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
CyclomaticComplexity The method 'getSearchResults(AnnounceSearchFilter, Plugin, List, int, int)' has a cyclomatic complexity of 17. 3 82210
NcssCount The method 'getSearchResults(AnnounceSearchFilter, Plugin, List, int, int)' has a NCSS line count of 70. 3 82210
NPathComplexity The method 'getSearchResults(AnnounceSearchFilter, Plugin, List, int, int)' has an NPath complexity of 3457 3 82210
ExcessiveMethodLength Avoid really long methods. 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 Line
ConstructorCallsOverridableMethod Overridable method 'setCategoryId' called during object construction 1 79

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

Rule Violation Priority Line
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 3 34464
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
AvoidUsingVolatile Use of modifier volatile is not recommended. 2 104
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 135
NonThreadSafeSingleton Singleton is not thread safe 3 148151
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 187
CommentRequired Public method and constructor comments are required 3 197216
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 208
ShortVariable Avoid variables with short names like ir 3 229
InsufficientStringBufferDeclaration StringBuffer constructor is initialized with size 16, but has at least 147 characters appended. 3 249
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 3 255
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 280
NonThreadSafeSingleton Singleton is not thread safe 3 425428
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 433454
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 456463
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 461

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

Rule Violation Priority Line
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 3 34440
ShortVariable Avoid variables with short names like it 3 117
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 139213
ConfusingTernary Avoid if (x != y) ..; else ..; 3 145210
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 3 200
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' 4 226
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' 4 238
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' 4 263
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' 4 266
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' 4 266
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 292
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 3 311
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 343
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 344
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 345
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 346

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

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

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

Rule Violation Priority Line
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 Line
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 Line
NPathComplexity The method 'getResponseData(Entry, HttpServletRequest, List, Locale)' has an NPath complexity of 1569 3 114212
CyclomaticComplexity The method 'getResponseData(Entry, HttpServletRequest, List, Locale)' has a cyclomatic complexity of 19. 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 Line
PositionLiteralsFirstInCaseInsensitiveComparisons Position literals first in String comparisons for EqualsIgnoreCase 3 115

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

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

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

Rule Violation Priority Line
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 3 341729
GodClass Possible God Class (WMC=115, ATFD=248, TCC=23.441%) 3 1151729
CyclomaticComplexity The class 'AnnounceApp' has a total cyclomatic complexity of 115 (highest 23). 3 1151729
ExcessiveClassLength Avoid really long classes. 3 1151729
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
CyclomaticComplexity The method 'getSearchAnnounces(HttpServletRequest)' has a cyclomatic complexity of 13. 3 287372
NPathComplexity The method 'getSearchAnnounces(HttpServletRequest)' has an NPath complexity of 3072 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
NPathComplexity The method 'getViewAnnounce(HttpServletRequest)' has an NPath complexity of 1305 3 673762
CyclomaticComplexity The method 'getViewAnnounce(HttpServletRequest)' has a cyclomatic complexity of 20. 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
NPathComplexity The method 'getViewUserAnnounces(HttpServletRequest)' has an NPath complexity of 432 3 774838
CyclomaticComplexity The method 'getViewUserAnnounces(HttpServletRequest)' has a cyclomatic complexity of 11. 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
ExcessiveMethodLength Avoid really long methods. 3 10311146
CyclomaticComplexity The method 'doCreateAnnounce(HttpServletRequest, Sector, Category, Announce, LuteceUser)' has a cyclomatic complexity of 22. 3 10311146
NcssCount The method 'doCreateAnnounce(HttpServletRequest, Sector, Category, Announce, LuteceUser)' has a NCSS line count of 67. 3 10311146
NPathComplexity The method 'doCreateAnnounce(HttpServletRequest, Sector, Category, Announce, LuteceUser)' has an NPath complexity of 28672 3 10311146
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
ExcessiveMethodLength Avoid really long methods. 3 11591278
NcssCount The method 'doModifyAnnounce(HttpServletRequest, Announce)' has a NCSS line count of 68. 3 11591278
NPathComplexity The method 'doModifyAnnounce(HttpServletRequest, Announce)' has an NPath complexity of 28672 3 11591278
CyclomaticComplexity The method 'doModifyAnnounce(HttpServletRequest, Announce)' has a cyclomatic complexity of 22. 3 11591278
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 1166
MissingBreakInSwitch A switch statement does not contain a break 3 11881203
ConfusingTernary Avoid if (x != y) ..; else ..; 3 1353
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 1390
ExcessiveMethodLength Avoid really long methods. 3 14511578
NPathComplexity The method 'getAnnounceFilterFromRequest(HttpServletRequest)' has an NPath complexity of 157476 3 14511578
CyclomaticComplexity The method 'getAnnounceFilterFromRequest(HttpServletRequest)' has a cyclomatic complexity of 23. 3 14511578
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 1615
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 1619
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 1623
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 1627
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 1631

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

Rule Violation Priority Line
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 211
CyclomaticComplexity The method 'getPreviewAnnounce(HttpServletRequest)' has a cyclomatic complexity of 13. 3 240300
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 Line
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 Line
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 107
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 146155

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

Rule Violation Priority Line
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
CyclomaticComplexity The method 'doCreateEntry(HttpServletRequest)' has a cyclomatic complexity of 13. 3 205272
NPathComplexity The method 'doCreateEntry(HttpServletRequest)' has an NPath complexity of 234 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
ConfusingTernary Avoid if (x != y) ..; else ..; 3 377386
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 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 Line
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 Line
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 3 34629
FieldNamingConventions The constant name '_captchaSecurityService' doesn't match '[A-Z][A-Z_0-9]*' 1 155
ImmutableField Private field '_announceService' could be made final; it is only initialized in the declaration or constructor. 3 158
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 197
AddEmptyString Do not add empty strings 3 199
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 278
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 279
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 280
ConfusingTernary Avoid if (x != y) ..; else ..; 3 281
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 281
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 282
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 283
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 369
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 405
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 406
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 407
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 408
ConfusingTernary Avoid if (x != y) ..; else ..; 3 408
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 409
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 410
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 532

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

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

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

Rule Violation Priority Line
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 Line
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 91