Fork me on GitHub

Résultats PMD

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

Violations By Priority

Priority 1

fr/paris/lutece/plugins/searchstats/service/SearchStatsService.java

Rule Violation Ligne
FieldNamingConventions The static field name 'PROPERTY_MAIL_SENDER_NAME' doesn't match '_[a-z][a-zA-Z0-9]*' 65
FieldNamingConventions The static field name 'CONSTANT_MAIL_SENDER' doesn't match '_[a-z][a-zA-Z0-9]*' 66
FieldNamingConventions The static field name 'MESSAGE_MAIL_SUBJECT' doesn't match '_[a-z][a-zA-Z0-9]*' 67

Priority 3

fr/paris/lutece/plugins/searchstats/business/IQueryRecordDAO.java

Rule Violation Ligne
ImportFromSamePackage No need to import a type that lives in the same package 36
UnnecessaryModifier Unnecessary modifier 'public' on method 'selectQueryRecordListByCriteria': the method is declared in an interface type 66
UnnecessaryModifier Unnecessary modifier 'public' on method 'selectQueryRecordListFromDate': the method is declared in an interface type 77
UnnecessaryModifier Unnecessary modifier 'public' on method 'selectQueryRecordDatesList': the method is declared in an interface type 87
UnnecessaryModifier Unnecessary modifier 'public' on method 'selectQueryRecordList': the method is declared in an interface type 96

fr/paris/lutece/plugins/searchstats/business/QueryRecordDAO.java

Rule Violation Ligne
ImportFromSamePackage No need to import a type that lives in the same package 36
MissingOverride The method 'insert(QueryRecord, Plugin)' is missing an @Override annotation. 7286
MissingOverride The method 'selectQueryRecordDatesList(Plugin, boolean)' is missing an @Override annotation. 95116
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 97
MissingOverride The method 'selectQueryRecordListByCriteria(Plugin, RecordFilter)' is missing an @Override annotation. 127175
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 129
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 131
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 132
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 146
ShortVariable Avoid variables with short names like i 151
MissingOverride The method 'selectQueryRecordListFromDate(Plugin, RecordFilter)' is missing an @Override annotation. 187231
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 189
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 191
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 192
AddEmptyString Do not add empty strings 195
AddEmptyString Do not add empty strings 196
AddEmptyString Do not add empty strings 197
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 202
ShortVariable Avoid variables with short names like i 207
AddEmptyString Do not add empty strings 239
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 250
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 251
MissingOverride The method 'selectQueryRecordList(Plugin)' is missing an @Override annotation. 261283
CommentRequired Public method and constructor comments are required 261283
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 263

fr/paris/lutece/plugins/searchstats/business/QueryRecordHome.java

Rule Violation Ligne
ImportFromSamePackage No need to import a type that lives in the same package 36
CommentRequired Public method and constructor comments are required 113116

fr/paris/lutece/plugins/searchstats/business/RecordFilter.java

Rule Violation Ligne
CallSuperInConstructor It is a good practice to call super() in a constructor 4652

fr/paris/lutece/plugins/searchstats/daemon/StatsDaemon.java

Rule Violation Ligne
CommentRequired Header comments are required 918
UselessStringValueOf No need to call String.valueOf to append to a string. 16

fr/paris/lutece/plugins/searchstats/service/QueryListener.java

Rule Violation Ligne
CommentRequired Public method and constructor comments are required 5265
MissingOverride The method 'processQueryEvent(QueryEvent)' is missing an @Override annotation. 5265

fr/paris/lutece/plugins/searchstats/service/SearchStatsPlugin.java

Rule Violation Ligne
MissingOverride The method 'init()' is missing an @Override annotation. 5055
CommentRequired Public method and constructor comments are required 5055

fr/paris/lutece/plugins/searchstats/service/SearchStatsService.java

Rule Violation Ligne
CommentRequired Header comments are required 62192
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 83
UnnecessaryLocalBeforeReturn Consider simply returning the value vs storing it in local variable 'listTermRecords' 134
UseUnderscoresInNumericLiterals Number 31536000 should separate every third digit with an underscore 147
UseUnderscoresInNumericLiterals Number 31536000 should separate every third digit with an underscore 148
UseUnderscoresInNumericLiterals Number 2628000 should separate every third digit with an underscore 148
UseUnderscoresInNumericLiterals Number 31536000 should separate every third digit with an underscore 149
UseUnderscoresInNumericLiterals Number 2628000 should separate every third digit with an underscore 149
UseUnderscoresInNumericLiterals Number 86400 should separate every third digit with an underscore 149
UseUnderscoresInNumericLiterals Number 2628000 should separate every third digit with an underscore 150
UseUnderscoresInNumericLiterals Number 86400 should separate every third digit with an underscore 150
UseUnderscoresInNumericLiterals Number 31536000 should separate every third digit with an underscore 150

