Team Ai
Datasetpublic

razat-ag/embold_hf_java

sourceHugging Faceapache-2.0updated 3y agoView on Hugging Face
0likes3downloads
embold_hf.csv960 linesDownload Raw Back to root
1text2<s>[INST] Log Level Info In Catch Block [/INST] Logger level 'error' is expected in catch block.</s>3<s>[INST] Sensitive Info Logged [/INST] Avoid logging of application sensitive data.</s>4<s>[INST] Invalid Logging ClassName [/INST] Avoid incorrect class names while create logger</s>5<s>[INST] Non-ThreadSafe Field Declaration [/INST] Field declared in spring component may not be thread safe.</s>6<s>[INST] Read-Only Transaction [/INST] Readonly transactions is recommended for select queries</s>7<s>[INST] String Concatenation In Logging [/INST] Use of string concatination in logging</s>8<s>[INST] Tightly Coupled Class [/INST] Autowire interface instead of its implementation</s>9<s>[INST] Unusual REST Practice [/INST] REST standards should be followed</s>10<s>[INST] Preserve StackTrace In Logs [/INST] Preserve stack trace in logs</s>11"<s>[INST] Use Of Sysout [/INST] Use of System.out.println, use logger instead</s>"12"<s>[INST] Use Of Syserr [/INST] Use of System.err.println, use logger instead</s>"13<s>[INST] Disabled Spring Securitys CSRF [/INST] Do not disable spring security's CSRF</s>14"<s>[INST] Security Sensitive REGEX [/INST] Regex pattern coming as input (method parameter, web request attribute, etc.)</s>"15<s>[INST] Empty Catch Block [/INST] Catch block should not keep empty.</s>16<s>[INST] Resource Leak [/INST] Close the resources in finally block</s>17"<s>[INST] Compile REGEX Once [/INST] Regex pattern not a member, so compiled at every invocation</s>"18<s>[INST] Initialization Of SecureRandom At Method Level [/INST] Secure Random should not initialize in method</s>19<s>[INST] Possible ThreadLeak In ExecutorService [/INST] Shutdown the ExecutorService</s>20<s>[INST] Complex REGEX Pattern [/INST] Regex pattern should not be a complex</s>21<s>[INST] Weak Cipher Algorithm [/INST] Use a stronger cipher algorithm</s>22<s>[INST] Sleep In Synchronized Block [/INST] Avoid using Thread.sleep() in a synchronized block or method</s>23<s>[INST] Return Empty Array Or Collection Instead Of Null [/INST] Return an empty array or collection instead of a null value for methods that return an array or collection</s>24<s>[INST] Non-Private Field Access In Synchronized Block [/INST] Non-private field accessed in synchronized block indicates possibly partial synchronization</s>25<s>[INST] Databases Should Be Password Protected [/INST] Use password while creating database connection.</s>26<s>[INST] Potential Command Injection [/INST] Potential Command Injection</s>27<s>[INST] Authenticate LDAP Connection [/INST] LDAP connections should be authenticated</s>28"<s>[INST] Web Application Contains Main Method [/INST] Web applications should not have a ""main"" method</s>"29<s>[INST] Should Not Use getRequestedSessionId API [/INST] HttpServletRequest.getRequestedSessionId() should not be used</s>30<s>[INST] Potential Path Traversal [/INST] Potential Path Traversal</s>31<s>[INST] Accessing Android External Storage [/INST] Accessing Android external storage is security-sensitive</s>32<s>[INST] Unsafe Jackson Deserialization [/INST] Using unsafe Jackson deserialization configuration is security-sensitive</s>33<s>[INST] Setting Java Bean Properties [/INST] Setting JavaBean properties is security-sensitive</s>34<s>[INST] Variables Should Not Be Self Assigned [/INST] Re-assignment of a variable to itself is redundant or mistake</s>35<s>[INST] Externalizable Must Have No Arguments Constructor [/INST] Externalizable Must Have No-arguments Constructor </s>36<s>[INST] RunFinalizersOnExit Should Not Be Called [/INST] RunFinalizersOnExit Should Not Be Called </s>37<s>[INST] Run Should Not Be Called Directly [/INST] Do not call run() method directly as it won't create a new thread and it will be in same stack as main.</s>38<s>[INST] Mismatch Regex Boundaries Should Not Be Used [/INST] Mismatch regex boundaries should not be used</s>39<s>[INST] Empty String Should Not Be Used [/INST] Empty string should not be used</s>40<s>[INST] Exceptions Should Not Be Thrown In Finally Block [/INST] Exceptions should not be thrown in finally block</s>41<s>[INST] Shortcircuit Logic Should Be Used In Boolean Contexts [/INST] Shortcircuit logic should be used in boolean contexts</s>42<s>[INST] Getters And Setters Should Access The Expected Fields [/INST] Getters and setters should access the expected fields</s>43<s>[INST] Exclude SpringBootApplication And ComponentScan From The Default Package [/INST] Exclude SpringBootApplication And ComponentScan From The Default Package</s>44<s>[INST] Main Should Not Throw Anything [/INST] Main should not throw anything</s>45<s>[INST] Maps With Enum Values Replace With EnumMap [/INST] Maps With Enum Values Replace With EnumMap</s>46<s>[INST] Avoid Concatenating Char As String [/INST] Avoid Concatenating Char As String</s>47<s>[INST] Avoid Synchronized At Method Level [/INST] Avoid Synchronized At Method Level</s>48<s>[INST] Big Integer Instantiation [/INST] Big Integer Instantiation</s>49<s>[INST] Avoid Catching NPE [/INST] Avoid catching NPE</s>50<s>[INST] Avoid FilecreateTempFile [/INST] Avoid FilecreateTempFile</s>51<s>[INST] Avoid Non Case Labels In Switch Statement [/INST] Avoid non case labels in switch statement</s>52<s>[INST] Clone Without Super [/INST] Clone Without Super</s>53<s>[INST] Unencrypted Socket [/INST] Unencrypted Socket</s>54<s>[INST] Weak SSLContext [/INST] Weak SSLContext</s>55<s>[INST] Improper Validation Of ArrayIndex [/INST] Improper Validation Of ArrayIndex</s>56<s>[INST] Missing Throw In Catch Block [/INST] Missing Throw In Catch Block</s>57<s>[INST] Finalize Without Super [/INST] Finalize Without Super</s>58<s>[INST] Unencrypted Server Socket [/INST] The communication channel used is not encrypted</s>59<s>[INST] Avoid NullCipher [/INST] NullCipher is insecure.</s>60<s>[INST] Non Serializable In Session [/INST] Non Serializable In Session</s>61<s>[INST] Public Static Field Should Be Final [/INST] Field which declared public static should be final</s>62<s>[INST] Empty Synchronized Block [/INST] A troubling part of code may indicate via an empty synchronization block.</s>63<s>[INST] Missing Break Statement In Switch [/INST] Avoid omitting break statement in switch</s>64<s>[INST] Explicit Call To Finalize [/INST] Do not make an explicit call to finalize</s>65<s>[INST] Redirect Without Exit [/INST] Redirect without exit</s>66<s>[INST] Missing Required Cryptographic Step [/INST] Missing required cryptographic step</s>67<s>[INST] Do Not Call System Exit [/INST] Do Not Call System Exit</s>68<s>[INST] Sensitive Data In Serializable Class [/INST] Sensitive Data In Serializable Class can be access by other classes through serialization</s>69<s>[INST] Direct Object Reference [/INST] Direct Object Reference</s>70<s>[INST] Avoid Throwing Generic Exception [/INST] Avoid Throwing Generic Exception</s>71<s>[INST] Error Message Containing Sensitive Data [/INST] Do not use sensitive data in error message</s>72<s>[INST] Return In Finally Block [/INST] Return statement should not used in finally block</s>73<s>[INST] Static Final Array Should Be Private [/INST] An array that declares a final static should not be declared public as malicious code can alter that.</s>74<s>[INST] Avoid Catching Generic Exception [/INST] Avoid Catching Generic Exception</s>75<s>[INST] Public Cloneable Method Without Final [/INST] Public cloneable method should be final</s>76<s>[INST] Missing Default Case In Switch [/INST] Avoid omitting default case in switch</s>77<s>[INST] High Time Complexity Method [/INST] High Time Complexity Method</s>78<s>[INST] Cipher With No Integrity [/INST] Cipher with no integrity</s>79<s>[INST] Finalize Method Declare Public [/INST] Finalize method declare public</s>80<s>[INST] Avoid Using Predictable Random Values [/INST] Avoid Using Predictable Random Values</s>81<s>[INST] Avoid Using RSA Algorithm Without OAEP [/INST] Avoid Using RSA Algorithm Without OAEP</s>82<s>[INST] CNT_ROUGH_CONSTANT_VALUE [/INST] Rough value of known constant found</s>83<s>[INST] NP_BOOLEAN_RETURN_NULL [/INST] Method with Boolean return type returns explicit null</s>84<s>[INST] SW_SWING_METHODS_INVOKED_IN_SWING_THREAD [/INST] Certain swing methods needs to be invoked in Swing thread</s>85<s>[INST] FI_FINALIZER_ONLY_NULLS_FIELDS [/INST] Finalizer only nulls fields</s>86<s>[INST] FI_FINALIZER_NULLS_FIELDS [/INST] Finalizer nulls fields</s>87<s>[INST] UI_INHERITANCE_UNSAFE_GETRESOURCE [/INST] Usage of GetResource may be unsafe if class is extended</s>88<s>[INST] AM_CREATES_EMPTY_ZIP_FILE_ENTRY [/INST] Creates an empty zip file entry</s>89<s>[INST] AM_CREATES_EMPTY_JAR_FILE_ENTRY [/INST] Creates an empty jar file entry</s>90<s>[INST] IMSE_DONT_CATCH_IMSE [/INST] Dubious catching of IllegalMonitorStateException</s>91<s>[INST] CN_IMPLEMENTS_CLONE_BUT_NOT_CLONEABLE [/INST] Class defines clone</s>92<s>[INST] CN_IDIOM [/INST] Class implements Cloneable but does not define or use clone method</s>93<s>[INST] CN_IDIOM_NO_SUPER_CALL [/INST] clone method does not call super.clone</s>94<s>[INST] DE_MIGHT_DROP [/INST] Method might drop exception</s>95<s>[INST] DE_MIGHT_IGNORE [/INST] Method might ignore exception</s>96<s>[INST] DM_EXIT [/INST] Method invokes System.exit</s>97<s>[INST] NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER [/INST] Use of identifier that is a keyword in later versions of Java</s>98<s>[INST] NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER [/INST] Use of identifier that is a keyword in later versions of Java</s>99<s>[INST] JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS [/INST] Fields of immutable classes should be final</s>100<s>[INST] DM_RUN_FINALIZERS_ON_EXIT [/INST] Method invokes dangerous method runFinalizersOnExit</s>101<s>[INST] NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT [/INST] equals</s>102<s>[INST] FI_EMPTY [/INST] Empty finalizer should be deleted</s>103<s>[INST] FI_NULLIFY_SUPER [/INST] Finalizer nullifies superclass finalizer</s>104<s>[INST] FI_USELESS [/INST] Finalizer does nothing but call superclass finalizer</s>105<s>[INST] FI_MISSING_SUPER_CALL [/INST] Finalizer does not call superclass finalizer</s>106<s>[INST] FI_EXPLICIT_INVOCATION [/INST] Explicit invocation of finalizer</s>107<s>[INST] EQ_CHECK_FOR_OPERAND_NOT_COMPATIBLE_WITH_THIS [/INST] Equals checks for incompatible operand</s>108<s>[INST] EQ_GETCLASS_AND_CLASS_CONSTANT [/INST] equals method fails for subtypes</s>109<s>[INST] EQ_SELF_NO_OBJECT [/INST] Covariant equals</s>110<s>[INST] CO_SELF_NO_OBJECT [/INST] Covariant compareTo</s>111<s>[INST] CO_COMPARETO_RESULTS_MIN_VALUE [/INST] compareTo</s>112<s>[INST] CO_COMPARETO_INCORRECT_FLOATING [/INST] compareTo</s>113<s>[INST] RV_NEGATING_RESULT_OF_COMPARETO [/INST] Negating the result of compareTo</s>114<s>[INST] ES_COMPARING_STRINGS_WITH_EQ [/INST] Comparison of String objects using == or !=</s>115<s>[INST] ES_COMPARING_PARAMETER_STRING_WITH_EQ [/INST] Comparison of String parameter using == or !=</s>116<s>[INST] EQ_COMPARETO_USE_OBJECT_EQUALS [/INST] Class defines compareTo</s>117<s>[INST] HE_HASHCODE_USE_OBJECT_EQUALS [/INST] Class defines hashCode</s>118<s>[INST] HE_HASHCODE_NO_EQUALS [/INST] Class defines hashCode</s>119<s>[INST] HE_EQUALS_USE_HASHCODE [/INST] Class defines equals</s>120<s>[INST] HE_INHERITS_EQUALS_USE_HASHCODE [/INST] Class inherits equals</s>121<s>[INST] HE_EQUALS_NO_HASHCODE [/INST] Class defines equals</s>122<s>[INST] EQ_ABSTRACT_SELF [/INST] Abstract class defines covariant equals</s>123<s>[INST] CO_ABSTRACT_SELF [/INST] Abstract class defines covariant compareTo</s>124<s>[INST] IC_SUPERCLASS_USES_SUBCLASS_DURING_INITIALIZATION [/INST] Superclass uses subclass during initialization</s>125<s>[INST] SI_INSTANCE_BEFORE_FINALS_ASSIGNED [/INST] Static initializer creates instance before all static final fields assigned</s>126<s>[INST] IT_NO_SUCH_ELEMENT [/INST] Iterator next</s>127<s>[INST] ME_MUTABLE_ENUM_FIELD [/INST] Enum field is public and mutable</s>128<s>[INST] ME_ENUM_FIELD_SETTER [/INST] Public enum method unconditionally sets its field</s>129<s>[INST] NM_METHOD_NAMING_CONVENTION [/INST] Method names should start with a lower case letter</s>130<s>[INST] NM_FIELD_NAMING_CONVENTION [/INST] Field names should start with a lower case letter</s>131<s>[INST] NM_SAME_SIMPLE_NAME_AS_INTERFACE [/INST] Class names shouldn’t shadow simple name of implemented interface</s>132<s>[INST] NM_SAME_SIMPLE_NAME_AS_SUPERCLASS [/INST] Class names shouldn’t shadow simple name of superclass</s>133<s>[INST] NM_CLASS_NAMING_CONVENTION [/INST] Class names should start with an upper case letter</s>134<s>[INST] NM_VERY_CONFUSING_INTENTIONAL [/INST] Very confusing method names</s>135<s>[INST] NM_WRONG_PACKAGE_INTENTIONAL [/INST] Method doesn’t override method in superclass due to wrong package for parameter</s>136<s>[INST] NM_CONFUSING [/INST] Confusing method names</s>137"<s>[INST] NM_CLASS_NOT_EXCEPTION [/INST] Class is not derived from an Exception, even though it is named as such</s>"138<s>[INST] RR_NOT_CHECKED [/INST] Method ignores results of InputStream.read</s>139<s>[INST] SR_NOT_CHECKED [/INST] Method ignores results of InputStream.skip</s>140<s>[INST] SE_NO_SUITABLE_CONSTRUCTOR [/INST] Class is Serializable but its superclass doesn’t define a void constructor</s>141<s>[INST] SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION [/INST] Class is Externalizable but doesn’t define a void constructor</s>142<s>[INST] SE_COMPARATOR_SHOULD_BE_SERIALIZABLE [/INST] Comparator doesn’t implement Serializable</s>143"<s>[INST] SE_NO_SERIALVERSIONID [/INST] Class is Serializable, but doesn’t define serialVersionUID</s>"144<s>[INST] SE_READ_RESOLVE_MUST_RETURN_OBJECT [/INST] The readResolve method must be declared with a return type of Object.</s>145<s>[INST] SE_TRANSIENT_FIELD_NOT_RESTORED [/INST] Transient field that isn’t set by deserialization.</s>146<s>[INST] SE_NONFINAL_SERIALVERSIONID [/INST] serialVersionUID isn’t final</s>147<s>[INST] SE_NONSTATIC_SERIALVERSIONID [/INST] serialVersionUID isn’t static</s>148<s>[INST] SE_NONLONG_SERIALVERSIONID [/INST] serialVersionUID isn’t long</s>149<s>[INST] SE_BAD_FIELD [/INST] Non-transient non-serializable instance field in serializable class</s>150<s>[INST] SE_INNER_CLASS [/INST] Serializable inner class</s>151<s>[INST] SE_BAD_FIELD_INNER_CLASS [/INST] Non-serializable class has a serializable inner class</s>152<s>[INST] SE_BAD_FIELD_STORE [/INST] Non-serializable value stored into instance field of a serializable class</s>153<s>[INST] RV_RETURN_VALUE_IGNORED_BAD_PRACTICE [/INST] Method ignores exceptional return value</s>154<s>[INST] NP_TOSTRING_COULD_RETURN_NULL [/INST] toString method may return null</s>155<s>[INST] NP_CLONE_COULD_RETURN_NULL [/INST] Clone method may return null</s>156<s>[INST] OS_OPEN_STREAM [/INST] Method may fail to close stream</s>157<s>[INST] OS_OPEN_STREAM_EXCEPTION_PATH [/INST] Method may fail to close stream on exception</s>158<s>[INST] RC_REF_COMPARISON_BAD_PRACTICE [/INST] Suspicious reference comparison to constant</s>159<s>[INST] RC_REF_COMPARISON_BAD_PRACTICE_BOOLEAN [/INST] Suspicious reference comparison of Boolean values</s>160<s>[INST] VA_FORMAT_STRING_USES_NEWLINE [/INST] Format string should use %n rather than n</s>161<s>[INST] BIT_SIGNED_CHECK [/INST] Check for sign of bitwise operation</s>162<s>[INST] ODR_OPEN_DATABASE_RESOURCE [/INST] Method may fail to close database resource</s>163<s>[INST] ODR_OPEN_DATABASE_RESOURCE_EXCEPTION_PATH [/INST] Method may fail to close database resource on exception</s>164<s>[INST] ISC_INSTANTIATE_STATIC_CLASS [/INST] Needless instantiation of class that only supplies static methods</s>165<s>[INST] DMI_RANDOM_USED_ONLY_ONCE [/INST] Random object created and used only once</s>166<s>[INST] BC_EQUALS_METHOD_SHOULD_WORK_FOR_ALL_OBJECTS [/INST] Equals method should not assume anything about the type of its argument</s>167<s>[INST] J2EE_STORE_OF_NON_SERIALIZABLE_OBJECT_INTO_SESSION [/INST] Store of non serializable object into HttpSession</s>168<s>[INST] GC_UNCHECKED_TYPE_IN_GENERIC_CALL [/INST] Unchecked type in generic call</s>169<s>[INST] PZ_DONT_REUSE_ENTRY_OBJECTS_IN_ITERATORS [/INST] Don’t reuse entry objects in iterators</s>170<s>[INST] DMI_ENTRY_SETS_MAY_REUSE_ENTRY_OBJECTS [/INST] Adding elements of an entry set may fail due to reuse of Entry objects</s>171<s>[INST] DMI_USING_REMOVEALL_TO_CLEAR_COLLECTION [/INST] Don’t use removeAll to clear a collection</s>172<s>[INST] NP_OPTIONAL_RETURN_NULL [/INST] Method with Optional return type returns explicit null</s>173<s>[INST] NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR [/INST] Non-null field is not initialized</s>174<s>[INST] VR_UNRESOLVABLE_REFERENCE [/INST] Class makes reference to unresolvable class or method</s>175<s>[INST] IL_INFINITE_LOOP [/INST] An apparent infinite loop</s>176<s>[INST] IO_APPENDING_TO_OBJECT_OUTPUT_STREAM [/INST] Doomed attempt to append to an object output stream</s>177<s>[INST] IL_INFINITE_RECURSIVE_LOOP [/INST] An apparent infinite recursive loop</s>178<s>[INST] IL_CONTAINER_ADDED_TO_ITSELF [/INST] A collection is added to itself</s>179<s>[INST] RpC_REPEATED_CONDITIONAL_TEST [/INST] Repeated conditional tests</s>180<s>[INST] FL_MATH_USING_FLOAT_PRECISION [/INST] Method performs math using floating point precision</s>181<s>[INST] CAA_COVARIANT_ARRAY_ELEMENT_STORE [/INST] Possibly incompatible element is stored in covariant array</s>182<s>[INST] DMI_VACUOUS_CALL_TO_EASYMOCK_METHOD [/INST] Useless/vacuous call to EasyMock method</s>183<s>[INST] DMI_FUTILE_ATTEMPT_TO_CHANGE_MAXPOOL_SIZE_OF_SCHEDULED_THREAD_POOL_EXECUTOR [/INST] Futile attempt to change max pool size of ScheduledThreadPoolExecutor</s>184<s>[INST] DMI_BIGDECIMAL_CONSTRUCTED_FROM_DOUBLE [/INST] BigDecimal constructed from double that isn’t represented precisely</s>185<s>[INST] DMI_SCHEDULED_THREAD_POOL_EXECUTOR_WITH_ZERO_CORE_THREADS [/INST] Creation of ScheduledThreadPoolExecutor with zero core threads</s>186<s>[INST] DMI_ANNOTATION_IS_NOT_VISIBLE_TO_REFLECTION [/INST] Can’t use reflection to check for presence of annotation without runtime retention</s>187<s>[INST] NP_ARGUMENT_MIGHT_BE_NULL [/INST] Method does not check for null argument</s>188<s>[INST] RV_ABSOLUTE_VALUE_OF_RANDOM_INT [/INST] Bad attempt to compute absolute value of signed random integer</s>189<s>[INST] RV_ABSOLUTE_VALUE_OF_HASHCODE [/INST] Bad attempt to compute absolute value of signed 32-bit hashcode</s>190<s>[INST] RV_01_TO_INT [/INST] Random value from 0 to 1 is coerced to the integer 0</s>191<s>[INST] DM_INVALID_MIN_MAX [/INST] Incorrect combination of Math.max and Math.min</s>192<s>[INST] EQ_COMPARING_CLASS_NAMES [/INST] equals method compares class names rather than class objects</s>193<s>[INST] EQ_ALWAYS_TRUE [/INST] equals method always returns true</s>194<s>[INST] EQ_ALWAYS_FALSE [/INST] equals method always returns false</s>195<s>[INST] EQ_OVERRIDING_EQUALS_NOT_SYMMETRIC [/INST] equals method overrides equals in superclass and may not be symmetric</s>196<s>[INST] EQ_DONT_DEFINE_EQUALS_FOR_ENUM [/INST] Covariant equals</s>197<s>[INST] EQ_SELF_USE_OBJECT [/INST] Covariant equals</s>198<s>[INST] EQ_OTHER_USE_OBJECT [/INST] equals</s>199<s>[INST] EQ_OTHER_NO_OBJECT [/INST] equals</s>200<s>[INST] HE_SIGNATURE_DECLARES_HASHING_OF_UNHASHABLE_CLASS [/INST] Signature declares use of unhashable class in hashed construct</s>201<s>[INST] HE_USE_OF_UNHASHABLE_CLASS [/INST] Use of class without a hashCode</s>202<s>[INST] UR_UNINIT_READ [/INST] Uninitialized read of field in constructor</s>203<s>[INST] UR_UNINIT_READ_CALLED_FROM_SUPER_CONSTRUCTOR [/INST] Uninitialized read of field method called from constructor of superclass</s>204<s>[INST] NM_VERY_CONFUSING [/INST] Very confusing method names</s>205<s>[INST] NM_WRONG_PACKAGE [/INST] Method doesn’t override method in superclass due to wrong package for parameter</s>206<s>[INST] NM_METHOD_CONSTRUCTOR_CONFUSION [/INST] Apparent method/constructor confusion</s>207<s>[INST] NM_LCASE_HASHCODE [/INST] Class defines hashcode</s>208<s>[INST] NM_LCASE_TOSTRING [/INST] Class defines tostring</s>209<s>[INST] NM_BAD_EQUAL [/INST] Class defines equal</s>210<s>[INST] SE_READ_RESOLVE_IS_STATIC [/INST] The readResolve method must not be declared as a static method.</s>211<s>[INST] SE_METHOD_MUST_BE_PRIVATE [/INST] Method must be private in order for serialization to work</s>212<s>[INST] SF_DEAD_STORE_DUE_TO_SWITCH_FALLTHROUGH [/INST] Dead store due to switch statement fall through</s>213<s>[INST] SF_DEAD_STORE_DUE_TO_SWITCH_FALLTHROUGH_TO_THROW [/INST] Dead store due to switch statement fall through to throw</s>214<s>[INST] NP_UNWRITTEN_FIELD [/INST] Read of unwritten field</s>215<s>[INST] UWF_NULL_FIELD [/INST] Field only ever set to null</s>216<s>[INST] UWF_UNWRITTEN_FIELD [/INST] Unwritten field</s>217<s>[INST] SIC_THREADLOCAL_DEADLY_EMBRACE [/INST] Deadly embrace of non-static inner class and thread local</s>218<s>[INST] RANGE_ARRAY_INDEX [/INST] Array index is out of bounds</s>219<s>[INST] RANGE_ARRAY_OFFSET [/INST] Array offset is out of bounds</s>220<s>[INST] RANGE_ARRAY_LENGTH [/INST] Array length is out of bounds</s>221<s>[INST] RANGE_STRING_INDEX [/INST] String index is out of bounds</s>222<s>[INST] RV_RETURN_VALUE_IGNORED [/INST] Method ignores return value</s>223<s>[INST] RV_EXCEPTION_NOT_THROWN [/INST] Exception created and dropped rather than thrown</s>224<s>[INST] RV_CHECK_COMPARETO_FOR_SPECIFIC_RETURN_VALUE [/INST] Code checks for specific values returned by compareTo</s>225<s>[INST] NP_ALWAYS_NULL [/INST] Null pointer dereference</s>226<s>[INST] NP_CLOSING_NULL [/INST] close</s>227<s>[INST] NP_STORE_INTO_NONNULL_FIELD [/INST] Store of null value into field annotated @Nonnull</s>228<s>[INST] NP_ALWAYS_NULL_EXCEPTION [/INST] Null pointer dereference in method on exception path</s>229<s>[INST] NP_NULL_ON_SOME_PATH [/INST] Possible null pointer dereference</s>230<s>[INST] NP_NULL_ON_SOME_PATH_EXCEPTION [/INST] Possible null pointer dereference in method on exception path</s>231<s>[INST] NP_NULL_PARAM_DEREF [/INST] Method call passes null for non-null parameter</s>232<s>[INST] NP_NULL_PARAM_DEREF_NONVIRTUAL [/INST] Non-virtual method call passes null for non-null parameter</s>233<s>[INST] NP_NULL_PARAM_DEREF_ALL_TARGETS_DANGEROUS [/INST] Method call passes null for non-null parameter</s>234<s>[INST] NP_NONNULL_PARAM_VIOLATION [/INST] Method call passes null to a non-null parameter</s>235"<s>[INST] NP_NONNULL_RETURN_VIOLATION [/INST] Method may return null, but is declared @Nonnull</s>"236<s>[INST] NP_GUARANTEED_DEREF [/INST] Null value is guaranteed to be dereferenced</s>237<s>[INST] NP_GUARANTEED_DEREF_ON_EXCEPTION_PATH [/INST] Value is null and guaranteed to be dereferenced on exception path</s>238<s>[INST] DMI_ARGUMENTS_WRONG_ORDER [/INST] Reversed method arguments</s>239<s>[INST] RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE [/INST] Nullcheck of value previously dereferenced</s>240<s>[INST] RC_REF_COMPARISON [/INST] Suspicious reference comparison</s>241<s>[INST] VA_PRIMITIVE_ARRAY_PASSED_TO_OBJECT_VARARG [/INST] Primitive array passed to function expecting a variable number of object arguments</s>242<s>[INST] VA_FORMAT_STRING_BAD_CONVERSION [/INST] The type of a supplied argument doesn’t match format specifier</s>243<s>[INST] VA_FORMAT_STRING_BAD_CONVERSION_FROM_ARRAY [/INST] Array formatted in useless way using format string</s>244<s>[INST] VA_FORMAT_STRING_NO_PREVIOUS_ARGUMENT [/INST] No previous argument for format string</s>245<s>[INST] VA_FORMAT_STRING_BAD_ARGUMENT [/INST] Format string placeholder incompatible with passed argument</s>246<s>[INST] VA_FORMAT_STRING_MISSING_ARGUMENT [/INST] Format string references missing argument</s>247<s>[INST] VA_FORMAT_STRING_ILLEGAL [/INST] Illegal format string</s>248<s>[INST] VA_FORMAT_STRING_EXTRA_ARGUMENTS_PASSED [/INST] More arguments are passed than are actually used in the format string</s>249<s>[INST] VA_FORMAT_STRING_EXPECTED_MESSAGE_FORMAT_SUPPLIED [/INST] MessageFormat supplied where printf style format expected</s>250<s>[INST] EC_UNRELATED_TYPES_USING_POINTER_EQUALITY [/INST] Using pointer equality to compare different types</s>251<s>[INST] EC_UNRELATED_TYPES [/INST] Call to equals</s>252<s>[INST] EC_ARRAY_AND_NONARRAY [/INST] equals</s>253<s>[INST] EC_NULL_ARG [/INST] Call to equals</s>254<s>[INST] EC_UNRELATED_INTERFACES [/INST] Call to equals</s>255<s>[INST] EC_UNRELATED_CLASS_AND_INTERFACE [/INST] Call to equals</s>256<s>[INST] SA_LOCAL_SELF_ASSIGNMENT_INSTEAD_OF_FIELD [/INST] Self assignment of local rather than assignment to field</s>257<s>[INST] INT_BAD_COMPARISON_WITH_INT_VALUE [/INST] Bad comparison of int value with long constant</s>258<s>[INST] INT_BAD_COMPARISON_WITH_SIGNED_BYTE [/INST] Bad comparison of signed byte</s>259<s>[INST] INT_BAD_COMPARISON_WITH_NONNEGATIVE_VALUE [/INST] Bad comparison of nonnegative value with negative constant or zero</s>260<s>[INST] BIT_ADD_OF_SIGNED_BYTE [/INST] Bitwise add of signed byte value</s>261<s>[INST] BIT_IOR_OF_SIGNED_BYTE [/INST] Bitwise OR of signed byte value</s>262<s>[INST] BIT_SIGNED_CHECK_HIGH_BIT [/INST] Check for sign of bitwise operation involving negative number</s>263<s>[INST] BIT_AND [/INST] Incompatible bit masks</s>264<s>[INST] BIT_AND_ZZ [/INST] Check to see if</s>265<s>[INST] BIT_IOR [/INST] Incompatible bit masks</s>266<s>[INST] SA_FIELD_SELF_ASSIGNMENT [/INST] Self assignment of field</s>267<s>[INST] SA_FIELD_SELF_COMPUTATION [/INST] Nonsensical self computation involving a field</s>268<s>[INST] SA_LOCAL_SELF_COMPUTATION [/INST] Nonsensical self computation involving a variable</s>269<s>[INST] SA_FIELD_SELF_COMPARISON [/INST] Self comparison of field with itself</s>270<s>[INST] SA_LOCAL_SELF_COMPARISON [/INST] Self comparison of value with itself</s>271<s>[INST] UMAC_UNCALLABLE_METHOD_OF_ANONYMOUS_CLASS [/INST] Uncallable method defined in anonymous class</s>272<s>[INST] IJU_ASSERT_METHOD_INVOKED_FROM_RUN_METHOD [/INST] JUnit assertion in run method will not be noticed by JUnit</s>273<s>[INST] IJU_BAD_SUITE_METHOD [/INST] TestCase declares a bad suite method</s>274<s>[INST] IJU_SETUP_NO_SUPER [/INST] TestCase defines setUp that doesn’t call super.setUp</s>275<s>[INST] IJU_TEARDOWN_NO_SUPER [/INST] TestCase defines tearDown that doesn’t call super.tearDown</s>276<s>[INST] IJU_SUITE_NOT_STATIC [/INST] TestCase implements a non-static suite method</s>277<s>[INST] IJU_NO_TESTS [/INST] TestCase has no tests</s>278<s>[INST] BOA_BADLY_OVERRIDDEN_ADAPTER [/INST] Class overrides a method implemented in super class Adapter wrongly</s>279<s>[INST] SQL_BAD_RESULTSET_ACCESS [/INST] Method attempts to access a result set field with index 0</s>280<s>[INST] SQL_BAD_PREPARED_STATEMENT_ACCESS [/INST] Method attempts to access a prepared statement parameter with index 0</s>281<s>[INST] SIO_SUPERFLUOUS_INSTANCEOF [/INST] Unnecessary type check done using instanceof operator</s>282<s>[INST] BAC_BAD_APPLET_CONSTRUCTOR [/INST] Bad Applet Constructor relies on uninitialized AppletStub</s>283<s>[INST] EC_INCOMPATIBLE_ARRAY_COMPARE [/INST] equals</s>284<s>[INST] EC_BAD_ARRAY_COMPARE [/INST] Invocation of equals</s>285<s>[INST] STI_INTERRUPTED_ON_CURRENTTHREAD [/INST] Unneeded use of currentThread</s>286<s>[INST] STI_INTERRUPTED_ON_UNKNOWNTHREAD [/INST] Static Thread.interrupted</s>287<s>[INST] DLS_DEAD_LOCAL_INCREMENT_IN_RETURN [/INST] Useless increment in return statement</s>288<s>[INST] DLS_DEAD_STORE_OF_CLASS_LITERAL [/INST] Dead store of class literal</s>289<s>[INST] IP_PARAMETER_IS_DEAD_BUT_OVERWRITTEN [/INST] A parameter is dead upon entry to a method but overwritten</s>290<s>[INST] MF_METHOD_MASKS_FIELD [/INST] Method defines a variable that obscures a field</s>291<s>[INST] MF_CLASS_MASKS_FIELD [/INST] Class defines field that masks a superclass field</s>292<s>[INST] FE_TEST_IF_EQUAL_TO_NOT_A_NUMBER [/INST] Doomed test for equality to NaN</s>293<s>[INST] ICAST_INT_2_LONG_AS_INSTANT [/INST] int value converted to long and used as absolute time</s>294<s>[INST] ICAST_INT_CAST_TO_DOUBLE_PASSED_TO_CEIL [/INST] Integral value cast to double and then passed to Math.ceil</s>295<s>[INST] ICAST_INT_CAST_TO_FLOAT_PASSED_TO_ROUND [/INST] int value cast to float and then passed to Math.round</s>296<s>[INST] NP_NULL_INSTANCEOF [/INST] A known null value is checked to see if it is an instance of a type</s>297<s>[INST] DMI_LONG_BITS_TO_DOUBLE_INVOKED_ON_INT [/INST] Double.longBitsToDouble invoked on an int</s>298<s>[INST] BC_IMPOSSIBLE_CAST [/INST] Impossible cast</s>299<s>[INST] BC_IMPOSSIBLE_DOWNCAST [/INST] Impossible downcast</s>300<s>[INST] BC_IMPOSSIBLE_DOWNCAST_OF_TOARRAY [/INST] Impossible downcast of toArray</s>301<s>[INST] BC_IMPOSSIBLE_INSTANCEOF [/INST] instanceof will always return false</s>302<s>[INST] RE_POSSIBLE_UNINTENDED_PATTERN [/INST] “.” or “|” used for regular expression</s>303<s>[INST] RE_BAD_SYNTAX_FOR_REGULAR_EXPRESSION [/INST] Invalid syntax for regular expression</s>304<s>[INST] RE_CANT_USE_FILE_SEPARATOR_AS_REGULAR_EXPRESSION [/INST] File.separator used for regular expression</s>305<s>[INST] DLS_OVERWRITTEN_INCREMENT [/INST] Overwritten increment</s>306<s>[INST] ICAST_BAD_SHIFT_AMOUNT [/INST] 32 bit int shifted by an amount not in the range -31..31</s>307<s>[INST] BSHIFT_WRONG_ADD_PRIORITY [/INST] Possible bad parsing of shift operation</s>308<s>[INST] IM_MULTIPLYING_RESULT_OF_IREM [/INST] Integer multiply of result of integer remainder</s>309<s>[INST] DMI_INVOKING_HASHCODE_ON_ARRAY [/INST] Invocation of hashCode on an array</s>310<s>[INST] DMI_INVOKING_TOSTRING_ON_ARRAY [/INST] Invocation of toString on an array</s>311<s>[INST] DMI_INVOKING_TOSTRING_ON_ANONYMOUS_ARRAY [/INST] Invocation of toString on an unnamed array</s>312<s>[INST] DMI_BAD_MONTH [/INST] Bad constant value for month</s>313<s>[INST] DMI_CALLING_NEXT_FROM_HASNEXT [/INST] hasNext method invokes next</s>314<s>[INST] QBA_QUESTIONABLE_BOOLEAN_ASSIGNMENT [/INST] Method assigns boolean literal in boolean expression</s>315<s>[INST] GC_UNRELATED_TYPES [/INST] No relationship between generic parameter and method argument</s>316<s>[INST] DMI_VACUOUS_SELF_COLLECTION_CALL [/INST] Vacuous call to collections</s>317<s>[INST] DMI_DOH [/INST] D’oh! A nonsensical method invocation</s>318<s>[INST] DMI_COLLECTIONS_SHOULD_NOT_CONTAIN_THEMSELVES [/INST] Collections should not contain themselves</s>319<s>[INST] TQ_UNKNOWN_VALUE_USED_WHERE_ALWAYS_STRICTLY_REQUIRED [/INST] Value without a type qualifier used where a value is required to have that qualifier</s>320<s>[INST] TQ_COMPARING_VALUES_WITH_INCOMPATIBLE_TYPE_QUALIFIERS [/INST] Comparing values with incompatible type qualifiers</s>321<s>[INST] TQ_ALWAYS_VALUE_USED_WHERE_NEVER_REQUIRED [/INST] Value annotated as carrying a type qualifier used where a value that must not carry that qualifier is required</s>322<s>[INST] TQ_NEVER_VALUE_USED_WHERE_ALWAYS_REQUIRED [/INST] Value annotated as never carrying a type qualifier used where value carrying that qualifier is required</s>323<s>[INST] TQ_MAYBE_SOURCE_VALUE_REACHES_ALWAYS_SINK [/INST] Value that might not carry a type qualifier is always used in a way requires that type qualifier</s>324<s>[INST] TQ_MAYBE_SOURCE_VALUE_REACHES_NEVER_SINK [/INST] Value that might carry a type qualifier is always used in a way prohibits it from having that type qualifier</s>325<s>[INST] SKIPPED_CLASS_TOO_BIG [/INST] Class too big for analysis</s>326<s>[INST] OBL_UNSATISFIED_OBLIGATION [/INST] Method may fail to clean up stream or resource</s>327<s>[INST] OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE [/INST] Method may fail to clean up stream or resource on checked exception</s>328<s>[INST] LG_LOST_LOGGER_DUE_TO_WEAK_REFERENCE [/INST] Potential lost logger changes due to weak reference in OpenJDK</s>329<s>[INST] DM_CONVERT_CASE [/INST] Consider using Locale parameterized version of invoked method</s>330<s>[INST] DM_DEFAULT_ENCODING [/INST] Reliance on default encoding</s>331<s>[INST] DP_DO_INSIDE_DO_PRIVILEGED [/INST] Method invoked that should be only be invoked inside a doPrivileged block</s>332<s>[INST] DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED [/INST] Classloaders should only be created inside doPrivileged block</s>333"<s>[INST] FI_PUBLIC_SHOULD_BE_PROTECTED [/INST] Finalizer should be protected, not public</s>"334<s>[INST] MS_EXPOSE_REP [/INST] Public static method may expose internal representation by returning array</s>335<s>[INST] EI_EXPOSE_REP [/INST] May expose internal representation by returning reference to mutable object</s>336<s>[INST] EI_EXPOSE_REP2 [/INST] May expose internal representation by incorporating reference to mutable object</s>337<s>[INST] EI_EXPOSE_STATIC_REP2 [/INST] May expose internal static state by storing a mutable object into a static field</s>338<s>[INST] MS_OOI_PKGPROTECT [/INST] Field should be moved out of an interface and made package protected</s>339<s>[INST] MS_FINAL_PKGPROTECT [/INST] Field should be both final and package protected</s>340<s>[INST] MS_SHOULD_BE_FINAL [/INST] Field isn’t final but should be</s>341<s>[INST] MS_SHOULD_BE_REFACTORED_TO_BE_FINAL [/INST] Field isn’t final but should be refactored to be so</s>342<s>[INST] MS_PKGPROTECT [/INST] Field should be package protected</s>343<s>[INST] MS_MUTABLE_HASHTABLE [/INST] Field is a mutable Hashtable</s>344<s>[INST] MS_MUTABLE_ARRAY [/INST] Field is a mutable array</s>345<s>[INST] MS_MUTABLE_COLLECTION [/INST] Field is a mutable collection</s>346<s>[INST] MS_MUTABLE_COLLECTION_PKGPROTECT [/INST] Field is a mutable collection which should be package protected</s>347<s>[INST] MS_CANNOT_BE_FINAL [/INST] Field isn’t final and can’t be protected from malicious code</s>348<s>[INST] AT_OPERATION_SEQUENCE_ON_CONCURRENT_ABSTRACTION [/INST] Sequence of calls to concurrent abstraction may not be atomic</s>349<s>[INST] STCAL_STATIC_CALENDAR_INSTANCE [/INST] Static Calendar field</s>350<s>[INST] STCAL_STATIC_SIMPLE_DATE_FORMAT_INSTANCE [/INST] Static DateFormat</s>351<s>[INST] STCAL_INVOKE_ON_STATIC_CALENDAR_INSTANCE [/INST] Call to static Calendar</s>352<s>[INST] STCAL_INVOKE_ON_STATIC_DATE_FORMAT_INSTANCE [/INST] Call to static DateFormat</s>353<s>[INST] NP_SYNC_AND_NULL_CHECK_FIELD [/INST] Synchronize and null check on the same field.</s>354<s>[INST] VO_VOLATILE_REFERENCE_TO_ARRAY [/INST] A volatile reference to an array doesn’t treat the array elements as volatile</s>355<s>[INST] VO_VOLATILE_INCREMENT [/INST] An increment to a volatile field isn’t atomic</s>356<s>[INST] DM_MONITOR_WAIT_ON_CONDITION [/INST] Monitor wait</s>357<s>[INST] DM_USELESS_THREAD [/INST] A thread was created using the default empty run method</s>358<s>[INST] DC_DOUBLECHECK [/INST] Possible double check of field</s>359<s>[INST] DC_PARTIALLY_CONSTRUCTED [/INST] Possible exposure of partially initialized object</s>360<s>[INST] DL_SYNCHRONIZATION_ON_SHARED_CONSTANT [/INST] Synchronization on interned String</s>361<s>[INST] DL_SYNCHRONIZATION_ON_BOOLEAN [/INST] Synchronization on Boolean</s>362<s>[INST] DL_SYNCHRONIZATION_ON_BOXED_PRIMITIVE [/INST] Synchronization on boxed primitive</s>363<s>[INST] DL_SYNCHRONIZATION_ON_UNSHARED_BOXED_PRIMITIVE [/INST] Synchronization on boxed primitive values</s>364<s>[INST] WL_USING_GETCLASS_RATHER_THAN_CLASS_LITERAL [/INST] Synchronization on getClass rather than class literal</s>365<s>[INST] ESync_EMPTY_SYNC [/INST] Empty synchronized block</s>366<s>[INST] MSF_MUTABLE_SERVLET_FIELD [/INST] Mutable servlet field</s>367<s>[INST] IS2_INCONSISTENT_SYNC [/INST] Inconsistent synchronization</s>368<s>[INST] NN_NAKED_NOTIFY [/INST] Naked notify</s>369<s>[INST] RU_INVOKE_RUN [/INST] Invokes run on a thread</s>370<s>[INST] SP_SPIN_ON_FIELD [/INST] Method spins on field</s>371<s>[INST] TLW_TWO_LOCK_WAIT [/INST] Wait with two locks held</s>372<s>[INST] UW_UNCOND_WAIT [/INST] Unconditional wait</s>373"<s>[INST] UG_SYNC_SET_UNSYNC_GET [/INST] Unsynchronized get method, synchronized set method</s>"374<s>[INST] IS_FIELD_NOT_GUARDED [/INST] Field not guarded against concurrent access</s>375<s>[INST] ML_SYNC_ON_FIELD_TO_GUARD_CHANGING_THAT_FIELD [/INST] Synchronization on field in futile attempt to guard that field</s>376<s>[INST] ML_SYNC_ON_UPDATED_FIELD [/INST] Method synchronizes on an updated field</s>377<s>[INST] WS_WRITEOBJECT_SYNC [/INST] Class’s writeObject</s>378<s>[INST] RS_READOBJECT_SYNC [/INST] Class’s readObject</s>379<s>[INST] SC_START_IN_CTOR [/INST] Constructor invokes Thread.start</s>380<s>[INST] WA_NOT_IN_LOOP [/INST] Wait not in loop</s>381<s>[INST] WA_AWAIT_NOT_IN_LOOP [/INST] Condition.await</s>382<s>[INST] NO_NOTIFY_NOT_NOTIFYALL [/INST] Using notify</s>383<s>[INST] UL_UNRELEASED_LOCK [/INST] Method does not release lock on all paths</s>384<s>[INST] UL_UNRELEASED_LOCK_EXCEPTION_PATH [/INST] Method does not release lock on all exception paths</s>385<s>[INST] MWN_MISMATCHED_WAIT [/INST] Mismatched wait</s>386<s>[INST] MWN_MISMATCHED_NOTIFY [/INST] Mismatched notify</s>387<s>[INST] LI_LAZY_INIT_STATIC [/INST] Incorrect lazy initialization of static field</s>388<s>[INST] LI_LAZY_INIT_UPDATE_STATIC [/INST] Incorrect lazy initialization and update of static field</s>389<s>[INST] JLM_JSR166_UTILCONCURRENT_MONITORENTER [/INST] Synchronization performed on util.concurrent instance</s>390<s>[INST] JML_JSR166_CALLING_WAIT_RATHER_THAN_AWAIT [/INST] Using monitor style wait methods on util.concurrent abstraction</s>391<s>[INST] JLM_JSR166_LOCK_MONITORENTER [/INST] Synchronization performed on Lock</s>392<s>[INST] SWL_SLEEP_WITH_LOCK_HELD [/INST] Method calls Thread.sleep</s>393"<s>[INST] RV_RETURN_VALUE_OF_PUTIFABSENT_IGNORED [/INST] Return value of putIfAbsent ignored, value passed to putIfAbsent reused</s>"394<s>[INST] HSC_HUGE_SHARED_STRING_CONSTANT [/INST] Huge string constants is duplicated across multiple class files</s>395<s>[INST] DMI_BLOCKING_METHODS_ON_URL [/INST] The equals and hashCode methods of URL are blocking</s>396<s>[INST] DMI_COLLECTION_OF_URLS [/INST] Maps and sets of URLs can be performance hogs</s>397<s>[INST] DM_STRING_CTOR [/INST] Method invokes inefficient new String</s>398<s>[INST] DM_STRING_VOID_CTOR [/INST] Method invokes inefficient new String</s>399<s>[INST] DM_STRING_TOSTRING [/INST] Method invokes toString</s>400<s>[INST] DM_GC [/INST] Explicit garbage collection; extremely dubious except in benchmarking code</s>401<s>[INST] DM_BOOLEAN_CTOR [/INST] Method invokes inefficient Boolean constructor; use Boolean.valueOf</s>402<s>[INST] DM_NUMBER_CTOR [/INST] Method invokes inefficient Number constructor; use static valueOf instead</s>403<s>[INST] DM_FP_NUMBER_CTOR [/INST] Method invokes inefficient floating-point Number constructor; use static valueOf instead</s>404<s>[INST] DM_BOXED_PRIMITIVE_TOSTRING [/INST] Method allocates a boxed primitive just to call toString</s>405<s>[INST] DM_BOXED_PRIMITIVE_FOR_PARSING [/INST] Boxing/unboxing to parse a primitive</s>406<s>[INST] DM_BOXED_PRIMITIVE_FOR_COMPARE [/INST] Boxing a primitive to compare</s>407<s>[INST] BX_UNBOXED_AND_COERCED_FOR_TERNARY_OPERATOR [/INST] Primitive value is unboxed and coerced for ternary operator</s>408<s>[INST] BX_UNBOXING_IMMEDIATELY_REBOXED [/INST] Boxed value is unboxed and then immediately reboxed</s>409<s>[INST] BX_BOXING_IMMEDIATELY_UNBOXED [/INST] Primitive value is boxed and then immediately unboxed</s>410<s>[INST] BX_BOXING_IMMEDIATELY_UNBOXED_TO_PERFORM_COERCION [/INST] Primitive value is boxed then unboxed to perform primitive coercion</s>411"<s>[INST] DM_NEW_FOR_GETCLASS [/INST] Method allocates an object, only to get the class object</s>"412<s>[INST] DM_NEXTINT_VIA_NEXTDOUBLE [/INST] Use the nextInt method of Random rather than nextDouble to generate a random integer</s>413<s>[INST] SS_SHOULD_BE_STATIC [/INST] Unread field</s>414<s>[INST] UUF_UNUSED_FIELD [/INST] Unused field</s>415<s>[INST] URF_UNREAD_FIELD [/INST] Unread field</s>416<s>[INST] SIC_INNER_SHOULD_BE_STATIC [/INST] Should be a static inner class</s>417<s>[INST] SIC_INNER_SHOULD_BE_STATIC_NEEDS_THIS [/INST] Could be refactored into a static inner class</s>418<s>[INST] SIC_INNER_SHOULD_BE_STATIC_ANON [/INST] Could be refactored into a named static inner class</s>419<s>[INST] UPM_UNCALLED_PRIVATE_METHOD [/INST] Private method is never called</s>420<s>[INST] SBSC_USE_STRINGBUFFER_CONCATENATION [/INST] Method concatenates strings using + in a loop</s>421<s>[INST] IIL_ELEMENTS_GET_LENGTH_IN_LOOP [/INST] NodeList.getLength</s>422<s>[INST] IIL_PREPARE_STATEMENT_IN_LOOP [/INST] Method calls prepareStatement in a loop</s>423<s>[INST] IIL_PATTERN_COMPILE_IN_LOOP [/INST] Method calls Pattern.compile in a loop</s>424<s>[INST] IIL_PATTERN_COMPILE_IN_LOOP_INDIRECT [/INST] Method compiles the regular expression in a loop</s>425<s>[INST] IIO_INEFFICIENT_INDEX_OF [/INST] Inefficient use of String.indexOf</s>426<s>[INST] IIO_INEFFICIENT_LAST_INDEX_OF [/INST] Inefficient use of String.lastIndexOf</s>427<s>[INST] ITA_INEFFICIENT_TO_ARRAY [/INST] Method uses toArray</s>428<s>[INST] WMI_WRONG_MAP_ITERATOR [/INST] Inefficient use of keySet iterator instead of entrySet iterator</s>429<s>[INST] UM_UNNECESSARY_MATH [/INST] Method calls static Math class method on a constant value</s>430<s>[INST] IMA_INEFFICIENT_MEMBER_ACCESS [/INST] Method accesses a private member variable of owning class</s>431<s>[INST] XSS_REQUEST_PARAMETER_TO_SEND_ERROR [/INST] Servlet reflected cross site scripting vulnerability in error page</s>432<s>[INST] XSS_REQUEST_PARAMETER_TO_SERVLET_WRITER [/INST] Servlet reflected cross site scripting vulnerability</s>433<s>[INST] XSS_REQUEST_PARAMETER_TO_JSP_WRITER [/INST] JSP reflected cross site scripting vulnerability</s>434<s>[INST] HRS_REQUEST_PARAMETER_TO_HTTP_HEADER [/INST] HTTP Response splitting vulnerability</s>435<s>[INST] HRS_REQUEST_PARAMETER_TO_COOKIE [/INST] HTTP cookie formed from untrusted input</s>436<s>[INST] PT_ABSOLUTE_PATH_TRAVERSAL [/INST] Absolute path traversal in servlet</s>437<s>[INST] PT_RELATIVE_PATH_TRAVERSAL [/INST] Relative path traversal in servlet</s>438<s>[INST] DMI_CONSTANT_DB_PASSWORD [/INST] Hardcoded constant database password</s>439<s>[INST] DMI_EMPTY_DB_PASSWORD [/INST] Empty database password</s>440<s>[INST] SQL_NONCONSTANT_STRING_PASSED_TO_EXECUTE [/INST] Nonconstant string passed to execute or addBatch method on an SQL statement</s>441<s>[INST] SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING [/INST] A prepared statement is generated from a nonconstant String</s>442<s>[INST] CAA_COVARIANT_ARRAY_FIELD [/INST] Covariant array assignment to a field</s>443<s>[INST] CAA_COVARIANT_ARRAY_RETURN [/INST] Covariant array is returned from the method</s>444<s>[INST] CAA_COVARIANT_ARRAY_LOCAL [/INST] Covariant array assignment to a local variable</s>445<s>[INST] DMI_UNSUPPORTED_METHOD [/INST] Call to unsupported method</s>446<s>[INST] DMI_THREAD_PASSED_WHERE_RUNNABLE_EXPECTED [/INST] Thread passed where Runnable expected</s>447<s>[INST] NP_DEREFERENCE_OF_READLINE_VALUE [/INST] Dereference of the result of readLine</s>448<s>[INST] NP_IMMEDIATE_DEREFERENCE_OF_READLINE [/INST] Immediate dereference of the result of readLine</s>449<s>[INST] RV_REM_OF_RANDOM_INT [/INST] Remainder of 32-bit signed random integer</s>450<s>[INST] RV_REM_OF_HASHCODE [/INST] Remainder of hashCode could be negative</s>451<s>[INST] EQ_UNUSUAL [/INST] Unusual equals method</s>452<s>[INST] EQ_DOESNT_OVERRIDE_EQUALS [/INST] Class doesn’t override equals in superclass</s>453<s>[INST] NS_NON_SHORT_CIRCUIT [/INST] Questionable use of non-short-circuit logic</s>454<s>[INST] NS_DANGEROUS_NON_SHORT_CIRCUIT [/INST] Potentially dangerous use of non-short-circuit logic</s>455<s>[INST] IC_INIT_CIRCULARITY [/INST] Initialization circularity</s>456<s>[INST] IA_AMBIGUOUS_INVOCATION_OF_INHERITED_OR_OUTER_METHOD [/INST] Potentially ambiguous invocation of either an inherited or outer method</s>457<s>[INST] SE_PRIVATE_READ_RESOLVE_NOT_INHERITED [/INST] Private readResolve method not inherited by subclasses</s>458<s>[INST] SE_TRANSIENT_FIELD_OF_NONSERIALIZABLE_CLASS [/INST] Transient field of class that isn’t Serializable.</s>459<s>[INST] SF_SWITCH_FALLTHROUGH [/INST] Switch statement found where one case falls through to the next case</s>460<s>[INST] SF_SWITCH_NO_DEFAULT [/INST] Switch statement found where default case is missing</s>461<s>[INST] UUF_UNUSED_PUBLIC_OR_PROTECTED_FIELD [/INST] Unused public or protected field</s>462<s>[INST] URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD [/INST] Unread public/protected field</s>463"<s>[INST] QF_QUESTIONABLE_FOR_LOOP [/INST] Complicated, subtle or wrong increment in for-loop</s>"464<s>[INST] NP_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD [/INST] Read of unwritten public or protected field</s>465<s>[INST] UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR [/INST] Field not initialized in constructor but dereferenced without null check</s>466<s>[INST] UWF_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD [/INST] Unwritten public or protected field</s>467<s>[INST] UC_USELESS_VOID_METHOD [/INST] Useless non-empty void method</s>468<s>[INST] UC_USELESS_CONDITION [/INST] Condition has no effect</s>469<s>[INST] UC_USELESS_CONDITION_TYPE [/INST] Condition has no effect due to the variable type</s>470<s>[INST] UC_USELESS_OBJECT [/INST] Useless object created</s>471<s>[INST] UC_USELESS_OBJECT_STACK [/INST] Useless object created on stack</s>472"<s>[INST] RV_RETURN_VALUE_IGNORED_INFERRED [/INST] Method ignores return value, is this OK?</s>"473<s>[INST] RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT [/INST] Return value of method without side effect is ignored</s>474<s>[INST] RV_CHECK_FOR_POSITIVE_INDEXOF [/INST] Method checks to see if result of String.indexOf is positive</s>475<s>[INST] RV_DONT_JUST_NULL_CHECK_READLINE [/INST] Method discards result of readLine after checking if it is non-null</s>476<s>[INST] NP_PARAMETER_MUST_BE_NONNULL_BUT_MARKED_AS_NULLABLE [/INST] Parameter must be non-null but is marked as nullable</s>477<s>[INST] NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE [/INST] Possible null pointer dereference due to return value of called method</s>478<s>[INST] NP_NULL_ON_SOME_PATH_MIGHT_BE_INFEASIBLE [/INST] Possible null pointer dereference on branch that might be infeasible</s>479<s>[INST] NP_LOAD_OF_KNOWN_NULL_VALUE [/INST] Load of known null value</s>480<s>[INST] PZLA_PREFER_ZERO_LENGTH_ARRAYS [/INST] Consider returning a zero length array rather than null</s>481<s>[INST] UCF_USELESS_CONTROL_FLOW [/INST] Useless control flow</s>482<s>[INST] UCF_USELESS_CONTROL_FLOW_NEXT_LINE [/INST] Useless control flow to next line</s>483<s>[INST] RCN_REDUNDANT_NULLCHECK_OF_NULL_VALUE [/INST] Redundant nullcheck of value known to be null</s>484<s>[INST] RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE [/INST] Redundant nullcheck of value known to be non-null</s>485<s>[INST] RCN_REDUNDANT_COMPARISON_TWO_NULL_VALUES [/INST] Redundant comparison of two null values</s>486<s>[INST] RCN_REDUNDANT_COMPARISON_OF_NULL_AND_NONNULL_VALUE [/INST] Redundant comparison of non-null value to null</s>487<s>[INST] VA_FORMAT_STRING_BAD_CONVERSION_TO_BOOLEAN [/INST] Non-Boolean argument formatted using %b format specifier</s>488<s>[INST] SA_LOCAL_SELF_ASSIGNMENT [/INST] Self assignment of local variable</s>489<s>[INST] INT_BAD_REM_BY_1 [/INST] Integer remainder modulo 1</s>490<s>[INST] INT_VACUOUS_COMPARISON [/INST] Vacuous comparison of integer value</s>491<s>[INST] INT_VACUOUS_BIT_OPERATION [/INST] Vacuous bit mask operation on integer value</s>492<s>[INST] SA_LOCAL_DOUBLE_ASSIGNMENT [/INST] Double assignment of local variable</s>493<s>[INST] SA_FIELD_DOUBLE_ASSIGNMENT [/INST] Double assignment of field</s>494<s>[INST] DLS_DEAD_LOCAL_STORE_IN_RETURN [/INST] Useless assignment in return statement</s>495<s>[INST] DLS_DEAD_LOCAL_STORE [/INST] Dead store to local variable</s>496<s>[INST] DLS_DEAD_LOCAL_STORE_SHADOWS_FIELD [/INST] Dead store to local variable that shadows field</s>497<s>[INST] DLS_DEAD_LOCAL_STORE_OF_NULL [/INST] Dead store of null to local variable</s>498<s>[INST] REC_CATCH_EXCEPTION [/INST] Exception is caught when Exception is not thrown</s>499<s>[INST] FE_FLOATING_POINT_EQUALITY [/INST] Test for floating point equality</s>500<s>[INST] CD_CIRCULAR_DEPENDENCY [/INST] Test for circular dependencies among classes</s>501<s>[INST] RI_REDUNDANT_INTERFACES [/INST] Class implements same interface as superclass</s>502<s>[INST] MTIA_SUSPECT_STRUTS_INSTANCE_FIELD [/INST] Class extends Struts Action class and uses instance variables</s>503<s>[INST] MTIA_SUSPECT_SERVLET_INSTANCE_FIELD [/INST] Class extends Servlet class and uses instance variables</s>504<s>[INST] PS_PUBLIC_SEMAPHORES [/INST] Class exposes synchronization and semaphores in its public interface</s>505<s>[INST] ICAST_INTEGER_MULTIPLY_CAST_TO_LONG [/INST] Result of integer multiplication cast to long</s>506<s>[INST] ICAST_IDIV_CAST_TO_DOUBLE [/INST] Integral division result cast to double or float</s>507<s>[INST] BC_BAD_CAST_TO_CONCRETE_COLLECTION [/INST] Questionable cast to concrete collection</s>508<s>[INST] BC_UNCONFIRMED_CAST [/INST] Unchecked/unconfirmed cast</s>509<s>[INST] BC_UNCONFIRMED_CAST_OF_RETURN_VALUE [/INST] Unchecked/unconfirmed cast of return value from method</s>510<s>[INST] BC_VACUOUS_INSTANCEOF [/INST] instanceof will always return true</s>511<s>[INST] BC_BAD_CAST_TO_ABSTRACT_COLLECTION [/INST] Questionable cast to abstract collection</s>512<s>[INST] IM_BAD_CHECK_FOR_ODD [/INST] Check for oddness that won’t work for negative numbers</s>513<s>[INST] IM_AVERAGE_COMPUTATION_COULD_OVERFLOW [/INST] Computation of average could overflow</s>514<s>[INST] ICAST_QUESTIONABLE_UNSIGNED_RIGHT_SHIFT [/INST] Unsigned right shift cast to short/byte</s>515<s>[INST] DMI_HARDCODED_ABSOLUTE_FILENAME [/INST] Code contains a hard coded reference to an absolute pathname</s>516<s>[INST] DMI_USELESS_SUBSTRING [/INST] Invocation of substring</s>517<s>[INST] ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD [/INST] Write to static field from instance method</s>518<s>[INST] DMI_NONSERIALIZABLE_OBJECT_WRITTEN [/INST] Non serializable object written to ObjectOutput</s>519<s>[INST] DB_DUPLICATE_BRANCHES [/INST] Method uses the same code for two branches</s>520<s>[INST] DB_DUPLICATE_SWITCH_CLAUSES [/INST] Method uses the same code for two switch clauses</s>521<s>[INST] XFB_XML_FACTORY_BYPASS [/INST] Method directly allocates a specific implementation of xml interfaces</s>522<s>[INST] USM_USELESS_SUBCLASS_METHOD [/INST] Method superfluously delegates to parent class method</s>523<s>[INST] USM_USELESS_ABSTRACT_METHOD [/INST] Abstract Method is already defined in implemented interface</s>524<s>[INST] CI_CONFUSED_INHERITANCE [/INST] Class is final but declares protected field</s>525"<s>[INST] TQ_EXPLICIT_UNKNOWN_SOURCE_VALUE_REACHES_NEVER_SINK [/INST] Value required to not have type qualifier, but marked as unknown</s>"526"<s>[INST] TQ_EXPLICIT_UNKNOWN_SOURCE_VALUE_REACHES_ALWAYS_SINK [/INST] Value required to have type qualifier, but marked as unknown</s>"527<s>[INST] NP_METHOD_RETURN_RELAXING_ANNOTATION [/INST] Method relaxes nullness annotation on return value</s>528<s>[INST] NP_METHOD_PARAMETER_TIGHTENS_ANNOTATION [/INST] Method tightens nullness annotation on parameter</s>529<s>[INST] ANDROID_BROADCAST [/INST] Broadcast (Android)</s>530<s>[INST] ANDROID_EXTERNAL_FILE_ACCESS [/INST] External file access (Android)</s>531<s>[INST] ANDROID_GEOLOCATION [/INST] WebView with geolocation activated (Android)</s>532<s>[INST] ANDROID_WEB_VIEW_JAVASCRIPT [/INST] WebView with JavaScript enabled (Android)</s>533<s>[INST] ANDROID_WEB_VIEW_JAVASCRIPT_INTERFACE [/INST] WebView with JavaScript interface (Android)</s>534<s>[INST] ANDROID_WORLD_WRITABLE [/INST] World writable file (Android)</s>535<s>[INST] AWS_QUERY_INJECTION [/INST] AWS Query Injection</s>536<s>[INST] BAD_HEXA_CONVERSION [/INST] Bad hexadecimal concatenation</s>537<s>[INST] BEAN_PROPERTY_INJECTION [/INST] JavaBeans Property Injection</s>538<s>[INST] BLOWFISH_KEY_SIZE [/INST] Blowfish usage with short key</s>539<s>[INST] CIPHER_INTEGRITY [/INST] Cipher with no integrity</s>540<s>[INST] COMMAND_INJECTION [/INST] Potential Command Injection</s>541<s>[INST] COOKIE_PERSISTENT [/INST] Persistent Cookie Usage</s>542<s>[INST] COOKIE_USAGE [/INST] Potentially sensitive data in a cookie</s>543<s>[INST] CRLF_INJECTION_LOGS [/INST] Potential CRLF Injection for logs</s>544<s>[INST] CUSTOM_INJECTION [/INST] Potential injection (custom)</s>545<s>[INST] CUSTOM_MESSAGE_DIGEST [/INST] Message digest is custom</s>546<s>[INST] DEFAULT_HTTP_CLIENT [/INST] DefaultHttpClient with default constructor is not compatible with TLS 1.2</s>547<s>[INST] DES_USAGE [/INST] DES is insecure</s>548<s>[INST] DESERIALIZATION_GADGET [/INST] This class could be used as deserialization gadget</s>549<s>[INST] ECB_MODE [/INST] ECB mode is insecure</s>550<s>[INST] EL_INJECTION [/INST] Potential code injection when using Expression Language (EL)</s>551<s>[INST] ESAPI_ENCRYPTOR [/INST] Use of ESAPI Encryptor</s>552<s>[INST] EXTERNAL_CONFIG_CONTROL [/INST] Potential external control of configuration</s>553<s>[INST] FILE_UPLOAD_FILENAME [/INST] Tainted filename read</s>554<s>[INST] FORMAT_STRING_MANIPULATION [/INST] Format String Manipulation</s>555<s>[INST] HARD_CODE_KEY [/INST] Hard Coded Key</s>556<s>[INST] HARD_CODE_PASSWORD [/INST] Hard Coded Password</s>557<s>[INST] HAZELCAST_SYMMETRIC_ENCRYPTION [/INST] Hazelcast symmetric encryption</s>558<s>[INST] HTTP_PARAMETER_POLLUTION [/INST] HTTP Parameter Pollution</s>559<s>[INST] HTTP_RESPONSE_SPLITTING [/INST] Potential HTTP Response Splitting</s>560<s>[INST] HTTPONLY_COOKIE [/INST] Cookie without the HttpOnly flag</s>561<s>[INST] INFORMATION_EXPOSURE_THROUGH_AN_ERROR_MESSAGE [/INST] Information Exposure Through An Error Message</s>562<s>[INST] INSECURE_COOKIE [/INST] Cookie without the secure flag</s>563<s>[INST] INSECURE_SMTP_SSL [/INST] Insecure SMTP SSL connection</s>564<s>[INST] JACKSON_UNSAFE_DESERIALIZATION [/INST] Unsafe Jackson deserialization configuration</s>565<s>[INST] JAXRS_ENDPOINT [/INST] Found JAX-RS REST endpoint</s>566<s>[INST] JAXWS_ENDPOINT [/INST] Found JAX-WS SOAP endpoint</s>567<s>[INST] JSP_INCLUDE [/INST] Dynamic JSP inclusion</s>568<s>[INST] JSP_JSTL_OUT [/INST] Escaping of special XML characters is disabled</s>569<s>[INST] JSP_SPRING_EVAL [/INST] Dynamic variable in Spring expression</s>570<s>[INST] JSP_XSLT [/INST] A malicious XSLT could be provided</s>571<s>[INST] LDAP_ANONYMOUS [/INST] Anonymous LDAP bind</s>572<s>[INST] LDAP_ENTRY_POISONING [/INST] LDAP Entry Poisoning</s>573<s>[INST] LDAP_INJECTION [/INST] Potential LDAP Injection</s>574<s>[INST] MALICIOUS_XSLT [/INST] A malicious XSLT could be provided</s>575<s>[INST] NULL_CIPHER [/INST] NullCipher is insecure</s>576<s>[INST] OBJECT_DESERIALIZATION [/INST] Object deserialization is used</s>577<s>[INST] OGNL_INJECTION [/INST] Potential code injection when using OGNL expression</s>578<s>[INST] PADDING_ORACLE [/INST] Cipher is susceptible to Padding Oracle</s>579<s>[INST] PATH_TRAVERSAL_IN [/INST] Potential Path Traversal (file read)</s>580<s>[INST] PATH_TRAVERSAL_OUT [/INST] Potential Path Traversal (file write)</s>581<s>[INST] PERMISSIVE_CORS [/INST] Overly permissive CORS policy</s>582<s>[INST] PLAY_UNVALIDATED_REDIRECT [/INST] Unvalidated Redirect (Play Framework)</s>583<s>[INST] PREDICTABLE_RANDOM [/INST] Predictable pseudorandom number generator</s>584<s>[INST] PREDICTABLE_RANDOM_SCALA [/INST] Predictable pseudorandom number generator (Scala)</s>585<s>[INST] REDOS [/INST] Regex DOS (ReDOS)</s>586<s>[INST] REQUESTDISPATCHER_FILE_DISCLOSURE [/INST] RequestDispatcher File Disclosure</s>587<s>[INST] RSA_KEY_SIZE [/INST] RSA usage with short key</s>588<s>[INST] RSA_NO_PADDING [/INST] RSA with no padding is insecure</s>589<s>[INST] SCALA_COMMAND_INJECTION [/INST] Potential Command Injection (Scala)</s>590<s>[INST] SCALA_PATH_TRAVERSAL_IN [/INST] Potential Path Traversal (file read)</s>591<s>[INST] SCALA_PLAY_SSRF [/INST] Scala Play Server-Side Request Forgery (SSRF)</s>592<s>[INST] SCALA_SENSITIVE_DATA_EXPOSURE [/INST] Potential information leakage in Scala Play</s>593<s>[INST] SCALA_SQL_INJECTION_ANORM [/INST] Potential Scala Anorm Injection</s>594<s>[INST] SCALA_SQL_INJECTION_SLICK [/INST] Potential Scala Slick Injection</s>595<s>[INST] SCALA_XSS_MVC_API [/INST] Potential XSS in Scala MVC API engine</s>596<s>[INST] SCALA_XSS_TWIRL [/INST] Potential XSS in Scala Twirl template engine</s>597<s>[INST] SCRIPT_ENGINE_INJECTION [/INST] Potential code injection when using Script Engine</s>598<s>[INST] SEAM_LOG_INJECTION [/INST] Potential code injection in Seam logging call</s>599<s>[INST] SERVLET_CONTENT_TYPE [/INST] Untrusted Content-Type header</s>600<s>[INST] SERVLET_HEADER [/INST] HTTP headers untrusted</s>601<s>[INST] SERVLET_HEADER_REFERER [/INST] Untrusted Referer header</s>602<s>[INST] SERVLET_HEADER_USER_AGENT [/INST] Untrusted User-Agent header</s>603<s>[INST] SERVLET_PARAMETER [/INST] Untrusted servlet parameter</s>604<s>[INST] SERVLET_QUERY_STRING [/INST] Untrusted query string</s>605<s>[INST] SERVLET_SERVER_NAME [/INST] Untrusted Hostname header</s>606<s>[INST] SERVLET_SESSION_ID [/INST] Untrusted session cookie value</s>607<s>[INST] SMTP_HEADER_INJECTION [/INST] SMTP Header Injection</s>608<s>[INST] SPEL_INJECTION [/INST] Potential code injection when using Spring Expression</s>609<s>[INST] SPRING_CSRF_PROTECTION_DISABLED [/INST] Spring CSRF protection disabled</s>610<s>[INST] SPRING_CSRF_UNRESTRICTED_REQUEST_MAPPING [/INST] Spring CSRF unrestricted RequestMapping</s>611<s>[INST] SPRING_ENDPOINT [/INST] Found Spring endpoint</s>612<s>[INST] SPRING_FILE_DISCLOSURE [/INST] Spring File Disclosure</s>613<s>[INST] SPRING_UNVALIDATED_REDIRECT [/INST] Spring Unvalidated Redirect</s>614<s>[INST] SQL_INJECTION [/INST] Potential SQL Injection</s>615<s>[INST] SQL_INJECTION_ANDROID [/INST] Potential Android SQL Injection</s>616<s>[INST] SQL_INJECTION_HIBERNATE [/INST] Potential SQL/HQL Injection (Hibernate)</s>617<s>[INST] SQL_INJECTION_JDBC [/INST] Potential JDBC Injection</s>618<s>[INST] SQL_INJECTION_JDO [/INST] Potential SQL/JDOQL Injection (JDO)</s>619<s>[INST] SQL_INJECTION_JPA [/INST] Potential SQL/JPQL Injection (JPA)</s>620<s>[INST] SQL_INJECTION_SPRING_JDBC [/INST] Potential JDBC Injection (Spring JDBC)</s>621<s>[INST] SQL_INJECTION_TURBINE [/INST] Potential SQL Injection with Turbine</s>622<s>[INST] SSL_CONTEXT [/INST] Weak SSLContext</s>623<s>[INST] STATIC_IV [/INST] Static IV</s>624<s>[INST] STRUTS_FILE_DISCLOSURE [/INST] Struts File Disclosure</s>625<s>[INST] STRUTS_FORM_VALIDATION [/INST] Struts Form without input validation</s>626<s>[INST] STRUTS1_ENDPOINT [/INST] Found Struts 1 endpoint</s>627<s>[INST] STRUTS2_ENDPOINT [/INST] Found Struts 2 endpoint</s>628<s>[INST] TAPESTRY_ENDPOINT [/INST] Found Tapestry page</s>629<s>[INST] TDES_USAGE [/INST] DESede is insecure</s>630<s>[INST] TEMPLATE_INJECTION_FREEMARKER [/INST] Potential template injection with Freemarker</s>631<s>[INST] TEMPLATE_INJECTION_VELOCITY [/INST] Potential template injection with Velocity</s>632<s>[INST] TRUST_BOUNDARY_VIOLATION [/INST] Trust Boundary Violation</s>633<s>[INST] UNENCRYPTED_SERVER_SOCKET [/INST] Unencrypted Server Socket</s>634<s>[INST] UNENCRYPTED_SOCKET [/INST] Unencrypted Socket</s>635<s>[INST] UNSAFE_HASH_EQUALS [/INST] Unsafe hash equals</s>636<s>[INST] UNVALIDATED_REDIRECT [/INST] Unvalidated Redirect</s>637<s>[INST] URL_REWRITING [/INST] URL rewriting method</s>638<s>[INST] URLCONNECTION_SSRF_FD [/INST] URLConnection Server-Side Request Forgery (SSRF) and File Disclosure</s>639<s>[INST] WEAK_FILENAMEUTILS [/INST] FilenameUtils not filtering null bytes</s>640<s>[INST] WEAK_HOSTNAME_VERIFIER [/INST] HostnameVerifier that accept any signed certificates</s>641"<s>[INST] WEAK_MESSAGE_DIGEST_MD5 [/INST] MD2, MD4 and MD5 are weak hash functions</s>"642<s>[INST] WEAK_MESSAGE_DIGEST_SHA1 [/INST] SHA-1 is a weak hash function</s>643<s>[INST] WEAK_TRUST_MANAGER [/INST] TrustManager that accept any certificates</s>644<s>[INST] WICKET_ENDPOINT [/INST] Found Wicket WebPage</s>645<s>[INST] XML_DECODER [/INST] XMLDecoder usage</s>646<s>[INST] XPATH_INJECTION [/INST] Potential XPath Injection</s>647<s>[INST] XSS_JSP_PRINT [/INST] Potential XSS in JSP</s>648<s>[INST] XSS_REQUEST_WRAPPER [/INST] XSSRequestWrapper is a weak XSS protection</s>649<s>[INST] XSS_SERVLET [/INST] Potential XSS in Servlet</s>650<s>[INST] XXE_DOCUMENT [/INST] XML parsing vulnerable to XXE (DocumentBuilder)</s>651<s>[INST] XXE_DTD_TRANSFORM_FACTORY [/INST] XML parsing vulnerable to XXE (TransformerFactory)</s>652<s>[INST] XXE_SAXPARSER [/INST] XML parsing vulnerable to XXE (SAXParser)</s>653<s>[INST] XXE_XMLREADER [/INST] XML parsing vulnerable to XXE (XMLReader)</s>654<s>[INST] XXE_XMLSTREAMREADER [/INST] XML parsing vulnerable to XXE (XMLStreamReader)</s>655<s>[INST] XXE_XSLT_TRANSFORM_FACTORY [/INST] XSLT parsing vulnerable to XXE (TransformerFactory)</s>656<s>[INST] XSS_REQUEST_PARAMETER_TO_SEND_ERROR [/INST] Servlet reflected cross site scripting vulnerability in error page</s>657<s>[INST] XSS_REQUEST_PARAMETER_TO_SERVLET_WRITER [/INST] Servlet reflected cross site scripting vulnerability</s>658<s>[INST] XSS_REQUEST_PARAMETER_TO_JSP_WRITER [/INST] JSP reflected cross site scripting vulnerability</s>659<s>[INST] HRS_REQUEST_PARAMETER_TO_HTTP_HEADER [/INST] HTTP Response splitting vulnerability</s>660<s>[INST] HRS_REQUEST_PARAMETER_TO_COOKIE [/INST] HTTP cookie formed from untrusted input</s>661<s>[INST] PT_ABSOLUTE_PATH_TRAVERSAL [/INST] Absolute path traversal in servlet</s>662<s>[INST] PT_RELATIVE_PATH_TRAVERSAL [/INST] Relative path traversal in servlet</s>663<s>[INST] DMI_CONSTANT_DB_PASSWORD [/INST] Hardcoded constant database password</s>664<s>[INST] DMI_EMPTY_DB_PASSWORD [/INST] Empty database password</s>665<s>[INST] ME_ENUM_FIELD_SETTER [/INST] Public enum method unconditionally sets its field</s>666<s>[INST] DP_DO_INSIDE_DO_PRIVILEGED [/INST] Method invoked that should be only be invoked inside a doPrivileged block</s>667<s>[INST] DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED [/INST] Classloaders should only be created inside doPrivileged block</s>668<s>[INST] XXE_XPATH [/INST] XML External Entity (XXE) attacks can occur when an XML parser supports XML entities while processing XML received from an untrusted source.</s>669"<s>[INST] SPRING_ENTITY_LEAK [/INST] Persistent objects should never be returned/accepted by APIs. They might lead to leaking business logic over the UI, unauthorized tampering of persistent objects in database.</s>"670<s>[INST] RPC_ENABLED_EXTENSIONS [/INST] Enabling extensions in Apache XML RPC server or client can lead to deserialization vulnerability which would allow an attacker to execute arbitrary code.</s>671<s>[INST] WICKET_XSS1 [/INST] Disabling HTML escaping put the application at risk for Cross-Site Scripting (XSS).</s>672<s>[INST] JumbledIncrementer [/INST] Avoid modifying an outer loop incrementer in an inner loop for update expression</s>673<s>[INST] ForLoopShouldBeWhileLoop [/INST] This for loop could be simplified to a while loop</s>674<s>[INST] OverrideBothEqualsAndHashcode [/INST] Ensure you override both equals() and hashCode()</s>675<s>[INST] DoubleCheckedLocking [/INST] Double checked locking is not thread safe in Java.</s>676<s>[INST] ReturnFromFinallyBlock [/INST] Avoid returning from a finally block</s>677<s>[INST] UnconditionalIfStatement [/INST] Do not use 'if' statements that are always true or always false</s>678<s>[INST] CollapsibleIfStatements [/INST] These nested if statements could be combined</s>679<s>[INST] ClassCastExceptionWithToArray [/INST] This usage of the Collection.toArray() method will throw a ClassCastException.</s>680<s>[INST] AvoidDecimalLiteralsInBigDecimalConstructor [/INST] Avoid creating BigDecimal with a decimal (float/double) literal. Use a String literal</s>681<s>[INST] MisplacedNullCheck [/INST] The null check here is misplaced; if the variable is null there will be a NullPointerException</s>682<s>[INST] AvoidThreadGroup [/INST] Avoid using java.lang.ThreadGroup; it is not thread safe</s>683<s>[INST] BrokenNullCheck [/INST] Method call on object which may be null</s>684"<s>[INST] BigIntegerInstantiation [/INST] Don't create instances of already existing BigInteger and BigDecimal (ZERO, ONE, TEN)</s>"685<s>[INST] AvoidUsingOctalValues [/INST] Do not start a literal by 0 unless it's an octal value</s>686<s>[INST] AvoidUsingHardCodedIP [/INST] Do not hard code the IP address ${variableName}</s>687"<s>[INST] CheckResultSet [/INST] Always check the return of one of the navigation method (next,previous,first,last) of a ResultSet.</s>"688"<s>[INST] AvoidMultipleUnaryOperators [/INST] Using multiple unary operators may be a bug, and/or is confusing.</s>"689<s>[INST] ExtendsObject [/INST] No need to explicitly extend Object.</s>690<s>[INST] CheckSkipResult [/INST] Check the value returned by the skip() method of an InputStream to see if the requested number of bytes has been skipped.</s>691<s>[INST] AvoidBranchingStatementAsLastInLoop [/INST] Avoid using a branching statement as the last in a loop.</s>692"<s>[INST] DontCallThreadRun [/INST] Don't call Thread.run() explicitly, use Thread.start()</s>"693"<s>[INST] DontUseFloatTypeForLoopIndices [/INST] Don't use floating point for loop indices. If you must use floating point, use double.</s>"694<s>[INST] SimplifiedTernary [/INST] Ternary operators that can be simplified with || or &&</s>695<s>[INST] IfStmtsMustUseBraces [/INST] Avoid using if statements without curly braces</s>696<s>[INST] WhileLoopsMustUseBraces [/INST] Avoid using 'while' statements without curly braces</s>697<s>[INST] IfElseStmtsMustUseBraces [/INST] Avoid using 'if...else' statements without curly braces</s>698<s>[INST] ForLoopsMustUseBraces [/INST] Avoid using 'for' statements without curly braces</s>699<s>[INST] ProperCloneImplementation [/INST] Object clone() should be implemented with super.clone()</s>700<s>[INST] CloneMethodMustImplementCloneable [/INST] clone() method should be implemented only if implementing Cloneable interface</s>701<s>[INST] CloneMethodReturnTypeMustMatchClassName [/INST] The return type of the clone() method must be the class name when implements Cloneable</s>702<s>[INST] CloneMethodMustBePublic [/INST] clone() method must be public if the class implements Cloneable</s>703<s>[INST] CommentRequired [/INST] Comment is required</s>704<s>[INST] CommentSize [/INST] Comment is too large</s>705<s>[INST] CommentContent [/INST] Invalid words or phrases found</s>706<s>[INST] CommentDefaultAccessModifier [/INST] Missing commented default access modifier</s>707<s>[INST] UnnecessaryConstructor [/INST] Avoid unnecessary constructors - the compiler will generate these for you</s>708<s>[INST] NullAssignment [/INST] Assigning an Object to null is a code smell.  Consider refactoring.</s>709"<s>[INST] OnlyOneReturn [/INST] A method should have only one exit point, and that should be the last statement in the method</s>"710<s>[INST] AssignmentInOperand [/INST] Avoid assignments in operands</s>711<s>[INST] AtLeastOneConstructor [/INST] Each class should declare at least one constructor</s>712<s>[INST] DontImportSun [/INST] Avoid importing anything from the 'sun.*' packages</s>713<s>[INST] SuspiciousOctalEscape [/INST] Suspicious decimal characters following octal escape in string literal</s>714<s>[INST] CallSuperInConstructor [/INST] It is a good practice to call super() in a constructor</s>715<s>[INST] UnnecessaryParentheses [/INST] This statement may have some unnecessary parentheses</s>716"<s>[INST] AvoidFinalLocalVariable [/INST] Avoid using final local variables, turn them into fields</s>"717<s>[INST] AvoidUsingVolatile [/INST] Use of modifier volatile is not recommended.</s>718<s>[INST] AvoidUsingNativeCode [/INST] The use of native code is not recommended.</s>719"<s>[INST] AvoidAccessibilityAlteration [/INST] You should modify visibility of class or methods using getDeclaredConstructors(), getDeclaredConstructor(Class[]), setAccessible() or PrivilegedAction.</s>"720<s>[INST] DoNotCallGarbageCollectionExplicitly [/INST] Do not explicitly trigger a garbage collection.</s>721"<s>[INST] OneDeclarationPerLine [/INST] Use one line for each declaration, it enhances code readability.</s>"722"<s>[INST] AvoidPrefixingMethodParameters [/INST] Avoid prefixing parameters by in, out or inOut. Uses Javadoc to document this behavior.</s>"723<s>[INST] AvoidLiteralsInIfCondition [/INST] Avoid using Literals in Conditional Statements</s>724"<s>[INST] UseObjectForClearerAPI [/INST] Rather than using a lot of String arguments, consider using a container object for those values.</s>"725"<s>[INST] UseConcurrentHashMap [/INST] If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation</s>"726<s>[INST] LooseCoupling [/INST] Avoid using implementation types like ''{0}''; use the interface instead</s>727<s>[INST] LoosePackageCoupling [/INST] Use of ''{0}'' outside of package hierarchy ''{1}'' is not recommended; use recommended classes instead</s>728"<s>[INST] UseUtilityClass [/INST] 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.</s>"729<s>[INST] SimplifyBooleanReturns [/INST] Avoid unnecessary if..then..else statements when returning booleans</s>730<s>[INST] SimplifyBooleanExpressions [/INST] Avoid unnecessary comparisons in boolean expressions</s>731<s>[INST] SwitchStmtsShouldHaveDefault [/INST] Switch statements should have a default label</s>732<s>[INST] AvoidDeeplyNestedIfStmts [/INST] Deeply nested if..then statements are hard to read</s>733<s>[INST] SwitchDensity [/INST] A high ratio of statements to labels in a switch statement.  Consider refactoring.</s>734<s>[INST] ConstructorCallsOverridableMethod [/INST] Overridable {0} called during object construction</s>735<s>[INST] AccessorClassGeneration [/INST] Avoid instantiation through private constructors from outside of the constructor's class.</s>736<s>[INST] FinalFieldCouldBeStatic [/INST] This final field could be made static</s>737<s>[INST] CloseResource [/INST] Ensure that resources like this {0} object are closed after use</s>738<s>[INST] NonStaticInitializer [/INST] Non-static initializers are confusing</s>739<s>[INST] DefaultLabelNotLastInSwitchStmt [/INST] The default label should be the last label in a switch statement</s>740<s>[INST] NonCaseLabelInSwitchStatement [/INST] A non-case label was present in a switch statement</s>741<s>[INST] OptimizableToArrayCall [/INST] This call to Collection.toArray() may be optimizable</s>742<s>[INST] BadComparison [/INST] Avoid equality comparisons with Double.NaN</s>743<s>[INST] EqualsNull [/INST] Avoid using equals() to compare against null</s>744<s>[INST] ConfusingTernary [/INST] Avoid if (x != y) ..; else ..;</s>745<s>[INST] InstantiationToGetClass [/INST] Avoid instantiating an object just to call getClass() on it; use the .class public member instead</s>746<s>[INST] IdempotentOperations [/INST] Avoid idempotent operations (like assigning a variable to itself).</s>747"<s>[INST] SimpleDateFormatNeedsLocale [/INST] When instantiating a SimpleDateFormat object, specify a Locale</s>"748<s>[INST] ImmutableField [/INST] Private field ''{0}'' could be made final; it is only initialized in the declaration or constructor.</s>749"<s>[INST] UseLocaleWithCaseConversions [/INST] When doing a String.toLowerCase()/toUpperCase() call, use a Locale</s>"750<s>[INST] AvoidProtectedFieldInFinalClass [/INST] Avoid protected fields in a final class.  Change to private or package access.</s>751<s>[INST] AssignmentToNonFinalStatic [/INST] Possible unsafe assignment to a non-final static field in a constructor.</s>752<s>[INST] MissingStaticMethodInNonInstantiatableClass [/INST] Class cannot be instantiated and does not provide any static methods or fields</s>753<s>[INST] AvoidSynchronizedAtMethodLevel [/INST] Use block level rather than method level synchronization</s>754<s>[INST] MissingBreakInSwitch [/INST] A switch statement does not contain a break</s>755<s>[INST] UseNotifyAllInsteadOfNotify [/INST] Call Thread.notifyAll() rather than Thread.notify()</s>756<s>[INST] AvoidInstanceofChecksInCatchClause [/INST] An instanceof check is being performed on the caught exception.  Create a separate catch clause for this exception type.</s>757<s>[INST] AbstractClassWithoutAbstractMethod [/INST] This abstract class does not have any abstract methods</s>758<s>[INST] SimplifyConditional [/INST] No need to check for null before an instanceof</s>759<s>[INST] CompareObjectsWithEquals [/INST] Use equals() to compare object references.</s>760<s>[INST] PositionLiteralsFirstInComparisons [/INST] Position literals first in String comparisons</s>761<s>[INST] PositionLiteralsFirstInCaseInsensitiveComparisons [/INST] Position literals first in String comparisons for EqualsIgnoreCase</s>762<s>[INST] UnnecessaryLocalBeforeReturn [/INST] Consider simply returning the value vs storing it in local variable ''{0}''</s>763<s>[INST] NonThreadSafeSingleton [/INST] Singleton is not thread safe</s>764<s>[INST] SingleMethodSingleton [/INST] Class contains multiple getInstance methods. Please review.</s>765<s>[INST] SingletonClassReturningNewInstance [/INST] getInstance method always creates a new object and hence does not comply to Singleton Design Pattern behaviour. Please review</s>766<s>[INST] UncommentedEmptyMethodBody [/INST] Document empty method body</s>767<s>[INST] UncommentedEmptyConstructor [/INST] Document empty constructor</s>768<s>[INST] AvoidConstantsInterface [/INST] An Interface should be used only to model a behaviour; consider converting this to a class.</s>769<s>[INST] UnsynchronizedStaticDateFormatter [/INST] Static DateFormatter objects should be accessed in a synchronized manner</s>770"<s>[INST] PreserveStackTrace [/INST] New exception is thrown in catch block, original stack trace may be lost</s>"771"<s>[INST] UseCollectionIsEmpty [/INST] Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty()</s>"772<s>[INST] ClassWithOnlyPrivateConstructorsShouldBeFinal [/INST] A class which only has private constructors should be final</s>773<s>[INST] EmptyMethodInAbstractClassShouldBeAbstract [/INST] An empty method in an abstract class should be abstract instead</s>774<s>[INST] SingularField [/INST] Perhaps ''{0}'' could be replaced by a local variable.</s>775<s>[INST] AbstractClassWithoutAnyMethod [/INST] No abstract method which means that the keyword is most likely used to prevent instantiation. Use a private or protected constructor instead.</s>776"<s>[INST] TooFewBranchesForASwitchStatement [/INST] A switch with less than three branches is inefficient, use a 'if statement' instead.</s>"777<s>[INST] LogicInversion [/INST] Use opposite operator instead of the logic complement operator.</s>778<s>[INST] UseVarargs [/INST] Consider using varargs for methods or constructors which take an array the last parameter.</s>779"<s>[INST] FieldDeclarationsShouldBeAtStartOfClass [/INST] Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes.</s>"780<s>[INST] AvoidProtectedMethodInFinalClassNotExtending [/INST] Avoid protected methods in a final class that doesn't extend anything other than Object.  Change to private or package access.</s>781"<s>[INST] ConstantsInInterface [/INST] Avoid constants in interfaces. Interfaces define types, constants are implementation details better placed in classes or enums. See Effective Java, item 19.</s>"782<s>[INST] EmptyCatchBlock [/INST] Avoid empty catch blocks</s>783<s>[INST] EmptyIfStmt [/INST] Avoid empty 'if' statements</s>784<s>[INST] EmptyWhileStmt [/INST] Avoid empty 'while' statements</s>785<s>[INST] EmptyTryBlock [/INST] Avoid empty try blocks</s>786<s>[INST] EmptyFinallyBlock [/INST] Avoid empty finally blocks</s>787<s>[INST] EmptySwitchStatements [/INST] Avoid empty switch statements</s>788<s>[INST] EmptySynchronizedBlock [/INST] Avoid empty synchronized blocks</s>789<s>[INST] EmptyStatementNotInLoop [/INST] An empty statement (semicolon) not part of a loop</s>790<s>[INST] EmptyInitializer [/INST] Empty initializer was found</s>791<s>[INST] EmptyStatementBlock [/INST] Avoid empty block statements.</s>792<s>[INST] EmptyStaticInitializer [/INST] Empty static initializer was found</s>793<s>[INST] EmptyFinalizer [/INST] Avoid empty finalize methods</s>794<s>[INST] FinalizeOnlyCallsSuperFinalize [/INST] Finalize should do something besides just calling super.finalize()</s>795<s>[INST] FinalizeOverloaded [/INST] Finalize methods should not be overloaded</s>796<s>[INST] FinalizeDoesNotCallSuperFinalize [/INST] Last statement in finalize method should be a call to super.finalize()</s>797"<s>[INST] FinalizeShouldBeProtected [/INST] If you override finalize(), make it protected</s>"798<s>[INST] AvoidCallingFinalize [/INST] Avoid calling finalize() explicitly</s>799<s>[INST] TooManyStaticImports [/INST] Too many static imports may lead to messy code</s>800<s>[INST] UnnecessaryFullyQualifiedName [/INST] Unnecessary use of fully qualified name ''{0}'' due to existing {2}import ''{1}''</s>801"<s>[INST] UseProperClassLoader [/INST] In J2EE, getClassLoader() might not work as expected.  Use Thread.currentThread().getContextClassLoader() instead.</s>"802<s>[INST] MDBAndSessionBeanNamingConvention [/INST] SessionBean or MessageBean should be suffixed by Bean</s>803<s>[INST] RemoteSessionInterfaceNamingConvention [/INST] Remote Home interface of a Session EJB should be suffixed by 'Home'</s>804<s>[INST] LocalInterfaceSessionNamingConvention [/INST] The Local Interface of a Session EJB should be suffixed by 'Local'</s>805<s>[INST] LocalHomeNamingConvention [/INST] The Local Home interface of a Session EJB should be suffixed by 'LocalHome'</s>806<s>[INST] RemoteInterfaceNamingConvention [/INST] Remote Interface of a Session EJB should NOT be suffixed</s>807<s>[INST] DoNotCallSystemExit [/INST] System.exit() should not be used in J2EE/JEE apps</s>808<s>[INST] StaticEJBFieldShouldBeFinal [/INST] EJB's shouldn't have non-final static fields</s>809"<s>[INST] DoNotUseThreads [/INST] To be compliant to J2EE, a webapp should not use any thread.</s>"810"<s>[INST] BeanMembersShouldSerialize [/INST] Found non-transient, non-static member. Please mark as transient or provide accessors.</s>"811<s>[INST] MissingSerialVersionUID [/INST] Classes implementing Serializable should set a serialVersionUID</s>812"<s>[INST] JUnitStaticSuite [/INST] You have a suite() method that is not both public and static, so JUnit won't call it to get your TestSuite.  Is that what you wanted to do?</s>"813<s>[INST] JUnitSpelling [/INST] You may have misspelled a JUnit framework method (setUp or tearDown)</s>814<s>[INST] JUnitAssertionsShouldIncludeMessage [/INST] JUnit assertions should include a message</s>815<s>[INST] JUnitTestsShouldIncludeAssert [/INST] JUnit tests should include assert() or fail()</s>816<s>[INST] TestClassWithoutTestCases [/INST] This class name ends with 'Test' but contains no test cases</s>817<s>[INST] UnnecessaryBooleanAssertion [/INST] assertTrue(true) or similar statements are unnecessary</s>818<s>[INST] JUnitTestContainsTooManyAsserts [/INST] JUnit tests should not contain more than ${maximumAsserts} assert(s).</s>819<s>[INST] UseCorrectExceptionLogging [/INST] Use the correct logging statement for logging exceptions</s>820<s>[INST] ProperLogger [/INST] Logger should be defined private static final and have the correct class</s>821<s>[INST] GuardDebugLogging [/INST] debug logging that involves string concatenation should be guarded with isDebugEnabled() checks</s>822<s>[INST] GuardLogStatement [/INST] There is log block not surrounded by if</s>823<s>[INST] MoreThanOneLogger [/INST] Class contains more than one logger.</s>824<s>[INST] LoggerIsNotStaticFinal [/INST] The Logger variable declaration does not contain the static and final modifiers</s>825<s>[INST] SystemPrintln [/INST] {0} is used</s>826<s>[INST] AvoidPrintStackTrace [/INST] Avoid printStackTrace(); use a logger call instead.</s>827<s>[INST] GuardLogStatementJavaUtil [/INST] There is log block not surrounded by if</s>828<s>[INST] InvalidSlf4jMessageFormat [/INST] Invalid message format</s>829<s>[INST] ReplaceVectorWithList [/INST] Consider replacing this Vector with the newer java.util.List</s>830<s>[INST] ReplaceHashtableWithMap [/INST] Consider replacing this Hashtable with the newer java.util.Map</s>831<s>[INST] ReplaceEnumerationWithIterator [/INST] Consider replacing this Enumeration with the newer java.util.Iterator</s>832<s>[INST] AvoidEnumAsIdentifier [/INST] Avoid using enum as an identifier; it's a reserved word in JDK 1.5</s>833<s>[INST] AvoidAssertAsIdentifier [/INST] Avoid using assert as an identifier; it became a reserved word in JDK 1.4</s>834<s>[INST] JUnit4TestShouldUseBeforeAnnotation [/INST] JUnit 4 tests that set up tests should use the @Before annotation</s>835<s>[INST] JUnit4TestShouldUseAfterAnnotation [/INST] JUnit 4 tests that clean up tests should use the @After annotation</s>836<s>[INST] JUnit4TestShouldUseTestAnnotation [/INST] JUnit 4 tests that execute tests should use the @Test annotation</s>837"<s>[INST] JUnit4SuitesShouldUseSuiteAnnotation [/INST] JUnit 4 indicates test suites via annotations, not the suite method.</s>"838"<s>[INST] JUnitUseExpected [/INST] In JUnit4, use the @Test(expected) annotation to denote tests that should throw exceptions</s>"839<s>[INST] ShortVariable [/INST] Avoid variables with short names like {0}</s>840<s>[INST] LongVariable [/INST] Avoid excessively long variable names like {0}</s>841<s>[INST] ShortMethodName [/INST] Avoid using short method names</s>842<s>[INST] VariableNamingConventions [/INST] {0} variable {1} should begin with {2}</s>843<s>[INST] MethodNamingConventions [/INST] Method name does not begin with a lower case character.</s>844<s>[INST] ClassNamingConventions [/INST] Class names should begin with an uppercase character</s>845<s>[INST] AbstractNaming [/INST] Abstract classes should be named 'AbstractXXX'</s>846<s>[INST] AvoidDollarSigns [/INST] Avoid using dollar signs in variable/method/class/interface names</s>847<s>[INST] MethodWithSameNameAsEnclosingClass [/INST] Classes should not have non-constructor methods with the same name as the class</s>848<s>[INST] SuspiciousHashcodeMethodName [/INST] The method name and return type are suspiciously close to hashCode()</s>849<s>[INST] SuspiciousConstantFieldName [/INST] The field name indicates a constant but its modifiers do not</s>850<s>[INST] SuspiciousEqualsMethodName [/INST] The method name and parameter number are suspiciously close to equals(Object)</s>851<s>[INST] AvoidFieldNameMatchingTypeName [/INST] It is somewhat confusing to have a field name matching the declaring class name</s>852<s>[INST] AvoidFieldNameMatchingMethodName [/INST] Field {0} has the same name as a method</s>853<s>[INST] NoPackage [/INST] All classes and interfaces must belong to a named package</s>854<s>[INST] PackageCase [/INST] Package name contains upper case characters</s>855<s>[INST] MisleadingVariableName [/INST] Avoid naming non-fields with the prefix 'm_'</s>856<s>[INST] BooleanGetMethodName [/INST] A 'getX()' method which returns a boolean should be named 'isX()'</s>857<s>[INST] ShortClassName [/INST] Avoid short class names like {0}</s>858<s>[INST] GenericsNaming [/INST] Generics names should be a one letter long and upper case.</s>859<s>[INST] LocalVariableCouldBeFinal [/INST] Local variable ''{0}'' could be declared final</s>860<s>[INST] MethodArgumentCouldBeFinal [/INST] Parameter ''{0}'' is not assigned and could be declared final</s>861<s>[INST] AvoidInstantiatingObjectsInLoops [/INST] Avoid instantiating new objects inside loops</s>862<s>[INST] UseArrayListInsteadOfVector [/INST] Use ArrayList instead of Vector</s>863<s>[INST] UseStringBufferForStringAppends [/INST] Prefer StringBuffer over += for concatenating strings</s>864<s>[INST] UseArraysAsList [/INST] Use asList instead of tight loops</s>865<s>[INST] AvoidArrayLoops [/INST] System.arraycopy is more efficient</s>866<s>[INST] AddEmptyString [/INST] Do not add empty strings</s>867<s>[INST] RedundantFieldInitializer [/INST] Avoid using redundant field initializer for ''${variableName}''</s>868<s>[INST] PrematureDeclaration [/INST] Avoid declaring a variable if it is unreferenced before a possible exit point.</s>869<s>[INST] AvoidCatchingThrowable [/INST] A catch statement should never catch throwable since it includes errors.</s>870<s>[INST] SignatureDeclareThrowsException [/INST] A method/constructor shouldn't explicitly throw java.lang.Exception</s>871<s>[INST] ExceptionAsFlowControl [/INST] Avoid using exceptions as flow control.</s>872<s>[INST] AvoidCatchingNPE [/INST] Avoid catching NullPointerException; consider removing the cause of the NPE.</s>873<s>[INST] AvoidThrowingRawExceptionTypes [/INST] Avoid throwing raw exception types.</s>874<s>[INST] AvoidThrowingNullPointerException [/INST] Avoid throwing null pointer exceptions.</s>875<s>[INST] AvoidRethrowingException [/INST] A catch statement that catches an exception only to rethrow it should be avoided.</s>876<s>[INST] DoNotExtendJavaLangError [/INST] Exceptions should not extend java.lang.Error</s>877<s>[INST] DoNotThrowExceptionInFinally [/INST] A throw statement in a finally block makes the control flow hard to understand.</s>878<s>[INST] AvoidThrowingNewInstanceOfSameException [/INST] A catch statement that catches an exception only to wrap it in a new instance of the same type of exception and throw it should be avoided</s>879"<s>[INST] AvoidCatchingGenericException [/INST] Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block</s>"880<s>[INST] AvoidLosingExceptionInformation [/INST] Avoid statements in a catch block that invoke accessors on the exception without using the information</s>881<s>[INST] AvoidDuplicateLiterals [/INST] The String literal {0} appears {1} times in this file; the first occurrence is on line {2}</s>882<s>[INST] StringInstantiation [/INST] Avoid instantiating String objects; this is usually unnecessary.</s>883<s>[INST] StringToString [/INST] Avoid calling toString() on String objects; this is unnecessary.</s>884<s>[INST] InefficientStringBuffering [/INST] Avoid concatenating nonliterals in a StringBuffer/StringBuilder constructor or append().</s>885<s>[INST] UnnecessaryCaseChange [/INST] Using equalsIgnoreCase() is cleaner than using toUpperCase/toLowerCase().equals().</s>886<s>[INST] UseStringBufferLength [/INST] This is an inefficient use of StringBuffer.toString; call StringBuffer.length instead.</s>887<s>[INST] AppendCharacterWithChar [/INST] Avoid appending characters as strings in StringBuffer.append.</s>888<s>[INST] ConsecutiveAppendsShouldReuse [/INST] StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable.</s>889<s>[INST] ConsecutiveLiteralAppends [/INST] StringBuffer (or StringBuilder).append is called {0} consecutive times with literal Strings. Use a single append with a single combined String.</s>890<s>[INST] UseIndexOfChar [/INST] String.indexOf(char) is faster than String.indexOf(String).</s>891<s>[INST] InefficientEmptyStringCheck [/INST] String.trim().length()==0 is an inefficient way to validate an empty String.</s>892"<s>[INST] InsufficientStringBufferDeclaration [/INST] StringBuffer constructor is initialized with size {0}, but has at least {1} characters appended.</s>"893<s>[INST] UselessStringValueOf [/INST] No need to call String.valueOf to append to a string.</s>894<s>[INST] StringBufferInstantiationWithChar [/INST] Do not instantiate a StringBuffer or StringBuilder with a char</s>895<s>[INST] UseEqualsToCompareStrings [/INST] Use equals() to compare strings instead of ''=='' or ''!=''</s>896"<s>[INST] AvoidStringBufferField [/INST] StringBuffers can grow quite a lot, and so may become a source of memory leak (if the owning class has a long life time).</s>"897<s>[INST] MethodReturnsInternalArray [/INST] Returning ''{0}'' may expose an internal array.</s>898<s>[INST] ArrayIsStoredDirectly [/INST] The user-supplied array ''{0}'' is stored directly.</s>899<s>[INST] UnnecessaryConversionTemporary [/INST] Avoid unnecessary temporaries when converting primitives to Strings</s>900<s>[INST] UnnecessaryReturn [/INST] Avoid unnecessary return statements</s>901<s>[INST] UnnecessaryFinalModifier [/INST] Unnecessary final modifier in final class</s>902<s>[INST] UselessOverridingMethod [/INST] Overriding method merely calls super</s>903"<s>[INST] UselessOperationOnImmutable [/INST] An operation on an Immutable object (String, BigDecimal or BigInteger) won't change the object itself</s>"904<s>[INST] UnusedNullCheckInEquals [/INST] Invoke equals() on the object you''ve already ensured is not null</s>905<s>[INST] UselessParentheses [/INST] Useless parentheses.</s>906<s>[INST] UselessQualifiedThis [/INST] Useless qualified this usage in the same class.</s>907<s>[INST] UnusedPrivateField [/INST] Avoid unused private fields such as ''{0}''.</s>908<s>[INST] UnusedLocalVariable [/INST] Avoid unused local variables such as ''{0}''.</s>909<s>[INST] UnusedPrivateMethod [/INST] Avoid unused private methods such as ''{0}''.</s>910<s>[INST] UnusedFormalParameter [/INST] Avoid unused {0} parameters such as ''{1}''.</s>911<s>[INST] UnusedModifier [/INST] Avoid modifiers which are implied by the context</s>912"<s>[INST] UnsynchronizedStaticFormatter [/INST] Instances of java.text.Format are generally not synchronized. Sun recommends using separate format instances for each thread. If multiple threads must access a static formatter, the formatter must be synchronized on block level.</s>"913<s>[INST] InvalidLogMessageFormat [/INST] Check for messages in slf4j and log4j2 (since 6.19.0) loggers with non matching number of arguments and placeholders.</s>914"<s>[INST] AvoidUncheckedExceptionsInSignatures [/INST] A method or constructor should not explicitly declare unchecked exceptions in its throws clause. Java doesn’t force the caller to handle an unchecked exception, so it’s unnecessary except for documentation. A better practice is to document the exceptional cases with a @throws Javadoc tag, which allows being more descriptive.</s>"915"<s>[INST] DataClass [/INST] Data Classes are simple data holders, which reveal most of their state, and without complex functionality</s>"916"<s>[INST] NcssCount [/INST] This rule uses the NCSS (Non-Commenting Source Statements) metric to determine the number of lines of code in a class, method or constructor</s>"917"<s>[INST] ControlStatementBraces [/INST] Enforce a policy for braces on control statements. It is recommended to use braces on ‘if … else’ statements and loop statements, even if they are optional.</s>"918<s>[INST] FieldNamingConventions [/INST] Configurable naming conventions for field declarations.</s>919<s>[INST] FormalParameterNamingConventions [/INST] Configurable naming conventions for formal parameters of methods and lambdas</s>920<s>[INST] IdenticalCatchBranches [/INST] Identical catch branches use up vertical space and increase the complexity of code without adding functionality. It’s better style to collapse identical branches into a single multi-catch branch.</s>921"<s>[INST] LinguisticNaming [/INST] This rule finds Linguistic Naming Antipatterns. It checks for fields, that are named, as if they should be boolean but have a different type. It also checks for methods, that according to their name, should return a boolean, but don’t.</s>"922<s>[INST] LocalVariableNamingConventions [/INST] Configurable naming conventions for local variable declarations and other locally-scoped variables.</s>923<s>[INST] UnnecessaryAnnotationValueElement [/INST] Avoid the use of value in annotations when it’s the only element.</s>924<s>[INST] UnnecessaryCast [/INST] This rule detects when a cast is unnecessary while accessing collection elements. This rule is mostly useful for old java code before generics where introduced with java 1.5.</s>925<s>[INST] UseDiamondOperator [/INST] Use the diamond operator to let the type be inferred automatically.</s>926"<s>[INST] DetachedTestCase [/INST] The method appears to be a test case since it has public or default visibility, non-static access, no arguments, no return value, has no annotations, but is a member of a class that has one or more JUnit test cases. If it is a utility method, it should likely have private visibility. If it is an ignored test, it should be annotated with @Test and @Ignore.</s>"927<s>[INST] DoNotExtendJavaLangThrowable [/INST] Extend Exception or RuntimeException instead of Throwable.</s>928"<s>[INST] AccessorMethodGeneration [/INST] When accessing a private field / method from another class, the Java compiler will generate a accessor methods with package-private visibility.</s>"929"<s>[INST] AvoidMessageDigestField [/INST] Declaring a MessageDigest instance as a field make this instance directly available to multiple threads. Such sharing of MessageDigest instances should be avoided if possible since it leads to wrong results if the access is not synchronized correctly. Just create a new instance and use it locally, where you need it. Creating a new instance is easier than synchronizing access to a shared instance.</s>"930<s>[INST] AvoidReassigningLoopVariables [/INST] Reassigning loop variables can lead to hard-to-find bugs. Prevent or limit how these variables can be changed.</s>931<s>[INST] DoubleBraceInitialization [/INST] Double brace initialisation is a pattern to initialise eg collections concisely.</s>932<s>[INST] ForLoopCanBeForeach [/INST] Reports loops that can be safely replaced with the foreach syntax.</s>933<s>[INST] ForLoopVariableCount [/INST] Having a lot of control variables in a ‘for’ loop makes it harder to see what range of values the loop iterates over. By default this rule allows a regular ‘for’ loop with only one variable.</s>934"<s>[INST] LiteralsFirstInComparisons [/INST] Position literals first in all String comparisons, if the second argument is null then NullPointerExceptions can be avoided, they will just return false. Note that switching literal positions for compareTo and compareToIgnoreCase may change the result, see examples.</s>"935"<s>[INST] MissingOverride [/INST] Annotating overridden methods with @Override ensures at compile time that the method really overrides one, which helps refactoring and clarifies intent.</s>"936<s>[INST] UseTryWithResources [/INST] Java 7 introduced the try-with-resources statement. This statement ensures that each resource is closed at the end of the statement.</s>937"<s>[INST] WhileLoopWithLiteralBoolean [/INST] do {} while (true); requires reading the end of the statement before it is apparent that it loops forever, whereas while (true) {} is easier to understand.do {} while (false); is redundant, and if an inner variable scope is required, a block {} is sufficient.while (false) {} will never execute the block and can be removed in its entirety.</s>"938"<s>[INST] UseUnderscoresInNumericLiterals [/INST] Since Java 1.7, numeric literals can use underscores to separate digits.</s>"939<s>[INST] AvoidCalendarDateCreation [/INST] A Calendar is a heavyweight object and expensive to create.</s>940<s>[INST] AvoidFileStream [/INST] The FileInputStream and FileOutputStream classes contains a finalizer method which will cause garbage collection pauses.</s>941<s>[INST] UseIOStreamsWithApacheCommonsFileItem [/INST] Use of FileItem.get() and FileItem.getString() could exhaust memory since they load the entire file into memory.</s>942<s>[INST] HardCodedCryptoKey [/INST] Do not use hard coded values for cryptographic operations. Please store keys outside of source code.</s>943<s>[INST] InsecureCryptoIv [/INST] Do not use hard coded initialization vector in cryptographic operations. Please use a randomly generated IV.</s>944"<s>[INST] UseShortArrayInitializer [/INST] When declaring and initializing array fields or variables, it is not necessary to explicitly create a new array using new.</s>"945"<s>[INST] UnnecessaryModifier [/INST] Fields in interfaces and annotations are automatically public static final, and methods are public abstract.</s>"946<s>[INST] CallSuperLast [/INST] Super should be called at the end of the method.</s>947<s>[INST] CallSuperFirst [/INST] Super should be called at the start of the method.</s>948<s>[INST] AvoidReassigningCatchVariables [/INST] Avoid Reassigning Catch Variables</s>949<s>[INST] DoNotTerminateVM [/INST] Do Not Terminate VM</s>950<s>[INST] UseStandardCharsets [/INST] Use Standard Charsets</s>951"<s>[INST] UnusedAssignment [/INST] Reports assignments to variables that are never used before the variable is overwritten, or goes out of scope</s>"952<s>[INST] UnnecessaryImport [/INST] Unnecessary Import</s>953<s>[INST] JUnit5TestShouldBePackagePrivate [/INST] JUnit5 Test Should Be Package Private</s>954<s>[INST] MutableStaticState [/INST] Mutable Static State</s>955<s>[INST] ComparisonWithNaN [/INST] Comparison With NaN</s>956<s>[INST] PrimitiveWrapperInstantiation [/INST] Primitive Wrapper Instantiation</s>957<s>[INST] SimplifiableTestAssertion [/INST] Simplifiable Test Assertion</s>958<s>[INST] ReturnEmptyCollectionRatherThanNull [/INST] Return Empty Collection Rather Than Null</s>959<s>[INST] ImplicitSwitchFallThrough [/INST] Implicit Switch Fall Through</s>960