Fork me on GitHub

PMD Results

The following document contains the results of PMD 5.5.1.

Files

fr/paris/lutece/plugins/stock/modules/tickets/business/Contact.java

Violation Line
Avoid variables with short names like o1 55
Avoid variables with short names like o2 55
Avoid variables with short names like id 99
Document empty constructor 110112
Avoid variables with short names like id 130
Avoid variables with short names like c 206

fr/paris/lutece/plugins/stock/modules/tickets/business/PartnerDTO.java

Violation Line
Possible God class (WMC=67, ATFD=30, TCC=0.0338680926916221) 34593
The class 'PartnerDTO' has a Cyclomatic Complexity of 2 (Highest = 14). 63593
The class 'PartnerDTO' has a Modified Cyclomatic Complexity of 2 (Highest = 14). 63593
The class 'PartnerDTO' has a Standard Cyclomatic Complexity of 2 (Highest = 14). 63593
Avoid variables with short names like id 76
Avoid variables with short names like id 98
Avoid variables with short names like i 101
Avoid variables with short names like i 123
Avoid variables with short names like id 273
No need to call String.valueOf to append to a string. 391
The method 'convertEntity' has a Cyclomatic Complexity of 14. 407486
The method 'convertEntity' has a Standard Cyclomatic Complexity of 14. 407486
The method 'convertEntity' has a Modified Cyclomatic Complexity of 14. 407486
Avoid variables with short names like id 461
Avoid variables with short names like id 467
Avoid variables with short names like id 473
Avoid variables with short names like id 479

fr/paris/lutece/plugins/stock/modules/tickets/business/ProductStatisticDAO.java

Violation Line
The class 'ProductStatisticDAO' has a Cyclomatic Complexity of 8 (Highest = 17). 63272
The class 'ProductStatisticDAO' has a Modified Cyclomatic Complexity of 6 (Highest = 13). 63272
The class 'ProductStatisticDAO' has a Standard Cyclomatic Complexity of 6 (Highest = 13). 63272
Avoid variables with short names like em 80
Avoid variables with short names like cb 81
Avoid variables with short names like cq 83
This call to Collection.toArray() may be optimizable 100
The method 'getAllResultStatisticByParameters' has a Modified Cyclomatic Complexity of 13. 114221
The method 'getAllResultStatisticByParameters' has a Cyclomatic Complexity of 17. 114221
Avoid really long methods. 114221
The method getAllResultStatisticByParameters() has an NPath complexity of 864 114221
The method 'getAllResultStatisticByParameters' has a Standard Cyclomatic Complexity of 13. 114221
StringBuffer constructor is initialized with size 16, but has at least 351 characters appended. 116
Position literals first in String comparisons 120
Position literals first in String comparisons 125
Position literals first in String comparisons 160
Position literals first in String comparisons 165
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 182
Position literals first in String comparisons 197
Position literals first in String comparisons 202
StringBuffer constructor is initialized with size 16, but has at least 237 characters appended. 229
StringBuffer (or StringBuilder).append is called 2 consecutive times with literal Strings. Use a single append with a single combined String. 231
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 231
Avoid using Literals in Conditional Statements 259

fr/paris/lutece/plugins/stock/modules/tickets/business/ProductStatistic_.java

Violation Line
No abstract method which means that the keyword is most likely used to prevent instantiation. Use a private or protected constructor instead. 4750
This abstract class does not have any abstract methods 4750
Abstract classes should be named AbstractXXX 4750
Use of modifier volatile is not recommended. 49

fr/paris/lutece/plugins/stock/modules/tickets/business/PurchaseStatisticDAO.java

