| 1 | <html> |
| 2 | <head> |
| 3 | <title>FindBugs™ 1.2 Demo and Results</title> |
| 4 | <link rel="stylesheet" type="text/css" href="findbugs.css" /> |
| 5 | @GOOGLE_ANALYTICS@ |
| 6 | </head> |
| 7 | |
| 8 | <body> |
| 9 | |
| 10 | <table width="100%"><tr> |
| 11 | |
| 12 | @HTML_SIDEBAR@ |
| 13 | |
| 14 | <td align="left" valign="top"> |
| 15 | <h1> |
| 16 | FindBugs 1.2 demo and results |
| 17 | </h1> |
| 18 | |
| 19 | <p>If you just want to try running FindBugs against your |
| 20 | own code, you can |
| 21 | <a href="http://findbugs.cs.umd.edu/demo/jnlp/findbugs.jnlp">run FindBugs</a> using Java Webstart. |
| 22 | This will use our new gui under Java 1.5+ and our old gui under Java 1.4. |
| 23 | The new gui provides a number of new features, but requires Java 1.5+. |
| 24 | Both use exactly the same analysis engine. |
| 25 | |
| 26 | </p><p>This web page provides results of running FindBugs 1.2.0 |
| 27 | against several open source applications. We provide a summary |
| 28 | of the number of bugs we found, as well as a generated HTML listing |
| 29 | of the bugs and |
| 30 | a <a href="http://java.sun.com/products/javawebstart/">Java |
| 31 | WebStart</a> demo of the new GUI we've introduced in FindBugs version 1.1, |
| 32 | displaying the warnings and the relevant source. |
| 33 | |
| 34 | |
| 35 | </p><p>The applications and versions of them we report on |
| 36 | are somewhat arbitrary. In some cases, they are release versions, |
| 37 | in other cases nightly builds. We find lots of bugs in every large code |
| 38 | base we examine; these applications are certainly not the worst we have seen. |
| 39 | I have been allowed to confidentially examine the results of running FindBugs |
| 40 | against several closed commercial code bases by well respected companies; |
| 41 | the results I've seen there are not significantly different from |
| 42 | what I've observed in open source code bases. |
| 43 | |
| 44 | |
| 45 | </p><p><em>Experimental details</em>: These results are from running |
| 46 | FindBugs 1.2.0 at standard effort level. Our results do not include |
| 47 | any low priority warnings or any warnings about vulnerabilities to |
| 48 | malicious code. Although we have (repeatedly) manually audited the results, |
| 49 | we haven't manually filtered out false positives from these warnings, |
| 50 | so that you can get a feeling for the quality of the warnings generated |
| 51 | by FindBugs. |
| 52 | </p><p>Some of the bugs contain audit comments: they are marked as to whether |
| 53 | we thought the warning indicated a bug that should or must be fixed, or whether it was not, in fact, a bug. |
| 54 | </p><p>In the webstart versions, we've only included the bugs for which |
| 55 | we were able to identify source files. The number of lines of non-commenting source |
| 56 | statements in the table below (KNCSS) is derived from the same files |
| 57 | that we analyzed and in which we report bugs; we actually compute |
| 58 | KNCSS from the classfiles, not the source files. |
| 59 | |
| 60 | </p><p><em>Vulnerability disclosure</em>: Thankfully, Java isn't C or C++. Dereferencing |
| 61 | a null pointer or accessing outside the bounds of an array generates a runtime |
| 62 | exception rather than a shell exploit. We do not believe that any of the |
| 63 | warnings here represents a security vulnerability, although we have not audited |
| 64 | them to verify that. These projects are all aware of the existence of |
| 65 | FindBugs, and FindBugs is already open source and available |
| 66 | for use both by developers and attackers, we don't believe that making |
| 67 | these results available constitutes a reckless disclosure. |
| 68 | |
| 69 | |
| 70 | </p><p><em>Recommendations</em>: First, review the correctness warnings. |
| 71 | We feel confident that developers |
| 72 | would want to fix most of the high and medium priority correctness warnings we report. |
| 73 | Once you've reviewed those, |
| 74 | you might want to look at some of the other categories. |
| 75 | </p><p> |
| 76 | In other categories, |
| 77 | such as Bad practice and Dodgy code, we accept more false positives. You |
| 78 | might decide that a pattern bug pattern isn't relevant for your code |
| 79 | base (e.g., you never use Serialization for persistent storage, |
| 80 | so you never care about the fact that you didn't define a serializationUID), |
| 81 | and even for the bug patterns relevant to your code base, |
| 82 | perhaps only a minority will reflect problems serious enough to |
| 83 | convince you to change your code. |
| 84 | |
| 85 | </p><p><em>Please be patient</em> The Web start versions not only have to download the applications, |
| 86 | they need to download about 10 megabytes of data and source files. Please |
| 87 | be patient. Sorry we don't have a progress bar for the data and source download; |
| 88 | the ability to remotely download a data and source archive is a little bit of |
| 89 | a hack. We've provided small versions of some of the data sets that include |
| 90 | only the correctness bugs and the source files containing those warnings. The small |
| 91 | datasets are about a quarter of the sizes of the full datasets. |
| 92 | </p> |
| 93 | <p> |
| 94 | </p><table border="2"> |
| 95 | <tr><th rowspan="2">Application</th><th colspan="2">Details</th><th colspan="2">Correctness bugs</th><th rowspan="2">Bad Practice</th><th rowspan="2">Dodgy</th><th rowspan="2">KNCSS |
| 96 | </th></tr><tr><th>HTML</th><th>WebStart</th><th>NP bugs</th><th>Other |
| 97 | </th></tr><tr><td align="right">Sun JDK 1.7.0-b12</td><td align="right"> |
| 98 | <a href="http://findbugs.cs.umd.edu/demo/jdk7/index.html">All</a> |
| 99 | </td><td align="right"> |
| 100 | <a href="http://findbugs.cs.umd.edu/demo/jdk7/index.jnlp">All</a> |
| 101 | <a href="http://findbugs.cs.umd.edu/demo/jdk7/small.jnlp">Small</a> |
| 102 | </td><td align="right">68</td><td align="right">180</td><td align="right">954</td><td align="right">654</td><td align="right">597 |
| 103 | |
| 104 | </td></tr><tr><td align="right">eclipse-SDK-3.3M7-solaris-gtk</td><td align="right"> |
| 105 | <a href="http://findbugs.cs.umd.edu/demo/eclipse/index.html">All</a> |
| 106 | </td><td align="right"> |
| 107 | <a href="http://findbugs.cs.umd.edu/demo/eclipse/index.jnlp">All</a> |
| 108 | <a href="http://findbugs.cs.umd.edu/demo/eclipse/small.jnlp">Small</a> |
| 109 | </td><td align="right">146</td><td align="right">259</td><td align="right">1,079</td><td align="right">643</td><td align="right">1,447 |
| 110 | |
| 111 | </td></tr><tr><td align="right">netbeans-6_0-m8</td><td align="right"> |
| 112 | <a href="http://findbugs.cs.umd.edu/demo/netbeans/index.html">All</a> |
| 113 | </td><td align="right"> |
| 114 | <a href="http://findbugs.cs.umd.edu/demo/netbeans/index.jnlp">All</a> |
| 115 | <a href="http://findbugs.cs.umd.edu/demo/netbeans/small.jnlp">Small</a> |
| 116 | </td><td align="right">189</td><td align="right">305</td><td align="right">3,010</td><td align="right">1,112</td><td align="right">1,022 |
| 117 | |
| 118 | </td></tr><tr><td align="right">glassfish-v2-b43</td><td align="right"> |
| 119 | <a href="http://findbugs.cs.umd.edu/demo/glassfish/index.html">All</a> |
| 120 | </td><td align="right"> |
| 121 | <a href="http://findbugs.cs.umd.edu/demo/glassfish/index.jnlp">All</a> |
| 122 | <a href="http://findbugs.cs.umd.edu/demo/glassfish/small.jnlp">Small</a> |
| 123 | </td><td align="right">146</td><td align="right">154</td><td align="right">964</td><td align="right">1,222</td><td align="right">2,176 |
| 124 | |
| 125 | </td></tr><tr><td align="right">jboss-4.0.5</td><td align="right"> |
| 126 | <a href="http://findbugs.cs.umd.edu/demo/jboss/index.html">All</a> |
| 127 | </td><td align="right"> |
| 128 | <a href="http://findbugs.cs.umd.edu/demo/jboss/index.jnlp">All</a> |
| 129 | <a href="http://findbugs.cs.umd.edu/demo/jboss/small.jnlp">Small</a> |
| 130 | </td><td align="right">30</td><td align="right">57</td><td align="right">263</td><td align="right">214</td><td align="right">178 |
| 131 | |
| 132 | </td></tr></table> |
| 133 | <p><em>KNCSS</em> - Thousands of lines of non-commenting source statements |
| 134 | |
| 135 | </p><h2>Bug categories</h2> |
| 136 | <dl> |
| 137 | <dt>Correctness bug |
| 138 | </dt><dd>Probable bug - an apparent coding mistake |
| 139 | resulting in code that was probably not what the |
| 140 | developer intended. We strive for a low false positive rate. |
| 141 | </dd><dt>Bad Practice |
| 142 | </dt><dd> |
| 143 | Violations of recommended and essential |
| 144 | coding practice. Examples include hash code and equals |
| 145 | problems, cloneable idiom, dropped exceptions, |
| 146 | serializable problems, and misuse of finalize. |
| 147 | We strive to make this analysis accurate, |
| 148 | although some groups may |
| 149 | not care about some of the bad practices. |
| 150 | </dd><dt>Dodgy |
| 151 | </dt><dd> |
| 152 | Code that is confusing, anomalous, or |
| 153 | written in a way that leads itself to errors. |
| 154 | Examples include dead local stores, switch fall through, |
| 155 | unconfirmed casts, and redundant null check of value |
| 156 | known to be null. |
| 157 | More false positives accepted. |
| 158 | In previous versions of FindBugs, this category was known as Style. |
| 159 | </dl> |
| 160 | |
| 161 | @HTML_FOOTER@</td></tr></table> |
| 162 | |
| 163 | </body> |
| 164 | </html> |
| 165 | |
| 166 | |
| 167 | |
| 168 |