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/identityexport/business/Attribute.java

Rule Violation Line
FieldNamingConventions The field name 'certificateDate' doesn't match '_[a-z][a-zA-Z0-9]*' 4
FieldNamingConventions The field name 'lastUpdateClientCode' doesn't match '_[a-z][a-zA-Z0-9]*' 5
FieldNamingConventions The field name 'name' doesn't match '_[a-z][a-zA-Z0-9]*' 6
FieldNamingConventions The field name 'description' doesn't match '_[a-z][a-zA-Z0-9]*' 7
FieldNamingConventions The field name 'pivot' doesn't match '_[a-z][a-zA-Z0-9]*' 8
FieldNamingConventions The field name 'certifierCode' doesn't match '_[a-z][a-zA-Z0-9]*' 9
FieldNamingConventions The field name 'certificateExpirationDate' doesn't match '_[a-z][a-zA-Z0-9]*' 10
FieldNamingConventions The field name 'type' doesn't match '_[a-z][a-zA-Z0-9]*' 11
FieldNamingConventions The field name 'value' doesn't match '_[a-z][a-zA-Z0-9]*' 12
FieldNamingConventions The field name 'certifierName' doesn't match '_[a-z][a-zA-Z0-9]*' 13
FieldNamingConventions The field name 'key' doesn't match '_[a-z][a-zA-Z0-9]*' 14

fr/paris/lutece/plugins/identityexport/business/ElasticsearchResponseJSON.java

Rule Violation Line
FieldNamingConventions The field name 'took' doesn't match '_[a-z][a-zA-Z0-9]*' 6
FieldNamingConventions The field name 'timedOut' doesn't match '_[a-z][a-zA-Z0-9]*' 7
FieldNamingConventions The field name 'shards' doesn't match '_[a-z][a-zA-Z0-9]*' 8
FieldNamingConventions The field name 'hits' doesn't match '_[a-z][a-zA-Z0-9]*' 9
FieldNamingConventions The field name '_scroll_id' doesn't match '_[a-z][a-zA-Z0-9]*' 10
FieldNamingConventions The field name 'pit_id' doesn't match '_[a-z][a-zA-Z0-9]*' 11
MethodNamingConventions The instance method name 'get_scroll_id' doesn't match '[a-z][a-zA-Z0-9]*' 13–15
FormalParameterNamingConventions The method parameter name '_scroll_id' doesn't match '[a-z][a-zA-Z0-9]*' 17
MethodNamingConventions The instance method name 'set_scroll_id' doesn't match '[a-z][a-zA-Z0-9]*' 17–19
MethodNamingConventions The instance method name 'getPit_id' doesn't match '[a-z][a-zA-Z0-9]*' 53–55
FormalParameterNamingConventions The method parameter name 'pit_id' doesn't match '[a-z][a-zA-Z0-9]*' 57
MethodNamingConventions The instance method name 'setPit_id' doesn't match '[a-z][a-zA-Z0-9]*' 57–59
FieldNamingConventions The field name 'total' doesn't match '_[a-z][a-zA-Z0-9]*' 66
FieldNamingConventions The field name 'hits' doesn't match '_[a-z][a-zA-Z0-9]*' 67
FieldNamingConventions The field name 'value' doesn't match '_[a-z][a-zA-Z0-9]*' 87
FieldNamingConventions The field name 'relation' doesn't match '_[a-z][a-zA-Z0-9]*' 88
FieldNamingConventions The field name 'sort' doesn't match '_[a-z][a-zA-Z0-9]*' 113
MethodNamingConventions The instance method name 'get_source' doesn't match '[a-z][a-zA-Z0-9]*' 115–117
MethodNamingConventions The instance method name 'set_source' doesn't match '[a-z][a-zA-Z0-9]*' 118–120
FormalParameterNamingConventions The method parameter name '_source' doesn't match '[a-z][a-zA-Z0-9]*' 118
MethodNamingConventions The instance method name 'get_score' doesn't match '[a-z][a-zA-Z0-9]*' 121–123
MethodNamingConventions The instance method name 'set_score' doesn't match '[a-z][a-zA-Z0-9]*' 124–126
FormalParameterNamingConventions The method parameter name '_score' doesn't match '[a-z][a-zA-Z0-9]*' 124
MethodNamingConventions The instance method name 'get_id' doesn't match '[a-z][a-zA-Z0-9]*' 127–129
MethodNamingConventions The instance method name 'set_id' doesn't match '[a-z][a-zA-Z0-9]*' 130–132
FormalParameterNamingConventions The method parameter name '_id' doesn't match '[a-z][a-zA-Z0-9]*' 130
FieldNamingConventions The field name 'customerId' doesn't match '_[a-z][a-zA-Z0-9]*' 143
FieldNamingConventions The field name 'connectionId' doesn't match '_[a-z][a-zA-Z0-9]*' 144
FieldNamingConventions The field name 'attributes' doesn't match '_[a-z][a-zA-Z0-9]*' 145