fr/paris/lutece/plugins/searchstats/service/TermRecordComparator.java

Rule Violation Ligne
MissingOverride The method 'compare(Object, Object)' is missing an @Override annotation. 4447
CommentRequired Public method and constructor comments are required 4447
ShortVariable Avoid variables with short names like o1 44
ShortVariable Avoid variables with short names like o2 44

fr/paris/lutece/plugins/searchstats/service/TermRecordService.java

Rule Violation Ligne
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. 4992
CommentRequired Public method and constructor comments are required 5191
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 53
ShortVariable Avoid variables with short names like st 61
ShortVariable Avoid variables with short names like t 69
ShortVariable Avoid variables with short names like t 74
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 81
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 87

fr/paris/lutece/plugins/searchstats/web/SearchStatsDashboardComponent.java

Rule Violation Ligne
MissingOverride The method 'getDashboardData(AdminUser, HttpServletRequest)' is missing an @Override annotation. 8095
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 87
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 87
ShortVariable Avoid variables with short names like t 92
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 114

fr/paris/lutece/plugins/searchstats/web/SearchStatsJspBean.java

Rule Violation Ligne
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 63214
CommentRequired Header comments are required 63214
RedundantFieldInitializer Avoid using redundant field initializer for '_nItemPerPageDates' 97
CyclomaticComplexity The method 'manageSearchStats(HttpServletRequest)' has a cyclomatic complexity of 10. 101170
CommentRequired Public method and constructor comments are required 101170
ConfusingTernary Avoid if (x != y) ..; else ..; 130
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 144
AddEmptyString Do not add empty strings 160
ShortVariable Avoid variables with short names like c 176
ConfusingTernary Avoid if (x != y) ..; else ..; 183200
ConfusingTernary Avoid if (x != y) ..; else ..; 187195
ShortVariable Avoid variables with short names like c 208

Priority 4

fr/paris/lutece/plugins/searchstats/business/RecordFilter.java

Rule Violation Ligne
BooleanGetMethodName A getX() method which returns a boolean should be named isX() 5962

Fichiers

fr/paris/lutece/plugins/searchstats/business/IQueryRecordDAO.java

Rule Violation Priority Ligne
ImportFromSamePackage No need to import a type that lives in the same package 3 36
UnnecessaryModifier Unnecessary modifier 'public' on method 'selectQueryRecordListByCriteria': the method is declared in an interface type 3 66
UnnecessaryModifier Unnecessary modifier 'public' on method 'selectQueryRecordListFromDate': the method is declared in an interface type 3 77
UnnecessaryModifier Unnecessary modifier 'public' on method 'selectQueryRecordDatesList': the method is declared in an interface type 3 87
UnnecessaryModifier Unnecessary modifier 'public' on method 'selectQueryRecordList': the method is declared in an interface type 3 96

fr/paris/lutece/plugins/searchstats/business/QueryRecordDAO.java

Rule Violation Priority Ligne
ImportFromSamePackage No need to import a type that lives in the same package 3 36
MissingOverride The method 'insert(QueryRecord, Plugin)' is missing an @Override annotation. 3 7286
MissingOverride The method 'selectQueryRecordDatesList(Plugin, boolean)' is missing an @Override annotation. 3 95116
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 97
MissingOverride The method 'selectQueryRecordListByCriteria(Plugin, RecordFilter)' is missing an @Override annotation. 3 127175
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 129
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 131
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 132
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 3 146
ShortVariable Avoid variables with short names like i 3 151
MissingOverride The method 'selectQueryRecordListFromDate(Plugin, RecordFilter)' is missing an @Override annotation. 3 187231
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 189
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 191
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 192
AddEmptyString Do not add empty strings 3 195
AddEmptyString Do not add empty strings 3 196
AddEmptyString Do not add empty strings 3 197
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 3 202
ShortVariable Avoid variables with short names like i 3 207
AddEmptyString Do not add empty strings 3 239
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 3 250
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 3 251
MissingOverride The method 'selectQueryRecordList(Plugin)' is missing an @Override annotation. 3 261283
CommentRequired Public method and constructor comments are required 3 261283
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 263

fr/paris/lutece/plugins/searchstats/business/QueryRecordHome.java

Rule Violation Priority Ligne
ImportFromSamePackage No need to import a type that lives in the same package 3 36
CommentRequired Public method and constructor comments are required 3 113116

