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/helpdesk/service/helpdesksearch/HelpdeskSearchItem.java

Rule Violation Ligne
ConstructorCallsOverridableMethod Overridable method 'setSubjectId' called during object construction 60

fr/paris/lutece/plugins/helpdesk/web/HelpdeskJspBean.java

Rule Violation Ligne
AvoidThrowingRawExceptionTypes Avoid throwing raw exception types. 2648

Priority 2

fr/paris/lutece/plugins/helpdesk/web/HelpdeskJspBean.java

Rule Violation Ligne
GuardLogStatement Logger calls should be surrounded by log level guards. 2493
GuardLogStatement Logger calls should be surrounded by log level guards. 2551
GuardLogStatement Logger calls should be surrounded by log level guards. 2568

Priority 3

fr/paris/lutece/plugins/helpdesk/business/AbstractSubjectHome.java

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

fr/paris/lutece/plugins/helpdesk/business/Faq.java

Rule Violation Ligne
UnnecessaryConstructor Avoid unnecessary constructors - the compiler will generate these for you 6264
UncommentedEmptyConstructor Document empty constructor 6264
NonThreadSafeSingleton Singleton is not thread safe 7276
NonThreadSafeSingleton Singleton is not thread safe 7882
MissingOverride The method 'getWorkgroup()' is missing an @Override annotation. 201204

fr/paris/lutece/plugins/helpdesk/business/FaqDAO.java

Rule Violation Ligne
TooManyMethods This class has too many methods, consider refactoring it. 48353
MissingOverride The method 'newPrimaryKey(Plugin)' is missing an @Override annotation. 7189
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 97111
MissingOverride The method 'insert(Faq, Plugin)' is missing an @Override annotation. 97111
MissingOverride The method 'delete(int, Plugin)' is missing an @Override annotation. 119127
MissingOverride The method 'load(int, Plugin)' is missing an @Override annotation. 136156
MissingOverride The method 'store(Faq, Plugin)' is missing an @Override annotation. 164176
MissingOverride The method 'findAll(Plugin)' is missing an @Override annotation. 183202
MissingOverride The method 'findReferenceList(Plugin)' is missing an @Override annotation. 209223
MissingOverride The method 'findAuthorizedFaq(String, Plugin)' is missing an @Override annotation. 231234
MissingOverride The method 'findByWorkgroup(String, Plugin)' is missing an @Override annotation. 242245
ShortVariable Avoid variables with short names like sB 257
ShortVariable Avoid variables with short names like i 265
UnusedLocalVariable Avoid unused local variables such as 'strRoleKey'. 267
AssignmentInOperand Avoid assignments in operands 269
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 269
MissingOverride The method 'findBySubjectId(int, Plugin)' is missing an @Override annotation. 317332
MissingOverride The method 'findListFaq(Plugin)' is missing an @Override annotation. 339352

fr/paris/lutece/plugins/helpdesk/business/FaqHome.java

Rule Violation Ligne
UseUtilityClass All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 54241
TooManyMethods This class has too many methods, consider refactoring it. 54241
CollapsibleIfStatements These nested if statements could be combined 120135
AvoidArrayLoops System.arraycopy is more efficient 193196

fr/paris/lutece/plugins/helpdesk/business/FaqRoleRemovalListener.java

Rule Violation Ligne
MissingOverride The method 'canBeRemoved(String)' is missing an @Override annotation. 5773
SimplifyBooleanReturns Avoid unnecessary if..then..else statements when returning booleans 6770
MissingOverride The method 'getRemovalRefusedMessage(String, Locale)' is missing an @Override annotation. 8185

fr/paris/lutece/plugins/helpdesk/business/FaqWorkgroupRemovalListener.java

Rule Violation Ligne
MissingOverride The method 'canBeRemoved(String)' is missing an @Override annotation. 5773
SimplifyBooleanReturns Avoid unnecessary if..then..else statements when returning booleans 6770
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 67
MissingOverride The method 'getRemovalRefusedMessage(String, Locale)' is missing an @Override annotation. 8185

fr/paris/lutece/plugins/helpdesk/business/IAbstractSubjectDAO.java

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

fr/paris/lutece/plugins/helpdesk/business/IFaqDAO.java

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

fr/paris/lutece/plugins/helpdesk/business/IQuestionAnswerDAO.java

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

fr/paris/lutece/plugins/helpdesk/business/QuestionAnswer.java

Rule Violation Ligne
UncommentedEmptyConstructor Document empty constructor 5961
UnnecessaryConstructor Avoid unnecessary constructors - the compiler will generate these for you 5961
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 160

fr/paris/lutece/plugins/helpdesk/business/QuestionAnswerDAO.java

Rule Violation Ligne
TooManyMethods This class has too many methods, consider refactoring it. 52399
MissingOverride The method 'newPrimaryKey(Plugin)' is missing an @Override annotation. 7492
MissingOverride The method 'insert(QuestionAnswer, Plugin)' is missing an @Override annotation. 100125
MissingOverride The method 'delete(int, Plugin)' is missing an @Override annotation. 133141
MissingOverride The method 'deleteAll(Plugin)' is missing an @Override annotation. 148154
MissingOverride The method 'deleteBySubject(int, Plugin)' is missing an @Override annotation. 162170
MissingOverride The method 'load(int, Plugin)' is missing an @Override annotation. 179201
MissingOverride The method 'store(QuestionAnswer, Plugin)' is missing an @Override annotation. 209233
MissingOverride The method 'findAll(Plugin)' is missing an @Override annotation. 241262
MissingOverride The method 'findByKeywords(String, Plugin)' is missing an @Override annotation. 271321
ShortVariable Avoid variables with short names like st 277
ShortVariable Avoid variables with short names like sB 280
InsufficientStringBufferDeclaration StringBuffer constructor is initialized with size 16, but has at least 66 characters appended. 280
MissingOverride The method 'findByIdSubject(int, Plugin)' is missing an @Override annotation. 329352
MissingOverride The method 'countbySubject(int, Plugin)' is missing an @Override annotation. 360375
MissingOverride The method 'getMaxOrder(int, Plugin)' is missing an @Override annotation. 383398

