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 41–134
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]*' 78

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/service/announcesearch/AnnounceSearchService.java

Rule Violation Ligne
AvoidThrowingRawExceptionTypes Avoid throwing raw exception types. 269

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]*' 155

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
AvoidUsingVolatile Use of modifier volatile is not recommended. 104

Priority 3

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

Rule Violation Ligne
ExcessivePublicCount This class has a bunch of public methods and attributes 34–625
TooManyFields Too many fields 53–625
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 577–589
CloneMethodReturnTypeMustMatchClassName The return type of the clone() method must be the class name when implements Cloneable 577–589

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

Rule Violation Ligne
TooManyMethods This class has too many methods, consider refactoring it. 50–605
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 127–154
ConfusingTernary Avoid if (x != y) ..; else ..; 288–295
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 56–59
CallSuperInConstructor It is a good practice to call super() in a constructor 67–83

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

Rule Violation Ligne
TooManyMethods This class has too many methods, consider refactoring it. 58–492
CommentRequired Public method and constructor comments are required 313–318

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

Rule Violation Ligne
CommentRequired Header comments are required 36–61
CommentRequired Public method and constructor comments are required 42–45
CommentRequired Public method and constructor comments are required 47–50
CommentRequired Public method and constructor comments are required 52–55
CommentRequired Public method and constructor comments are required 57–60

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

Rule Violation Ligne
CommentRequired Header comments are required 42–111
CommentRequired Public method and constructor comments are required 97–110

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

Rule Violation Ligne
CommentRequired Header comments are required 43–67
CommentRequired Public method and constructor comments are required 53–56
CommentRequired Public method and constructor comments are required 58–61
CommentRequired Public method and constructor comments are required 63–66

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

Rule Violation Ligne
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 108–124
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
CloneThrowsCloneNotSupportedException clone() method should throw CloneNotSupportedException 341–353
CloneMethodReturnTypeMustMatchClassName The return type of the clone() method must be the class name when implements Cloneable 341–353

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

Rule Violation Ligne
TooManyMethods This class has too many methods, consider refactoring it. 47–330

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. 46–278
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 40–48
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. 47–163

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

Rule Violation Ligne
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 80–93

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

Rule Violation Ligne
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 65–113
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 121–124

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

Rule Violation Ligne
TooManyMethods This class has too many methods, consider refactoring it. 50–345

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

Rule Violation Ligne
CallSuperInConstructor It is a good practice to call super() in a constructor 66–69
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 71–74

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

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

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

Rule Violation Ligne
NonThreadSafeSingleton Singleton is not thread safe 71–74

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

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

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) 50–144
CallSuperInConstructor It is a good practice to call super() in a constructor 74–77
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. 83–122
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 150–163

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. 34–519
GodClass Possible God Class (WMC=55, ATFD=78, TCC=3.571%) 87–519
CyclomaticComplexity The method 'getHtmlAnnounceForm(Announce, Category, Locale, boolean, HttpServletRequest)' has a cyclomatic complexity of 12. 136–205
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 161–168
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 177–181
LinguisticNaming Linguistics Antipattern - The getter 'getHtmlEntry' should not return void linguistically 223–327
ExcessiveMethodLength Avoid really long methods. 223–327
NPathComplexity The method 'getHtmlEntry(AnnounceDTO, int, StringBuffer, Locale, boolean, HttpServletRequest)' has an NPath complexity of 2000 223–327
CyclomaticComplexity The method 'getHtmlEntry(AnnounceDTO, int, StringBuffer, Locale, boolean, HttpServletRequest)' has a cyclomatic complexity of 21. 223–327
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 225
EmptyCatchBlock Avoid empty catch blocks 288–291
CyclomaticComplexity The method 'getResponseEntry(HttpServletRequest, int, List, boolean, Locale, AnnounceDTO)' has a cyclomatic complexity of 11. 370–442
AvoidReassigningLoopVariables Avoid reassigning the loop control variable 'field' 380
ConfusingTernary Avoid if (x != y) ..; else ..; 401–415

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. 62–511
NonThreadSafeSingleton Singleton is not thread safe 108–111
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 507–510

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) 52–144
CallSuperInConstructor It is a good practice to call super() in a constructor 74–77
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. 77–172
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 104–137
CyclomaticComplexity The method 'moveUpEntryOrder(int, Entry)' has a cyclomatic complexity of 13. 182–256
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 207–237

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