Violation Line
The class 'PurchaseStatisticDAO' has a Cyclomatic Complexity of 8 (Highest = 17). 59266
The class 'PurchaseStatisticDAO' has a Standard Cyclomatic Complexity of 6 (Highest = 13). 59266
The class 'PurchaseStatisticDAO' has a Modified Cyclomatic Complexity of 6 (Highest = 13). 59266
Avoid variables with short names like em 76
Avoid variables with short names like cb 77
Avoid variables with short names like cq 79
This call to Collection.toArray() may be optimizable 94
The method 'getAllResultStatisticByParameters' has a Cyclomatic Complexity of 17. 108215
The method getAllResultStatisticByParameters() has an NPath complexity of 864 108215
Avoid really long methods. 108215
The method 'getAllResultStatisticByParameters' has a Modified Cyclomatic Complexity of 13. 108215
The method 'getAllResultStatisticByParameters' has a Standard Cyclomatic Complexity of 13. 108215
StringBuffer constructor is initialized with size 16, but has at least 362 characters appended. 110
Position literals first in String comparisons 114
Position literals first in String comparisons 119
Position literals first in String comparisons 154
Position literals first in String comparisons 159
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 176
Position literals first in String comparisons 191
Position literals first in String comparisons 196
StringBuffer constructor is initialized with size 16, but has at least 244 characters appended. 223
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 225
StringBuffer (or StringBuilder).append is called 2 consecutive times with literal Strings. Use a single append with a single combined String. 225
Avoid using Literals in Conditional Statements 253

fr/paris/lutece/plugins/stock/modules/tickets/business/PurchaseStatistic_.java

Violation Line
Abstract classes should be named AbstractXXX 4750
This abstract class does not have any abstract methods 4750
No abstract method which means that the keyword is most likely used to prevent instantiation. Use a private or protected constructor instead. 4750
Use of modifier volatile is not recommended. 49

fr/paris/lutece/plugins/stock/modules/tickets/business/ReservationDAO.java

Violation Line
The class 'ReservationDAO' has a Standard Cyclomatic Complexity of 14 (Highest = 15). 75289
The class 'ReservationDAO' has a Modified Cyclomatic Complexity of 14 (Highest = 15). 75289
The class 'ReservationDAO' has a Cyclomatic Complexity of 17 (Highest = 19). 75289
The method 'buildCriteriaQuery' has a Standard Cyclomatic Complexity of 15. 89185
The method 'buildCriteriaQuery' has a Cyclomatic Complexity of 19. 89185
The method buildCriteriaQuery() has an NPath complexity of 46656 89185
The method 'buildCriteriaQuery' has a Modified Cyclomatic Complexity of 15. 89185
This call to Collection.toArray() may be optimizable 183
The method 'buildSortQuery' has a Cyclomatic Complexity of 14. 199288
The method 'buildSortQuery' has a Standard Cyclomatic Complexity of 13. 199288
The method 'buildSortQuery' has a Modified Cyclomatic Complexity of 13. 199288
Position literals first in String comparisons 214
The String literal "name" appears 4 times in this file; the first occurrence is on line 216 216
Position literals first in String comparisons 219
The String literal "date" appears 6 times in this file; the first occurrence is on line 219 219
The String literal "key" appears 6 times in this file; the first occurrence is on line 222 222
The String literal "value" appears 6 times in this file; the first occurrence is on line 223 223
Position literals first in String comparisons 226
Position literals first in String comparisons 237
Position literals first in String comparisons 252
Position literals first in String comparisons 257
Position literals first in String comparisons 264
Position literals first in String comparisons 275

fr/paris/lutece/plugins/stock/modules/tickets/business/ReservationDTO.java

Violation Line
Avoid variables with short names like id 73
These nested if statements could be combined 229232

fr/paris/lutece/plugins/stock/modules/tickets/business/SeanceDAO.java