fr/paris/lutece/plugins/helpdesk/business/QuestionAnswerHome.java

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

fr/paris/lutece/plugins/helpdesk/business/Subject.java

Rule Violation Ligne
UnnecessaryConstructor Avoid unnecessary constructors - the compiler will generate these for you 5254
UncommentedEmptyConstructor Document empty constructor 5254
CallSuperInConstructor It is a good practice to call super() in a constructor 5254
MissingOverride The method 'getParent(Plugin)' is missing an @Override annotation. 7982
MissingOverride The method 'getChilds(Plugin)' is missing an @Override annotation. 8992

fr/paris/lutece/plugins/helpdesk/business/SubjectDAO.java

Rule Violation Ligne
TooManyMethods This class has too many methods, consider refactoring it. 49485
MissingOverride The method 'newPrimaryKey(Plugin)' is missing an @Override annotation. 7896
MissingOverride The method 'insert(AbstractSubject, Plugin)' is missing an @Override annotation. 104118
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 104118
MissingOverride The method 'delete(int, Plugin)' is missing an @Override annotation. 126134
MissingOverride The method 'load(int, Plugin)' is missing an @Override annotation. 143165
MissingOverride The method 'store(AbstractSubject, Plugin)' is missing an @Override annotation. 173185
MissingOverride The method 'findAll(Plugin)' is missing an @Override annotation. 192212
MissingOverride The method 'findByIdParent(int, Plugin)' is missing an @Override annotation. 241262
MissingOverride The method 'findByIdFaq(int, Plugin)' is missing an @Override annotation. 270291
MissingOverride The method 'findQuestions(int, Plugin)' is missing an @Override annotation. 299322
MissingOverride The method 'countQuestion(int, Plugin)' is missing an @Override annotation. 330345
MissingOverride The method 'getMaxOrder(int, Plugin)' is missing an @Override annotation. 353368
MissingOverride The method 'findByOrder(int, int, Plugin)' is missing an @Override annotation. 377400
MissingOverride The method 'findByFaqOrder(int, int, Plugin)' is missing an @Override annotation. 409432
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 441450
MissingOverride The method 'insertLinkToFaq(int, int, Plugin)' is missing an @Override annotation. 441450
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 459468
MissingOverride The method 'deleteLinkToFaq(int, int, Plugin)' is missing an @Override annotation. 459468
MissingOverride The method 'deleteAllLinksToFaq(int, Plugin)' is missing an @Override annotation. 476484
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 476484

fr/paris/lutece/plugins/helpdesk/business/SubjectHome.java

Rule Violation Ligne
AssignmentToNonFinalStatic Possible unsafe assignment to a non-final static field in a constructor. 52
CallSuperInConstructor It is a good practice to call super() in a constructor 5763
NonThreadSafeSingleton Singleton is not thread safe 7275
MissingOverride The method 'getDAO()' is missing an @Override annotation. 106109

fr/paris/lutece/plugins/helpdesk/business/Theme.java

Rule Violation Ligne
CallSuperInConstructor It is a good practice to call super() in a constructor 5456
UnnecessaryConstructor Avoid unnecessary constructors - the compiler will generate these for you 5456
UncommentedEmptyConstructor Document empty constructor 5456
NonThreadSafeSingleton Singleton is not thread safe 6468
MissingOverride The method 'getParent(Plugin)' is missing an @Override annotation. 9497
MissingOverride The method 'getChilds(Plugin)' is missing an @Override annotation. 104107

fr/paris/lutece/plugins/helpdesk/business/ThemeDAO.java

Rule Violation Ligne
TooManyMethods This class has too many methods, consider refactoring it. 48447
MissingOverride The method 'newPrimaryKey(Plugin)' is missing an @Override annotation. 7694
MissingOverride The method 'insert(AbstractSubject, Plugin)' is missing an @Override annotation. 102117
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 102117
MissingOverride The method 'delete(int, Plugin)' is missing an @Override annotation. 125133
MissingOverride The method 'load(int, Plugin)' is missing an @Override annotation. 142165
MissingOverride The method 'store(AbstractSubject, Plugin)' is missing an @Override annotation. 173186
MissingOverride The method 'findAll(Plugin)' is missing an @Override annotation. 193214
MissingOverride The method 'findByIdParent(int, Plugin)' is missing an @Override annotation. 222245
MissingOverride The method 'findByIdFaq(int, Plugin)' is missing an @Override annotation. 253275
MissingOverride The method 'findQuestions(int, Plugin)' is missing an @Override annotation. 283309
MissingOverride The method 'getMaxOrder(int, Plugin)' is missing an @Override annotation. 317332
MissingOverride The method 'findByOrder(int, int, Plugin)' is missing an @Override annotation. 341363
MissingOverride The method 'findByFaqOrder(int, int, Plugin)' is missing an @Override annotation. 372394
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 403412
MissingOverride The method 'insertLinkToFaq(int, int, Plugin)' is missing an @Override annotation. 403412
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 421430
MissingOverride The method 'deleteLinkToFaq(int, int, Plugin)' is missing an @Override annotation. 421430
MissingOverride The method 'deleteAllLinksToFaq(int, Plugin)' is missing an @Override annotation. 438446
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 438446

fr/paris/lutece/plugins/helpdesk/business/ThemeHome.java

Rule Violation Ligne
AssignmentToNonFinalStatic Possible unsafe assignment to a non-final static field in a constructor. 57
CallSuperInConstructor It is a good practice to call super() in a constructor 6268
NonThreadSafeSingleton Singleton is not thread safe 7780
MissingOverride The method 'getDAO()' is missing an @Override annotation. 137140