Rule Violation Ligne
NonThreadSafeSingleton Singleton is not thread safe 68–71

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

Rule Violation Ligne
CallSuperInConstructor It is a good practice to call super() in a constructor 72–75
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. 34–400
CyclomaticComplexity The method 'getSearchResults(AnnounceSearchFilter, Plugin, List, int, int)' has a cyclomatic complexity of 17. 84–212
NcssCount The method 'getSearchResults(AnnounceSearchFilter, Plugin, List, int, int)' has a NCSS line count of 70. 84–212
ExcessiveMethodLength Avoid really long methods. 84–212
NPathComplexity The method 'getSearchResults(AnnounceSearchFilter, Plugin, List, int, int)' has an NPath complexity of 3457 84–212
OptimizableToArrayCall This call to Collection.toArray() may be optimizable 175
OptimizableToArrayCall This call to Collection.toArray() may be optimizable 175
OptimizableToArrayCall This call to Collection.toArray() may be optimizable 176
UseUnderscoresInNumericLiterals Number 1000000 should separate every third digit with an underscore 178
ShortVariable Avoid variables with short names like si 201
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 205
NcssCount The method 'getSearchResultsBis(AnnounceSearchFilter, Plugin, List, int, int, AnnounceSort)' has a NCSS line count of 76. 218–367
NPathComplexity The method 'getSearchResultsBis(AnnounceSearchFilter, Plugin, List, int, int, AnnounceSort)' has an NPath complexity of 10369 218–367
CyclomaticComplexity The method 'getSearchResultsBis(AnnounceSearchFilter, Plugin, List, int, int, AnnounceSort)' has a cyclomatic complexity of 21. 218–367
ExcessiveMethodLength Avoid really long methods. 218–367
UnusedLocalVariable Avoid unused local variables such as 'bRLowerTerm'. 287
UnusedLocalVariable Avoid unused local variables such as 'bRUpperTerm'. 288
UseUnderscoresInNumericLiterals Number 1000000 should separate every third digit with an underscore 310
ShortVariable Avoid variables with short names like si 341
ShortVariable Avoid variables with short names like si 353
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 361

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. 34–479
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 148–151
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 187
CommentRequired Public method and constructor comments are required 197–216
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 180 characters appended. 249
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 3 consecutive times with literals. Use a single append with a single combined String. 254
ConfusingTernary Avoid if (x != y) ..; else ..; 258–265
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 295
NonThreadSafeSingleton Singleton is not thread safe 440–443
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 448–469
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 471–478
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 476

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. 34–457
ShortVariable Avoid variables with short names like it 118
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 140–214
ConfusingTernary Avoid if (x != y) ..; else ..; 146–211
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 201
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 300
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 320
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 360
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 361
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 362
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 363

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
NPathComplexity The method 'getResponseData(Entry, HttpServletRequest, List, Locale)' has an NPath complexity of 1569 114–212
CyclomaticComplexity The method 'getResponseData(Entry, HttpServletRequest, List, Locale)' has a cyclomatic complexity of 19. 114–212
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 137–143
ConfusingTernary Avoid if (x != y) ..; else ..; 147
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 153–165
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 173–176
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 183–193
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. 34–1729
GodClass Possible God Class (WMC=115, ATFD=248, TCC=23.441%) 115–1729
CyclomaticComplexity The class 'AnnounceApp' has a total cyclomatic complexity of 115 (highest 23). 115–1729
ExcessiveClassLength Avoid really long classes. 115–1729
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 287–372
CyclomaticComplexity The method 'getSearchAnnounces(HttpServletRequest)' has a cyclomatic complexity of 13. 287–372
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 335
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 347
ConfusingTernary Avoid if (x != y) ..; else ..; 347
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 348
ConfusingTernary Avoid if (x != y) ..; else ..; 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 ..; 444–468
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 ..; 520–534
MissingBreakInSwitch A switch statement does not contain a break 541–556
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 673–762
CyclomaticComplexity The method 'getViewAnnounce(HttpServletRequest)' has a cyclomatic complexity of 20. 673–762
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. 774–838
NPathComplexity The method 'getViewUserAnnounces(HttpServletRequest)' has an NPath complexity of 432 774–838
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
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 828
ConfusingTernary Avoid if (x != y) ..; else ..; 828
CommentRequired Public method and constructor comments are required 874–895
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 998
ExcessiveMethodLength Avoid really long methods. 1031–1146
NPathComplexity The method 'doCreateAnnounce(HttpServletRequest, Sector, Category, Announce, LuteceUser)' has an NPath complexity of 28672 1031–1146
CyclomaticComplexity The method 'doCreateAnnounce(HttpServletRequest, Sector, Category, Announce, LuteceUser)' has a cyclomatic complexity of 22. 1031–1146
NcssCount The method 'doCreateAnnounce(HttpServletRequest, Sector, Category, Announce, LuteceUser)' has a NCSS line count of 67. 1031–1146
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 1037
MissingBreakInSwitch A switch statement does not contain a break 1049–1064
ExcessiveMethodLength Avoid really long methods. 1159–1278
CyclomaticComplexity The method 'doModifyAnnounce(HttpServletRequest, Announce)' has a cyclomatic complexity of 22. 1159–1278
NPathComplexity The method 'doModifyAnnounce(HttpServletRequest, Announce)' has an NPath complexity of 28672 1159–1278
NcssCount The method 'doModifyAnnounce(HttpServletRequest, Announce)' has a NCSS line count of 68. 1159–1278
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 1166
MissingBreakInSwitch A switch statement does not contain a break 1188–1203
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
CyclomaticComplexity The method 'getAnnounceFilterFromRequest(HttpServletRequest)' has a cyclomatic complexity of 23. 1451–1578
ExcessiveMethodLength Avoid really long methods. 1451–1578
NPathComplexity The method 'getAnnounceFilterFromRequest(HttpServletRequest)' has an NPath complexity of 157476 1451–1578
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 Ligne
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 34–469
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. 240–300
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 ..; 135–151
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 107
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 146–155

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. 34–786
TooManyMethods This class has too many methods, consider refactoring it. 77–786
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 205–272
CyclomaticComplexity The method 'doCreateEntry(HttpServletRequest)' has a cyclomatic complexity of 13. 205–272
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. 344–411
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 363–366
ConfusingTernary Avoid if (x != y) ..; else ..; 377–386
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 377–386
ConfusingTernary Avoid if (x != y) ..; else ..; 398–405
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. 626–682

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. 34–629
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
ConfusingTernary Avoid if (x != y) ..; else ..; 408
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 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 Ligne
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 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() 132–135
BooleanGetMethodName A getX() method which returns a boolean should be named isX() 153–156
BooleanGetMethodName A getX() method which returns a boolean should be named isX() 300–303
BooleanGetMethodName A getX() method which returns a boolean should be named isX() 447–450

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

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

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

