Fork me on GitHub

PMD Results

The following document contains the results of PMD 6.13.0.

Violations By Priority

Priority 1

fr/paris/lutece/plugins/profanityfilter/service/ProfanityFilter.java

Rule Violation Line
LocalVariableNamingConventions The local variable name '_isSwearWords' doesn't match '[a-z][a-zA-Z0-9]*' 85
LocalVariableNamingConventions The local variable name '_isSwearWords' doesn't match '[a-z][a-zA-Z0-9]*' 131
AvoidThrowingNullPointerException Avoid throwing null pointer exceptions. 174

fr/paris/lutece/plugins/profanityfilter/web/FilterXPage.java

Rule Violation Line
LocalVariableNamingConventions The local variable name '_filterService' doesn't match '[a-z][a-zA-Z0-9]*' 118

Priority 3

fr/paris/lutece/plugins/profanityfilter/business/CounterDAO.java

Rule Violation Line
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 159
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 184

fr/paris/lutece/plugins/profanityfilter/business/WordDAO.java

Rule Violation Line
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 155
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 180

fr/paris/lutece/plugins/profanityfilter/service/IProfanityFilter.java

Rule Violation Line
CommentRequired Header comments are required 3966
UnnecessaryModifier Unnecessary modifier 'public' on method 'checkString': the method is declared in an interface type 48
UnnecessaryModifier Unnecessary modifier 'public' on method 'checkStringCounter': the method is declared in an interface type 57
UnnecessaryModifier Unnecessary modifier 'public' on method 'getCounterSwearWords': the method is declared in an interface type 65

fr/paris/lutece/plugins/profanityfilter/service/ProfanityFilter.java

Rule Violation Line
CommentRequired Header comments are required 50199
NonThreadSafeSingleton Singleton is not thread safe 6467
ShortVariable Avoid variables with short names like p 77
ShortVariable Avoid variables with short names like p 112
UnnecessaryCaseChange Using equalsIgnoreCase() is cleaner than using toUpperCase/toLowerCase().equals(). 179
UseLocaleWithCaseConversions When doing a String.toLowerCase()/toUpperCase() call, use a Locale 179
UseLocaleWithCaseConversions When doing a String.toLowerCase()/toUpperCase() call, use a Locale 179
UseLocaleWithCaseConversions When doing a String.toLowerCase()/toUpperCase() call, use a Locale 180
UseLocaleWithCaseConversions When doing a String.toLowerCase()/toUpperCase() call, use a Locale 180

fr/paris/lutece/plugins/profanityfilter/utils/ProfanityResult.java

Rule Violation Line
CommentRequired Header comments are required 39125
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 41
ImmutableField Private field '_strWords' could be made final; it is only initialized in the declaration or constructor. 41
RedundantFieldInitializer Avoid using redundant field initializer for '_bIsSwearWords' 43

fr/paris/lutece/plugins/profanityfilter/web/FilterXPage.java

Rule Violation Line
UnusedPrivateField Avoid unused private fields such as 'JSON_WORD_NOT_AUTHORIZED'. 86
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 112
LinguisticNaming Linguistics Antipattern - The method 'isSwearWord' indicates linguistically it returns a boolean, but it returns 'String' 113142
ConfusingTernary Avoid if (x != y) ..; else ..; 123130

fr/paris/lutece/plugins/profanityfilter/web/ManageProfanityfilterJspBean.java

Rule Violation Line
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 5092
SingularField Perhaps '_nDefaultItemsPerPage' could be replaced by a local variable. 60
AddEmptyString Do not add empty strings 86

fr/paris/lutece/plugins/profanityfilter/web/WordJspBean.java

Rule Violation Line
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 54241
UnusedPrivateField Avoid unused private fields such as 'PROPERTY_DEFAULT_LIST_WORD_PER_PAGE'. 79
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 109
ConfusingTernary Avoid if (x != y) ..; else ..; 127

Priority 4

fr/paris/lutece/plugins/profanityfilter/business/Counter.java

Rule Violation Line
UnusedImports Avoid unused imports such as 'org.hibernate.validator.constraints' 36
UnusedImports Avoid unused imports such as 'javax.validation.constraints' 38

fr/paris/lutece/plugins/profanityfilter/business/Word.java