fr/paris/lutece/plugins/helpdesk/business/ThemeMailingListRemovalListener.java

Rule Violation Ligne
ShortVariable Avoid variables with short names like id 57
MissingOverride The method 'canBeRemoved(String)' is missing an @Override annotation. 5780
MissingOverride The method 'getRemovalRefusedMessage(String, Locale)' is missing an @Override annotation. 8892
ShortVariable Avoid variables with short names like id 88

fr/paris/lutece/plugins/helpdesk/business/VisitorQuestion.java

Rule Violation Ligne
UncommentedEmptyConstructor Document empty constructor 5557
UnnecessaryConstructor Avoid unnecessary constructors - the compiler will generate these for you 5557

fr/paris/lutece/plugins/helpdesk/business/VisitorQuestionDAO.java

Rule Violation Ligne
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getInstance method if you want a default access modifier 7578
DefaultPackage Use explicit scoping instead of the default package private level 7578
MissingOverride The method 'newPrimaryKey(Plugin)' is missing an @Override annotation. 89107
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 115133
MissingOverride The method 'insert(VisitorQuestion, Plugin)' is missing an @Override annotation. 115133
MissingOverride The method 'delete(int, Plugin)' is missing an @Override annotation. 141149
MissingOverride The method 'load(int, Plugin)' is missing an @Override annotation. 158183
MissingOverride The method 'store(VisitorQuestion, Plugin)' is missing an @Override annotation. 191206
MissingOverride The method 'findAll(Plugin)' is missing an @Override annotation. 213237
MissingOverride The method 'findByUser(int, Plugin)' is missing an @Override annotation. 245270
MissingOverride The method 'findByTheme(int, Plugin)' is missing an @Override annotation. 278303
MissingOverride The method 'findArchivedQuestionsByTheme(int, Plugin)' is missing an @Override annotation. 311337

fr/paris/lutece/plugins/helpdesk/service/FaqResourceIdService.java

Rule Violation Ligne
MissingOverride The method 'register()' is missing an @Override annotation. 90137
ShortVariable Avoid variables with short names like rt 92
ShortVariable Avoid variables with short names like p 97
MissingOverride The method 'getResourceIdList(Locale)' is missing an @Override annotation. 144147
MissingOverride The method 'getTitle(String, Locale)' is missing an @Override annotation. 155160

fr/paris/lutece/plugins/helpdesk/service/HelpdeskPlugin.java

Rule Violation Ligne
MissingOverride The method 'init()' is missing an @Override annotation. 4953

fr/paris/lutece/plugins/helpdesk/service/helpdesksearch/HelpdeskLuceneSearchEngine.java

Rule Violation Ligne
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 34325
CyclomaticComplexity The method 'getSearchResults(int, String, Date, Date, Subject, boolean, HttpServletRequest)' has a cyclomatic complexity of 13. 97214
ExcessiveMethodLength Avoid really long methods. 97214
MissingOverride The method 'getSearchResults(int, String, Date, Date, Subject, boolean, HttpServletRequest)' is missing an @Override annotation. 97214
NcssCount The method 'getSearchResults(int, String, Date, Date, Subject, boolean, HttpServletRequest)' has a NCSS line count of 65. 97214
NPathComplexity The method 'getSearchResults(int, String, Date, Date, Subject, boolean, HttpServletRequest)' has an NPath complexity of 362 97214
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 100
ShortVariable Avoid variables with short names like ir 105
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 109
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 110
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 111
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 155
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 163
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 166
OptimizableToArrayCall This call to Collection.toArray() may be optimizable 184
OptimizableToArrayCall This call to Collection.toArray() may be optimizable 185
OptimizableToArrayCall This call to Collection.toArray() may be optimizable 186
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 200206
ShortVariable Avoid variables with short names like si 204
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 208
ConfusingTernary Avoid if (x != y) ..; else ..; 233255
ConfusingTernary Avoid if (x != y) ..; else ..; 237250
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 280
LinguisticNaming Linguistics Antipattern - The getter 'getListSubjects' should not return void linguistically 313324

fr/paris/lutece/plugins/helpdesk/service/helpdesksearch/HelpdeskSearchService.java

Rule Violation Ligne
NonThreadSafeSingleton Singleton is not thread safe 7275
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 96

fr/paris/lutece/plugins/helpdesk/service/search/HelpdeskIndexer.java

Rule Violation Ligne
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 34458
MissingOverride The method 'getDescription()' is missing an @Override annotation. 99102
MissingOverride The method 'indexDocuments()' is missing an @Override annotation. 111122
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 148
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 175
MissingOverride The method 'getDocuments(String)' is missing an @Override annotation. 204261
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 207
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 243255
ShortVariable Avoid variables with short names like ft 282
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 317
IdenticalCatchBranches 'catch' branch identical to 'SAXException' branch 319322
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 321
ShortVariable Avoid variables with short names like sb 326
ShortVariable Avoid variables with short names like ft 360
UnusedFormalParameter Avoid unused method parameters such as 'plugin'. 393
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 397
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 398
MissingOverride The method 'getName()' is missing an @Override annotation. 408411
MissingOverride The method 'getVersion()' is missing an @Override annotation. 417420
MissingOverride The method 'isEnable()' is missing an @Override annotation. 426439
MissingOverride The method 'getListType()' is missing an @Override annotation. 444449
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 446
MissingOverride The method 'getSpecificSearchAppUrl()' is missing an @Override annotation. 454457

fr/paris/lutece/plugins/helpdesk/utils/HelpdeskIndexerUtils.java

Rule Violation Ligne
UseUtilityClass All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 1344

fr/paris/lutece/plugins/helpdesk/web/HelpdeskApp.java

