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/dansmarue/modules/rest/service/ManageSignalementService.java

Rule Violation Line
FieldNamingConventions The constant name 'actionStatus' doesn't match '[A-Z][A-Z_0-9]*' 113

fr/paris/lutece/plugins/dansmarue/modules/rest/util/StringUtilsDmr.java

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

fr/paris/lutece/plugins/dansmarue/modules/rest/util/constants/SignalementRestConstants.java

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

fr/paris/lutece/plugins/dansmarue/modules/rest/util/constants/SiraRestConstants.java

Rule Violation Line
ClassNamingConventions The utility class name 'SiraRestConstants' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' 39425
ClassWithOnlyPrivateConstructorsShouldBeFinal A class which only has private constructors should be final 39425

fr/paris/lutece/plugins/dansmarue/modules/rest/util/exception/ParseSignalementFromJSONException.java

Rule Violation Line
ConstructorCallsOverridableMethod Overridable method 'setParseError' called during object construction 56

Priority 2

fr/paris/lutece/plugins/dansmarue/modules/rest/service/SignalementRestService.java

Rule Violation Line
GuardLogStatement Logger calls should be surrounded by log level guards. 270
GuardLogStatement Logger calls should be surrounded by log level guards. 2454
GuardLogStatement Logger calls should be surrounded by log level guards. 2465

Priority 3

fr/paris/lutece/plugins/dansmarue/modules/rest/dto/SignalementRestDTO.java

Rule Violation Line
DataClass The class 'SignalementRestDTO' is suspected to be a Data Class (WOC=0.000%, NOPA=0, NOAM=4, WMC=4) 4191

fr/paris/lutece/plugins/dansmarue/modules/rest/pojo/ErrorSignalement.java

Rule Violation Line
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the _nErrorCode field if you want a default access modifier 43
DefaultPackage Use explicit scoping instead of the default package private level 43
DefaultPackage Use explicit scoping instead of the default package private level 46
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the _strErrorMessage field if you want a default access modifier 46

fr/paris/lutece/plugins/dansmarue/modules/rest/pojo/ErrorSira.java

Rule Violation Line
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the _nErrorCode field if you want a default access modifier 43
DefaultPackage Use explicit scoping instead of the default package private level 43
DefaultPackage Use explicit scoping instead of the default package private level 46
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the _strErrorMessage field if you want a default access modifier 46

fr/paris/lutece/plugins/dansmarue/modules/rest/pojo/SignalementPOJO.java

Rule Violation Line
ShortVariable Avoid variables with short names like id 61

fr/paris/lutece/plugins/dansmarue/modules/rest/rs/SignalementRest.java

Rule Violation Line
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 341576
ExcessiveClassLength Avoid really long classes. 1001576
TooManyMethods This class has too many methods, consider refactoring it. 1011576
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 157
ShortVariable Avoid variables with short names like t 160
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 198
ExcessiveParameterList Avoid long parameter lists. 303313
ShortVariable Avoid variables with short names like id 303
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 303
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 303313
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 304
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 305
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 306
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 307
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 308
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 309
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 310
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 311
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 312
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 313
ExcessiveParameterList Avoid long parameter lists. 358359
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 358359
ShortVariable Avoid variables with short names like id 358
AvoidDuplicateLiterals The String literal ";charset=utf-8" appears 31 times in this file; the first occurrence is on line 441 441
LinguisticNaming Linguistics Antipattern - The method 'isSignalementFollowableAndisSignalementFollowedByUser' indicates linguistically it returns a boolean, but it returns 'String' 692709
LinguisticNaming Linguistics Antipattern - The method 'isDmrOnline' indicates linguistically it returns a boolean, but it returns 'String' 965977
ShortVariable Avoid variables with short names like id 1391
CommentRequired Public method and constructor comments are required 14831486
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 1556

fr/paris/lutece/plugins/dansmarue/modules/rest/service/ISignalementRestService.java

Rule Violation Line
TooManyMethods This class has too many methods, consider refactoring it. 58377
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 340

fr/paris/lutece/plugins/dansmarue/modules/rest/service/ManageSignalementService.java