fr/paris/lutece/plugins/identityexport/business/IExtractStoreDAO.java

Rule Violation Line
FormalParameterNamingConventions The method parameter name '_plugin' doesn't match '[a-z][a-zA-Z0-9]*' 106

fr/paris/lutece/plugins/identityexport/business/IExtractionDAO.java

Rule Violation Line
FormalParameterNamingConventions The method parameter name '_plugin' doesn't match '[a-z][a-zA-Z0-9]*' 106

fr/paris/lutece/plugins/identityexport/business/IProfilDAO.java

Rule Violation Line
FormalParameterNamingConventions The method parameter name '_plugin' doesn't match '[a-z][a-zA-Z0-9]*' 106

fr/paris/lutece/plugins/identityexport/business/Profile.java

Rule Violation Line
FormalParameterNamingConventions The method parameter name '_bAutoExtract' doesn't match '[a-z][a-zA-Z0-9]*' 178
FormalParameterNamingConventions The method parameter name '_strPassword' doesn't match '[a-z][a-zA-Z0-9]*' 194

fr/paris/lutece/plugins/identityexport/export/Constants.java

Rule Violation Line
ClassNamingConventions The utility class name 'Constants' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' 3–23

fr/paris/lutece/plugins/identityexport/export/ProfileGenerator.java

Rule Violation Line
AvoidFileStream Avoid instantiating FileInputStream, FileOutputStream, FileReader, or FileWriter 39

fr/paris/lutece/plugins/identityexport/rs/request/ScheduleExportRequest.java

Rule Violation Line
FieldNamingConventions The field name 'exportModel' doesn't match '_[a-z][a-zA-Z0-9]*' 25

Priority 2

fr/paris/lutece/plugins/identityexport/ExportService.java

Rule Violation Line
GuardLogStatement Logger calls should be surrounded by log level guards. 128
GuardLogStatement Logger calls should be surrounded by log level guards. 163
GuardLogStatement Logger calls should be surrounded by log level guards. 215

fr/paris/lutece/plugins/identityexport/daemon/ExtractDaemon.java

Rule Violation Line
GuardLogStatement Logger calls should be surrounded by log level guards. 24

fr/paris/lutece/plugins/identityexport/export/ElasticService.java

Rule Violation Line
GuardLogStatement Logger calls should be surrounded by log level guards. 75
GuardLogStatement Logger calls should be surrounded by log level guards. 142
GuardLogStatement Logger calls should be surrounded by log level guards. 169

fr/paris/lutece/plugins/identityexport/web/ExtractionJspBean.java

Rule Violation Line
SystemPrintln System.out.println is used 215
SystemPrintln System.out.println is used 224

fr/paris/lutece/plugins/identityexport/web/ProfilJspBean.java

Rule Violation Line
SystemPrintln System.out.println is used 241
SystemPrintln System.out.println is used 245
SystemPrintln System.out.println is used 393

Priority 3

fr/paris/lutece/plugins/identityexport/ExportService.java

Rule Violation Line
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 1–378
CommentRequired Header comments are required 45–378
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. 45–378
CyclomaticComplexity The method 'generateExport(int, String, String)' has a cyclomatic complexity of 23. 59–217
NcssCount The method 'generateExport(int, String, String)' has a NCSS line count of 75. 59–217
ExcessiveMethodLength Avoid really long methods. 59–217
NPathComplexity The method 'generateExport(int, String, String)' has an NPath complexity of 187056 59–217
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 78
ConfusingTernary Avoid if (x != y) ..; else ..; 156–181
EmptyFinallyBlock Avoid empty finally blocks 184–187
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 207
CyclomaticComplexity The method 'getLineFromHit(Hit, List, List)' has a cyclomatic complexity of 10. 253–327
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 255
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 258
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 259
LooseCoupling Avoid using implementation types like 'HashMap'; use the interface instead 262
ConfusingTernary Avoid if (x != y) ..; else ..; 289–318
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 339

fr/paris/lutece/plugins/identityexport/business/Attribute.java

Rule Violation Line
CommentRequired Header comments are required 3–85
DataClass The class 'Attribute' is suspected to be a Data Class (WOC=0.000%, NOPA=11, NOAM=22, WMC=22) 3–85

fr/paris/lutece/plugins/identityexport/business/ElasticsearchResponseJSON.java

