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/botpress/service/BotRegistrationService.java

Rule Violation Line
ClassWithOnlyPrivateConstructorsShouldBeFinal A class which only has private constructors should be final 47138

Priority 3

fr/paris/lutece/plugins/botpress/business/BPBotDAO.java

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

fr/paris/lutece/plugins/botpress/business/RequestMessage.java

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

fr/paris/lutece/plugins/botpress/service/BotInstance.java

Rule Violation Line
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 46120
ImmutableField Private field '_strErrorMessage' could be made final; it is only initialized in the declaration or constructor. 51
UncommentedEmptyMethodBody Document empty method body 116118

fr/paris/lutece/plugins/botpress/service/BotRegistrationService.java

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

fr/paris/lutece/plugins/botpress/service/ConverseService.java

Rule Violation Line
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 9192
InsufficientStringBufferDeclaration StringBuffer constructor is initialized with size 16, but has at least 43 characters appended. 118
DefaultPackage Use explicit scoping instead of the default package private level 148177
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the parseJsonResponse method if you want a default access modifier 148177
ConfusingTernary Avoid if (x != y) ..; else ..; 152175
TooFewBranchesForASwitchStatement A switch with less than three branches is inefficient, use a if statement instead. 207218
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 210

fr/paris/lutece/plugins/botpress/service/LanguageService.java

Rule Violation Line
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 50

fr/paris/lutece/plugins/botpress/service/renderers/BotMessageRenderer.java

Rule Violation Line
UnnecessaryModifier Unnecessary modifier 'final' on field 'FIELD_TYPE': the field is declared in an interface type 46
UnnecessaryModifier Unnecessary modifier 'final' on field 'TYPE_TEXT': the field is declared in an interface type 47
UnnecessaryModifier Unnecessary modifier 'final' on field 'TYPE_FILE': the field is declared in an interface type 48
UnnecessaryModifier Unnecessary modifier 'final' on field 'FIELD_TEXT': the field is declared in an interface type 49
UnnecessaryModifier Unnecessary modifier 'final' on field 'FIELD_URL': the field is declared in an interface type 50

fr/paris/lutece/plugins/botpress/service/renderers/FileRenderer.java

Rule Violation Line
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 77

fr/paris/lutece/plugins/botpress/service/renderers/QuickRepliesRenderer.java

Rule Violation Line
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 69

fr/paris/lutece/plugins/botpress/web/BPBotJspBean.java

Rule Violation Line
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 64326
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 149
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 170
ConfusingTernary Avoid if (x != y) ..; else ..; 187

Files

fr/paris/lutece/plugins/botpress/business/BPBotDAO.java

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

fr/paris/lutece/plugins/botpress/business/RequestMessage.java

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

fr/paris/lutece/plugins/botpress/service/BotInstance.java

Rule Violation Priority Line
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 46120
ImmutableField Private field '_strErrorMessage' could be made final; it is only initialized in the declaration or constructor. 3 51
UncommentedEmptyMethodBody Document empty method body 3 116118

fr/paris/lutece/plugins/botpress/service/BotRegistrationService.java

Rule Violation Priority Line
ClassWithOnlyPrivateConstructorsShouldBeFinal A class which only has private constructors should be final 1 47138
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 8695

fr/paris/lutece/plugins/botpress/service/ConverseService.java

Rule Violation Priority Line
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 3 9192
InsufficientStringBufferDeclaration StringBuffer constructor is initialized with size 16, but has at least 43 characters appended. 3 118
DefaultPackage Use explicit scoping instead of the default package private level 3 148177
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the parseJsonResponse method if you want a default access modifier 3 148177
ConfusingTernary Avoid if (x != y) ..; else ..; 3 152175
TooFewBranchesForASwitchStatement A switch with less than three branches is inefficient, use a if statement instead. 3 207218
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 3 210

fr/paris/lutece/plugins/botpress/service/LanguageService.java

Rule Violation Priority Line
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 50

fr/paris/lutece/plugins/botpress/service/renderers/BotMessageRenderer.java

Rule Violation Priority Line
UnnecessaryModifier Unnecessary modifier 'final' on field 'FIELD_TYPE': the field is declared in an interface type 3 46
UnnecessaryModifier Unnecessary modifier 'final' on field 'TYPE_TEXT': the field is declared in an interface type 3 47
UnnecessaryModifier Unnecessary modifier 'final' on field 'TYPE_FILE': the field is declared in an interface type 3 48
UnnecessaryModifier Unnecessary modifier 'final' on field 'FIELD_TEXT': the field is declared in an interface type 3 49
UnnecessaryModifier Unnecessary modifier 'final' on field 'FIELD_URL': the field is declared in an interface type 3 50

fr/paris/lutece/plugins/botpress/service/renderers/FileRenderer.java

Rule Violation Priority Line
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 77

fr/paris/lutece/plugins/botpress/service/renderers/QuickRepliesRenderer.java

Rule Violation Priority Line
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 69

fr/paris/lutece/plugins/botpress/web/BPBotJspBean.java

Rule Violation Priority Line
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 64326
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 149
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 170
ConfusingTernary Avoid if (x != y) ..; else ..; 3 187