Rule Violation Ligne
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 34569
UnnecessaryConstructor Avoid unnecessary constructors - the compiler will generate these for you 165167
UncommentedEmptyConstructor Document empty constructor 165167
CyclomaticComplexity The method 'getPage(HttpServletRequest, int, Plugin)' has a cyclomatic complexity of 12. 178237
MissingOverride The method 'getPage(HttpServletRequest, int, Plugin)' is missing an @Override annotation. 178237
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 183
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 248
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 289
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 336
NPathComplexity The method 'getSubjectListSearch(HttpServletRequest, Plugin, Faq)' has an NPath complexity of 384 397473
CyclomaticComplexity The method 'getSubjectListSearch(HttpServletRequest, Plugin, Faq)' has a cyclomatic complexity of 13. 397473
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 451
ShortVariable Avoid variables with short names like t 470

fr/paris/lutece/plugins/helpdesk/web/HelpdeskJspBean.java

Rule Violation Ligne
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 342745
ExcessivePublicCount This class has a bunch of public methods and attributes 342745
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 982745
CyclomaticComplexity The class 'HelpdeskJspBean' has a total cyclomatic complexity of 286 (highest 19). 982745
ExcessiveClassLength Avoid really long classes. 982745
TooManyMethods This class has too many methods, consider refactoring it. 992745
UnnecessaryConstructor Avoid unnecessary constructors - the compiler will generate these for you 281283
CallSuperInConstructor It is a good practice to call super() in a constructor 281283
UncommentedEmptyConstructor Document empty constructor 281283
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 292
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 292
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 292
AddEmptyString Do not add empty strings 315
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 340
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 340
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 531
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 572
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 573
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 721
ConfusingTernary Avoid if (x != y) ..; else ..; 729
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 811
CyclomaticComplexity The method 'doCreateQuestionAnswer(HttpServletRequest)' has a cyclomatic complexity of 11. 851925
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 854
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 854
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 864
CyclomaticComplexity The method 'doActionSelectionQuestionAnswer(HttpServletRequest)' has a cyclomatic complexity of 12. 10351098
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 1274
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 1323
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 1323
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 1361
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 1366
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 1366
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 1400
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 1401
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 1423
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 1437
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 1486
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 1551
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 1551
CyclomaticComplexity The method 'insertQuestionAnswers(HttpServletRequest, List, Faq, boolean, Collection)' has a cyclomatic complexity of 19. 15681697
NPathComplexity The method 'insertQuestionAnswers(HttpServletRequest, List, Faq, boolean, Collection)' has an NPath complexity of 216 15681697
ExcessiveMethodLength Avoid really long methods. 15681697
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 1588
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 1589
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 1714
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 1714
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 1724
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 1758
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 1758
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 1759
ConfusingTernary Avoid if (x != y) ..; else ..; 1759
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 1768
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 1807
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 1857
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 1867
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 1902
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 1909
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 1945
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 1945
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 1979
CyclomaticComplexity The method 'doCreateTheme(HttpServletRequest)' has a cyclomatic complexity of 10. 20142060
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 2024
CyclomaticComplexity The method 'doModifyTheme(HttpServletRequest)' has a cyclomatic complexity of 12. 20672124
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 2078
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 2088
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 2089
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 2254
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 2255
AddEmptyString Do not add empty strings 2283
UnusedFormalParameter Avoid unused method parameters such as 'faq'. 2531
UnnecessaryLocalBeforeReturn Consider simply returning the value vs storing it in local variable 'nIdOrder' 2536
PositionLiteralsFirstInComparisons Position literals first in String comparisons 2553
PositionLiteralsFirstInComparisons Position literals first in String comparisons 2570
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 26032604
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 2605
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 26062607
PositionLiteralsFirstInComparisons Position literals first in String comparisons 2620
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 2648
NPathComplexity The method 'getAuthorizedActionCollection(Faq)' has an NPath complexity of 256 26892742
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 2691

fr/paris/lutece/plugins/helpdesk/web/HelpdeskSearchJspBean.java

Rule Violation Ligne
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 34333
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 75333
NcssCount The method 'getSearch(HttpServletRequest)' has a NCSS line count of 68. 133234
NPathComplexity The method 'getSearch(HttpServletRequest)' has an NPath complexity of 1152 133234
ExcessiveMethodLength Avoid really long methods. 133234
CyclomaticComplexity The method 'getSearch(HttpServletRequest)' has a cyclomatic complexity of 12. 133234
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 140
ConfusingTernary Avoid if (x != y) ..; else ..; 153
ConfusingTernary Avoid if (x != y) ..; else ..; 157
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 159
UnusedLocalVariable Avoid unused local variables such as 'nPageIndex'. 159
ConfusingTernary Avoid if (x != y) ..; else ..; 229
ShortVariable Avoid variables with short names like os 263
UnusedFormalParameter Avoid unused method parameters such as 'request'. 283
UnusedLocalVariable Avoid unused local variables such as 'plugin'. 285
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 285
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 287
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 290
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 294
ShortVariable Avoid variables with short names like i 314
ConfusingTernary Avoid if (x != y) ..; else ..; 319326

Priority 4

fr/paris/lutece/plugins/helpdesk/business/Faq.java

Rule Violation Ligne
ShortClassName Avoid short class names like Faq 47205

fr/paris/lutece/plugins/helpdesk/service/search/HelpdeskIndexer.java

Rule Violation Ligne
UnusedImports Avoid unused imports such as 'org.apache.lucene.index.IndexOptions' 68
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' 143
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' 169
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' 207
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' 207
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' 237
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' 252
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' 276
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' 280
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' 280
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' 354
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' 358
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' 358

Fichiers

fr/paris/lutece/plugins/helpdesk/business/AbstractSubjectHome.java

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

fr/paris/lutece/plugins/helpdesk/business/Faq.java

Rule Violation Priority Ligne
ShortClassName Avoid short class names like Faq 4 47205
UnnecessaryConstructor Avoid unnecessary constructors - the compiler will generate these for you 3 6264
UncommentedEmptyConstructor Document empty constructor 3 6264
NonThreadSafeSingleton Singleton is not thread safe 3 7276
NonThreadSafeSingleton Singleton is not thread safe 3 7882
MissingOverride The method 'getWorkgroup()' is missing an @Override annotation. 3 201204

