Fork me on GitHub

PMD Results

The following document contains the results of PMD 5.5.1.

Files

fr/paris/lutece/plugins/quiz/business/QuestionGroup.java

Violation Line
A getX() method which returns a boolean should be named isX() 147150
A getX() method which returns a boolean should be named isX() 208211

fr/paris/lutece/plugins/quiz/business/QuestionGroupDAO.java

Violation Line
Use block level rather than method level synchronization 123142

fr/paris/lutece/plugins/quiz/business/Quiz.java

Violation Line
Too many fields 44369
Avoid short class names like Quiz 44369
Avoid unnecessary constructors - the compiler will generate these for you 6870
Document empty constructor 6870
Avoid using Literals in Conditional Statements 123
Returning '_strImg' may expose an internal array. 265
The user-supplied array 'strImg' is stored directly. 272
A getX() method which returns a boolean should be named isX() 334337
A getX() method which returns a boolean should be named isX() 355358

fr/paris/lutece/plugins/quiz/business/QuizDAO.java

Violation Line
Use explicit scoping instead of the default package private level 6582
Assigning an Object to null is a code smell. Consider refactoring. 103
Assigning an Object to null is a code smell. Consider refactoring. 105
Assigning an Object to null is a code smell. Consider refactoring. 264
Assigning an Object to null is a code smell. Consider refactoring. 266

fr/paris/lutece/plugins/quiz/business/QuizQuestion.java

Violation Line
Avoid unnecessary constructors - the compiler will generate these for you 5557
Document empty constructor 5557

fr/paris/lutece/plugins/quiz/business/QuizQuestionDAO.java

Violation Line
Use block level rather than method level synchronization 90104

fr/paris/lutece/plugins/quiz/business/UserAnswer.java

Violation Line
A getX() method which returns a boolean should be named isX() 132135

fr/paris/lutece/plugins/quiz/business/images/QuizImage.java

Violation Line
The user-supplied array 'bArrayContent' is stored directly. 58
The user-supplied array 'bArrayContent' is stored directly. 70
Returning '_bArrayContent' may expose an internal array. 101
The user-supplied array 'bArrayContent' is stored directly. 108

fr/paris/lutece/plugins/quiz/business/images/QuizImageDAO.java

Violation Line
Use block level rather than method level synchronization 91100

fr/paris/lutece/plugins/quiz/service/QuizService.java

Violation Line
Possible God class (WMC=54, ATFD=79, TCC=0.3090909090909091) 34619
Singleton is not thread safe 206209
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 236
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 250
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 278
Avoid declaring a variable if it is unreferenced before a possible exit point. 279
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 283
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 365
Avoid declaring a variable if it is unreferenced before a possible exit point. 365
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 381
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 429
Avoid declaring a variable if it is unreferenced before a possible exit point. 430
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 432
Avoid appending characters as strings in StringBuffer.append. 491
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 516
Avoid declaring a variable if it is unreferenced before a possible exit point. 516
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 525
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 592

fr/paris/lutece/plugins/quiz/web/QuizApp.java

Violation Line
Possible God class (WMC=56, ATFD=120, TCC=0.14102564102564102) 34631
The class 'QuizApp' has a Cyclomatic Complexity of 4 (Highest = 18). 70631
The class 'QuizApp' has a Modified Cyclomatic Complexity of 3 (Highest = 13). 70631
The class 'QuizApp' has a Standard Cyclomatic Complexity of 4 (Highest = 13). 70631
Private field '_quizService' could be made final; it is only initialized in the declaration or constructor. 109
The method 'getPage' has a Standard Cyclomatic Complexity of 13. 179274
The method getPage() has an NPath complexity of 260 179274
The method 'getPage' has a Modified Cyclomatic Complexity of 13. 179274
The method 'getPage' has a Cyclomatic Complexity of 18. 179274
Avoid declaring a variable if it is unreferenced before a possible exit point. 321
These nested if statements could be combined 340344
Do not add empty strings 373
Avoid declaring a variable if it is unreferenced before a possible exit point. 398
Do not add empty strings 418
Avoid declaring a variable if it is unreferenced before a possible exit point. 442
Do not add empty strings 503
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 531
Avoid using Literals in Conditional Statements 534
Avoid unused method parameters such as 'model'. 598
Avoid unused method parameters such as 'model'. 623

fr/paris/lutece/plugins/quiz/web/QuizJspBean.java

Violation Line
A high number of imports can indicate a high degree of coupling within an object. 34921
The class 'QuizJspBean' has a Cyclomatic Complexity of 3 (Highest = 11). 78921
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 177
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 195
Avoid declaring a variable if it is unreferenced before a possible exit point. 214
Avoid declaring a variable if it is unreferenced before a possible exit point. 215
Avoid declaring a variable if it is unreferenced before a possible exit point. 216
Avoid declaring a variable if it is unreferenced before a possible exit point. 218
Avoid declaring a variable if it is unreferenced before a possible exit point. 219
Avoid declaring a variable if it is unreferenced before a possible exit point. 220221
Avoid declaring a variable if it is unreferenced before a possible exit point. 251
Position literals first in String comparisons 254
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 294
Avoid declaring a variable if it is unreferenced before a possible exit point. 313
Avoid declaring a variable if it is unreferenced before a possible exit point. 314
Avoid declaring a variable if it is unreferenced before a possible exit point. 316
Avoid declaring a variable if it is unreferenced before a possible exit point. 317318
Avoid declaring a variable if it is unreferenced before a possible exit point. 348
Use opposite operator instead of the logic complement operator. 358
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 495
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 579
The method 'doModifyGroup' has a Cyclomatic Complexity of 11. 600667
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 779
Avoid declaring a variable if it is unreferenced before a possible exit point. 796
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 880
Avoid declaring a variable if it is unreferenced before a possible exit point. 898
Avoid declaring a variable if it is unreferenced before a possible exit point. 899

fr/paris/lutece/plugins/quiz/web/QuizOutputProcessorJspBean.java

Violation Line
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 114
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 127

fr/paris/lutece/plugins/quiz/web/QuizQuestionJspBean.java

Violation Line
A high number of imports can indicate a high degree of coupling within an object. 34674
The class 'QuizQuestionJspBean' has a Cyclomatic Complexity of 4 (Highest = 11). 75674
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 176
The String literal "PROFIL" appears 4 times in this file; the first occurrence is on line 183 183
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 210
Avoid declaring a variable if it is unreferenced before a possible exit point. 230
Avoid declaring a variable if it is unreferenced before a possible exit point. 232
Avoid declaring a variable if it is unreferenced before a possible exit point. 233
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 285
Avoid declaring a variable if it is unreferenced before a possible exit point. 316
Avoid declaring a variable if it is unreferenced before a possible exit point. 317
Avoid declaring a variable if it is unreferenced before a possible exit point. 319
Avoid declaring a variable if it is unreferenced before a possible exit point. 320
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 424
Avoid declaring a variable if it is unreferenced before a possible exit point. 458
Avoid declaring a variable if it is unreferenced before a possible exit point. 460
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 513
The method 'doModifyAnswer' has a Cyclomatic Complexity of 11. 545595
Avoid declaring a variable if it is unreferenced before a possible exit point. 548
Avoid declaring a variable if it is unreferenced before a possible exit point. 550
Avoid variables with short names like i 611