Violation Line
The class 'SeanceDAO' has a Modified Cyclomatic Complexity of 7 (Highest = 11). 71326
The class 'SeanceDAO' has a Cyclomatic Complexity of 8 (Highest = 13). 71326
The class 'SeanceDAO' has a Standard Cyclomatic Complexity of 7 (Highest = 11). 71326
The method buildCriteriaQuery() has an NPath complexity of 1224 85155
The method 'buildCriteriaQuery' has a Cyclomatic Complexity of 13. 85155
The method 'buildCriteriaQuery' has a Standard Cyclomatic Complexity of 11. 85155
The method 'buildCriteriaQuery' has a Modified Cyclomatic Complexity of 11. 85155
This call to Collection.toArray() may be optimizable 153
Avoid variables with short names like em 168
Avoid variables with short names like cb 169
Avoid variables with short names like cq 171
This call to Collection.toArray() may be optimizable 199
Avoid variables with short names like em 215
Avoid variables with short names like cb 216
Avoid variables with short names like cq 218
This call to Collection.toArray() may be optimizable 235
The method 'buildSortQuery' has a Modified Cyclomatic Complexity of 11. 252325
The method 'buildSortQuery' has a Cyclomatic Complexity of 12. 252325
The method 'buildSortQuery' has a Standard Cyclomatic Complexity of 11. 252325
Position literals first in String comparisons 265
The String literal "name" appears 4 times in this file; the first occurrence is on line 267 267
Position literals first in String comparisons 270
The String literal "date" appears 4 times in this file; the first occurrence is on line 275 275
Position literals first in String comparisons 275
The String literal "key" appears 4 times in this file; the first occurrence is on line 278 278
The String literal "value" appears 4 times in this file; the first occurrence is on line 279 279
Position literals first in String comparisons 296
Position literals first in String comparisons 301
Position literals first in String comparisons 306

fr/paris/lutece/plugins/stock/modules/tickets/business/SeanceDTO.java

Violation Line
Possible God class (WMC=61, ATFD=19, TCC=0.03453453453453453) 34604
The class 'SeanceDTO' has a Standard Cyclomatic Complexity of 2 (Highest = 12). 66604
The class 'SeanceDTO' has a Modified Cyclomatic Complexity of 2 (Highest = 12). 66604
The class 'SeanceDTO' has a Cyclomatic Complexity of 2 (Highest = 12). 66604
Too many fields 66604
Avoid variables with short names like id 76
The method convertEntity() has an NPath complexity of 645 307385
The method 'convertEntity' has a Cyclomatic Complexity of 12. 307385
The method 'convertEntity' has a Standard Cyclomatic Complexity of 12. 307385
The method 'convertEntity' has a Modified Cyclomatic Complexity of 12. 307385
The method convert() has an NPath complexity of 1024 393444
The method 'convert' has a Modified Cyclomatic Complexity of 11. 393444
The method 'convert' has a Cyclomatic Complexity of 12. 393444
The method 'convert' has a Standard Cyclomatic Complexity of 11. 393444
Consider using varargs for methods or constructors which take an array the last parameter. 553
The user-supplied array 'idContact' is stored directly. 553
Returning 'idContact' may expose an internal array. 564

fr/paris/lutece/plugins/stock/modules/tickets/business/ShowCategoryDTO.java

Violation Line
Avoid variables with short names like id 63
Avoid variables with short names like id 89

fr/paris/lutece/plugins/stock/modules/tickets/business/ShowDAO.java

Violation Line
The class 'ShowDAO' has a Modified Cyclomatic Complexity of 4 (Highest = 10). 75338
The class 'ShowDAO' has a Cyclomatic Complexity of 5 (Highest = 14). 75338
The class 'ShowDAO' has a Standard Cyclomatic Complexity of 4 (Highest = 10). 75338
The method 'buildCriteriaQuery' has a Modified Cyclomatic Complexity of 10. 89153
The method 'buildCriteriaQuery' has a Cyclomatic Complexity of 14. 89153
The method 'buildCriteriaQuery' has a Standard Cyclomatic Complexity of 10. 89153
The method buildCriteriaQuery() has an NPath complexity of 2592 89153
Avoid creating BigDecimal with a decimal (float/double) literal. Use a String literal 145
This call to Collection.toArray() may be optimizable 151
Avoid variables with short names like em 166
Avoid variables with short names like cb 167
Avoid variables with short names like cq 169
This call to Collection.toArray() may be optimizable 187
Avoid variables with short names like em 204
Avoid variables with short names like cb 205
Avoid variables with short names like cq 207
This call to Collection.toArray() may be optimizable 223
Avoid variables with short names like em 245
Avoid variables with short names like cb 246
Avoid variables with short names like cq 248
This call to Collection.toArray() may be optimizable 261
Position literals first in String comparisons 295
Position literals first in String comparisons 302
Position literals first in String comparisons 309
Position literals first in String comparisons 315