Rule Violation Line
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 34503
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 113
UnusedPrivateField Avoid unused private fields such as '_taskService'. 143
UnusedPrivateField Avoid unused private fields such as '_authenticator'. 148
UnusedPrivateField Avoid unused private fields such as '_observationRejetSignalementService'. 153
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 182183
SimpleDateFormatNeedsLocale When instantiating a SimpleDateFormat object, specify a Locale 215
NcssCount The method 'manageStatusWithWorkflow(HttpServletRequest, JSONObject, JSONObject, int, String, String, String, String, String, long, String, String)' has a NCSS line count of 97. 257478
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 257258
ExcessiveMethodLength Avoid really long methods. 257478
ShortVariable Avoid variables with short names like id 257
CyclomaticComplexity The method 'manageStatusWithWorkflow(HttpServletRequest, JSONObject, JSONObject, int, String, String, String, String, String, long, String, String)' has a cyclomatic complexity of 28. 257478
ExcessiveParameterList Avoid long parameter lists. 257258
UnusedLocalVariable Avoid unused local variables such as 'signalement'. 389
ConfusingTernary Avoid if (x != y) ..; else ..; 423435

fr/paris/lutece/plugins/dansmarue/modules/rest/service/RamenClientService.java

Rule Violation Line
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 66
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 68
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 69
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 70
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 72
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 74
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 75
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 76
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 78
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 80
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 81
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 123
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 124

fr/paris/lutece/plugins/dansmarue/modules/rest/service/SignRequestService.java

Rule Violation Line
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 77
ShortVariable Avoid variables with short names like sb 108

fr/paris/lutece/plugins/dansmarue/modules/rest/service/SignalementRestService.java

Rule Violation Line
ExcessivePublicCount This class has a bunch of public methods and attributes 343307
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 343307
ExcessiveClassLength Avoid really long classes. 1473307
CyclomaticComplexity The class 'SignalementRestService' has a total cyclomatic complexity of 179 (highest 21). 1473307
GodClass Possible God Class (WMC=179, ATFD=558, TCC=21.123%) 1473307
TooManyFields Too many fields 1473307
TooManyMethods This class has too many methods, consider refactoring it. 1483307
SingularField Perhaps '_addressSuggestPOIService' could be replaced by a local variable. 212
SingularField Perhaps '_actualiteService' could be replaced by a local variable. 220
SingularField Perhaps '_aideService' could be replaced by a local variable. 224
UnusedPrivateField Avoid unused private fields such as '_signalementExportService'. 232
NcssCount The method 'processResquestAnswer(String, HttpServletRequest)' has a NCSS line count of 87. 261410
ExcessiveMethodLength Avoid really long methods. 261410
CyclomaticComplexity The method 'processResquestAnswer(String, HttpServletRequest)' has a cyclomatic complexity of 23. 261410
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 533
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 582
CyclomaticComplexity The method 'getIncidentsById(JSONObject)' has a cyclomatic complexity of 11. 629725
NPathComplexity The method 'getIncidentsById(JSONObject)' has an NPath complexity of 384 629725
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 681
ConfusingTernary Avoid if (x != y) ..; else ..; 706714
UseLocaleWithCaseConversions When doing a String.toLowerCase()/toUpperCase() call, use a Locale 709
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 748
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 751753
CyclomaticComplexity The method 'parseSignalement(JSONObject, Signalement, Signaleur, Adresse)' has a cyclomatic complexity of 21. 801986
NPathComplexity The method 'parseSignalement(JSONObject, Signalement, Signaleur, Adresse)' has an NPath complexity of 2304 801986
NcssCount The method 'parseSignalement(JSONObject, Signalement, Signaleur, Adresse)' has a NCSS line count of 106. 801986
ExcessiveMethodLength Avoid really long methods. 801986
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 811
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 822
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 836
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 837
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 838
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 839
SimpleDateFormatNeedsLocale When instantiating a SimpleDateFormat object, specify a Locale 935
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 960
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 967
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 1029
NPathComplexity The method 'changeStatus(JSONObject, HttpServletRequest)' has an NPath complexity of 1188 12951460
ExcessiveMethodLength Avoid really long methods. 12951460
NcssCount The method 'changeStatus(JSONObject, HttpServletRequest)' has a NCSS line count of 80. 12951460
CyclomaticComplexity The method 'changeStatus(JSONObject, HttpServletRequest)' has a cyclomatic complexity of 20. 12951460
ConfusingTernary Avoid if (x != y) ..; else ..; 13011458
ConfusingTernary Avoid if (x != y) ..; else ..; 13081458
ShortVariable Avoid variables with short names like id 1320
ConfusingTernary Avoid if (x != y) ..; else ..; 13551448
ConfusingTernary Avoid if (x != y) ..; else ..; 13811383
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 1401
SimpleDateFormatNeedsLocale When instantiating a SimpleDateFormat object, specify a Locale 1429
CyclomaticComplexity The method 'controleCoherenceStatus(JSONObject, JSONObject, JSONObject, HttpServletRequest, Signalement)' has a cyclomatic complexity of 16. 15261606
ShortVariable Avoid variables with short names like id 1618
ConfusingTernary Avoid if (x != y) ..; else ..; 16501668
ConfusingTernary Avoid if (x != y) ..; else ..; 16521662
InsufficientStringBufferDeclaration StringBuffer constructor is initialized with size 16, but has at least 128 characters appended. 1683
CommentRequired Public method and constructor comments are required 17541773
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 1788
ConfusingTernary Avoid if (x != y) ..; else ..; 18611868
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 1913
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 1915
ShortVariable Avoid variables with short names like ts 1988
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 1990
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 1990
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 1991
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 1992
ConfusingTernary Avoid if (x != y) ..; else ..; 19972011
ShortVariable Avoid variables with short names like ts 2025
InsufficientStringBufferDeclaration StringBuffer constructor is initialized with size 16, but has at least 123 characters appended. 2028
ShortVariable Avoid variables with short names like sb 2028
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 2031
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 2033
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 2033
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 2034
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 2034
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 2035
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 2035
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 2036
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 2036
ConfusingTernary Avoid if (x != y) ..; else ..; 2037
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 2052
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 2055
SimpleDateFormatNeedsLocale When instantiating a SimpleDateFormat object, specify a Locale 2124
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 2140
ShortVariable Avoid variables with short names like e 2178
ExcessiveMethodLength Avoid really long methods. 23262486
CyclomaticComplexity The method 'setIncidentResolved(JSONObject, HttpServletRequest)' has a cyclomatic complexity of 21. 23262486
LinguisticNaming Linguistics Antipattern - The setter 'setIncidentResolved' should not return any type except void linguistically 23262486
NcssCount The method 'setIncidentResolved(JSONObject, HttpServletRequest)' has a NCSS line count of 82. 23262486
NPathComplexity The method 'setIncidentResolved(JSONObject, HttpServletRequest)' has an NPath complexity of 51840 23262486
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 2347
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 2357
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 2367
UseLocaleWithCaseConversions When doing a String.toLowerCase()/toUpperCase() call, use a Locale 2407
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 2421
ConfusingTernary Avoid if (x != y) ..; else ..; 2510
CyclomaticComplexity The method 'addFollower(JSONObject)' has a cyclomatic complexity of 11. 25202609
NPathComplexity The method 'addFollower(JSONObject)' has an NPath complexity of 384 25202609
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 2577
CyclomaticComplexity The method 'processWorkflow(JSONObject)' has a cyclomatic complexity of 10. 27192819
ExcessiveMethodLength Avoid really long methods. 27192819
ConfusingTernary Avoid if (x != y) ..; else ..; 27462772
LinguisticNaming Linguistics Antipattern - The getter 'getAllSousTypeSignalementCascade' should not return void linguistically 28562859
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 3033
UseLocaleWithCaseConversions When doing a String.toLowerCase()/toUpperCase() call, use a Locale 3115
UseLocaleWithCaseConversions When doing a String.toLowerCase()/toUpperCase() call, use a Locale 3289