Rule Violation Line
DataClass The class 'ElasticsearchResponseJSON' is suspected to be a Data Class (WOC=16.667%, NOPA=0, NOAM=10, WMC=12) 5–169
CommentRequired Header comments are required 5–169
CommentRequired Public method and constructor comments are required 13–15
CommentRequired Public method and constructor comments are required 17–19
CommentRequired Header comments are required 61–63
DataClass The class 'Hits' is suspected to be a Data Class (WOC=0.000%, NOPA=0, NOAM=4, WMC=4) 65–84
CommentRequired Header comments are required 65–84
AvoidFieldNameMatchingTypeName It is somewhat confusing to have a field name matching the declaring class name 67
DataClass The class 'Total' is suspected to be a Data Class (WOC=0.000%, NOPA=0, NOAM=4, WMC=4) 86–105
CommentRequired Header comments are required 86–105
CommentRequired Header comments are required 107–140
UnusedPrivateField Avoid unused private fields such as '_index'. 108
UnusedPrivateField Avoid unused private fields such as '_type'. 109
CommentRequired Public method and constructor comments are required 115–117
CommentRequired Public method and constructor comments are required 118–120
CommentRequired Public method and constructor comments are required 121–123
CommentRequired Public method and constructor comments are required 124–126
CommentRequired Public method and constructor comments are required 127–129
CommentRequired Public method and constructor comments are required 130–132
ArrayIsStoredDirectly The user-supplied array 'sort' is stored directly. 136
DataClass The class 'Source' is suspected to be a Data Class (WOC=0.000%, NOPA=0, NOAM=6, WMC=6) 142–167
CommentRequired Header comments are required 142–167

fr/paris/lutece/plugins/identityexport/business/ExtractStoreDAO.java

Rule Violation Line
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 195–197

fr/paris/lutece/plugins/identityexport/business/ExtractionDAO.java

Rule Violation Line
TooManyMethods This class has too many methods, consider refactoring it. 51–317
UnusedPrivateField Avoid unused private fields such as 'SQL_QUERY_SELECTALL_ID_BY_ID_PROFIL'. 62
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 233–235

fr/paris/lutece/plugins/identityexport/business/IExtractionDAO.java

Rule Violation Line
TooManyMethods This class has too many methods, consider refactoring it. 46–130

fr/paris/lutece/plugins/identityexport/business/ProfilDAO.java

Rule Violation Line
AvoidDuplicateLiterals The String literal "SELECT " appears 4 times in this file; the first occurrence is on line 55 55
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 77
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 246–248

fr/paris/lutece/plugins/identityexport/business/Profile.java

Rule Violation Line
CommentRequired Public method and constructor comments are required 150–152
CommentRequired Public method and constructor comments are required 154–156
CommentRequired Public method and constructor comments are required 158–160
CommentRequired Public method and constructor comments are required 162–164
CommentRequired Public method and constructor comments are required 166–168
CommentRequired Public method and constructor comments are required 170–172
CommentRequired Public method and constructor comments are required 174–176
CommentRequired Public method and constructor comments are required 178–180
CommentRequired Public method and constructor comments are required 182–184
CommentRequired Public method and constructor comments are required 186–188
CommentRequired Public method and constructor comments are required 190–192
CommentRequired Public method and constructor comments are required 194–196
CommentRequired Public method and constructor comments are required 198–200
CommentRequired Public method and constructor comments are required 202–204

fr/paris/lutece/plugins/identityexport/daemon/ExtractAutoDaemon.java

Rule Violation Line
CommentRequired Header comments are required 16–43
CollapsibleIfStatements These nested if statements could be combined 26–28
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 26–28

fr/paris/lutece/plugins/identityexport/daemon/ExtractDaemon.java

Rule Violation Line
CommentRequired Header comments are required 11–49
InsufficientStringBufferDeclaration StringBuffer constructor is initialized with size 16, but has at least 35 characters appended. 19
ShortVariable Avoid variables with short names like sb 19
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 35

fr/paris/lutece/plugins/identityexport/export/Constants.java

Rule Violation Line
CommentRequired Header comments are required 3–23

fr/paris/lutece/plugins/identityexport/export/ElasticService.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. 17–209
CommentRequired Header comments are required 17–209
AvoidDuplicateLiterals The String literal " {\n" appears 4 times in this file; the first occurrence is on line 53 53
IdenticalCatchBranches 'catch' branch identical to 'JsonMappingException' branch 197–200
IdenticalCatchBranches 'catch' branch identical to 'JsonMappingException' branch 201–204

fr/paris/lutece/plugins/identityexport/export/ProfileGenerator.java

Rule Violation Line
CommentRequired Header comments are required 17–176
ImmutableField Private field '_profile' could be made final; it is only initialized in the declaration or constructor. 23
CallSuperInConstructor It is a good practice to call super() in a constructor 28–31
MissingOverride The method 'getId()' is missing an @Override annotation. 128–131
MissingOverride The method 'getName()' is missing an @Override annotation. 137–140
MissingOverride The method 'getCertification()' is missing an @Override annotation. 146–149
MissingOverride The method 'getFileName()' is missing an @Override annotation. 155–158
MissingOverride The method 'isAutoExtract()' is missing an @Override annotation. 163–166
MissingOverride The method 'getPassword()' is missing an @Override annotation. 171–174

fr/paris/lutece/plugins/identityexport/rbac/AccessExportProfileResource.java

Rule Violation Line
CommentRequired Header comments are required 5–26

fr/paris/lutece/plugins/identityexport/rbac/AccessExportProfileResourceIdService.java

Rule Violation Line
CommentRequired Header comments are required 14–58
ShortVariable Avoid variables with short names like rt 24