fr/paris/lutece/plugins/stock/modules/tickets/business/ShowDTO.java

Violation Line
This class has a bunch of public methods and attributes 34932
Possible God class (WMC=90, ATFD=32, TCC=0.024025974025974027) 34932
The class 'ShowDTO' has a Cyclomatic Complexity of 2 (Highest = 19). 68932
The class 'ShowDTO' has a Modified Cyclomatic Complexity of 2 (Highest = 19). 68932
Too many fields 68932
The class 'ShowDTO' has a Standard Cyclomatic Complexity of 2 (Highest = 19). 68932
Avoid variables with short names like id 109
Avoid using redundant field initializer for 'availableInvitation' 183
Avoid using redundant field initializer for 'availableChildInvitation' 185
Avoid using redundant field initializer for 'availableReducedPrice' 187
The method 'convertEntity' has a Standard Cyclomatic Complexity of 19. 556665
The method 'convertEntity' has a Cyclomatic Complexity of 19. 556665
The method convertEntity() has an NPath complexity of 9000 556665
Avoid really long methods. 556665
The method 'convertEntity' has a Modified Cyclomatic Complexity of 19. 556665
The method 'convert' has a Standard Cyclomatic Complexity of 14. 669737
The method 'convert' has a Cyclomatic Complexity of 15. 669737
The method 'convert' has a Modified Cyclomatic Complexity of 14. 669737
The method convert() has an NPath complexity of 12288 669737
Returning 'idContact' may expose an internal array. 877
Consider using varargs for methods or constructors which take an array the last parameter. 886
The user-supplied array 'idContact' is stored directly. 886

fr/paris/lutece/plugins/stock/modules/tickets/service/CategoryService.java

Violation Line
Document empty method 9091
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 303

fr/paris/lutece/plugins/stock/modules/tickets/service/IPurchaseService.java

Violation Line
Avoid variables with short names like id 148

fr/paris/lutece/plugins/stock/modules/tickets/service/IShowService.java

Violation Line
Avoid variables with short names like id 77
Consider using varargs for methods or constructors which take an array the last parameter. 110

fr/paris/lutece/plugins/stock/modules/tickets/service/ProviderService.java

Violation Line
The class 'ProviderService' has a Cyclomatic Complexity of 2 (Highest = 10). 58182
It is a good practice to call super() in a constructor 6971
Document empty method 8788
The method 'doSaveProvider' has a Cyclomatic Complexity of 10. 94140
Avoid variables with short names like c 104
Avoid declaring a variable if it is unreferenced before a possible exit point. 109
Avoid unused local variables such as 'bool'. 109

fr/paris/lutece/plugins/stock/modules/tickets/service/PurchaseService.java

Violation Line
It is a good practice to call super() in a constructor 110112
Document empty method 118119
debug logging that involves string concatenation should be guarded with isDebugEnabled() checks 168
New exception is thrown in catch block, original stack trace may be lost 169
debug logging that involves string concatenation should be guarded with isDebugEnabled() checks 173
New exception is thrown in catch block, original stack trace may be lost 174
debug logging that involves string concatenation should be guarded with isDebugEnabled() checks 178
New exception is thrown in catch block, original stack trace may be lost 179
Avoid variables with short names like i 201
Avoid variables with short names like id 215

fr/paris/lutece/plugins/stock/modules/tickets/service/SeanceService.java