Rule Violation Ligne
BooleanGetMethodName A getX() method which returns a boolean should be named isX() 199–202
BooleanGetMethodName A getX() method which returns a boolean should be named isX() 220–223
BooleanGetMethodName A getX() method which returns a boolean should be named isX() 321–324

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

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

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

Rule Violation Ligne
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'java.io.IOException' due to existing import 'java.io.IOException' 267

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

Rule Violation Ligne
UnusedImports Avoid unused imports such as 'org.apache.lucene.document.TextField' 51
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' 227
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' 239
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' 264
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' 267
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' 267

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

Rule Violation Ligne
UnusedImports Avoid unused imports such as 'fr.paris.lutece.portal.service.util.AppPropertiesService' 40

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 34–625
TooManyFields Too many fields 3 53–625
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 132–135
BooleanGetMethodName A getX() method which returns a boolean should be named isX() 4 153–156
BooleanGetMethodName A getX() method which returns a boolean should be named isX() 4 300–303
BooleanGetMethodName A getX() method which returns a boolean should be named isX() 4 447–450
CloneThrowsCloneNotSupportedException clone() method should throw CloneNotSupportedException 3 577–589
CloneMethodReturnTypeMustMatchClassName The return type of the clone() method must be the class name when implements Cloneable 3 577–589

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