fr/paris/lutece/plugins/helpdesk/business/FaqDAO.java

Rule Violation Priority Ligne
TooManyMethods This class has too many methods, consider refactoring it. 3 48353
MissingOverride The method 'newPrimaryKey(Plugin)' is missing an @Override annotation. 3 7189
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 97111
MissingOverride The method 'insert(Faq, Plugin)' is missing an @Override annotation. 3 97111
MissingOverride The method 'delete(int, Plugin)' is missing an @Override annotation. 3 119127
MissingOverride The method 'load(int, Plugin)' is missing an @Override annotation. 3 136156
MissingOverride The method 'store(Faq, Plugin)' is missing an @Override annotation. 3 164176
MissingOverride The method 'findAll(Plugin)' is missing an @Override annotation. 3 183202
MissingOverride The method 'findReferenceList(Plugin)' is missing an @Override annotation. 3 209223
MissingOverride The method 'findAuthorizedFaq(String, Plugin)' is missing an @Override annotation. 3 231234
MissingOverride The method 'findByWorkgroup(String, Plugin)' is missing an @Override annotation. 3 242245
ShortVariable Avoid variables with short names like sB 3 257
ShortVariable Avoid variables with short names like i 3 265
UnusedLocalVariable Avoid unused local variables such as 'strRoleKey'. 3 267
AssignmentInOperand Avoid assignments in operands 3 269
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 269
MissingOverride The method 'findBySubjectId(int, Plugin)' is missing an @Override annotation. 3 317332
MissingOverride The method 'findListFaq(Plugin)' is missing an @Override annotation. 3 339352

fr/paris/lutece/plugins/helpdesk/business/FaqHome.java

Rule Violation Priority Ligne
UseUtilityClass All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 3 54241
TooManyMethods This class has too many methods, consider refactoring it. 3 54241
CollapsibleIfStatements These nested if statements could be combined 3 120135
AvoidArrayLoops System.arraycopy is more efficient 3 193196

fr/paris/lutece/plugins/helpdesk/business/FaqRoleRemovalListener.java

Rule Violation Priority Ligne
MissingOverride The method 'canBeRemoved(String)' is missing an @Override annotation. 3 5773
SimplifyBooleanReturns Avoid unnecessary if..then..else statements when returning booleans 3 6770
MissingOverride The method 'getRemovalRefusedMessage(String, Locale)' is missing an @Override annotation. 3 8185

fr/paris/lutece/plugins/helpdesk/business/FaqWorkgroupRemovalListener.java

Rule Violation Priority Ligne
MissingOverride The method 'canBeRemoved(String)' is missing an @Override annotation. 3 5773
SimplifyBooleanReturns Avoid unnecessary if..then..else statements when returning booleans 3 6770
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 3 67
MissingOverride The method 'getRemovalRefusedMessage(String, Locale)' is missing an @Override annotation. 3 8185

fr/paris/lutece/plugins/helpdesk/business/IAbstractSubjectDAO.java

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

fr/paris/lutece/plugins/helpdesk/business/IFaqDAO.java

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

fr/paris/lutece/plugins/helpdesk/business/IQuestionAnswerDAO.java

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

fr/paris/lutece/plugins/helpdesk/business/QuestionAnswer.java

Rule Violation Priority Ligne
UncommentedEmptyConstructor Document empty constructor 3 5961
UnnecessaryConstructor Avoid unnecessary constructors - the compiler will generate these for you 3 5961
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 160

fr/paris/lutece/plugins/helpdesk/business/QuestionAnswerDAO.java

Rule Violation Priority Ligne
TooManyMethods This class has too many methods, consider refactoring it. 3 52399
MissingOverride The method 'newPrimaryKey(Plugin)' is missing an @Override annotation. 3 7492
MissingOverride The method 'insert(QuestionAnswer, Plugin)' is missing an @Override annotation. 3 100125
MissingOverride The method 'delete(int, Plugin)' is missing an @Override annotation. 3 133141
MissingOverride The method 'deleteAll(Plugin)' is missing an @Override annotation. 3 148154
MissingOverride The method 'deleteBySubject(int, Plugin)' is missing an @Override annotation. 3 162170
MissingOverride The method 'load(int, Plugin)' is missing an @Override annotation. 3 179201
MissingOverride The method 'store(QuestionAnswer, Plugin)' is missing an @Override annotation. 3 209233
MissingOverride The method 'findAll(Plugin)' is missing an @Override annotation. 3 241262
MissingOverride The method 'findByKeywords(String, Plugin)' is missing an @Override annotation. 3 271321
ShortVariable Avoid variables with short names like st 3 277
ShortVariable Avoid variables with short names like sB 3 280
InsufficientStringBufferDeclaration StringBuffer constructor is initialized with size 16, but has at least 66 characters appended. 3 280
MissingOverride The method 'findByIdSubject(int, Plugin)' is missing an @Override annotation. 3 329352
MissingOverride The method 'countbySubject(int, Plugin)' is missing an @Override annotation. 3 360375
MissingOverride The method 'getMaxOrder(int, Plugin)' is missing an @Override annotation. 3 383398

fr/paris/lutece/plugins/helpdesk/business/QuestionAnswerHome.java

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

fr/paris/lutece/plugins/helpdesk/business/Subject.java

Rule Violation Priority Ligne
UnnecessaryConstructor Avoid unnecessary constructors - the compiler will generate these for you 3 5254
UncommentedEmptyConstructor Document empty constructor 3 5254
CallSuperInConstructor It is a good practice to call super() in a constructor 3 5254
MissingOverride The method 'getParent(Plugin)' is missing an @Override annotation. 3 7982
MissingOverride The method 'getChilds(Plugin)' is missing an @Override annotation. 3 8992

