1 <?xml version="1.0" encoding="UTF-8"?> 2 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://findbugs.googlecode.com/svn/trunk/findbugs/etc/docbook/docbookx.dtd" 3 [ 4 <!ENTITY FindBugs "<application>FindBugs</application>"> 5 <!ENTITY Ant "<application>Ant</application>"> 6 <!ENTITY Saxon "<application>Saxon</application>"> 7 <!ENTITY FBHome "<replaceable>$FINDBUGS_HOME</replaceable>"> 8 <!ENTITY FBHomeWin "<replaceable>%FINDBUGS_HOME%</replaceable>"> 9 <!ENTITY nbsp " "> 10 ]> 11 <book lang="ja" id="findbugs-manual"> 12 13 <bookinfo> 14 <title>&FindBugs;™ </title> 15 16 <authorgroup> 17 <author> 18 <firstname>David</firstname> 19 <othername>H.</othername> 20 <surname>Hovemeyer</surname> 21 </author> 22 <author> 23 <firstname>William</firstname> 24 <othername>W.</othername> 25 <surname>Pugh</surname> 26 </author> 27 </authorgroup> 28 29 <copyright> 30 <year>2003</year> 31 <year>2004</year> 32 <year>2005</year> 33 <year>2006</year> 34 <year>2008</year> 35 <holder>University of Maryland</holder> 36 </copyright> 37 38 <legalnotice> 39 <para>-- <ulink url="http://creativecommons.org/licenses/by-nc-sa/1.0/deed.ja">http://creativecommons.org/licenses/by-nc-sa/1.0/</ulink> (559 Nathan Abbott Way, Stanford, California 94305, USA)</para> 40 <para>FindBugs FindBugs </para> 41 </legalnotice> 42 43 <edition>2.0.3</edition> 44 45 <pubdate>17:16:15 EST, 22 November, 2013</pubdate> 46 47 </bookinfo> 48 49 <!-- 50 ************************************************************************** 51 Introduction 52 ************************************************************************** 53 --> 54 55 <chapter id="introduction"> 56 <title></title> 57 58 <para>&FindBugs;™ Java </para> 59 60 <para>&FindBugs; 2.0.3 &FindBugs; <ulink url="http://findbugs.sourceforge.net">&FindBugs; Web </ulink> &FindBugs; &FindBugs; </para> 61 62 <sect1> 63 <title></title> 64 <para>&FindBugs; <ulink url="http://java.sun.com/j2se">Java 2 Standard Edition</ulink>, 1.5 &FindBugs; GNU/Linux Windows MacOS X </para> 65 66 <para>&FindBugs; 512 MB </para> 67 </sect1> 68 69 </chapter> 70 71 <!-- 72 ************************************************************************** 73 Installing FindBugs 74 ************************************************************************** 75 --> 76 77 <chapter id="installing"> 78 <title>&FindBugs;™ </title> 79 80 <para> &FindBugs; </para> 81 82 <sect1> 83 <title></title> 84 85 <para>&FindBugs; <ulink url="http://prdownloads.sourceforge.net/findbugs/findbugs-2.0.3.tar.gz?download">gzipped tar </ulink> <ulink url="http://prdownloads.sourceforge.net/findbugs/findbugs-2.0.3.zip?download">zip </ulink> </para> 86 87 <para>gzipped tar :<screen> 88 <prompt>$ </prompt><command>gunzip -c findbugs-2.0.3.tar.gz | tar xvf -</command> 89 </screen> 90 </para> 91 92 <para>zip :<screen> 93 <prompt>C:\Software></prompt><command>unzip findbugs-2.0.3.zip</command> 94 </screen> 95 </para> 96 97 <para> <filename class="directory">findbugs-2.0.3</filename> <filename class="directory">C:\Software</filename> <filename class="directory">C:\Software\findbugs-2.0.3</filename> &FindBugs; &FindBugs; &FBHome; (Windows &FBHomeWin;) </para> 98 </sect1> 99 100 </chapter> 101 102 <!-- 103 ************************************************************************** 104 Compiling FindBugs from Source 105 ************************************************************************** 106 --> 107 108 <chapter id="building"> 109 <title>&FindBugs;™ </title> 110 111 <para> &FindBugs; &FindBugs; <link linkend="running"></link> </para> 112 113 <sect1> 114 <title></title> 115 116 <para> &FindBugs; <itemizedlist> 117 <listitem> 118 <para><ulink url="http://prdownloads.sourceforge.net/findbugs/findbugs-2.0.3-source.zip?download">&FindBugs; </ulink> 119 </para> 120 </listitem> 121 <listitem> 122 <para> 123 <ulink url="http://java.sun.com/j2se/">JDK 1.5.0 </ulink> 124 </para> 125 </listitem> 126 <listitem> 127 <para> 128 <ulink url="http://ant.apache.org/">Apache &Ant;</ulink>, 1.6.3 </para> 129 </listitem> 130 </itemizedlist> 131 </para> 132 133 <warning> 134 <para>Redhat Linux <filename>/usr/bin/ant</filename> &Ant; &FindBugs; <emphasis></emphasis><ulink url="http://ant.apache.org/">&Ant; web </ulink>&Ant; <replaceable>JAVA_HOME</replaceable> JDK 1.5 ()</para> 135 </warning> 136 137 <para> &FindBugs; :<itemizedlist> 138 <listitem> 139 <para><ulink url="http://docbook.sourceforge.net/projects/xsl/index.html">DocBook XSL </ulink>&FindBugs; HTML </para> 140 </listitem> 141 <listitem> 142 <para><ulink url="http://saxon.sourceforge.net/">&Saxon; XSLT </ulink>( &FindBugs; HTML )</para> 143 </listitem> 144 <!-- 145 <listitem> 146 <para> 147 </para> 148 </listitem> 149 --> 150 </itemizedlist> 151 </para> 152 153 </sect1> 154 155 <sect1> 156 <title></title> 157 <para>:<screen> 158 <prompt>$ </prompt><command>unzip findbugs-2.0.3-source.zip</command> 159 </screen> 160 161 </para> 162 </sect1> 163 164 <sect1> 165 <title><filename>local.properties</filename> </title> 166 <para>FindBugs <filename>local.properties</filename> &FindBugs; <ulink url="http://ant.apache.org/">&Ant;</ulink> <filename>build.xml</filename> FindBugs </para> 167 168 <para><filename>local.properties</filename> <filename>build.properties</filename> <filename>build.properties</filename> :<programlisting> 169 <![CDATA[ 170 # User Configuration: 171 # This section must be modified to reflect your system. 172 173 local.software.home =/export/home/daveho/linux 174 175 # Set this to the directory containing the DocBook Modular XSL Stylesheets 176 # from http://docbook.sourceforge.net/projects/xsl/ 177 178 xsl.stylesheet.home =${local.software.home}/docbook/docbook-xsl-1.71.1 179 180 # Set this to the directory where Saxon (http://saxon.sourceforge.net/) 181 # is installed. 182 183 saxon.home =${local.software.home}/java/saxon-6.5.5 184 ]]> 185 </programlisting> 186 </para> 187 188 <para><varname>xsl.stylesheet.home</varname> <ulink url="http://docbook.sourceforge.net/projects/xsl/">DocBook Modular XSL </ulink>&FindBugs; </para> 189 190 <para><varname>saxon.home</varname> <ulink url="http://saxon.sourceforge.net/">&Saxon; XSLT </ulink>&FindBugs; </para> 191 192 </sect1> 193 194 <sect1> 195 <title>&Ant; </title> 196 197 <para> &Ant; <filename>build.properties</filename>(<filename>local.properties</filename>) () (&Saxon; ) &FindBugs; &Ant; <screen> 198 <prompt>$ </prompt><command>ant <replaceable>target</replaceable></command> 199 </screen><replaceable>target</replaceable> : <variablelist> <varlistentry> <term><command>build</command></term> 200 <listitem> 201 <para> &FindBugs; </para> 202 </listitem> 203 </varlistentry> 204 205 <varlistentry> 206 <term><command>docs</command></term> 207 <listitem> 208 <para>()</para> 209 </listitem> 210 </varlistentry> 211 212 <varlistentry> 213 <term><command>runjunit</command></term> 214 <listitem> 215 <para> &FindBugs; JUnit </para> 216 </listitem> 217 </varlistentry> 218 219 <varlistentry> 220 <term><command>bindist</command></term> 221 <listitem> 222 <para>&FindBugs; <filename>.zip</filename> <filename>.tar.gz</filename> </para> 223 </listitem> 224 </varlistentry> 225 </variablelist> 226 </para> 227 228 <para>&Ant; ( &Ant; ):<screen> 229 <computeroutput> 230 BUILD SUCCESSFUL 231 Total time: 17 seconds 232 </computeroutput> 233 </screen> 234 </para> 235 236 </sect1> 237 238 <sect1> 239 <title> &FindBugs;™ </title> 240 <para><command>build</command> &FindBugs; &Ant; <xref linkend="running"/> &FindBugs; </para> 241 </sect1> 242 243 </chapter> 244 245 246 <!-- 247 ************************************************************************** 248 Running FindBugs 249 ************************************************************************** 250 --> 251 252 <chapter id="running"> 253 <title>&FindBugs;™ </title> 254 255 <para>&FindBugs; 2 (GUI) </para> 256 257 <warning> 258 <para></para> 259 </warning> 260 261 <!-- 262 <sect1> 263 <title>Executing the &FindBugs;™ GUI</title> 264 </sect1> 265 --> 266 267 <sect1> 268 <title></title> 269 <para>Windows &FindBugs; <filename>&FBHomeWin;\lib\findbugs.jar</filename> &FindBugs; GUI </para> 270 271 <para>Unix Linux Mac OS X <filename>&FBHome;/bin/findbugs</filename> <screen> 272 <command>java -jar &FBHome;/lib/findbugs.jar</command></screen> &FindBugs; GUI </para> 273 274 <para>GUI <xref linkend="gui"/> </para> 275 </sect1> 276 277 <sect1> 278 279 <title>&FindBugs; </title> 280 281 <para> &FindBugs; &FindBugs; 2</para> 282 283 284 <sect2 id="directInvocation"> 285 <title>&FindBugs; </title> 286 287 <para> &FindBugs; <filename>&FBHome;/lib/findbugs.jar</filename> JVM (<command>java</command>) <command>-jar</command> (&FindBugs; 1.3.5 )</para> 288 289 <para>&FindBugs; <screen> 290 <command>java <replaceable>[JVM ]</replaceable> -jar &FBHome;/lib/findbugs.jar <replaceable></replaceable></command> 291 </screen> 292 </para> 293 294 <!-- 295 <para> 296 By default, executing <filename>findbugs.jar</filename> runs the 297 &FindBugs; graphical user interface (GUI). On windows systems, 298 you can double-click on <filename>findbugs.jar</filename> to launch 299 the GUI. From a command line, the command 300 <screen> 301 java -jar <replaceable>&FBHome;</replaceable>/lib/findbugs.jar</screen> 302 will launch the GUI. 303 </para> 304 --> 305 306 <sect3 id="chooseUI"> 307 <title> </title> 308 309 <para>1 &FindBugs; :</para> 310 <itemizedlist> 311 <listitem> 312 <para> 313 <command>-gui</command>: (GUI) </para> 314 </listitem> 315 316 <listitem> 317 <para> 318 <command>-textui</command>: </para> 319 </listitem> 320 321 <listitem> 322 <para> 323 <command>-version</command>: &FindBugs; </para> 324 </listitem> 325 326 <listitem> 327 <para> 328 <command>-help</command>: &FindBugs; </para> 329 </listitem> 330 331 <listitem> 332 <para> 333 <command>-gui1</command>: &FindBugs; ()</para> 334 </listitem> 335 </itemizedlist> 336 337 </sect3> 338 339 <sect3 id="jvmArgs"> 340 <title>Java (JVM) </title> 341 342 <para>&FindBugs; Java </para> 343 344 <variablelist> 345 <varlistentry> 346 <term><command>-Xmx<replaceable>NN</replaceable>m</command></term> 347 <listitem> 348 <para>Java <replaceable>NN</replaceable> &FindBugs; 1500 </para> 349 </listitem> 350 </varlistentry> 351 352 <varlistentry> 353 <term><command>-D<replaceable>name</replaceable>=<replaceable>value</replaceable></command></term> 354 <listitem> 355 <para>Java <command>-Duser.language=ja</command> GUI </para> 356 </listitem> 357 </varlistentry> 358 359 <!-- 360 <varlistentry> 361 <term></term> 362 <listitem> 363 <para> 364 </para> 365 </listitem> 366 </varlistentry> 367 --> 368 </variablelist> 369 </sect3> 370 371 </sect2> 372 373 <sect2 id="wrapperScript"> 374 <title> &FindBugs; </title> 375 376 <para>&FindBugs; </para> 377 378 <para>Unix :<screen> 379 <prompt>$ </prompt><command>&FBHome;/bin/findbugs <replaceable></replaceable></command> 380 </screen> 381 </para> 382 383 <para>Windows <screen> 384 <prompt>C:\My Directory></prompt><command>&FBHomeWin;\bin\findbugs.bat <replaceable></replaceable></command> 385 </screen> 386 </para> 387 388 <para>Unix Windows <filename><replaceable>$FINDBUGS_HOME</replaceable>/bin</filename> <filename>PATH</filename> <command>findbugs</command> FindBugs </para> 389 390 <sect3 id="wrapperOptions"> 391 <title></title> 392 <para>&FindBugs; &FindBugs; <emphasis></emphasis></para> 393 <variablelist> 394 <varlistentry> 395 <term><command>-jvmArgs <replaceable></replaceable></command></term> 396 <listitem> 397 <para>JVM JVM :<screen> 398 <prompt>$ </prompt><command>findbugs -textui -jvmArgs "-Duser.language=ja" <replaceable>myApp.jar</replaceable></command> 399 </screen> 400 </para> 401 </listitem> 402 </varlistentry> 403 404 <varlistentry> 405 <term><command>-javahome <replaceable></replaceable></command></term> 406 <listitem> 407 <para>&FindBugs; JRE (Java ) </para> 408 </listitem> 409 </varlistentry> 410 411 <varlistentry> 412 <term><command>-maxHeap <replaceable></replaceable></command></term> 413 <listitem> 414 <para>Java 256 </para> 415 </listitem> 416 </varlistentry> 417 418 <varlistentry> 419 <term><command>-debug</command></term> 420 <listitem> 421 <para></para> 422 </listitem> 423 </varlistentry> 424 425 <varlistentry> 426 <term><command>-property</command> <replaceable>name=value</replaceable></term> 427 <listitem> 428 <para> &FindBugs; <xref linkend="analysisprops"/> : Windows <replaceable>name=value</replaceable> </para> 429 </listitem> 430 </varlistentry> 431 432 </variablelist> 433 434 </sect3> 435 436 </sect2> 437 438 </sect1> 439 440 <sect1 id="commandLineOptions"> 441 <title></title> 442 443 <!-- 444 <para> 445 446 There are two ways to invoke &FindBugs;. The first invokes the the Graphical User Interface (GUI): 447 448 <screen> 449 <prompt>$ </prompt><command>findbugs <replaceable>[standard options]</replaceable> <replaceable>[GUI options]</replaceable></command> 450 </screen> 451 452 The second invokes the Command Line Interface (Text UI): 453 454 <screen> 455 <prompt>$ </prompt><command>findbugs -textui <replaceable>[standard options]</replaceable> <replaceable>[Text UI options]</replaceable></command> 456 </screen> 457 </para> 458 --> 459 460 <para> &FindBugs; &FindBugs; </para> 461 462 <sect2> 463 <title></title> 464 465 <para> GUI </para> 466 467 <variablelist> 468 469 <varlistentry> 470 <term><command>-effort:min</command></term> 471 <listitem> 472 <para>&FindBugs; </para> 473 </listitem> 474 </varlistentry> 475 476 477 <varlistentry> 478 <term><command>-effort:max</command></term> 479 <listitem> 480 <para></para> 481 </listitem> 482 </varlistentry> 483 484 <varlistentry> 485 <term><command>-project</command> <replaceable>project</replaceable></term> 486 <listitem> 487 <para> GUI <filename>.fb</filename> <filename>.fbp</filename> </para> 488 </listitem> 489 </varlistentry> 490 491 <!-- 492 <varlistentry> 493 <term><command></command></term> 494 <listitem> 495 <para> 496 497 </para> 498 </listitem> 499 </varlistentry> 500 --> 501 502 </variablelist> 503 504 </sect2> 505 506 <sect2> 507 <title>GUI </title> 508 509 <para><variablelist> <varlistentry> <term><command>-look:</command><replaceable>plastic|gtk|native</replaceable></term> 510 <listitem> 511 <para>Swing </para> 512 </listitem> 513 </varlistentry> 514 515 </variablelist> 516 </para> 517 </sect2> 518 519 <sect2> 520 <title></title> 521 522 <para></para> 523 524 <variablelist> 525 <varlistentry> 526 <term><command>-sortByClass</command></term> 527 <listitem> 528 <para></para> 529 </listitem> 530 </varlistentry> 531 532 <varlistentry> 533 <term><command>-include</command> <replaceable>filterFile.xml</replaceable></term> 534 <listitem> 535 <para><replaceable>filterFile.xml</replaceable> <xref linkend="filter"/> </para> 536 </listitem> 537 </varlistentry> 538 539 <varlistentry> 540 <term><command>-exclude</command> <replaceable>filterFile.xml</replaceable></term> 541 <listitem> 542 <para><replaceable>filterFile.xml</replaceable> <xref linkend="filter"/> </para> 543 </listitem> 544 </varlistentry> 545 546 <varlistentry> 547 <term><command>-onlyAnalyze</command> <replaceable>com.foobar.MyClass,com.foobar.mypkg.*</replaceable></term> 548 <listitem> 549 <para>() Java <literal>import</literal> ( <literal>.*</literal> )<literal>.*</literal> <literal>.-</literal> </para> 550 </listitem> 551 </varlistentry> 552 553 <varlistentry> 554 <term><command>-low</command></term> 555 <listitem> 556 <para></para> 557 </listitem> 558 </varlistentry> 559 560 <varlistentry> 561 <term><command>-medium</command></term> 562 <listitem> 563 <para> () () </para> 564 </listitem> 565 </varlistentry> 566 567 <varlistentry> 568 <term><command>-high</command></term> 569 <listitem> 570 <para> () </para> 571 </listitem> 572 </varlistentry> 573 574 <varlistentry> 575 <term><command>-relaxed</command></term> 576 <listitem> 577 <para> </para> 578 </listitem> 579 </varlistentry> 580 581 <varlistentry> 582 <term><command>-xml</command></term> 583 <listitem> 584 <para> XML XML GUI <command>-xml:withMessages</command> XML XML </para> 585 </listitem> 586 </varlistentry> 587 588 <varlistentry> 589 <term><command>-html</command></term> 590 <listitem> 591 <para>HTML &FindBugs; <filename>default.xsl</filename> <ulink url="http://www.w3.org/TR/xslt">XSLT</ulink> HTML : <filename>findbugs.jar</filename> &FindBugs; <command>-html:plain.xsl</command> <command>-html:fancy.xsl</command> <command>-html:fancy-hist.xsl</command> <filename>plain.xsl</filename> Javascript DOM Web <filename>fancy.xsl</filename> DOM Javascript CSS <command>fancy-hist.xsl</command> <command>fancy.xsl</command> DOM Javascript </para> 592 593 <para> XSLT HTML <command>-html:<replaceable>myStylesheet.xsl</replaceable></command> <replaceable>myStylesheet.xsl</replaceable> </para> 594 </listitem> 595 </varlistentry> 596 597 <varlistentry> 598 <term><command>-emacs</command></term> 599 <listitem> 600 <para> Emacs </para> 601 </listitem> 602 </varlistentry> 603 604 <varlistentry> 605 <term><command>-xdocs</command></term> 606 <listitem> 607 <para> xdoc XML Apache Maven</para> 608 </listitem> 609 </varlistentry> 610 611 <varlistentry> 612 <term><command>-output</command> <replaceable></replaceable></term> 613 <listitem> 614 <para></para> 615 </listitem> 616 </varlistentry> 617 618 <varlistentry> 619 <term><command>-outputFile</command> <replaceable></replaceable></term> 620 <listitem> 621 <para> <command>-output</command> </para> 622 </listitem> 623 </varlistentry> 624 625 <varlistentry> 626 <term><command>-nested</command><replaceable>[:true|false]</replaceable></term> 627 <listitem> 628 <para> jar zip jar zip jar zip <command>-nested:false</command> </para> 629 </listitem> 630 </varlistentry> 631 632 <varlistentry> 633 <term><command>-auxclasspath</command> <replaceable></replaceable></term> 634 <listitem> 635 <para>jar</para> 636 </listitem> 637 </varlistentry> 638 639 <!-- 640 <varlistentry> 641 <term><command></command> <replaceable></replaceable></term> 642 <listitem> 643 <para> 644 </para> 645 </listitem> 646 </varlistentry> 647 --> 648 649 </variablelist> 650 651 </sect2> 652 </sect1> 653 654 655 </chapter> 656 657 <chapter id="gui"> 658 <title>&FindBugs; GUI </title> 659 660 <para>&FindBugs; (GUI) </para> 661 662 <sect1> 663 <title></title> 664 <para><command>findbugs</command> &FindBugs; <menuchoice><guimenu>File</guimenu><guimenuitem>New Project</guimenuitem></menuchoice> :<mediaobject> 665 <imageobject> 666 <imagedata fileref="project-dialog.png"/> 667 </imageobject> 668 </mediaobject> 669 </para> 670 671 <para>Class archives and directories to analyze Add java Java (zip, jar, ear, or war file) /</para> 672 673 <para> Java &FindBugs; Java <varname>org.foobar.myapp</varname> <filename class="directory">org</filename> </para> 674 675 <para> Jar Auxiliary classpath locations// &FindBugs; &FindBugs; </para> 676 677 </sect1> 678 679 <sect1> 680 <title></title> 681 <para>Finish Jar ()</para> 682 </sect1> 683 684 <sect1> 685 <title></title> 686 687 <para> :<mediaobject> 688 <imageobject> 689 <imagedata fileref="example-details.png"/> 690 </imageobject> 691 </mediaobject> 692 </para> 693 694 <para></para> 695 696 <para>Details</para> 697 698 <para></para> 699 700 </sect1> 701 702 <sect1> 703 <title></title> 704 705 <para> <menuchoice><guimenu>File</guimenu><guimenuitem>Save as...</guimenuitem></menuchoice> Save as...FindBugs analysis results (.xml) jar jar (FindBugs project file (.fbp)) (FindBugs analysis file (.fba)) <menuchoice><guimenu>File</guimenu><guimenuitem>Open...</guimenuitem></menuchoice> </para> 706 707 </sect1> 708 709 <!-- 710 <sect1 id="textui"> 711 <title>Using the &FindBugs;™ Command Line Interface</title> 712 713 <para> 714 The &FindBugs; Command Line Interface (or Text UI) can be used to 715 analyze an application for bugs non-interactively. Each bug instance will be 716 reported on a single line. All output is written to the standard output file descriptor. 717 <xref linkend="filter" /> explains how bug reports may be filtered in order 718 to get only the output you're interested in. 719 </para> 720 721 <para> 722 See <xref linkend="commandLineOptions" /> for a description of how to invoke the 723 Command Line Interface. 724 </para> 725 </sect1> 726 --> 727 728 </chapter> 729 730 <!-- 731 ************************************************************************** 732 Using the FindBugs Ant task 733 ************************************************************************** 734 --> 735 736 <chapter id="anttask"> 737 <title>&FindBugs;™ &Ant; </title> 738 739 <para> &FindBugs; <ulink url="http://ant.apache.org/">&Ant;</ulink> <ulink url="http://ant.apache.org/">&Ant;</ulink> Java &FindBugs; &Ant; &FindBugs; Java </para> 740 741 <para> &Ant; Mike Fagan </para> 742 743 <sect1> 744 <title>&Ant; </title> 745 746 <para>&Ant; <filename>&FBHome;/lib/findbugs-ant.jar</filename> &Ant; <filename>lib</filename> <note> 747 <para> &Ant; &FindBugs; &FindBugs; &Ant; Jar </para> 748 </note> 749 </para> 750 751 </sect1> 752 753 <sect1> 754 <title>build.xml </title> 755 756 <para>&FindBugs; <filename>build.xml</filename> (&Ant; ) :<screen> 757 <taskdef name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask"/> 758 </screen> <literal>findbugs</literal> <filename>build.xml</filename> </para> 759 760 <para><literal>findbugs</literal> Apache <ulink url="http://jakarta.apache.org/bcel/">BCEL</ulink> <filename>build.xml</filename> <screen> 761 <property name="findbugs.home" value="/export/home/daveho/work/findbugs" /> 762 763 <target name="findbugs" depends="jar"> 764 <findbugs home="${findbugs.home}" 765 output="xml" 766 outputFile="bcel-fb.xml" > 767 <auxClasspath path="${basedir}/lib/Regex.jar" /> 768 <sourcePath path="${basedir}/src/java" /> 769 <class location="${basedir}/bin/bcel.jar" /> 770 </findbugs> 771 </target> 772 </screen><literal>findbugs</literal> <literal>home</literal> &FindBugs; &FBHome; <xref linkend="installing"/> </para> 773 774 <para> <filename>bcel.jar</filename> &FindBugs; Jar BCEL (jar (depends) &FindBugs; ) &FindBugs; XML <filename>bcel-fb.xml</filename> Jar <filename>Regex.jar</filename> aux classpath Jar BCEL source path BCEL </para> 775 </sect1> 776 777 <sect1> 778 <title></title> 779 780 <para> &Ant; <literal>findbugs</literal> <screen> 781 <prompt>[daveho@noir]$</prompt> <command>ant findbugs</command> 782 Buildfile: build.xml 783 784 init: 785 786 compile: 787 788 examples: 789 790 jar: 791 792 findbugs: 793 [findbugs] Running FindBugs... 794 [findbugs] Bugs were found 795 [findbugs] Output saved to bcel-fb.xml 796 797 BUILD SUCCESSFUL 798 Total time: 35 seconds 799 </screen>XML &FindBugs; GUI <xref linkend="running"/> </para> 800 801 </sect1> 802 803 <sect1> 804 <title></title> 805 806 <para> &FindBugs; <variablelist> <varlistentry> <term><literal>class</literal></term> 807 <listitem> 808 <para><literal>class</literal> <literal>location</literal> (jar, zip, )1 <literal>findbugs</literal> <literal>class</literal> </para> 809 </listitem> 810 </varlistentry> 811 812 <varlistentry> 813 <term><literal>auxClasspath</literal></term> 814 <listitem> 815 <para> (Jar ) &Ant; Java <literal>classpath</literal> </para> 816 </listitem> 817 </varlistentry> 818 819 <varlistentry> 820 <term><literal>sourcePath</literal></term> 821 <listitem> 822 <para> Java XML GUI </para> 823 </listitem> 824 </varlistentry> 825 826 <varlistentry> 827 <term><literal>home</literal></term> 828 <listitem> 829 <para>&FindBugs; </para> 830 </listitem> 831 </varlistentry> 832 833 <varlistentry> 834 <term><literal>quietErrors</literal></term> 835 <listitem> 836 <para>true &FindBugs; false </para> 837 </listitem> 838 </varlistentry> 839 840 <varlistentry> 841 <term><literal>reportLevel</literal></term> 842 <listitem> 843 <para>lowmedium () () ()high () </para> 844 </listitem> 845 </varlistentry> 846 847 <varlistentry> 848 <term><literal>output</literal></term> 849 <listitem> 850 <para>xml () XML xml:withMessages XML (XSL ) html HTML ( default.xsl) textemacs <ulink url="http://www.gnu.org/software/emacs/">Emacs</ulink> xdocs Apache Maven xdoc XML </para> 851 </listitem> 852 </varlistentry> 853 <varlistentry> 854 <term><literal>stylesheet</literal></term> 855 <listitem> 856 <para>output html HTML FindBugs default.xsl fancy.xsl fancy-hist.xsl plain.xsl summary.xsl default.xsl </para> 857 </listitem> 858 </varlistentry> 859 860 <varlistentry> 861 <term><literal>sort</literal></term> 862 <listitem> 863 <para><literal>output</literal> text <literal>sort</literal> true </para> 864 </listitem> 865 </varlistentry> 866 867 <varlistentry> 868 <term><literal>outputFile</literal></term> 869 <listitem> 870 <para>&FindBugs; &Ant; </para> 871 </listitem> 872 </varlistentry> 873 874 <varlistentry> 875 <term><literal>debug</literal></term> 876 <listitem> 877 <para>true &FindBugs; false </para> 878 </listitem> 879 </varlistentry> 880 881 <varlistentry> 882 <term><literal>effort</literal></term> 883 <listitem> 884 <para><literal>min</literal> <literal>default</literal> <literal>max</literal> <xref linkend="commandLineOptions"/> </para> 885 </listitem> 886 </varlistentry> 887 888 <varlistentry> 889 <term><literal>conserveSpace</literal></term> 890 <listitem> 891 <para>effort="min" </para> 892 </listitem> 893 </varlistentry> 894 895 <varlistentry> 896 <term><literal>workHard</literal></term> 897 <listitem> 898 <para>effort="max" </para> 899 </listitem> 900 </varlistentry> 901 902 <varlistentry> 903 <term><literal>visitors</literal></term> 904 <listitem> 905 <para></para> 906 </listitem> 907 </varlistentry> 908 909 <varlistentry> 910 <term><literal>omitVisitors</literal></term> 911 <listitem> 912 <para><literal>visitors</literal> <emphasis></emphasis> </para> 913 </listitem> 914 </varlistentry> 915 916 <varlistentry> 917 <term><literal>excludeFilter</literal></term> 918 <listitem> 919 <para><xref linkend="filter"/> </para> 920 </listitem> 921 </varlistentry> 922 923 <varlistentry> 924 <term><literal>includeFilter</literal></term> 925 <listitem> 926 <para><xref linkend="filter"/> </para> 927 </listitem> 928 </varlistentry> 929 930 <varlistentry> 931 <term><literal>projectFile</literal></term> 932 <listitem> 933 <para> &FindBugs; GUI <literal>class</literal> <literal>auxClasspath</literal> <literal>sourcePath</literal> <xref linkend="running"/> </para> 934 </listitem> 935 </varlistentry> 936 937 <varlistentry> 938 <term><literal>jvmargs</literal></term> 939 <listitem> 940 <para>&FindBugs; Java JVM </para> 941 </listitem> 942 </varlistentry> 943 944 <varlistentry> 945 <term><literal>systemProperty</literal></term> 946 <listitem> 947 <para>Java <literal>name</literal> <literal>value</literal> </para> 948 </listitem> 949 </varlistentry> 950 951 <varlistentry> 952 <term><literal>timeout</literal></term> 953 <listitem> 954 <para>&FindBugs; Java 600,000 (10 ) &FindBugs; 10 </para> 955 </listitem> 956 </varlistentry> 957 958 <varlistentry> 959 <term><literal>failOnError</literal></term> 960 <listitem> 961 <para>&FindBugs; false</para> 962 </listitem> 963 </varlistentry> 964 965 <varlistentry> 966 <term><literal>errorProperty</literal></term> 967 <listitem> 968 <para>&FindBugs; true</para> 969 </listitem> 970 </varlistentry> 971 972 <varlistentry> 973 <term><literal>warningsProperty</literal></term> 974 <listitem> 975 <para>&FindBugs; 1 true</para> 976 </listitem> 977 </varlistentry> 978 979 </variablelist> 980 981 982 </para> 983 984 <!-- 985 986 --> 987 988 </sect1> 989 990 </chapter> 991 992 <!-- 993 ************************************************************************** 994 Using the FindBugs Eclipse plugin 995 ************************************************************************** 996 --> 997 998 <chapter id="eclipse"> 999 <title>&FindBugs;™ Eclipse </title> 1000 1001 <para>FindBugs Eclipse &FindBugs; <ulink url="http://www.eclipse.org/">Eclipse</ulink> IDE FindBugs Eclipse Peter Friese Phil Crosby Andrei Loskutov </para> 1002 1003 <sect1> 1004 <title></title> 1005 1006 <para>&FindBugs; Eclipse Plugin Eclipse 3.3 JRE/JDK 1.5 </para> 1007 1008 </sect1> 1009 1010 <sect1> 1011 <title></title> 1012 1013 <para> FindBugs Eclipse 3 </para> 1014 1015 <variablelist><title>FindBugs Eclipse </title> 1016 <varlistentry><term><ulink url="http://findbugs.cs.umd.edu/eclipse/">http://findbugs.cs.umd.edu/eclipse/</ulink></term> 1017 1018 <listitem> 1019 <para>FindBugs </para> 1020 </listitem> 1021 </varlistentry> 1022 1023 <varlistentry><term><ulink url="http://findbugs.cs.umd.edu/eclipse-candidate/">http://findbugs.cs.umd.edu/eclips-candidate/</ulink></term> 1024 1025 <listitem> 1026 <para>FindBugs</para> 1027 </listitem> 1028 </varlistentry> 1029 1030 <varlistentry><term><ulink url="http://findbugs.cs.umd.edu/eclipse-daily/">http://findbugs.cs.umd.edu/eclipse-daily/</ulink></term> 1031 1032 <listitem> 1033 <para>FindBugs</para> 1034 </listitem> 1035 </varlistentry> 1036 </variablelist> 1037 1038 <para> : <ulink url="http://prdownloads.sourceforge.net/findbugs/edu.umd.cs.findbugs.plugin.eclipse_2.0.3.20131122.zip?download">http://prdownloads.sourceforge.net/findbugs/edu.umd.cs.findbugs.plugin.eclipse_2.0.3.20131122.zip?download</ulink>. Eclipse plugins( <eclipse >/plugins/edu.umd.cs.findbugs.plugin.eclipse_2.0.3.20131122/findbugs.png &FindBugs; )</para> 1039 1040 <para> Eclipse <menuchoice> <guimenu>Help</guimenu> <guimenuitem>About Eclipse Platform</guimenuitem> <guimenuitem>Plug-in Details</guimenuitem> </menuchoice> FindBugs ProjectFindBugs Plug-in</para> 1041 </sect1> 1042 1043 <sect1> 1044 <title></title> 1045 1046 <para> Java Find Bugs&FindBugs; ( Eclipse )</para> 1047 1048 <para>Java Findbugs &FindBugs; :</para> 1049 1050 <itemizedlist> 1051 <listitem> 1052 <para>Run FindBugs Automatically Java FindBugs </para> 1053 </listitem> 1054 1055 <listitem> 1056 <para> Medium () () StyleStyle </para> 1057 </listitem> 1058 1059 <listitem> 1060 <para></para> 1061 </listitem> 1062 </itemizedlist> 1063 1064 </sect1> 1065 1066 <sect1> 1067 <title></title> 1068 1069 <para>&FindBugs; Eclipse () </para> 1070 1071 <itemizedlist> 1072 <listitem> 1073 <para>&FindBugs; () <ulink url="http://findbugs.sourceforge.net/FAQ.html#q7">http://findbugs.sourceforge.net/FAQ.html#q7</ulink> </para> 1074 </listitem> 1075 1076 </itemizedlist> 1077 1078 </sect1> 1079 1080 1081 </chapter> 1082 1083 1084 <!-- 1085 ************************************************************************** 1086 Filter files 1087 ************************************************************************** 1088 --> 1089 1090 <chapter id="filter"> 1091 <title></title> 1092 1093 <para><note> 1094 <title></title> 1095 <para> GUI </para> 1096 </note> 1097 </para> 1098 1099 1100 <sect1> 1101 <title></title> 1102 1103 <para> </para> 1104 1105 <para> <ulink url="http://www.w3.org/XML/">XML</ulink> <literal>FindBugsFilter</literal> <literal>Match</literal> <literal>Match</literal> :<screen> 1106 <prompt>$ </prompt><command>findbugs -textui -exclude <replaceable>myExcludeFilter.xml</replaceable> <replaceable>myApp.jar</replaceable></command> 1107 </screen> :<screen> 1108 <prompt>$ </prompt><command>findbugs -textui -include <replaceable>myIncludeFilter.xml</replaceable> <replaceable>myApp.jar</replaceable></command> 1109 </screen> 1110 </para> 1111 1112 <para> 1113 <literal>Match</literal> </para> 1114 1115 </sect1> 1116 1117 <sect1> 1118 <title></title> 1119 1120 <variablelist> 1121 <varlistentry> 1122 <term><literal><Bug></literal></term> 1123 <listitem><para><literal>pattern</literal> <command>-xml</command> (<literal>BugInstance</literal> <literal>type</literal> ) <ulink url="../../bugDescriptions.html"></ulink></para><para> <literal>code</literal> <literal>category</literal> : <literal>CORRECTNESS</literal>, <literal>MT_CORRECTNESS</literal>, <literal>BAD_PRACTICICE</literal>, <literal>PERFORMANCE</literal>, <literal>STYLE</literal>.</para><para> <literal><Bug></literal> 1</para><para> <literal><Bug></literal> <literal><BugPattern></literal> <literal><BugCode></literal> <literal>name</literal> </para></listitem> 1124 </varlistentry> 1125 1126 <varlistentry> 1127 <term><literal><Priority></literal></term> 1128 <listitem> 1129 <para><literal>value</literal> : 1 () 2 () 3 () </para> 1130 </listitem> 1131 </varlistentry> 1132 1133 1134 <varlistentry> 1135 <term><literal><Package></literal></term> 1136 <listitem> 1137 <para> <literal>name</literal> (Java import ) </para> 1138 </listitem> 1139 </varlistentry> 1140 1141 <varlistentry> 1142 <term><literal><Class></literal></term> 1143 <listitem> 1144 <para><literal>name</literal> </para> 1145 1146 <para> <literal>Match</literal> <literal>class</literal> <literal>classregex</literal> </para> 1147 1148 <para> <literal>Match</literal> <literal>Class</literal> <literal>class</literal> / <literal>classregex</literal> </para> 1149 </listitem> 1150 </varlistentry> 1151 1152 <varlistentry> 1153 <term><literal><Method></literal></term> 1154 1155 <listitem><para><literal>name</literal> <literal>params</literal> <literal>returns</literal> <literal>params</literal> <literal>returns</literal> ( "String" "java.lang.String" ) <literal>params</literal> <literal>returns</literal> <literal>name</literal> <literal>params</literal> <literal>returns</literal> 3 </para></listitem> 1156 </varlistentry> 1157 1158 <varlistentry> 1159 <term><literal><Field></literal></term> 1160 1161 <listitem><para><literal>name</literal> <literal>type</literal> 2</para></listitem> 1162 </varlistentry> 1163 1164 <varlistentry> 1165 <term><literal><Local></literal></term> 1166 1167 <listitem><para><literal>name</literal> </para></listitem> 1168 </varlistentry> 1169 1170 <varlistentry> 1171 <term><literal><Or></literal></term> 1172 <listitem><para> <literal>Match</literal> 2 <literal>Method</literal> <literal>Or</literal> </para></listitem> 1173 </varlistentry> 1174 </variablelist> 1175 1176 </sect1> 1177 1178 <sect1> 1179 <title>Java </title> 1180 1181 <para><literal>Class</literal> <literal>Method</literal> <literal>Field</literal> <literal>name</literal> ~ Java Java </para> 1182 1183 <para> .* </para> 1184 1185 <para> <ulink url="http://java.sun.com/j2se/1.5.0/ja/docs/ja/api/java/util/regex/Pattern.html"><literal>java.util.regex.Pattern</literal></ulink> </para> 1186 </sect1> 1187 1188 <sect1> 1189 <title></title> 1190 1191 <para> 1192 <literal>Match</literal> </para> 1193 1194 <para>2 DE (dropped exception : ) <literal>Match</literal> <emphasis>1</emphasis> () "com.foobar.A" "com.foobar.B" IC (initialization circularity : ) 2 <literal>Match</literal> :<programlisting> 1195 <Match> 1196 <Class name="com.foobar.A" /> 1197 <Bug code="IC" /> 1198 </Match> 1199 1200 <Match> 1201 <Class name="com.foobar.B" /> 1202 <Bug code="IC" /> 1203 </Match> 1204 </programlisting> 1 ( "com.foobar.A" "com.foobar.B" 3)</para> 1205 1206 <para> <literal>Method</literal> <literal>Match</literal> </para> 1207 1208 </sect1> 1209 1210 <sect1> 1211 <title></title> 1212 1213 <para>1. <programlisting> 1214 <![CDATA[ 1215 <Match> 1216 <Class name="com.foobar.MyClass" /> 1217 </Match> 1218 ]]> 1219 </programlisting> 1220 1221 </para> 1222 1223 <para>2. <programlisting> 1224 <![CDATA[ 1225 <Match> 1226 <Class name="com.foobar.MyClass"/ > 1227 <Bug code="DE,UrF,SIC" /> 1228 </Match> 1229 ]]> 1230 </programlisting> 1231 </para> 1232 1233 <para>3. <programlisting> 1234 <![CDATA[ 1235 <Match> 1236 <Bug code="DE,UrF,SIC" /> 1237 </Match> 1238 ]]> 1239 </programlisting> 1240 </para> 1241 1242 <para>4. <programlisting> 1243 <![CDATA[ 1244 <Match> 1245 <Bug category="PERFORMANCE" /> 1246 </Match> 1247 ]]> 1248 </programlisting> 1249 </para> 1250 1251 <para>5. <programlisting> 1252 <![CDATA[ 1253 <Match> 1254 <Class name="com.foobar.MyClass" /> 1255 <Or> 1256 <Method name="frob" params="int,java.lang.String" returns="void" /> 1257 <Method name="blat" params="" returns="boolean" /> 1258 </Or> 1259 <Bug code="DC" /> 1260 </Match> 1261 ]]> 1262 </programlisting> 1263 </para> 1264 1265 <para>6. <programlisting> 1266 <![CDATA[ 1267 <!-- open stream --> 1268 <Match> 1269 <Class name="com.foobar.MyClass" /> 1270 <Method name="writeDataToFile" /> 1271 <Bug pattern="OS_OPEN_STREAM" /> 1272 </Match> 1273 ]]> 1274 </programlisting> 1275 </para> 1276 1277 <para>7. <programlisting> 1278 <![CDATA[ 1279 <!-- dead local store ( ()) --> 1280 <Match> 1281 <Class name="com.foobar.MyClass" /> 1282 <Method name="someMethod" /> 1283 <Bug pattern="DLS_DEAD_LOCAL_STORE" /> 1284 <Priority value="2" /> 1285 </Match> 1286 ]]> 1287 </programlisting> 1288 </para> 1289 1290 <para>8. AspectJ (AspectJ )<programlisting> 1291 <![CDATA[ 1292 <Match> 1293 <Class name="~.*\$AjcClosure\d+" /> 1294 <Bug pattern="DLS_DEAD_LOCAL_STORE" /> 1295 <Method name="run" /> 1296 </Match> 1297 <Match> 1298 <Bug pattern="UUF_UNUSED_FIELD" /> 1299 <Field name="~ajc\$.*" /> 1300 </Match> 1301 ]]> 1302 </programlisting> 1303 </para> 1304 1305 <para>9. <programlisting> 1306 <![CDATA[ 1307 <!-- Messages unused fields --> 1308 <Match> 1309 <Class name="~.*\.Messages" /> 1310 <Bug code="UUF" /> 1311 </Match> 1312 <!-- internal mutable statics --> 1313 <Match> 1314 <Package name="~.*\.internal" /> 1315 <Bug code="MS" /> 1316 </Match> 1317 <!-- ui anonymoous inner classes --> 1318 <Match> 1319 <Package name="~com\.foobar\.fooproject\.ui.*" /> 1320 <Bug pattern="SIC_INNER_SHOULD_BE_STATIC_ANON" /> 1321 </Match> 1322 ]]> 1323 </programlisting> 1324 </para> 1325 1326 <para>10. <programlisting> 1327 <![CDATA[ 1328 <!-- main(String[]) System.exit(...) usage --> 1329 <Match> 1330 <Method returns="void" name="main" params="java.lang.String[]" /> 1331 <Method pattern="DM_EXIT" /> 1332 </Match> 1333 <!-- com.foobar.DebugInfo UuF --> 1334 <Match> 1335 <Field type="com.foobar.DebugInfo" /> 1336 <Bug code="UuF" /> 1337 </Match> 1338 ]]> 1339 </programlisting> 1340 1341 </para> 1342 1343 </sect1> 1344 1345 <sect1> 1346 <title></title> 1347 1348 <programlisting> 1349 <![CDATA[ 1350 <FindBugsFilter> 1351 <Match> 1352 <Class name="com.foobar.ClassNotToBeAnalyzed" /> 1353 </Match> 1354 1355 <Match> 1356 <Class name="com.foobar.ClassWithSomeBugsMatched" /> 1357 <Bug code="DE,UrF,SIC" /> 1358 </Match> 1359 1360 <!-- XYZ --> 1361 <Match> 1362 <Bug code="XYZ" /> 1363 </Match> 1364 1365 <!-- "AnotherClass" doublecheck --> 1366 <Match> 1367 <Class name="com.foobar.AnotherClass" /> 1368 <Or> 1369 <Method name="nonOverloadedMethod" /> 1370 <Method name="frob" params="int,java.lang.String" returns="void" /> 1371 <Method name="blat" params="" returns="boolean" /> 1372 </Or> 1373 <Bug code="DC" /> 1374 </Match> 1375 1376 <!-- dead local store ( ()) --> 1377 <Match> 1378 <Class name="com.foobar.MyClass" /> 1379 <Method name="someMethod" /> 1380 <Bug pattern="DLS_DEAD_LOCAL_STORE" /> 1381 <Priority value="2" /> 1382 </Match> 1383 </FindBugsFilter> 1384 ]]> 1385 </programlisting> 1386 1387 </sect1> 1388 1389 1390 </chapter> 1391 1392 1393 <!-- 1394 ************************************************************************** 1395 Analysis properties 1396 ************************************************************************** 1397 --> 1398 1399 <chapter id="analysisprops"> 1400 <title></title> 1401 1402 <para>&FindBugs; </para> 1403 1404 <para> 2 1 &FindBugs; &FindBugs; 2 </para> 1405 1406 <para> <command>-property</command> :<screen> 1407 <prompt>$ </prompt><command>findbugs -textui -property "cfg.noprune=true" <replaceable>myApp.jar</replaceable></command> 1408 </screen> 1409 </para> 1410 1411 <para> <xref linkend="analysisproptable"/> </para> 1412 1413 <table id="analysisproptable"> 1414 <title></title> 1415 <tgroup cols="3" align="left"> 1416 <thead> 1417 <row> 1418 <entry></entry> 1419 <entry></entry> 1420 <entry></entry> 1421 </row> 1422 </thead> 1423 <tbody> 1424 <!-- 1425 <row> 1426 <entry>cfg.noprune</entry> 1427 <entry>true or false</entry> 1428 <entry>If true, infeasible exception edges are not pruned from 1429 the control flow graphs of analyzed methods. This option 1430 increases the speed of the analysis (by about 20%-30%), 1431 but causes some detectors to produce more false warnings.</entry> 1432 </row> 1433 --> 1434 <row> 1435 <entry>findbugs.assertionmethods</entry> 1436 <entry> : "com.foo.MyClass.checkAssertion"</entry> 1437 <entry> null </entry> 1438 </row> 1439 <row> 1440 <entry>findbugs.de.comment</entry> 1441 <entry>true false</entry> 1442 <entry>true DroppedException () catch </entry> 1443 </row> 1444 <row> 1445 <entry>findbugs.maskedfields.locals</entry> 1446 <entry>true false</entry> 1447 <entry>true () false </entry> 1448 </row> 1449 <row> 1450 <entry>findbugs.nullderef.assumensp</entry> 1451 <entry>true false</entry> 1452 <entry> ( : true null null false )</entry> 1453 </row> 1454 <row> 1455 <entry>findbugs.refcomp.reportAll</entry> 1456 <entry>true false</entry> 1457 <entry>true == != false 1 1 false </entry> 1458 </row> 1459 <row> 1460 <entry>findbugs.sf.comment</entry> 1461 <entry>true false</entry> 1462 <entry>true SwitchFallthrough fallnobreak case () switch fallthrough </entry> 1463 </row> 1464 <!-- see others at src/doc/manual/sysprops.html 1465 <row> 1466 <entry></entry> 1467 <entry></entry> 1468 <entry></entry> 1469 </row> 1470 --> 1471 </tbody> 1472 </tgroup> 1473 </table> 1474 1475 </chapter> 1476 1477 <!-- 1478 ************************************************************************** 1479 Annotations 1480 *************************************************************************** 1481 --> 1482 1483 <chapter id="annotations"> 1484 <title></title> 1485 1486 <para>&FindBugs; FindBugs Java 5 annotations.jar jsr305.jar </para> 1487 1488 <variablelist> 1489 <varlistentry> 1490 <term><command>edu.umd.cs.findbugs.annotations.CheckForNull</command></term> 1491 <listitem> 1492 <command>[Target]</command> Field, Method, Parameter 1493 </listitem> 1494 <listitem> 1495 <para> null null </para> 1496 </listitem> 1497 </varlistentry> 1498 1499 <varlistentry> 1500 <term><command>edu.umd.cs.findbugs.annotations.CheckReturnValue</command></term> 1501 <listitem> 1502 <command>[Target]</command> Method, Constructor 1503 </listitem> 1504 <listitem> 1505 <variablelist> 1506 <varlistentry> 1507 <term><command>[Parameter]</command></term> 1508 <listitem> 1509 <para> 1510 <command>priority:</command> (HIGH, MEDIUM, LOW, IGNORE) :MEDIUM</para> 1511 </listitem> 1512 <listitem> 1513 <para> 1514 <command>explanation:</command> :""</para> 1515 </listitem> 1516 </varlistentry> 1517 </variablelist> 1518 </listitem> 1519 <listitem> 1520 <para></para> 1521 </listitem> 1522 </varlistentry> 1523 1524 <varlistentry> 1525 <term><command>edu.umd.cs.findbugs.annotations.DefaultAnnotation</command></term> 1526 <listitem> 1527 <command>[Target]</command> Type, Package 1528 </listitem> 1529 <listitem> 1530 <variablelist> 1531 <varlistentry> 1532 <term><command>[Parameter]</command></term> 1533 <listitem> 1534 <para> 1535 <command>value:</command>class</para> 1536 </listitem> 1537 <listitem> 1538 <para> 1539 <command>priority:</command> (HIGH, MEDIUM, LOW, IGNORE) :MEDIUM</para> 1540 </listitem> 1541 </varlistentry> 1542 </variablelist> 1543 </listitem> 1544 <listitem> 1545 <para> 1546 Indicates that all members of the class or package should be annotated with the default 1547 value of the supplied annotation classes. This would be used for behavior annotations 1548 such as @NonNull, @CheckForNull, or @CheckReturnValue. In particular, you can use 1549 @DefaultAnnotation(NonNull.class) on a class or package, and then use @Nullable only 1550 on those parameters, methods or fields that you want to allow to be null. 1551 </para> 1552 </listitem> 1553 </varlistentry> 1554 1555 <varlistentry> 1556 <term><command>edu.umd.cs.findbugs.annotations.DefaultAnnotationForFields</command></term> 1557 <listitem> 1558 <command>[Target]</command> Type, Package 1559 </listitem> 1560 <listitem> 1561 <variablelist> 1562 <varlistentry> 1563 <term><command>[Parameter]</command></term> 1564 <listitem> 1565 <para> 1566 <command>value:</command>class</para> 1567 </listitem> 1568 <listitem> 1569 <para> 1570 <command>priority:</command> (HIGH, MEDIUM, LOW, IGNORE) :MEDIUM</para> 1571 </listitem> 1572 </varlistentry> 1573 </variablelist> 1574 </listitem> 1575 <listitem> 1576 <para> 1577 This is same as the DefaultAnnotation except it only applys to fields. 1578 </para> 1579 </listitem> 1580 </varlistentry> 1581 1582 <varlistentry> 1583 <term><command>edu.umd.cs.findbugs.annotations.DefaultAnnotationForMethods</command></term> 1584 <listitem> 1585 <command>[Target]</command> Type, Package 1586 </listitem> 1587 <listitem> 1588 <variablelist> 1589 <varlistentry> 1590 <term><command>[Parameter]</command></term> 1591 <listitem> 1592 <para> 1593 <command>value:</command>class</para> 1594 </listitem> 1595 <listitem> 1596 <para> 1597 <command>priority:</command> (HIGH, MEDIUM, LOW, IGNORE) :MEDIUM</para> 1598 </listitem> 1599 </varlistentry> 1600 </variablelist> 1601 </listitem> 1602 <listitem> 1603 <para> 1604 This is same as the DefaultAnnotation except it only applys to methods. 1605 </para> 1606 </listitem> 1607 </varlistentry> 1608 1609 <varlistentry> 1610 <term><command>edu.umd.cs.findbugs.annotations.DefaultAnnotationForParameters</command></term> 1611 <listitem> 1612 <command>[Target]</command> Type, Package 1613 </listitem> 1614 <listitem> 1615 <variablelist> 1616 <varlistentry> 1617 <term><command>[Parameter]</command></term> 1618 <listitem> 1619 <para> 1620 <command>value:</command>class</para> 1621 </listitem> 1622 <listitem> 1623 <para> 1624 <command>priority:</command> (HIGH, MEDIUM, LOW, IGNORE) :MEDIUM</para> 1625 </listitem> 1626 </varlistentry> 1627 </variablelist> 1628 </listitem> 1629 <listitem> 1630 <para> 1631 This is same as the DefaultAnnotation except it only applys to method parameters. 1632 </para> 1633 </listitem> 1634 </varlistentry> 1635 1636 <varlistentry> 1637 <term><command>edu.umd.cs.findbugs.annotations.NonNull</command></term> 1638 <listitem> 1639 <command>[Target]</command> Field, Method, Parameter 1640 </listitem> 1641 <listitem> 1642 <para> null null null </para> 1643 </listitem> 1644 </varlistentry> 1645 1646 <varlistentry> 1647 <term><command>edu.umd.cs.findbugs.annotations.Nullable</command></term> 1648 <listitem> 1649 <command>[Target]</command> Field, Method, Parameter 1650 </listitem> 1651 <listitem> 1652 <para> null In general, this means developers will have to read the documentation to determine when a null value is acceptable and whether it is neccessary to check for a null value. FindBugs will treat the annotated items as though they had no annotation.</para> 1653 <para> 1654 In pratice this annotation is useful only for overriding an overarching NonNull 1655 annotation. 1656 </para> 1657 </listitem> 1658 </varlistentry> 1659 1660 <varlistentry> 1661 <term><command>edu.umd.cs.findbugs.annotations.OverrideMustInvoke</command></term> 1662 <listitem> 1663 <command>[Target]</command> Method 1664 </listitem> 1665 <listitem> 1666 <variablelist> 1667 <varlistentry> 1668 <term><command>[Parameter]</command></term> 1669 <listitem> 1670 <para> 1671 <command>value:</command>Specify when the super invocation should be 1672 performed (FIRST, ANYTIME, LAST). Default value:ANYTIME. 1673 </para> 1674 </listitem> 1675 </varlistentry> 1676 </variablelist> 1677 </listitem> 1678 <listitem> 1679 <para> 1680 Used to annotate a method that, if overridden, must (or should) be invoke super 1681 in the overriding method. Examples of such methods include finalize() and clone(). 1682 The argument to the method indicates when the super invocation should occur: 1683 at any time, at the beginning of the overriding method, or at the end of the overriding method. 1684 (This anotation is not implmemented in FindBugs as of September 8, 2006). 1685 </para> 1686 </listitem> 1687 </varlistentry> 1688 1689 <varlistentry> 1690 <term><command>edu.umd.cs.findbugs.annotations.PossiblyNull</command></term> 1691 <listitem> 1692 <para> 1693 This annotation is deprecated. Use CheckForNull instead. 1694 </para> 1695 </listitem> 1696 </varlistentry> 1697 1698 <varlistentry> 1699 <term><command>edu.umd.cs.findbugs.annotations.SuppressWarnings</command></term> 1700 <listitem> 1701 <command>[Target]</command> Type, Field, Method, Parameter, Constructor, Package 1702 </listitem> 1703 <listitem> 1704 <variablelist> 1705 <varlistentry> 1706 <term><command>[Parameter]</command></term> 1707 <listitem> 1708 <para> 1709 <command>value:</command>The name of the warning. More than one name can be specified. 1710 </para> 1711 </listitem> 1712 <listitem> 1713 <para> 1714 <command>justification:</command>Reason why the warning should be ignored. :""</para> 1715 </listitem> 1716 </varlistentry> 1717 </variablelist> 1718 </listitem> 1719 <listitem> 1720 <para> 1721 The set of warnings that are to be suppressed by the compiler in the annotated element. 1722 Duplicate names are permitted. The second and successive occurrences of a name are ignored. 1723 The presence of unrecognized warning names is <emphasis>not</emphasis> an error: Compilers 1724 must ignore any warning names they do not recognize. They are, however, free to emit a 1725 warning if an annotation contains an unrecognized warning name. Compiler vendors should 1726 document the warning names they support in conjunction with this annotation type. They 1727 are encouraged to cooperate to ensure that the same names work across multiple compilers. 1728 </para> 1729 </listitem> 1730 </varlistentry> 1731 1732 <varlistentry> 1733 <term><command>edu.umd.cs.findbugs.annotations.UnknownNullness</command></term> 1734 <listitem> 1735 <command>[Target]</command> Field, Method, Parameter 1736 </listitem> 1737 <listitem> 1738 <para> 1739 Used to indicate that the nullness of the target is unknown, or my vary in unknown ways in subclasses. 1740 </para> 1741 </listitem> 1742 </varlistentry> 1743 1744 <varlistentry> 1745 <term><command>edu.umd.cs.findbugs.annotations.UnknownNullness</command></term> 1746 <listitem> 1747 <command>[Target]</command> Field, Method, Parameter 1748 </listitem> 1749 <listitem> 1750 <para> 1751 Used to indicate that the nullness of the target is unknown, or my vary in unknown ways in subclasses. 1752 </para> 1753 </listitem> 1754 </varlistentry> 1755 </variablelist> 1756 1757 <para> &FindBugs; :<itemizedlist> 1758 <listitem>net.jcip.annotations.GuardedBy</listitem> 1759 <listitem>net.jcip.annotations.Immutable</listitem> 1760 <listitem>net.jcip.annotations.NotThreadSafe</listitem> 1761 <listitem>net.jcip.annotations.ThreadSafe</listitem> 1762 </itemizedlist> 1763 </para> 1764 <para><ulink url="http://jcip.net/">Java Concurrency in Practice</ulink> <ulink url="http://jcip.net/annotations/doc/index.html"> API </ulink> </para> 1765 </chapter> 1766 1767 <!-- 1768 ************************************************************************** 1769 Using rejarForAnalysis 1770 ************************************************************************** 1771 --> 1772 1773 <chapter id="rejarForAnalysis"> 1774 <title>rejarForAnalysis </title> 1775 1776 <para> jar jar <command>rejarForAnalysis </command> FindBugs jar 1 jar FindBugs jar unix 'find' ; <command>find . -name '*.jar' | xargs rejarForAnalysis </command>.</para> 1777 1778 <para> <command>rejarForAnalysis</command> jar jar FindBugs FindBugs <command> rejarForAnalysis</command> jar <command>rejarForAnalysis</command> jar jar FindBugs <command>-auxclasspath</command> 1 jar </para> 1779 1780 <para><command>rejarForAnalysis</command> :</para> 1781 1782 <variablelist> 1783 <varlistentry> 1784 <term><command>-maxAge</command> <replaceable></replaceable></term> 1785 <listitem> 1786 <para> ( jar )</para> 1787 </listitem> 1788 </varlistentry> 1789 <varlistentry> 1790 <term><command>-inputFileList</command> <replaceable></replaceable></term> 1791 <listitem> 1792 <para>jar </para> 1793 </listitem> 1794 </varlistentry> 1795 <varlistentry> 1796 <term><command>-maxClasses</command> <replaceable></replaceable></term> 1797 <listitem> 1798 <para>analysis*.jar 1 </para> 1799 </listitem> 1800 </varlistentry> 1801 <varlistentry> 1802 <term><command>-prefix</command> <replaceable></replaceable></term> 1803 <listitem> 1804 <para> ( edu.umd.cs.) </para> 1805 </listitem> 1806 </varlistentry> 1807 </variablelist> 1808 </chapter> 1809 1810 <!-- 1811 ************************************************************************** 1812 Data mining 1813 ************************************************************************** 1814 --> 1815 1816 <chapter id="datamining"> 1817 <title>&FindBugs;™ </title> 1818 1819 <para> FindBugs </para> 1820 1821 <para> FindBugs XML XML 1 </para> 1822 1823 <para> FindBugs XML FindBugs () <command>setBugDatabaseInfo</command> (<xref linkend="setBugDatabaseInfo"/>) </para> 1824 1825 <para> 0 ( 4 0~3 ) <command>filterBugs</command> </para> 1826 1827 <para>1 1 1 </para> 1828 1829 <para> ant <literal>findbugs.lib</literal> <literal>refid</literal> :</para> 1830 1831 <programlisting> 1832 <![CDATA[ 1833 <!-- findbugs --> 1834 <property name="findbugs.home" value="/your/path/to/findbugs" /> 1835 <path id="findbugs.lib"> 1836 <fileset dir="${findbugs.home}/lib"> 1837 <include name="findbugs-ant.jar"/> 1838 </fileset> 1839 </path> 1840 ]]> 1841 </programlisting> 1842 1843 <sect1 id="commands"> 1844 <title></title> 1845 1846 <para>FindBugs ant </para> 1847 1848 <para> :</para> 1849 1850 <variablelist> 1851 <varlistentry> 1852 <term><command><link linkend="unionBugs">unionBugs</link></command></term> 1853 <listitem> 1854 <para></para> 1855 </listitem> 1856 </varlistentry> 1857 <varlistentry> 1858 <term><command><link linkend="computeBugHistory">computeBugHistory</link></command></term> 1859 <listitem> 1860 <para> 1 1 1 </para> 1861 </listitem> 1862 </varlistentry> 1863 <varlistentry> 1864 <term><command><link linkend="setBugDatabaseInfo">setBugDatabaseInfo</link></command></term> 1865 <listitem> 1866 <para> XML </para> 1867 </listitem> 1868 </varlistentry> 1869 <varlistentry> 1870 <term><command><link linkend="listBugDatabaseInfo">listBugDatabaseInfo</link></command></term> 1871 <listitem> 1872 <para>XML </para> 1873 </listitem> 1874 </varlistentry> 1875 <varlistentry> 1876 <term><command><link linkend="filterBugs">filterBugs</link></command></term> 1877 <listitem> 1878 <para></para> 1879 </listitem> 1880 </varlistentry> 1881 <varlistentry> 1882 <term><command><link linkend="mineBugHistory">mineBugHistory</link></command></term> 1883 <listitem> 1884 <para></para> 1885 </listitem> 1886 </varlistentry> 1887 <varlistentry> 1888 <term><command><link linkend="defectDensity">defectDensity</link></command></term> 1889 <listitem> 1890 <para> (1000 NCSS ) </para> 1891 </listitem> 1892 </varlistentry> 1893 <varlistentry> 1894 <term><command><link linkend="convertXmlToText">convertXmlToText</link></command></term> 1895 <listitem> 1896 <para>XML 1 1 HTML</para> 1897 </listitem> 1898 </varlistentry> 1899 </variablelist> 1900 1901 1902 <sect2 id="unionBugs"> 1903 <title>unionBugs</title> 1904 1905 <para> jar XML 1 </para> 1906 1907 <para><emphasis></emphasis> <command>computeBugHistory</command> </para> 1908 1909 <para>XML </para> 1910 </sect2> 1911 1912 <sect2 id="computeBugHistory"> 1913 <title>computeBugHistory</title> 1914 1915 <para> 1 1 () </para> 1916 <para></para> 1917 1918 <para> ant <command>computeBugHistory</command> taskdef :</para> 1919 1920 <programlisting> 1921 <![CDATA[ 1922 <taskdef name="computeBugHistory" classname="edu.umd.cs.findbugs.anttask.ComputeBugHistoryTask"> 1923 <classpath refid="findbugs.lib" /> 1924 </taskdef> 1925 ]]> 1926 </programlisting> 1927 1928 <para> ant <literal><datafile></literal> :</para> 1929 1930 <programlisting> 1931 <![CDATA[ 1932 <computeBugHistory home="${findbugs.home}" ...> 1933 <datafile name="analyze1.xml"/> 1934 <datafile name="analyze2.xml"/> 1935 </computeBugHistory> 1936 ]]> 1937 </programlisting> 1938 1939 <table id="computeBugHistoryTable"> 1940 <title>computeBugHistory </title> 1941 <tgroup cols="3" align="left"> 1942 <thead> 1943 <row> 1944 <entry></entry> 1945 <entry>Ant </entry> 1946 <entry></entry> 1947 </row> 1948 </thead> 1949 <tbody> 1950 <row><entry>-output <file></entry> <entry>output="<file>"</entry> <entry> ()</entry></row> 1951 <row><entry>-overrideRevisionNames[:truth]</entry> <entry>overrideRevisionNames="[true|false]"</entry><entry></entry></row> 1952 <row><entry>-noPackageMoves[:truth]</entry> <entry>noPackageMoves="[true|false]"</entry><entry></entry></row> 1953 <row><entry>-preciseMatch[:truth]</entry> <entry>preciseMatch="[true|false]"</entry><entry></entry></row> 1954 <row><entry>-precisePriorityMatch[:truth]</entry> <entry>precisePriorityMatch="[true|false]"</entry><entry></entry></row> 1955 <row><entry>-quiet[:truth]</entry> <entry>quiet="[true|false]"</entry><entry></entry></row> 1956 <row><entry>-withMessages[:truth]</entry> <entry>withMessages="[true|false]"</entry><entry> XML </entry></row> 1957 </tbody> 1958 </tgroup> 1959 </table> 1960 1961 </sect2> 1962 <sect2 id="filterBugs"> 1963 <title>filterBugs</title> 1964 <para> FindBugs XML FindBugs </para> 1965 <para> 0 2 findbugs xml </para> 1966 <para> 1 2 1 2 </para> 1967 1968 <para> ant <command>filterBugs</command> taskdef :</para> 1969 1970 <programlisting> 1971 <![CDATA[ 1972 <taskdef name="filterBugs" classname="edu.umd.cs.findbugs.anttask.FilterBugsTask"> 1973 <classpath refid="findbugs.lib" /> 1974 </taskdef> 1975 ]]> 1976 </programlisting> 1977 1978 <para> ant <literal>input</literal> <literal><datafile></literal> :</para> 1979 1980 <programlisting> 1981 <![CDATA[ 1982 <filterBugs home="${findbugs.home}" ...> 1983 <datafile name="analyze.xml"/> 1984 </filterBugs> 1985 ]]> 1986 </programlisting> 1987 1988 <table id="filterOptionsTable"> 1989 <title>filterBugs </title> 1990 <tgroup cols="3" align="left"> 1991 <thead> 1992 <row> 1993 <entry></entry> 1994 <entry>Ant </entry> 1995 <entry></entry> 1996 </row> 1997 </thead> 1998 <tbody> 1999 <row><entry/> <entry>input="<file>"</entry> <entry></entry></row> 2000 <row><entry/> <entry>output="<file>"</entry> <entry></entry></row> 2001 <row><entry>-not</entry> <entry>not="[true|false]"</entry> <entry></entry></row> 2002 <row><entry>-withSource[:truth]</entry> <entry>withSource="[true|false]"</entry> <entry></entry></row> 2003 <row><entry>-exclude <filter file></entry><entry>exclude="<filter file>"</entry> <entry></entry></row> 2004 <row><entry>-include <filter file></entry><entry>include="<filter file>"</entry> <entry></entry></row> 2005 <row><entry>-annotation <text></entry> <entry>annotation="<text>"</entry> <entry></entry></row> 2006 <row><entry>-after <when></entry> <entry>after="<when>"</entry> <entry></entry></row> 2007 <row><entry>-before <when></entry> <entry>before="<when>"</entry> <entry></entry></row> 2008 <row><entry>-first <when></entry> <entry>first="<when>"</entry> <entry></entry></row> 2009 <row><entry>-last <when></entry> <entry>last="<when>"</entry> <entry></entry></row> 2010 <row><entry>-fixed <when></entry> <entry>fixed="<when>"</entry> <entry> (<option>-last</option> )</entry></row> 2011 <row><entry>-present <when></entry> <entry>present="<when>"</entry> <entry></entry></row> 2012 <row><entry>-absent <when></entry> <entry>absent="<when>"</entry> <entry></entry></row> 2013 <row><entry>-active[:truth]</entry> <entry>active="[true|false]"</entry> <entry></entry></row> 2014 <row><entry>-introducedByChange[:truth]</entry> <entry>introducedByChange="[true|false]"</entry><entry></entry></row> 2015 <row><entry>-removedByChange[:truth]</entry> <entry>removedByChange="[true|false]"</entry> <entry></entry></row> 2016 <row><entry>-newCode[:truth]</entry> <entry>newCode="[true|false]"</entry> <entry></entry></row> 2017 <row><entry>-removedCode[:truth]</entry> <entry>removedCode="[true|false]"</entry> <entry></entry></row> 2018 <row><entry>-priority <level></entry> <entry>priority="<level>"</entry> <entry></entry></row> 2019 <row><entry>-class <pattern></entry> <entry>class="<class>"</entry> <entry></entry></row> 2020 <row><entry>-bugPattern <pattern></entry> <entry>bugPattern="<pattern>"</entry> <entry></entry></row> 2021 <row><entry>-category <category></entry> <entry>category="<category>"</entry> <entry></entry></row> 2022 <row><entry>-designation <designation></entry> <entry>designation="<designation>"</entry> <entry> ( -designation SHOULD_FIX)</entry></row> 2023 <row><entry>-withMessages[:truth] </entry> <entry>withMessages="[true|false]"</entry> <entry> XML </entry></row> 2024 </tbody> 2025 </tgroup> 2026 </table> 2027 2028 </sect2> 2029 2030 <sect2 id="mineBugHistory"> 2031 <title>mineBugHistory</title> 2032 <para></para> 2033 2034 2035 <para> ant <command>mineBugHistory</command> taskdef :</para> 2036 2037 <programlisting> 2038 <![CDATA[ 2039 <taskdef name="mineBugHistory" classname="edu.umd.cs.findbugs.anttask.MineBugHistoryTask"> 2040 <classpath refid="findbugs.lib" /> 2041 </taskdef> 2042 ]]> 2043 </programlisting> 2044 2045 <para> ant <literal>input</literal> <literal><datafile></literal> :</para> 2046 2047 <programlisting> 2048 <![CDATA[ 2049 <mineBugHistory home="${findbugs.home}" ...> 2050 <datafile name="analyze.xml"/> 2051 </mineBugHistory> 2052 ]]> 2053 </programlisting> 2054 2055 <table id="mineBugHistoryOptionsTable"> 2056 <title>mineBugHistory </title> 2057 <tgroup cols="3" align="left"> 2058 <thead> 2059 <row> 2060 <entry></entry> 2061 <entry>Ant </entry> 2062 <entry></entry> 2063 </row> 2064 </thead> 2065 <tbody> 2066 <row><entry/> <entry>input="<file>"</entry> <entry></entry></row> 2067 <row><entry/> <entry>output="<file>"</entry> <entry></entry></row> 2068 <row><entry>-formatDates</entry> <entry>formatDates="[true|false]"</entry> <entry></entry></row> 2069 <row><entry>-noTabs</entry> <entry>noTabs="[true|false]"</entry> <entry> ()</entry></row> 2070 <row><entry>-summary</entry> <entry>summary="[true|false]"</entry> <entry> 10 </entry></row> 2071 </tbody> 2072 </tgroup> 2073 </table> 2074 2075 <para><option>-noTabs</option> <option>-formatDates</option> </para> 2076 2077 <para> (<option>-noTabs</option> ) :</para> 2078 2079 <table id="mineBugHistoryColumns"> 2080 <title>mineBugHistory </title> 2081 <tgroup cols="2" align="left"> 2082 <thead> 2083 <row> 2084 <entry></entry> 2085 <entry></entry> 2086 </row> 2087 </thead> 2088 <tbody> 2089 <row><entry>seq</entry><entry> (0 )</entry></row> 2090 <row><entry>version</entry><entry></entry></row> 2091 <row><entry>time</entry><entry></entry></row> 2092 <row><entry>classes</entry><entry></entry></row> 2093 <row><entry>NCSS</entry><entry> (Non Commenting Source Statements)</entry></row> 2094 <row><entry>added</entry><entry></entry></row> 2095 <row><entry>newCode</entry><entry></entry></row> 2096 <row><entry>fixed</entry><entry></entry></row> 2097 <row><entry>removed</entry><entry></entry></row> 2098 <row><entry>retained</entry><entry></entry></row> 2099 <row><entry>dead</entry><entry></entry></row> 2100 <row><entry>active</entry><entry></entry></row> 2101 </tbody> 2102 </tgroup> 2103 </table> 2104 </sect2> 2105 2106 <sect2 id="defectDensity"> 2107 <title>defectDensity</title> 2108 <para> (1000 NCSS ) </para> 2109 <para>4 </para> 2110 <table id="defectDensityColumns"> 2111 <title>defectDensity </title> 2112 <tgroup cols="2" align="left"> 2113 <thead> 2114 <row> 2115 <entry></entry> 2116 <entry></entry> 2117 </row> 2118 </thead> 2119 <tbody> 2120 <row><entry>kind</entry><entry> (project) (package) (class)</entry></row> 2121 <row><entry>name</entry><entry></entry></row> 2122 <row><entry>density</entry><entry> 1000 NCSS </entry></row> 2123 <row><entry>bugs</entry><entry></entry></row> 2124 <row><entry>NCSS</entry><entry> (Non Commenting Source Statements) </entry></row> 2125 </tbody> 2126 </tgroup> 2127 </table> 2128 </sect2> 2129 2130 <sect2 id="convertXmlToText"> 2131 <title>convertXmlToText</title> 2132 2133 <para>XML 1 1 HTML</para> 2134 2135 <para> ant <command>convertXmlToText</command> taskdef :</para> 2136 2137 <programlisting> 2138 <![CDATA[ 2139 <taskdef name="convertXmlToText" classname="edu.umd.cs.findbugs.anttask.ConvertXmlToTextTask"> 2140 <classpath refid="findbugs.lib" /> 2141 </taskdef> 2142 ]]> 2143 </programlisting> 2144 2145 <para> ant </para> 2146 2147 <table id="convertXmlToTextTable"> 2148 <title>convertXmlToText </title> 2149 <tgroup cols="3" align="left"> 2150 <thead> 2151 <row> 2152 <entry></entry> 2153 <entry>Ant </entry> 2154 <entry></entry> 2155 </row> 2156 </thead> 2157 <tbody> 2158 <row><entry/> <entry>input="<filename>"</entry> <entry></entry></row> 2159 <row><entry/> <entry>output="<filename>"</entry> <entry></entry></row> 2160 <row><entry>-longBugCodes</entry> <entry>longBugCodes="[true|false]"</entry> <entry>2 </entry></row> 2161 <row><entry/> <entry>format="text"</entry> <entry>1 1 </entry></row> 2162 <row><entry>-html[:stylesheet]</entry> <entry>format="html:<stylesheet>"</entry> <entry> () default.xsl </entry></row> 2163 </tbody> 2164 </tgroup> 2165 </table> 2166 2167 <para>-html/format plain.xsl default.xsl fancy.xsl fancy-hist.xsl XSL html FindBugs () -html/format URL </para> 2168 </sect2> 2169 2170 <sect2 id="setBugDatabaseInfo"> 2171 <title>setBugDatabaseInfo</title> 2172 2173 <para>:</para> 2174 2175 <para> ant <command>setBugDatabaseInfo</command> taskdef :</para> 2176 2177 <programlisting> 2178 <![CDATA[ 2179 <taskdef name="setBugDatabaseInfo" classname="edu.umd.cs.findbugs.anttask.SetBugDatabaseInfoTask"> 2180 <classpath refid="findbugs.lib" /> 2181 </taskdef> 2182 ]]> 2183 </programlisting> 2184 2185 <para> ant <literal>input</literal> <literal><datafile></literal> :</para> 2186 2187 <programlisting> 2188 <![CDATA[ 2189 <setBugDatabaseInfo home="${findbugs.home}" ...> 2190 <datafile name="analyze.xml"/> 2191 </setBugDatabaseInfo> 2192 ]]> 2193 </programlisting> 2194 2195 <table id="setBugDatabaseInfoOptions"> 2196 <title>setBugDatabaseInfo </title> 2197 <tgroup cols="3" align="left"> 2198 <thead> 2199 <row> 2200 <entry></entry> 2201 <entry>Ant </entry> 2202 <entry></entry> 2203 </row> 2204 </thead> 2205 <tbody> 2206 <row><entry/> <entry>input="<file>"</entry> <entry></entry></row> 2207 <row><entry/> <entry>output="<file>"</entry> <entry></entry></row> 2208 <row><entry>-name <name></entry> <entry>name="<name>"</entry> <entry></entry></row> 2209 <row><entry>-timestamp <when></entry> <entry>timestamp="<when>"</entry> <entry></entry></row> 2210 <row><entry>-source <directory></entry> <entry>source="<directory>"</entry> <entry></entry></row> 2211 <row><entry>-findSource <directory></entry> <entry>findSource="<directory>"</entry> <entry></entry></row> 2212 <row><entry>-suppress <filter file></entry> <entry>suppress="<filter file>"</entry> <entry> ()</entry></row> 2213 <row><entry>-withMessages</entry> <entry>withMessages="[true|false]"</entry> <entry>XML</entry></row> 2214 <row><entry>-resetSource</entry> <entry>resetSource="[true|false]"</entry> <entry></entry></row> 2215 </tbody> 2216 </tgroup> 2217 </table> 2218 </sect2> 2219 2220 <sect2 id="listBugDatabaseInfo"> 2221 <title>listBugDatabaseInfo</title> 2222 2223 <para> 0 xml 1</para> 2224 2225 <para> 1 : <option>-formatDates</option> </para> 2226 2227 <para> :</para> 2228 <table id="listBugDatabaseInfoColumns"> 2229 <title>listBugDatabaseInfo </title> 2230 <tgroup cols="2" align="left"> 2231 <thead> 2232 <row> 2233 <entry></entry> 2234 <entry></entry> 2235 </row> 2236 </thead> 2237 <tbody> 2238 <row><entry>version</entry><entry></entry></row> 2239 <row><entry>time</entry><entry></entry></row> 2240 <row><entry>classes</entry><entry></entry></row> 2241 <row><entry>NCSS</entry><entry> (Non Commenting Source Statements)</entry></row> 2242 <row><entry>total</entry><entry></entry></row> 2243 <row><entry>high</entry><entry>()</entry></row> 2244 <row><entry>medium</entry><entry>()</entry></row> 2245 <row><entry>low</entry><entry>()</entry></row> 2246 <row><entry>filename</entry><entry></entry></row> 2247 <!-- 2248 <row><entry></entry><entry></entry></row> 2249 <row><entry></entry><entry></entry></row> 2250 <row><entry></entry><entry></entry></row> 2251 <row><entry></entry><entry></entry></row> 2252 <row><entry></entry><entry></entry></row> 2253 <row><entry></entry><entry></entry></row> 2254 --> 2255 </tbody> 2256 </tgroup> 2257 </table> 2258 2259 </sect2> 2260 2261 </sect1> 2262 2263 <sect1 id="examples"> 2264 <title></title> 2265 <sect2 id="unixscriptsexamples"> 2266 <title></title> 2267 <para> jdk1.6.0-b12, jdk1.6.0-b13, ..., jdk1.6.0-b60 </para> 2268 2269 <para> :</para> 2270 <screen> 2271 computeBugHistory jdk1.6.0-b* | filterBugs -bugPattern IL_ | mineBugHistory -formatDates 2272 </screen> 2273 <para> :</para> 2274 2275 <screen> 2276 seq version time classes NCSS added newCode fixed removed retained dead active 2277 0 jdk1.6.0-b12 "Thu Nov 11 09:07:20 EST 2004" 13128 811569 0 4 0 0 0 0 4 2278 1 jdk1.6.0-b13 "Thu Nov 18 06:02:06 EST 2004" 13128 811570 0 0 0 0 4 0 4 2279 2 jdk1.6.0-b14 "Thu Dec 02 06:12:26 EST 2004" 13145 811786 0 0 2 0 2 0 2 2280 3 jdk1.6.0-b15 "Thu Dec 09 06:07:04 EST 2004" 13174 811693 0 0 1 0 1 2 1 2281 4 jdk1.6.0-b16 "Thu Dec 16 06:21:28 EST 2004" 13175 811715 0 0 0 0 1 3 1 2282 5 jdk1.6.0-b17 "Thu Dec 23 06:27:22 EST 2004" 13176 811974 0 0 0 0 1 3 1 2283 6 jdk1.6.0-b19 "Thu Jan 13 06:41:16 EST 2005" 13176 812011 0 0 0 0 1 3 1 2284 7 jdk1.6.0-b21 "Thu Jan 27 05:57:52 EST 2005" 13177 812173 0 0 0 0 1 3 1 2285 8 jdk1.6.0-b23 "Thu Feb 10 05:44:36 EST 2005" 13179 812188 0 0 0 0 1 3 1 2286 9 jdk1.6.0-b26 "Thu Mar 03 06:04:02 EST 2005" 13199 811770 0 0 0 0 1 3 1 2287 10 jdk1.6.0-b27 "Thu Mar 10 04:48:38 EST 2005" 13189 812440 0 0 0 0 1 3 1 2288 11 jdk1.6.0-b28 "Thu Mar 17 02:54:22 EST 2005" 13185 812056 0 0 0 0 1 3 1 2289 12 jdk1.6.0-b29 "Thu Mar 24 03:09:20 EST 2005" 13117 809468 0 0 0 0 1 3 1 2290 13 jdk1.6.0-b30 "Thu Mar 31 02:53:32 EST 2005" 13118 809501 0 0 0 0 1 3 1 2291 14 jdk1.6.0-b31 "Thu Apr 07 03:00:14 EDT 2005" 13117 809572 0 0 0 0 1 3 1 2292 15 jdk1.6.0-b32 "Thu Apr 14 02:56:56 EDT 2005" 13169 811096 0 0 0 0 1 3 1 2293 16 jdk1.6.0-b33 "Thu Apr 21 02:46:22 EDT 2005" 13187 811942 0 0 0 0 1 3 1 2294 17 jdk1.6.0-b34 "Thu Apr 28 02:49:00 EDT 2005" 13195 813488 0 1 0 0 1 3 2 2295 18 jdk1.6.0-b35 "Thu May 05 02:49:04 EDT 2005" 13457 829837 0 0 0 0 2 3 2 2296 19 jdk1.6.0-b36 "Thu May 12 02:59:46 EDT 2005" 13462 831278 0 0 0 0 2 3 2 2297 20 jdk1.6.0-b37 "Thu May 19 02:55:08 EDT 2005" 13464 831971 0 0 0 0 2 3 2 2298 21 jdk1.6.0-b38 "Thu May 26 03:08:16 EDT 2005" 13564 836565 0 0 0 0 2 3 2 2299 22 jdk1.6.0-b39 "Fri Jun 03 03:10:48 EDT 2005" 13856 849992 0 1 0 0 2 3 3 2300 23 jdk1.6.0-b40 "Thu Jun 09 03:30:28 EDT 2005" 15972 959619 0 2 0 0 3 3 5 2301 24 jdk1.6.0-b41 "Thu Jun 16 03:19:22 EDT 2005" 15972 959619 0 0 0 0 5 3 5 2302 25 jdk1.6.0-b42 "Fri Jun 24 03:38:54 EDT 2005" 15966 958581 0 0 0 0 5 3 5 2303 26 jdk1.6.0-b43 "Thu Jul 14 03:09:34 EDT 2005" 16041 960544 0 0 0 0 5 3 5 2304 27 jdk1.6.0-b44 "Thu Jul 21 03:05:54 EDT 2005" 16041 960547 0 0 0 0 5 3 5 2305 28 jdk1.6.0-b45 "Thu Jul 28 03:26:10 EDT 2005" 16037 960606 0 0 1 0 4 3 4 2306 29 jdk1.6.0-b46 "Thu Aug 04 03:02:48 EDT 2005" 15936 951355 0 0 0 0 4 4 4 2307 30 jdk1.6.0-b47 "Thu Aug 11 03:18:56 EDT 2005" 15964 952387 0 0 1 0 3 4 3 2308 31 jdk1.6.0-b48 "Thu Aug 18 08:10:40 EDT 2005" 15970 953421 0 0 0 0 3 5 3 2309 32 jdk1.6.0-b49 "Thu Aug 25 03:24:38 EDT 2005" 16048 958940 0 0 0 0 3 5 3 2310 33 jdk1.6.0-b50 "Thu Sep 01 01:52:40 EDT 2005" 16287 974937 1 0 0 0 3 5 4 2311 34 jdk1.6.0-b51 "Thu Sep 08 01:55:36 EDT 2005" 16362 979377 0 0 0 0 4 5 4 2312 35 jdk1.6.0-b52 "Thu Sep 15 02:04:08 EDT 2005" 16477 979399 0 0 0 0 4 5 4 2313 36 jdk1.6.0-b53 "Thu Sep 22 02:00:28 EDT 2005" 16019 957900 0 0 1 0 3 5 3 2314 37 jdk1.6.0-b54 "Thu Sep 29 01:54:34 EDT 2005" 16019 957900 0 0 0 0 3 6 3 2315 38 jdk1.6.0-b55 "Thu Oct 06 01:54:14 EDT 2005" 16051 959014 0 0 0 0 3 6 3 2316 39 jdk1.6.0-b56 "Thu Oct 13 01:54:12 EDT 2005" 16211 970835 0 0 0 0 3 6 3 2317 40 jdk1.6.0-b57 "Thu Oct 20 01:55:26 EDT 2005" 16279 971627 0 0 0 0 3 6 3 2318 41 jdk1.6.0-b58 "Thu Oct 27 01:56:30 EDT 2005" 16283 971945 0 0 0 0 3 6 3 2319 42 jdk1.6.0-b59 "Thu Nov 03 01:56:58 EST 2005" 16232 972193 0 0 0 0 3 6 3 2320 43 jdk1.6.0-b60 "Thu Nov 10 01:54:18 EST 2005" 16235 972346 0 0 0 0 3 6 3 2321 </screen> 2322 2323 <para>db.xml </para> 2324 2325 <screen> 2326 computeBugHistory jdk1.6.0-b*/jre/lib/rt.xml | filterBugs -bugPattern IL_ db.xml | mineBugHistory -formatDates 2327 </screen> 2328 2329 <para> Sun JDK1.6.0 FindBugs () 13 14 FindBugs JDK Sun </para> 2330 <mediaobject> 2331 <imageobject> 2332 <imagedata fileref="infiniteRecursiveLoops.png"/> 2333 </imageobject> 2334 </mediaobject> 2335 2336 <para>db.xml jdk1.6.0 ()() :</para> 2337 2338 <screen> 2339 filterBugs -priority M -category C db.xml | mineBugHistory -formatDates 2340 </screen> 2341 2342 <para> :</para> 2343 2344 <screen> 2345 seq version time classes NCSS added newCode fixed removed retained dead active 2346 0 jdk1.6.0-b12 "Thu Nov 11 09:07:20 EST 2004" 13128 811569 0 1075 0 0 0 0 1075 2347 1 jdk1.6.0-b13 "Thu Nov 18 06:02:06 EST 2004" 13128 811570 0 0 0 0 1075 0 1075 2348 2 jdk1.6.0-b14 "Thu Dec 02 06:12:26 EST 2004" 13145 811786 3 0 6 0 1069 0 1072 2349 3 jdk1.6.0-b15 "Thu Dec 09 06:07:04 EST 2004" 13174 811693 2 1 3 0 1069 6 1072 2350 4 jdk1.6.0-b16 "Thu Dec 16 06:21:28 EST 2004" 13175 811715 0 0 1 0 1071 9 1071 2351 5 jdk1.6.0-b17 "Thu Dec 23 06:27:22 EST 2004" 13176 811974 0 0 1 0 1070 10 1070 2352 6 jdk1.6.0-b19 "Thu Jan 13 06:41:16 EST 2005" 13176 812011 0 0 0 0 1070 11 1070 2353 7 jdk1.6.0-b21 "Thu Jan 27 05:57:52 EST 2005" 13177 812173 0 0 1 0 1069 11 1069 2354 8 jdk1.6.0-b23 "Thu Feb 10 05:44:36 EST 2005" 13179 812188 0 0 0 0 1069 12 1069 2355 9 jdk1.6.0-b26 "Thu Mar 03 06:04:02 EST 2005" 13199 811770 0 0 2 1 1066 12 1066 2356 10 jdk1.6.0-b27 "Thu Mar 10 04:48:38 EST 2005" 13189 812440 1 0 1 1 1064 15 1065 2357 11 jdk1.6.0-b28 "Thu Mar 17 02:54:22 EST 2005" 13185 812056 0 0 0 0 1065 17 1065 2358 12 jdk1.6.0-b29 "Thu Mar 24 03:09:20 EST 2005" 13117 809468 3 0 8 26 1031 17 1034 2359 13 jdk1.6.0-b30 "Thu Mar 31 02:53:32 EST 2005" 13118 809501 0 0 0 0 1034 51 1034 2360 14 jdk1.6.0-b31 "Thu Apr 07 03:00:14 EDT 2005" 13117 809572 0 0 0 0 1034 51 1034 2361 15 jdk1.6.0-b32 "Thu Apr 14 02:56:56 EDT 2005" 13169 811096 1 1 0 1 1033 51 1035 2362 16 jdk1.6.0-b33 "Thu Apr 21 02:46:22 EDT 2005" 13187 811942 3 0 2 1 1032 52 1035 2363 17 jdk1.6.0-b34 "Thu Apr 28 02:49:00 EDT 2005" 13195 813488 0 1 0 0 1035 55 1036 2364 18 jdk1.6.0-b35 "Thu May 05 02:49:04 EDT 2005" 13457 829837 0 36 2 0 1034 55 1070 2365 19 jdk1.6.0-b36 "Thu May 12 02:59:46 EDT 2005" 13462 831278 0 0 0 0 1070 57 1070 2366 20 jdk1.6.0-b37 "Thu May 19 02:55:08 EDT 2005" 13464 831971 0 1 1 0 1069 57 1070 2367 21 jdk1.6.0-b38 "Thu May 26 03:08:16 EDT 2005" 13564 836565 1 7 2 6 1062 58 1070 2368 22 jdk1.6.0-b39 "Fri Jun 03 03:10:48 EDT 2005" 13856 849992 6 39 5 0 1065 66 1110 2369 23 jdk1.6.0-b40 "Thu Jun 09 03:30:28 EDT 2005" 15972 959619 7 147 11 0 1099 71 1253 2370 24 jdk1.6.0-b41 "Thu Jun 16 03:19:22 EDT 2005" 15972 959619 0 0 0 0 1253 82 1253 2371 25 jdk1.6.0-b42 "Fri Jun 24 03:38:54 EDT 2005" 15966 958581 3 0 1 2 1250 82 1253 2372 26 jdk1.6.0-b43 "Thu Jul 14 03:09:34 EDT 2005" 16041 960544 5 11 15 8 1230 85 1246 2373 27 jdk1.6.0-b44 "Thu Jul 21 03:05:54 EDT 2005" 16041 960547 0 0 0 0 1246 108 1246 2374 28 jdk1.6.0-b45 "Thu Jul 28 03:26:10 EDT 2005" 16037 960606 19 0 2 0 1244 108 1263 2375 29 jdk1.6.0-b46 "Thu Aug 04 03:02:48 EDT 2005" 15936 951355 13 1 1 32 1230 110 1244 2376 30 jdk1.6.0-b47 "Thu Aug 11 03:18:56 EDT 2005" 15964 952387 163 8 7 20 1217 143 1388 2377 31 jdk1.6.0-b48 "Thu Aug 18 08:10:40 EDT 2005" 15970 953421 0 0 0 0 1388 170 1388 2378 32 jdk1.6.0-b49 "Thu Aug 25 03:24:38 EDT 2005" 16048 958940 1 11 1 0 1387 170 1399 2379 33 jdk1.6.0-b50 "Thu Sep 01 01:52:40 EDT 2005" 16287 974937 19 27 16 7 1376 171 1422 2380 34 jdk1.6.0-b51 "Thu Sep 08 01:55:36 EDT 2005" 16362 979377 1 15 3 0 1419 194 1435 2381 35 jdk1.6.0-b52 "Thu Sep 15 02:04:08 EDT 2005" 16477 979399 0 0 1 1 1433 197 1433 2382 36 jdk1.6.0-b53 "Thu Sep 22 02:00:28 EDT 2005" 16019 957900 13 12 16 20 1397 199 1422 2383 37 jdk1.6.0-b54 "Thu Sep 29 01:54:34 EDT 2005" 16019 957900 0 0 0 0 1422 235 1422 2384 38 jdk1.6.0-b55 "Thu Oct 06 01:54:14 EDT 2005" 16051 959014 1 4 7 0 1415 235 1420 2385 39 jdk1.6.0-b56 "Thu Oct 13 01:54:12 EDT 2005" 16211 970835 6 8 37 0 1383 242 1397 2386 40 jdk1.6.0-b57 "Thu Oct 20 01:55:26 EDT 2005" 16279 971627 0 0 0 0 1397 279 1397 2387 41 jdk1.6.0-b58 "Thu Oct 27 01:56:30 EDT 2005" 16283 971945 0 1 1 0 1396 279 1397 2388 42 jdk1.6.0-b59 "Thu Nov 03 01:56:58 EST 2005" 16232 972193 6 0 5 0 1392 280 1398 2389 43 jdk1.6.0-b60 "Thu Nov 10 01:54:18 EST 2005" 16235 972346 0 0 0 0 1398 285 1398 2390 44 jdk1.6.0-b61 "Thu Nov 17 01:58:42 EST 2005" 16202 971134 2 0 4 0 1394 285 1396 2391 </screen> 2392 </sect2> 2393 2394 <sect2 id="incrementalhistory"> 2395 <title></title> 2396 2397 <para> db.xml b12 - b60 findbugs db.xml b61 :</para> 2398 <screen> 2399 computeBugHistory -output db.xml db.xml jdk1.6.0-b61/jre/lib/rt.xml 2400 </screen> 2401 </sect2> 2402 2403 </sect1> 2404 2405 <sect1 id="antexample"> 2406 <title>Ant </title> 2407 <para>findbugs ant :</para> 2408 <screen> 2409 <![CDATA[ 2410 <project name="analyze_asm_util" default="findbugs"> 2411 <!-- findbugs --> 2412 <property name="findbugs.home" value="/Users/ben/Documents/workspace/findbugs/findbugs" /> 2413 <property name="jvmargs" value="-server -Xss1m -Xmx800m -Duser.language=en -Duser.region=EN -Dfindbugs.home=${findbugs.home}" /> 2414 2415 <path id="findbugs.lib"> 2416 <fileset dir="${findbugs.home}/lib"> 2417 <include name="findbugs-ant.jar"/> 2418 </fileset> 2419 </path> 2420 2421 <taskdef name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask"> 2422 <classpath refid="findbugs.lib" /> 2423 </taskdef> 2424 2425 <taskdef name="computeBugHistory" classname="edu.umd.cs.findbugs.anttask.ComputeBugHistoryTask"> 2426 <classpath refid="findbugs.lib" /> 2427 </taskdef> 2428 2429 <taskdef name="setBugDatabaseInfo" classname="edu.umd.cs.findbugs.anttask.SetBugDatabaseInfoTask"> 2430 <classpath refid="findbugs.lib" /> 2431 </taskdef> 2432 2433 <taskdef name="mineBugHistory" classname="edu.umd.cs.findbugs.anttask.MineBugHistoryTask"> 2434 <classpath refid="findbugs.lib" /> 2435 </taskdef> 2436 2437 <!-- findbugs --> 2438 <target name="findbugs"> 2439 <antcall target="analyze" /> 2440 <antcall target="mine" /> 2441 </target> 2442 2443 <!-- --> 2444 <target name="analyze"> 2445 <!-- asm-util findbugs --> 2446 <findbugs home="${findbugs.home}" 2447 output="xml:withMessages" 2448 timeout="90000000" 2449 reportLevel="experimental" 2450 workHard="true" 2451 effort="max" 2452 adjustExperimental="true" 2453 jvmargs="${jvmargs}" 2454 failOnError="true" 2455 outputFile="out.xml" 2456 projectName="Findbugs" 2457 debug="false"> 2458 <class location="asm-util-3.0.jar" /> 2459 </findbugs> 2460 </target> 2461 2462 <target name="mine"> 2463 2464 <!-- --> 2465 <setBugDatabaseInfo home="${findbugs.home}" 2466 withMessages="true" 2467 name="asm-util-3.0.jar" 2468 input="out.xml" 2469 output="out-rel.xml"/> 2470 2471 <!-- (out-hist.xml) --> 2472 <condition property="mining.historyfile.available"> 2473 <available file="out-hist.xml"/> 2474 </condition> 2475 <condition property="mining.historyfile.notavailable"> 2476 <not> 2477 <available file="out-hist.xml"/> 2478 </not> 2479 </condition> 2480 2481 <!-- () --> 2482 <antcall target="history-init"> 2483 <param name="data.file" value="out-rel.xml" /> 2484 <param name="hist.file" value="out-hist.xml" /> 2485 </antcall> 2486 <!-- --> 2487 <antcall target="history"> 2488 <param name="data.file" value="out-rel.xml" /> 2489 <param name="hist.file" value="out-hist.xml" /> 2490 <param name="hist.summary.file" value="out-hist.txt" /> 2491 </antcall> 2492 </target> 2493 2494 <!-- --> 2495 <target name="history-init" if="mining.historyfile.notavailable"> 2496 <copy file="${data.file}" tofile="${hist.file}" /> 2497 </target> 2498 2499 <!-- --> 2500 <target name="history" if="mining.historyfile.available"> 2501 <!-- ${data.file} ${hist.file} --> 2502 <computeBugHistory home="${findbugs.home}" 2503 withMessages="true" 2504 output="${hist.file}"> 2505 <dataFile name="${hist.file}"/> 2506 <dataFile name="${data.file}"/> 2507 </computeBugHistory> 2508 2509 <!-- ${hist.summary.file} --> 2510 <mineBugHistory home="${findbugs.home}" 2511 formatDates="true" 2512 noTabs="true" 2513 input="${hist.file}" 2514 output="${hist.summary.file}"/> 2515 </target> 2516 2517 </project> 2518 ]]> 2519 </screen> 2520 </sect1> 2521 </chapter> 2522 2523 2524 <!-- 2525 ************************************************************************** 2526 License 2527 ************************************************************************** 2528 --> 2529 2530 <chapter id="license"> 2531 <title></title> 2532 2533 <para>FindBugs FindBugs FindBugs <ulink url="http://www.gnu.org/licenses/lgpl.html">Lesser GNU Public License</ulink> &FindBugs; <filename>LICENSE.txt</filename> </para> 2534 2535 <para> FindBugs <ulink url="http://findbugs.sourceforge.net">FindBugs web </ulink> </para> 2536 2537 </chapter> 2538 2539 2540 <!-- 2541 ************************************************************************** 2542 Acknowledgments 2543 ************************************************************************** 2544 --> 2545 <chapter id="acknowledgments"> 2546 <title></title> 2547 2548 <sect1> 2549 <title></title> 2550 2551 <para>&FindBugs; was originally written by Bill Pugh (<email>pugh (a] cs.umd.edu</email>). 2552 David Hovemeyer (<email>daveho (a] cs.umd.edu</email>) implemented some of the 2553 detectors, added the Swing GUI, and is a co-maintainer.</para> 2554 2555 <para>Mike Fagan (<email>mfagan (a] tde.com</email>) contributed the &Ant; build script, 2556 the &Ant; task, and several enhancements and bug fixes to the GUI.</para> 2557 2558 <para>Germano Leichsenring contributed Japanese translations of the bug 2559 summaries.</para> 2560 2561 <para>David Li contributed the Emacs bug report format.</para> 2562 2563 <para>Peter D. Stout contributed recursive detection of Class-Path 2564 attributes in analyzed Jar files, German translations of 2565 text used in the Swing GUI, and other fixes.</para> 2566 2567 <para>Peter Friese wrote the &FindBugs; Eclipse plugin.</para> 2568 2569 <para>Rohan Lloyd contributed several Mac OS X enhancements, 2570 bug detector improvements, 2571 and maintains the Fink package for &FindBugs;.</para> 2572 2573 <para>Hiroshi Okugawa translated the &FindBugs; manual and 2574 more of the bug summaries into Japanese.</para> 2575 2576 <para>Phil Crosby enhanced the Eclipse plugin to add a view 2577 to display the bug details.</para> 2578 2579 <para>Dave Brosius fixed a number of bugs, added user preferences 2580 to the Swing GUI, improved several bug detectors, and 2581 contributed the string concatenation detector.</para> 2582 2583 <para>Thomas Klaeger contributed a number of bug fixes and 2584 bug detector improvements.</para> 2585 2586 <para>Andrei Loskutov made a number of improvements to the 2587 Eclipse plugin.</para> 2588 2589 <para>Brian Goetz contributed a major refactoring of the 2590 visitor classes to improve readability and understandability.</para> 2591 2592 <para> Pete Angstadt fixed several problems in the Swing GUI.</para> 2593 2594 <para>Francis Lalonde provided a task resource file for the 2595 FindBugs Ant task.</para> 2596 2597 <para>Garvin LeClaire contributed support for output in 2598 Xdocs format, for use by Maven.</para> 2599 2600 <para>Holger Stenzhorn contributed improved German translations of items 2601 in the Swing GUI.</para> 2602 2603 <para>Juha Knuutila contributed Finnish translations of items 2604 in the Swing GUI.</para> 2605 2606 <para>Tanel Lebedev contributed Estonian translations of items 2607 in the Swing GUI.</para> 2608 2609 <para>Hanai Shisei (ruimo) contributed full Japanese translations of 2610 bug messages, and text used in the Swing GUI.</para> 2611 2612 <para>David Cotton contributed Fresh translations for bug 2613 messages and for the Swing GUI.</para> 2614 2615 <para>Michael Tamm contributed support for the "errorProperty" attribute 2616 in the Ant task.</para> 2617 2618 <para>Thomas Kuehne improved the German translation of the Swing GUI.</para> 2619 2620 <para>Len Trigg improved source file support for the Emacs output mode.</para> 2621 2622 <para>Greg Bentz provided a fix for the hashcode/equals detector.</para> 2623 2624 <para>K. Hashimoto contributed internationalization fixes and several other 2625 bug fixes.</para> 2626 2627 <para> 2628 Glenn Boysko contributed support for ignoring specified local 2629 variables in the dead local store detector. 2630 </para> 2631 2632 <para> 2633 Jay Dunning contributed a detector to find equality comparisons 2634 of floating-point values, and overhauled the analysis summary 2635 report and its representation in the saved XML format. 2636 </para> 2637 2638 <para> 2639 Olivier Parent contributed updated French translations for bug descriptions and 2640 Swing GUI. 2641 </para> 2642 2643 <para> 2644 Chris Nappin contributed the <filename>plain.xsl</filename> 2645 stylesheet. 2646 </para> 2647 2648 <para> 2649 Etienne Giraudy contributed the <filename>fancy.xsl</filename> and <filename>fancy-hist.xsl</filename> 2650 stylesheets, and made improvements to the <command>-xml:withMessages</command> 2651 option. 2652 </para> 2653 2654 <para> 2655 Takashi Okamoto fixed bugs in the project preferences dialog 2656 in the Eclipse plugin, and contributed to its internationalization and localization. 2657 </para> 2658 2659 <para>Thomas Einwaller fixed bugs in the project preferences dialog in the Eclipse plugin.</para> 2660 2661 <para>Jeff Knox contributed support for the warningsProperty attribute 2662 in the Ant task.</para> 2663 2664 <para>Peter Hendriks extended the Eclipse plugin preferences, 2665 and fixed a bug related to renaming the Eclipse plugin ID.</para> 2666 2667 <para>Mark McKay contributed an Ant task to launch the findbugs frame.</para> 2668 2669 <para>Dieter von Holten (dvholten) contributed 2670 some German improvements to findbugs_de.properties.</para> 2671 2672 2673 <para>If you have contributed to &FindBugs;, but aren't mentioned above, 2674 please send email to <email>findbugs (a] cs.umd.edu</email> (and also accept 2675 our humble apologies).</para> 2676 2677 </sect1> 2678 2679 <sect1> 2680 <title></title> 2681 2682 <para>&FindBugs; &FindBugs; </para> 2683 2684 <sect2> 2685 <title>BCEL</title> 2686 <para>&FindBugs; includes software developed by the Apache Software Foundation 2687 (<ulink url="http://www.apache.org/">http://www.apache.org/</ulink>). 2688 Specifically, it uses the <ulink url="http://jakarta.apache.org/bcel/">Byte Code 2689 Engineering Library</ulink>.</para> 2690 </sect2> 2691 2692 <sect2> 2693 <title>ASM</title> 2694 <para>&FindBugs; uses the <ulink url="http://asm.objectweb.org/">ASM</ulink> 2695 bytecode framework, which is distributed under the following license:</para> 2696 2697 <blockquote> 2698 <para> 2699 Copyright (c) 2000-2005 INRIA, France Telecom 2700 All rights reserved. 2701 </para> 2702 2703 <para> 2704 Redistribution and use in source and binary forms, with or without 2705 modification, are permitted provided that the following conditions 2706 are met: 2707 </para> 2708 2709 <orderedlist numeration="arabic"> 2710 <listitem><para> 2711 Redistributions of source code must retain the above copyright 2712 notice, this list of conditions and the following disclaimer. 2713 </para></listitem> 2714 <listitem><para> 2715 Redistributions in binary form must reproduce the above copyright 2716 notice, this list of conditions and the following disclaimer in the 2717 documentation and/or other materials provided with the distribution. 2718 </para></listitem> 2719 <listitem><para> 2720 Neither the name of the copyright holders nor the names of its 2721 contributors may be used to endorse or promote products derived from 2722 this software without specific prior written permission. 2723 </para></listitem> 2724 </orderedlist> 2725 2726 <para> 2727 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 2728 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2729 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2730 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 2731 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 2732 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 2733 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 2734 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 2735 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 2736 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 2737 THE POSSIBILITY OF SUCH DAMAGE. 2738 </para> 2739 </blockquote> 2740 </sect2> 2741 2742 <sect2> 2743 <title>DOM4J</title> 2744 <para>&FindBugs; uses <ulink url="http://dom4j.org">DOM4J</ulink>, which is 2745 distributed under the following license:</para> 2746 2747 <blockquote> 2748 <para> 2749 Copyright 2001 (C) MetaStuff, Ltd. All Rights Reserved. 2750 </para> 2751 2752 <para> 2753 Redistribution and use of this software and associated documentation 2754 ("Software"), with or without modification, are permitted provided that 2755 the following conditions are met: 2756 </para> 2757 2758 <orderedlist numeration="arabic"> 2759 <listitem><para> 2760 Redistributions of source code must retain copyright statements and 2761 notices. Redistributions must also contain a copy of this document. 2762 </para></listitem> 2763 <listitem><para> 2764 Redistributions in binary form must reproduce the above copyright 2765 notice, this list of conditions and the following disclaimer in the 2766 documentation and/or other materials provided with the distribution. 2767 </para></listitem> 2768 <listitem><para> 2769 The name "DOM4J" must not be used to endorse or promote products 2770 derived from this Software without prior written permission 2771 of MetaStuff, Ltd. For written permission, please contact 2772 <email>dom4j-info (a] metastuff.com</email>. 2773 </para></listitem> 2774 <listitem><para> 2775 Products derived from this Software may not be called "DOM4J" nor may 2776 "DOM4J" appear in their names without prior written permission of 2777 MetaStuff, Ltd. DOM4J is a registered trademark of MetaStuff, Ltd. 2778 </para></listitem> 2779 <listitem><para> 2780 Due credit should be given to the DOM4J Project (<ulink url="http://dom4j.org/">http://dom4j.org/</ulink>). 2781 </para></listitem> 2782 </orderedlist> 2783 2784 <para> 2785 THIS SOFTWARE IS PROVIDED BY METASTUFF, LTD. AND CONTRIBUTORS ``AS IS'' 2786 AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 2787 THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 2788 PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL METASTUFF, LTD. OR ITS 2789 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 2790 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 2791 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 2792 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 2793 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 2794 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 2795 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2796 </para> 2797 </blockquote> 2798 2799 </sect2> 2800 2801 </sect1> 2802 2803 </chapter> 2804 2805 2806 </book> 2807