Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(410)

Side by Side Diff: doc/bugDescriptions.html

Issue 1232833004: Update findbugs from 3.0.0 to 3.0.1. (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/findbugs.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.or g/TR/html4/loose.dtd"> 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.or g/TR/html4/loose.dtd">
2 <html><head><title>FindBugs Bug Descriptions</title> 2 <html><head><META http-equiv="Content-Type" content="text/html; charset=UTF-8">
3 <title>FindBugs Bug Descriptions</title>
3 <link rel="stylesheet" type="text/css" href="findbugs.css"/> 4 <link rel="stylesheet" type="text/css" href="findbugs.css"/>
4 <link rel="shortcut icon" href="favicon.ico" type="image/x-icon"/> 5 <link rel="shortcut icon" href="favicon.ico" type="image/x-icon"/>
5 </head><body> 6 </head><body>
6 7
7 <table width="100%"><tr> 8 <table width="100%"><tr>
8 9
9 <td bgcolor="#b9b9fe" valign="top" align="left" width="20%"> 10 <td bgcolor="#b9b9fe" valign="top" align="left" width="20%">
10 <table width="100%" cellspacing="0" border="0"> 11 <table width="100%" cellspacing="0" border="0">
11 <tr><td><a class="sidebar" href="index.html"><img src="umdFindbugs.png" alt="Fin dBugs"></a></td></tr> 12 <tr><td><a class="sidebar" href="index.html"><img src="umdFindbugs.png" alt="Fin dBugs"></a></td></tr>
12 13
13 <tr><td>&nbsp;</td></tr> 14 <tr><td>&nbsp;</td></tr>
14 15
15 <tr><td><b>Docs and Info</b></td></tr> 16 <tr><td><b>Docs and Info</b></td></tr>
16 <tr><td><font size="-1"><a class="sidebar" href="findbugs2.html">FindBugs 2.0</a ></font></td></tr> 17 <tr><td><font size="-1">&nbsp;<a class="sidebar" href="findbugs2.html">FindBugs 2.0</a></font></td></tr>
17 <tr><td><font size="-1"><a class="sidebar" href="demo.html">Demo and data</a></f ont></td></tr> 18 <tr><td><font size="-1">&nbsp;<a class="sidebar" href="demo.html">Demo and data< /a></font></td></tr>
18 <tr><td><font size="-1"><a class="sidebar" href="users.html">Users and supporter s</a></font></td></tr> 19 <tr><td><font size="-1">&nbsp;<a class="sidebar" href="users.html">Users and sup porters</a></font></td></tr>
19 <tr><td><font size="-1"><a class="sidebar" href="http://findbugs.blogspot.com/"> FindBugs blog</a></font></td></tr> 20 <tr><td><font size="-1">&nbsp;<a class="sidebar" href="http://findbugs.blogspot. com/">FindBugs blog</a></font></td></tr>
20 <tr><td><font size="-1"><a class="sidebar" href="factSheet.html">Fact sheet</a>< /font></td></tr> 21 <tr><td><font size="-1">&nbsp;<a class="sidebar" href="factSheet.html">Fact shee t</a></font></td></tr>
21 <tr><td><font size="-1"><a class="sidebar" href="manual/index.html">Manual</a></ font></td></tr> 22 <tr><td><font size="-1">&nbsp;<a class="sidebar" href="manual/index.html">Manual </a></font></td></tr>
22 <tr><td><font size="-1"><a class="sidebar" href="ja/manual/index.html">Manual(ja /&#26085;&#26412;&#35486;)</a></font></td></tr> 23 <tr><td><font size="-1">&nbsp;<a class="sidebar" href="ja/manual/index.html">Man ual(ja/&#26085;&#26412;&#35486;)</a></font></td></tr>
23 <tr><td><font size="-1"><a class="sidebar" href="FAQ.html">FAQ</a></font></td></ tr> 24 <tr><td><font size="-1">&nbsp;<a class="sidebar" href="FAQ.html">FAQ</a></font>< /td></tr>
24 <tr><td><font size="-1"><a class="sidebar" href="bugDescriptions.html">Bug descr iptions</a></font></td></tr> 25 <tr><td><font size="-1">&nbsp;<a class="sidebar" href="bugDescriptions.html">Bug descriptions</a></font></td></tr>
25 <tr><td><font size="-1"><a class="sidebar" href="mailingLists.html">Mailing list s</a></font></td></tr> 26 <tr><td><font size="-1">&nbsp;<a class="sidebar" href="bugDescriptions_ja.html"> Bug descriptions(ja/&#26085;&#26412;&#35486;)</a></font></td></tr>
26 <tr><td><font size="-1"><a class="sidebar" href="publications.html">Documents an d Publications</a></font></td></tr> 27 <tr><td><font size="-1">&nbsp;<a class="sidebar" href="bugDescriptions_fr.html"> Bug descriptions(fr)</a></font></td></tr>
27 <tr><td><font size="-1"><a class="sidebar" href="links.html">Links</a></font></t d></tr> 28 <tr><td><font size="-1">&nbsp;<a class="sidebar" href="mailingLists.html">Mailin g lists</a></font></td></tr>
29 <tr><td><font size="-1">&nbsp;<a class="sidebar" href="publications.html">Docume nts and Publications</a></font></td></tr>
30 <tr><td><font size="-1">&nbsp;<a class="sidebar" href="links.html">Links</a></fo nt></td></tr>
28 31
29 <tr><td>&nbsp;</td></tr> 32 <tr><td>&nbsp;</td></tr>
30 33
31 <tr><td><a class="sidebar" href="downloads.html"><b>Downloads</b></a></td></tr> 34 <tr><td><a class="sidebar" href="downloads.html"><b>Downloads</b></a></td></tr>
32 35
33 <tr><td>&nbsp;</td></tr> 36 <tr><td>&nbsp;</td></tr>
34 37
35 <tr><td><a class="sidebar" href="http://www.cafeshops.com/findbugs"><b>FindBugs Swag</b></a></td></tr> 38 <tr><td><a class="sidebar" href="http://www.cafeshops.com/findbugs"><b>FindBugs Swag</b></a></td></tr>
36 39
37 <tr><td>&nbsp;</td></tr> 40 <tr><td>&nbsp;</td></tr>
38 41
39 <tr><td><b>Development</b></td></tr> 42 <tr><td><b>Development</b></td></tr>
40 <tr><td><font size="-1"><a class="sidebar" href="http://sourceforge.net/tracker/ ?group_id=96405">Open bugs</a></font></td></tr> 43 <tr><td><font size="-1">&nbsp;<a class="sidebar" href="http://sourceforge.net/p/ findbugs/bugs/">Open bugs</a></font></td></tr>
41 <tr><td><font size="-1"><a class="sidebar" href="reportingBugs.html">Reporting b ugs</a></font></td></tr> 44 <tr><td><font size="-1">&nbsp;<a class="sidebar" href="reportingBugs.html">Repor ting bugs</a></font></td></tr>
42 <tr><td><font size="-1"><a class="sidebar" href="contributing.html">Contributing </a></font></td></tr> 45 <tr><td><font size="-1">&nbsp;<a class="sidebar" href="contributing.html">Contri buting</a></font></td></tr>
43 <tr><td><font size="-1"><a class="sidebar" href="team.html">Dev team</a></font>< /td></tr> 46 <tr><td><font size="-1">&nbsp;<a class="sidebar" href="team.html">Dev team</a></ font></td></tr>
44 <tr><td><font size="-1"><a class="sidebar" href="api/index.html">API</a> <a clas s="sidebar" href="api/overview-summary.html">[no frames]</a></font></td></tr> 47 <tr><td><font size="-1">&nbsp;<a class="sidebar" href="api/index.html">API</a> < a class="sidebar" href="api/overview-summary.html">[no frames]</a></font></td></ tr>
45 <tr><td><font size="-1"><a class="sidebar" href="Changes.html">Change log</a></f ont></td></tr> 48 <tr><td><font size="-1">&nbsp;<a class="sidebar" href="Changes.html">Change log< /a></font></td></tr>
46 <tr><td><font size="-1"><a class="sidebar" href="http://sourceforge.net/projects /findbugs">SF project page</a></font></td></tr> 49 <tr><td><font size="-1">&nbsp;<a class="sidebar" href="http://sourceforge.net/pr ojects/findbugs">SF project page</a></font></td></tr>
47 <tr><td><font size="-1"><a class="sidebar" href="http://code.google.com/p/findbu gs/source/browse/">Browse source</a></font></td></tr> 50 <tr><td><font size="-1">&nbsp;<a class="sidebar" href="http://code.google.com/p/ findbugs/source/browse/">Browse source</a></font></td></tr>
48 <tr><td><font size="-1"><a class="sidebar" href="http://code.google.com/p/findbu gs/source/list">Latest code changes</a></font></td></tr> 51 <tr><td><font size="-1">&nbsp;<a class="sidebar" href="http://code.google.com/p/ findbugs/source/list">Latest code changes</a></font></td></tr>
49 </table> 52 </table>
50 </td> 53 </td>
51 <td align="left" valign="top"> 54 <td align="left" valign="top">
52 <h1>FindBugs Bug Descriptions</h1> 55 <h1>FindBugs Bug Descriptions</h1>
53 <p>This document lists the standard bug patterns reported by 56 <p>This document lists the standard bug patterns reported by
54 <a href="http://findbugs.sourceforge.net">FindBugs</a> version 2.0.3.</p> 57 <a href="http://findbugs.sourceforge.net">FindBugs</a> version 3.0.1.</p>
55 <h2>Summary</h2> 58 <h2>Summary</h2>
56 <table width="100%"> 59 <table width="100%">
57 <tr bgcolor="#b9b9fe"><th>Description</th><th>Category</th></tr> 60 <tr bgcolor="#b9b9fe"><th>Description</th><th>Category</th></tr>
58 <tr bgcolor="#eeeeee"><td><a href="#BC_EQUALS_METHOD_SHOULD_WORK_FOR_ALL_OBJECTS ">BC: Equals method should not assume anything about the type of its argument</a ></td><td>Bad practice</td></tr> 61 <tr bgcolor="#eeeeee"><td><a href="#BC_EQUALS_METHOD_SHOULD_WORK_FOR_ALL_OBJECTS ">BC: Equals method should not assume anything about the type of its argument</a ></td><td>Bad practice</td></tr>
59 <tr bgcolor="#ffffff"><td><a href="#BIT_SIGNED_CHECK">BIT: Check for sign of bit wise operation</a></td><td>Bad practice</td></tr> 62 <tr bgcolor="#ffffff"><td><a href="#BIT_SIGNED_CHECK">BIT: Check for sign of bit wise operation</a></td><td>Bad practice</td></tr>
60 <tr bgcolor="#eeeeee"><td><a href="#CN_IDIOM">CN: Class implements Cloneable but does not define or use clone method</a></td><td>Bad practice</td></tr> 63 <tr bgcolor="#eeeeee"><td><a href="#CN_IDIOM">CN: Class implements Cloneable but does not define or use clone method</a></td><td>Bad practice</td></tr>
61 <tr bgcolor="#ffffff"><td><a href="#CN_IDIOM_NO_SUPER_CALL">CN: clone method doe s not call super.clone()</a></td><td>Bad practice</td></tr> 64 <tr bgcolor="#ffffff"><td><a href="#CN_IDIOM_NO_SUPER_CALL">CN: clone method doe s not call super.clone()</a></td><td>Bad practice</td></tr>
62 <tr bgcolor="#eeeeee"><td><a href="#CN_IMPLEMENTS_CLONE_BUT_NOT_CLONEABLE">CN: C lass defines clone() but doesn't implement Cloneable</a></td><td>Bad practice</t d></tr> 65 <tr bgcolor="#eeeeee"><td><a href="#CN_IMPLEMENTS_CLONE_BUT_NOT_CLONEABLE">CN: C lass defines clone() but doesn't implement Cloneable</a></td><td>Bad practice</t d></tr>
63 <tr bgcolor="#ffffff"><td><a href="#CO_ABSTRACT_SELF">Co: Abstract class defines covariant compareTo() method</a></td><td>Bad practice</td></tr> 66 <tr bgcolor="#ffffff"><td><a href="#CNT_ROUGH_CONSTANT_VALUE">CNT: Rough value o f known constant found</a></td><td>Bad practice</td></tr>
64 <tr bgcolor="#eeeeee"><td><a href="#CO_SELF_NO_OBJECT">Co: Covariant compareTo() method defined</a></td><td>Bad practice</td></tr> 67 <tr bgcolor="#eeeeee"><td><a href="#CO_ABSTRACT_SELF">Co: Abstract class defines covariant compareTo() method</a></td><td>Bad practice</td></tr>
65 <tr bgcolor="#ffffff"><td><a href="#DE_MIGHT_DROP">DE: Method might drop excepti on</a></td><td>Bad practice</td></tr> 68 <tr bgcolor="#ffffff"><td><a href="#CO_COMPARETO_INCORRECT_FLOATING">Co: compare To()/compare() incorrectly handles float or double value</a></td><td>Bad practic e</td></tr>
66 <tr bgcolor="#eeeeee"><td><a href="#DE_MIGHT_IGNORE">DE: Method might ignore exc eption</a></td><td>Bad practice</td></tr> 69 <tr bgcolor="#eeeeee"><td><a href="#CO_COMPARETO_RESULTS_MIN_VALUE">Co: compareT o()/compare() returns Integer.MIN_VALUE</a></td><td>Bad practice</td></tr>
67 <tr bgcolor="#ffffff"><td><a href="#DMI_ENTRY_SETS_MAY_REUSE_ENTRY_OBJECTS">DMI: Adding elements of an entry set may fail due to reuse of Entry objects</a></td> <td>Bad practice</td></tr> 70 <tr bgcolor="#ffffff"><td><a href="#CO_SELF_NO_OBJECT">Co: Covariant compareTo() method defined</a></td><td>Bad practice</td></tr>
68 <tr bgcolor="#eeeeee"><td><a href="#DMI_RANDOM_USED_ONLY_ONCE">DMI: Random objec t created and used only once</a></td><td>Bad practice</td></tr> 71 <tr bgcolor="#eeeeee"><td><a href="#DE_MIGHT_DROP">DE: Method might drop excepti on</a></td><td>Bad practice</td></tr>
69 <tr bgcolor="#ffffff"><td><a href="#DMI_USING_REMOVEALL_TO_CLEAR_COLLECTION">DMI : Don't use removeAll to clear a collection</a></td><td>Bad practice</td></tr> 72 <tr bgcolor="#ffffff"><td><a href="#DE_MIGHT_IGNORE">DE: Method might ignore exc eption</a></td><td>Bad practice</td></tr>
70 <tr bgcolor="#eeeeee"><td><a href="#DM_EXIT">Dm: Method invokes System.exit(...) </a></td><td>Bad practice</td></tr> 73 <tr bgcolor="#eeeeee"><td><a href="#DMI_ENTRY_SETS_MAY_REUSE_ENTRY_OBJECTS">DMI: Adding elements of an entry set may fail due to reuse of Entry objects</a></td> <td>Bad practice</td></tr>
71 <tr bgcolor="#ffffff"><td><a href="#DM_RUN_FINALIZERS_ON_EXIT">Dm: Method invoke s dangerous method runFinalizersOnExit</a></td><td>Bad practice</td></tr> 74 <tr bgcolor="#ffffff"><td><a href="#DMI_RANDOM_USED_ONLY_ONCE">DMI: Random objec t created and used only once</a></td><td>Bad practice</td></tr>
72 <tr bgcolor="#eeeeee"><td><a href="#ES_COMPARING_PARAMETER_STRING_WITH_EQ">ES: C omparison of String parameter using == or !=</a></td><td>Bad practice</td></tr> 75 <tr bgcolor="#eeeeee"><td><a href="#DMI_USING_REMOVEALL_TO_CLEAR_COLLECTION">DMI : Don't use removeAll to clear a collection</a></td><td>Bad practice</td></tr>
73 <tr bgcolor="#ffffff"><td><a href="#ES_COMPARING_STRINGS_WITH_EQ">ES: Comparison of String objects using == or !=</a></td><td>Bad practice</td></tr> 76 <tr bgcolor="#ffffff"><td><a href="#DM_EXIT">Dm: Method invokes System.exit(...) </a></td><td>Bad practice</td></tr>
74 <tr bgcolor="#eeeeee"><td><a href="#EQ_ABSTRACT_SELF">Eq: Abstract class defines covariant equals() method</a></td><td>Bad practice</td></tr> 77 <tr bgcolor="#eeeeee"><td><a href="#DM_RUN_FINALIZERS_ON_EXIT">Dm: Method invoke s dangerous method runFinalizersOnExit</a></td><td>Bad practice</td></tr>
75 <tr bgcolor="#ffffff"><td><a href="#EQ_CHECK_FOR_OPERAND_NOT_COMPATIBLE_WITH_THI S">Eq: Equals checks for incompatible operand</a></td><td>Bad practice</td></tr> 78 <tr bgcolor="#ffffff"><td><a href="#ES_COMPARING_PARAMETER_STRING_WITH_EQ">ES: C omparison of String parameter using == or !=</a></td><td>Bad practice</td></tr>
76 <tr bgcolor="#eeeeee"><td><a href="#EQ_COMPARETO_USE_OBJECT_EQUALS">Eq: Class de fines compareTo(...) and uses Object.equals()</a></td><td>Bad practice</td></tr> 79 <tr bgcolor="#eeeeee"><td><a href="#ES_COMPARING_STRINGS_WITH_EQ">ES: Comparison of String objects using == or !=</a></td><td>Bad practice</td></tr>
77 <tr bgcolor="#ffffff"><td><a href="#EQ_GETCLASS_AND_CLASS_CONSTANT">Eq: equals m ethod fails for subtypes</a></td><td>Bad practice</td></tr> 80 <tr bgcolor="#ffffff"><td><a href="#EQ_ABSTRACT_SELF">Eq: Abstract class defines covariant equals() method</a></td><td>Bad practice</td></tr>
78 <tr bgcolor="#eeeeee"><td><a href="#EQ_SELF_NO_OBJECT">Eq: Covariant equals() me thod defined</a></td><td>Bad practice</td></tr> 81 <tr bgcolor="#eeeeee"><td><a href="#EQ_CHECK_FOR_OPERAND_NOT_COMPATIBLE_WITH_THI S">Eq: Equals checks for incompatible operand</a></td><td>Bad practice</td></tr>
79 <tr bgcolor="#ffffff"><td><a href="#FI_EMPTY">FI: Empty finalizer should be dele ted</a></td><td>Bad practice</td></tr> 82 <tr bgcolor="#ffffff"><td><a href="#EQ_COMPARETO_USE_OBJECT_EQUALS">Eq: Class de fines compareTo(...) and uses Object.equals()</a></td><td>Bad practice</td></tr>
80 <tr bgcolor="#eeeeee"><td><a href="#FI_EXPLICIT_INVOCATION">FI: Explicit invocat ion of finalizer</a></td><td>Bad practice</td></tr> 83 <tr bgcolor="#eeeeee"><td><a href="#EQ_GETCLASS_AND_CLASS_CONSTANT">Eq: equals m ethod fails for subtypes</a></td><td>Bad practice</td></tr>
81 <tr bgcolor="#ffffff"><td><a href="#FI_FINALIZER_NULLS_FIELDS">FI: Finalizer nul ls fields</a></td><td>Bad practice</td></tr> 84 <tr bgcolor="#ffffff"><td><a href="#EQ_SELF_NO_OBJECT">Eq: Covariant equals() me thod defined</a></td><td>Bad practice</td></tr>
82 <tr bgcolor="#eeeeee"><td><a href="#FI_FINALIZER_ONLY_NULLS_FIELDS">FI: Finalize r only nulls fields</a></td><td>Bad practice</td></tr> 85 <tr bgcolor="#eeeeee"><td><a href="#FI_EMPTY">FI: Empty finalizer should be dele ted</a></td><td>Bad practice</td></tr>
83 <tr bgcolor="#ffffff"><td><a href="#FI_MISSING_SUPER_CALL">FI: Finalizer does no t call superclass finalizer</a></td><td>Bad practice</td></tr> 86 <tr bgcolor="#ffffff"><td><a href="#FI_EXPLICIT_INVOCATION">FI: Explicit invocat ion of finalizer</a></td><td>Bad practice</td></tr>
84 <tr bgcolor="#eeeeee"><td><a href="#FI_NULLIFY_SUPER">FI: Finalizer nullifies su perclass finalizer</a></td><td>Bad practice</td></tr> 87 <tr bgcolor="#eeeeee"><td><a href="#FI_FINALIZER_NULLS_FIELDS">FI: Finalizer nul ls fields</a></td><td>Bad practice</td></tr>
85 <tr bgcolor="#ffffff"><td><a href="#FI_USELESS">FI: Finalizer does nothing but c all superclass finalizer</a></td><td>Bad practice</td></tr> 88 <tr bgcolor="#ffffff"><td><a href="#FI_FINALIZER_ONLY_NULLS_FIELDS">FI: Finalize r only nulls fields</a></td><td>Bad practice</td></tr>
86 <tr bgcolor="#eeeeee"><td><a href="#VA_FORMAT_STRING_USES_NEWLINE">FS: Format st ring should use %n rather than \n</a></td><td>Bad practice</td></tr> 89 <tr bgcolor="#eeeeee"><td><a href="#FI_MISSING_SUPER_CALL">FI: Finalizer does no t call superclass finalizer</a></td><td>Bad practice</td></tr>
87 <tr bgcolor="#ffffff"><td><a href="#GC_UNCHECKED_TYPE_IN_GENERIC_CALL">GC: Unche cked type in generic call</a></td><td>Bad practice</td></tr> 90 <tr bgcolor="#ffffff"><td><a href="#FI_NULLIFY_SUPER">FI: Finalizer nullifies su perclass finalizer</a></td><td>Bad practice</td></tr>
88 <tr bgcolor="#eeeeee"><td><a href="#HE_EQUALS_NO_HASHCODE">HE: Class defines equ als() but not hashCode()</a></td><td>Bad practice</td></tr> 91 <tr bgcolor="#eeeeee"><td><a href="#FI_USELESS">FI: Finalizer does nothing but c all superclass finalizer</a></td><td>Bad practice</td></tr>
89 <tr bgcolor="#ffffff"><td><a href="#HE_EQUALS_USE_HASHCODE">HE: Class defines eq uals() and uses Object.hashCode()</a></td><td>Bad practice</td></tr> 92 <tr bgcolor="#ffffff"><td><a href="#VA_FORMAT_STRING_USES_NEWLINE">FS: Format st ring should use %n rather than \n</a></td><td>Bad practice</td></tr>
90 <tr bgcolor="#eeeeee"><td><a href="#HE_HASHCODE_NO_EQUALS">HE: Class defines has hCode() but not equals()</a></td><td>Bad practice</td></tr> 93 <tr bgcolor="#eeeeee"><td><a href="#GC_UNCHECKED_TYPE_IN_GENERIC_CALL">GC: Unche cked type in generic call</a></td><td>Bad practice</td></tr>
91 <tr bgcolor="#ffffff"><td><a href="#HE_HASHCODE_USE_OBJECT_EQUALS">HE: Class def ines hashCode() and uses Object.equals()</a></td><td>Bad practice</td></tr> 94 <tr bgcolor="#ffffff"><td><a href="#HE_EQUALS_NO_HASHCODE">HE: Class defines equ als() but not hashCode()</a></td><td>Bad practice</td></tr>
92 <tr bgcolor="#eeeeee"><td><a href="#HE_INHERITS_EQUALS_USE_HASHCODE">HE: Class i nherits equals() and uses Object.hashCode()</a></td><td>Bad practice</td></tr> 95 <tr bgcolor="#eeeeee"><td><a href="#HE_EQUALS_USE_HASHCODE">HE: Class defines eq uals() and uses Object.hashCode()</a></td><td>Bad practice</td></tr>
93 <tr bgcolor="#ffffff"><td><a href="#IC_SUPERCLASS_USES_SUBCLASS_DURING_INITIALIZ ATION">IC: Superclass uses subclass during initialization</a></td><td>Bad practi ce</td></tr> 96 <tr bgcolor="#ffffff"><td><a href="#HE_HASHCODE_NO_EQUALS">HE: Class defines has hCode() but not equals()</a></td><td>Bad practice</td></tr>
94 <tr bgcolor="#eeeeee"><td><a href="#IMSE_DONT_CATCH_IMSE">IMSE: Dubious catching of IllegalMonitorStateException</a></td><td>Bad practice</td></tr> 97 <tr bgcolor="#eeeeee"><td><a href="#HE_HASHCODE_USE_OBJECT_EQUALS">HE: Class def ines hashCode() and uses Object.equals()</a></td><td>Bad practice</td></tr>
95 <tr bgcolor="#ffffff"><td><a href="#ISC_INSTANTIATE_STATIC_CLASS">ISC: Needless instantiation of class that only supplies static methods</a></td><td>Bad practic e</td></tr> 98 <tr bgcolor="#ffffff"><td><a href="#HE_INHERITS_EQUALS_USE_HASHCODE">HE: Class i nherits equals() and uses Object.hashCode()</a></td><td>Bad practice</td></tr>
96 <tr bgcolor="#eeeeee"><td><a href="#IT_NO_SUCH_ELEMENT">It: Iterator next() meth od can't throw NoSuchElementException</a></td><td>Bad practice</td></tr> 99 <tr bgcolor="#eeeeee"><td><a href="#IC_SUPERCLASS_USES_SUBCLASS_DURING_INITIALIZ ATION">IC: Superclass uses subclass during initialization</a></td><td>Bad practi ce</td></tr>
97 <tr bgcolor="#ffffff"><td><a href="#J2EE_STORE_OF_NON_SERIALIZABLE_OBJECT_INTO_S ESSION">J2EE: Store of non serializable object into HttpSession</a></td><td>Bad practice</td></tr> 100 <tr bgcolor="#ffffff"><td><a href="#IMSE_DONT_CATCH_IMSE">IMSE: Dubious catching of IllegalMonitorStateException</a></td><td>Bad practice</td></tr>
98 <tr bgcolor="#eeeeee"><td><a href="#JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS">JC IP: Fields of immutable classes should be final</a></td><td>Bad practice</td></t r> 101 <tr bgcolor="#eeeeee"><td><a href="#ISC_INSTANTIATE_STATIC_CLASS">ISC: Needless instantiation of class that only supplies static methods</a></td><td>Bad practic e</td></tr>
99 <tr bgcolor="#ffffff"><td><a href="#NP_BOOLEAN_RETURN_NULL">NP: Method with Bool ean return type returns explicit null</a></td><td>Bad practice</td></tr> 102 <tr bgcolor="#ffffff"><td><a href="#IT_NO_SUCH_ELEMENT">It: Iterator next() meth od can't throw NoSuchElementException</a></td><td>Bad practice</td></tr>
100 <tr bgcolor="#eeeeee"><td><a href="#NP_CLONE_COULD_RETURN_NULL">NP: Clone method may return null</a></td><td>Bad practice</td></tr> 103 <tr bgcolor="#eeeeee"><td><a href="#J2EE_STORE_OF_NON_SERIALIZABLE_OBJECT_INTO_S ESSION">J2EE: Store of non serializable object into HttpSession</a></td><td>Bad practice</td></tr>
101 <tr bgcolor="#ffffff"><td><a href="#NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT">NP: e quals() method does not check for null argument</a></td><td>Bad practice</td></t r> 104 <tr bgcolor="#ffffff"><td><a href="#JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS">JC IP: Fields of immutable classes should be final</a></td><td>Bad practice</td></t r>
102 <tr bgcolor="#eeeeee"><td><a href="#NP_TOSTRING_COULD_RETURN_NULL">NP: toString method may return null</a></td><td>Bad practice</td></tr> 105 <tr bgcolor="#eeeeee"><td><a href="#ME_ENUM_FIELD_SETTER">ME: Public enum method unconditionally sets its field</a></td><td>Bad practice</td></tr>
103 <tr bgcolor="#ffffff"><td><a href="#NM_CLASS_NAMING_CONVENTION">Nm: Class names should start with an upper case letter</a></td><td>Bad practice</td></tr> 106 <tr bgcolor="#ffffff"><td><a href="#ME_MUTABLE_ENUM_FIELD">ME: Enum field is pub lic and mutable</a></td><td>Bad practice</td></tr>
104 <tr bgcolor="#eeeeee"><td><a href="#NM_CLASS_NOT_EXCEPTION">Nm: Class is not der ived from an Exception, even though it is named as such</a></td><td>Bad practice </td></tr> 107 <tr bgcolor="#eeeeee"><td><a href="#NP_BOOLEAN_RETURN_NULL">NP: Method with Bool ean return type returns explicit null</a></td><td>Bad practice</td></tr>
105 <tr bgcolor="#ffffff"><td><a href="#NM_CONFUSING">Nm: Confusing method names</a> </td><td>Bad practice</td></tr> 108 <tr bgcolor="#ffffff"><td><a href="#NP_CLONE_COULD_RETURN_NULL">NP: Clone method may return null</a></td><td>Bad practice</td></tr>
106 <tr bgcolor="#eeeeee"><td><a href="#NM_FIELD_NAMING_CONVENTION">Nm: Field names should start with a lower case letter</a></td><td>Bad practice</td></tr> 109 <tr bgcolor="#eeeeee"><td><a href="#NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT">NP: e quals() method does not check for null argument</a></td><td>Bad practice</td></t r>
107 <tr bgcolor="#ffffff"><td><a href="#NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER">Nm: Us e of identifier that is a keyword in later versions of Java</a></td><td>Bad prac tice</td></tr> 110 <tr bgcolor="#ffffff"><td><a href="#NP_TOSTRING_COULD_RETURN_NULL">NP: toString method may return null</a></td><td>Bad practice</td></tr>
108 <tr bgcolor="#eeeeee"><td><a href="#NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER" >Nm: Use of identifier that is a keyword in later versions of Java</a></td><td>B ad practice</td></tr> 111 <tr bgcolor="#eeeeee"><td><a href="#NM_CLASS_NAMING_CONVENTION">Nm: Class names should start with an upper case letter</a></td><td>Bad practice</td></tr>
109 <tr bgcolor="#ffffff"><td><a href="#NM_METHOD_NAMING_CONVENTION">Nm: Method name s should start with a lower case letter</a></td><td>Bad practice</td></tr> 112 <tr bgcolor="#ffffff"><td><a href="#NM_CLASS_NOT_EXCEPTION">Nm: Class is not der ived from an Exception, even though it is named as such</a></td><td>Bad practice </td></tr>
110 <tr bgcolor="#eeeeee"><td><a href="#NM_SAME_SIMPLE_NAME_AS_INTERFACE">Nm: Class names shouldn't shadow simple name of implemented interface</a></td><td>Bad prac tice</td></tr> 113 <tr bgcolor="#eeeeee"><td><a href="#NM_CONFUSING">Nm: Confusing method names</a> </td><td>Bad practice</td></tr>
111 <tr bgcolor="#ffffff"><td><a href="#NM_SAME_SIMPLE_NAME_AS_SUPERCLASS">Nm: Class names shouldn't shadow simple name of superclass</a></td><td>Bad practice</td>< /tr> 114 <tr bgcolor="#ffffff"><td><a href="#NM_FIELD_NAMING_CONVENTION">Nm: Field names should start with a lower case letter</a></td><td>Bad practice</td></tr>
112 <tr bgcolor="#eeeeee"><td><a href="#NM_VERY_CONFUSING_INTENTIONAL">Nm: Very conf using method names (but perhaps intentional)</a></td><td>Bad practice</td></tr> 115 <tr bgcolor="#eeeeee"><td><a href="#NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER">Nm: Us e of identifier that is a keyword in later versions of Java</a></td><td>Bad prac tice</td></tr>
113 <tr bgcolor="#ffffff"><td><a href="#NM_WRONG_PACKAGE_INTENTIONAL">Nm: Method doe sn't override method in superclass due to wrong package for parameter</a></td><t d>Bad practice</td></tr> 116 <tr bgcolor="#ffffff"><td><a href="#NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER" >Nm: Use of identifier that is a keyword in later versions of Java</a></td><td>B ad practice</td></tr>
114 <tr bgcolor="#eeeeee"><td><a href="#ODR_OPEN_DATABASE_RESOURCE">ODR: Method may fail to close database resource</a></td><td>Bad practice</td></tr> 117 <tr bgcolor="#eeeeee"><td><a href="#NM_METHOD_NAMING_CONVENTION">Nm: Method name s should start with a lower case letter</a></td><td>Bad practice</td></tr>
115 <tr bgcolor="#ffffff"><td><a href="#ODR_OPEN_DATABASE_RESOURCE_EXCEPTION_PATH">O DR: Method may fail to close database resource on exception</a></td><td>Bad prac tice</td></tr> 118 <tr bgcolor="#ffffff"><td><a href="#NM_SAME_SIMPLE_NAME_AS_INTERFACE">Nm: Class names shouldn't shadow simple name of implemented interface</a></td><td>Bad prac tice</td></tr>
116 <tr bgcolor="#eeeeee"><td><a href="#OS_OPEN_STREAM">OS: Method may fail to close stream</a></td><td>Bad practice</td></tr> 119 <tr bgcolor="#eeeeee"><td><a href="#NM_SAME_SIMPLE_NAME_AS_SUPERCLASS">Nm: Class names shouldn't shadow simple name of superclass</a></td><td>Bad practice</td>< /tr>
117 <tr bgcolor="#ffffff"><td><a href="#OS_OPEN_STREAM_EXCEPTION_PATH">OS: Method ma y fail to close stream on exception</a></td><td>Bad practice</td></tr> 120 <tr bgcolor="#ffffff"><td><a href="#NM_VERY_CONFUSING_INTENTIONAL">Nm: Very conf using method names (but perhaps intentional)</a></td><td>Bad practice</td></tr>
118 <tr bgcolor="#eeeeee"><td><a href="#PZ_DONT_REUSE_ENTRY_OBJECTS_IN_ITERATORS">PZ : Don't reuse entry objects in iterators</a></td><td>Bad practice</td></tr> 121 <tr bgcolor="#eeeeee"><td><a href="#NM_WRONG_PACKAGE_INTENTIONAL">Nm: Method doe sn't override method in superclass due to wrong package for parameter</a></td><t d>Bad practice</td></tr>
119 <tr bgcolor="#ffffff"><td><a href="#RC_REF_COMPARISON_BAD_PRACTICE">RC: Suspicio us reference comparison to constant</a></td><td>Bad practice</td></tr> 122 <tr bgcolor="#ffffff"><td><a href="#ODR_OPEN_DATABASE_RESOURCE">ODR: Method may fail to close database resource</a></td><td>Bad practice</td></tr>
120 <tr bgcolor="#eeeeee"><td><a href="#RC_REF_COMPARISON_BAD_PRACTICE_BOOLEAN">RC: Suspicious reference comparison of Boolean values</a></td><td>Bad practice</td>< /tr> 123 <tr bgcolor="#eeeeee"><td><a href="#ODR_OPEN_DATABASE_RESOURCE_EXCEPTION_PATH">O DR: Method may fail to close database resource on exception</a></td><td>Bad prac tice</td></tr>
121 <tr bgcolor="#ffffff"><td><a href="#RR_NOT_CHECKED">RR: Method ignores results o f InputStream.read()</a></td><td>Bad practice</td></tr> 124 <tr bgcolor="#ffffff"><td><a href="#OS_OPEN_STREAM">OS: Method may fail to close stream</a></td><td>Bad practice</td></tr>
122 <tr bgcolor="#eeeeee"><td><a href="#SR_NOT_CHECKED">RR: Method ignores results o f InputStream.skip()</a></td><td>Bad practice</td></tr> 125 <tr bgcolor="#eeeeee"><td><a href="#OS_OPEN_STREAM_EXCEPTION_PATH">OS: Method ma y fail to close stream on exception</a></td><td>Bad practice</td></tr>
123 <tr bgcolor="#ffffff"><td><a href="#RV_NEGATING_RESULT_OF_COMPARETO">RV: Negatin g the result of compareTo()/compare()</a></td><td>Bad practice</td></tr> 126 <tr bgcolor="#ffffff"><td><a href="#PZ_DONT_REUSE_ENTRY_OBJECTS_IN_ITERATORS">PZ : Don't reuse entry objects in iterators</a></td><td>Bad practice</td></tr>
124 <tr bgcolor="#eeeeee"><td><a href="#RV_RETURN_VALUE_IGNORED_BAD_PRACTICE">RV: Me thod ignores exceptional return value</a></td><td>Bad practice</td></tr> 127 <tr bgcolor="#eeeeee"><td><a href="#RC_REF_COMPARISON_BAD_PRACTICE">RC: Suspicio us reference comparison to constant</a></td><td>Bad practice</td></tr>
125 <tr bgcolor="#ffffff"><td><a href="#SI_INSTANCE_BEFORE_FINALS_ASSIGNED">SI: Stat ic initializer creates instance before all static final fields assigned</a></td> <td>Bad practice</td></tr> 128 <tr bgcolor="#ffffff"><td><a href="#RC_REF_COMPARISON_BAD_PRACTICE_BOOLEAN">RC: Suspicious reference comparison of Boolean values</a></td><td>Bad practice</td>< /tr>
126 <tr bgcolor="#eeeeee"><td><a href="#SW_SWING_METHODS_INVOKED_IN_SWING_THREAD">SW : Certain swing methods needs to be invoked in Swing thread</a></td><td>Bad prac tice</td></tr> 129 <tr bgcolor="#eeeeee"><td><a href="#RR_NOT_CHECKED">RR: Method ignores results o f InputStream.read()</a></td><td>Bad practice</td></tr>
127 <tr bgcolor="#ffffff"><td><a href="#SE_BAD_FIELD">Se: Non-transient non-serializ able instance field in serializable class</a></td><td>Bad practice</td></tr> 130 <tr bgcolor="#ffffff"><td><a href="#SR_NOT_CHECKED">RR: Method ignores results o f InputStream.skip()</a></td><td>Bad practice</td></tr>
128 <tr bgcolor="#eeeeee"><td><a href="#SE_BAD_FIELD_INNER_CLASS">Se: Non-serializab le class has a serializable inner class</a></td><td>Bad practice</td></tr> 131 <tr bgcolor="#eeeeee"><td><a href="#RV_NEGATING_RESULT_OF_COMPARETO">RV: Negatin g the result of compareTo()/compare()</a></td><td>Bad practice</td></tr>
129 <tr bgcolor="#ffffff"><td><a href="#SE_BAD_FIELD_STORE">Se: Non-serializable val ue stored into instance field of a serializable class</a></td><td>Bad practice</ td></tr> 132 <tr bgcolor="#ffffff"><td><a href="#RV_RETURN_VALUE_IGNORED_BAD_PRACTICE">RV: Me thod ignores exceptional return value</a></td><td>Bad practice</td></tr>
130 <tr bgcolor="#eeeeee"><td><a href="#SE_COMPARATOR_SHOULD_BE_SERIALIZABLE">Se: Co mparator doesn't implement Serializable</a></td><td>Bad practice</td></tr> 133 <tr bgcolor="#eeeeee"><td><a href="#SI_INSTANCE_BEFORE_FINALS_ASSIGNED">SI: Stat ic initializer creates instance before all static final fields assigned</a></td> <td>Bad practice</td></tr>
131 <tr bgcolor="#ffffff"><td><a href="#SE_INNER_CLASS">Se: Serializable inner class </a></td><td>Bad practice</td></tr> 134 <tr bgcolor="#ffffff"><td><a href="#SW_SWING_METHODS_INVOKED_IN_SWING_THREAD">SW : Certain swing methods needs to be invoked in Swing thread</a></td><td>Bad prac tice</td></tr>
132 <tr bgcolor="#eeeeee"><td><a href="#SE_NONFINAL_SERIALVERSIONID">Se: serialVersi onUID isn't final</a></td><td>Bad practice</td></tr> 135 <tr bgcolor="#eeeeee"><td><a href="#SE_BAD_FIELD">Se: Non-transient non-serializ able instance field in serializable class</a></td><td>Bad practice</td></tr>
133 <tr bgcolor="#ffffff"><td><a href="#SE_NONLONG_SERIALVERSIONID">Se: serialVersio nUID isn't long</a></td><td>Bad practice</td></tr> 136 <tr bgcolor="#ffffff"><td><a href="#SE_BAD_FIELD_INNER_CLASS">Se: Non-serializab le class has a serializable inner class</a></td><td>Bad practice</td></tr>
134 <tr bgcolor="#eeeeee"><td><a href="#SE_NONSTATIC_SERIALVERSIONID">Se: serialVers ionUID isn't static</a></td><td>Bad practice</td></tr> 137 <tr bgcolor="#eeeeee"><td><a href="#SE_BAD_FIELD_STORE">Se: Non-serializable val ue stored into instance field of a serializable class</a></td><td>Bad practice</ td></tr>
135 <tr bgcolor="#ffffff"><td><a href="#SE_NO_SUITABLE_CONSTRUCTOR">Se: Class is Ser ializable but its superclass doesn't define a void constructor</a></td><td>Bad p ractice</td></tr> 138 <tr bgcolor="#ffffff"><td><a href="#SE_COMPARATOR_SHOULD_BE_SERIALIZABLE">Se: Co mparator doesn't implement Serializable</a></td><td>Bad practice</td></tr>
136 <tr bgcolor="#eeeeee"><td><a href="#SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATI ON">Se: Class is Externalizable but doesn't define a void constructor</a></td><t d>Bad practice</td></tr> 139 <tr bgcolor="#eeeeee"><td><a href="#SE_INNER_CLASS">Se: Serializable inner class </a></td><td>Bad practice</td></tr>
137 <tr bgcolor="#ffffff"><td><a href="#SE_READ_RESOLVE_MUST_RETURN_OBJECT">Se: The readResolve method must be declared with a return type of Object. </a></td><td>B ad practice</td></tr> 140 <tr bgcolor="#ffffff"><td><a href="#SE_NONFINAL_SERIALVERSIONID">Se: serialVersi onUID isn't final</a></td><td>Bad practice</td></tr>
138 <tr bgcolor="#eeeeee"><td><a href="#SE_TRANSIENT_FIELD_NOT_RESTORED">Se: Transie nt field that isn't set by deserialization. </a></td><td>Bad practice</td></tr> 141 <tr bgcolor="#eeeeee"><td><a href="#SE_NONLONG_SERIALVERSIONID">Se: serialVersio nUID isn't long</a></td><td>Bad practice</td></tr>
139 <tr bgcolor="#ffffff"><td><a href="#SE_NO_SERIALVERSIONID">SnVI: Class is Serial izable, but doesn't define serialVersionUID</a></td><td>Bad practice</td></tr> 142 <tr bgcolor="#ffffff"><td><a href="#SE_NONSTATIC_SERIALVERSIONID">Se: serialVers ionUID isn't static</a></td><td>Bad practice</td></tr>
140 <tr bgcolor="#eeeeee"><td><a href="#UI_INHERITANCE_UNSAFE_GETRESOURCE">UI: Usage of GetResource may be unsafe if class is extended</a></td><td>Bad practice</td> </tr> 143 <tr bgcolor="#eeeeee"><td><a href="#SE_NO_SUITABLE_CONSTRUCTOR">Se: Class is Ser ializable but its superclass doesn't define a void constructor</a></td><td>Bad p ractice</td></tr>
141 <tr bgcolor="#ffffff"><td><a href="#BC_IMPOSSIBLE_CAST">BC: Impossible cast</a>< /td><td>Correctness</td></tr> 144 <tr bgcolor="#ffffff"><td><a href="#SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATI ON">Se: Class is Externalizable but doesn't define a void constructor</a></td><t d>Bad practice</td></tr>
142 <tr bgcolor="#eeeeee"><td><a href="#BC_IMPOSSIBLE_DOWNCAST">BC: Impossible downc ast</a></td><td>Correctness</td></tr> 145 <tr bgcolor="#eeeeee"><td><a href="#SE_READ_RESOLVE_MUST_RETURN_OBJECT">Se: The readResolve method must be declared with a return type of Object. </a></td><td>B ad practice</td></tr>
143 <tr bgcolor="#ffffff"><td><a href="#BC_IMPOSSIBLE_DOWNCAST_OF_TOARRAY">BC: Impos sible downcast of toArray() result</a></td><td>Correctness</td></tr> 146 <tr bgcolor="#ffffff"><td><a href="#SE_TRANSIENT_FIELD_NOT_RESTORED">Se: Transie nt field that isn't set by deserialization. </a></td><td>Bad practice</td></tr>
144 <tr bgcolor="#eeeeee"><td><a href="#BC_IMPOSSIBLE_INSTANCEOF">BC: instanceof wil l always return false</a></td><td>Correctness</td></tr> 147 <tr bgcolor="#eeeeee"><td><a href="#SE_NO_SERIALVERSIONID">SnVI: Class is Serial izable, but doesn't define serialVersionUID</a></td><td>Bad practice</td></tr>
145 <tr bgcolor="#ffffff"><td><a href="#BIT_ADD_OF_SIGNED_BYTE">BIT: Bitwise add of signed byte value</a></td><td>Correctness</td></tr> 148 <tr bgcolor="#ffffff"><td><a href="#UI_INHERITANCE_UNSAFE_GETRESOURCE">UI: Usage of GetResource may be unsafe if class is extended</a></td><td>Bad practice</td> </tr>
146 <tr bgcolor="#eeeeee"><td><a href="#BIT_AND">BIT: Incompatible bit masks</a></td ><td>Correctness</td></tr> 149 <tr bgcolor="#eeeeee"><td><a href="#BC_IMPOSSIBLE_CAST">BC: Impossible cast</a>< /td><td>Correctness</td></tr>
147 <tr bgcolor="#ffffff"><td><a href="#BIT_AND_ZZ">BIT: Check to see if ((...) & 0) == 0</a></td><td>Correctness</td></tr> 150 <tr bgcolor="#ffffff"><td><a href="#BC_IMPOSSIBLE_DOWNCAST">BC: Impossible downc ast</a></td><td>Correctness</td></tr>
148 <tr bgcolor="#eeeeee"><td><a href="#BIT_IOR">BIT: Incompatible bit masks</a></td ><td>Correctness</td></tr> 151 <tr bgcolor="#eeeeee"><td><a href="#BC_IMPOSSIBLE_DOWNCAST_OF_TOARRAY">BC: Impos sible downcast of toArray() result</a></td><td>Correctness</td></tr>
149 <tr bgcolor="#ffffff"><td><a href="#BIT_IOR_OF_SIGNED_BYTE">BIT: Bitwise OR of s igned byte value</a></td><td>Correctness</td></tr> 152 <tr bgcolor="#ffffff"><td><a href="#BC_IMPOSSIBLE_INSTANCEOF">BC: instanceof wil l always return false</a></td><td>Correctness</td></tr>
150 <tr bgcolor="#eeeeee"><td><a href="#BIT_SIGNED_CHECK_HIGH_BIT">BIT: Check for si gn of bitwise operation</a></td><td>Correctness</td></tr> 153 <tr bgcolor="#eeeeee"><td><a href="#BIT_ADD_OF_SIGNED_BYTE">BIT: Bitwise add of signed byte value</a></td><td>Correctness</td></tr>
151 <tr bgcolor="#ffffff"><td><a href="#BOA_BADLY_OVERRIDDEN_ADAPTER">BOA: Class ove rrides a method implemented in super class Adapter wrongly</a></td><td>Correctne ss</td></tr> 154 <tr bgcolor="#ffffff"><td><a href="#BIT_AND">BIT: Incompatible bit masks</a></td ><td>Correctness</td></tr>
155 <tr bgcolor="#eeeeee"><td><a href="#BIT_AND_ZZ">BIT: Check to see if ((...) & 0) == 0</a></td><td>Correctness</td></tr>
156 <tr bgcolor="#ffffff"><td><a href="#BIT_IOR">BIT: Incompatible bit masks</a></td ><td>Correctness</td></tr>
157 <tr bgcolor="#eeeeee"><td><a href="#BIT_IOR_OF_SIGNED_BYTE">BIT: Bitwise OR of s igned byte value</a></td><td>Correctness</td></tr>
158 <tr bgcolor="#ffffff"><td><a href="#BIT_SIGNED_CHECK_HIGH_BIT">BIT: Check for si gn of bitwise operation</a></td><td>Correctness</td></tr>
159 <tr bgcolor="#eeeeee"><td><a href="#BOA_BADLY_OVERRIDDEN_ADAPTER">BOA: Class ove rrides a method implemented in super class Adapter wrongly</a></td><td>Correctne ss</td></tr>
160 <tr bgcolor="#ffffff"><td><a href="#BSHIFT_WRONG_ADD_PRIORITY">BSHIFT: Possible bad parsing of shift operation</a></td><td>Correctness</td></tr>
152 <tr bgcolor="#eeeeee"><td><a href="#ICAST_BAD_SHIFT_AMOUNT">BSHIFT: 32 bit int s hifted by an amount not in the range -31..31</a></td><td>Correctness</td></tr> 161 <tr bgcolor="#eeeeee"><td><a href="#ICAST_BAD_SHIFT_AMOUNT">BSHIFT: 32 bit int s hifted by an amount not in the range -31..31</a></td><td>Correctness</td></tr>
153 <tr bgcolor="#ffffff"><td><a href="#BX_UNBOXED_AND_COERCED_FOR_TERNARY_OPERATOR" >Bx: Primitive value is unboxed and coerced for ternary operator</a></td><td>Cor rectness</td></tr>
154 <tr bgcolor="#eeeeee"><td><a href="#CO_COMPARETO_RESULTS_MIN_VALUE">Co: compareT o()/compare() returns Integer.MIN_VALUE</a></td><td>Correctness</td></tr>
155 <tr bgcolor="#ffffff"><td><a href="#DLS_DEAD_LOCAL_INCREMENT_IN_RETURN">DLS: Use less increment in return statement</a></td><td>Correctness</td></tr> 162 <tr bgcolor="#ffffff"><td><a href="#DLS_DEAD_LOCAL_INCREMENT_IN_RETURN">DLS: Use less increment in return statement</a></td><td>Correctness</td></tr>
156 <tr bgcolor="#eeeeee"><td><a href="#DLS_DEAD_STORE_OF_CLASS_LITERAL">DLS: Dead s tore of class literal</a></td><td>Correctness</td></tr> 163 <tr bgcolor="#eeeeee"><td><a href="#DLS_DEAD_STORE_OF_CLASS_LITERAL">DLS: Dead s tore of class literal</a></td><td>Correctness</td></tr>
157 <tr bgcolor="#ffffff"><td><a href="#DLS_OVERWRITTEN_INCREMENT">DLS: Overwritten increment</a></td><td>Correctness</td></tr> 164 <tr bgcolor="#ffffff"><td><a href="#DLS_OVERWRITTEN_INCREMENT">DLS: Overwritten increment</a></td><td>Correctness</td></tr>
158 <tr bgcolor="#eeeeee"><td><a href="#DMI_ARGUMENTS_WRONG_ORDER">DMI: Reversed met hod arguments</a></td><td>Correctness</td></tr> 165 <tr bgcolor="#eeeeee"><td><a href="#DMI_ARGUMENTS_WRONG_ORDER">DMI: Reversed met hod arguments</a></td><td>Correctness</td></tr>
159 <tr bgcolor="#ffffff"><td><a href="#DMI_BAD_MONTH">DMI: Bad constant value for m onth</a></td><td>Correctness</td></tr> 166 <tr bgcolor="#ffffff"><td><a href="#DMI_BAD_MONTH">DMI: Bad constant value for m onth</a></td><td>Correctness</td></tr>
160 <tr bgcolor="#eeeeee"><td><a href="#DMI_BIGDECIMAL_CONSTRUCTED_FROM_DOUBLE">DMI: BigDecimal constructed from double that isn't represented precisely</a></td><td >Correctness</td></tr> 167 <tr bgcolor="#eeeeee"><td><a href="#DMI_BIGDECIMAL_CONSTRUCTED_FROM_DOUBLE">DMI: BigDecimal constructed from double that isn't represented precisely</a></td><td >Correctness</td></tr>
161 <tr bgcolor="#ffffff"><td><a href="#DMI_CALLING_NEXT_FROM_HASNEXT">DMI: hasNext method invokes next</a></td><td>Correctness</td></tr> 168 <tr bgcolor="#ffffff"><td><a href="#DMI_CALLING_NEXT_FROM_HASNEXT">DMI: hasNext method invokes next</a></td><td>Correctness</td></tr>
162 <tr bgcolor="#eeeeee"><td><a href="#DMI_COLLECTIONS_SHOULD_NOT_CONTAIN_THEMSELVE S">DMI: Collections should not contain themselves</a></td><td>Correctness</td></ tr> 169 <tr bgcolor="#eeeeee"><td><a href="#DMI_COLLECTIONS_SHOULD_NOT_CONTAIN_THEMSELVE S">DMI: Collections should not contain themselves</a></td><td>Correctness</td></ tr>
163 <tr bgcolor="#ffffff"><td><a href="#DMI_DOH">DMI: D'oh! A nonsensical method inv ocation</a></td><td>Correctness</td></tr> 170 <tr bgcolor="#ffffff"><td><a href="#DMI_DOH">DMI: D'oh! A nonsensical method inv ocation</a></td><td>Correctness</td></tr>
164 <tr bgcolor="#eeeeee"><td><a href="#DMI_INVOKING_HASHCODE_ON_ARRAY">DMI: Invocat ion of hashCode on an array</a></td><td>Correctness</td></tr> 171 <tr bgcolor="#eeeeee"><td><a href="#DMI_INVOKING_HASHCODE_ON_ARRAY">DMI: Invocat ion of hashCode on an array</a></td><td>Correctness</td></tr>
165 <tr bgcolor="#ffffff"><td><a href="#DMI_LONG_BITS_TO_DOUBLE_INVOKED_ON_INT">DMI: Double.longBitsToDouble invoked on an int</a></td><td>Correctness</td></tr> 172 <tr bgcolor="#ffffff"><td><a href="#DMI_LONG_BITS_TO_DOUBLE_INVOKED_ON_INT">DMI: Double.longBitsToDouble invoked on an int</a></td><td>Correctness</td></tr>
166 <tr bgcolor="#eeeeee"><td><a href="#DMI_VACUOUS_SELF_COLLECTION_CALL">DMI: Vacuo us call to collections</a></td><td>Correctness</td></tr> 173 <tr bgcolor="#eeeeee"><td><a href="#DMI_VACUOUS_SELF_COLLECTION_CALL">DMI: Vacuo us call to collections</a></td><td>Correctness</td></tr>
167 <tr bgcolor="#ffffff"><td><a href="#DMI_ANNOTATION_IS_NOT_VISIBLE_TO_REFLECTION" >Dm: Can't use reflection to check for presence of annotation without runtime re tention</a></td><td>Correctness</td></tr> 174 <tr bgcolor="#ffffff"><td><a href="#DMI_ANNOTATION_IS_NOT_VISIBLE_TO_REFLECTION" >Dm: Can't use reflection to check for presence of annotation without runtime re tention</a></td><td>Correctness</td></tr>
168 <tr bgcolor="#eeeeee"><td><a href="#DMI_FUTILE_ATTEMPT_TO_CHANGE_MAXPOOL_SIZE_OF _SCHEDULED_THREAD_POOL_EXECUTOR">Dm: Futile attempt to change max pool size of S cheduledThreadPoolExecutor</a></td><td>Correctness</td></tr> 175 <tr bgcolor="#eeeeee"><td><a href="#DMI_FUTILE_ATTEMPT_TO_CHANGE_MAXPOOL_SIZE_OF _SCHEDULED_THREAD_POOL_EXECUTOR">Dm: Futile attempt to change max pool size of S cheduledThreadPoolExecutor</a></td><td>Correctness</td></tr>
169 <tr bgcolor="#ffffff"><td><a href="#DMI_SCHEDULED_THREAD_POOL_EXECUTOR_WITH_ZERO _CORE_THREADS">Dm: Creation of ScheduledThreadPoolExecutor with zero core thread s</a></td><td>Correctness</td></tr> 176 <tr bgcolor="#ffffff"><td><a href="#DMI_SCHEDULED_THREAD_POOL_EXECUTOR_WITH_ZERO _CORE_THREADS">Dm: Creation of ScheduledThreadPoolExecutor with zero core thread s</a></td><td>Correctness</td></tr>
170 <tr bgcolor="#eeeeee"><td><a href="#DMI_VACUOUS_CALL_TO_EASYMOCK_METHOD">Dm: Use less/vacuous call to EasyMock method</a></td><td>Correctness</td></tr> 177 <tr bgcolor="#eeeeee"><td><a href="#DMI_VACUOUS_CALL_TO_EASYMOCK_METHOD">Dm: Use less/vacuous call to EasyMock method</a></td><td>Correctness</td></tr>
171 <tr bgcolor="#ffffff"><td><a href="#EC_ARRAY_AND_NONARRAY">EC: equals() used to compare array and nonarray</a></td><td>Correctness</td></tr> 178 <tr bgcolor="#ffffff"><td><a href="#DM_INVALID_MIN_MAX">Dm: Incorrect combinatio n of Math.max and Math.min</a></td><td>Correctness</td></tr>
172 <tr bgcolor="#eeeeee"><td><a href="#EC_BAD_ARRAY_COMPARE">EC: Invocation of equa ls() on an array, which is equivalent to ==</a></td><td>Correctness</td></tr> 179 <tr bgcolor="#eeeeee"><td><a href="#EC_ARRAY_AND_NONARRAY">EC: equals() used to compare array and nonarray</a></td><td>Correctness</td></tr>
173 <tr bgcolor="#ffffff"><td><a href="#EC_INCOMPATIBLE_ARRAY_COMPARE">EC: equals(.. .) used to compare incompatible arrays</a></td><td>Correctness</td></tr> 180 <tr bgcolor="#ffffff"><td><a href="#EC_BAD_ARRAY_COMPARE">EC: Invocation of equa ls() on an array, which is equivalent to ==</a></td><td>Correctness</td></tr>
174 <tr bgcolor="#eeeeee"><td><a href="#EC_NULL_ARG">EC: Call to equals(null)</a></t d><td>Correctness</td></tr> 181 <tr bgcolor="#eeeeee"><td><a href="#EC_INCOMPATIBLE_ARRAY_COMPARE">EC: equals(.. .) used to compare incompatible arrays</a></td><td>Correctness</td></tr>
175 <tr bgcolor="#ffffff"><td><a href="#EC_UNRELATED_CLASS_AND_INTERFACE">EC: Call t o equals() comparing unrelated class and interface</a></td><td>Correctness</td>< /tr> 182 <tr bgcolor="#ffffff"><td><a href="#EC_NULL_ARG">EC: Call to equals(null)</a></t d><td>Correctness</td></tr>
176 <tr bgcolor="#eeeeee"><td><a href="#EC_UNRELATED_INTERFACES">EC: Call to equals( ) comparing different interface types</a></td><td>Correctness</td></tr> 183 <tr bgcolor="#eeeeee"><td><a href="#EC_UNRELATED_CLASS_AND_INTERFACE">EC: Call t o equals() comparing unrelated class and interface</a></td><td>Correctness</td>< /tr>
177 <tr bgcolor="#ffffff"><td><a href="#EC_UNRELATED_TYPES">EC: Call to equals() com paring different types</a></td><td>Correctness</td></tr> 184 <tr bgcolor="#ffffff"><td><a href="#EC_UNRELATED_INTERFACES">EC: Call to equals( ) comparing different interface types</a></td><td>Correctness</td></tr>
178 <tr bgcolor="#eeeeee"><td><a href="#EC_UNRELATED_TYPES_USING_POINTER_EQUALITY">E C: Using pointer equality to compare different types</a></td><td>Correctness</td ></tr> 185 <tr bgcolor="#eeeeee"><td><a href="#EC_UNRELATED_TYPES">EC: Call to equals() com paring different types</a></td><td>Correctness</td></tr>
179 <tr bgcolor="#ffffff"><td><a href="#EQ_ALWAYS_FALSE">Eq: equals method always re turns false</a></td><td>Correctness</td></tr> 186 <tr bgcolor="#ffffff"><td><a href="#EC_UNRELATED_TYPES_USING_POINTER_EQUALITY">E C: Using pointer equality to compare different types</a></td><td>Correctness</td ></tr>
180 <tr bgcolor="#eeeeee"><td><a href="#EQ_ALWAYS_TRUE">Eq: equals method always ret urns true</a></td><td>Correctness</td></tr> 187 <tr bgcolor="#eeeeee"><td><a href="#EQ_ALWAYS_FALSE">Eq: equals method always re turns false</a></td><td>Correctness</td></tr>
181 <tr bgcolor="#ffffff"><td><a href="#EQ_COMPARING_CLASS_NAMES">Eq: equals method compares class names rather than class objects</a></td><td>Correctness</td></tr> 188 <tr bgcolor="#ffffff"><td><a href="#EQ_ALWAYS_TRUE">Eq: equals method always ret urns true</a></td><td>Correctness</td></tr>
182 <tr bgcolor="#eeeeee"><td><a href="#EQ_DONT_DEFINE_EQUALS_FOR_ENUM">Eq: Covarian t equals() method defined for enum</a></td><td>Correctness</td></tr> 189 <tr bgcolor="#eeeeee"><td><a href="#EQ_COMPARING_CLASS_NAMES">Eq: equals method compares class names rather than class objects</a></td><td>Correctness</td></tr>
183 <tr bgcolor="#ffffff"><td><a href="#EQ_OTHER_NO_OBJECT">Eq: equals() method defi ned that doesn't override equals(Object)</a></td><td>Correctness</td></tr> 190 <tr bgcolor="#ffffff"><td><a href="#EQ_DONT_DEFINE_EQUALS_FOR_ENUM">Eq: Covarian t equals() method defined for enum</a></td><td>Correctness</td></tr>
184 <tr bgcolor="#eeeeee"><td><a href="#EQ_OTHER_USE_OBJECT">Eq: equals() method def ined that doesn't override Object.equals(Object)</a></td><td>Correctness</td></t r> 191 <tr bgcolor="#eeeeee"><td><a href="#EQ_OTHER_NO_OBJECT">Eq: equals() method defi ned that doesn't override equals(Object)</a></td><td>Correctness</td></tr>
185 <tr bgcolor="#ffffff"><td><a href="#EQ_OVERRIDING_EQUALS_NOT_SYMMETRIC">Eq: equa ls method overrides equals in superclass and may not be symmetric</a></td><td>Co rrectness</td></tr> 192 <tr bgcolor="#ffffff"><td><a href="#EQ_OTHER_USE_OBJECT">Eq: equals() method def ined that doesn't override Object.equals(Object)</a></td><td>Correctness</td></t r>
186 <tr bgcolor="#eeeeee"><td><a href="#EQ_SELF_USE_OBJECT">Eq: Covariant equals() m ethod defined, Object.equals(Object) inherited</a></td><td>Correctness</td></tr> 193 <tr bgcolor="#eeeeee"><td><a href="#EQ_OVERRIDING_EQUALS_NOT_SYMMETRIC">Eq: equa ls method overrides equals in superclass and may not be symmetric</a></td><td>Co rrectness</td></tr>
187 <tr bgcolor="#ffffff"><td><a href="#FE_TEST_IF_EQUAL_TO_NOT_A_NUMBER">FE: Doomed test for equality to NaN</a></td><td>Correctness</td></tr> 194 <tr bgcolor="#ffffff"><td><a href="#EQ_SELF_USE_OBJECT">Eq: Covariant equals() m ethod defined, Object.equals(Object) inherited</a></td><td>Correctness</td></tr>
188 <tr bgcolor="#eeeeee"><td><a href="#VA_FORMAT_STRING_BAD_ARGUMENT">FS: Format st ring placeholder incompatible with passed argument</a></td><td>Correctness</td>< /tr> 195 <tr bgcolor="#eeeeee"><td><a href="#FE_TEST_IF_EQUAL_TO_NOT_A_NUMBER">FE: Doomed test for equality to NaN</a></td><td>Correctness</td></tr>
189 <tr bgcolor="#ffffff"><td><a href="#VA_FORMAT_STRING_BAD_CONVERSION">FS: The typ e of a supplied argument doesn't match format specifier</a></td><td>Correctness< /td></tr> 196 <tr bgcolor="#ffffff"><td><a href="#VA_FORMAT_STRING_BAD_ARGUMENT">FS: Format st ring placeholder incompatible with passed argument</a></td><td>Correctness</td>< /tr>
190 <tr bgcolor="#eeeeee"><td><a href="#VA_FORMAT_STRING_EXPECTED_MESSAGE_FORMAT_SUP PLIED">FS: MessageFormat supplied where printf style format expected</a></td><td >Correctness</td></tr> 197 <tr bgcolor="#eeeeee"><td><a href="#VA_FORMAT_STRING_BAD_CONVERSION">FS: The typ e of a supplied argument doesn't match format specifier</a></td><td>Correctness< /td></tr>
191 <tr bgcolor="#ffffff"><td><a href="#VA_FORMAT_STRING_EXTRA_ARGUMENTS_PASSED">FS: More arguments are passed than are actually used in the format string</a></td>< td>Correctness</td></tr> 198 <tr bgcolor="#ffffff"><td><a href="#VA_FORMAT_STRING_EXPECTED_MESSAGE_FORMAT_SUP PLIED">FS: MessageFormat supplied where printf style format expected</a></td><td >Correctness</td></tr>
192 <tr bgcolor="#eeeeee"><td><a href="#VA_FORMAT_STRING_ILLEGAL">FS: Illegal format string</a></td><td>Correctness</td></tr> 199 <tr bgcolor="#eeeeee"><td><a href="#VA_FORMAT_STRING_EXTRA_ARGUMENTS_PASSED">FS: More arguments are passed than are actually used in the format string</a></td>< td>Correctness</td></tr>
193 <tr bgcolor="#ffffff"><td><a href="#VA_FORMAT_STRING_MISSING_ARGUMENT">FS: Forma t string references missing argument</a></td><td>Correctness</td></tr> 200 <tr bgcolor="#ffffff"><td><a href="#VA_FORMAT_STRING_ILLEGAL">FS: Illegal format string</a></td><td>Correctness</td></tr>
194 <tr bgcolor="#eeeeee"><td><a href="#VA_FORMAT_STRING_NO_PREVIOUS_ARGUMENT">FS: N o previous argument for format string</a></td><td>Correctness</td></tr> 201 <tr bgcolor="#eeeeee"><td><a href="#VA_FORMAT_STRING_MISSING_ARGUMENT">FS: Forma t string references missing argument</a></td><td>Correctness</td></tr>
195 <tr bgcolor="#ffffff"><td><a href="#GC_UNRELATED_TYPES">GC: No relationship betw een generic parameter and method argument</a></td><td>Correctness</td></tr> 202 <tr bgcolor="#ffffff"><td><a href="#VA_FORMAT_STRING_NO_PREVIOUS_ARGUMENT">FS: N o previous argument for format string</a></td><td>Correctness</td></tr>
196 <tr bgcolor="#eeeeee"><td><a href="#HE_SIGNATURE_DECLARES_HASHING_OF_UNHASHABLE_ CLASS">HE: Signature declares use of unhashable class in hashed construct</a></t d><td>Correctness</td></tr> 203 <tr bgcolor="#eeeeee"><td><a href="#GC_UNRELATED_TYPES">GC: No relationship betw een generic parameter and method argument</a></td><td>Correctness</td></tr>
197 <tr bgcolor="#ffffff"><td><a href="#HE_USE_OF_UNHASHABLE_CLASS">HE: Use of class without a hashCode() method in a hashed data structure</a></td><td>Correctness< /td></tr> 204 <tr bgcolor="#ffffff"><td><a href="#HE_SIGNATURE_DECLARES_HASHING_OF_UNHASHABLE_ CLASS">HE: Signature declares use of unhashable class in hashed construct</a></t d><td>Correctness</td></tr>
198 <tr bgcolor="#eeeeee"><td><a href="#ICAST_INT_2_LONG_AS_INSTANT">ICAST: int valu e converted to long and used as absolute time</a></td><td>Correctness</td></tr> 205 <tr bgcolor="#eeeeee"><td><a href="#HE_USE_OF_UNHASHABLE_CLASS">HE: Use of class without a hashCode() method in a hashed data structure</a></td><td>Correctness< /td></tr>
199 <tr bgcolor="#ffffff"><td><a href="#ICAST_INT_CAST_TO_DOUBLE_PASSED_TO_CEIL">ICA ST: Integral value cast to double and then passed to Math.ceil</a></td><td>Corre ctness</td></tr> 206 <tr bgcolor="#ffffff"><td><a href="#ICAST_INT_2_LONG_AS_INSTANT">ICAST: int valu e converted to long and used as absolute time</a></td><td>Correctness</td></tr>
200 <tr bgcolor="#eeeeee"><td><a href="#ICAST_INT_CAST_TO_FLOAT_PASSED_TO_ROUND">ICA ST: int value cast to float and then passed to Math.round</a></td><td>Correctnes s</td></tr> 207 <tr bgcolor="#eeeeee"><td><a href="#ICAST_INT_CAST_TO_DOUBLE_PASSED_TO_CEIL">ICA ST: Integral value cast to double and then passed to Math.ceil</a></td><td>Corre ctness</td></tr>
201 <tr bgcolor="#ffffff"><td><a href="#IJU_ASSERT_METHOD_INVOKED_FROM_RUN_METHOD">I JU: JUnit assertion in run method will not be noticed by JUnit</a></td><td>Corre ctness</td></tr> 208 <tr bgcolor="#ffffff"><td><a href="#ICAST_INT_CAST_TO_FLOAT_PASSED_TO_ROUND">ICA ST: int value cast to float and then passed to Math.round</a></td><td>Correctnes s</td></tr>
202 <tr bgcolor="#eeeeee"><td><a href="#IJU_BAD_SUITE_METHOD">IJU: TestCase declares a bad suite method </a></td><td>Correctness</td></tr> 209 <tr bgcolor="#eeeeee"><td><a href="#IJU_ASSERT_METHOD_INVOKED_FROM_RUN_METHOD">I JU: JUnit assertion in run method will not be noticed by JUnit</a></td><td>Corre ctness</td></tr>
203 <tr bgcolor="#ffffff"><td><a href="#IJU_NO_TESTS">IJU: TestCase has no tests</a> </td><td>Correctness</td></tr> 210 <tr bgcolor="#ffffff"><td><a href="#IJU_BAD_SUITE_METHOD">IJU: TestCase declares a bad suite method </a></td><td>Correctness</td></tr>
204 <tr bgcolor="#eeeeee"><td><a href="#IJU_SETUP_NO_SUPER">IJU: TestCase defines se tUp that doesn't call super.setUp()</a></td><td>Correctness</td></tr> 211 <tr bgcolor="#eeeeee"><td><a href="#IJU_NO_TESTS">IJU: TestCase has no tests</a> </td><td>Correctness</td></tr>
205 <tr bgcolor="#ffffff"><td><a href="#IJU_SUITE_NOT_STATIC">IJU: TestCase implemen ts a non-static suite method </a></td><td>Correctness</td></tr> 212 <tr bgcolor="#ffffff"><td><a href="#IJU_SETUP_NO_SUPER">IJU: TestCase defines se tUp that doesn't call super.setUp()</a></td><td>Correctness</td></tr>
206 <tr bgcolor="#eeeeee"><td><a href="#IJU_TEARDOWN_NO_SUPER">IJU: TestCase defines tearDown that doesn't call super.tearDown()</a></td><td>Correctness</td></tr> 213 <tr bgcolor="#eeeeee"><td><a href="#IJU_SUITE_NOT_STATIC">IJU: TestCase implemen ts a non-static suite method </a></td><td>Correctness</td></tr>
207 <tr bgcolor="#ffffff"><td><a href="#IL_CONTAINER_ADDED_TO_ITSELF">IL: A collecti on is added to itself</a></td><td>Correctness</td></tr> 214 <tr bgcolor="#ffffff"><td><a href="#IJU_TEARDOWN_NO_SUPER">IJU: TestCase defines tearDown that doesn't call super.tearDown()</a></td><td>Correctness</td></tr>
208 <tr bgcolor="#eeeeee"><td><a href="#IL_INFINITE_LOOP">IL: An apparent infinite l oop</a></td><td>Correctness</td></tr> 215 <tr bgcolor="#eeeeee"><td><a href="#IL_CONTAINER_ADDED_TO_ITSELF">IL: A collecti on is added to itself</a></td><td>Correctness</td></tr>
209 <tr bgcolor="#ffffff"><td><a href="#IL_INFINITE_RECURSIVE_LOOP">IL: An apparent infinite recursive loop</a></td><td>Correctness</td></tr> 216 <tr bgcolor="#ffffff"><td><a href="#IL_INFINITE_LOOP">IL: An apparent infinite l oop</a></td><td>Correctness</td></tr>
210 <tr bgcolor="#eeeeee"><td><a href="#IM_MULTIPLYING_RESULT_OF_IREM">IM: Integer m ultiply of result of integer remainder</a></td><td>Correctness</td></tr> 217 <tr bgcolor="#eeeeee"><td><a href="#IL_INFINITE_RECURSIVE_LOOP">IL: An apparent infinite recursive loop</a></td><td>Correctness</td></tr>
211 <tr bgcolor="#ffffff"><td><a href="#INT_BAD_COMPARISON_WITH_INT_VALUE">INT: Bad comparison of int value with long constant</a></td><td>Correctness</td></tr> 218 <tr bgcolor="#ffffff"><td><a href="#IM_MULTIPLYING_RESULT_OF_IREM">IM: Integer m ultiply of result of integer remainder</a></td><td>Correctness</td></tr>
212 <tr bgcolor="#eeeeee"><td><a href="#INT_BAD_COMPARISON_WITH_NONNEGATIVE_VALUE">I NT: Bad comparison of nonnegative value with negative constant</a></td><td>Corre ctness</td></tr> 219 <tr bgcolor="#eeeeee"><td><a href="#INT_BAD_COMPARISON_WITH_INT_VALUE">INT: Bad comparison of int value with long constant</a></td><td>Correctness</td></tr>
213 <tr bgcolor="#ffffff"><td><a href="#INT_BAD_COMPARISON_WITH_SIGNED_BYTE">INT: Ba d comparison of signed byte</a></td><td>Correctness</td></tr> 220 <tr bgcolor="#ffffff"><td><a href="#INT_BAD_COMPARISON_WITH_NONNEGATIVE_VALUE">I NT: Bad comparison of nonnegative value with negative constant or zero</a></td>< td>Correctness</td></tr>
214 <tr bgcolor="#eeeeee"><td><a href="#IO_APPENDING_TO_OBJECT_OUTPUT_STREAM">IO: Do omed attempt to append to an object output stream</a></td><td>Correctness</td></ tr> 221 <tr bgcolor="#eeeeee"><td><a href="#INT_BAD_COMPARISON_WITH_SIGNED_BYTE">INT: Ba d comparison of signed byte</a></td><td>Correctness</td></tr>
215 <tr bgcolor="#ffffff"><td><a href="#IP_PARAMETER_IS_DEAD_BUT_OVERWRITTEN">IP: A parameter is dead upon entry to a method but overwritten</a></td><td>Correctness </td></tr> 222 <tr bgcolor="#ffffff"><td><a href="#IO_APPENDING_TO_OBJECT_OUTPUT_STREAM">IO: Do omed attempt to append to an object output stream</a></td><td>Correctness</td></ tr>
216 <tr bgcolor="#eeeeee"><td><a href="#MF_CLASS_MASKS_FIELD">MF: Class defines fiel d that masks a superclass field</a></td><td>Correctness</td></tr> 223 <tr bgcolor="#eeeeee"><td><a href="#IP_PARAMETER_IS_DEAD_BUT_OVERWRITTEN">IP: A parameter is dead upon entry to a method but overwritten</a></td><td>Correctness </td></tr>
217 <tr bgcolor="#ffffff"><td><a href="#MF_METHOD_MASKS_FIELD">MF: Method defines a variable that obscures a field</a></td><td>Correctness</td></tr> 224 <tr bgcolor="#ffffff"><td><a href="#MF_CLASS_MASKS_FIELD">MF: Class defines fiel d that masks a superclass field</a></td><td>Correctness</td></tr>
218 <tr bgcolor="#eeeeee"><td><a href="#NP_ALWAYS_NULL">NP: Null pointer dereference </a></td><td>Correctness</td></tr> 225 <tr bgcolor="#eeeeee"><td><a href="#MF_METHOD_MASKS_FIELD">MF: Method defines a variable that obscures a field</a></td><td>Correctness</td></tr>
219 <tr bgcolor="#ffffff"><td><a href="#NP_ALWAYS_NULL_EXCEPTION">NP: Null pointer d ereference in method on exception path</a></td><td>Correctness</td></tr> 226 <tr bgcolor="#ffffff"><td><a href="#NP_ALWAYS_NULL">NP: Null pointer dereference </a></td><td>Correctness</td></tr>
220 <tr bgcolor="#eeeeee"><td><a href="#NP_ARGUMENT_MIGHT_BE_NULL">NP: Method does n ot check for null argument</a></td><td>Correctness</td></tr> 227 <tr bgcolor="#eeeeee"><td><a href="#NP_ALWAYS_NULL_EXCEPTION">NP: Null pointer d ereference in method on exception path</a></td><td>Correctness</td></tr>
221 <tr bgcolor="#ffffff"><td><a href="#NP_CLOSING_NULL">NP: close() invoked on a va lue that is always null</a></td><td>Correctness</td></tr> 228 <tr bgcolor="#ffffff"><td><a href="#NP_ARGUMENT_MIGHT_BE_NULL">NP: Method does n ot check for null argument</a></td><td>Correctness</td></tr>
222 <tr bgcolor="#eeeeee"><td><a href="#NP_GUARANTEED_DEREF">NP: Null value is guara nteed to be dereferenced</a></td><td>Correctness</td></tr> 229 <tr bgcolor="#eeeeee"><td><a href="#NP_CLOSING_NULL">NP: close() invoked on a va lue that is always null</a></td><td>Correctness</td></tr>
223 <tr bgcolor="#ffffff"><td><a href="#NP_GUARANTEED_DEREF_ON_EXCEPTION_PATH">NP: V alue is null and guaranteed to be dereferenced on exception path</a></td><td>Cor rectness</td></tr> 230 <tr bgcolor="#ffffff"><td><a href="#NP_GUARANTEED_DEREF">NP: Null value is guara nteed to be dereferenced</a></td><td>Correctness</td></tr>
224 <tr bgcolor="#eeeeee"><td><a href="#NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUC TOR">NP: Nonnull field is not initialized</a></td><td>Correctness</td></tr> 231 <tr bgcolor="#eeeeee"><td><a href="#NP_GUARANTEED_DEREF_ON_EXCEPTION_PATH">NP: V alue is null and guaranteed to be dereferenced on exception path</a></td><td>Cor rectness</td></tr>
225 <tr bgcolor="#ffffff"><td><a href="#NP_NONNULL_PARAM_VIOLATION">NP: Method call passes null to a nonnull parameter </a></td><td>Correctness</td></tr> 232 <tr bgcolor="#ffffff"><td><a href="#NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUC TOR">NP: Non-null field is not initialized</a></td><td>Correctness</td></tr>
226 <tr bgcolor="#eeeeee"><td><a href="#NP_NONNULL_RETURN_VIOLATION">NP: Method may return null, but is declared @NonNull</a></td><td>Correctness</td></tr> 233 <tr bgcolor="#eeeeee"><td><a href="#NP_NONNULL_PARAM_VIOLATION">NP: Method call passes null to a non-null parameter </a></td><td>Correctness</td></tr>
227 <tr bgcolor="#ffffff"><td><a href="#NP_NULL_INSTANCEOF">NP: A known null value i s checked to see if it is an instance of a type</a></td><td>Correctness</td></tr > 234 <tr bgcolor="#ffffff"><td><a href="#NP_NONNULL_RETURN_VIOLATION">NP: Method may return null, but is declared @Nonnull</a></td><td>Correctness</td></tr>
228 <tr bgcolor="#eeeeee"><td><a href="#NP_NULL_ON_SOME_PATH">NP: Possible null poin ter dereference</a></td><td>Correctness</td></tr> 235 <tr bgcolor="#eeeeee"><td><a href="#NP_NULL_INSTANCEOF">NP: A known null value i s checked to see if it is an instance of a type</a></td><td>Correctness</td></tr >
229 <tr bgcolor="#ffffff"><td><a href="#NP_NULL_ON_SOME_PATH_EXCEPTION">NP: Possible null pointer dereference in method on exception path</a></td><td>Correctness</t d></tr> 236 <tr bgcolor="#ffffff"><td><a href="#NP_NULL_ON_SOME_PATH">NP: Possible null poin ter dereference</a></td><td>Correctness</td></tr>
230 <tr bgcolor="#eeeeee"><td><a href="#NP_NULL_PARAM_DEREF">NP: Method call passes null for nonnull parameter</a></td><td>Correctness</td></tr> 237 <tr bgcolor="#eeeeee"><td><a href="#NP_NULL_ON_SOME_PATH_EXCEPTION">NP: Possible null pointer dereference in method on exception path</a></td><td>Correctness</t d></tr>
231 <tr bgcolor="#ffffff"><td><a href="#NP_NULL_PARAM_DEREF_ALL_TARGETS_DANGEROUS">N P: Method call passes null for nonnull parameter</a></td><td>Correctness</td></t r> 238 <tr bgcolor="#ffffff"><td><a href="#NP_NULL_PARAM_DEREF">NP: Method call passes null for non-null parameter</a></td><td>Correctness</td></tr>
232 <tr bgcolor="#eeeeee"><td><a href="#NP_NULL_PARAM_DEREF_NONVIRTUAL">NP: Non-virt ual method call passes null for nonnull parameter</a></td><td>Correctness</td></ tr> 239 <tr bgcolor="#eeeeee"><td><a href="#NP_NULL_PARAM_DEREF_ALL_TARGETS_DANGEROUS">N P: Method call passes null for non-null parameter</a></td><td>Correctness</td></ tr>
233 <tr bgcolor="#ffffff"><td><a href="#NP_STORE_INTO_NONNULL_FIELD">NP: Store of nu ll value into field annotated NonNull</a></td><td>Correctness</td></tr> 240 <tr bgcolor="#ffffff"><td><a href="#NP_NULL_PARAM_DEREF_NONVIRTUAL">NP: Non-virt ual method call passes null for non-null parameter</a></td><td>Correctness</td>< /tr>
241 <tr bgcolor="#eeeeee"><td><a href="#NP_OPTIONAL_RETURN_NULL">NP: Method with Opt ional return type returns explicit null</a></td><td>Correctness</td></tr>
242 <tr bgcolor="#ffffff"><td><a href="#NP_STORE_INTO_NONNULL_FIELD">NP: Store of nu ll value into field annotated @Nonnull</a></td><td>Correctness</td></tr>
234 <tr bgcolor="#eeeeee"><td><a href="#NP_UNWRITTEN_FIELD">NP: Read of unwritten fi eld</a></td><td>Correctness</td></tr> 243 <tr bgcolor="#eeeeee"><td><a href="#NP_UNWRITTEN_FIELD">NP: Read of unwritten fi eld</a></td><td>Correctness</td></tr>
235 <tr bgcolor="#ffffff"><td><a href="#NM_BAD_EQUAL">Nm: Class defines equal(Object ); should it be equals(Object)?</a></td><td>Correctness</td></tr> 244 <tr bgcolor="#ffffff"><td><a href="#NM_BAD_EQUAL">Nm: Class defines equal(Object ); should it be equals(Object)?</a></td><td>Correctness</td></tr>
236 <tr bgcolor="#eeeeee"><td><a href="#NM_LCASE_HASHCODE">Nm: Class defines hashcod e(); should it be hashCode()?</a></td><td>Correctness</td></tr> 245 <tr bgcolor="#eeeeee"><td><a href="#NM_LCASE_HASHCODE">Nm: Class defines hashcod e(); should it be hashCode()?</a></td><td>Correctness</td></tr>
237 <tr bgcolor="#ffffff"><td><a href="#NM_LCASE_TOSTRING">Nm: Class defines tostrin g(); should it be toString()?</a></td><td>Correctness</td></tr> 246 <tr bgcolor="#ffffff"><td><a href="#NM_LCASE_TOSTRING">Nm: Class defines tostrin g(); should it be toString()?</a></td><td>Correctness</td></tr>
238 <tr bgcolor="#eeeeee"><td><a href="#NM_METHOD_CONSTRUCTOR_CONFUSION">Nm: Apparen t method/constructor confusion</a></td><td>Correctness</td></tr> 247 <tr bgcolor="#eeeeee"><td><a href="#NM_METHOD_CONSTRUCTOR_CONFUSION">Nm: Apparen t method/constructor confusion</a></td><td>Correctness</td></tr>
239 <tr bgcolor="#ffffff"><td><a href="#NM_VERY_CONFUSING">Nm: Very confusing method names</a></td><td>Correctness</td></tr> 248 <tr bgcolor="#ffffff"><td><a href="#NM_VERY_CONFUSING">Nm: Very confusing method names</a></td><td>Correctness</td></tr>
240 <tr bgcolor="#eeeeee"><td><a href="#NM_WRONG_PACKAGE">Nm: Method doesn't overrid e method in superclass due to wrong package for parameter</a></td><td>Correctnes s</td></tr> 249 <tr bgcolor="#eeeeee"><td><a href="#NM_WRONG_PACKAGE">Nm: Method doesn't overrid e method in superclass due to wrong package for parameter</a></td><td>Correctnes s</td></tr>
241 <tr bgcolor="#ffffff"><td><a href="#QBA_QUESTIONABLE_BOOLEAN_ASSIGNMENT">QBA: Me thod assigns boolean literal in boolean expression</a></td><td>Correctness</td>< /tr> 250 <tr bgcolor="#ffffff"><td><a href="#QBA_QUESTIONABLE_BOOLEAN_ASSIGNMENT">QBA: Me thod assigns boolean literal in boolean expression</a></td><td>Correctness</td>< /tr>
251 <tr bgcolor="#eeeeee"><td><a href="#RANGE_ARRAY_INDEX">RANGE: Array index is out of bounds</a></td><td>Correctness</td></tr>
252 <tr bgcolor="#ffffff"><td><a href="#RANGE_ARRAY_LENGTH">RANGE: Array length is o ut of bounds</a></td><td>Correctness</td></tr>
253 <tr bgcolor="#eeeeee"><td><a href="#RANGE_ARRAY_OFFSET">RANGE: Array offset is o ut of bounds</a></td><td>Correctness</td></tr>
254 <tr bgcolor="#ffffff"><td><a href="#RANGE_STRING_INDEX">RANGE: String index is o ut of bounds</a></td><td>Correctness</td></tr>
242 <tr bgcolor="#eeeeee"><td><a href="#RC_REF_COMPARISON">RC: Suspicious reference comparison</a></td><td>Correctness</td></tr> 255 <tr bgcolor="#eeeeee"><td><a href="#RC_REF_COMPARISON">RC: Suspicious reference comparison</a></td><td>Correctness</td></tr>
243 <tr bgcolor="#ffffff"><td><a href="#RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NP E">RCN: Nullcheck of value previously dereferenced</a></td><td>Correctness</td>< /tr> 256 <tr bgcolor="#ffffff"><td><a href="#RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NP E">RCN: Nullcheck of value previously dereferenced</a></td><td>Correctness</td>< /tr>
244 <tr bgcolor="#eeeeee"><td><a href="#RE_BAD_SYNTAX_FOR_REGULAR_EXPRESSION">RE: In valid syntax for regular expression</a></td><td>Correctness</td></tr> 257 <tr bgcolor="#eeeeee"><td><a href="#RE_BAD_SYNTAX_FOR_REGULAR_EXPRESSION">RE: In valid syntax for regular expression</a></td><td>Correctness</td></tr>
245 <tr bgcolor="#ffffff"><td><a href="#RE_CANT_USE_FILE_SEPARATOR_AS_REGULAR_EXPRES SION">RE: File.separator used for regular expression</a></td><td>Correctness</td ></tr> 258 <tr bgcolor="#ffffff"><td><a href="#RE_CANT_USE_FILE_SEPARATOR_AS_REGULAR_EXPRES SION">RE: File.separator used for regular expression</a></td><td>Correctness</td ></tr>
246 <tr bgcolor="#eeeeee"><td><a href="#RE_POSSIBLE_UNINTENDED_PATTERN">RE: "." or " |" used for regular expression</a></td><td>Correctness</td></tr> 259 <tr bgcolor="#eeeeee"><td><a href="#RE_POSSIBLE_UNINTENDED_PATTERN">RE: "." or " |" used for regular expression</a></td><td>Correctness</td></tr>
247 <tr bgcolor="#ffffff"><td><a href="#RV_01_TO_INT">RV: Random value from 0 to 1 i s coerced to the integer 0</a></td><td>Correctness</td></tr> 260 <tr bgcolor="#ffffff"><td><a href="#RV_01_TO_INT">RV: Random value from 0 to 1 i s coerced to the integer 0</a></td><td>Correctness</td></tr>
248 <tr bgcolor="#eeeeee"><td><a href="#RV_ABSOLUTE_VALUE_OF_HASHCODE">RV: Bad attem pt to compute absolute value of signed 32-bit hashcode </a></td><td>Correctness< /td></tr> 261 <tr bgcolor="#eeeeee"><td><a href="#RV_ABSOLUTE_VALUE_OF_HASHCODE">RV: Bad attem pt to compute absolute value of signed 32-bit hashcode </a></td><td>Correctness< /td></tr>
249 <tr bgcolor="#ffffff"><td><a href="#RV_ABSOLUTE_VALUE_OF_RANDOM_INT">RV: Bad att empt to compute absolute value of signed random integer</a></td><td>Correctness< /td></tr> 262 <tr bgcolor="#ffffff"><td><a href="#RV_ABSOLUTE_VALUE_OF_RANDOM_INT">RV: Bad att empt to compute absolute value of signed random integer</a></td><td>Correctness< /td></tr>
250 <tr bgcolor="#eeeeee"><td><a href="#RV_CHECK_COMPARETO_FOR_SPECIFIC_RETURN_VALUE ">RV: Code checks for specific values returned by compareTo</a></td><td>Correctn ess</td></tr> 263 <tr bgcolor="#eeeeee"><td><a href="#RV_CHECK_COMPARETO_FOR_SPECIFIC_RETURN_VALUE ">RV: Code checks for specific values returned by compareTo</a></td><td>Correctn ess</td></tr>
251 <tr bgcolor="#ffffff"><td><a href="#RV_EXCEPTION_NOT_THROWN">RV: Exception creat ed and dropped rather than thrown</a></td><td>Correctness</td></tr> 264 <tr bgcolor="#ffffff"><td><a href="#RV_EXCEPTION_NOT_THROWN">RV: Exception creat ed and dropped rather than thrown</a></td><td>Correctness</td></tr>
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 <tr bgcolor="#eeeeee"><td><a href="#DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED"> DP: Classloaders should only be created inside doPrivileged block</a></td><td>Ma licious code vulnerability</td></tr> 303 <tr bgcolor="#eeeeee"><td><a href="#DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED"> DP: Classloaders should only be created inside doPrivileged block</a></td><td>Ma licious code vulnerability</td></tr>
291 <tr bgcolor="#ffffff"><td><a href="#DP_DO_INSIDE_DO_PRIVILEGED">DP: Method invok ed that should be only be invoked inside a doPrivileged block</a></td><td>Malici ous code vulnerability</td></tr> 304 <tr bgcolor="#ffffff"><td><a href="#DP_DO_INSIDE_DO_PRIVILEGED">DP: Method invok ed that should be only be invoked inside a doPrivileged block</a></td><td>Malici ous code vulnerability</td></tr>
292 <tr bgcolor="#eeeeee"><td><a href="#EI_EXPOSE_REP">EI: May expose internal repre sentation by returning reference to mutable object</a></td><td>Malicious code vu lnerability</td></tr> 305 <tr bgcolor="#eeeeee"><td><a href="#EI_EXPOSE_REP">EI: May expose internal repre sentation by returning reference to mutable object</a></td><td>Malicious code vu lnerability</td></tr>
293 <tr bgcolor="#ffffff"><td><a href="#EI_EXPOSE_REP2">EI2: May expose internal rep resentation by incorporating reference to mutable object</a></td><td>Malicious c ode vulnerability</td></tr> 306 <tr bgcolor="#ffffff"><td><a href="#EI_EXPOSE_REP2">EI2: May expose internal rep resentation by incorporating reference to mutable object</a></td><td>Malicious c ode vulnerability</td></tr>
294 <tr bgcolor="#eeeeee"><td><a href="#FI_PUBLIC_SHOULD_BE_PROTECTED">FI: Finalizer should be protected, not public</a></td><td>Malicious code vulnerability</td></ tr> 307 <tr bgcolor="#eeeeee"><td><a href="#FI_PUBLIC_SHOULD_BE_PROTECTED">FI: Finalizer should be protected, not public</a></td><td>Malicious code vulnerability</td></ tr>
295 <tr bgcolor="#ffffff"><td><a href="#EI_EXPOSE_STATIC_REP2">MS: May expose intern al static state by storing a mutable object into a static field</a></td><td>Mali cious code vulnerability</td></tr> 308 <tr bgcolor="#ffffff"><td><a href="#EI_EXPOSE_STATIC_REP2">MS: May expose intern al static state by storing a mutable object into a static field</a></td><td>Mali cious code vulnerability</td></tr>
296 <tr bgcolor="#eeeeee"><td><a href="#MS_CANNOT_BE_FINAL">MS: Field isn't final an d can't be protected from malicious code</a></td><td>Malicious code vulnerabilit y</td></tr> 309 <tr bgcolor="#eeeeee"><td><a href="#MS_CANNOT_BE_FINAL">MS: Field isn't final an d can't be protected from malicious code</a></td><td>Malicious code vulnerabilit y</td></tr>
297 <tr bgcolor="#ffffff"><td><a href="#MS_EXPOSE_REP">MS: Public static method may expose internal representation by returning array</a></td><td>Malicious code vul nerability</td></tr> 310 <tr bgcolor="#ffffff"><td><a href="#MS_EXPOSE_REP">MS: Public static method may expose internal representation by returning array</a></td><td>Malicious code vul nerability</td></tr>
298 <tr bgcolor="#eeeeee"><td><a href="#MS_FINAL_PKGPROTECT">MS: Field should be bot h final and package protected</a></td><td>Malicious code vulnerability</td></tr> 311 <tr bgcolor="#eeeeee"><td><a href="#MS_FINAL_PKGPROTECT">MS: Field should be bot h final and package protected</a></td><td>Malicious code vulnerability</td></tr>
299 <tr bgcolor="#ffffff"><td><a href="#MS_MUTABLE_ARRAY">MS: Field is a mutable arr ay</a></td><td>Malicious code vulnerability</td></tr> 312 <tr bgcolor="#ffffff"><td><a href="#MS_MUTABLE_ARRAY">MS: Field is a mutable arr ay</a></td><td>Malicious code vulnerability</td></tr>
313 <tr bgcolor="#eeeeee"><td><a href="#MS_MUTABLE_COLLECTION">MS: Field is a mutabl e collection</a></td><td>Malicious code vulnerability</td></tr>
314 <tr bgcolor="#ffffff"><td><a href="#MS_MUTABLE_COLLECTION_PKGPROTECT">MS: Field is a mutable collection which should be package protected</a></td><td>Malicious code vulnerability</td></tr>
300 <tr bgcolor="#eeeeee"><td><a href="#MS_MUTABLE_HASHTABLE">MS: Field is a mutable Hashtable</a></td><td>Malicious code vulnerability</td></tr> 315 <tr bgcolor="#eeeeee"><td><a href="#MS_MUTABLE_HASHTABLE">MS: Field is a mutable Hashtable</a></td><td>Malicious code vulnerability</td></tr>
301 <tr bgcolor="#ffffff"><td><a href="#MS_OOI_PKGPROTECT">MS: Field should be moved out of an interface and made package protected</a></td><td>Malicious code vulne rability</td></tr> 316 <tr bgcolor="#ffffff"><td><a href="#MS_OOI_PKGPROTECT">MS: Field should be moved out of an interface and made package protected</a></td><td>Malicious code vulne rability</td></tr>
302 <tr bgcolor="#eeeeee"><td><a href="#MS_PKGPROTECT">MS: Field should be package p rotected</a></td><td>Malicious code vulnerability</td></tr> 317 <tr bgcolor="#eeeeee"><td><a href="#MS_PKGPROTECT">MS: Field should be package p rotected</a></td><td>Malicious code vulnerability</td></tr>
303 <tr bgcolor="#ffffff"><td><a href="#MS_SHOULD_BE_FINAL">MS: Field isn't final bu t should be</a></td><td>Malicious code vulnerability</td></tr> 318 <tr bgcolor="#ffffff"><td><a href="#MS_SHOULD_BE_FINAL">MS: Field isn't final bu t should be</a></td><td>Malicious code vulnerability</td></tr>
304 <tr bgcolor="#eeeeee"><td><a href="#MS_SHOULD_BE_REFACTORED_TO_BE_FINAL">MS: Fie ld isn't final but should be refactored to be so</a></td><td>Malicious code vuln erability</td></tr> 319 <tr bgcolor="#eeeeee"><td><a href="#MS_SHOULD_BE_REFACTORED_TO_BE_FINAL">MS: Fie ld isn't final but should be refactored to be so</a></td><td>Malicious code vuln erability</td></tr>
305 <tr bgcolor="#ffffff"><td><a href="#AT_OPERATION_SEQUENCE_ON_CONCURRENT_ABSTRACT ION">AT: Sequence of calls to concurrent abstraction may not be atomic</a></td>< td>Multithreaded correctness</td></tr> 320 <tr bgcolor="#ffffff"><td><a href="#AT_OPERATION_SEQUENCE_ON_CONCURRENT_ABSTRACT ION">AT: Sequence of calls to concurrent abstraction may not be atomic</a></td>< td>Multithreaded correctness</td></tr>
306 <tr bgcolor="#eeeeee"><td><a href="#DC_DOUBLECHECK">DC: Possible double check of field</a></td><td>Multithreaded correctness</td></tr> 321 <tr bgcolor="#eeeeee"><td><a href="#DC_DOUBLECHECK">DC: Possible double check of field</a></td><td>Multithreaded correctness</td></tr>
307 <tr bgcolor="#ffffff"><td><a href="#DL_SYNCHRONIZATION_ON_BOOLEAN">DL: Synchroni zation on Boolean</a></td><td>Multithreaded correctness</td></tr> 322 <tr bgcolor="#ffffff"><td><a href="#DC_PARTIALLY_CONSTRUCTED">DC: Possible expos ure of partially initialized object</a></td><td>Multithreaded correctness</td></ tr>
308 <tr bgcolor="#eeeeee"><td><a href="#DL_SYNCHRONIZATION_ON_BOXED_PRIMITIVE">DL: S ynchronization on boxed primitive</a></td><td>Multithreaded correctness</td></tr > 323 <tr bgcolor="#eeeeee"><td><a href="#DL_SYNCHRONIZATION_ON_BOOLEAN">DL: Synchroni zation on Boolean</a></td><td>Multithreaded correctness</td></tr>
309 <tr bgcolor="#ffffff"><td><a href="#DL_SYNCHRONIZATION_ON_SHARED_CONSTANT">DL: S ynchronization on interned String </a></td><td>Multithreaded correctness</td></t r> 324 <tr bgcolor="#ffffff"><td><a href="#DL_SYNCHRONIZATION_ON_BOXED_PRIMITIVE">DL: S ynchronization on boxed primitive</a></td><td>Multithreaded correctness</td></tr >
310 <tr bgcolor="#eeeeee"><td><a href="#DL_SYNCHRONIZATION_ON_UNSHARED_BOXED_PRIMITI VE">DL: Synchronization on boxed primitive values</a></td><td>Multithreaded corr ectness</td></tr> 325 <tr bgcolor="#eeeeee"><td><a href="#DL_SYNCHRONIZATION_ON_SHARED_CONSTANT">DL: S ynchronization on interned String </a></td><td>Multithreaded correctness</td></t r>
311 <tr bgcolor="#ffffff"><td><a href="#DM_MONITOR_WAIT_ON_CONDITION">Dm: Monitor wa it() called on Condition</a></td><td>Multithreaded correctness</td></tr> 326 <tr bgcolor="#ffffff"><td><a href="#DL_SYNCHRONIZATION_ON_UNSHARED_BOXED_PRIMITI VE">DL: Synchronization on boxed primitive values</a></td><td>Multithreaded corr ectness</td></tr>
312 <tr bgcolor="#eeeeee"><td><a href="#DM_USELESS_THREAD">Dm: A thread was created using the default empty run method</a></td><td>Multithreaded correctness</td></t r> 327 <tr bgcolor="#eeeeee"><td><a href="#DM_MONITOR_WAIT_ON_CONDITION">Dm: Monitor wa it() called on Condition</a></td><td>Multithreaded correctness</td></tr>
313 <tr bgcolor="#ffffff"><td><a href="#ESync_EMPTY_SYNC">ESync: Empty synchronized block</a></td><td>Multithreaded correctness</td></tr> 328 <tr bgcolor="#ffffff"><td><a href="#DM_USELESS_THREAD">Dm: A thread was created using the default empty run method</a></td><td>Multithreaded correctness</td></t r>
314 <tr bgcolor="#eeeeee"><td><a href="#IS2_INCONSISTENT_SYNC">IS: Inconsistent sync hronization</a></td><td>Multithreaded correctness</td></tr> 329 <tr bgcolor="#eeeeee"><td><a href="#ESync_EMPTY_SYNC">ESync: Empty synchronized block</a></td><td>Multithreaded correctness</td></tr>
315 <tr bgcolor="#ffffff"><td><a href="#IS_FIELD_NOT_GUARDED">IS: Field not guarded against concurrent access</a></td><td>Multithreaded correctness</td></tr> 330 <tr bgcolor="#ffffff"><td><a href="#IS2_INCONSISTENT_SYNC">IS: Inconsistent sync hronization</a></td><td>Multithreaded correctness</td></tr>
316 <tr bgcolor="#eeeeee"><td><a href="#JLM_JSR166_LOCK_MONITORENTER">JLM: Synchroni zation performed on Lock</a></td><td>Multithreaded correctness</td></tr> 331 <tr bgcolor="#eeeeee"><td><a href="#IS_FIELD_NOT_GUARDED">IS: Field not guarded against concurrent access</a></td><td>Multithreaded correctness</td></tr>
317 <tr bgcolor="#ffffff"><td><a href="#JLM_JSR166_UTILCONCURRENT_MONITORENTER">JLM: Synchronization performed on util.concurrent instance</a></td><td>Multithreaded correctness</td></tr> 332 <tr bgcolor="#ffffff"><td><a href="#JLM_JSR166_LOCK_MONITORENTER">JLM: Synchroni zation performed on Lock</a></td><td>Multithreaded correctness</td></tr>
318 <tr bgcolor="#eeeeee"><td><a href="#JML_JSR166_CALLING_WAIT_RATHER_THAN_AWAIT">J LM: Using monitor style wait methods on util.concurrent abstraction</a></td><td> Multithreaded correctness</td></tr> 333 <tr bgcolor="#eeeeee"><td><a href="#JLM_JSR166_UTILCONCURRENT_MONITORENTER">JLM: Synchronization performed on util.concurrent instance</a></td><td>Multithreaded correctness</td></tr>
319 <tr bgcolor="#ffffff"><td><a href="#LI_LAZY_INIT_STATIC">LI: Incorrect lazy init ialization of static field</a></td><td>Multithreaded correctness</td></tr> 334 <tr bgcolor="#ffffff"><td><a href="#JML_JSR166_CALLING_WAIT_RATHER_THAN_AWAIT">J LM: Using monitor style wait methods on util.concurrent abstraction</a></td><td> Multithreaded correctness</td></tr>
320 <tr bgcolor="#eeeeee"><td><a href="#LI_LAZY_INIT_UPDATE_STATIC">LI: Incorrect la zy initialization and update of static field</a></td><td>Multithreaded correctne ss</td></tr> 335 <tr bgcolor="#eeeeee"><td><a href="#LI_LAZY_INIT_STATIC">LI: Incorrect lazy init ialization of static field</a></td><td>Multithreaded correctness</td></tr>
321 <tr bgcolor="#ffffff"><td><a href="#ML_SYNC_ON_FIELD_TO_GUARD_CHANGING_THAT_FIEL D">ML: Synchronization on field in futile attempt to guard that field</a></td><t d>Multithreaded correctness</td></tr> 336 <tr bgcolor="#ffffff"><td><a href="#LI_LAZY_INIT_UPDATE_STATIC">LI: Incorrect la zy initialization and update of static field</a></td><td>Multithreaded correctne ss</td></tr>
322 <tr bgcolor="#eeeeee"><td><a href="#ML_SYNC_ON_UPDATED_FIELD">ML: Method synchro nizes on an updated field</a></td><td>Multithreaded correctness</td></tr> 337 <tr bgcolor="#eeeeee"><td><a href="#ML_SYNC_ON_FIELD_TO_GUARD_CHANGING_THAT_FIEL D">ML: Synchronization on field in futile attempt to guard that field</a></td><t d>Multithreaded correctness</td></tr>
323 <tr bgcolor="#ffffff"><td><a href="#MSF_MUTABLE_SERVLET_FIELD">MSF: Mutable serv let field</a></td><td>Multithreaded correctness</td></tr> 338 <tr bgcolor="#ffffff"><td><a href="#ML_SYNC_ON_UPDATED_FIELD">ML: Method synchro nizes on an updated field</a></td><td>Multithreaded correctness</td></tr>
324 <tr bgcolor="#eeeeee"><td><a href="#MWN_MISMATCHED_NOTIFY">MWN: Mismatched notif y()</a></td><td>Multithreaded correctness</td></tr> 339 <tr bgcolor="#eeeeee"><td><a href="#MSF_MUTABLE_SERVLET_FIELD">MSF: Mutable serv let field</a></td><td>Multithreaded correctness</td></tr>
325 <tr bgcolor="#ffffff"><td><a href="#MWN_MISMATCHED_WAIT">MWN: Mismatched wait()< /a></td><td>Multithreaded correctness</td></tr> 340 <tr bgcolor="#ffffff"><td><a href="#MWN_MISMATCHED_NOTIFY">MWN: Mismatched notif y()</a></td><td>Multithreaded correctness</td></tr>
326 <tr bgcolor="#eeeeee"><td><a href="#NN_NAKED_NOTIFY">NN: Naked notify</a></td><t d>Multithreaded correctness</td></tr> 341 <tr bgcolor="#eeeeee"><td><a href="#MWN_MISMATCHED_WAIT">MWN: Mismatched wait()< /a></td><td>Multithreaded correctness</td></tr>
327 <tr bgcolor="#ffffff"><td><a href="#NP_SYNC_AND_NULL_CHECK_FIELD">NP: Synchroniz e and null check on the same field.</a></td><td>Multithreaded correctness</td></ tr> 342 <tr bgcolor="#ffffff"><td><a href="#NN_NAKED_NOTIFY">NN: Naked notify</a></td><t d>Multithreaded correctness</td></tr>
328 <tr bgcolor="#eeeeee"><td><a href="#NO_NOTIFY_NOT_NOTIFYALL">No: Using notify() rather than notifyAll()</a></td><td>Multithreaded correctness</td></tr> 343 <tr bgcolor="#eeeeee"><td><a href="#NP_SYNC_AND_NULL_CHECK_FIELD">NP: Synchroniz e and null check on the same field.</a></td><td>Multithreaded correctness</td></ tr>
329 <tr bgcolor="#ffffff"><td><a href="#RS_READOBJECT_SYNC">RS: Class's readObject() method is synchronized</a></td><td>Multithreaded correctness</td></tr> 344 <tr bgcolor="#ffffff"><td><a href="#NO_NOTIFY_NOT_NOTIFYALL">No: Using notify() rather than notifyAll()</a></td><td>Multithreaded correctness</td></tr>
330 <tr bgcolor="#eeeeee"><td><a href="#RV_RETURN_VALUE_OF_PUTIFABSENT_IGNORED">RV: Return value of putIfAbsent ignored, value passed to putIfAbsent reused</a></td> <td>Multithreaded correctness</td></tr> 345 <tr bgcolor="#eeeeee"><td><a href="#RS_READOBJECT_SYNC">RS: Class's readObject() method is synchronized</a></td><td>Multithreaded correctness</td></tr>
331 <tr bgcolor="#ffffff"><td><a href="#RU_INVOKE_RUN">Ru: Invokes run on a thread ( did you mean to start it instead?)</a></td><td>Multithreaded correctness</td></t r> 346 <tr bgcolor="#ffffff"><td><a href="#RV_RETURN_VALUE_OF_PUTIFABSENT_IGNORED">RV: Return value of putIfAbsent ignored, value passed to putIfAbsent reused</a></td> <td>Multithreaded correctness</td></tr>
332 <tr bgcolor="#eeeeee"><td><a href="#SC_START_IN_CTOR">SC: Constructor invokes Th read.start()</a></td><td>Multithreaded correctness</td></tr> 347 <tr bgcolor="#eeeeee"><td><a href="#RU_INVOKE_RUN">Ru: Invokes run on a thread ( did you mean to start it instead?)</a></td><td>Multithreaded correctness</td></t r>
333 <tr bgcolor="#ffffff"><td><a href="#SP_SPIN_ON_FIELD">SP: Method spins on field< /a></td><td>Multithreaded correctness</td></tr> 348 <tr bgcolor="#ffffff"><td><a href="#SC_START_IN_CTOR">SC: Constructor invokes Th read.start()</a></td><td>Multithreaded correctness</td></tr>
334 <tr bgcolor="#eeeeee"><td><a href="#STCAL_INVOKE_ON_STATIC_CALENDAR_INSTANCE">ST CAL: Call to static Calendar</a></td><td>Multithreaded correctness</td></tr> 349 <tr bgcolor="#eeeeee"><td><a href="#SP_SPIN_ON_FIELD">SP: Method spins on field< /a></td><td>Multithreaded correctness</td></tr>
335 <tr bgcolor="#ffffff"><td><a href="#STCAL_INVOKE_ON_STATIC_DATE_FORMAT_INSTANCE" >STCAL: Call to static DateFormat</a></td><td>Multithreaded correctness</td></tr > 350 <tr bgcolor="#ffffff"><td><a href="#STCAL_INVOKE_ON_STATIC_CALENDAR_INSTANCE">ST CAL: Call to static Calendar</a></td><td>Multithreaded correctness</td></tr>
336 <tr bgcolor="#eeeeee"><td><a href="#STCAL_STATIC_CALENDAR_INSTANCE">STCAL: Stati c Calendar field</a></td><td>Multithreaded correctness</td></tr> 351 <tr bgcolor="#eeeeee"><td><a href="#STCAL_INVOKE_ON_STATIC_DATE_FORMAT_INSTANCE" >STCAL: Call to static DateFormat</a></td><td>Multithreaded correctness</td></tr >
337 <tr bgcolor="#ffffff"><td><a href="#STCAL_STATIC_SIMPLE_DATE_FORMAT_INSTANCE">ST CAL: Static DateFormat</a></td><td>Multithreaded correctness</td></tr> 352 <tr bgcolor="#ffffff"><td><a href="#STCAL_STATIC_CALENDAR_INSTANCE">STCAL: Stati c Calendar field</a></td><td>Multithreaded correctness</td></tr>
338 <tr bgcolor="#eeeeee"><td><a href="#SWL_SLEEP_WITH_LOCK_HELD">SWL: Method calls Thread.sleep() with a lock held</a></td><td>Multithreaded correctness</td></tr> 353 <tr bgcolor="#eeeeee"><td><a href="#STCAL_STATIC_SIMPLE_DATE_FORMAT_INSTANCE">ST CAL: Static DateFormat</a></td><td>Multithreaded correctness</td></tr>
339 <tr bgcolor="#ffffff"><td><a href="#TLW_TWO_LOCK_WAIT">TLW: Wait with two locks held</a></td><td>Multithreaded correctness</td></tr> 354 <tr bgcolor="#ffffff"><td><a href="#SWL_SLEEP_WITH_LOCK_HELD">SWL: Method calls Thread.sleep() with a lock held</a></td><td>Multithreaded correctness</td></tr>
340 <tr bgcolor="#eeeeee"><td><a href="#UG_SYNC_SET_UNSYNC_GET">UG: Unsynchronized g et method, synchronized set method</a></td><td>Multithreaded correctness</td></t r> 355 <tr bgcolor="#eeeeee"><td><a href="#TLW_TWO_LOCK_WAIT">TLW: Wait with two locks held</a></td><td>Multithreaded correctness</td></tr>
341 <tr bgcolor="#ffffff"><td><a href="#UL_UNRELEASED_LOCK">UL: Method does not rele ase lock on all paths</a></td><td>Multithreaded correctness</td></tr> 356 <tr bgcolor="#ffffff"><td><a href="#UG_SYNC_SET_UNSYNC_GET">UG: Unsynchronized g et method, synchronized set method</a></td><td>Multithreaded correctness</td></t r>
342 <tr bgcolor="#eeeeee"><td><a href="#UL_UNRELEASED_LOCK_EXCEPTION_PATH">UL: Metho d does not release lock on all exception paths</a></td><td>Multithreaded correct ness</td></tr> 357 <tr bgcolor="#eeeeee"><td><a href="#UL_UNRELEASED_LOCK">UL: Method does not rele ase lock on all paths</a></td><td>Multithreaded correctness</td></tr>
343 <tr bgcolor="#ffffff"><td><a href="#UW_UNCOND_WAIT">UW: Unconditional wait</a></ td><td>Multithreaded correctness</td></tr> 358 <tr bgcolor="#ffffff"><td><a href="#UL_UNRELEASED_LOCK_EXCEPTION_PATH">UL: Metho d does not release lock on all exception paths</a></td><td>Multithreaded correct ness</td></tr>
344 <tr bgcolor="#eeeeee"><td><a href="#VO_VOLATILE_INCREMENT">VO: An increment to a volatile field isn't atomic</a></td><td>Multithreaded correctness</td></tr> 359 <tr bgcolor="#eeeeee"><td><a href="#UW_UNCOND_WAIT">UW: Unconditional wait</a></ td><td>Multithreaded correctness</td></tr>
345 <tr bgcolor="#ffffff"><td><a href="#VO_VOLATILE_REFERENCE_TO_ARRAY">VO: A volati le reference to an array doesn't treat the array elements as volatile</a></td><t d>Multithreaded correctness</td></tr> 360 <tr bgcolor="#ffffff"><td><a href="#VO_VOLATILE_INCREMENT">VO: An increment to a volatile field isn't atomic</a></td><td>Multithreaded correctness</td></tr>
346 <tr bgcolor="#eeeeee"><td><a href="#WL_USING_GETCLASS_RATHER_THAN_CLASS_LITERAL" >WL: Synchronization on getClass rather than class literal</a></td><td>Multithre aded correctness</td></tr> 361 <tr bgcolor="#eeeeee"><td><a href="#VO_VOLATILE_REFERENCE_TO_ARRAY">VO: A volati le reference to an array doesn't treat the array elements as volatile</a></td><t d>Multithreaded correctness</td></tr>
347 <tr bgcolor="#ffffff"><td><a href="#WS_WRITEOBJECT_SYNC">WS: Class's writeObject () method is synchronized but nothing else is</a></td><td>Multithreaded correctn ess</td></tr> 362 <tr bgcolor="#ffffff"><td><a href="#WL_USING_GETCLASS_RATHER_THAN_CLASS_LITERAL" >WL: Synchronization on getClass rather than class literal</a></td><td>Multithre aded correctness</td></tr>
348 <tr bgcolor="#eeeeee"><td><a href="#WA_AWAIT_NOT_IN_LOOP">Wa: Condition.await() not in loop </a></td><td>Multithreaded correctness</td></tr> 363 <tr bgcolor="#eeeeee"><td><a href="#WS_WRITEOBJECT_SYNC">WS: Class's writeObject () method is synchronized but nothing else is</a></td><td>Multithreaded correctn ess</td></tr>
349 <tr bgcolor="#ffffff"><td><a href="#WA_NOT_IN_LOOP">Wa: Wait not in loop </a></t d><td>Multithreaded correctness</td></tr> 364 <tr bgcolor="#ffffff"><td><a href="#WA_AWAIT_NOT_IN_LOOP">Wa: Condition.await() not in loop </a></td><td>Multithreaded correctness</td></tr>
350 <tr bgcolor="#eeeeee"><td><a href="#BX_BOXING_IMMEDIATELY_UNBOXED">Bx: Primitive value is boxed and then immediately unboxed</a></td><td>Performance</td></tr> 365 <tr bgcolor="#eeeeee"><td><a href="#WA_NOT_IN_LOOP">Wa: Wait not in loop </a></t d><td>Multithreaded correctness</td></tr>
351 <tr bgcolor="#ffffff"><td><a href="#BX_BOXING_IMMEDIATELY_UNBOXED_TO_PERFORM_COE RCION">Bx: Primitive value is boxed then unboxed to perform primitive coercion</ a></td><td>Performance</td></tr> 366 <tr bgcolor="#ffffff"><td><a href="#BX_BOXING_IMMEDIATELY_UNBOXED">Bx: Primitive value is boxed and then immediately unboxed</a></td><td>Performance</td></tr>
367 <tr bgcolor="#eeeeee"><td><a href="#BX_BOXING_IMMEDIATELY_UNBOXED_TO_PERFORM_COE RCION">Bx: Primitive value is boxed then unboxed to perform primitive coercion</ a></td><td>Performance</td></tr>
368 <tr bgcolor="#ffffff"><td><a href="#BX_UNBOXED_AND_COERCED_FOR_TERNARY_OPERATOR" >Bx: Primitive value is unboxed and coerced for ternary operator</a></td><td>Per formance</td></tr>
352 <tr bgcolor="#eeeeee"><td><a href="#BX_UNBOXING_IMMEDIATELY_REBOXED">Bx: Boxed v alue is unboxed and then immediately reboxed</a></td><td>Performance</td></tr> 369 <tr bgcolor="#eeeeee"><td><a href="#BX_UNBOXING_IMMEDIATELY_REBOXED">Bx: Boxed v alue is unboxed and then immediately reboxed</a></td><td>Performance</td></tr>
353 <tr bgcolor="#ffffff"><td><a href="#DM_BOXED_PRIMITIVE_FOR_PARSING">Bx: Boxing/u nboxing to parse a primitive</a></td><td>Performance</td></tr> 370 <tr bgcolor="#ffffff"><td><a href="#DM_BOXED_PRIMITIVE_FOR_COMPARE">Bx: Boxing a primitive to compare</a></td><td>Performance</td></tr>
354 <tr bgcolor="#eeeeee"><td><a href="#DM_BOXED_PRIMITIVE_TOSTRING">Bx: Method allo cates a boxed primitive just to call toString</a></td><td>Performance</td></tr> 371 <tr bgcolor="#eeeeee"><td><a href="#DM_BOXED_PRIMITIVE_FOR_PARSING">Bx: Boxing/u nboxing to parse a primitive</a></td><td>Performance</td></tr>
355 <tr bgcolor="#ffffff"><td><a href="#DM_FP_NUMBER_CTOR">Bx: Method invokes ineffi cient floating-point Number constructor; use static valueOf instead</a></td><td> Performance</td></tr> 372 <tr bgcolor="#ffffff"><td><a href="#DM_BOXED_PRIMITIVE_TOSTRING">Bx: Method allo cates a boxed primitive just to call toString</a></td><td>Performance</td></tr>
356 <tr bgcolor="#eeeeee"><td><a href="#DM_NUMBER_CTOR">Bx: Method invokes inefficie nt Number constructor; use static valueOf instead</a></td><td>Performance</td></ tr> 373 <tr bgcolor="#eeeeee"><td><a href="#DM_FP_NUMBER_CTOR">Bx: Method invokes ineffi cient floating-point Number constructor; use static valueOf instead</a></td><td> Performance</td></tr>
357 <tr bgcolor="#ffffff"><td><a href="#DMI_BLOCKING_METHODS_ON_URL">Dm: The equals and hashCode methods of URL are blocking</a></td><td>Performance</td></tr> 374 <tr bgcolor="#ffffff"><td><a href="#DM_NUMBER_CTOR">Bx: Method invokes inefficie nt Number constructor; use static valueOf instead</a></td><td>Performance</td></ tr>
358 <tr bgcolor="#eeeeee"><td><a href="#DMI_COLLECTION_OF_URLS">Dm: Maps and sets of URLs can be performance hogs</a></td><td>Performance</td></tr> 375 <tr bgcolor="#eeeeee"><td><a href="#DMI_BLOCKING_METHODS_ON_URL">Dm: The equals and hashCode methods of URL are blocking</a></td><td>Performance</td></tr>
359 <tr bgcolor="#ffffff"><td><a href="#DM_BOOLEAN_CTOR">Dm: Method invokes ineffici ent Boolean constructor; use Boolean.valueOf(...) instead</a></td><td>Performanc e</td></tr> 376 <tr bgcolor="#ffffff"><td><a href="#DMI_COLLECTION_OF_URLS">Dm: Maps and sets of URLs can be performance hogs</a></td><td>Performance</td></tr>
360 <tr bgcolor="#eeeeee"><td><a href="#DM_GC">Dm: Explicit garbage collection; extr emely dubious except in benchmarking code</a></td><td>Performance</td></tr> 377 <tr bgcolor="#eeeeee"><td><a href="#DM_BOOLEAN_CTOR">Dm: Method invokes ineffici ent Boolean constructor; use Boolean.valueOf(...) instead</a></td><td>Performanc e</td></tr>
361 <tr bgcolor="#ffffff"><td><a href="#DM_NEW_FOR_GETCLASS">Dm: Method allocates an object, only to get the class object</a></td><td>Performance</td></tr> 378 <tr bgcolor="#ffffff"><td><a href="#DM_GC">Dm: Explicit garbage collection; extr emely dubious except in benchmarking code</a></td><td>Performance</td></tr>
362 <tr bgcolor="#eeeeee"><td><a href="#DM_NEXTINT_VIA_NEXTDOUBLE">Dm: Use the nextI nt method of Random rather than nextDouble to generate a random integer</a></td> <td>Performance</td></tr> 379 <tr bgcolor="#eeeeee"><td><a href="#DM_NEW_FOR_GETCLASS">Dm: Method allocates an object, only to get the class object</a></td><td>Performance</td></tr>
363 <tr bgcolor="#ffffff"><td><a href="#DM_STRING_CTOR">Dm: Method invokes inefficie nt new String(String) constructor</a></td><td>Performance</td></tr> 380 <tr bgcolor="#ffffff"><td><a href="#DM_NEXTINT_VIA_NEXTDOUBLE">Dm: Use the nextI nt method of Random rather than nextDouble to generate a random integer</a></td> <td>Performance</td></tr>
364 <tr bgcolor="#eeeeee"><td><a href="#DM_STRING_TOSTRING">Dm: Method invokes toStr ing() method on a String</a></td><td>Performance</td></tr> 381 <tr bgcolor="#eeeeee"><td><a href="#DM_STRING_CTOR">Dm: Method invokes inefficie nt new String(String) constructor</a></td><td>Performance</td></tr>
365 <tr bgcolor="#ffffff"><td><a href="#DM_STRING_VOID_CTOR">Dm: Method invokes inef ficient new String() constructor</a></td><td>Performance</td></tr> 382 <tr bgcolor="#ffffff"><td><a href="#DM_STRING_TOSTRING">Dm: Method invokes toStr ing() method on a String</a></td><td>Performance</td></tr>
366 <tr bgcolor="#eeeeee"><td><a href="#HSC_HUGE_SHARED_STRING_CONSTANT">HSC: Huge s tring constants is duplicated across multiple class files</a></td><td>Performanc e</td></tr> 383 <tr bgcolor="#eeeeee"><td><a href="#DM_STRING_VOID_CTOR">Dm: Method invokes inef ficient new String() constructor</a></td><td>Performance</td></tr>
367 <tr bgcolor="#ffffff"><td><a href="#ITA_INEFFICIENT_TO_ARRAY">ITA: Method uses t oArray() with zero-length array argument</a></td><td>Performance</td></tr> 384 <tr bgcolor="#ffffff"><td><a href="#HSC_HUGE_SHARED_STRING_CONSTANT">HSC: Huge s tring constants is duplicated across multiple class files</a></td><td>Performanc e</td></tr>
368 <tr bgcolor="#eeeeee"><td><a href="#SBSC_USE_STRINGBUFFER_CONCATENATION">SBSC: M ethod concatenates strings using + in a loop</a></td><td>Performance</td></tr> 385 <tr bgcolor="#eeeeee"><td><a href="#SBSC_USE_STRINGBUFFER_CONCATENATION">SBSC: M ethod concatenates strings using + in a loop</a></td><td>Performance</td></tr>
369 <tr bgcolor="#ffffff"><td><a href="#SIC_INNER_SHOULD_BE_STATIC">SIC: Should be a static inner class</a></td><td>Performance</td></tr> 386 <tr bgcolor="#ffffff"><td><a href="#SIC_INNER_SHOULD_BE_STATIC">SIC: Should be a static inner class</a></td><td>Performance</td></tr>
370 <tr bgcolor="#eeeeee"><td><a href="#SIC_INNER_SHOULD_BE_STATIC_ANON">SIC: Could be refactored into a named static inner class</a></td><td>Performance</td></tr> 387 <tr bgcolor="#eeeeee"><td><a href="#SIC_INNER_SHOULD_BE_STATIC_ANON">SIC: Could be refactored into a named static inner class</a></td><td>Performance</td></tr>
371 <tr bgcolor="#ffffff"><td><a href="#SIC_INNER_SHOULD_BE_STATIC_NEEDS_THIS">SIC: Could be refactored into a static inner class</a></td><td>Performance</td></tr> 388 <tr bgcolor="#ffffff"><td><a href="#SIC_INNER_SHOULD_BE_STATIC_NEEDS_THIS">SIC: Could be refactored into a static inner class</a></td><td>Performance</td></tr>
372 <tr bgcolor="#eeeeee"><td><a href="#SS_SHOULD_BE_STATIC">SS: Unread field: shoul d this field be static?</a></td><td>Performance</td></tr> 389 <tr bgcolor="#eeeeee"><td><a href="#SS_SHOULD_BE_STATIC">SS: Unread field: shoul d this field be static?</a></td><td>Performance</td></tr>
373 <tr bgcolor="#ffffff"><td><a href="#UM_UNNECESSARY_MATH">UM: Method calls static Math class method on a constant value</a></td><td>Performance</td></tr> 390 <tr bgcolor="#ffffff"><td><a href="#UM_UNNECESSARY_MATH">UM: Method calls static Math class method on a constant value</a></td><td>Performance</td></tr>
374 <tr bgcolor="#eeeeee"><td><a href="#UPM_UNCALLED_PRIVATE_METHOD">UPM: Private me thod is never called</a></td><td>Performance</td></tr> 391 <tr bgcolor="#eeeeee"><td><a href="#UPM_UNCALLED_PRIVATE_METHOD">UPM: Private me thod is never called</a></td><td>Performance</td></tr>
375 <tr bgcolor="#ffffff"><td><a href="#URF_UNREAD_FIELD">UrF: Unread field</a></td> <td>Performance</td></tr> 392 <tr bgcolor="#ffffff"><td><a href="#URF_UNREAD_FIELD">UrF: Unread field</a></td> <td>Performance</td></tr>
376 <tr bgcolor="#eeeeee"><td><a href="#UUF_UNUSED_FIELD">UuF: Unused field</a></td> <td>Performance</td></tr> 393 <tr bgcolor="#eeeeee"><td><a href="#UUF_UNUSED_FIELD">UuF: Unused field</a></td> <td>Performance</td></tr>
377 <tr bgcolor="#ffffff"><td><a href="#WMI_WRONG_MAP_ITERATOR">WMI: Inefficient use of keySet iterator instead of entrySet iterator</a></td><td>Performance</td></t r> 394 <tr bgcolor="#ffffff"><td><a href="#WMI_WRONG_MAP_ITERATOR">WMI: Inefficient use of keySet iterator instead of entrySet iterator</a></td><td>Performance</td></t r>
378 <tr bgcolor="#eeeeee"><td><a href="#DMI_CONSTANT_DB_PASSWORD">Dm: Hardcoded cons tant database password</a></td><td>Security</td></tr> 395 <tr bgcolor="#eeeeee"><td><a href="#DMI_CONSTANT_DB_PASSWORD">Dm: Hardcoded cons tant database password</a></td><td>Security</td></tr>
379 <tr bgcolor="#ffffff"><td><a href="#DMI_EMPTY_DB_PASSWORD">Dm: Empty database pa ssword</a></td><td>Security</td></tr> 396 <tr bgcolor="#ffffff"><td><a href="#DMI_EMPTY_DB_PASSWORD">Dm: Empty database pa ssword</a></td><td>Security</td></tr>
380 <tr bgcolor="#eeeeee"><td><a href="#HRS_REQUEST_PARAMETER_TO_COOKIE">HRS: HTTP c ookie formed from untrusted input</a></td><td>Security</td></tr> 397 <tr bgcolor="#eeeeee"><td><a href="#HRS_REQUEST_PARAMETER_TO_COOKIE">HRS: HTTP c ookie formed from untrusted input</a></td><td>Security</td></tr>
381 <tr bgcolor="#ffffff"><td><a href="#HRS_REQUEST_PARAMETER_TO_HTTP_HEADER">HRS: H TTP Response splitting vulnerability</a></td><td>Security</td></tr> 398 <tr bgcolor="#ffffff"><td><a href="#HRS_REQUEST_PARAMETER_TO_HTTP_HEADER">HRS: H TTP Response splitting vulnerability</a></td><td>Security</td></tr>
382 <tr bgcolor="#eeeeee"><td><a href="#PT_ABSOLUTE_PATH_TRAVERSAL">PT: Absolute pat h traversal in servlet</a></td><td>Security</td></tr> 399 <tr bgcolor="#eeeeee"><td><a href="#PT_ABSOLUTE_PATH_TRAVERSAL">PT: Absolute pat h traversal in servlet</a></td><td>Security</td></tr>
383 <tr bgcolor="#ffffff"><td><a href="#PT_RELATIVE_PATH_TRAVERSAL">PT: Relative pat h traversal in servlet</a></td><td>Security</td></tr> 400 <tr bgcolor="#ffffff"><td><a href="#PT_RELATIVE_PATH_TRAVERSAL">PT: Relative pat h traversal in servlet</a></td><td>Security</td></tr>
384 <tr bgcolor="#eeeeee"><td><a href="#SQL_NONCONSTANT_STRING_PASSED_TO_EXECUTE">SQ L: Nonconstant string passed to execute method on an SQL statement</a></td><td>S ecurity</td></tr> 401 <tr bgcolor="#eeeeee"><td><a href="#SQL_NONCONSTANT_STRING_PASSED_TO_EXECUTE">SQ L: Nonconstant string passed to execute or addBatch method on an SQL statement</ a></td><td>Security</td></tr>
385 <tr bgcolor="#ffffff"><td><a href="#SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCON STANT_STRING">SQL: A prepared statement is generated from a nonconstant String</ a></td><td>Security</td></tr> 402 <tr bgcolor="#ffffff"><td><a href="#SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCON STANT_STRING">SQL: A prepared statement is generated from a nonconstant String</ a></td><td>Security</td></tr>
386 <tr bgcolor="#eeeeee"><td><a href="#XSS_REQUEST_PARAMETER_TO_JSP_WRITER">XSS: JS P reflected cross site scripting vulnerability</a></td><td>Security</td></tr> 403 <tr bgcolor="#eeeeee"><td><a href="#XSS_REQUEST_PARAMETER_TO_JSP_WRITER">XSS: JS P reflected cross site scripting vulnerability</a></td><td>Security</td></tr>
387 <tr bgcolor="#ffffff"><td><a href="#XSS_REQUEST_PARAMETER_TO_SEND_ERROR">XSS: Se rvlet reflected cross site scripting vulnerability in error page</a></td><td>Sec urity</td></tr> 404 <tr bgcolor="#ffffff"><td><a href="#XSS_REQUEST_PARAMETER_TO_SEND_ERROR">XSS: Se rvlet reflected cross site scripting vulnerability in error page</a></td><td>Sec urity</td></tr>
388 <tr bgcolor="#eeeeee"><td><a href="#XSS_REQUEST_PARAMETER_TO_SERVLET_WRITER">XSS : Servlet reflected cross site scripting vulnerability</a></td><td>Security</td> </tr> 405 <tr bgcolor="#eeeeee"><td><a href="#XSS_REQUEST_PARAMETER_TO_SERVLET_WRITER">XSS : Servlet reflected cross site scripting vulnerability</a></td><td>Security</td> </tr>
389 <tr bgcolor="#ffffff"><td><a href="#BC_BAD_CAST_TO_ABSTRACT_COLLECTION">BC: Ques tionable cast to abstract collection </a></td><td>Dodgy code</td></tr> 406 <tr bgcolor="#ffffff"><td><a href="#BC_BAD_CAST_TO_ABSTRACT_COLLECTION">BC: Ques tionable cast to abstract collection </a></td><td>Dodgy code</td></tr>
390 <tr bgcolor="#eeeeee"><td><a href="#BC_BAD_CAST_TO_CONCRETE_COLLECTION">BC: Ques tionable cast to concrete collection</a></td><td>Dodgy code</td></tr> 407 <tr bgcolor="#eeeeee"><td><a href="#BC_BAD_CAST_TO_CONCRETE_COLLECTION">BC: Ques tionable cast to concrete collection</a></td><td>Dodgy code</td></tr>
391 <tr bgcolor="#ffffff"><td><a href="#BC_UNCONFIRMED_CAST">BC: Unchecked/unconfirm ed cast</a></td><td>Dodgy code</td></tr> 408 <tr bgcolor="#ffffff"><td><a href="#BC_UNCONFIRMED_CAST">BC: Unchecked/unconfirm ed cast</a></td><td>Dodgy code</td></tr>
392 <tr bgcolor="#eeeeee"><td><a href="#BC_UNCONFIRMED_CAST_OF_RETURN_VALUE">BC: Unc hecked/unconfirmed cast of return value from method</a></td><td>Dodgy code</td>< /tr> 409 <tr bgcolor="#eeeeee"><td><a href="#BC_UNCONFIRMED_CAST_OF_RETURN_VALUE">BC: Unc hecked/unconfirmed cast of return value from method</a></td><td>Dodgy code</td>< /tr>
393 <tr bgcolor="#ffffff"><td><a href="#BC_VACUOUS_INSTANCEOF">BC: instanceof will a lways return true</a></td><td>Dodgy code</td></tr> 410 <tr bgcolor="#ffffff"><td><a href="#BC_VACUOUS_INSTANCEOF">BC: instanceof will a lways return true</a></td><td>Dodgy code</td></tr>
394 <tr bgcolor="#eeeeee"><td><a href="#ICAST_QUESTIONABLE_UNSIGNED_RIGHT_SHIFT">BSH IFT: Unsigned right shift cast to short/byte</a></td><td>Dodgy code</td></tr> 411 <tr bgcolor="#eeeeee"><td><a href="#ICAST_QUESTIONABLE_UNSIGNED_RIGHT_SHIFT">BSH IFT: Unsigned right shift cast to short/byte</a></td><td>Dodgy code</td></tr>
(...skipping 23 matching lines...) Expand all
418 <tr bgcolor="#eeeeee"><td><a href="#INT_VACUOUS_COMPARISON">INT: Vacuous compari son of integer value</a></td><td>Dodgy code</td></tr> 435 <tr bgcolor="#eeeeee"><td><a href="#INT_VACUOUS_COMPARISON">INT: Vacuous compari son of integer value</a></td><td>Dodgy code</td></tr>
419 <tr bgcolor="#ffffff"><td><a href="#MTIA_SUSPECT_SERVLET_INSTANCE_FIELD">MTIA: C lass extends Servlet class and uses instance variables</a></td><td>Dodgy code</t d></tr> 436 <tr bgcolor="#ffffff"><td><a href="#MTIA_SUSPECT_SERVLET_INSTANCE_FIELD">MTIA: C lass extends Servlet class and uses instance variables</a></td><td>Dodgy code</t d></tr>
420 <tr bgcolor="#eeeeee"><td><a href="#MTIA_SUSPECT_STRUTS_INSTANCE_FIELD">MTIA: Cl ass extends Struts Action class and uses instance variables</a></td><td>Dodgy co de</td></tr> 437 <tr bgcolor="#eeeeee"><td><a href="#MTIA_SUSPECT_STRUTS_INSTANCE_FIELD">MTIA: Cl ass extends Struts Action class and uses instance variables</a></td><td>Dodgy co de</td></tr>
421 <tr bgcolor="#ffffff"><td><a href="#NP_DEREFERENCE_OF_READLINE_VALUE">NP: Derefe rence of the result of readLine() without nullcheck</a></td><td>Dodgy code</td>< /tr> 438 <tr bgcolor="#ffffff"><td><a href="#NP_DEREFERENCE_OF_READLINE_VALUE">NP: Derefe rence of the result of readLine() without nullcheck</a></td><td>Dodgy code</td>< /tr>
422 <tr bgcolor="#eeeeee"><td><a href="#NP_IMMEDIATE_DEREFERENCE_OF_READLINE">NP: Im mediate dereference of the result of readLine()</a></td><td>Dodgy code</td></tr> 439 <tr bgcolor="#eeeeee"><td><a href="#NP_IMMEDIATE_DEREFERENCE_OF_READLINE">NP: Im mediate dereference of the result of readLine()</a></td><td>Dodgy code</td></tr>
423 <tr bgcolor="#ffffff"><td><a href="#NP_LOAD_OF_KNOWN_NULL_VALUE">NP: Load of kno wn null value</a></td><td>Dodgy code</td></tr> 440 <tr bgcolor="#ffffff"><td><a href="#NP_LOAD_OF_KNOWN_NULL_VALUE">NP: Load of kno wn null value</a></td><td>Dodgy code</td></tr>
424 <tr bgcolor="#eeeeee"><td><a href="#NP_METHOD_PARAMETER_TIGHTENS_ANNOTATION">NP: Method tightens nullness annotation on parameter</a></td><td>Dodgy code</td></t r> 441 <tr bgcolor="#eeeeee"><td><a href="#NP_METHOD_PARAMETER_TIGHTENS_ANNOTATION">NP: Method tightens nullness annotation on parameter</a></td><td>Dodgy code</td></t r>
425 <tr bgcolor="#ffffff"><td><a href="#NP_METHOD_RETURN_RELAXING_ANNOTATION">NP: Me thod relaxes nullness annotation on return value</a></td><td>Dodgy code</td></tr > 442 <tr bgcolor="#ffffff"><td><a href="#NP_METHOD_RETURN_RELAXING_ANNOTATION">NP: Me thod relaxes nullness annotation on return value</a></td><td>Dodgy code</td></tr >
426 <tr bgcolor="#eeeeee"><td><a href="#NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE">NP: Possible null pointer dereference due to return value of called method</a></td>< td>Dodgy code</td></tr> 443 <tr bgcolor="#eeeeee"><td><a href="#NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE">NP: Possible null pointer dereference due to return value of called method</a></td>< td>Dodgy code</td></tr>
427 <tr bgcolor="#ffffff"><td><a href="#NP_NULL_ON_SOME_PATH_MIGHT_BE_INFEASIBLE">NP : Possible null pointer dereference on branch that might be infeasible</a></td>< td>Dodgy code</td></tr> 444 <tr bgcolor="#ffffff"><td><a href="#NP_NULL_ON_SOME_PATH_MIGHT_BE_INFEASIBLE">NP : Possible null pointer dereference on branch that might be infeasible</a></td>< td>Dodgy code</td></tr>
428 <tr bgcolor="#eeeeee"><td><a href="#NP_PARAMETER_MUST_BE_NONNULL_BUT_MARKED_AS_N ULLABLE">NP: Parameter must be nonnull but is marked as nullable</a></td><td>Dod gy code</td></tr> 445 <tr bgcolor="#eeeeee"><td><a href="#NP_PARAMETER_MUST_BE_NONNULL_BUT_MARKED_AS_N ULLABLE">NP: Parameter must be non-null but is marked as nullable</a></td><td>Do dgy code</td></tr>
429 <tr bgcolor="#ffffff"><td><a href="#NP_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD">NP: Read of unwritten public or protected field</a></td><td>Dodgy code</td></tr> 446 <tr bgcolor="#ffffff"><td><a href="#NP_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD">NP: Read of unwritten public or protected field</a></td><td>Dodgy code</td></tr>
430 <tr bgcolor="#eeeeee"><td><a href="#NS_DANGEROUS_NON_SHORT_CIRCUIT">NS: Potentia lly dangerous use of non-short-circuit logic</a></td><td>Dodgy code</td></tr> 447 <tr bgcolor="#eeeeee"><td><a href="#NS_DANGEROUS_NON_SHORT_CIRCUIT">NS: Potentia lly dangerous use of non-short-circuit logic</a></td><td>Dodgy code</td></tr>
431 <tr bgcolor="#ffffff"><td><a href="#NS_NON_SHORT_CIRCUIT">NS: Questionable use o f non-short-circuit logic</a></td><td>Dodgy code</td></tr> 448 <tr bgcolor="#ffffff"><td><a href="#NS_NON_SHORT_CIRCUIT">NS: Questionable use o f non-short-circuit logic</a></td><td>Dodgy code</td></tr>
432 <tr bgcolor="#eeeeee"><td><a href="#PZLA_PREFER_ZERO_LENGTH_ARRAYS">PZLA: Consid er returning a zero length array rather than null</a></td><td>Dodgy code</td></t r> 449 <tr bgcolor="#eeeeee"><td><a href="#PZLA_PREFER_ZERO_LENGTH_ARRAYS">PZLA: Consid er returning a zero length array rather than null</a></td><td>Dodgy code</td></t r>
433 <tr bgcolor="#ffffff"><td><a href="#QF_QUESTIONABLE_FOR_LOOP">QF: Complicated, s ubtle or wrong increment in for-loop </a></td><td>Dodgy code</td></tr> 450 <tr bgcolor="#ffffff"><td><a href="#QF_QUESTIONABLE_FOR_LOOP">QF: Complicated, s ubtle or wrong increment in for-loop </a></td><td>Dodgy code</td></tr>
434 <tr bgcolor="#eeeeee"><td><a href="#RCN_REDUNDANT_COMPARISON_OF_NULL_AND_NONNULL _VALUE">RCN: Redundant comparison of non-null value to null</a></td><td>Dodgy co de</td></tr> 451 <tr bgcolor="#eeeeee"><td><a href="#RCN_REDUNDANT_COMPARISON_OF_NULL_AND_NONNULL _VALUE">RCN: Redundant comparison of non-null value to null</a></td><td>Dodgy co de</td></tr>
435 <tr bgcolor="#ffffff"><td><a href="#RCN_REDUNDANT_COMPARISON_TWO_NULL_VALUES">RC N: Redundant comparison of two null values</a></td><td>Dodgy code</td></tr> 452 <tr bgcolor="#ffffff"><td><a href="#RCN_REDUNDANT_COMPARISON_TWO_NULL_VALUES">RC N: Redundant comparison of two null values</a></td><td>Dodgy code</td></tr>
436 <tr bgcolor="#eeeeee"><td><a href="#RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE">RC N: Redundant nullcheck of value known to be non-null</a></td><td>Dodgy code</td> </tr> 453 <tr bgcolor="#eeeeee"><td><a href="#RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE">RC N: Redundant nullcheck of value known to be non-null</a></td><td>Dodgy code</td> </tr>
437 <tr bgcolor="#ffffff"><td><a href="#RCN_REDUNDANT_NULLCHECK_OF_NULL_VALUE">RCN: Redundant nullcheck of value known to be null</a></td><td>Dodgy code</td></tr> 454 <tr bgcolor="#ffffff"><td><a href="#RCN_REDUNDANT_NULLCHECK_OF_NULL_VALUE">RCN: Redundant nullcheck of value known to be null</a></td><td>Dodgy code</td></tr>
438 <tr bgcolor="#eeeeee"><td><a href="#REC_CATCH_EXCEPTION">REC: Exception is caugh t when Exception is not thrown</a></td><td>Dodgy code</td></tr> 455 <tr bgcolor="#eeeeee"><td><a href="#REC_CATCH_EXCEPTION">REC: Exception is caugh t when Exception is not thrown</a></td><td>Dodgy code</td></tr>
439 <tr bgcolor="#ffffff"><td><a href="#RI_REDUNDANT_INTERFACES">RI: Class implement s same interface as superclass</a></td><td>Dodgy code</td></tr> 456 <tr bgcolor="#ffffff"><td><a href="#RI_REDUNDANT_INTERFACES">RI: Class implement s same interface as superclass</a></td><td>Dodgy code</td></tr>
440 <tr bgcolor="#eeeeee"><td><a href="#RV_CHECK_FOR_POSITIVE_INDEXOF">RV: Method ch ecks to see if result of String.indexOf is positive</a></td><td>Dodgy code</td>< /tr> 457 <tr bgcolor="#eeeeee"><td><a href="#RV_CHECK_FOR_POSITIVE_INDEXOF">RV: Method ch ecks to see if result of String.indexOf is positive</a></td><td>Dodgy code</td>< /tr>
441 <tr bgcolor="#ffffff"><td><a href="#RV_DONT_JUST_NULL_CHECK_READLINE">RV: Method discards result of readLine after checking if it is nonnull</a></td><td>Dodgy c ode</td></tr> 458 <tr bgcolor="#ffffff"><td><a href="#RV_DONT_JUST_NULL_CHECK_READLINE">RV: Method discards result of readLine after checking if it is non-null</a></td><td>Dodgy code</td></tr>
442 <tr bgcolor="#eeeeee"><td><a href="#RV_REM_OF_HASHCODE">RV: Remainder of hashCod e could be negative</a></td><td>Dodgy code</td></tr> 459 <tr bgcolor="#eeeeee"><td><a href="#RV_REM_OF_HASHCODE">RV: Remainder of hashCod e could be negative</a></td><td>Dodgy code</td></tr>
443 <tr bgcolor="#ffffff"><td><a href="#RV_REM_OF_RANDOM_INT">RV: Remainder of 32-bi t signed random integer</a></td><td>Dodgy code</td></tr> 460 <tr bgcolor="#ffffff"><td><a href="#RV_REM_OF_RANDOM_INT">RV: Remainder of 32-bi t signed random integer</a></td><td>Dodgy code</td></tr>
444 <tr bgcolor="#eeeeee"><td><a href="#RV_RETURN_VALUE_IGNORED_INFERRED">RV: Method ignores return value, is this OK?</a></td><td>Dodgy code</td></tr> 461 <tr bgcolor="#eeeeee"><td><a href="#RV_RETURN_VALUE_IGNORED_INFERRED">RV: Method ignores return value, is this OK?</a></td><td>Dodgy code</td></tr>
445 <tr bgcolor="#ffffff"><td><a href="#SA_FIELD_DOUBLE_ASSIGNMENT">SA: Double assig nment of field</a></td><td>Dodgy code</td></tr> 462 <tr bgcolor="#ffffff"><td><a href="#RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT">RV: Return value of method without side effect is ignored</a></td><td>Dodgy code</td ></tr>
446 <tr bgcolor="#eeeeee"><td><a href="#SA_LOCAL_DOUBLE_ASSIGNMENT">SA: Double assig nment of local variable </a></td><td>Dodgy code</td></tr> 463 <tr bgcolor="#eeeeee"><td><a href="#SA_FIELD_DOUBLE_ASSIGNMENT">SA: Double assig nment of field</a></td><td>Dodgy code</td></tr>
447 <tr bgcolor="#ffffff"><td><a href="#SA_LOCAL_SELF_ASSIGNMENT">SA: Self assignmen t of local variable</a></td><td>Dodgy code</td></tr> 464 <tr bgcolor="#ffffff"><td><a href="#SA_LOCAL_DOUBLE_ASSIGNMENT">SA: Double assig nment of local variable </a></td><td>Dodgy code</td></tr>
448 <tr bgcolor="#eeeeee"><td><a href="#SF_SWITCH_FALLTHROUGH">SF: Switch statement found where one case falls through to the next case</a></td><td>Dodgy code</td>< /tr> 465 <tr bgcolor="#eeeeee"><td><a href="#SA_LOCAL_SELF_ASSIGNMENT">SA: Self assignmen t of local variable</a></td><td>Dodgy code</td></tr>
449 <tr bgcolor="#ffffff"><td><a href="#SF_SWITCH_NO_DEFAULT">SF: Switch statement f ound where default case is missing</a></td><td>Dodgy code</td></tr> 466 <tr bgcolor="#ffffff"><td><a href="#SF_SWITCH_FALLTHROUGH">SF: Switch statement found where one case falls through to the next case</a></td><td>Dodgy code</td>< /tr>
450 <tr bgcolor="#eeeeee"><td><a href="#ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD">ST: Write to static field from instance method</a></td><td>Dodgy code</td></tr> 467 <tr bgcolor="#eeeeee"><td><a href="#SF_SWITCH_NO_DEFAULT">SF: Switch statement f ound where default case is missing</a></td><td>Dodgy code</td></tr>
451 <tr bgcolor="#ffffff"><td><a href="#SE_PRIVATE_READ_RESOLVE_NOT_INHERITED">Se: P rivate readResolve method not inherited by subclasses</a></td><td>Dodgy code</td ></tr> 468 <tr bgcolor="#ffffff"><td><a href="#ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD">ST: Write to static field from instance method</a></td><td>Dodgy code</td></tr>
452 <tr bgcolor="#eeeeee"><td><a href="#SE_TRANSIENT_FIELD_OF_NONSERIALIZABLE_CLASS" >Se: Transient field of class that isn't Serializable. </a></td><td>Dodgy code</ td></tr> 469 <tr bgcolor="#eeeeee"><td><a href="#SE_PRIVATE_READ_RESOLVE_NOT_INHERITED">Se: P rivate readResolve method not inherited by subclasses</a></td><td>Dodgy code</td ></tr>
453 <tr bgcolor="#ffffff"><td><a href="#TQ_EXPLICIT_UNKNOWN_SOURCE_VALUE_REACHES_ALW AYS_SINK">TQ: Value required to have type qualifier, but marked as unknown</a></ td><td>Dodgy code</td></tr> 470 <tr bgcolor="#ffffff"><td><a href="#SE_TRANSIENT_FIELD_OF_NONSERIALIZABLE_CLASS" >Se: Transient field of class that isn't Serializable. </a></td><td>Dodgy code</ td></tr>
454 <tr bgcolor="#eeeeee"><td><a href="#TQ_EXPLICIT_UNKNOWN_SOURCE_VALUE_REACHES_NEV ER_SINK">TQ: Value required to not have type qualifier, but marked as unknown</a ></td><td>Dodgy code</td></tr> 471 <tr bgcolor="#eeeeee"><td><a href="#TQ_EXPLICIT_UNKNOWN_SOURCE_VALUE_REACHES_ALW AYS_SINK">TQ: Value required to have type qualifier, but marked as unknown</a></ td><td>Dodgy code</td></tr>
472 <tr bgcolor="#ffffff"><td><a href="#TQ_EXPLICIT_UNKNOWN_SOURCE_VALUE_REACHES_NEV ER_SINK">TQ: Value required to not have type qualifier, but marked as unknown</a ></td><td>Dodgy code</td></tr>
473 <tr bgcolor="#eeeeee"><td><a href="#UC_USELESS_CONDITION">UC: Condition has no e ffect</a></td><td>Dodgy code</td></tr>
474 <tr bgcolor="#ffffff"><td><a href="#UC_USELESS_CONDITION_TYPE">UC: Condition has no effect due to the variable type</a></td><td>Dodgy code</td></tr>
475 <tr bgcolor="#eeeeee"><td><a href="#UC_USELESS_OBJECT">UC: Useless object create d</a></td><td>Dodgy code</td></tr>
476 <tr bgcolor="#ffffff"><td><a href="#UC_USELESS_OBJECT_STACK">UC: Useless object created on stack</a></td><td>Dodgy code</td></tr>
477 <tr bgcolor="#eeeeee"><td><a href="#UC_USELESS_VOID_METHOD">UC: Useless non-empt y void method</a></td><td>Dodgy code</td></tr>
455 <tr bgcolor="#ffffff"><td><a href="#UCF_USELESS_CONTROL_FLOW">UCF: Useless contr ol flow</a></td><td>Dodgy code</td></tr> 478 <tr bgcolor="#ffffff"><td><a href="#UCF_USELESS_CONTROL_FLOW">UCF: Useless contr ol flow</a></td><td>Dodgy code</td></tr>
456 <tr bgcolor="#eeeeee"><td><a href="#UCF_USELESS_CONTROL_FLOW_NEXT_LINE">UCF: Use less control flow to next line</a></td><td>Dodgy code</td></tr> 479 <tr bgcolor="#eeeeee"><td><a href="#UCF_USELESS_CONTROL_FLOW_NEXT_LINE">UCF: Use less control flow to next line</a></td><td>Dodgy code</td></tr>
457 <tr bgcolor="#ffffff"><td><a href="#URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD">UrF: U nread public/protected field</a></td><td>Dodgy code</td></tr> 480 <tr bgcolor="#ffffff"><td><a href="#URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD">UrF: U nread public/protected field</a></td><td>Dodgy code</td></tr>
458 <tr bgcolor="#eeeeee"><td><a href="#UUF_UNUSED_PUBLIC_OR_PROTECTED_FIELD">UuF: U nused public or protected field</a></td><td>Dodgy code</td></tr> 481 <tr bgcolor="#eeeeee"><td><a href="#UUF_UNUSED_PUBLIC_OR_PROTECTED_FIELD">UuF: U nused public or protected field</a></td><td>Dodgy code</td></tr>
459 <tr bgcolor="#ffffff"><td><a href="#UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR">Uw F: Field not initialized in constructor but dereferenced without null check</a>< /td><td>Dodgy code</td></tr> 482 <tr bgcolor="#ffffff"><td><a href="#UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR">Uw F: Field not initialized in constructor but dereferenced without null check</a>< /td><td>Dodgy code</td></tr>
460 <tr bgcolor="#eeeeee"><td><a href="#UWF_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD">UwF : Unwritten public or protected field</a></td><td>Dodgy code</td></tr> 483 <tr bgcolor="#eeeeee"><td><a href="#UWF_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD">UwF : Unwritten public or protected field</a></td><td>Dodgy code</td></tr>
461 <tr bgcolor="#ffffff"><td><a href="#XFB_XML_FACTORY_BYPASS">XFB: Method directly allocates a specific implementation of xml interfaces</a></td><td>Dodgy code</t d></tr> 484 <tr bgcolor="#ffffff"><td><a href="#XFB_XML_FACTORY_BYPASS">XFB: Method directly allocates a specific implementation of xml interfaces</a></td><td>Dodgy code</t d></tr>
462 </table> 485 </table>
463 <h2>Descriptions</h2> 486 <h2>Descriptions</h2>
464 <h3><a name="BC_EQUALS_METHOD_SHOULD_WORK_FOR_ALL_OBJECTS">BC: Equals method sho uld not assume anything about the type of its argument (BC_EQUALS_METHOD_SHOULD_ WORK_FOR_ALL_OBJECTS)</a></h3> 487 <h3><a name="BC_EQUALS_METHOD_SHOULD_WORK_FOR_ALL_OBJECTS">BC: Equals method sho uld not assume anything about the type of its argument (BC_EQUALS_METHOD_SHOULD_ WORK_FOR_ALL_OBJECTS)</a></h3>
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 533
511 <h3><a name="CN_IMPLEMENTS_CLONE_BUT_NOT_CLONEABLE">CN: Class defines clone() bu t doesn't implement Cloneable (CN_IMPLEMENTS_CLONE_BUT_NOT_CLONEABLE)</a></h3> 534 <h3><a name="CN_IMPLEMENTS_CLONE_BUT_NOT_CLONEABLE">CN: Class defines clone() bu t doesn't implement Cloneable (CN_IMPLEMENTS_CLONE_BUT_NOT_CLONEABLE)</a></h3>
512 535
513 536
514 <p> This class defines a clone() method but the class doesn't implement Cloneabl e. 537 <p> This class defines a clone() method but the class doesn't implement Cloneabl e.
515 There are some situations in which this is OK (e.g., you want to control how sub classes 538 There are some situations in which this is OK (e.g., you want to control how sub classes
516 can clone themselves), but just make sure that this is what you intended. 539 can clone themselves), but just make sure that this is what you intended.
517 </p> 540 </p>
518 541
519 542
543 <h3><a name="CNT_ROUGH_CONSTANT_VALUE">CNT: Rough value of known constant found (CNT_ROUGH_CONSTANT_VALUE)</a></h3>
544
545
546 <p>It's recommended to use the predefined library constant for code clarity and better precision.</p>
547
548
520 <h3><a name="CO_ABSTRACT_SELF">Co: Abstract class defines covariant compareTo() method (CO_ABSTRACT_SELF)</a></h3> 549 <h3><a name="CO_ABSTRACT_SELF">Co: Abstract class defines covariant compareTo() method (CO_ABSTRACT_SELF)</a></h3>
521 550
522 551
523 <p> This class defines a covariant version of <code>compareTo()</code>.&nbsp; 552 <p> This class defines a covariant version of <code>compareTo()</code>.&nbsp;
524 To correctly override the <code>compareTo()</code> method in the 553 To correctly override the <code>compareTo()</code> method in the
525 <code>Comparable</code> interface, the parameter of <code>compareTo()</code> 554 <code>Comparable</code> interface, the parameter of <code>compareTo()</code>
526 must have type <code>java.lang.Object</code>.</p> 555 must have type <code>java.lang.Object</code>.</p>
527 556
528 557
558 <h3><a name="CO_COMPARETO_INCORRECT_FLOATING">Co: compareTo()/compare() incorrec tly handles float or double value (CO_COMPARETO_INCORRECT_FLOATING)</a></h3>
559
560
561 <p>This method compares double or float values using pattern like this: val1 & gt; val2 ? 1 : val1 &lt; val2 ? -1 : 0.
562 This pattern works incorrectly for -0.0 and NaN values which may result in incor rect sorting result or broken collection
563 (if compared values are used as keys). Consider using Double.compare or Float.co mpare static methods which handle all
564 the special cases correctly.</p>
565
566
567 <h3><a name="CO_COMPARETO_RESULTS_MIN_VALUE">Co: compareTo()/compare() returns I nteger.MIN_VALUE (CO_COMPARETO_RESULTS_MIN_VALUE)</a></h3>
568
569
570 <p> In some situation, this compareTo or compare method returns
571 the constant Integer.MIN_VALUE, which is an exceptionally bad practice.
572 The only thing that matters about the return value of compareTo is the sign of the result.
573 But people will sometimes negate the return value of compareTo, expecting th at this will negate
574 the sign of the result. And it will, except in the case where the value retu rned is Integer.MIN_VALUE.
575 So just return -1 rather than Integer.MIN_VALUE.
576
577
529 <h3><a name="CO_SELF_NO_OBJECT">Co: Covariant compareTo() method defined (CO_SEL F_NO_OBJECT)</a></h3> 578 <h3><a name="CO_SELF_NO_OBJECT">Co: Covariant compareTo() method defined (CO_SEL F_NO_OBJECT)</a></h3>
530 579
531 580
532 <p> This class defines a covariant version of <code>compareTo()</code>.&nbsp; 581 <p> This class defines a covariant version of <code>compareTo()</code>.&nbsp;
533 To correctly override the <code>compareTo()</code> method in the 582 To correctly override the <code>compareTo()</code> method in the
534 <code>Comparable</code> interface, the parameter of <code>compareTo()</code> 583 <code>Comparable</code> interface, the parameter of <code>compareTo()</code>
535 must have type <code>java.lang.Object</code>.</p> 584 must have type <code>java.lang.Object</code>.</p>
536 585
537 586
538 <h3><a name="DE_MIGHT_DROP">DE: Method might drop exception (DE_MIGHT_DROP)</a>< /h3> 587 <h3><a name="DE_MIGHT_DROP">DE: Method might drop exception (DE_MIGHT_DROP)</a>< /h3>
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
660 709
661 <h3><a name="EQ_COMPARETO_USE_OBJECT_EQUALS">Eq: Class defines compareTo(...) an d uses Object.equals() (EQ_COMPARETO_USE_OBJECT_EQUALS)</a></h3> 710 <h3><a name="EQ_COMPARETO_USE_OBJECT_EQUALS">Eq: Class defines compareTo(...) an d uses Object.equals() (EQ_COMPARETO_USE_OBJECT_EQUALS)</a></h3>
662 711
663 712
664 <p> This class defines a <code>compareTo(...)</code> method but inherits its 713 <p> This class defines a <code>compareTo(...)</code> method but inherits its
665 <code>equals()</code> method from <code>java.lang.Object</code>. 714 <code>equals()</code> method from <code>java.lang.Object</code>.
666 Generally, the value of compareTo should return zero if and only if 715 Generally, the value of compareTo should return zero if and only if
667 equals returns true. If this is violated, weird and unpredictable 716 equals returns true. If this is violated, weird and unpredictable
668 failures will occur in classes such as PriorityQueue. 717 failures will occur in classes such as PriorityQueue.
669 In Java 5 the PriorityQueue.remove method uses the compareTo method, 718 In Java 5 the PriorityQueue.remove method uses the compareTo method,
670 while in Java 6 it uses the equals method. 719 while in Java 6 it uses the equals method.</p>
671 720
672 <p>From the JavaDoc for the compareTo method in the Comparable interface: 721 <p>From the JavaDoc for the compareTo method in the Comparable interface:
673 <blockquote> 722 <blockquote>
674 It is strongly recommended, but not strictly required that <code>(x.compareTo(y) ==0) == (x.equals(y))</code>. 723 It is strongly recommended, but not strictly required that <code>(x.compareTo(y) ==0) == (x.equals(y))</code>.
675 Generally speaking, any class that implements the Comparable interface and viola tes this condition 724 Generally speaking, any class that implements the Comparable interface and viola tes this condition
676 should clearly indicate this fact. The recommended language 725 should clearly indicate this fact. The recommended language
677 is "Note: this class has a natural ordering that is inconsistent with equals." 726 is "Note: this class has a natural ordering that is inconsistent with equals."
678 </blockquote> 727 </blockquote></p>
679 728
680 729
681 <h3><a name="EQ_GETCLASS_AND_CLASS_CONSTANT">Eq: equals method fails for subtype s (EQ_GETCLASS_AND_CLASS_CONSTANT)</a></h3> 730 <h3><a name="EQ_GETCLASS_AND_CLASS_CONSTANT">Eq: equals method fails for subtype s (EQ_GETCLASS_AND_CLASS_CONSTANT)</a></h3>
682 731
683 732
684 <p> This class has an equals method that will be broken if it is inherited by subclasses. 733 <p> This class has an equals method that will be broken if it is inherited by subclasses.
685 It compares a class literal with the class of the argument (e.g., in class <code >Foo</code> 734 It compares a class literal with the class of the argument (e.g., in class <code >Foo</code>
686 it might check if <code>Foo.class == o.getClass()</code>). 735 it might check if <code>Foo.class == o.getClass()</code>).
687 It is better to check if <code>this.getClass() == o.getClass()</code>. 736 It is better to check if <code>this.getClass() == o.getClass()</code>.
688 </p> 737 </p>
(...skipping 17 matching lines...) Expand all
706 755
707 <h3><a name="FI_EXPLICIT_INVOCATION">FI: Explicit invocation of finalizer (FI_EX PLICIT_INVOCATION)</a></h3> 756 <h3><a name="FI_EXPLICIT_INVOCATION">FI: Explicit invocation of finalizer (FI_EX PLICIT_INVOCATION)</a></h3>
708 757
709 758
710 <p> This method contains an explicit invocation of the <code>finalize()</code> 759 <p> This method contains an explicit invocation of the <code>finalize()</code>
711 method on an object.&nbsp; Because finalizer methods are supposed to be 760 method on an object.&nbsp; Because finalizer methods are supposed to be
712 executed once, and only by the VM, this is a bad idea.</p> 761 executed once, and only by the VM, this is a bad idea.</p>
713 <p>If a connected set of objects beings finalizable, then the VM will invoke the 762 <p>If a connected set of objects beings finalizable, then the VM will invoke the
714 finalize method on all the finalizable object, possibly at the same time in diff erent threads. 763 finalize method on all the finalizable object, possibly at the same time in diff erent threads.
715 Thus, it is a particularly bad idea, in the finalize method for a class X, invok e finalize 764 Thus, it is a particularly bad idea, in the finalize method for a class X, invok e finalize
716 on objects referenced by X, because they may already be getting finalized in a s eparate thread. 765 on objects referenced by X, because they may already be getting finalized in a s eparate thread.</p>
717 766
718 767
719 <h3><a name="FI_FINALIZER_NULLS_FIELDS">FI: Finalizer nulls fields (FI_FINALIZER _NULLS_FIELDS)</a></h3> 768 <h3><a name="FI_FINALIZER_NULLS_FIELDS">FI: Finalizer nulls fields (FI_FINALIZER _NULLS_FIELDS)</a></h3>
720 769
721 770
722 <p> This finalizer nulls out fields. This is usually an error, as it does not aid garbage collection, 771 <p> This finalizer nulls out fields. This is usually an error, as it does not aid garbage collection,
723 and the object is going to be garbage collected anyway. 772 and the object is going to be garbage collected anyway.</p>
724 773
725 774
726 <h3><a name="FI_FINALIZER_ONLY_NULLS_FIELDS">FI: Finalizer only nulls fields (FI _FINALIZER_ONLY_NULLS_FIELDS)</a></h3> 775 <h3><a name="FI_FINALIZER_ONLY_NULLS_FIELDS">FI: Finalizer only nulls fields (FI _FINALIZER_ONLY_NULLS_FIELDS)</a></h3>
727 776
728 777
729 <p> This finalizer does nothing except null out fields. This is completely poi ntless, and requires that 778 <p> This finalizer does nothing except null out fields. This is completely poi ntless, and requires that
730 the object be garbage collected, finalized, and then garbage collected again. Yo u should just remove the finalize 779 the object be garbage collected, finalized, and then garbage collected again. Yo u should just remove the finalize
731 method. 780 method.</p>
732 781
733 782
734 <h3><a name="FI_MISSING_SUPER_CALL">FI: Finalizer does not call superclass final izer (FI_MISSING_SUPER_CALL)</a></h3> 783 <h3><a name="FI_MISSING_SUPER_CALL">FI: Finalizer does not call superclass final izer (FI_MISSING_SUPER_CALL)</a></h3>
735 784
736 785
737 <p> This <code>finalize()</code> method does not make a call to its 786 <p> This <code>finalize()</code> method does not make a call to its
738 superclass's <code>finalize()</code> method.&nbsp; So, any finalizer 787 superclass's <code>finalize()</code> method.&nbsp; So, any finalizer
739 actions defined for the superclass will not be performed.&nbsp; 788 actions defined for the superclass will not be performed.&nbsp;
740 Add a call to <code>super.finalize()</code>.</p> 789 Add a call to <code>super.finalize()</code>.</p>
741 790
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
901 950
902 951
903 <h3><a name="JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS">JCIP: Fields of immutable classes should be final (JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS)</a></h3> 952 <h3><a name="JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS">JCIP: Fields of immutable classes should be final (JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS)</a></h3>
904 953
905 954
906 <p> The class is annotated with net.jcip.annotations.Immutable or javax.annota tion.concurrent.Immutable, 955 <p> The class is annotated with net.jcip.annotations.Immutable or javax.annota tion.concurrent.Immutable,
907 and the rules for those annotations require that all fields are final. 956 and the rules for those annotations require that all fields are final.
908 .</p> 957 .</p>
909 958
910 959
960 <h3><a name="ME_ENUM_FIELD_SETTER">ME: Public enum method unconditionally sets i ts field (ME_ENUM_FIELD_SETTER)</a></h3>
961
962
963 <p>This public method declared in public enum unconditionally sets enum field, thus this field can be changed by malicious code
964 or by accident from another package. Though mutable enum fields may be used fo r lazy initialization, it's a bad practice to expose them to the outer world.
965 Consider removing this method or declaring it package-private.</p>
966
967
968 <h3><a name="ME_MUTABLE_ENUM_FIELD">ME: Enum field is public and mutable (ME_MUT ABLE_ENUM_FIELD)</a></h3>
969
970
971 <p>A mutable public field is defined inside a public enum, thus can be changed by malicious code or by accident from another package.
972 Though mutable enum fields may be used for lazy initialization, it's a bad pra ctice to expose them to the outer world.
973 Consider declaring this field final and/or package-private.</p>
974
975
911 <h3><a name="NP_BOOLEAN_RETURN_NULL">NP: Method with Boolean return type returns explicit null (NP_BOOLEAN_RETURN_NULL)</a></h3> 976 <h3><a name="NP_BOOLEAN_RETURN_NULL">NP: Method with Boolean return type returns explicit null (NP_BOOLEAN_RETURN_NULL)</a></h3>
912 977
913 978
914 <p> 979 <p>
915 A method that returns either Boolean.TRUE, Boolean.FALSE or null is an accid ent waiting to happen. 980 A method that returns either Boolean.TRUE, Boolean.FALSE or null is an accid ent waiting to happen.
916 This method can be invoked as though it returned a value of type boolean, an d 981 This method can be invoked as though it returned a value of type boolean, an d
917 the compiler will insert automatic unboxing of the Boolean value. If a null value is returned, 982 the compiler will insert automatic unboxing of the Boolean value. If a null value is returned,
918 this will result in a NullPointerException. 983 this will result in a NullPointerException.
919 </p> 984 </p>
920 985
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
1003 </p> 1068 </p>
1004 1069
1005 1070
1006 <h3><a name="NM_SAME_SIMPLE_NAME_AS_INTERFACE">Nm: Class names shouldn't shadow simple name of implemented interface (NM_SAME_SIMPLE_NAME_AS_INTERFACE)</a></h3> 1071 <h3><a name="NM_SAME_SIMPLE_NAME_AS_INTERFACE">Nm: Class names shouldn't shadow simple name of implemented interface (NM_SAME_SIMPLE_NAME_AS_INTERFACE)</a></h3>
1007 1072
1008 1073
1009 <p> This class/interface has a simple name that is identical to that of an imp lemented/extended interface, except 1074 <p> This class/interface has a simple name that is identical to that of an imp lemented/extended interface, except
1010 that the interface is in a different package (e.g., <code>alpha.Foo</code> exten ds <code>beta.Foo</code>). 1075 that the interface is in a different package (e.g., <code>alpha.Foo</code> exten ds <code>beta.Foo</code>).
1011 This can be exceptionally confusing, create lots of situations in which you have to look at import statements 1076 This can be exceptionally confusing, create lots of situations in which you have to look at import statements
1012 to resolve references and creates many 1077 to resolve references and creates many
1013 opportunities to accidently define methods that do not override methods in their superclasses. 1078 opportunities to accidentally define methods that do not override methods in the ir superclasses.
1014 </p> 1079 </p>
1015 1080
1016 1081
1017 <h3><a name="NM_SAME_SIMPLE_NAME_AS_SUPERCLASS">Nm: Class names shouldn't shadow simple name of superclass (NM_SAME_SIMPLE_NAME_AS_SUPERCLASS)</a></h3> 1082 <h3><a name="NM_SAME_SIMPLE_NAME_AS_SUPERCLASS">Nm: Class names shouldn't shadow simple name of superclass (NM_SAME_SIMPLE_NAME_AS_SUPERCLASS)</a></h3>
1018 1083
1019 1084
1020 <p> This class has a simple name that is identical to that of its superclass, except 1085 <p> This class has a simple name that is identical to that of its superclass, except
1021 that its superclass is in a different package (e.g., <code>alpha.Foo</code> exte nds <code>beta.Foo</code>). 1086 that its superclass is in a different package (e.g., <code>alpha.Foo</code> exte nds <code>beta.Foo</code>).
1022 This can be exceptionally confusing, create lots of situations in which you have to look at import statements 1087 This can be exceptionally confusing, create lots of situations in which you have to look at import statements
1023 to resolve references and creates many 1088 to resolve references and creates many
1024 opportunities to accidently define methods that do not override methods in their superclasses. 1089 opportunities to accidentally define methods that do not override methods in the ir superclasses.
1025 </p> 1090 </p>
1026 1091
1027 1092
1028 <h3><a name="NM_VERY_CONFUSING_INTENTIONAL">Nm: Very confusing method names (but perhaps intentional) (NM_VERY_CONFUSING_INTENTIONAL)</a></h3> 1093 <h3><a name="NM_VERY_CONFUSING_INTENTIONAL">Nm: Very confusing method names (but perhaps intentional) (NM_VERY_CONFUSING_INTENTIONAL)</a></h3>
1029 1094
1030 1095
1031 <p> The referenced methods have names that differ only by capitalization. 1096 <p> The referenced methods have names that differ only by capitalization.
1032 This is very confusing because if the capitalization were 1097 This is very confusing because if the capitalization were
1033 identical then one of the methods would override the other. From the existence o f other methods, it 1098 identical then one of the methods would override the other. From the existence o f other methods, it
1034 seems that the existence of both of these methods is intentional, but is sure is confusing. 1099 seems that the existence of both of these methods is intentional, but is sure is confusing.
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
1536 1601
1537 1602
1538 <h3><a name="BOA_BADLY_OVERRIDDEN_ADAPTER">BOA: Class overrides a method impleme nted in super class Adapter wrongly (BOA_BADLY_OVERRIDDEN_ADAPTER)</a></h3> 1603 <h3><a name="BOA_BADLY_OVERRIDDEN_ADAPTER">BOA: Class overrides a method impleme nted in super class Adapter wrongly (BOA_BADLY_OVERRIDDEN_ADAPTER)</a></h3>
1539 1604
1540 1605
1541 <p> This method overrides a method found in a parent class, where that class is an Adapter that implements 1606 <p> This method overrides a method found in a parent class, where that class is an Adapter that implements
1542 a listener defined in the java.awt.event or javax.swing.event package. As a resu lt, this method will not 1607 a listener defined in the java.awt.event or javax.swing.event package. As a resu lt, this method will not
1543 get called when the event occurs.</p> 1608 get called when the event occurs.</p>
1544 1609
1545 1610
1611 <h3><a name="BSHIFT_WRONG_ADD_PRIORITY">BSHIFT: Possible bad parsing of shift op eration (BSHIFT_WRONG_ADD_PRIORITY)</a></h3>
1612
1613
1614 <p>
1615 The code performs an operation like (x &lt;&lt; 8 + y). Although this might be c orrect, probably it was meant
1616 to perform (x &lt;&lt; 8) + y, but shift operation has
1617 a lower precedence, so it's actually parsed as x &lt;&lt; (8 + y).
1618 </p>
1619
1620
1546 <h3><a name="ICAST_BAD_SHIFT_AMOUNT">BSHIFT: 32 bit int shifted by an amount not in the range -31..31 (ICAST_BAD_SHIFT_AMOUNT)</a></h3> 1621 <h3><a name="ICAST_BAD_SHIFT_AMOUNT">BSHIFT: 32 bit int shifted by an amount not in the range -31..31 (ICAST_BAD_SHIFT_AMOUNT)</a></h3>
1547 1622
1548 1623
1549 <p> 1624 <p>
1550 The code performs shift of a 32 bit int by a constant amount outside 1625 The code performs shift of a 32 bit int by a constant amount outside
1551 the range -31..31. 1626 the range -31..31.
1552 The effect of this is to use the lower 5 bits of the integer 1627 The effect of this is to use the lower 5 bits of the integer
1553 value to decide how much to shift by (e.g., shifting by 40 bits is the same as s hifting by 8 bits, 1628 value to decide how much to shift by (e.g., shifting by 40 bits is the same as s hifting by 8 bits,
1554 and shifting by 32 bits is the same as shifting by zero bits). This probably isn 't what was expected, 1629 and shifting by 32 bits is the same as shifting by zero bits). This probably isn 't what was expected,
1555 and it is at least confusing. 1630 and it is at least confusing.
1556 </p> 1631 </p>
1557 1632
1558 1633
1559 <h3><a name="BX_UNBOXED_AND_COERCED_FOR_TERNARY_OPERATOR">Bx: Primitive value is unboxed and coerced for ternary operator (BX_UNBOXED_AND_COERCED_FOR_TERNARY_OP ERATOR)</a></h3>
1560
1561
1562 <p>A wrapped primitive value is unboxed and converted to another primitive typ e as part of the
1563 evaluation of a conditional ternary operator (the <code> b ? e1 : e2</code> oper ator). The
1564 semantics of Java mandate that if <code>e1</code> and <code>e2</code> are wrappe d
1565 numeric values, the values are unboxed and converted/coerced to their common typ e (e.g,
1566 if <code>e1</code> is of type <code>Integer</code>
1567 and <code>e2</code> is of type <code>Float</code>, then <code>e1</code> is unbox ed,
1568 converted to a floating point value, and boxed. See JLS Section 15.25.
1569 </p>
1570
1571
1572 <h3><a name="CO_COMPARETO_RESULTS_MIN_VALUE">Co: compareTo()/compare() returns I nteger.MIN_VALUE (CO_COMPARETO_RESULTS_MIN_VALUE)</a></h3>
1573
1574
1575 <p> In some situation, this compareTo or compare method returns
1576 the constant Integer.MIN_VALUE, which is an exceptionally bad practice.
1577 The only thing that matters about the return value of compareTo is the sign of the result.
1578 But people will sometimes negate the return value of compareTo, expecting th at this will negate
1579 the sign of the result. And it will, except in the case where the value retu rned is Integer.MIN_VALUE.
1580 So just return -1 rather than Integer.MIN_VALUE.
1581
1582
1583 <h3><a name="DLS_DEAD_LOCAL_INCREMENT_IN_RETURN">DLS: Useless increment in retur n statement (DLS_DEAD_LOCAL_INCREMENT_IN_RETURN)</a></h3> 1634 <h3><a name="DLS_DEAD_LOCAL_INCREMENT_IN_RETURN">DLS: Useless increment in retur n statement (DLS_DEAD_LOCAL_INCREMENT_IN_RETURN)</a></h3>
1584 1635
1585 1636
1586 <p>This statement has a return such as <code>return x++;</code>. 1637 <p>This statement has a return such as <code>return x++;</code>.
1587 A postfix increment/decrement does not impact the value of the expression, 1638 A postfix increment/decrement does not impact the value of the expression,
1588 so this increment/decrement has no effect. 1639 so this increment/decrement has no effect.
1589 Please verify that this statement does the right thing. 1640 Please verify that this statement does the right thing.
1590 </p> 1641 </p>
1591 1642
1592 1643
1593 <h3><a name="DLS_DEAD_STORE_OF_CLASS_LITERAL">DLS: Dead store of class literal ( DLS_DEAD_STORE_OF_CLASS_LITERAL)</a></h3> 1644 <h3><a name="DLS_DEAD_STORE_OF_CLASS_LITERAL">DLS: Dead store of class literal ( DLS_DEAD_STORE_OF_CLASS_LITERAL)</a></h3>
1594 1645
1595 1646
1596 <p> 1647 <p>
1597 This instruction assigns a class literal to a variable and then never uses it. 1648 This instruction assigns a class literal to a variable and then never uses it.
1598 <a href="//java.sun.com/j2se/1.5.0/compatibility.html#literal">The behavior of t his differs in Java 1.4 and in Java 5.</a> 1649 <a href="//java.sun.com/j2se/1.5.0/compatibility.html#literal">The behavior of t his differs in Java 1.4 and in Java 5.</a>
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
1732 1783
1733 1784
1734 <h3><a name="DMI_VACUOUS_CALL_TO_EASYMOCK_METHOD">Dm: Useless/vacuous call to Ea syMock method (DMI_VACUOUS_CALL_TO_EASYMOCK_METHOD)</a></h3> 1785 <h3><a name="DMI_VACUOUS_CALL_TO_EASYMOCK_METHOD">Dm: Useless/vacuous call to Ea syMock method (DMI_VACUOUS_CALL_TO_EASYMOCK_METHOD)</a></h3>
1735 1786
1736 1787
1737 <p>This call doesn't pass any objects to the EasyMock method, so the call do esn't do anything. 1788 <p>This call doesn't pass any objects to the EasyMock method, so the call do esn't do anything.
1738 </p> 1789 </p>
1739 1790
1740 1791
1741 1792
1793 <h3><a name="DM_INVALID_MIN_MAX">Dm: Incorrect combination of Math.max and Math. min (DM_INVALID_MIN_MAX)</a></h3>
1794
1795
1796 <p>This code tries to limit the value bounds using the construct like Math.min (0, Math.max(100, value)). However the order of
1797 the constants is incorrect: it should be Math.min(100, Math.max(0, value)). As the result this code always produces the same result
1798 (or NaN if the value is NaN).</p>
1799
1800
1742 <h3><a name="EC_ARRAY_AND_NONARRAY">EC: equals() used to compare array and nonar ray (EC_ARRAY_AND_NONARRAY)</a></h3> 1801 <h3><a name="EC_ARRAY_AND_NONARRAY">EC: equals() used to compare array and nonar ray (EC_ARRAY_AND_NONARRAY)</a></h3>
1743 1802
1744 1803
1745 <p> 1804 <p>
1746 This method invokes the .equals(Object o) to compare an array and a reference th at doesn't seem 1805 This method invokes the .equals(Object o) to compare an array and a reference th at doesn't seem
1747 to be an array. If things being compared are of different types, they are guaran teed to be unequal 1806 to be an array. If things being compared are of different types, they are guaran teed to be unequal
1748 and the comparison is almost certainly an error. Even if they are both arrays, t he equals method 1807 and the comparison is almost certainly an error. Even if they are both arrays, t he equals method
1749 on arrays only determines of the two arrays are the same object. 1808 on arrays only determines of the two arrays are the same object.
1750 To compare the 1809 To compare the
1751 contents of the arrays, use java.util.Arrays.equals(Object[], Object[]). 1810 contents of the arrays, use java.util.Arrays.equals(Object[], Object[]).
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
1817 classes should always compare as unequal; therefore, according to the 1876 classes should always compare as unequal; therefore, according to the
1818 contract defined by java.lang.Object.equals(Object), 1877 contract defined by java.lang.Object.equals(Object),
1819 the result of this comparison will always be false at runtime. 1878 the result of this comparison will always be false at runtime.
1820 </p> 1879 </p>
1821 1880
1822 1881
1823 <h3><a name="EC_UNRELATED_TYPES">EC: Call to equals() comparing different types (EC_UNRELATED_TYPES)</a></h3> 1882 <h3><a name="EC_UNRELATED_TYPES">EC: Call to equals() comparing different types (EC_UNRELATED_TYPES)</a></h3>
1824 1883
1825 1884
1826 <p> This method calls equals(Object) on two references of different 1885 <p> This method calls equals(Object) on two references of different
1827 class types with no common subclasses. 1886 class types and analysis suggests they will be to objects of different classes
1828 Therefore, the objects being compared 1887 at runtime. Further, examination of the equals methods that would be invoked sug gest that either
1829 are unlikely to be members of the same class at runtime 1888 this call will always return false, or else the equals method is not be symmetri c (which is
1830 (unless some application classes were not analyzed, or dynamic class 1889 a property required by the contract
1831 loading can occur at runtime). 1890 for equals in class Object).
1832 According to the contract of equals(),
1833 objects of different
1834 classes should always compare as unequal; therefore, according to the
1835 contract defined by java.lang.Object.equals(Object),
1836 the result of this comparison will always be false at runtime.
1837 </p> 1891 </p>
1838 1892
1839 1893
1840 <h3><a name="EC_UNRELATED_TYPES_USING_POINTER_EQUALITY">EC: Using pointer equali ty to compare different types (EC_UNRELATED_TYPES_USING_POINTER_EQUALITY)</a></h 3> 1894 <h3><a name="EC_UNRELATED_TYPES_USING_POINTER_EQUALITY">EC: Using pointer equali ty to compare different types (EC_UNRELATED_TYPES_USING_POINTER_EQUALITY)</a></h 3>
1841 1895
1842 1896
1843 <p> This method uses using pointer equality to compare two references that seem to be of 1897 <p> This method uses using pointer equality to compare two references that seem to be of
1844 different types. The result of this comparison will always be false at runtime. 1898 different types. The result of this comparison will always be false at runtime.
1845 </p> 1899 </p>
1846 1900
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
2080 2134
2081 2135
2082 <h3><a name="ICAST_INT_2_LONG_AS_INSTANT">ICAST: int value converted to long and used as absolute time (ICAST_INT_2_LONG_AS_INSTANT)</a></h3> 2136 <h3><a name="ICAST_INT_2_LONG_AS_INSTANT">ICAST: int value converted to long and used as absolute time (ICAST_INT_2_LONG_AS_INSTANT)</a></h3>
2083 2137
2084 2138
2085 <p> 2139 <p>
2086 This code converts a 32-bit int value to a 64-bit long value, and then 2140 This code converts a 32-bit int value to a 64-bit long value, and then
2087 passes that value for a method parameter that requires an absolute time value. 2141 passes that value for a method parameter that requires an absolute time value.
2088 An absolute time value is the number 2142 An absolute time value is the number
2089 of milliseconds since the standard base time known as "the epoch", namely Januar y 1, 1970, 00:00:00 GMT. 2143 of milliseconds since the standard base time known as "the epoch", namely Januar y 1, 1970, 00:00:00 GMT.
2090 For example, the following method, intended to convert seconds since the epoc in to a Date, is badly 2144 For example, the following method, intended to convert seconds since the epoch i nto a Date, is badly
2091 broken:</p> 2145 broken:</p>
2092 <pre> 2146 <pre>
2093 Date getDate(int seconds) { return new Date(seconds * 1000); } 2147 Date getDate(int seconds) { return new Date(seconds * 1000); }
2094 </pre> 2148 </pre>
2095 <p>The multiplication is done using 32-bit arithmetic, and then converted to a 6 4-bit value. 2149 <p>The multiplication is done using 32-bit arithmetic, and then converted to a 6 4-bit value.
2096 When a 32-bit value is converted to 64-bits and used to express an absolute time 2150 When a 32-bit value is converted to 64-bits and used to express an absolute time
2097 value, only dates in December 1969 and January 1970 can be represented.</p> 2151 value, only dates in December 1969 and January 1970 can be represented.</p>
2098 2152
2099 <p>Correct implementations for the above method are:</p> 2153 <p>Correct implementations for the above method are:</p>
2100 2154
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
2222 2276
2223 <h3><a name="INT_BAD_COMPARISON_WITH_INT_VALUE">INT: Bad comparison of int value with long constant (INT_BAD_COMPARISON_WITH_INT_VALUE)</a></h3> 2277 <h3><a name="INT_BAD_COMPARISON_WITH_INT_VALUE">INT: Bad comparison of int value with long constant (INT_BAD_COMPARISON_WITH_INT_VALUE)</a></h3>
2224 2278
2225 2279
2226 <p> This code compares an int value with a long constant that is outside 2280 <p> This code compares an int value with a long constant that is outside
2227 the range of values that can be represented as an int value. 2281 the range of values that can be represented as an int value.
2228 This comparison is vacuous and possibily to be incorrect. 2282 This comparison is vacuous and possibily to be incorrect.
2229 </p> 2283 </p>
2230 2284
2231 2285
2232 <h3><a name="INT_BAD_COMPARISON_WITH_NONNEGATIVE_VALUE">INT: Bad comparison of n onnegative value with negative constant (INT_BAD_COMPARISON_WITH_NONNEGATIVE_VAL UE)</a></h3> 2286 <h3><a name="INT_BAD_COMPARISON_WITH_NONNEGATIVE_VALUE">INT: Bad comparison of n onnegative value with negative constant or zero (INT_BAD_COMPARISON_WITH_NONNEGA TIVE_VALUE)</a></h3>
2233 2287
2234 2288
2235 <p> This code compares a value that is guaranteed to be non-negative with a nega tive constant. 2289 <p> This code compares a value that is guaranteed to be non-negative with a nega tive constant or zero.
2236 </p> 2290 </p>
2237 2291
2238 2292
2239 <h3><a name="INT_BAD_COMPARISON_WITH_SIGNED_BYTE">INT: Bad comparison of signed byte (INT_BAD_COMPARISON_WITH_SIGNED_BYTE)</a></h3> 2293 <h3><a name="INT_BAD_COMPARISON_WITH_SIGNED_BYTE">INT: Bad comparison of signed byte (INT_BAD_COMPARISON_WITH_SIGNED_BYTE)</a></h3>
2240 2294
2241 2295
2242 <p> Signed bytes can only have a value in the range -128 to 127. Comparing 2296 <p> Signed bytes can only have a value in the range -128 to 127. Comparing
2243 a signed byte with a value outside that range is vacuous and likely to be incorr ect. 2297 a signed byte with a value outside that range is vacuous and likely to be incorr ect.
2244 To convert a signed byte <code>b</code> to an unsigned value in the range 0..255 , 2298 To convert a signed byte <code>b</code> to an unsigned value in the range 0..255 ,
2245 use <code>0xff &amp; b</code> 2299 use <code>0xff &amp; b</code>
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
2334 2388
2335 2389
2336 <p> 2390 <p>
2337 There is a statement or branch that if executed guarantees that 2391 There is a statement or branch that if executed guarantees that
2338 a value is null at this point, and that 2392 a value is null at this point, and that
2339 value that is guaranteed to be dereferenced 2393 value that is guaranteed to be dereferenced
2340 (except on forward paths involving runtime exceptions). 2394 (except on forward paths involving runtime exceptions).
2341 </p> 2395 </p>
2342 <p>Note that a check such as 2396 <p>Note that a check such as
2343 <code>if (x == null) throw new NullPointerException();</code> 2397 <code>if (x == null) throw new NullPointerException();</code>
2344 is treated as a dereference of <code>x</code>. 2398 is treated as a dereference of <code>x</code>.</p>
2345 2399
2346 2400
2347 <h3><a name="NP_GUARANTEED_DEREF_ON_EXCEPTION_PATH">NP: Value is null and guaran teed to be dereferenced on exception path (NP_GUARANTEED_DEREF_ON_EXCEPTION_PATH )</a></h3> 2401 <h3><a name="NP_GUARANTEED_DEREF_ON_EXCEPTION_PATH">NP: Value is null and guaran teed to be dereferenced on exception path (NP_GUARANTEED_DEREF_ON_EXCEPTION_PATH )</a></h3>
2348 2402
2349 2403
2350 <p> 2404 <p>
2351 There is a statement or branch on an exception path 2405 There is a statement or branch on an exception path
2352 that if executed guarantees that 2406 that if executed guarantees that
2353 a value is null at this point, and that 2407 a value is null at this point, and that
2354 value that is guaranteed to be dereferenced 2408 value that is guaranteed to be dereferenced
2355 (except on forward paths involving runtime exceptions). 2409 (except on forward paths involving runtime exceptions).
2356 </p> 2410 </p>
2357 2411
2358 2412
2359 <h3><a name="NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR">NP: Nonnull field is not initialized (NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR)</a></h3> 2413 <h3><a name="NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR">NP: Non-null field is not initialized (NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR)</a></h3>
2360 2414
2361 2415
2362 <p> The field is marked as nonnull, but isn't written to by the construct or. 2416 <p> The field is marked as non-null, but isn't written to by the construc tor.
2363 The field might be initialized elsewhere during constructor, or might always 2417 The field might be initialized elsewhere during constructor, or might always
2364 be initialized before use. 2418 be initialized before use.
2365 </p> 2419 </p>
2366 2420
2367 2421
2368 <h3><a name="NP_NONNULL_PARAM_VIOLATION">NP: Method call passes null to a nonnul l parameter (NP_NONNULL_PARAM_VIOLATION)</a></h3> 2422 <h3><a name="NP_NONNULL_PARAM_VIOLATION">NP: Method call passes null to a non-nu ll parameter (NP_NONNULL_PARAM_VIOLATION)</a></h3>
2369 2423
2370 2424
2371 <p> 2425 <p>
2372 This method passes a null value as the parameter of a method which 2426 This method passes a null value as the parameter of a method which
2373 must be nonnull. Either this parameter has been explicitly marked 2427 must be non-null. Either this parameter has been explicitly marked
2374 as @Nonnull, or analysis has determined that this parameter is 2428 as @Nonnull, or analysis has determined that this parameter is
2375 always dereferenced. 2429 always dereferenced.
2376 </p> 2430 </p>
2377 2431
2378 2432
2379 <h3><a name="NP_NONNULL_RETURN_VIOLATION">NP: Method may return null, but is dec lared @NonNull (NP_NONNULL_RETURN_VIOLATION)</a></h3> 2433 <h3><a name="NP_NONNULL_RETURN_VIOLATION">NP: Method may return null, but is dec lared @Nonnull (NP_NONNULL_RETURN_VIOLATION)</a></h3>
2380 2434
2381 2435
2382 <p> 2436 <p>
2383 This method may return a null value, but the method (or a superclass metho d 2437 This method may return a null value, but the method (or a superclass metho d
2384 which it overrides) is declared to return @NonNull. 2438 which it overrides) is declared to return @Nonnull.
2385 </p> 2439 </p>
2386 2440
2387 2441
2388 <h3><a name="NP_NULL_INSTANCEOF">NP: A known null value is checked to see if it is an instance of a type (NP_NULL_INSTANCEOF)</a></h3> 2442 <h3><a name="NP_NULL_INSTANCEOF">NP: A known null value is checked to see if it is an instance of a type (NP_NULL_INSTANCEOF)</a></h3>
2389 2443
2390 2444
2391 <p> 2445 <p>
2392 This instanceof test will always return false, since the value being checked is guaranteed to be null. 2446 This instanceof test will always return false, since the value being checked is guaranteed to be null.
2393 Although this is safe, make sure it isn't 2447 Although this is safe, make sure it isn't
2394 an indication of some misunderstanding or some other logic error. 2448 an indication of some misunderstanding or some other logic error.
(...skipping 17 matching lines...) Expand all
2412 <p> A reference value which is null on some exception control path is 2466 <p> A reference value which is null on some exception control path is
2413 dereferenced here.&nbsp; This may lead to a <code>NullPointerException</code> 2467 dereferenced here.&nbsp; This may lead to a <code>NullPointerException</code>
2414 when the code is executed.&nbsp; 2468 when the code is executed.&nbsp;
2415 Note that because FindBugs currently does not prune infeasible exception paths, 2469 Note that because FindBugs currently does not prune infeasible exception paths,
2416 this may be a false warning.</p> 2470 this may be a false warning.</p>
2417 2471
2418 <p> Also note that FindBugs considers the default case of a switch statement to 2472 <p> Also note that FindBugs considers the default case of a switch statement to
2419 be an exception path, since the default case is often infeasible.</p> 2473 be an exception path, since the default case is often infeasible.</p>
2420 2474
2421 2475
2422 <h3><a name="NP_NULL_PARAM_DEREF">NP: Method call passes null for nonnull parame ter (NP_NULL_PARAM_DEREF)</a></h3> 2476 <h3><a name="NP_NULL_PARAM_DEREF">NP: Method call passes null for non-null param eter (NP_NULL_PARAM_DEREF)</a></h3>
2423 2477
2424 2478
2425 <p> 2479 <p>
2426 This method call passes a null value for a nonnull method parameter. 2480 This method call passes a null value for a non-null method parameter.
2427 Either the parameter is annotated as a parameter that should 2481 Either the parameter is annotated as a parameter that should
2428 always be nonnull, or analysis has shown that it will always be 2482 always be non-null, or analysis has shown that it will always be
2429 dereferenced. 2483 dereferenced.
2430 </p> 2484 </p>
2431 2485
2432 2486
2433 <h3><a name="NP_NULL_PARAM_DEREF_ALL_TARGETS_DANGEROUS">NP: Method call passes n ull for nonnull parameter (NP_NULL_PARAM_DEREF_ALL_TARGETS_DANGEROUS)</a></h3> 2487 <h3><a name="NP_NULL_PARAM_DEREF_ALL_TARGETS_DANGEROUS">NP: Method call passes n ull for non-null parameter (NP_NULL_PARAM_DEREF_ALL_TARGETS_DANGEROUS)</a></h3>
2434 2488
2435 2489
2436 <p> 2490 <p>
2437 A possibly-null value is passed at a call site where all known 2491 A possibly-null value is passed at a call site where all known
2438 target methods require the parameter to be nonnull. 2492 target methods require the parameter to be non-null.
2439 Either the parameter is annotated as a parameter that should 2493 Either the parameter is annotated as a parameter that should
2440 always be nonnull, or analysis has shown that it will always be 2494 always be non-null, or analysis has shown that it will always be
2441 dereferenced. 2495 dereferenced.
2442 </p> 2496 </p>
2443 2497
2444 2498
2445 <h3><a name="NP_NULL_PARAM_DEREF_NONVIRTUAL">NP: Non-virtual method call passes null for nonnull parameter (NP_NULL_PARAM_DEREF_NONVIRTUAL)</a></h3> 2499 <h3><a name="NP_NULL_PARAM_DEREF_NONVIRTUAL">NP: Non-virtual method call passes null for non-null parameter (NP_NULL_PARAM_DEREF_NONVIRTUAL)</a></h3>
2446 2500
2447 2501
2448 <p> 2502 <p>
2449 A possibly-null value is passed to a nonnull method parameter. 2503 A possibly-null value is passed to a non-null method parameter.
2450 Either the parameter is annotated as a parameter that should 2504 Either the parameter is annotated as a parameter that should
2451 always be nonnull, or analysis has shown that it will always be 2505 always be non-null, or analysis has shown that it will always be
2452 dereferenced. 2506 dereferenced.
2453 </p> 2507 </p>
2454 2508
2455 2509
2456 <h3><a name="NP_STORE_INTO_NONNULL_FIELD">NP: Store of null value into field ann otated NonNull (NP_STORE_INTO_NONNULL_FIELD)</a></h3> 2510 <h3><a name="NP_OPTIONAL_RETURN_NULL">NP: Method with Optional return type retur ns explicit null (NP_OPTIONAL_RETURN_NULL)</a></h3>
2511
2512
2513 <p>
2514 The usage of Optional return type (java.util.Optional or com.google.common.b ase.Optiona)
2515 always mean that explicit null returns were not desired by design.
2516 Returning a null value in such case is a contract violation and will most li kely break clients code.
2517 </p>
2518
2519
2520 <h3><a name="NP_STORE_INTO_NONNULL_FIELD">NP: Store of null value into field ann otated @Nonnull (NP_STORE_INTO_NONNULL_FIELD)</a></h3>
2457 2521
2458 2522
2459 <p> A value that could be null is stored into a field that has been annotated as NonNull. </p> 2523 <p> A value that could be null is stored into a field that has been annotated as @Nonnull. </p>
2460 2524
2461 2525
2462 <h3><a name="NP_UNWRITTEN_FIELD">NP: Read of unwritten field (NP_UNWRITTEN_FIELD )</a></h3> 2526 <h3><a name="NP_UNWRITTEN_FIELD">NP: Read of unwritten field (NP_UNWRITTEN_FIELD )</a></h3>
2463 2527
2464 2528
2465 <p> The program is dereferencing a field that does not seem to ever have a non -null value written to it. 2529 <p> The program is dereferencing a field that does not seem to ever have a non -null value written to it.
2466 Unless the field is initialized via some mechanism not seen by the analysis, 2530 Unless the field is initialized via some mechanism not seen by the analysis,
2467 dereferencing this value will generate a null pointer exception. 2531 dereferencing this value will generate a null pointer exception.
2468 </p> 2532 </p>
2469 2533
(...skipping 20 matching lines...) Expand all
2490 <p> This class defines a method called <code>tostring()</code>.&nbsp; This met hod 2554 <p> This class defines a method called <code>tostring()</code>.&nbsp; This met hod
2491 does not override the <code>toString()</code> method in <code>java.lang.Object </code>, 2555 does not override the <code>toString()</code> method in <code>java.lang.Object </code>,
2492 which is probably what was intended.</p> 2556 which is probably what was intended.</p>
2493 2557
2494 2558
2495 <h3><a name="NM_METHOD_CONSTRUCTOR_CONFUSION">Nm: Apparent method/constructor co nfusion (NM_METHOD_CONSTRUCTOR_CONFUSION)</a></h3> 2559 <h3><a name="NM_METHOD_CONSTRUCTOR_CONFUSION">Nm: Apparent method/constructor co nfusion (NM_METHOD_CONSTRUCTOR_CONFUSION)</a></h3>
2496 2560
2497 2561
2498 <p> This regular method has the same name as the class it is defined in. It is likely that this was intended to be a constructor. 2562 <p> This regular method has the same name as the class it is defined in. It is likely that this was intended to be a constructor.
2499 If it was intended to be a constructor, remove the declaration of a void r eturn value. 2563 If it was intended to be a constructor, remove the declaration of a void r eturn value.
2500 If you had accidently defined this method, realized the mistake, defined a p roper constructor 2564 If you had accidentally defined this method, realized the mistake, defined a proper constructor
2501 but can't get rid of this method due to backwards compatibility, deprecate t he method. 2565 but can't get rid of this method due to backwards compatibility, deprecate t he method.
2502 </p> 2566 </p>
2503 2567
2504 2568
2505 <h3><a name="NM_VERY_CONFUSING">Nm: Very confusing method names (NM_VERY_CONFUSI NG)</a></h3> 2569 <h3><a name="NM_VERY_CONFUSING">Nm: Very confusing method names (NM_VERY_CONFUSI NG)</a></h3>
2506 2570
2507 2571
2508 <p> The referenced methods have names that differ only by capitalization. 2572 <p> The referenced methods have names that differ only by capitalization.
2509 This is very confusing because if the capitalization were 2573 This is very confusing because if the capitalization were
2510 identical then one of the methods would override the other. 2574 identical then one of the methods would override the other.
(...skipping 30 matching lines...) Expand all
2541 <h3><a name="QBA_QUESTIONABLE_BOOLEAN_ASSIGNMENT">QBA: Method assigns boolean li teral in boolean expression (QBA_QUESTIONABLE_BOOLEAN_ASSIGNMENT)</a></h3> 2605 <h3><a name="QBA_QUESTIONABLE_BOOLEAN_ASSIGNMENT">QBA: Method assigns boolean li teral in boolean expression (QBA_QUESTIONABLE_BOOLEAN_ASSIGNMENT)</a></h3>
2542 2606
2543 2607
2544 <p> 2608 <p>
2545 This method assigns a literal boolean value (true or false) to a boolean v ariable inside 2609 This method assigns a literal boolean value (true or false) to a boolean v ariable inside
2546 an if or while expression. Most probably this was supposed to be a boolean comparison using 2610 an if or while expression. Most probably this was supposed to be a boolean comparison using
2547 ==, not an assignment using =. 2611 ==, not an assignment using =.
2548 </p> 2612 </p>
2549 2613
2550 2614
2615 <h3><a name="RANGE_ARRAY_INDEX">RANGE: Array index is out of bounds (RANGE_ARRAY _INDEX)</a></h3>
2616
2617
2618 <p> Array operation is performed, but array index is out of bounds, which wil l result in ArrayIndexOutOfBoundsException at runtime.</p>
2619
2620
2621 <h3><a name="RANGE_ARRAY_LENGTH">RANGE: Array length is out of bounds (RANGE_ARR AY_LENGTH)</a></h3>
2622
2623
2624 <p> Method is called with array parameter and length parameter, but the lengt h is out of bounds. This will result in IndexOutOfBoundsException at runtime. </ p>
2625
2626
2627 <h3><a name="RANGE_ARRAY_OFFSET">RANGE: Array offset is out of bounds (RANGE_ARR AY_OFFSET)</a></h3>
2628
2629
2630 <p> Method is called with array parameter and offset parameter, but the offse t is out of bounds. This will result in IndexOutOfBoundsException at runtime. </ p>
2631
2632
2633 <h3><a name="RANGE_STRING_INDEX">RANGE: String index is out of bounds (RANGE_STR ING_INDEX)</a></h3>
2634
2635
2636 <p> String method is called and specified string index is out of bounds. This will result in StringIndexOutOfBoundsException at runtime. </p>
2637
2638
2551 <h3><a name="RC_REF_COMPARISON">RC: Suspicious reference comparison (RC_REF_COMP ARISON)</a></h3> 2639 <h3><a name="RC_REF_COMPARISON">RC: Suspicious reference comparison (RC_REF_COMP ARISON)</a></h3>
2552 2640
2553 2641
2554 <p> This method compares two reference values using the == or != operator, 2642 <p> This method compares two reference values using the == or != operator,
2555 where the correct way to compare instances of this type is generally 2643 where the correct way to compare instances of this type is generally
2556 with the equals() method. 2644 with the equals() method.
2557 It is possible to create distinct instances that are equal but do not compare as == since 2645 It is possible to create distinct instances that are equal but do not compare as == since
2558 they are different objects. 2646 they are different objects.
2559 Examples of classes which should generally 2647 Examples of classes which should generally
2560 not be compared by reference are java.lang.Integer, java.lang.Float, etc.</p> 2648 not be compared by reference are java.lang.Integer, java.lang.Float, etc.</p>
(...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after
3303 3391
3304 <h3><a name="MS_MUTABLE_ARRAY">MS: Field is a mutable array (MS_MUTABLE_ARRAY)</ a></h3> 3392 <h3><a name="MS_MUTABLE_ARRAY">MS: Field is a mutable array (MS_MUTABLE_ARRAY)</ a></h3>
3305 3393
3306 3394
3307 <p> A final static field references an array 3395 <p> A final static field references an array
3308 and can be accessed by malicious code or 3396 and can be accessed by malicious code or
3309 by accident from another package. 3397 by accident from another package.
3310 This code can freely modify the contents of the array.</p> 3398 This code can freely modify the contents of the array.</p>
3311 3399
3312 3400
3401 <h3><a name="MS_MUTABLE_COLLECTION">MS: Field is a mutable collection (MS_MUTABL E_COLLECTION)</a></h3>
3402
3403
3404 <p>A mutable collection instance is assigned to a final static field,
3405 thus can be changed by malicious code or by accident from another package.
3406 Consider wrapping this field into Collections.unmodifiableSet/List/Map/etc.
3407 to avoid this vulnerability.</p>
3408
3409
3410 <h3><a name="MS_MUTABLE_COLLECTION_PKGPROTECT">MS: Field is a mutable collection which should be package protected (MS_MUTABLE_COLLECTION_PKGPROTECT)</a></h3>
3411
3412
3413 <p>A mutable collection instance is assigned to a final static field,
3414 thus can be changed by malicious code or by accident from another package.
3415 The field could be made package protected to avoid this vulnerability.
3416 Alternatively you may wrap this field into Collections.unmodifiableSet/List/M ap/etc.
3417 to avoid this vulnerability.</p>
3418
3419
3313 <h3><a name="MS_MUTABLE_HASHTABLE">MS: Field is a mutable Hashtable (MS_MUTABLE_ HASHTABLE)</a></h3> 3420 <h3><a name="MS_MUTABLE_HASHTABLE">MS: Field is a mutable Hashtable (MS_MUTABLE_ HASHTABLE)</a></h3>
3314 3421
3315 3422
3316 <p>A final static field references a Hashtable 3423 <p>A final static field references a Hashtable
3317 and can be accessed by malicious code or 3424 and can be accessed by malicious code or
3318 by accident from another package. 3425 by accident from another package.
3319 This code can freely modify the contents of the Hashtable.</p> 3426 This code can freely modify the contents of the Hashtable.</p>
3320 3427
3321 3428
3322 <h3><a name="MS_OOI_PKGPROTECT">MS: Field should be moved out of an interface an d made package protected (MS_OOI_PKGPROTECT)</a></h3> 3429 <h3><a name="MS_OOI_PKGPROTECT">MS: Field should be moved out of an interface an d made package protected (MS_OOI_PKGPROTECT)</a></h3>
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
3379 <h3><a name="DC_DOUBLECHECK">DC: Possible double check of field (DC_DOUBLECHECK) </a></h3> 3486 <h3><a name="DC_DOUBLECHECK">DC: Possible double check of field (DC_DOUBLECHECK) </a></h3>
3380 3487
3381 3488
3382 <p> This method may contain an instance of double-checked locking.&nbsp; 3489 <p> This method may contain an instance of double-checked locking.&nbsp;
3383 This idiom is not correct according to the semantics of the Java memory 3490 This idiom is not correct according to the semantics of the Java memory
3384 model.&nbsp; For more information, see the web page 3491 model.&nbsp; For more information, see the web page
3385 <a href="http://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.htm l" 3492 <a href="http://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.htm l"
3386 >http://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html</a>.</ p> 3493 >http://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html</a>.</ p>
3387 3494
3388 3495
3496 <h3><a name="DC_PARTIALLY_CONSTRUCTED">DC: Possible exposure of partially initia lized object (DC_PARTIALLY_CONSTRUCTED)</a></h3>
3497
3498
3499 <p>Looks like this method uses lazy field initialization with double-checked l ocking.
3500 While the field is correctly declared as volatile, it's possible that the inte rnal structure of
3501 the object is changed after the field assignment, thus another thread may see the partially initialized object.</p>
3502 <p>To fix this problem consider storing the object into the local variable fir st
3503 and save it to the volatile field only after it's fully constructed.
3504 </p>
3505
3506
3389 <h3><a name="DL_SYNCHRONIZATION_ON_BOOLEAN">DL: Synchronization on Boolean (DL_S YNCHRONIZATION_ON_BOOLEAN)</a></h3> 3507 <h3><a name="DL_SYNCHRONIZATION_ON_BOOLEAN">DL: Synchronization on Boolean (DL_S YNCHRONIZATION_ON_BOOLEAN)</a></h3>
3390 3508
3391 3509
3392 <p> The code synchronizes on a boxed primitive constant, such as an Boolean.</ p> 3510 <p> The code synchronizes on a boxed primitive constant, such as an Boolean.</ p>
3393 <pre> 3511 <pre>
3394 private static Boolean inited = Boolean.FALSE; 3512 private static Boolean inited = Boolean.FALSE;
3395 ... 3513 ...
3396 synchronized(inited) { 3514 synchronized(inited) {
3397 if (!inited) { 3515 if (!inited) {
3398 init(); 3516 init();
(...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after
3957 </p> 4075 </p>
3958 4076
3959 4077
3960 <h3><a name="BX_BOXING_IMMEDIATELY_UNBOXED_TO_PERFORM_COERCION">Bx: Primitive va lue is boxed then unboxed to perform primitive coercion (BX_BOXING_IMMEDIATELY_U NBOXED_TO_PERFORM_COERCION)</a></h3> 4078 <h3><a name="BX_BOXING_IMMEDIATELY_UNBOXED_TO_PERFORM_COERCION">Bx: Primitive va lue is boxed then unboxed to perform primitive coercion (BX_BOXING_IMMEDIATELY_U NBOXED_TO_PERFORM_COERCION)</a></h3>
3961 4079
3962 4080
3963 <p>A primitive boxed value constructed and then immediately converted into a d ifferent primitive type 4081 <p>A primitive boxed value constructed and then immediately converted into a d ifferent primitive type
3964 (e.g., <code>new Double(d).intValue()</code>). Just perform direct primitive coe rcion (e.g., <code>(int) d</code>).</p> 4082 (e.g., <code>new Double(d).intValue()</code>). Just perform direct primitive coe rcion (e.g., <code>(int) d</code>).</p>
3965 4083
3966 4084
4085 <h3><a name="BX_UNBOXED_AND_COERCED_FOR_TERNARY_OPERATOR">Bx: Primitive value is unboxed and coerced for ternary operator (BX_UNBOXED_AND_COERCED_FOR_TERNARY_OP ERATOR)</a></h3>
4086
4087
4088 <p>A wrapped primitive value is unboxed and converted to another primitive typ e as part of the
4089 evaluation of a conditional ternary operator (the <code> b ? e1 : e2</code> oper ator). The
4090 semantics of Java mandate that if <code>e1</code> and <code>e2</code> are wrappe d
4091 numeric values, the values are unboxed and converted/coerced to their common typ e (e.g,
4092 if <code>e1</code> is of type <code>Integer</code>
4093 and <code>e2</code> is of type <code>Float</code>, then <code>e1</code> is unbox ed,
4094 converted to a floating point value, and boxed. See JLS Section 15.25.
4095 </p>
4096
4097
3967 <h3><a name="BX_UNBOXING_IMMEDIATELY_REBOXED">Bx: Boxed value is unboxed and the n immediately reboxed (BX_UNBOXING_IMMEDIATELY_REBOXED)</a></h3> 4098 <h3><a name="BX_UNBOXING_IMMEDIATELY_REBOXED">Bx: Boxed value is unboxed and the n immediately reboxed (BX_UNBOXING_IMMEDIATELY_REBOXED)</a></h3>
3968 4099
3969 4100
3970 <p>A boxed value is unboxed and then immediately reboxed. 4101 <p>A boxed value is unboxed and then immediately reboxed.
3971 </p> 4102 </p>
3972 4103
3973 4104
4105 <h3><a name="DM_BOXED_PRIMITIVE_FOR_COMPARE">Bx: Boxing a primitive to compare ( DM_BOXED_PRIMITIVE_FOR_COMPARE)</a></h3>
4106
4107
4108 <p>A boxed primitive is created just to call compareTo method. It's more effic ient to use static compare method
4109 (for double and float since Java 1.4, for other primitive types since Java 1.7 ) which works on primitives directly.
4110 </p>
4111
4112
3974 <h3><a name="DM_BOXED_PRIMITIVE_FOR_PARSING">Bx: Boxing/unboxing to parse a prim itive (DM_BOXED_PRIMITIVE_FOR_PARSING)</a></h3> 4113 <h3><a name="DM_BOXED_PRIMITIVE_FOR_PARSING">Bx: Boxing/unboxing to parse a prim itive (DM_BOXED_PRIMITIVE_FOR_PARSING)</a></h3>
3975 4114
3976 4115
3977 <p>A boxed primitive is created from a String, just to extract the unboxed pri mitive value. 4116 <p>A boxed primitive is created from a String, just to extract the unboxed pri mitive value.
3978 It is more efficient to just call the static parseXXX method.</p> 4117 It is more efficient to just call the static parseXXX method.</p>
3979 4118
3980 4119
3981 <h3><a name="DM_BOXED_PRIMITIVE_TOSTRING">Bx: Method allocates a boxed primitive just to call toString (DM_BOXED_PRIMITIVE_TOSTRING)</a></h3> 4120 <h3><a name="DM_BOXED_PRIMITIVE_TOSTRING">Bx: Method allocates a boxed primitive just to call toString (DM_BOXED_PRIMITIVE_TOSTRING)</a></h3>
3982 4121
3983 4122
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
4121 <p> 4260 <p>
4122 A large String constant is duplicated across multiple class files. 4261 A large String constant is duplicated across multiple class files.
4123 This is likely because a final field is initialized to a String constant, an d the Java language 4262 This is likely because a final field is initialized to a String constant, an d the Java language
4124 mandates that all references to a final field from other classes be inlined into 4263 mandates that all references to a final field from other classes be inlined into
4125 that classfile. See <a href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id= 6447475">JDK bug 6447475</a> 4264 that classfile. See <a href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id= 6447475">JDK bug 6447475</a>
4126 for a description of an occurrence of this bug in the JDK and how resolving it reduced 4265 for a description of an occurrence of this bug in the JDK and how resolving it reduced
4127 the size of the JDK by 1 megabyte. 4266 the size of the JDK by 1 megabyte.
4128 </p> 4267 </p>
4129 4268
4130 4269
4131 <h3><a name="ITA_INEFFICIENT_TO_ARRAY">ITA: Method uses toArray() with zero-leng th array argument (ITA_INEFFICIENT_TO_ARRAY)</a></h3>
4132
4133
4134 <p> This method uses the toArray() method of a collection derived class, and pas ses
4135 in a zero-length prototype array argument. It is more efficient to use
4136 <code>myCollection.toArray(new Foo[myCollection.size()])</code>
4137 If the array passed in is big enough to store all of the
4138 elements of the collection, then it is populated and returned
4139 directly. This avoids the need to create a second array
4140 (by reflection) to return as the result.</p>
4141
4142
4143 <h3><a name="SBSC_USE_STRINGBUFFER_CONCATENATION">SBSC: Method concatenates stri ngs using + in a loop (SBSC_USE_STRINGBUFFER_CONCATENATION)</a></h3> 4270 <h3><a name="SBSC_USE_STRINGBUFFER_CONCATENATION">SBSC: Method concatenates stri ngs using + in a loop (SBSC_USE_STRINGBUFFER_CONCATENATION)</a></h3>
4144 4271
4145 4272
4146 <p> The method seems to be building a String using concatenation in a loop. 4273 <p> The method seems to be building a String using concatenation in a loop.
4147 In each iteration, the String is converted to a StringBuffer/StringBuilder, 4274 In each iteration, the String is converted to a StringBuffer/StringBuilder,
4148 appended to, and converted back to a String. 4275 appended to, and converted back to a String.
4149 This can lead to a cost quadratic in the number of iterations, 4276 This can lead to a cost quadratic in the number of iterations,
4150 as the growing string is recopied in each iteration. </p> 4277 as the growing string is recopied in each iteration. </p>
4151 4278
4152 <p>Better performance can be obtained by using 4279 <p>Better performance can be obtained by using
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
4397 See <a href="http://cwe.mitre.org/data/definitions/23.html">http://cwe.mitre.org /data/definitions/23.html</a> 4524 See <a href="http://cwe.mitre.org/data/definitions/23.html">http://cwe.mitre.org /data/definitions/23.html</a>
4398 for more information.</p> 4525 for more information.</p>
4399 <p>FindBugs looks only for the most blatant, obvious cases of relative path trav ersal. 4526 <p>FindBugs looks only for the most blatant, obvious cases of relative path trav ersal.
4400 If FindBugs found <em>any</em>, you <em>almost certainly</em> have more 4527 If FindBugs found <em>any</em>, you <em>almost certainly</em> have more
4401 vulnerabilities that FindBugs doesn't report. If you are concerned about relativ e path traversal, you should seriously 4528 vulnerabilities that FindBugs doesn't report. If you are concerned about relativ e path traversal, you should seriously
4402 consider using a commercial static analysis or pen-testing tool. 4529 consider using a commercial static analysis or pen-testing tool.
4403 </p> 4530 </p>
4404 4531
4405 4532
4406 4533
4407 <h3><a name="SQL_NONCONSTANT_STRING_PASSED_TO_EXECUTE">SQL: Nonconstant string p assed to execute method on an SQL statement (SQL_NONCONSTANT_STRING_PASSED_TO_EX ECUTE)</a></h3> 4534 <h3><a name="SQL_NONCONSTANT_STRING_PASSED_TO_EXECUTE">SQL: Nonconstant string p assed to execute or addBatch method on an SQL statement (SQL_NONCONSTANT_STRING_ PASSED_TO_EXECUTE)</a></h3>
4408 4535
4409 4536
4410 <p>The method invokes the execute method on an SQL statement with a String tha t seems 4537 <p>The method invokes the execute or addBatch method on an SQL statement with a String that seems
4411 to be dynamically generated. Consider using 4538 to be dynamically generated. Consider using
4412 a prepared statement instead. It is more efficient and less vulnerable to 4539 a prepared statement instead. It is more efficient and less vulnerable to
4413 SQL injection attacks. 4540 SQL injection attacks.
4414 </p> 4541 </p>
4415 4542
4416 4543
4417 <h3><a name="SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING">SQL: A pr epared statement is generated from a nonconstant String (SQL_PREPARED_STATEMENT_ GENERATED_FROM_NONCONSTANT_STRING)</a></h3> 4544 <h3><a name="SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING">SQL: A pr epared statement is generated from a nonconstant String (SQL_PREPARED_STATEMENT_ GENERATED_FROM_NONCONSTANT_STRING)</a></h3>
4418 4545
4419 4546
4420 <p>The code creates an SQL prepared statement from a nonconstant String. 4547 <p>The code creates an SQL prepared statement from a nonconstant String.
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
4680 <code>if ( Math.abs(x - y) &lt; .0000001 )</code>. 4807 <code>if ( Math.abs(x - y) &lt; .0000001 )</code>.
4681 See the Java Language Specification, section 4.2.4. 4808 See the Java Language Specification, section 4.2.4.
4682 </p> 4809 </p>
4683 4810
4684 4811
4685 <h3><a name="VA_FORMAT_STRING_BAD_CONVERSION_TO_BOOLEAN">FS: Non-Boolean argumen t formatted using %b format specifier (VA_FORMAT_STRING_BAD_CONVERSION_TO_BOOLEA N)</a></h3> 4812 <h3><a name="VA_FORMAT_STRING_BAD_CONVERSION_TO_BOOLEAN">FS: Non-Boolean argumen t formatted using %b format specifier (VA_FORMAT_STRING_BAD_CONVERSION_TO_BOOLEA N)</a></h3>
4686 4813
4687 4814
4688 <p> 4815 <p>
4689 An argument not of type Boolean is being formatted with a %b format specifier. T his won't throw an 4816 An argument not of type Boolean is being formatted with a %b format specifier. T his won't throw an
4690 exception; instead, it will print true for any nonnull value, and false for null . 4817 exception; instead, it will print true for any non-null value, and false for nul l.
4691 This feature of format strings is strange, and may not be what you intended. 4818 This feature of format strings is strange, and may not be what you intended.
4692 </p> 4819 </p>
4693 4820
4694 4821
4695 <h3><a name="IA_AMBIGUOUS_INVOCATION_OF_INHERITED_OR_OUTER_METHOD">IA: Potential ly ambiguous invocation of either an inherited or outer method (IA_AMBIGUOUS_INV OCATION_OF_INHERITED_OR_OUTER_METHOD)</a></h3> 4822 <h3><a name="IA_AMBIGUOUS_INVOCATION_OF_INHERITED_OR_OUTER_METHOD">IA: Potential ly ambiguous invocation of either an inherited or outer method (IA_AMBIGUOUS_INV OCATION_OF_INHERITED_OR_OUTER_METHOD)</a></h3>
4696 4823
4697 4824
4698 <p> 4825 <p>
4699 An inner class is invoking a method that could be resolved to either a inherited method or a method defined in an outer class. 4826 An inner class is invoking a method that could be resolved to either a inherited method or a method defined in an outer class.
4700 For example, you invoke <code>foo(17)</code>, which is defined in both a supercl ass and in an outer method. 4827 For example, you invoke <code>foo(17)</code>, which is defined in both a supercl ass and in an outer method.
4701 By the Java semantics, 4828 By the Java semantics,
4702 it will be resolved to invoke the inherited method, but this may not be want 4829 it will be resolved to invoke the inherited method, but this may not be want
4703 you intend. 4830 you intend.
4704 </p> 4831 </p>
4705 <p>If you really intend to invoke the inherited method, 4832 <p>If you really intend to invoke the inherited method,
4706 invoke it by invoking the method on super (e.g., invoke super.foo(17)), and 4833 invoke it by invoking the method on super (e.g., invoke super.foo(17)), and
4707 thus it will be clear to other readers of your code and to FindBugs 4834 thus it will be clear to other readers of your code and to FindBugs
4708 that you want to invoke the inherited method, not the method in the outer class. 4835 that you want to invoke the inherited method, not the method in the outer class.
4709 </p> 4836 </p>
4710 <p>If you call <code>this.foo(17)</code>, then the inherited method will be invo ked. However, since FindBugs only looks at 4837 <p>If you call <code>this.foo(17)</code>, then the inherited method will be invo ked. However, since FindBugs only looks at
4711 classfiles, it 4838 classfiles, it
4712 can't tell the difference between an invocation of <code>this.foo(17)</code> and <code>foo(17)</code>, it will still 4839 can't tell the difference between an invocation of <code>this.foo(17)</code> and <code>foo(17)</code>, it will still
4713 complain about a potential ambiguous invocation. 4840 complain about a potential ambiguous invocation.
4714 </p> 4841 </p>
4715 4842
4716 4843
4717 <h3><a name="IC_INIT_CIRCULARITY">IC: Initialization circularity (IC_INIT_CIRCUL ARITY)</a></h3> 4844 <h3><a name="IC_INIT_CIRCULARITY">IC: Initialization circularity (IC_INIT_CIRCUL ARITY)</a></h3>
4718 4845
4719 4846
4720 <p> A circularity was detected in the static initializers of the two 4847 <p> A circularity was detected in the static initializers of the two
4721 classes referenced by the bug instance.&nbsp; Many kinds of unexpected 4848 classes referenced by the bug instance.&nbsp; Many kinds of unexpected
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
4862 to read, readLine() will return null and dereferencing that will generate a null pointer exception. 4989 to read, readLine() will return null and dereferencing that will generate a null pointer exception.
4863 </p> 4990 </p>
4864 4991
4865 4992
4866 <h3><a name="NP_LOAD_OF_KNOWN_NULL_VALUE">NP: Load of known null value (NP_LOAD_ OF_KNOWN_NULL_VALUE)</a></h3> 4993 <h3><a name="NP_LOAD_OF_KNOWN_NULL_VALUE">NP: Load of known null value (NP_LOAD_ OF_KNOWN_NULL_VALUE)</a></h3>
4867 4994
4868 4995
4869 <p> The variable referenced at this point is known to be null due to an earlie r 4996 <p> The variable referenced at this point is known to be null due to an earlie r
4870 check against null. Although this is valid, it might be a mistake (perhaps yo u 4997 check against null. Although this is valid, it might be a mistake (perhaps yo u
4871 intended to refer to a different variable, or perhaps the earlier check to see i f the 4998 intended to refer to a different variable, or perhaps the earlier check to see i f the
4872 variable is null should have been a check to see if it was nonnull). 4999 variable is null should have been a check to see if it was non-null).
4873 </p> 5000 </p>
4874 5001
4875 5002
4876 <h3><a name="NP_METHOD_PARAMETER_TIGHTENS_ANNOTATION">NP: Method tightens nullne ss annotation on parameter (NP_METHOD_PARAMETER_TIGHTENS_ANNOTATION)</a></h3> 5003 <h3><a name="NP_METHOD_PARAMETER_TIGHTENS_ANNOTATION">NP: Method tightens nullne ss annotation on parameter (NP_METHOD_PARAMETER_TIGHTENS_ANNOTATION)</a></h3>
4877 5004
4878 <p> 5005 <p>
4879 A method should always implement the contract of a method it overrides. Thus, if a method takes a parameter 5006 A method should always implement the contract of a method it overrides. Thus, if a method takes a parameter
4880 » that is marked as @Nullable, you shouldn't override that method in a sub class with a method where that parameter is @Nonnull. 5007 that is marked as @Nullable, you shouldn't override that method in a subclas s with a method where that parameter is @Nonnull.
4881 » Doing so violates the contract that the method should handle a null para meter. 5008 Doing so violates the contract that the method should handle a null paramete r.
4882 </p> 5009 </p>
4883 5010
4884 <h3><a name="NP_METHOD_RETURN_RELAXING_ANNOTATION">NP: Method relaxes nullness a nnotation on return value (NP_METHOD_RETURN_RELAXING_ANNOTATION)</a></h3> 5011 <h3><a name="NP_METHOD_RETURN_RELAXING_ANNOTATION">NP: Method relaxes nullness a nnotation on return value (NP_METHOD_RETURN_RELAXING_ANNOTATION)</a></h3>
4885 5012
4886 <p> 5013 <p>
4887 A method should always implement the contract of a method it overrides. Thus, if a method takes is annotated 5014 A method should always implement the contract of a method it overrides. Thus, if a method takes is annotated
4888 » as returning a @Nonnull value, 5015 as returning a @Nonnull value,
4889 » you shouldn't override that method in a subclass with a method annotated as returning a @Nullable or @CheckForNull value. 5016 you shouldn't override that method in a subclass with a method annotated as returning a @Nullable or @CheckForNull value.
4890 » Doing so violates the contract that the method shouldn't return null. 5017 Doing so violates the contract that the method shouldn't return null.
4891 </p> 5018 </p>
4892 5019
4893 <h3><a name="NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE">NP: Possible null pointer d ereference due to return value of called method (NP_NULL_ON_SOME_PATH_FROM_RETUR N_VALUE)</a></h3> 5020 <h3><a name="NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE">NP: Possible null pointer d ereference due to return value of called method (NP_NULL_ON_SOME_PATH_FROM_RETUR N_VALUE)</a></h3>
4894 5021
4895 5022
4896 <p> The return value from a method is dereferenced without a null check, 5023 <p> The return value from a method is dereferenced without a null check,
4897 and the return value of that method is one that should generally be checked 5024 and the return value of that method is one that should generally be checked
4898 for null. This may lead to a <code>NullPointerException</code> when the code is executed. 5025 for null. This may lead to a <code>NullPointerException</code> when the code is executed.
4899 </p> 5026 </p>
4900 5027
4901 5028
4902 <h3><a name="NP_NULL_ON_SOME_PATH_MIGHT_BE_INFEASIBLE">NP: Possible null pointer dereference on branch that might be infeasible (NP_NULL_ON_SOME_PATH_MIGHT_BE_I NFEASIBLE)</a></h3> 5029 <h3><a name="NP_NULL_ON_SOME_PATH_MIGHT_BE_INFEASIBLE">NP: Possible null pointer dereference on branch that might be infeasible (NP_NULL_ON_SOME_PATH_MIGHT_BE_I NFEASIBLE)</a></h3>
4903 5030
4904 5031
4905 <p> There is a branch of statement that, <em>if executed,</em> guarantees that 5032 <p> There is a branch of statement that, <em>if executed,</em> guarantees that
4906 a null value will be dereferenced, which 5033 a null value will be dereferenced, which
4907 would generate a <code>NullPointerException</code> when the code is executed. 5034 would generate a <code>NullPointerException</code> when the code is executed.
4908 Of course, the problem might be that the branch or statement is infeasible and t hat 5035 Of course, the problem might be that the branch or statement is infeasible and t hat
4909 the null pointer exception can't ever be executed; deciding that is beyond the a bility of FindBugs. 5036 the null pointer exception can't ever be executed; deciding that is beyond the a bility of FindBugs.
4910 Due to the fact that this value had been previously tested for nullness, 5037 Due to the fact that this value had been previously tested for nullness,
4911 this is a definite possibility. 5038 this is a definite possibility.
4912 </p> 5039 </p>
4913 5040
4914 5041
4915 <h3><a name="NP_PARAMETER_MUST_BE_NONNULL_BUT_MARKED_AS_NULLABLE">NP: Parameter must be nonnull but is marked as nullable (NP_PARAMETER_MUST_BE_NONNULL_BUT_MARK ED_AS_NULLABLE)</a></h3> 5042 <h3><a name="NP_PARAMETER_MUST_BE_NONNULL_BUT_MARKED_AS_NULLABLE">NP: Parameter must be non-null but is marked as nullable (NP_PARAMETER_MUST_BE_NONNULL_BUT_MAR KED_AS_NULLABLE)</a></h3>
4916 5043
4917 5044
4918 <p> This parameter is always used in a way that requires it to be nonnull, 5045 <p> This parameter is always used in a way that requires it to be non-null,
4919 but the parameter is explicitly annotated as being Nullable. Either the use 5046 but the parameter is explicitly annotated as being Nullable. Either the use
4920 of the parameter or the annotation is wrong. 5047 of the parameter or the annotation is wrong.
4921 </p> 5048 </p>
4922 5049
4923 5050
4924 <h3><a name="NP_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD">NP: Read of unwritten publi c or protected field (NP_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD)</a></h3> 5051 <h3><a name="NP_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD">NP: Read of unwritten publi c or protected field (NP_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD)</a></h3>
4925 5052
4926 5053
4927 <p> The program is dereferencing a public or protected 5054 <p> The program is dereferencing a public or protected
4928 field that does not seem to ever have a non-null value written to it. 5055 field that does not seem to ever have a non-null value written to it.
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
5060 5187
5061 <h3><a name="RV_CHECK_FOR_POSITIVE_INDEXOF">RV: Method checks to see if result o f String.indexOf is positive (RV_CHECK_FOR_POSITIVE_INDEXOF)</a></h3> 5188 <h3><a name="RV_CHECK_FOR_POSITIVE_INDEXOF">RV: Method checks to see if result o f String.indexOf is positive (RV_CHECK_FOR_POSITIVE_INDEXOF)</a></h3>
5062 5189
5063 5190
5064 <p> The method invokes String.indexOf and checks to see if the result is posi tive or non-positive. 5191 <p> The method invokes String.indexOf and checks to see if the result is posi tive or non-positive.
5065 It is much more typical to check to see if the result is negative or non-nega tive. It is 5192 It is much more typical to check to see if the result is negative or non-nega tive. It is
5066 positive only if the substring checked for occurs at some place other than at the beginning of 5193 positive only if the substring checked for occurs at some place other than at the beginning of
5067 the String.</p> 5194 the String.</p>
5068 5195
5069 5196
5070 <h3><a name="RV_DONT_JUST_NULL_CHECK_READLINE">RV: Method discards result of rea dLine after checking if it is nonnull (RV_DONT_JUST_NULL_CHECK_READLINE)</a></h3 > 5197 <h3><a name="RV_DONT_JUST_NULL_CHECK_READLINE">RV: Method discards result of rea dLine after checking if it is non-null (RV_DONT_JUST_NULL_CHECK_READLINE)</a></h 3>
5071 5198
5072 5199
5073 <p> The value returned by readLine is discarded after checking to see if the return 5200 <p> The value returned by readLine is discarded after checking to see if the return
5074 value is non-null. In almost all situations, if the result is non-null, you will want 5201 value is non-null. In almost all situations, if the result is non-null, you will want
5075 to use that non-null value. Calling readLine again will give you a different lin e.</p> 5202 to use that non-null value. Calling readLine again will give you a different lin e.</p>
5076 5203
5077 5204
5078 <h3><a name="RV_REM_OF_HASHCODE">RV: Remainder of hashCode could be negative (RV _REM_OF_HASHCODE)</a></h3> 5205 <h3><a name="RV_REM_OF_HASHCODE">RV: Remainder of hashCode could be negative (RV _REM_OF_HASHCODE)</a></h3>
5079 5206
5080 5207
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
5115 </p> 5242 </p>
5116 <p>We are guessing that ignoring the return value might be a bad idea just from 5243 <p>We are guessing that ignoring the return value might be a bad idea just from
5117 a simple analysis of the body of the method. You can use a @CheckReturnValue ann otation 5244 a simple analysis of the body of the method. You can use a @CheckReturnValue ann otation
5118 to instruct FindBugs as to whether ignoring the return value of this method 5245 to instruct FindBugs as to whether ignoring the return value of this method
5119 is important or acceptable. 5246 is important or acceptable.
5120 </p> 5247 </p>
5121 <p>Please investigate this closely to decide whether it is OK to ignore the retu rn value. 5248 <p>Please investigate this closely to decide whether it is OK to ignore the retu rn value.
5122 </p> 5249 </p>
5123 5250
5124 5251
5252 <h3><a name="RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT">RV: Return value of method without side effect is ignored (RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT)</a></h3>
5253
5254
5255 <p>This code calls a method and ignores the return value. However our analysis s hows that
5256 the method (including its implementations in subclasses if any) does not produce any effect
5257 other than return value. Thus this call can be removed.
5258 </p>
5259 <p>We are trying to reduce the false positives as much as possible, but in some cases this warning might be wrong.
5260 Common false-positive cases include:</p>
5261 <p>- The method is designed to be overridden and produce a side effect in other projects which are out of the scope of the analysis.</p>
5262 <p>- The method is called to trigger the class loading which may have a side eff ect.</p>
5263 <p>- The method is called just to get some exception.</p>
5264 <p>If you feel that our assumption is incorrect, you can use a @CheckReturnValue annotation
5265 to instruct FindBugs that ignoring the return value of this method is acceptable .
5266 </p>
5267
5268
5125 <h3><a name="SA_FIELD_DOUBLE_ASSIGNMENT">SA: Double assignment of field (SA_FIEL D_DOUBLE_ASSIGNMENT)</a></h3> 5269 <h3><a name="SA_FIELD_DOUBLE_ASSIGNMENT">SA: Double assignment of field (SA_FIEL D_DOUBLE_ASSIGNMENT)</a></h3>
5126 5270
5127 5271
5128 <p> This method contains a double assignment of a field; e.g. 5272 <p> This method contains a double assignment of a field; e.g.
5129 </p> 5273 </p>
5130 <pre> 5274 <pre>
5131 int x,y; 5275 int x,y;
5132 public void foo() { 5276 public void foo() {
5133 x = x = 17; 5277 x = x = 17;
5134 } 5278 }
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
5171 <p> This method contains a switch statement where one case branch will fall th rough to the next case. 5315 <p> This method contains a switch statement where one case branch will fall th rough to the next case.
5172 Usually you need to end this case with a break or return.</p> 5316 Usually you need to end this case with a break or return.</p>
5173 5317
5174 5318
5175 <h3><a name="SF_SWITCH_NO_DEFAULT">SF: Switch statement found where default case is missing (SF_SWITCH_NO_DEFAULT)</a></h3> 5319 <h3><a name="SF_SWITCH_NO_DEFAULT">SF: Switch statement found where default case is missing (SF_SWITCH_NO_DEFAULT)</a></h3>
5176 5320
5177 5321
5178 <p> This method contains a switch statement where default case is missing. 5322 <p> This method contains a switch statement where default case is missing.
5179 Usually you need to provide a default case.</p> 5323 Usually you need to provide a default case.</p>
5180 <p>Because the analysis only looks at the generated bytecode, this warning can be incorrect triggered if 5324 <p>Because the analysis only looks at the generated bytecode, this warning can be incorrect triggered if
5181 the default case is at the end of the switch statement and doesn't end with a br eak statement. 5325 the default case is at the end of the switch statement and the switch statement doesn't contain break statements for other
5326 cases.
5182 5327
5183 5328
5184 <h3><a name="ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD">ST: Write to static field from instance method (ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD)</a></h3> 5329 <h3><a name="ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD">ST: Write to static field from instance method (ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD)</a></h3>
5185 5330
5186 5331
5187 <p> This instance method writes to a static field. This is tricky to get 5332 <p> This instance method writes to a static field. This is tricky to get
5188 correct if multiple instances are being manipulated, 5333 correct if multiple instances are being manipulated,
5189 and generally bad practice. 5334 and generally bad practice.
5190 </p> 5335 </p>
5191 5336
(...skipping 29 matching lines...) Expand all
5221 <h3><a name="TQ_EXPLICIT_UNKNOWN_SOURCE_VALUE_REACHES_NEVER_SINK">TQ: Value requ ired to not have type qualifier, but marked as unknown (TQ_EXPLICIT_UNKNOWN_SOUR CE_VALUE_REACHES_NEVER_SINK)</a></h3> 5366 <h3><a name="TQ_EXPLICIT_UNKNOWN_SOURCE_VALUE_REACHES_NEVER_SINK">TQ: Value requ ired to not have type qualifier, but marked as unknown (TQ_EXPLICIT_UNKNOWN_SOUR CE_VALUE_REACHES_NEVER_SINK)</a></h3>
5222 5367
5223 5368
5224 <p> 5369 <p>
5225 A value is used in a way that requires it to be never be a value denoted b y a type qualifier, but 5370 A value is used in a way that requires it to be never be a value denoted b y a type qualifier, but
5226 there is an explicit annotation stating that it is not known where the value is prohibited from having that type qualifier. 5371 there is an explicit annotation stating that it is not known where the value is prohibited from having that type qualifier.
5227 Either the usage or the annotation is incorrect. 5372 Either the usage or the annotation is incorrect.
5228 </p> 5373 </p>
5229 5374
5230 5375
5376 <h3><a name="UC_USELESS_CONDITION">UC: Condition has no effect (UC_USELESS_CONDI TION)</a></h3>
5377
5378
5379 <p>This condition always produces the same result as the value of the involved v ariable was narrowed before.
5380 Probably something else was meant or condition can be removed.</p>
5381
5382
5383 <h3><a name="UC_USELESS_CONDITION_TYPE">UC: Condition has no effect due to the v ariable type (UC_USELESS_CONDITION_TYPE)</a></h3>
5384
5385
5386 <p>This condition always produces the same result due to the type range of the i nvolved variable.
5387 Probably something else was meant or condition can be removed.</p>
5388
5389
5390 <h3><a name="UC_USELESS_OBJECT">UC: Useless object created (UC_USELESS_OBJECT)</ a></h3>
5391
5392
5393 <p>Our analysis shows that this object is useless.
5394 It's created and modified, but its value never go outside of the method or produ ce any side-effect.
5395 Either there is a mistake and object was intended to be used or it can be remove d.</p>
5396 <p>This analysis rarely produces false-positives. Common false-positive cases in clude:</p>
5397 <p>- This object used to implicitly throw some obscure exception.</p>
5398 <p>- This object used as a stub to generalize the code.</p>
5399 <p>- This object used to hold strong references to weak/soft-referenced objects. </p>
5400
5401
5402 <h3><a name="UC_USELESS_OBJECT_STACK">UC: Useless object created on stack (UC_US ELESS_OBJECT_STACK)</a></h3>
5403
5404
5405 <p>This object is created just to perform some modifications which don't have an y side-effect.
5406 Probably something else was meant or the object can be removed.</p>
5407
5408
5409 <h3><a name="UC_USELESS_VOID_METHOD">UC: Useless non-empty void method (UC_USELE SS_VOID_METHOD)</a></h3>
5410
5411
5412 <p>Our analysis shows that this non-empty void method does not actually perform any useful work.
5413 Please check it: probably there's a mistake in its code or its body can be fully removed.
5414 </p>
5415 <p>We are trying to reduce the false positives as much as possible, but in some cases this warning might be wrong.
5416 Common false-positive cases include:</p>
5417 <p>- The method is intended to trigger loading of some class which may have a si de effect.</p>
5418 <p>- The method is intended to implicitly throw some obscure exception.</p>
5419
5420
5231 <h3><a name="UCF_USELESS_CONTROL_FLOW">UCF: Useless control flow (UCF_USELESS_CO NTROL_FLOW)</a></h3> 5421 <h3><a name="UCF_USELESS_CONTROL_FLOW">UCF: Useless control flow (UCF_USELESS_CO NTROL_FLOW)</a></h3>
5232 5422
5233 5423
5234 <p> This method contains a useless control flow statement, where 5424 <p> This method contains a useless control flow statement, where
5235 control flow continues onto the same place regardless of whether or not 5425 control flow continues onto the same place regardless of whether or not
5236 the branch is taken. For example, 5426 the branch is taken. For example,
5237 this is caused by having an empty statement 5427 this is caused by having an empty statement
5238 block for an <code>if</code> statement:</p> 5428 block for an <code>if</code> statement:</p>
5239 <pre> 5429 <pre>
5240 if (argv.length == 0) { 5430 if (argv.length == 0) {
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
5313 5503
5314 5504
5315 <hr> <p> 5505 <hr> <p>
5316 <script language="JavaScript" type="text/javascript"> 5506 <script language="JavaScript" type="text/javascript">
5317 <!---//hide script from old browsers 5507 <!---//hide script from old browsers
5318 document.write( "Last updated "+ document.lastModified + "." ); 5508 document.write( "Last updated "+ document.lastModified + "." );
5319 //end hiding contents ---> 5509 //end hiding contents --->
5320 </script> 5510 </script>
5321 <p> Send comments to <a class="sidebar" href="mailto:findbugs@cs.umd.edu">findbu gs@cs.umd.edu</a> 5511 <p> Send comments to <a class="sidebar" href="mailto:findbugs@cs.umd.edu">findbu gs@cs.umd.edu</a>
5322 <p> 5512 <p>
5323 <A href="http://sourceforge.net"><IMG src="http://sourceforge.net/sflogo.php?gro up_id=96405&amp;type=5" width="210" height="62" border="0" alt="SourceForge.net Logo" /></A> 5513 <a href="http://sourceforge.net/projects/findbugs/"><img src="http://sourceforge .net/sflogo.php?group_id=96405&amp;type=5" width="210" height="62" border="0" al t="FindBugs on SourceForge.net" /></a>
5324 </td></tr></table> 5514 </td></tr></table>
5325 </body></html> 5515 </body></html>
OLDNEW
« README.chromium ('K') | « doc/allBugDescriptions.html ('k') | doc/bugDescriptions_fr.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698