text
stringlengths
41
445
<s>[INST] DM_NUMBER_CTOR [/INST] Method invokes inefficient Number constructor; use static valueOf instead</s>
<s>[INST] DM_FP_NUMBER_CTOR [/INST] Method invokes inefficient floating-point Number constructor; use static valueOf instead</s>
<s>[INST] DM_BOXED_PRIMITIVE_TOSTRING [/INST] Method allocates a boxed primitive just to call toString</s>
<s>[INST] DM_BOXED_PRIMITIVE_FOR_PARSING [/INST] Boxing/unboxing to parse a primitive</s>
<s>[INST] DM_BOXED_PRIMITIVE_FOR_COMPARE [/INST] Boxing a primitive to compare</s>
<s>[INST] BX_UNBOXED_AND_COERCED_FOR_TERNARY_OPERATOR [/INST] Primitive value is unboxed and coerced for ternary operator</s>
<s>[INST] BX_UNBOXING_IMMEDIATELY_REBOXED [/INST] Boxed value is unboxed and then immediately reboxed</s>
<s>[INST] BX_BOXING_IMMEDIATELY_UNBOXED [/INST] Primitive value is boxed and then immediately unboxed</s>
<s>[INST] BX_BOXING_IMMEDIATELY_UNBOXED_TO_PERFORM_COERCION [/INST] Primitive value is boxed then unboxed to perform primitive coercion</s>
<s>[INST] DM_NEW_FOR_GETCLASS [/INST] Method allocates an object, only to get the class object</s>
<s>[INST] DM_NEXTINT_VIA_NEXTDOUBLE [/INST] Use the nextInt method of Random rather than nextDouble to generate a random integer</s>
<s>[INST] SS_SHOULD_BE_STATIC [/INST] Unread field</s>
<s>[INST] UUF_UNUSED_FIELD [/INST] Unused field</s>
<s>[INST] URF_UNREAD_FIELD [/INST] Unread field</s>
<s>[INST] SIC_INNER_SHOULD_BE_STATIC [/INST] Should be a static inner class</s>
<s>[INST] SIC_INNER_SHOULD_BE_STATIC_NEEDS_THIS [/INST] Could be refactored into a static inner class</s>
<s>[INST] SIC_INNER_SHOULD_BE_STATIC_ANON [/INST] Could be refactored into a named static inner class</s>
<s>[INST] UPM_UNCALLED_PRIVATE_METHOD [/INST] Private method is never called</s>
<s>[INST] SBSC_USE_STRINGBUFFER_CONCATENATION [/INST] Method concatenates strings using + in a loop</s>
<s>[INST] IIL_ELEMENTS_GET_LENGTH_IN_LOOP [/INST] NodeList.getLength</s>
<s>[INST] IIL_PREPARE_STATEMENT_IN_LOOP [/INST] Method calls prepareStatement in a loop</s>
<s>[INST] IIL_PATTERN_COMPILE_IN_LOOP [/INST] Method calls Pattern.compile in a loop</s>
<s>[INST] IIL_PATTERN_COMPILE_IN_LOOP_INDIRECT [/INST] Method compiles the regular expression in a loop</s>
<s>[INST] IIO_INEFFICIENT_INDEX_OF [/INST] Inefficient use of String.indexOf</s>
<s>[INST] IIO_INEFFICIENT_LAST_INDEX_OF [/INST] Inefficient use of String.lastIndexOf</s>
<s>[INST] ITA_INEFFICIENT_TO_ARRAY [/INST] Method uses toArray</s>
<s>[INST] WMI_WRONG_MAP_ITERATOR [/INST] Inefficient use of keySet iterator instead of entrySet iterator</s>
<s>[INST] UM_UNNECESSARY_MATH [/INST] Method calls static Math class method on a constant value</s>
<s>[INST] IMA_INEFFICIENT_MEMBER_ACCESS [/INST] Method accesses a private member variable of owning class</s>
<s>[INST] XSS_REQUEST_PARAMETER_TO_SEND_ERROR [/INST] Servlet reflected cross site scripting vulnerability in error page</s>
<s>[INST] XSS_REQUEST_PARAMETER_TO_SERVLET_WRITER [/INST] Servlet reflected cross site scripting vulnerability</s>
<s>[INST] XSS_REQUEST_PARAMETER_TO_JSP_WRITER [/INST] JSP reflected cross site scripting vulnerability</s>
<s>[INST] HRS_REQUEST_PARAMETER_TO_HTTP_HEADER [/INST] HTTP Response splitting vulnerability</s>
<s>[INST] HRS_REQUEST_PARAMETER_TO_COOKIE [/INST] HTTP cookie formed from untrusted input</s>
<s>[INST] PT_ABSOLUTE_PATH_TRAVERSAL [/INST] Absolute path traversal in servlet</s>
<s>[INST] PT_RELATIVE_PATH_TRAVERSAL [/INST] Relative path traversal in servlet</s>
<s>[INST] DMI_CONSTANT_DB_PASSWORD [/INST] Hardcoded constant database password</s>
<s>[INST] DMI_EMPTY_DB_PASSWORD [/INST] Empty database password</s>
<s>[INST] SQL_NONCONSTANT_STRING_PASSED_TO_EXECUTE [/INST] Nonconstant string passed to execute or addBatch method on an SQL statement</s>
<s>[INST] SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING [/INST] A prepared statement is generated from a nonconstant String</s>
<s>[INST] CAA_COVARIANT_ARRAY_FIELD [/INST] Covariant array assignment to a field</s>
<s>[INST] CAA_COVARIANT_ARRAY_RETURN [/INST] Covariant array is returned from the method</s>
<s>[INST] CAA_COVARIANT_ARRAY_LOCAL [/INST] Covariant array assignment to a local variable</s>
<s>[INST] DMI_UNSUPPORTED_METHOD [/INST] Call to unsupported method</s>
<s>[INST] DMI_THREAD_PASSED_WHERE_RUNNABLE_EXPECTED [/INST] Thread passed where Runnable expected</s>
<s>[INST] NP_DEREFERENCE_OF_READLINE_VALUE [/INST] Dereference of the result of readLine</s>
<s>[INST] NP_IMMEDIATE_DEREFERENCE_OF_READLINE [/INST] Immediate dereference of the result of readLine</s>
<s>[INST] RV_REM_OF_RANDOM_INT [/INST] Remainder of 32-bit signed random integer</s>
<s>[INST] RV_REM_OF_HASHCODE [/INST] Remainder of hashCode could be negative</s>
<s>[INST] EQ_UNUSUAL [/INST] Unusual equals method</s>
<s>[INST] EQ_DOESNT_OVERRIDE_EQUALS [/INST] Class doesn’t override equals in superclass</s>
<s>[INST] NS_NON_SHORT_CIRCUIT [/INST] Questionable use of non-short-circuit logic</s>
<s>[INST] NS_DANGEROUS_NON_SHORT_CIRCUIT [/INST] Potentially dangerous use of non-short-circuit logic</s>
<s>[INST] IC_INIT_CIRCULARITY [/INST] Initialization circularity</s>
<s>[INST] IA_AMBIGUOUS_INVOCATION_OF_INHERITED_OR_OUTER_METHOD [/INST] Potentially ambiguous invocation of either an inherited or outer method</s>
<s>[INST] SE_PRIVATE_READ_RESOLVE_NOT_INHERITED [/INST] Private readResolve method not inherited by subclasses</s>
<s>[INST] SE_TRANSIENT_FIELD_OF_NONSERIALIZABLE_CLASS [/INST] Transient field of class that isn’t Serializable.</s>
<s>[INST] SF_SWITCH_FALLTHROUGH [/INST] Switch statement found where one case falls through to the next case</s>
<s>[INST] SF_SWITCH_NO_DEFAULT [/INST] Switch statement found where default case is missing</s>
<s>[INST] UUF_UNUSED_PUBLIC_OR_PROTECTED_FIELD [/INST] Unused public or protected field</s>
<s>[INST] URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD [/INST] Unread public/protected field</s>
<s>[INST] QF_QUESTIONABLE_FOR_LOOP [/INST] Complicated, subtle or wrong increment in for-loop</s>
<s>[INST] NP_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD [/INST] Read of unwritten public or protected field</s>
<s>[INST] UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR [/INST] Field not initialized in constructor but dereferenced without null check</s>
<s>[INST] UWF_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD [/INST] Unwritten public or protected field</s>
<s>[INST] UC_USELESS_VOID_METHOD [/INST] Useless non-empty void method</s>
<s>[INST] UC_USELESS_CONDITION [/INST] Condition has no effect</s>
<s>[INST] UC_USELESS_CONDITION_TYPE [/INST] Condition has no effect due to the variable type</s>
<s>[INST] UC_USELESS_OBJECT [/INST] Useless object created</s>
<s>[INST] UC_USELESS_OBJECT_STACK [/INST] Useless object created on stack</s>
<s>[INST] RV_RETURN_VALUE_IGNORED_INFERRED [/INST] Method ignores return value, is this OK?</s>
<s>[INST] RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT [/INST] Return value of method without side effect is ignored</s>
<s>[INST] RV_CHECK_FOR_POSITIVE_INDEXOF [/INST] Method checks to see if result of String.indexOf is positive</s>
<s>[INST] RV_DONT_JUST_NULL_CHECK_READLINE [/INST] Method discards result of readLine after checking if it is non-null</s>
<s>[INST] NP_PARAMETER_MUST_BE_NONNULL_BUT_MARKED_AS_NULLABLE [/INST] Parameter must be non-null but is marked as nullable</s>
<s>[INST] NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE [/INST] Possible null pointer dereference due to return value of called method</s>
<s>[INST] NP_NULL_ON_SOME_PATH_MIGHT_BE_INFEASIBLE [/INST] Possible null pointer dereference on branch that might be infeasible</s>
<s>[INST] NP_LOAD_OF_KNOWN_NULL_VALUE [/INST] Load of known null value</s>
<s>[INST] PZLA_PREFER_ZERO_LENGTH_ARRAYS [/INST] Consider returning a zero length array rather than null</s>
<s>[INST] UCF_USELESS_CONTROL_FLOW [/INST] Useless control flow</s>
<s>[INST] UCF_USELESS_CONTROL_FLOW_NEXT_LINE [/INST] Useless control flow to next line</s>
<s>[INST] RCN_REDUNDANT_NULLCHECK_OF_NULL_VALUE [/INST] Redundant nullcheck of value known to be null</s>
<s>[INST] RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE [/INST] Redundant nullcheck of value known to be non-null</s>
<s>[INST] RCN_REDUNDANT_COMPARISON_TWO_NULL_VALUES [/INST] Redundant comparison of two null values</s>
<s>[INST] RCN_REDUNDANT_COMPARISON_OF_NULL_AND_NONNULL_VALUE [/INST] Redundant comparison of non-null value to null</s>
<s>[INST] VA_FORMAT_STRING_BAD_CONVERSION_TO_BOOLEAN [/INST] Non-Boolean argument formatted using %b format specifier</s>
<s>[INST] SA_LOCAL_SELF_ASSIGNMENT [/INST] Self assignment of local variable</s>
<s>[INST] INT_BAD_REM_BY_1 [/INST] Integer remainder modulo 1</s>
<s>[INST] INT_VACUOUS_COMPARISON [/INST] Vacuous comparison of integer value</s>
<s>[INST] INT_VACUOUS_BIT_OPERATION [/INST] Vacuous bit mask operation on integer value</s>
<s>[INST] SA_LOCAL_DOUBLE_ASSIGNMENT [/INST] Double assignment of local variable</s>
<s>[INST] SA_FIELD_DOUBLE_ASSIGNMENT [/INST] Double assignment of field</s>
<s>[INST] DLS_DEAD_LOCAL_STORE_IN_RETURN [/INST] Useless assignment in return statement</s>
<s>[INST] DLS_DEAD_LOCAL_STORE [/INST] Dead store to local variable</s>
<s>[INST] DLS_DEAD_LOCAL_STORE_SHADOWS_FIELD [/INST] Dead store to local variable that shadows field</s>
<s>[INST] DLS_DEAD_LOCAL_STORE_OF_NULL [/INST] Dead store of null to local variable</s>
<s>[INST] REC_CATCH_EXCEPTION [/INST] Exception is caught when Exception is not thrown</s>
<s>[INST] FE_FLOATING_POINT_EQUALITY [/INST] Test for floating point equality</s>
<s>[INST] CD_CIRCULAR_DEPENDENCY [/INST] Test for circular dependencies among classes</s>
<s>[INST] RI_REDUNDANT_INTERFACES [/INST] Class implements same interface as superclass</s>