fr/paris/lutece/plugins/dansmarue/modules/rest/service/SiraRequestService.java

Rule Violation Line
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 77
ShortVariable Avoid variables with short names like sb 108

fr/paris/lutece/plugins/dansmarue/modules/rest/service/formatters/CategoriesFormatterJson.java

Rule Violation Line
ImmutableField Private field '_typeSignalementService' could be made final; it is only initialized in the declaration or constructor. 57

fr/paris/lutece/plugins/dansmarue/modules/rest/service/formatters/SignalementFormatterJson.java

Rule Violation Line
RedundantFieldInitializer Avoid using redundant field initializer for '_formatWithGuid' 72
NPathComplexity The method 'formatSignalement(Signalement)' has an NPath complexity of 3187 133293
NcssCount The method 'formatSignalement(Signalement)' has a NCSS line count of 89. 133293
CyclomaticComplexity The method 'formatSignalement(Signalement)' has a cyclomatic complexity of 32. 133293
ExcessiveMethodLength Avoid really long methods. 133293

fr/paris/lutece/plugins/dansmarue/modules/rest/service/upload/handler/AbstractUploadHandler.java

Rule Violation Line
FieldDeclarationsShouldBeAtStartOfClass Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 92
ProperLogger Logger should be defined private static final and have the correct class 95
FieldDeclarationsShouldBeAtStartOfClass Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 95
FieldDeclarationsShouldBeAtStartOfClass Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 98
FieldDeclarationsShouldBeAtStartOfClass Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 101
FieldDeclarationsShouldBeAtStartOfClass Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 104
FieldDeclarationsShouldBeAtStartOfClass Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 107
UnnecessaryConstructor Avoid unnecessary constructors - the compiler will generate these for you 112114
CallSuperInConstructor It is a good practice to call super() in a constructor 112114
UncommentedEmptyConstructor Document empty constructor 112114
UseLocaleWithCaseConversions When doing a String.toLowerCase()/toUpperCase() call, use a Locale 169
ShortVariable Avoid variables with short names like id 282
DefaultPackage Use explicit scoping instead of the default package private level 372
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getMapAsynchronousUpload method if you want a default access modifier 372