fr/paris/lutece/plugins/identityexport/rs/ExportRest.java

Rule Violation Line
CommentRequired Header comments are required 18–38
CommentRequired Public method and constructor comments are required 20–22
UncommentedEmptyConstructor Document empty constructor 20–22
UnnecessaryConstructor Avoid unnecessary constructors - the compiler will generate these for you 20–22
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 27–32
CommentRequired Public method and constructor comments are required 27–36

fr/paris/lutece/plugins/identityexport/rs/IRestService.java

Rule Violation Line
CommentRequired Header comments are required 8–13
CommentRequired Public method and constructor comments are required 9–12

fr/paris/lutece/plugins/identityexport/rs/error/UncaughtIdentityStoreExceptionMapper.java

Rule Violation Line
ShortVariable Avoid variables with short names like e 26

fr/paris/lutece/plugins/identityexport/rs/error/UncaughtRequestFormatExceptionMapper.java

Rule Violation Line
ShortVariable Avoid variables with short names like e 25
ShortVariable Avoid variables with short names like e 35

fr/paris/lutece/plugins/identityexport/rs/error/UncaughtResourceConsistencyExceptionMapper.java

Rule Violation Line
CommentRequired Header comments are required 15–44
ShortVariable Avoid variables with short names like e 20
ShortVariable Avoid variables with short names like e 29

fr/paris/lutece/plugins/identityexport/rs/error/UncaughtResourceNotFoundExceptionMapper.java

Rule Violation Line
ShortVariable Avoid variables with short names like e 24
ShortVariable Avoid variables with short names like e 34

fr/paris/lutece/plugins/identityexport/rs/request/ScheduleExportRequest.java

Rule Violation Line
CommentRequired Header comments are required 22–83
CommentRequired Public method and constructor comments are required 27–31

fr/paris/lutece/plugins/identityexport/service/file/implementation/LocalFileSystemDirectoryFileService.java

Rule Violation Line
ImmutableField Private field '_storageDir' could be made final; it is only initialized in the declaration or constructor. 47
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 238
CommentRequired Public method and constructor comments are required 278–281
CommentRequired Public method and constructor comments are required 283–286

fr/paris/lutece/plugins/identityexport/web/AbstractManageExtractionJspBean.java

Rule Violation Line
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 50–110
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getItemsFromIds method if you want a default access modifier 109
DefaultPackage Use explicit scoping instead of the default package private level 109

fr/paris/lutece/plugins/identityexport/web/ExtractionJspBean.java

Rule Violation Line
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 36–416
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 81–416
UnusedPrivateField Avoid unused private fields such as 'ACTION_EXTRACTION_DATA'. 119
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 141
UnusedLocalVariable Avoid unused local variables such as 'profilsReferenceList'. 152
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 152
DefaultPackage Use explicit scoping instead of the default package private level 166–175
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getItemsFromIds method if you want a default access modifier 167–175
AvoidDuplicateLiterals The String literal "You don't have the right to modify this export profile." appears 6 times in this file; the first occurrence is on line 196 196
ConfusingTernary Avoid if (x != y) ..; else ..; 199
UnusedLocalVariable Avoid unused local variables such as 'lstProfils'. 204
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 204
AvoidPrintStackTrace Avoid printStackTrace(); use a logger call instead. 229
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 286
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 310
AvoidPrintStackTrace Avoid printStackTrace(); use a logger call instead. 368

fr/paris/lutece/plugins/identityexport/web/ProfilJspBean.java

Rule Violation Line
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 36–576
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 91–576
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 155
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 162
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 166
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 166
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 171
DefaultPackage Use explicit scoping instead of the default package private level 196–205
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getItemsFromIds method if you want a default access modifier 197–205
ConfusingTernary Avoid if (x != y) ..; else ..; 228
AvoidPrintStackTrace Avoid printStackTrace(); use a logger call instead. 252
AvoidDuplicateLiterals The String literal "You don't have the right to modify this export profile." appears 4 times in this file; the first occurrence is on line 331 331
AvoidPrintStackTrace Avoid printStackTrace(); use a logger call instead. 399
ExcessiveMethodLength Avoid really long methods. 445–575
CommentRequired Public method and constructor comments are required 445–575

Priority 4

fr/paris/lutece/plugins/identityexport/business/ElasticsearchResponseJSON.java

Rule Violation Line
ShortClassName Avoid short class names like Hits 65–84
ShortClassName Avoid short class names like Hit 107–140
UseVarargs Consider using varargs for methods or constructors which take an array the last parameter. 136

fr/paris/lutece/plugins/identityexport/daemon/ExtractAutoDaemon.java

Rule Violation Line
UnusedImports Avoid unused imports such as 'java.util.Date' 5

fr/paris/lutece/plugins/identityexport/export/ProfileGenerator.java

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

fr/paris/lutece/plugins/identityexport/web/ExtractionJspBean.java

Rule Violation Line
UnusedImports Avoid unused imports such as 'org.apache.commons.lang3.StringUtils' 75

