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/chatbot/service/bot/AbstractChatBot.java

Rule Violation Line
EmptyMethodInAbstractClassShouldBeAbstract An empty method in an abstract class should be abstract instead 309312

Priority 3

fr/paris/lutece/plugins/chatbot/business/BotPost.java

Rule Violation Line
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 4064

fr/paris/lutece/plugins/chatbot/business/ChatData.java

Rule Violation Line
ImmutableField Private field '_listPosts' could be made final; it is only initialized in the declaration or constructor. 45

fr/paris/lutece/plugins/chatbot/business/Post.java

Rule Violation Line
UncommentedEmptyConstructor Document empty constructor 6062

fr/paris/lutece/plugins/chatbot/service/BotLogger.java

Rule Violation Line
InsufficientStringBufferDeclaration StringBuffer constructor is initialized with size 16, but has at least 28 characters appended. 59
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 60
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 60
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 63
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 63
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 64

fr/paris/lutece/plugins/chatbot/service/BotService.java

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

fr/paris/lutece/plugins/chatbot/service/ChatService.java

Rule Violation Line
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 58
CyclomaticComplexity The method 'processMessage(HttpServletRequest, String, String, String, Locale)' has a cyclomatic complexity of 11. 84130
ConfusingTernary Avoid if (x != y) ..; else ..; 149

fr/paris/lutece/plugins/chatbot/service/InvalidBotKeyException.java

Rule Violation Line
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 4053

fr/paris/lutece/plugins/chatbot/service/avatar/AvatarRendererService.java

Rule Violation Line
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. 4695
NonThreadSafeSingleton Singleton is not thread safe 8492

fr/paris/lutece/plugins/chatbot/service/bot/AbstractChatBot.java

Rule Violation Line
ConfusingTernary Avoid if (x != y) ..; else ..; 94101
ConfusingTernary Avoid if (x != y) ..; else ..; 129136
UncommentedEmptyMethodBody Document empty method body 310312

fr/paris/lutece/plugins/chatbot/service/bot/MockChatBot.java

Rule Violation Line
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 4557

fr/paris/lutece/plugins/chatbot/web/ChatBotApp.java

Rule Violation Line
AvoidDuplicateLiterals The String literal "true" appears 5 times in this file; the first occurrence is on line 163 163
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 200
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 234
CommentRequired Public method and constructor comments are required 243246
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 274
ConfusingTernary Avoid if (x != y) ..; else ..; 280312
SimplifyBooleanReturns Avoid unnecessary if..then..else statements when returning booleans 343346
ConfusingTernary Avoid if (x != y) ..; else ..; 362369
SimplifiedTernary Ternary operators that can be simplified with || or && 390

fr/paris/lutece/plugins/chatbot/web/ChatPageInclude.java

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

Priority 4

fr/paris/lutece/plugins/chatbot/business/Post.java

Rule Violation Line
ShortClassName Avoid short class names like Post 41192

fr/paris/lutece/plugins/chatbot/service/BotLogger.java

Rule Violation Line
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.chatbot.business.Post' 38

fr/paris/lutece/plugins/chatbot/service/bot/ChatBot.java

Rule Violation Line
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.chatbot.service.avatar.AvatarRenderer' 38

fr/paris/lutece/plugins/chatbot/web/ChatBotApp.java

Rule Violation Line
UnusedImports Avoid unused imports such as 'fr.paris.lutece.portal.service.util.AppLogService' 43

Files

fr/paris/lutece/plugins/chatbot/business/BotPost.java

Rule Violation Priority Line
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 4064

fr/paris/lutece/plugins/chatbot/business/ChatData.java

Rule Violation Priority Line
ImmutableField Private field '_listPosts' could be made final; it is only initialized in the declaration or constructor. 3 45

fr/paris/lutece/plugins/chatbot/business/Post.java

Rule Violation Priority Line
ShortClassName Avoid short class names like Post 4 41192
UncommentedEmptyConstructor Document empty constructor 3 6062

fr/paris/lutece/plugins/chatbot/service/BotLogger.java

Rule Violation Priority Line
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.chatbot.business.Post' 4 38
InsufficientStringBufferDeclaration StringBuffer constructor is initialized with size 16, but has at least 28 characters appended. 3 59
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 60
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 60
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 3 63
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 63
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 64

fr/paris/lutece/plugins/chatbot/service/BotService.java

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

fr/paris/lutece/plugins/chatbot/service/ChatService.java

Rule Violation Priority Line
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 58
CyclomaticComplexity The method 'processMessage(HttpServletRequest, String, String, String, Locale)' has a cyclomatic complexity of 11. 3 84130
ConfusingTernary Avoid if (x != y) ..; else ..; 3 149

fr/paris/lutece/plugins/chatbot/service/InvalidBotKeyException.java

Rule Violation Priority Line
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 4053

fr/paris/lutece/plugins/chatbot/service/avatar/AvatarRendererService.java

Rule Violation Priority Line
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 4695
NonThreadSafeSingleton Singleton is not thread safe 3 8492

fr/paris/lutece/plugins/chatbot/service/bot/AbstractChatBot.java

Rule Violation Priority Line
ConfusingTernary Avoid if (x != y) ..; else ..; 3 94101
ConfusingTernary Avoid if (x != y) ..; else ..; 3 129136
EmptyMethodInAbstractClassShouldBeAbstract An empty method in an abstract class should be abstract instead 1 309312
UncommentedEmptyMethodBody Document empty method body 3 310312

fr/paris/lutece/plugins/chatbot/service/bot/ChatBot.java

Rule Violation Priority Line
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.chatbot.service.avatar.AvatarRenderer' 4 38

fr/paris/lutece/plugins/chatbot/service/bot/MockChatBot.java

Rule Violation Priority Line
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 4557

fr/paris/lutece/plugins/chatbot/web/ChatBotApp.java

Rule Violation Priority Line
UnusedImports Avoid unused imports such as 'fr.paris.lutece.portal.service.util.AppLogService' 4 43
AvoidDuplicateLiterals The String literal "true" appears 5 times in this file; the first occurrence is on line 163 3 163
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 200
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 234
CommentRequired Public method and constructor comments are required 3 243246
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 274
ConfusingTernary Avoid if (x != y) ..; else ..; 3 280312
SimplifyBooleanReturns Avoid unnecessary if..then..else statements when returning booleans 3 343346
ConfusingTernary Avoid if (x != y) ..; else ..; 3 362369
SimplifiedTernary Ternary operators that can be simplified with || or && 3 390

fr/paris/lutece/plugins/chatbot/web/ChatPageInclude.java

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