fr/paris/lutece/plugins/helpdesk/business/SubjectDAO.java

Rule Violation Priority Ligne
TooManyMethods This class has too many methods, consider refactoring it. 3 49485
MissingOverride The method 'newPrimaryKey(Plugin)' is missing an @Override annotation. 3 7896
MissingOverride The method 'insert(AbstractSubject, Plugin)' is missing an @Override annotation. 3 104118
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 104118
MissingOverride The method 'delete(int, Plugin)' is missing an @Override annotation. 3 126134
MissingOverride The method 'load(int, Plugin)' is missing an @Override annotation. 3 143165
MissingOverride The method 'store(AbstractSubject, Plugin)' is missing an @Override annotation. 3 173185
MissingOverride The method 'findAll(Plugin)' is missing an @Override annotation. 3 192212
MissingOverride The method 'findByIdParent(int, Plugin)' is missing an @Override annotation. 3 241262
MissingOverride The method 'findByIdFaq(int, Plugin)' is missing an @Override annotation. 3 270291
MissingOverride The method 'findQuestions(int, Plugin)' is missing an @Override annotation. 3 299322
MissingOverride The method 'countQuestion(int, Plugin)' is missing an @Override annotation. 3 330345
MissingOverride The method 'getMaxOrder(int, Plugin)' is missing an @Override annotation. 3 353368
MissingOverride The method 'findByOrder(int, int, Plugin)' is missing an @Override annotation. 3 377400
MissingOverride The method 'findByFaqOrder(int, int, Plugin)' is missing an @Override annotation. 3 409432
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 441450
MissingOverride The method 'insertLinkToFaq(int, int, Plugin)' is missing an @Override annotation. 3 441450
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 459468
MissingOverride The method 'deleteLinkToFaq(int, int, Plugin)' is missing an @Override annotation. 3 459468
MissingOverride The method 'deleteAllLinksToFaq(int, Plugin)' is missing an @Override annotation. 3 476484
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 476484

fr/paris/lutece/plugins/helpdesk/business/SubjectHome.java

Rule Violation Priority Ligne
AssignmentToNonFinalStatic Possible unsafe assignment to a non-final static field in a constructor. 3 52
CallSuperInConstructor It is a good practice to call super() in a constructor 3 5763
NonThreadSafeSingleton Singleton is not thread safe 3 7275
MissingOverride The method 'getDAO()' is missing an @Override annotation. 3 106109

fr/paris/lutece/plugins/helpdesk/business/Theme.java

Rule Violation Priority Ligne
CallSuperInConstructor It is a good practice to call super() in a constructor 3 5456
UnnecessaryConstructor Avoid unnecessary constructors - the compiler will generate these for you 3 5456
UncommentedEmptyConstructor Document empty constructor 3 5456
NonThreadSafeSingleton Singleton is not thread safe 3 6468
MissingOverride The method 'getParent(Plugin)' is missing an @Override annotation. 3 9497
MissingOverride The method 'getChilds(Plugin)' is missing an @Override annotation. 3 104107

fr/paris/lutece/plugins/helpdesk/business/ThemeDAO.java

Rule Violation Priority Ligne
TooManyMethods This class has too many methods, consider refactoring it. 3 48447
MissingOverride The method 'newPrimaryKey(Plugin)' is missing an @Override annotation. 3 7694
MissingOverride The method 'insert(AbstractSubject, Plugin)' is missing an @Override annotation. 3 102117
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 102117
MissingOverride The method 'delete(int, Plugin)' is missing an @Override annotation. 3 125133
MissingOverride The method 'load(int, Plugin)' is missing an @Override annotation. 3 142165
MissingOverride The method 'store(AbstractSubject, Plugin)' is missing an @Override annotation. 3 173186
MissingOverride The method 'findAll(Plugin)' is missing an @Override annotation. 3 193214
MissingOverride The method 'findByIdParent(int, Plugin)' is missing an @Override annotation. 3 222245
MissingOverride The method 'findByIdFaq(int, Plugin)' is missing an @Override annotation. 3 253275
MissingOverride The method 'findQuestions(int, Plugin)' is missing an @Override annotation. 3 283309
MissingOverride The method 'getMaxOrder(int, Plugin)' is missing an @Override annotation. 3 317332
MissingOverride The method 'findByOrder(int, int, Plugin)' is missing an @Override annotation. 3 341363
MissingOverride The method 'findByFaqOrder(int, int, Plugin)' is missing an @Override annotation. 3 372394
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 403412
MissingOverride The method 'insertLinkToFaq(int, int, Plugin)' is missing an @Override annotation. 3 403412
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 421430
MissingOverride The method 'deleteLinkToFaq(int, int, Plugin)' is missing an @Override annotation. 3 421430
MissingOverride The method 'deleteAllLinksToFaq(int, Plugin)' is missing an @Override annotation. 3 438446
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 438446

fr/paris/lutece/plugins/helpdesk/business/ThemeHome.java

Rule Violation Priority Ligne
AssignmentToNonFinalStatic Possible unsafe assignment to a non-final static field in a constructor. 3 57
CallSuperInConstructor It is a good practice to call super() in a constructor 3 6268
NonThreadSafeSingleton Singleton is not thread safe 3 7780
MissingOverride The method 'getDAO()' is missing an @Override annotation. 3 137140

fr/paris/lutece/plugins/helpdesk/business/ThemeMailingListRemovalListener.java

Rule Violation Priority Ligne
ShortVariable Avoid variables with short names like id 3 57
MissingOverride The method 'canBeRemoved(String)' is missing an @Override annotation. 3 5780
MissingOverride The method 'getRemovalRefusedMessage(String, Locale)' is missing an @Override annotation. 3 8892
ShortVariable Avoid variables with short names like id 3 88

fr/paris/lutece/plugins/helpdesk/business/VisitorQuestion.java