fr/paris/lutece/plugins/identityexport/web/ProfilJspBean.java

Rule Violation Line
UnusedImports Avoid unused imports such as 'java.util.Collections' 77
UnusedImports Avoid unused imports such as 'java.util.Iterator' 80

Files

fr/paris/lutece/plugins/identityexport/ExportService.java

Rule Violation Priority Line
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 3 1–378
CommentRequired Header comments are required 3 45–378
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 45–378
CyclomaticComplexity The method 'generateExport(int, String, String)' has a cyclomatic complexity of 23. 3 59–217
NcssCount The method 'generateExport(int, String, String)' has a NCSS line count of 75. 3 59–217
ExcessiveMethodLength Avoid really long methods. 3 59–217
NPathComplexity The method 'generateExport(int, String, String)' has an NPath complexity of 187056 3 59–217
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 78
GuardLogStatement Logger calls should be surrounded by log level guards. 2 128
ConfusingTernary Avoid if (x != y) ..; else ..; 3 156–181
GuardLogStatement Logger calls should be surrounded by log level guards. 2 163
EmptyFinallyBlock Avoid empty finally blocks 3 184–187
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 207
GuardLogStatement Logger calls should be surrounded by log level guards. 2 215
CyclomaticComplexity The method 'getLineFromHit(Hit, List, List)' has a cyclomatic complexity of 10. 3 253–327
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 255
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 258
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 259
LooseCoupling Avoid using implementation types like 'HashMap'; use the interface instead 3 262
ConfusingTernary Avoid if (x != y) ..; else ..; 3 289–318
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 339

fr/paris/lutece/plugins/identityexport/business/Attribute.java

Rule Violation Priority Line
CommentRequired Header comments are required 3 3–85
DataClass The class 'Attribute' is suspected to be a Data Class (WOC=0.000%, NOPA=11, NOAM=22, WMC=22) 3 3–85
FieldNamingConventions The field name 'certificateDate' doesn't match '_[a-z][a-zA-Z0-9]*' 1 4
FieldNamingConventions The field name 'lastUpdateClientCode' doesn't match '_[a-z][a-zA-Z0-9]*' 1 5
FieldNamingConventions The field name 'name' doesn't match '_[a-z][a-zA-Z0-9]*' 1 6
FieldNamingConventions The field name 'description' doesn't match '_[a-z][a-zA-Z0-9]*' 1 7
FieldNamingConventions The field name 'pivot' doesn't match '_[a-z][a-zA-Z0-9]*' 1 8
FieldNamingConventions The field name 'certifierCode' doesn't match '_[a-z][a-zA-Z0-9]*' 1 9
FieldNamingConventions The field name 'certificateExpirationDate' doesn't match '_[a-z][a-zA-Z0-9]*' 1 10
FieldNamingConventions The field name 'type' doesn't match '_[a-z][a-zA-Z0-9]*' 1 11
FieldNamingConventions The field name 'value' doesn't match '_[a-z][a-zA-Z0-9]*' 1 12
FieldNamingConventions The field name 'certifierName' doesn't match '_[a-z][a-zA-Z0-9]*' 1 13
FieldNamingConventions The field name 'key' doesn't match '_[a-z][a-zA-Z0-9]*' 1 14

fr/paris/lutece/plugins/identityexport/business/ElasticsearchResponseJSON.java

