Fork me on GitHub

PMD Results

The following document contains the results of PMD 5.3.5.

Files

fr/paris/lutece/plugins/files2docs/service/AutoCleaningService.java

Violation Line
Singleton is not thread safe 67–70
StringBuffer constructor is initialized with size 16, but has at least 127 characters appended. 82
Deeply nested if..then statements are hard to read 112–124

fr/paris/lutece/plugins/files2docs/service/Files2DocsLinkDocument.java

Violation Line
The class 'Files2DocsLinkDocument' has a Modified Cyclomatic Complexity of 2 (Highest = 10). 69–427
The class 'Files2DocsLinkDocument' has a Standard Cyclomatic Complexity of 2 (Highest = 10). 69–427
The class 'Files2DocsLinkDocument' has a Cyclomatic Complexity of 3 (Highest = 11). 69–427
Singleton is not thread safe 90–93
The method 'getListDocumentTypeFile' has a Modified Cyclomatic Complexity of 10. 105–160
The method 'getListDocumentTypeFile' has a Standard Cyclomatic Complexity of 10. 105–160
The method 'getListDocumentTypeFile' has a Cyclomatic Complexity of 11. 105–160
Use bitwise inversion to invert boolean values 119
Deeply nested if..then statements are hard to read 137–140
Avoid declaring a variable if it is unreferenced before a possible exit point. 399
Avoid declaring a variable if it is unreferenced before a possible exit point. 418

fr/paris/lutece/plugins/files2docs/web/Files2DocsJspBean.java

Violation Line
Possible God class (WMC=195, ATFD=219, TCC=0.19913419913419914) 34–1826
A high number of imports can indicate a high degree of coupling within an object. 34–1826
Avoid unused imports such as 'java.time.LocalDate' 108
Avoid unused imports such as 'java.time.LocalDate' 108
Avoid unused imports such as 'org.apache.commons.lang.time.DateFormatUtils' 113
Avoid unused imports such as 'org.apache.commons.lang.time.DateFormatUtils' 113
The class 'Files2DocsJspBean' has a Standard Cyclomatic Complexity of 6 (Highest = 24). 119–1826
Avoid really long classes. 119–1826
The class 'Files2DocsJspBean' has a Cyclomatic Complexity of 9 (Highest = 34). 119–1826
The class 'Files2DocsJspBean' has a Modified Cyclomatic Complexity of 6 (Highest = 24). 119–1826
Perhaps '_nDefaultItemsPerPage' could be replaced by a local variable. 269
It is a good practice to call super() in a constructor 279–281
Avoid unnecessary constructors - the compiler will generate these for you 279–281
Document empty constructor 279–281
This statement may have some unnecessary parentheses 297
Avoid unused private methods such as 'deleteUploadedFile(HttpServletRequest,String)'. 381
This statement may have some unnecessary parentheses 407
Avoid declaring a variable if it is unreferenced before a possible exit point. 456
Avoid declaring a variable if it is unreferenced before a possible exit point. 457
The method getReplacedTags() has an NPath complexity of 243 534–573
The method 'getReplacedTags' has a Cyclomatic Complexity of 11. 534–573
Avoid really long methods. 582–806
The method 'getSelectFiles' has a Cyclomatic Complexity of 34. 582–806
The method getSelectFiles() has an NCSS line count of 109 582–806
The method getSelectFiles() has an NPath complexity of 525312 582–806
The method 'getSelectFiles' has a Modified Cyclomatic Complexity of 23. 582–806
The method 'getSelectFiles' has a Standard Cyclomatic Complexity of 23. 582–806
Avoid using Literals in Conditional Statements 590
Prefer StringBuffer over += for concatenating strings 625
Avoid using if statements without curly braces 637
Avoid using if statements without curly braces 638
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 670
Prefer StringBuffer over += for concatenating strings 718
Prefer StringBuffer over += for concatenating strings 722
Prefer StringBuffer over += for concatenating strings 730
Prefer StringBuffer over += for concatenating strings 734
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 744
Avoid using if statements without curly braces 787
Avoid using if statements without curly braces 853
The method 'doSelectFiles' has a Modified Cyclomatic Complexity of 16. 909–1053
Avoid really long methods. 909–1053
The method 'doSelectFiles' has a Standard Cyclomatic Complexity of 16. 909–1053
The method 'doSelectFiles' has a Cyclomatic Complexity of 29. 909–1053
The method doSelectFiles() has an NPath complexity of 71280 909–1053
Avoid declaring a variable if it is unreferenced before a possible exit point. 932
Prefer StringBuffer over += for concatenating strings 948
Avoid using if statements without curly braces 1050
The method 'upload' has a Standard Cyclomatic Complexity of 12. 1062–1161
The method upload() has an NPath complexity of 1176 1062–1161
The method 'upload' has a Cyclomatic Complexity of 16. 1062–1161
The method 'upload' has a Modified Cyclomatic Complexity of 12. 1062–1161
Prefer StringBuffer over += for concatenating strings 1225
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 1264
The method 'getAttributesForms' has a Cyclomatic Complexity of 10. 1302–1400
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 1365
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 1382
The method 'doCreateDocuments' has a Standard Cyclomatic Complexity of 24. 1409–1673
The method 'doCreateDocuments' has a Cyclomatic Complexity of 33. 1409–1673
Avoid really long methods. 1409–1673
The method 'doCreateDocuments' has a Modified Cyclomatic Complexity of 24. 1409–1673
The method doCreateDocuments() has an NCSS line count of 117 1409–1673
The method doCreateDocuments() has an NPath complexity of 47619 1409–1673
Avoid declaring a variable if it is unreferenced before a possible exit point. 1416
Avoid variables with short names like in 1496
Prefer StringBuffer over += for concatenating strings 1606
Prefer StringBuffer over += for concatenating strings 1610
Prefer StringBuffer over += for concatenating strings 1643
Prefer StringBuffer over += for concatenating strings 1647
The method 'getImportResult' has a Cyclomatic Complexity of 12. 1682–1789
Avoid really long methods. 1682–1789
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 1765
Avoid using if statements without curly braces 1817
Avoid using if statements without curly braces 1818
Avoid using if statements without curly braces 1822
Prefer StringBuffer over += for concatenating strings 1822

fr/paris/lutece/plugins/files2docs/web/MappingJspBean.java

Violation Line
The class 'MappingJspBean' has a Cyclomatic Complexity of 6 (Highest = 14). 67–705
Avoid excessively long variable names like MESSAGE_ERROR_DOC_TYPE_HAS_MANDATORY_DOC_ATTR_FILE_IMG 109
It is a good practice to call super() in a constructor 127–129
Document empty constructor 127–129
Avoid unnecessary constructors - the compiler will generate these for you 127–129
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 160
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 194
The method doCreateMapping() has an NPath complexity of 210 209–309
Avoid really long methods. 209–309
The method 'doCreateMapping' has a Cyclomatic Complexity of 14. 209–309
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 385
Avoid declaring a variable if it is unreferenced before a possible exit point. 425
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 558
Avoid declaring a variable if it is unreferenced before a possible exit point. 657
These nested if statements could be combined 689–693