Rule Violation Line
ShortClassName Avoid short class names like Word 4392

Files

fr/paris/lutece/plugins/profanityfilter/business/Counter.java

Rule Violation Priority Line
UnusedImports Avoid unused imports such as 'org.hibernate.validator.constraints' 4 36
UnusedImports Avoid unused imports such as 'javax.validation.constraints' 4 38

fr/paris/lutece/plugins/profanityfilter/business/CounterDAO.java

Rule Violation Priority Line
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 159
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 184

fr/paris/lutece/plugins/profanityfilter/business/Word.java

Rule Violation Priority Line
ShortClassName Avoid short class names like Word 4 4392

fr/paris/lutece/plugins/profanityfilter/business/WordDAO.java

Rule Violation Priority Line
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 155
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 180

fr/paris/lutece/plugins/profanityfilter/service/IProfanityFilter.java

Rule Violation Priority Line
CommentRequired Header comments are required 3 3966
UnnecessaryModifier Unnecessary modifier 'public' on method 'checkString': the method is declared in an interface type 3 48
UnnecessaryModifier Unnecessary modifier 'public' on method 'checkStringCounter': the method is declared in an interface type 3 57
UnnecessaryModifier Unnecessary modifier 'public' on method 'getCounterSwearWords': the method is declared in an interface type 3 65

fr/paris/lutece/plugins/profanityfilter/service/ProfanityFilter.java

Rule Violation Priority Line
CommentRequired Header comments are required 3 50199
NonThreadSafeSingleton Singleton is not thread safe 3 6467
ShortVariable Avoid variables with short names like p 3 77
LocalVariableNamingConventions The local variable name '_isSwearWords' doesn't match '[a-z][a-zA-Z0-9]*' 1 85
ShortVariable Avoid variables with short names like p 3 112
LocalVariableNamingConventions The local variable name '_isSwearWords' doesn't match '[a-z][a-zA-Z0-9]*' 1 131
AvoidThrowingNullPointerException Avoid throwing null pointer exceptions. 1 174
UnnecessaryCaseChange Using equalsIgnoreCase() is cleaner than using toUpperCase/toLowerCase().equals(). 3 179
UseLocaleWithCaseConversions When doing a String.toLowerCase()/toUpperCase() call, use a Locale 3 179
UseLocaleWithCaseConversions When doing a String.toLowerCase()/toUpperCase() call, use a Locale 3 179
UseLocaleWithCaseConversions When doing a String.toLowerCase()/toUpperCase() call, use a Locale 3 180
UseLocaleWithCaseConversions When doing a String.toLowerCase()/toUpperCase() call, use a Locale 3 180

fr/paris/lutece/plugins/profanityfilter/utils/ProfanityResult.java

Rule Violation Priority Line
CommentRequired Header comments are required 3 39125
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 41
ImmutableField Private field '_strWords' could be made final; it is only initialized in the declaration or constructor. 3 41
RedundantFieldInitializer Avoid using redundant field initializer for '_bIsSwearWords' 3 43

fr/paris/lutece/plugins/profanityfilter/web/FilterXPage.java

Rule Violation Priority Line
UnusedPrivateField Avoid unused private fields such as 'JSON_WORD_NOT_AUTHORIZED'. 3 86
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 3 112
LinguisticNaming Linguistics Antipattern - The method 'isSwearWord' indicates linguistically it returns a boolean, but it returns 'String' 3 113142
LocalVariableNamingConventions The local variable name '_filterService' doesn't match '[a-z][a-zA-Z0-9]*' 1 118
ConfusingTernary Avoid if (x != y) ..; else ..; 3 123130

fr/paris/lutece/plugins/profanityfilter/web/ManageProfanityfilterJspBean.java

Rule Violation Priority Line
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 5092
SingularField Perhaps '_nDefaultItemsPerPage' could be replaced by a local variable. 3 60
AddEmptyString Do not add empty strings 3 86

fr/paris/lutece/plugins/profanityfilter/web/WordJspBean.java

Rule Violation Priority Line
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 54241
UnusedPrivateField Avoid unused private fields such as 'PROPERTY_DEFAULT_LIST_WORD_PER_PAGE'. 3 79
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 109
ConfusingTernary Avoid if (x != y) ..; else ..; 3 127