Rule Violation Priority Ligne
TooManyMethods This class has too many methods, consider refactoring it. 3 50–605
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 127–154
ConfusingTernary Avoid if (x != y) ..; else ..; 3 288–295
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 56–59
CallSuperInConstructor It is a good practice to call super() in a constructor 3 67–83

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

Rule Violation Priority Ligne
TooManyMethods This class has too many methods, consider refactoring it. 3 58–492
CommentRequired Public method and constructor comments are required 3 313–318

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

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 36–61
CommentRequired Public method and constructor comments are required 3 42–45
CommentRequired Public method and constructor comments are required 3 47–50
CommentRequired Public method and constructor comments are required 3 52–55
CommentRequired Public method and constructor comments are required 3 57–60

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

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 42–111
CommentRequired Public method and constructor comments are required 3 97–110

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

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 43–67
CommentRequired Public method and constructor comments are required 3 53–56
CommentRequired Public method and constructor comments are required 3 58–61
CommentRequired Public method and constructor comments are required 3 63–66

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

Rule Violation Priority Ligne
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 108–124
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 41–134
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 109–112

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 199–202
BooleanGetMethodName A getX() method which returns a boolean should be named isX() 4 220–223
BooleanGetMethodName A getX() method which returns a boolean should be named isX() 4 321–324
CloneThrowsCloneNotSupportedException clone() method should throw CloneNotSupportedException 3 341–353
CloneMethodReturnTypeMustMatchClassName The return type of the clone() method must be the class name when implements Cloneable 3 341–353

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

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

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 46–278
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 40–48
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 47–163

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

Rule Violation Priority Ligne
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 80–93

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

Rule Violation Priority Ligne
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 65–113
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 121–124

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 171–174

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

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

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 66–69
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 71–74

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 56–59

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