Rule Violation Priority Line
DataClass The class 'ElasticsearchResponseJSON' is suspected to be a Data Class (WOC=16.667%, NOPA=0, NOAM=10, WMC=12) 3 5–169
CommentRequired Header comments are required 3 5–169
FieldNamingConventions The field name 'took' doesn't match '_[a-z][a-zA-Z0-9]*' 1 6
FieldNamingConventions The field name 'timedOut' doesn't match '_[a-z][a-zA-Z0-9]*' 1 7
FieldNamingConventions The field name 'shards' doesn't match '_[a-z][a-zA-Z0-9]*' 1 8
FieldNamingConventions The field name 'hits' doesn't match '_[a-z][a-zA-Z0-9]*' 1 9
FieldNamingConventions The field name '_scroll_id' doesn't match '_[a-z][a-zA-Z0-9]*' 1 10
FieldNamingConventions The field name 'pit_id' doesn't match '_[a-z][a-zA-Z0-9]*' 1 11
CommentRequired Public method and constructor comments are required 3 13–15
MethodNamingConventions The instance method name 'get_scroll_id' doesn't match '[a-z][a-zA-Z0-9]*' 1 13–15
CommentRequired Public method and constructor comments are required 3 17–19
FormalParameterNamingConventions The method parameter name '_scroll_id' doesn't match '[a-z][a-zA-Z0-9]*' 1 17
MethodNamingConventions The instance method name 'set_scroll_id' doesn't match '[a-z][a-zA-Z0-9]*' 1 17–19
MethodNamingConventions The instance method name 'getPit_id' doesn't match '[a-z][a-zA-Z0-9]*' 1 53–55
FormalParameterNamingConventions The method parameter name 'pit_id' doesn't match '[a-z][a-zA-Z0-9]*' 1 57
MethodNamingConventions The instance method name 'setPit_id' doesn't match '[a-z][a-zA-Z0-9]*' 1 57–59
CommentRequired Header comments are required 3 61–63
ShortClassName Avoid short class names like Hits 4 65–84
DataClass The class 'Hits' is suspected to be a Data Class (WOC=0.000%, NOPA=0, NOAM=4, WMC=4) 3 65–84
CommentRequired Header comments are required 3 65–84
FieldNamingConventions The field name 'total' doesn't match '_[a-z][a-zA-Z0-9]*' 1 66
AvoidFieldNameMatchingTypeName It is somewhat confusing to have a field name matching the declaring class name 3 67
FieldNamingConventions The field name 'hits' doesn't match '_[a-z][a-zA-Z0-9]*' 1 67
DataClass The class 'Total' is suspected to be a Data Class (WOC=0.000%, NOPA=0, NOAM=4, WMC=4) 3 86–105
CommentRequired Header comments are required 3 86–105
FieldNamingConventions The field name 'value' doesn't match '_[a-z][a-zA-Z0-9]*' 1 87
FieldNamingConventions The field name 'relation' doesn't match '_[a-z][a-zA-Z0-9]*' 1 88
CommentRequired Header comments are required 3 107–140
ShortClassName Avoid short class names like Hit 4 107–140
UnusedPrivateField Avoid unused private fields such as '_index'. 3 108
UnusedPrivateField Avoid unused private fields such as '_type'. 3 109
FieldNamingConventions The field name 'sort' doesn't match '_[a-z][a-zA-Z0-9]*' 1 113
CommentRequired Public method and constructor comments are required 3 115–117
MethodNamingConventions The instance method name 'get_source' doesn't match '[a-z][a-zA-Z0-9]*' 1 115–117
MethodNamingConventions The instance method name 'set_source' doesn't match '[a-z][a-zA-Z0-9]*' 1 118–120
FormalParameterNamingConventions The method parameter name '_source' doesn't match '[a-z][a-zA-Z0-9]*' 1 118
CommentRequired Public method and constructor comments are required 3 118–120
MethodNamingConventions The instance method name 'get_score' doesn't match '[a-z][a-zA-Z0-9]*' 1 121–123
CommentRequired Public method and constructor comments are required 3 121–123
MethodNamingConventions The instance method name 'set_score' doesn't match '[a-z][a-zA-Z0-9]*' 1 124–126
FormalParameterNamingConventions The method parameter name '_score' doesn't match '[a-z][a-zA-Z0-9]*' 1 124
CommentRequired Public method and constructor comments are required 3 124–126
MethodNamingConventions The instance method name 'get_id' doesn't match '[a-z][a-zA-Z0-9]*' 1 127–129
CommentRequired Public method and constructor comments are required 3 127–129
MethodNamingConventions The instance method name 'set_id' doesn't match '[a-z][a-zA-Z0-9]*' 1 130–132
CommentRequired Public method and constructor comments are required 3 130–132
FormalParameterNamingConventions The method parameter name '_id' doesn't match '[a-z][a-zA-Z0-9]*' 1 130
ArrayIsStoredDirectly The user-supplied array 'sort' is stored directly. 3 136
UseVarargs Consider using varargs for methods or constructors which take an array the last parameter. 4 136
DataClass The class 'Source' is suspected to be a Data Class (WOC=0.000%, NOPA=0, NOAM=6, WMC=6) 3 142–167
CommentRequired Header comments are required 3 142–167
FieldNamingConventions The field name 'customerId' doesn't match '_[a-z][a-zA-Z0-9]*' 1 143
FieldNamingConventions The field name 'connectionId' doesn't match '_[a-z][a-zA-Z0-9]*' 1 144
FieldNamingConventions The field name 'attributes' doesn't match '_[a-z][a-zA-Z0-9]*' 1 145

fr/paris/lutece/plugins/identityexport/business/ExtractStoreDAO.java

Rule Violation Priority Line
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 3 195–197

fr/paris/lutece/plugins/identityexport/business/ExtractionDAO.java

Rule Violation Priority Line
TooManyMethods This class has too many methods, consider refactoring it. 3 51–317
UnusedPrivateField Avoid unused private fields such as 'SQL_QUERY_SELECTALL_ID_BY_ID_PROFIL'. 3 62
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 3 233–235

fr/paris/lutece/plugins/identityexport/business/IExtractStoreDAO.java

Rule Violation Priority Line
FormalParameterNamingConventions The method parameter name '_plugin' doesn't match '[a-z][a-zA-Z0-9]*' 1 106

fr/paris/lutece/plugins/identityexport/business/IExtractionDAO.java

Rule Violation Priority Line
TooManyMethods This class has too many methods, consider refactoring it. 3 46–130
FormalParameterNamingConventions The method parameter name '_plugin' doesn't match '[a-z][a-zA-Z0-9]*' 1 106