fr/paris/lutece/plugins/dansmarue/modules/rest/service/upload/handler/DansMaRueUploadHandler.java

Rule Violation Line
ConfusingTernary Avoid if (x != y) ..; else ..; 66
DefaultPackage Use explicit scoping instead of the default package private level 8185
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getMapAsynchronousUpload method if you want a default access modifier 8285

fr/paris/lutece/plugins/dansmarue/modules/rest/util/StringUtilsDmr.java

Rule Violation Line
CommentRequired Header comments are required 527
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. 627
CommentRequired Public method and constructor comments are required 726
ConfusingTernary Avoid if (x != y) ..; else ..; 925
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 1118

fr/paris/lutece/plugins/dansmarue/modules/rest/util/date/DateUtils.java

Rule Violation Line
SimpleDateFormatNeedsLocale When instantiating a SimpleDateFormat object, specify a Locale 75
SimpleDateFormatNeedsLocale When instantiating a SimpleDateFormat object, specify a Locale 76
SimpleDateFormatNeedsLocale When instantiating a SimpleDateFormat object, specify a Locale 101

fr/paris/lutece/plugins/dansmarue/modules/rest/util/exception/ParseSignalementFromJSONException.java

Rule Violation Line
CallSuperInConstructor It is a good practice to call super() in a constructor 5457

fr/paris/lutece/plugins/dansmarue/modules/rest/xpage/signalement/ManageSignalementApp.java

Rule Violation Line
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 34474
ImmutableField Private field '_signalementService' could be made final; it is only initialized in the declaration or constructor. 172
ImmutableField Private field '_observationRejetService' could be made final; it is only initialized in the declaration or constructor. 175
ImmutableField Private field '_manageSignalementService' could be made final; it is only initialized in the declaration or constructor. 178
ImmutableField Private field '_typeSignalementService' could be made final; it is only initialized in the declaration or constructor. 181
ImmutableField Private field '_signalementWorkflowService' could be made final; it is only initialized in the declaration or constructor. 184
ImmutableField Private field '_dansmarueUploadHandler' could be made final; it is only initialized in the declaration or constructor. 187
UnusedPrivateField Avoid unused private fields such as '_taskService'. 191
UnusedPrivateField Avoid unused private fields such as '_actionService'. 195
UnusedPrivateField Avoid unused private fields such as '_stateService'. 199
ImmutableField Private field '_listUtils' could be made final; it is only initialized in the declaration or constructor. 203
CyclomaticComplexity The method 'getPage(HttpServletRequest, int, Plugin)' has a cyclomatic complexity of 14. 210326
ExcessiveMethodLength Avoid really long methods. 210326
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 213
ConfusingTernary Avoid if (x != y) ..; else ..; 245300
CyclomaticComplexity The method 'validateForm(HttpServletRequest)' has a cyclomatic complexity of 19. 335402
LinguisticNaming Linguistics Antipattern - The variable 'hasEmailSignaleur' indicates linguistically it is a boolean, but it is 'String' 349
ShortVariable Avoid variables with short names like id 452
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 456

Priority 4

fr/paris/lutece/plugins/dansmarue/modules/rest/util/StringUtilsDmr.java

Rule Violation Line
UseVarargs Consider using varargs for methods or constructors which take an array the last parameter. 7

fr/paris/lutece/plugins/dansmarue/modules/rest/xpage/signalement/ManageSignalementApp.java

Rule Violation Line
UnusedImports Avoid unused imports such as 'javax.inject.Named' 42
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.dansmarue.utils.impl.ListUtils' 61

Files

fr/paris/lutece/plugins/dansmarue/modules/rest/dto/SignalementRestDTO.java

Rule Violation Priority Line
DataClass The class 'SignalementRestDTO' is suspected to be a Data Class (WOC=0.000%, NOPA=0, NOAM=4, WMC=4) 3 4191