Rule Violation Priority Ligne
NonThreadSafeSingleton Singleton is not thread safe 3 71–74

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 54–57

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 50–144
CallSuperInConstructor It is a good practice to call super() in a constructor 3 74–77
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 83–122
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 150–163

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 34–519
GodClass Possible God Class (WMC=55, ATFD=78, TCC=3.571%) 3 87–519
CyclomaticComplexity The method 'getHtmlAnnounceForm(Announce, Category, Locale, boolean, HttpServletRequest)' has a cyclomatic complexity of 12. 3 136–205
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 161–168
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 177–181
LinguisticNaming Linguistics Antipattern - The getter 'getHtmlEntry' should not return void linguistically 3 223–327
ExcessiveMethodLength Avoid really long methods. 3 223–327
NPathComplexity The method 'getHtmlEntry(AnnounceDTO, int, StringBuffer, Locale, boolean, HttpServletRequest)' has an NPath complexity of 2000 3 223–327
CyclomaticComplexity The method 'getHtmlEntry(AnnounceDTO, int, StringBuffer, Locale, boolean, HttpServletRequest)' has a cyclomatic complexity of 21. 3 223–327
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 288–291
CyclomaticComplexity The method 'getResponseEntry(HttpServletRequest, int, List, boolean, Locale, AnnounceDTO)' has a cyclomatic complexity of 11. 3 370–442
AvoidReassigningLoopVariables Avoid reassigning the loop control variable 'field' 3 380
ConfusingTernary Avoid if (x != y) ..; else ..; 3 401–415

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 62–511
AvoidUsingVolatile Use of modifier volatile is not recommended. 2 90
NonThreadSafeSingleton Singleton is not thread safe 3 108–111
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 507–510

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 52–144
CallSuperInConstructor It is a good practice to call super() in a constructor 3 74–77
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 77–172
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 3 104–137
CyclomaticComplexity The method 'moveUpEntryOrder(int, Entry)' has a cyclomatic complexity of 13. 3 182–256
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 3 207–237

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 68–71

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 72–75
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 34–400
FieldNamingConventions The final field name '_dayFormat' doesn't match '[a-z][a-zA-Z0-9]*' 1 78
CyclomaticComplexity The method 'getSearchResults(AnnounceSearchFilter, Plugin, List, int, int)' has a cyclomatic complexity of 17. 3 84–212
NcssCount The method 'getSearchResults(AnnounceSearchFilter, Plugin, List, int, int)' has a NCSS line count of 70. 3 84–212
ExcessiveMethodLength Avoid really long methods. 3 84–212
NPathComplexity The method 'getSearchResults(AnnounceSearchFilter, Plugin, List, int, int)' has an NPath complexity of 3457 3 84–212
OptimizableToArrayCall This call to Collection.toArray() may be optimizable 3 175
OptimizableToArrayCall This call to Collection.toArray() may be optimizable 3 175
OptimizableToArrayCall This call to Collection.toArray() may be optimizable 3 176
UseUnderscoresInNumericLiterals Number 1000000 should separate every third digit with an underscore 3 178
ShortVariable Avoid variables with short names like si 3 201
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 205
NcssCount The method 'getSearchResultsBis(AnnounceSearchFilter, Plugin, List, int, int, AnnounceSort)' has a NCSS line count of 76. 3 218–367
NPathComplexity The method 'getSearchResultsBis(AnnounceSearchFilter, Plugin, List, int, int, AnnounceSort)' has an NPath complexity of 10369 3 218–367
CyclomaticComplexity The method 'getSearchResultsBis(AnnounceSearchFilter, Plugin, List, int, int, AnnounceSort)' has a cyclomatic complexity of 21. 3 218–367
ExcessiveMethodLength Avoid really long methods. 3 218–367
UnusedLocalVariable Avoid unused local variables such as 'bRLowerTerm'. 3 287
UnusedLocalVariable Avoid unused local variables such as 'bRUpperTerm'. 3 288
UseUnderscoresInNumericLiterals Number 1000000 should separate every third digit with an underscore 3 310
ShortVariable Avoid variables with short names like si 3 341
ShortVariable Avoid variables with short names like si 3 353
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 361

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 34–479
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 148–151
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 197–216
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 180 characters appended. 3 249
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 3 consecutive times with literals. Use a single append with a single combined String. 3 254
ConfusingTernary Avoid if (x != y) ..; else ..; 3 258–265
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'java.io.IOException' due to existing import 'java.io.IOException' 4 267
AvoidThrowingRawExceptionTypes Avoid throwing raw exception types. 1 269
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 295
NonThreadSafeSingleton Singleton is not thread safe 3 440–443
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 448–469
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 471–478
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 476

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 34–457
UnusedImports Avoid unused imports such as 'org.apache.lucene.document.TextField' 4 51
ShortVariable Avoid variables with short names like it 3 118
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 140–214
ConfusingTernary Avoid if (x != y) ..; else ..; 3 146–211
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 3 201
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' 4 227
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' 4 239
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' 4 264
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' 4 267
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' 4 267
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 300
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 3 320
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 360
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 361
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 362
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 363

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
NPathComplexity The method 'getResponseData(Entry, HttpServletRequest, List, Locale)' has an NPath complexity of 1569 3 114–212
CyclomaticComplexity The method 'getResponseData(Entry, HttpServletRequest, List, Locale)' has a cyclomatic complexity of 19. 3 114–212
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 137–143
ConfusingTernary Avoid if (x != y) ..; else ..; 3 147
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 153–165
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 173–176
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 183–193
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/service/search/LuceneAnalyzer.java

