Fork me on GitHub

Résultats PMD

Le document suivant contient les résultats de PMD 5.5.1.

Fichiers

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

Violation Ligne
Avoid short class names like Post 4192

fr/paris/lutece/plugins/easyrulesbot/service/bot/BotExecutor.java

Violation Ligne
Private field '_bot' could be made final; it is only initialized in the declaration or constructor. 66
Private field '_locale' could be made final; it is only initialized in the declaration or constructor. 67
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 69
Private field '_mapData' could be made final; it is only initialized in the declaration or constructor. 69
Use block level rather than method level synchronization 178193
Assigning an Object to null is a code smell. Consider refactoring. 180

fr/paris/lutece/plugins/easyrulesbot/service/bot/EasyRulesBot.java

Violation Ligne
Avoid unused private fields such as 'PROPERTY_LAST_MESSAGE'. 55
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 57
StringBuffer (or StringBuilder).append is called 2 consecutive times with literal Strings. Use a single append with a single combined String. 159
StringBuffer constructor is initialized with size 32, but has at least 100 characters appended. 159
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 160
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 161
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 162
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 163
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 164
Avoid variables with short names like br 168

fr/paris/lutece/plugins/easyrulesbot/service/bot/rules/BotRule.java

Violation Ligne
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 215
Prefer StringBuffer over += for concatenating strings 219
A method/constructor shouldnt explicitly throw java.lang.Exception 334
A method/constructor shouldnt explicitly throw java.lang.Exception 334
StringBuffer (or StringBuilder).append is called 2 consecutive times with literal Strings. Use a single append with a single combined String. 379
StringBuffer constructor is initialized with size 25, but has at least 105 characters appended. 379
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 380
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 381
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 382
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 383
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 384

fr/paris/lutece/plugins/easyrulesbot/service/bot/rules/conditions/AbstractCondition.java

Violation Ligne
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 68

fr/paris/lutece/plugins/easyrulesbot/service/bot/rules/conditions/ConditionsService.java

Violation Ligne
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. 4673
Singleton is not thread safe 5967

fr/paris/lutece/plugins/easyrulesbot/service/bot/rules/conditions/DataMissingCondition.java

Violation Ligne
Avoid appending characters as strings in StringBuffer.append. 81

fr/paris/lutece/plugins/easyrulesbot/service/bot/rules/conditions/DataValueCondition.java

Violation Ligne
StringBuffer constructor is initialized with size 16, but has at least 59 characters appended. 62
Avoid appending characters as strings in StringBuffer.append. 65

fr/paris/lutece/plugins/easyrulesbot/service/response/filters/FiltersService.java

Violation Ligne
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. 4669
Singleton is not thread safe 5866

fr/paris/lutece/plugins/easyrulesbot/service/response/filters/StopOnWordFilter.java

Violation Ligne
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 56
Private field '_mapLocaleStopWordsList' could be made final; it is only initialized in the declaration or constructor. 56
Private field '_mapLocaleResponseMessageList' could be made final; it is only initialized in the declaration or constructor. 58
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 58
When doing a String.toLowerCase()/toUpperCase() call, use a Locale 109
Avoid reassigning parameters such as 'locale' 129
Avoid declaring a variable if it is unreferenced before a possible exit point. 131

fr/paris/lutece/plugins/easyrulesbot/service/response/processors/MultipleValuesResponseProcessor.java

Violation Ligne
When doing a String.toLowerCase()/toUpperCase() call, use a Locale 104

fr/paris/lutece/plugins/easyrulesbot/service/response/processors/ProcessorsService.java

Violation Ligne
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. 4669
Singleton is not thread safe 5866

fr/paris/lutece/plugins/easyrulesbot/service/yaml/YamlBotLoader.java

Violation Ligne
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. 67202
debug logging that involves string concatenation should be guarded with isDebugEnabled() checks 86
debug logging that involves string concatenation should be guarded with isDebugEnabled() checks 101
debug logging that involves string concatenation should be guarded with isDebugEnabled() checks 176
Singleton is not thread safe 183190

fr/paris/lutece/plugins/easyrulesbot/service/yaml/model/YamlBot.java

Violation Ligne
A getX() method which returns a boolean should be named isX() 185188
StringBuffer (or StringBuilder).append is called 2 consecutive times with literal Strings. Use a single append with a single combined String. 249
StringBuffer constructor is initialized with size 32, but has at least 118 characters appended. 249
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 250
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 251
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 252
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 253
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 254
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 255

fr/paris/lutece/plugins/easyrulesbot/service/yaml/model/YamlCondition.java

Violation Ligne
StringBuffer constructor is initialized with size 32, but has at least 50 characters appended. 94
StringBuffer (or StringBuilder).append is called 2 consecutive times with literal Strings. Use a single append with a single combined String. 94
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 95
Avoid appending characters as strings in StringBuffer.append. 101

fr/paris/lutece/plugins/easyrulesbot/service/yaml/model/YamlRule.java

Violation Ligne
StringBuffer constructor is initialized with size 25, but has at least 105 characters appended. 271
StringBuffer (or StringBuilder).append is called 2 consecutive times with literal Strings. Use a single append with a single combined String. 271
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 272
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 273
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 274
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 275
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 276

fr/paris/lutece/plugins/easyrulesbot/util/FileUtils.java

Violation Ligne
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. 58181
Avoid variables with short names like br 75
Avoid variables with short names like is 128
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 130
Avoid variables with short names like br 134
String.trim().length()==0 is an inefficient way to validate an empty String. 144
Avoid variables with short names like m 150