fr/paris/lutece/plugins/dansmarue/modules/rest/pojo/ErrorSignalement.java

Rule Violation Priority Line
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the _nErrorCode field if you want a default access modifier 3 43
DefaultPackage Use explicit scoping instead of the default package private level 3 43
DefaultPackage Use explicit scoping instead of the default package private level 3 46
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the _strErrorMessage field if you want a default access modifier 3 46

fr/paris/lutece/plugins/dansmarue/modules/rest/pojo/ErrorSira.java

Rule Violation Priority Line
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the _nErrorCode field if you want a default access modifier 3 43
DefaultPackage Use explicit scoping instead of the default package private level 3 43
DefaultPackage Use explicit scoping instead of the default package private level 3 46
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the _strErrorMessage field if you want a default access modifier 3 46

fr/paris/lutece/plugins/dansmarue/modules/rest/pojo/SignalementPOJO.java

Rule Violation Priority Line
ShortVariable Avoid variables with short names like id 3 61

fr/paris/lutece/plugins/dansmarue/modules/rest/rs/SignalementRest.java

Rule Violation Priority Line
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 3 341576
ExcessiveClassLength Avoid really long classes. 3 1001576
TooManyMethods This class has too many methods, consider refactoring it. 3 1011576
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 157
ShortVariable Avoid variables with short names like t 3 160
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 198
ExcessiveParameterList Avoid long parameter lists. 3 303313
ShortVariable Avoid variables with short names like id 3 303
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 3 303
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 3 303313
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 3 304
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 3 305
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 3 306
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 3 307
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 3 308
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 3 309
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 3 310
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 3 311
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 3 312
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 3 313
ExcessiveParameterList Avoid long parameter lists. 3 358359
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 3 358359
ShortVariable Avoid variables with short names like id 3 358
AvoidDuplicateLiterals The String literal ";charset=utf-8" appears 31 times in this file; the first occurrence is on line 441 3 441
LinguisticNaming Linguistics Antipattern - The method 'isSignalementFollowableAndisSignalementFollowedByUser' indicates linguistically it returns a boolean, but it returns 'String' 3 692709
LinguisticNaming Linguistics Antipattern - The method 'isDmrOnline' indicates linguistically it returns a boolean, but it returns 'String' 3 965977
ShortVariable Avoid variables with short names like id 3 1391
CommentRequired Public method and constructor comments are required 3 14831486
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 1556

fr/paris/lutece/plugins/dansmarue/modules/rest/service/ISignalementRestService.java

Rule Violation Priority Line
TooManyMethods This class has too many methods, consider refactoring it. 3 58377
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 3 340

fr/paris/lutece/plugins/dansmarue/modules/rest/service/ManageSignalementService.java

Rule Violation Priority Line
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 3 34503
FieldNamingConventions The constant name 'actionStatus' doesn't match '[A-Z][A-Z_0-9]*' 1 113
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 113
UnusedPrivateField Avoid unused private fields such as '_taskService'. 3 143
UnusedPrivateField Avoid unused private fields such as '_authenticator'. 3 148
UnusedPrivateField Avoid unused private fields such as '_observationRejetSignalementService'. 3 153
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 3 182183
SimpleDateFormatNeedsLocale When instantiating a SimpleDateFormat object, specify a Locale 3 215
NcssCount The method 'manageStatusWithWorkflow(HttpServletRequest, JSONObject, JSONObject, int, String, String, String, String, String, long, String, String)' has a NCSS line count of 97. 3 257478
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 3 257258
ExcessiveMethodLength Avoid really long methods. 3 257478
ShortVariable Avoid variables with short names like id 3 257
CyclomaticComplexity The method 'manageStatusWithWorkflow(HttpServletRequest, JSONObject, JSONObject, int, String, String, String, String, String, long, String, String)' has a cyclomatic complexity of 28. 3 257478
ExcessiveParameterList Avoid long parameter lists. 3 257258
UnusedLocalVariable Avoid unused local variables such as 'signalement'. 3 389
ConfusingTernary Avoid if (x != y) ..; else ..; 3 423435

fr/paris/lutece/plugins/dansmarue/modules/rest/service/RamenClientService.java

Rule Violation Priority Line
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 66
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 68
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 69
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 70
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 72
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 74
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 75
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 76
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 78
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 80
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 81
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 123
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 124

fr/paris/lutece/plugins/dansmarue/modules/rest/service/SignRequestService.java

Rule Violation Priority Line
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 77
ShortVariable Avoid variables with short names like sb 3 108