Rule Violation Priority Ligne
UncommentedEmptyConstructor Document empty constructor 3 5557
UnnecessaryConstructor Avoid unnecessary constructors - the compiler will generate these for you 3 5557

fr/paris/lutece/plugins/helpdesk/business/VisitorQuestionDAO.java

Rule Violation Priority Ligne
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getInstance method if you want a default access modifier 3 7578
DefaultPackage Use explicit scoping instead of the default package private level 3 7578
MissingOverride The method 'newPrimaryKey(Plugin)' is missing an @Override annotation. 3 89107
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 115133
MissingOverride The method 'insert(VisitorQuestion, Plugin)' is missing an @Override annotation. 3 115133
MissingOverride The method 'delete(int, Plugin)' is missing an @Override annotation. 3 141149
MissingOverride The method 'load(int, Plugin)' is missing an @Override annotation. 3 158183
MissingOverride The method 'store(VisitorQuestion, Plugin)' is missing an @Override annotation. 3 191206
MissingOverride The method 'findAll(Plugin)' is missing an @Override annotation. 3 213237
MissingOverride The method 'findByUser(int, Plugin)' is missing an @Override annotation. 3 245270
MissingOverride The method 'findByTheme(int, Plugin)' is missing an @Override annotation. 3 278303
MissingOverride The method 'findArchivedQuestionsByTheme(int, Plugin)' is missing an @Override annotation. 3 311337

fr/paris/lutece/plugins/helpdesk/service/FaqResourceIdService.java

Rule Violation Priority Ligne
MissingOverride The method 'register()' is missing an @Override annotation. 3 90137
ShortVariable Avoid variables with short names like rt 3 92
ShortVariable Avoid variables with short names like p 3 97
MissingOverride The method 'getResourceIdList(Locale)' is missing an @Override annotation. 3 144147
MissingOverride The method 'getTitle(String, Locale)' is missing an @Override annotation. 3 155160

fr/paris/lutece/plugins/helpdesk/service/HelpdeskPlugin.java

Rule Violation Priority Ligne
MissingOverride The method 'init()' is missing an @Override annotation. 3 4953

fr/paris/lutece/plugins/helpdesk/service/helpdesksearch/HelpdeskLuceneSearchEngine.java

Rule Violation Priority Ligne
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 3 34325
CyclomaticComplexity The method 'getSearchResults(int, String, Date, Date, Subject, boolean, HttpServletRequest)' has a cyclomatic complexity of 13. 3 97214
ExcessiveMethodLength Avoid really long methods. 3 97214
MissingOverride The method 'getSearchResults(int, String, Date, Date, Subject, boolean, HttpServletRequest)' is missing an @Override annotation. 3 97214
NcssCount The method 'getSearchResults(int, String, Date, Date, Subject, boolean, HttpServletRequest)' has a NCSS line count of 65. 3 97214
NPathComplexity The method 'getSearchResults(int, String, Date, Date, Subject, boolean, HttpServletRequest)' has an NPath complexity of 362 3 97214
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 100
ShortVariable Avoid variables with short names like ir 3 105
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 109
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 110
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 111
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 155
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 3 163
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 3 166
OptimizableToArrayCall This call to Collection.toArray() may be optimizable 3 184
OptimizableToArrayCall This call to Collection.toArray() may be optimizable 3 185
OptimizableToArrayCall This call to Collection.toArray() may be optimizable 3 186
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 3 200206
ShortVariable Avoid variables with short names like si 3 204
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 208
ConfusingTernary Avoid if (x != y) ..; else ..; 3 233255
ConfusingTernary Avoid if (x != y) ..; else ..; 3 237250
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 280
LinguisticNaming Linguistics Antipattern - The getter 'getListSubjects' should not return void linguistically 3 313324

fr/paris/lutece/plugins/helpdesk/service/helpdesksearch/HelpdeskSearchItem.java

Rule Violation Priority Ligne
ConstructorCallsOverridableMethod Overridable method 'setSubjectId' called during object construction 1 60

fr/paris/lutece/plugins/helpdesk/service/helpdesksearch/HelpdeskSearchService.java

Rule Violation Priority Ligne
NonThreadSafeSingleton Singleton is not thread safe 3 7275
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 96

fr/paris/lutece/plugins/helpdesk/service/search/HelpdeskIndexer.java

Rule Violation Priority Ligne
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 3 34458
UnusedImports Avoid unused imports such as 'org.apache.lucene.index.IndexOptions' 4 68
MissingOverride The method 'getDescription()' is missing an @Override annotation. 3 99102
MissingOverride The method 'indexDocuments()' is missing an @Override annotation. 3 111122
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' 4 143
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 148
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' 4 169
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 175
MissingOverride The method 'getDocuments(String)' is missing an @Override annotation. 3 204261
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 207
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' 4 207
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' 4 207
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' 4 237
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 243255
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' 4 252
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' 4 276
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' 4 280
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' 4 280
ShortVariable Avoid variables with short names like ft 3 282
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 3 317
IdenticalCatchBranches 'catch' branch identical to 'SAXException' branch 3 319322
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 3 321
ShortVariable Avoid variables with short names like sb 3 326
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' 4 354
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' 4 358
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' 4 358
ShortVariable Avoid variables with short names like ft 3 360
UnusedFormalParameter Avoid unused method parameters such as 'plugin'. 3 393
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 397
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 398
MissingOverride The method 'getName()' is missing an @Override annotation. 3 408411
MissingOverride The method 'getVersion()' is missing an @Override annotation. 3 417420
MissingOverride The method 'isEnable()' is missing an @Override annotation. 3 426439
MissingOverride The method 'getListType()' is missing an @Override annotation. 3 444449
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 446
MissingOverride The method 'getSpecificSearchAppUrl()' is missing an @Override annotation. 3 454457

fr/paris/lutece/plugins/helpdesk/utils/HelpdeskIndexerUtils.java