Rule Violation Priority Ligne
UnusedImports Avoid unused imports such as 'fr.paris.lutece.portal.service.util.AppPropertiesService' 4 40

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 34–1729
GodClass Possible God Class (WMC=115, ATFD=248, TCC=23.441%) 3 115–1729
CyclomaticComplexity The class 'AnnounceApp' has a total cyclomatic complexity of 115 (highest 23). 3 115–1729
ExcessiveClassLength Avoid really long classes. 3 115–1729
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 287–372
CyclomaticComplexity The method 'getSearchAnnounces(HttpServletRequest)' has a cyclomatic complexity of 13. 3 287–372
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 335
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 347
ConfusingTernary Avoid if (x != y) ..; else ..; 3 347
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 348
ConfusingTernary Avoid if (x != y) ..; else ..; 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 444–468
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 520–534
MissingBreakInSwitch A switch statement does not contain a break 3 541–556
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 673–762
CyclomaticComplexity The method 'getViewAnnounce(HttpServletRequest)' has a cyclomatic complexity of 20. 3 673–762
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 774–838
NPathComplexity The method 'getViewUserAnnounces(HttpServletRequest)' has an NPath complexity of 432 3 774–838
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
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 828
ConfusingTernary Avoid if (x != y) ..; else ..; 3 828
CommentRequired Public method and constructor comments are required 3 874–895
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 3 998
ExcessiveMethodLength Avoid really long methods. 3 1031–1146
NPathComplexity The method 'doCreateAnnounce(HttpServletRequest, Sector, Category, Announce, LuteceUser)' has an NPath complexity of 28672 3 1031–1146
CyclomaticComplexity The method 'doCreateAnnounce(HttpServletRequest, Sector, Category, Announce, LuteceUser)' has a cyclomatic complexity of 22. 3 1031–1146
NcssCount The method 'doCreateAnnounce(HttpServletRequest, Sector, Category, Announce, LuteceUser)' has a NCSS line count of 67. 3 1031–1146
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 1049–1064
ExcessiveMethodLength Avoid really long methods. 3 1159–1278
CyclomaticComplexity The method 'doModifyAnnounce(HttpServletRequest, Announce)' has a cyclomatic complexity of 22. 3 1159–1278
NPathComplexity The method 'doModifyAnnounce(HttpServletRequest, Announce)' has an NPath complexity of 28672 3 1159–1278
NcssCount The method 'doModifyAnnounce(HttpServletRequest, Announce)' has a NCSS line count of 68. 3 1159–1278
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 1188–1203
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
CyclomaticComplexity The method 'getAnnounceFilterFromRequest(HttpServletRequest)' has a cyclomatic complexity of 23. 3 1451–1578
ExcessiveMethodLength Avoid really long methods. 3 1451–1578
NPathComplexity The method 'getAnnounceFilterFromRequest(HttpServletRequest)' has an NPath complexity of 157476 3 1451–1578
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 Ligne
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 3 34–469
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 240–300
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 135–151
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 107
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 146–155

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 34–786
TooManyMethods This class has too many methods, consider refactoring it. 3 77–786
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 205–272
CyclomaticComplexity The method 'doCreateEntry(HttpServletRequest)' has a cyclomatic complexity of 13. 3 205–272
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 344–411
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 363–366
ConfusingTernary Avoid if (x != y) ..; else ..; 3 377–386
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 377–386
ConfusingTernary Avoid if (x != y) ..; else ..; 3 398–405
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 626–682

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 34–629
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
ConfusingTernary Avoid if (x != y) ..; else ..; 3 408
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 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 Ligne
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 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