fr/paris/lutece/plugins/dansmarue/modules/rest/service/SignalementRestService.java

Rule Violation Priority Line
ExcessivePublicCount This class has a bunch of public methods and attributes 3 343307
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 3 343307
ExcessiveClassLength Avoid really long classes. 3 1473307
CyclomaticComplexity The class 'SignalementRestService' has a total cyclomatic complexity of 179 (highest 21). 3 1473307
GodClass Possible God Class (WMC=179, ATFD=558, TCC=21.123%) 3 1473307
TooManyFields Too many fields 3 1473307
TooManyMethods This class has too many methods, consider refactoring it. 3 1483307
SingularField Perhaps '_addressSuggestPOIService' could be replaced by a local variable. 3 212
SingularField Perhaps '_actualiteService' could be replaced by a local variable. 3 220
SingularField Perhaps '_aideService' could be replaced by a local variable. 3 224
UnusedPrivateField Avoid unused private fields such as '_signalementExportService'. 3 232
NcssCount The method 'processResquestAnswer(String, HttpServletRequest)' has a NCSS line count of 87. 3 261410
ExcessiveMethodLength Avoid really long methods. 3 261410
CyclomaticComplexity The method 'processResquestAnswer(String, HttpServletRequest)' has a cyclomatic complexity of 23. 3 261410
GuardLogStatement Logger calls should be surrounded by log level guards. 2 270
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 533
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 582
CyclomaticComplexity The method 'getIncidentsById(JSONObject)' has a cyclomatic complexity of 11. 3 629725
NPathComplexity The method 'getIncidentsById(JSONObject)' has an NPath complexity of 384 3 629725
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 681
ConfusingTernary Avoid if (x != y) ..; else ..; 3 706714
UseLocaleWithCaseConversions When doing a String.toLowerCase()/toUpperCase() call, use a Locale 3 709
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 748
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 751753
CyclomaticComplexity The method 'parseSignalement(JSONObject, Signalement, Signaleur, Adresse)' has a cyclomatic complexity of 21. 3 801986
NPathComplexity The method 'parseSignalement(JSONObject, Signalement, Signaleur, Adresse)' has an NPath complexity of 2304 3 801986
NcssCount The method 'parseSignalement(JSONObject, Signalement, Signaleur, Adresse)' has a NCSS line count of 106. 3 801986
ExcessiveMethodLength Avoid really long methods. 3 801986
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 811
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 822
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 836
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 837
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 838
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 839
SimpleDateFormatNeedsLocale When instantiating a SimpleDateFormat object, specify a Locale 3 935
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 960
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 3 967
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 1029
NPathComplexity The method 'changeStatus(JSONObject, HttpServletRequest)' has an NPath complexity of 1188 3 12951460
ExcessiveMethodLength Avoid really long methods. 3 12951460
NcssCount The method 'changeStatus(JSONObject, HttpServletRequest)' has a NCSS line count of 80. 3 12951460
CyclomaticComplexity The method 'changeStatus(JSONObject, HttpServletRequest)' has a cyclomatic complexity of 20. 3 12951460
ConfusingTernary Avoid if (x != y) ..; else ..; 3 13011458
ConfusingTernary Avoid if (x != y) ..; else ..; 3 13081458
ShortVariable Avoid variables with short names like id 3 1320
ConfusingTernary Avoid if (x != y) ..; else ..; 3 13551448
ConfusingTernary Avoid if (x != y) ..; else ..; 3 13811383
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 1401
SimpleDateFormatNeedsLocale When instantiating a SimpleDateFormat object, specify a Locale 3 1429
CyclomaticComplexity The method 'controleCoherenceStatus(JSONObject, JSONObject, JSONObject, HttpServletRequest, Signalement)' has a cyclomatic complexity of 16. 3 15261606
ShortVariable Avoid variables with short names like id 3 1618
ConfusingTernary Avoid if (x != y) ..; else ..; 3 16501668
ConfusingTernary Avoid if (x != y) ..; else ..; 3 16521662
InsufficientStringBufferDeclaration StringBuffer constructor is initialized with size 16, but has at least 128 characters appended. 3 1683
CommentRequired Public method and constructor comments are required 3 17541773
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 1788
ConfusingTernary Avoid if (x != y) ..; else ..; 3 18611868
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 3 1913
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 3 1915
ShortVariable Avoid variables with short names like ts 3 1988
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 3 1990
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 1990
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 1991
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 1992
ConfusingTernary Avoid if (x != y) ..; else ..; 3 19972011
ShortVariable Avoid variables with short names like ts 3 2025
InsufficientStringBufferDeclaration StringBuffer constructor is initialized with size 16, but has at least 123 characters appended. 3 2028
ShortVariable Avoid variables with short names like sb 3 2028
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 2031
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 3 2033
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 2033
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 2034
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 3 2034
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 2035
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 3 2035
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 3 2036
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 2036
ConfusingTernary Avoid if (x != y) ..; else ..; 3 2037
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 2052
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 2055
SimpleDateFormatNeedsLocale When instantiating a SimpleDateFormat object, specify a Locale 3 2124
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 2140
ShortVariable Avoid variables with short names like e 3 2178
ExcessiveMethodLength Avoid really long methods. 3 23262486
CyclomaticComplexity The method 'setIncidentResolved(JSONObject, HttpServletRequest)' has a cyclomatic complexity of 21. 3 23262486
LinguisticNaming Linguistics Antipattern - The setter 'setIncidentResolved' should not return any type except void linguistically 3 23262486
NcssCount The method 'setIncidentResolved(JSONObject, HttpServletRequest)' has a NCSS line count of 82. 3 23262486
NPathComplexity The method 'setIncidentResolved(JSONObject, HttpServletRequest)' has an NPath complexity of 51840 3 23262486
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 2347
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 2357
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 2367
UseLocaleWithCaseConversions When doing a String.toLowerCase()/toUpperCase() call, use a Locale 3 2407
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 2421
GuardLogStatement Logger calls should be surrounded by log level guards. 2 2454
GuardLogStatement Logger calls should be surrounded by log level guards. 2 2465
ConfusingTernary Avoid if (x != y) ..; else ..; 3 2510
CyclomaticComplexity The method 'addFollower(JSONObject)' has a cyclomatic complexity of 11. 3 25202609
NPathComplexity The method 'addFollower(JSONObject)' has an NPath complexity of 384 3 25202609
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 2577
CyclomaticComplexity The method 'processWorkflow(JSONObject)' has a cyclomatic complexity of 10. 3 27192819
ExcessiveMethodLength Avoid really long methods. 3 27192819
ConfusingTernary Avoid if (x != y) ..; else ..; 3 27462772
LinguisticNaming Linguistics Antipattern - The getter 'getAllSousTypeSignalementCascade' should not return void linguistically 3 28562859
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 3 3033
UseLocaleWithCaseConversions When doing a String.toLowerCase()/toUpperCase() call, use a Locale 3 3115
UseLocaleWithCaseConversions When doing a String.toLowerCase()/toUpperCase() call, use a Locale 3 3289