Rule Violation Priority Ligne
UseUtilityClass All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 3 1344

fr/paris/lutece/plugins/helpdesk/web/HelpdeskApp.java

Rule Violation Priority Ligne
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 3 34569
UnnecessaryConstructor Avoid unnecessary constructors - the compiler will generate these for you 3 165167
UncommentedEmptyConstructor Document empty constructor 3 165167
CyclomaticComplexity The method 'getPage(HttpServletRequest, int, Plugin)' has a cyclomatic complexity of 12. 3 178237
MissingOverride The method 'getPage(HttpServletRequest, int, Plugin)' is missing an @Override annotation. 3 178237
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 183
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 248
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 289
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 3 336
NPathComplexity The method 'getSubjectListSearch(HttpServletRequest, Plugin, Faq)' has an NPath complexity of 384 3 397473
CyclomaticComplexity The method 'getSubjectListSearch(HttpServletRequest, Plugin, Faq)' has a cyclomatic complexity of 13. 3 397473
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 451
ShortVariable Avoid variables with short names like t 3 470

fr/paris/lutece/plugins/helpdesk/web/HelpdeskJspBean.java

Rule Violation Priority Ligne
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 3 342745
ExcessivePublicCount This class has a bunch of public methods and attributes 3 342745
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 982745
CyclomaticComplexity The class 'HelpdeskJspBean' has a total cyclomatic complexity of 286 (highest 19). 3 982745
ExcessiveClassLength Avoid really long classes. 3 982745
TooManyMethods This class has too many methods, consider refactoring it. 3 992745
UnnecessaryConstructor Avoid unnecessary constructors - the compiler will generate these for you 3 281283
CallSuperInConstructor It is a good practice to call super() in a constructor 3 281283
UncommentedEmptyConstructor Document empty constructor 3 281283
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 292
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 292
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 292
AddEmptyString Do not add empty strings 3 315
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 340
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 340
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 531
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 572
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 573
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 3 721
ConfusingTernary Avoid if (x != y) ..; else ..; 3 729
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 811
CyclomaticComplexity The method 'doCreateQuestionAnswer(HttpServletRequest)' has a cyclomatic complexity of 11. 3 851925
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 854
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 854
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 864
CyclomaticComplexity The method 'doActionSelectionQuestionAnswer(HttpServletRequest)' has a cyclomatic complexity of 12. 3 10351098
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 1274
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 1323
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 1323
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 3 1361
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 1366
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 1366
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 1400
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 1401
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 1423
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 3 1437
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 3 1486
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 1551
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 1551
CyclomaticComplexity The method 'insertQuestionAnswers(HttpServletRequest, List, Faq, boolean, Collection)' has a cyclomatic complexity of 19. 3 15681697
NPathComplexity The method 'insertQuestionAnswers(HttpServletRequest, List, Faq, boolean, Collection)' has an NPath complexity of 216 3 15681697
ExcessiveMethodLength Avoid really long methods. 3 15681697
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 1588
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 1589
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 1714
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 1714
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 3 1724
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 1758
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 1758
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 1759
ConfusingTernary Avoid if (x != y) ..; else ..; 3 1759
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 3 1768
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 1807
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 1857
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 3 1867
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 1902
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 3 1909
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 1945
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 1945
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 1979
CyclomaticComplexity The method 'doCreateTheme(HttpServletRequest)' has a cyclomatic complexity of 10. 3 20142060
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 2024
CyclomaticComplexity The method 'doModifyTheme(HttpServletRequest)' has a cyclomatic complexity of 12. 3 20672124
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 2078
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 2088
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 2089
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 2254
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 2255
AddEmptyString Do not add empty strings 3 2283
GuardLogStatement Logger calls should be surrounded by log level guards. 2 2493
UnusedFormalParameter Avoid unused method parameters such as 'faq'. 3 2531
UnnecessaryLocalBeforeReturn Consider simply returning the value vs storing it in local variable 'nIdOrder' 3 2536
GuardLogStatement Logger calls should be surrounded by log level guards. 2 2551
PositionLiteralsFirstInComparisons Position literals first in String comparisons 3 2553
GuardLogStatement Logger calls should be surrounded by log level guards. 2 2568
PositionLiteralsFirstInComparisons Position literals first in String comparisons 3 2570
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 26032604
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 2605
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 26062607
PositionLiteralsFirstInComparisons Position literals first in String comparisons 3 2620
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 3 2648
AvoidThrowingRawExceptionTypes Avoid throwing raw exception types. 1 2648
NPathComplexity The method 'getAuthorizedActionCollection(Faq)' has an NPath complexity of 256 3 26892742
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 2691

fr/paris/lutece/plugins/helpdesk/web/HelpdeskSearchJspBean.java

Rule Violation Priority Ligne
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 3 34333
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 75333
NcssCount The method 'getSearch(HttpServletRequest)' has a NCSS line count of 68. 3 133234
NPathComplexity The method 'getSearch(HttpServletRequest)' has an NPath complexity of 1152 3 133234
ExcessiveMethodLength Avoid really long methods. 3 133234
CyclomaticComplexity The method 'getSearch(HttpServletRequest)' has a cyclomatic complexity of 12. 3 133234
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 140
ConfusingTernary Avoid if (x != y) ..; else ..; 3 153
ConfusingTernary Avoid if (x != y) ..; else ..; 3 157
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 159
UnusedLocalVariable Avoid unused local variables such as 'nPageIndex'. 3 159
ConfusingTernary Avoid if (x != y) ..; else ..; 3 229
ShortVariable Avoid variables with short names like os 3 263
UnusedFormalParameter Avoid unused method parameters such as 'request'. 3 283
UnusedLocalVariable Avoid unused local variables such as 'plugin'. 3 285
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 285
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 3 287
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 290
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 294
ShortVariable Avoid variables with short names like i 3 314
ConfusingTernary Avoid if (x != y) ..; else ..; 3 319326