Violation Line
The class 'SeanceService' has a Cyclomatic Complexity of 3 (Highest = 15). 73322
The class 'SeanceService' has a Standard Cyclomatic Complexity of 2 (Highest = 10). 73322
The class 'SeanceService' has a Modified Cyclomatic Complexity of 2 (Highest = 10). 73322
Document empty method 106107
The method doSaveOffer() has an NPath complexity of 768 112172
The method 'doSaveOffer' has a Standard Cyclomatic Complexity of 10. 112172
The method 'doSaveOffer' has a Modified Cyclomatic Complexity of 10. 112172
The method 'doSaveOffer' has a Cyclomatic Complexity of 15. 112172
These nested if statements could be combined 148151
These nested if statements could be combined 276290

fr/paris/lutece/plugins/stock/modules/tickets/service/ShowCategoryService.java

Violation Line
Document empty method 8990

fr/paris/lutece/plugins/stock/modules/tickets/service/ShowService.java

Violation Line
The class 'ShowService' has a Cyclomatic Complexity of 2 (Highest = 11). 71325
Document empty method 8889
Avoid variables with short names like id 112
The method 'doSaveProduct' has a Cyclomatic Complexity of 11. 155206
Consider using varargs for methods or constructors which take an array the last parameter. 155
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 181
When instantiating a SimpleDateFormat object, specify a Locale 316
When instantiating a SimpleDateFormat object, specify a Locale 319
Avoid printStackTrace(); use a logger call instead. 321

fr/paris/lutece/plugins/stock/modules/tickets/service/StatisticService.java

Violation Line
A high number of imports can indicate a high degree of coupling within an object. 34574
The class 'StatisticService' has a Cyclomatic Complexity of 3 (Highest = 10). 87574
The method 'sameDate' has a Cyclomatic Complexity of 10. 186213
When instantiating a SimpleDateFormat object, specify a Locale 226
When instantiating a SimpleDateFormat object, specify a Locale 373
When instantiating a SimpleDateFormat object, specify a Locale 374
Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 379
Avoid variables with short names like i 434
When instantiating a SimpleDateFormat object, specify a Locale 452

fr/paris/lutece/plugins/stock/modules/tickets/service/TicketsPlugin.java

Violation Line
Overriding method merely calls super 5053

fr/paris/lutece/plugins/stock/modules/tickets/service/rules/PurchaseInvitationRules.java

Violation Line
Avoid unused imports such as 'fr.paris.lutece.portal.service.util.AppPropertiesService' 45
Avoid unused imports such as 'fr.paris.lutece.portal.service.util.AppPropertiesService' 45
debug logging that involves string concatenation should be guarded with isDebugEnabled() checks 80
debug logging that involves string concatenation should be guarded with isDebugEnabled() checks 91

fr/paris/lutece/plugins/stock/modules/tickets/service/rules/PurchaseInvitationSpectacleEnfantRules.java

Violation Line
Avoid unused imports such as 'fr.paris.lutece.portal.service.util.AppPropertiesService' 45
Avoid unused imports such as 'fr.paris.lutece.portal.service.util.AppPropertiesService' 45
debug logging that involves string concatenation should be guarded with isDebugEnabled() checks 80
debug logging that involves string concatenation should be guarded with isDebugEnabled() checks 91

fr/paris/lutece/plugins/stock/modules/tickets/service/rules/PurchaseTarifReduitRules.java

Violation Line
Avoid unused imports such as 'fr.paris.lutece.portal.service.util.AppPropertiesService' 45
Avoid unused imports such as 'fr.paris.lutece.portal.service.util.AppPropertiesService' 45
debug logging that involves string concatenation should be guarded with isDebugEnabled() checks 80
debug logging that involves string concatenation should be guarded with isDebugEnabled() checks 91

fr/paris/lutece/plugins/stock/modules/tickets/utils/TicketsUtils.java

Violation Line
Avoid using Literals in Conditional Statements 73