fr/paris/lutece/plugins/identityexport/business/IProfilDAO.java

Rule Violation Priority Line
FormalParameterNamingConventions The method parameter name '_plugin' doesn't match '[a-z][a-zA-Z0-9]*' 1 106

fr/paris/lutece/plugins/identityexport/business/ProfilDAO.java

Rule Violation Priority Line
AvoidDuplicateLiterals The String literal "SELECT " appears 4 times in this file; the first occurrence is on line 55 3 55
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 77
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 3 246–248

fr/paris/lutece/plugins/identityexport/business/Profile.java

Rule Violation Priority Line
CommentRequired Public method and constructor comments are required 3 150–152
CommentRequired Public method and constructor comments are required 3 154–156
CommentRequired Public method and constructor comments are required 3 158–160
CommentRequired Public method and constructor comments are required 3 162–164
CommentRequired Public method and constructor comments are required 3 166–168
CommentRequired Public method and constructor comments are required 3 170–172
CommentRequired Public method and constructor comments are required 3 174–176
CommentRequired Public method and constructor comments are required 3 178–180
FormalParameterNamingConventions The method parameter name '_bAutoExtract' doesn't match '[a-z][a-zA-Z0-9]*' 1 178
CommentRequired Public method and constructor comments are required 3 182–184
CommentRequired Public method and constructor comments are required 3 186–188
CommentRequired Public method and constructor comments are required 3 190–192
CommentRequired Public method and constructor comments are required 3 194–196
FormalParameterNamingConventions The method parameter name '_strPassword' doesn't match '[a-z][a-zA-Z0-9]*' 1 194
CommentRequired Public method and constructor comments are required 3 198–200
CommentRequired Public method and constructor comments are required 3 202–204

fr/paris/lutece/plugins/identityexport/daemon/ExtractAutoDaemon.java

Rule Violation Priority Line
UnusedImports Avoid unused imports such as 'java.util.Date' 4 5
CommentRequired Header comments are required 3 16–43
CollapsibleIfStatements These nested if statements could be combined 3 26–28
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 26–28

fr/paris/lutece/plugins/identityexport/daemon/ExtractDaemon.java

Rule Violation Priority Line
CommentRequired Header comments are required 3 11–49
InsufficientStringBufferDeclaration StringBuffer constructor is initialized with size 16, but has at least 35 characters appended. 3 19
ShortVariable Avoid variables with short names like sb 3 19
GuardLogStatement Logger calls should be surrounded by log level guards. 2 24
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 35

fr/paris/lutece/plugins/identityexport/export/Constants.java

Rule Violation Priority Line
CommentRequired Header comments are required 3 3–23
ClassNamingConventions The utility class name 'Constants' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' 1 3–23

fr/paris/lutece/plugins/identityexport/export/ElasticService.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 17–209
CommentRequired Header comments are required 3 17–209
AvoidDuplicateLiterals The String literal " {\n" appears 4 times in this file; the first occurrence is on line 53 3 53
GuardLogStatement Logger calls should be surrounded by log level guards. 2 75
GuardLogStatement Logger calls should be surrounded by log level guards. 2 142
GuardLogStatement Logger calls should be surrounded by log level guards. 2 169
IdenticalCatchBranches 'catch' branch identical to 'JsonMappingException' branch 3 197–200
IdenticalCatchBranches 'catch' branch identical to 'JsonMappingException' branch 3 201–204

fr/paris/lutece/plugins/identityexport/export/ProfileGenerator.java

Rule Violation Priority Line
UnusedImports Avoid unused imports such as 'fr.paris.lutece.portal.service.util.AppLogService' 4 11
CommentRequired Header comments are required 3 17–176
ImmutableField Private field '_profile' could be made final; it is only initialized in the declaration or constructor. 3 23
CallSuperInConstructor It is a good practice to call super() in a constructor 3 28–31
AvoidFileStream Avoid instantiating FileInputStream, FileOutputStream, FileReader, or FileWriter 1 39
MissingOverride The method 'getId()' is missing an @Override annotation. 3 128–131
MissingOverride The method 'getName()' is missing an @Override annotation. 3 137–140
MissingOverride The method 'getCertification()' is missing an @Override annotation. 3 146–149
MissingOverride The method 'getFileName()' is missing an @Override annotation. 3 155–158
MissingOverride The method 'isAutoExtract()' is missing an @Override annotation. 3 163–166
MissingOverride The method 'getPassword()' is missing an @Override annotation. 3 171–174

fr/paris/lutece/plugins/identityexport/rbac/AccessExportProfileResource.java

Rule Violation Priority Line
CommentRequired Header comments are required 3 5–26

fr/paris/lutece/plugins/identityexport/rbac/AccessExportProfileResourceIdService.java

Rule Violation Priority Line
CommentRequired Header comments are required 3 14–58
ShortVariable Avoid variables with short names like rt 3 24

fr/paris/lutece/plugins/identityexport/rs/ExportRest.java