fr/paris/lutece/plugins/dansmarue/modules/rest/service/SiraRequestService.java

Rule Violation Priority Line
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 77
ShortVariable Avoid variables with short names like sb 3 108

fr/paris/lutece/plugins/dansmarue/modules/rest/service/formatters/CategoriesFormatterJson.java

Rule Violation Priority Line
ImmutableField Private field '_typeSignalementService' could be made final; it is only initialized in the declaration or constructor. 3 57

fr/paris/lutece/plugins/dansmarue/modules/rest/service/formatters/SignalementFormatterJson.java

Rule Violation Priority Line
RedundantFieldInitializer Avoid using redundant field initializer for '_formatWithGuid' 3 72
NPathComplexity The method 'formatSignalement(Signalement)' has an NPath complexity of 3187 3 133293
NcssCount The method 'formatSignalement(Signalement)' has a NCSS line count of 89. 3 133293
CyclomaticComplexity The method 'formatSignalement(Signalement)' has a cyclomatic complexity of 32. 3 133293
ExcessiveMethodLength Avoid really long methods. 3 133293

fr/paris/lutece/plugins/dansmarue/modules/rest/service/upload/handler/AbstractUploadHandler.java

Rule Violation Priority Line
FieldDeclarationsShouldBeAtStartOfClass Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 3 92
ProperLogger Logger should be defined private static final and have the correct class 3 95
FieldDeclarationsShouldBeAtStartOfClass Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 3 95
FieldDeclarationsShouldBeAtStartOfClass Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 3 98
FieldDeclarationsShouldBeAtStartOfClass Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 3 101
FieldDeclarationsShouldBeAtStartOfClass Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 3 104
FieldDeclarationsShouldBeAtStartOfClass Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 3 107
UnnecessaryConstructor Avoid unnecessary constructors - the compiler will generate these for you 3 112114
CallSuperInConstructor It is a good practice to call super() in a constructor 3 112114
UncommentedEmptyConstructor Document empty constructor 3 112114
UseLocaleWithCaseConversions When doing a String.toLowerCase()/toUpperCase() call, use a Locale 3 169
ShortVariable Avoid variables with short names like id 3 282
DefaultPackage Use explicit scoping instead of the default package private level 3 372
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getMapAsynchronousUpload method if you want a default access modifier 3 372