fr/paris/lutece/plugins/searchstats/business/RecordFilter.java

Rule Violation Priority Ligne
CallSuperInConstructor It is a good practice to call super() in a constructor 3 4652
BooleanGetMethodName A getX() method which returns a boolean should be named isX() 4 5962

fr/paris/lutece/plugins/searchstats/daemon/StatsDaemon.java

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 918
UselessStringValueOf No need to call String.valueOf to append to a string. 3 16

fr/paris/lutece/plugins/searchstats/service/QueryListener.java

Rule Violation Priority Ligne
CommentRequired Public method and constructor comments are required 3 5265
MissingOverride The method 'processQueryEvent(QueryEvent)' is missing an @Override annotation. 3 5265

fr/paris/lutece/plugins/searchstats/service/SearchStatsPlugin.java

Rule Violation Priority Ligne
MissingOverride The method 'init()' is missing an @Override annotation. 3 5055
CommentRequired Public method and constructor comments are required 3 5055

fr/paris/lutece/plugins/searchstats/service/SearchStatsService.java

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 62192
FieldNamingConventions The static field name 'PROPERTY_MAIL_SENDER_NAME' doesn't match '_[a-z][a-zA-Z0-9]*' 1 65
FieldNamingConventions The static field name 'CONSTANT_MAIL_SENDER' doesn't match '_[a-z][a-zA-Z0-9]*' 1 66
FieldNamingConventions The static field name 'MESSAGE_MAIL_SUBJECT' doesn't match '_[a-z][a-zA-Z0-9]*' 1 67
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 83
UnnecessaryLocalBeforeReturn Consider simply returning the value vs storing it in local variable 'listTermRecords' 3 134
UseUnderscoresInNumericLiterals Number 31536000 should separate every third digit with an underscore 3 147
UseUnderscoresInNumericLiterals Number 31536000 should separate every third digit with an underscore 3 148
UseUnderscoresInNumericLiterals Number 2628000 should separate every third digit with an underscore 3 148
UseUnderscoresInNumericLiterals Number 31536000 should separate every third digit with an underscore 3 149
UseUnderscoresInNumericLiterals Number 2628000 should separate every third digit with an underscore 3 149
UseUnderscoresInNumericLiterals Number 86400 should separate every third digit with an underscore 3 149
UseUnderscoresInNumericLiterals Number 2628000 should separate every third digit with an underscore 3 150
UseUnderscoresInNumericLiterals Number 86400 should separate every third digit with an underscore 3 150
UseUnderscoresInNumericLiterals Number 31536000 should separate every third digit with an underscore 3 150

fr/paris/lutece/plugins/searchstats/service/TermRecordComparator.java

Rule Violation Priority Ligne
MissingOverride The method 'compare(Object, Object)' is missing an @Override annotation. 3 4447
CommentRequired Public method and constructor comments are required 3 4447
ShortVariable Avoid variables with short names like o1 3 44
ShortVariable Avoid variables with short names like o2 3 44

fr/paris/lutece/plugins/searchstats/service/TermRecordService.java

Rule Violation Priority Ligne
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 4992
CommentRequired Public method and constructor comments are required 3 5191
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 53
ShortVariable Avoid variables with short names like st 3 61
ShortVariable Avoid variables with short names like t 3 69
ShortVariable Avoid variables with short names like t 3 74
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 81
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 87

fr/paris/lutece/plugins/searchstats/web/SearchStatsDashboardComponent.java

Rule Violation Priority Ligne
MissingOverride The method 'getDashboardData(AdminUser, HttpServletRequest)' is missing an @Override annotation. 3 8095
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 87
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 87
ShortVariable Avoid variables with short names like t 3 92
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 114

fr/paris/lutece/plugins/searchstats/web/SearchStatsJspBean.java

Rule Violation Priority Ligne
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 63214
CommentRequired Header comments are required 3 63214
RedundantFieldInitializer Avoid using redundant field initializer for '_nItemPerPageDates' 3 97
CyclomaticComplexity The method 'manageSearchStats(HttpServletRequest)' has a cyclomatic complexity of 10. 3 101170
CommentRequired Public method and constructor comments are required 3 101170
ConfusingTernary Avoid if (x != y) ..; else ..; 3 130
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 144
AddEmptyString Do not add empty strings 3 160
ShortVariable Avoid variables with short names like c 3 176
ConfusingTernary Avoid if (x != y) ..; else ..; 3 183200
ConfusingTernary Avoid if (x != y) ..; else ..; 3 187195
ShortVariable Avoid variables with short names like c 3 208