Rule Violation Priority Line
CommentRequired Header comments are required 3 18–38
CommentRequired Public method and constructor comments are required 3 20–22
UncommentedEmptyConstructor Document empty constructor 3 20–22
UnnecessaryConstructor Avoid unnecessary constructors - the compiler will generate these for you 3 20–22
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 3 27–32
CommentRequired Public method and constructor comments are required 3 27–36

fr/paris/lutece/plugins/identityexport/rs/IRestService.java

Rule Violation Priority Line
CommentRequired Header comments are required 3 8–13
CommentRequired Public method and constructor comments are required 3 9–12

fr/paris/lutece/plugins/identityexport/rs/error/UncaughtIdentityStoreExceptionMapper.java

Rule Violation Priority Line
ShortVariable Avoid variables with short names like e 3 26

fr/paris/lutece/plugins/identityexport/rs/error/UncaughtRequestFormatExceptionMapper.java

Rule Violation Priority Line
ShortVariable Avoid variables with short names like e 3 25
ShortVariable Avoid variables with short names like e 3 35

fr/paris/lutece/plugins/identityexport/rs/error/UncaughtResourceConsistencyExceptionMapper.java

Rule Violation Priority Line
CommentRequired Header comments are required 3 15–44
ShortVariable Avoid variables with short names like e 3 20
ShortVariable Avoid variables with short names like e 3 29

fr/paris/lutece/plugins/identityexport/rs/error/UncaughtResourceNotFoundExceptionMapper.java

Rule Violation Priority Line
ShortVariable Avoid variables with short names like e 3 24
ShortVariable Avoid variables with short names like e 3 34

fr/paris/lutece/plugins/identityexport/rs/request/ScheduleExportRequest.java

Rule Violation Priority Line
CommentRequired Header comments are required 3 22–83
FieldNamingConventions The field name 'exportModel' doesn't match '_[a-z][a-zA-Z0-9]*' 1 25
CommentRequired Public method and constructor comments are required 3 27–31

fr/paris/lutece/plugins/identityexport/service/file/implementation/LocalFileSystemDirectoryFileService.java

Rule Violation Priority Line
ImmutableField Private field '_storageDir' could be made final; it is only initialized in the declaration or constructor. 3 47
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 238
CommentRequired Public method and constructor comments are required 3 278–281
CommentRequired Public method and constructor comments are required 3 283–286

fr/paris/lutece/plugins/identityexport/web/AbstractManageExtractionJspBean.java

Rule Violation Priority Line
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 50–110
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getItemsFromIds method if you want a default access modifier 3 109
DefaultPackage Use explicit scoping instead of the default package private level 3 109

fr/paris/lutece/plugins/identityexport/web/ExtractionJspBean.java

Rule Violation Priority Line
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 3 36–416
UnusedImports Avoid unused imports such as 'org.apache.commons.lang3.StringUtils' 4 75
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 81–416
UnusedPrivateField Avoid unused private fields such as 'ACTION_EXTRACTION_DATA'. 3 119
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 141
UnusedLocalVariable Avoid unused local variables such as 'profilsReferenceList'. 3 152
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 152
DefaultPackage Use explicit scoping instead of the default package private level 3 166–175
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getItemsFromIds method if you want a default access modifier 3 167–175
AvoidDuplicateLiterals The String literal "You don't have the right to modify this export profile." appears 6 times in this file; the first occurrence is on line 196 3 196
ConfusingTernary Avoid if (x != y) ..; else ..; 3 199
UnusedLocalVariable Avoid unused local variables such as 'lstProfils'. 3 204
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 204
SystemPrintln System.out.println is used 2 215
SystemPrintln System.out.println is used 2 224
AvoidPrintStackTrace Avoid printStackTrace(); use a logger call instead. 3 229
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 286
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 310
AvoidPrintStackTrace Avoid printStackTrace(); use a logger call instead. 3 368

fr/paris/lutece/plugins/identityexport/web/ProfilJspBean.java

Rule Violation Priority Line
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 3 36–576
UnusedImports Avoid unused imports such as 'java.util.Collections' 4 77
UnusedImports Avoid unused imports such as 'java.util.Iterator' 4 80
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 91–576
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 155
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 162
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 166
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 166
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 171
DefaultPackage Use explicit scoping instead of the default package private level 3 196–205
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getItemsFromIds method if you want a default access modifier 3 197–205
ConfusingTernary Avoid if (x != y) ..; else ..; 3 228
SystemPrintln System.out.println is used 2 241
SystemPrintln System.out.println is used 2 245
AvoidPrintStackTrace Avoid printStackTrace(); use a logger call instead. 3 252
AvoidDuplicateLiterals The String literal "You don't have the right to modify this export profile." appears 4 times in this file; the first occurrence is on line 331 3 331
SystemPrintln System.out.println is used 2 393
AvoidPrintStackTrace Avoid printStackTrace(); use a logger call instead. 3 399
ExcessiveMethodLength Avoid really long methods. 3 445–575
CommentRequired Public method and constructor comments are required 3 445–575