fr/paris/lutece/plugins/dansmarue/modules/rest/service/upload/handler/DansMaRueUploadHandler.java

Rule Violation Priority Line
ConfusingTernary Avoid if (x != y) ..; else ..; 3 66
DefaultPackage Use explicit scoping instead of the default package private level 3 8185
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getMapAsynchronousUpload method if you want a default access modifier 3 8285

fr/paris/lutece/plugins/dansmarue/modules/rest/util/StringUtilsDmr.java

Rule Violation Priority Line
ClassNamingConventions The utility class name 'StringUtilsDmr' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' 1 527
CommentRequired Header comments are required 3 527
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 627
CommentRequired Public method and constructor comments are required 3 726
UseVarargs Consider using varargs for methods or constructors which take an array the last parameter. 4 7
ConfusingTernary Avoid if (x != y) ..; else ..; 3 925
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 3 1118

fr/paris/lutece/plugins/dansmarue/modules/rest/util/constants/SignalementRestConstants.java

Rule Violation Priority Line
ClassNamingConventions The utility class name 'SignalementRestConstants' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' 1 45977

fr/paris/lutece/plugins/dansmarue/modules/rest/util/constants/SiraRestConstants.java

Rule Violation Priority Line
ClassNamingConventions The utility class name 'SiraRestConstants' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' 1 39425
ClassWithOnlyPrivateConstructorsShouldBeFinal A class which only has private constructors should be final 1 39425

fr/paris/lutece/plugins/dansmarue/modules/rest/util/date/DateUtils.java

Rule Violation Priority Line
SimpleDateFormatNeedsLocale When instantiating a SimpleDateFormat object, specify a Locale 3 75
SimpleDateFormatNeedsLocale When instantiating a SimpleDateFormat object, specify a Locale 3 76
SimpleDateFormatNeedsLocale When instantiating a SimpleDateFormat object, specify a Locale 3 101

fr/paris/lutece/plugins/dansmarue/modules/rest/util/exception/ParseSignalementFromJSONException.java

Rule Violation Priority Line
CallSuperInConstructor It is a good practice to call super() in a constructor 3 5457
ConstructorCallsOverridableMethod Overridable method 'setParseError' called during object construction 1 56

fr/paris/lutece/plugins/dansmarue/modules/rest/xpage/signalement/ManageSignalementApp.java

Rule Violation Priority Line
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 3 34474
UnusedImports Avoid unused imports such as 'javax.inject.Named' 4 42
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.dansmarue.utils.impl.ListUtils' 4 61
ImmutableField Private field '_signalementService' could be made final; it is only initialized in the declaration or constructor. 3 172
ImmutableField Private field '_observationRejetService' could be made final; it is only initialized in the declaration or constructor. 3 175
ImmutableField Private field '_manageSignalementService' could be made final; it is only initialized in the declaration or constructor. 3 178
ImmutableField Private field '_typeSignalementService' could be made final; it is only initialized in the declaration or constructor. 3 181
ImmutableField Private field '_signalementWorkflowService' could be made final; it is only initialized in the declaration or constructor. 3 184
ImmutableField Private field '_dansmarueUploadHandler' could be made final; it is only initialized in the declaration or constructor. 3 187
UnusedPrivateField Avoid unused private fields such as '_taskService'. 3 191
UnusedPrivateField Avoid unused private fields such as '_actionService'. 3 195
UnusedPrivateField Avoid unused private fields such as '_stateService'. 3 199
ImmutableField Private field '_listUtils' could be made final; it is only initialized in the declaration or constructor. 3 203
CyclomaticComplexity The method 'getPage(HttpServletRequest, int, Plugin)' has a cyclomatic complexity of 14. 3 210326
ExcessiveMethodLength Avoid really long methods. 3 210326
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 213
ConfusingTernary Avoid if (x != y) ..; else ..; 3 245300
CyclomaticComplexity The method 'validateForm(HttpServletRequest)' has a cyclomatic complexity of 19. 3 335402
LinguisticNaming Linguistics Antipattern - The variable 'hasEmailSignaleur' indicates linguistically it is a boolean, but it is 'String' 3 349
ShortVariable Avoid variables with short names like id 3 452
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 456