preemptive error detection with findbugs
TRANSCRIPT
![Page 2: Preemptive Error Detection with FindBugs](https://reader036.vdocuments.us/reader036/viewer/2022062419/557c1da7d8b42a65268b4aef/html5/thumbnails/2.jpg)
Agenda
• What is FindBugs
• Bug Categories
• How to use FindBugs
• Bugs Detection Process
• FindBugs Analysis Report
![Page 3: Preemptive Error Detection with FindBugs](https://reader036.vdocuments.us/reader036/viewer/2022062419/557c1da7d8b42a65268b4aef/html5/thumbnails/3.jpg)
What is FindBugs
• FindBugs uses the Apache BCEL library to analyze the classes in your application and detect potential bugs.
• FindBugs rules (or "detectors") use a variety of inspection techniques, from examining the structure of the class right through to studying the detailed dataflow through the class.
• In addition to the detectors provided by FindBugs, with a bit of work, you can write your own custom-built detectors.
• http://findbugs.sourceforge.net/
![Page 4: Preemptive Error Detection with FindBugs](https://reader036.vdocuments.us/reader036/viewer/2022062419/557c1da7d8b42a65268b4aef/html5/thumbnails/4.jpg)
Bug Categories
![Page 5: Preemptive Error Detection with FindBugs](https://reader036.vdocuments.us/reader036/viewer/2022062419/557c1da7d8b42a65268b4aef/html5/thumbnails/5.jpg)
Bug Categories – cont.
![Page 6: Preemptive Error Detection with FindBugs](https://reader036.vdocuments.us/reader036/viewer/2022062419/557c1da7d8b42a65268b4aef/html5/thumbnails/6.jpg)
How to use FindBugs
In practice, the standalone application is rarely used: developers prefer to be able to invoke FindBugs directly from within their work environment.
In practice, the standalone application is rarely used: developers prefer to be able to invoke FindBugs directly from within their work environment.
![Page 7: Preemptive Error Detection with FindBugs](https://reader036.vdocuments.us/reader036/viewer/2022062419/557c1da7d8b42a65268b4aef/html5/thumbnails/7.jpg)
Bugs Detection Process http://findbugs.sourceforge.net/
Execute ant scriptExecute ant script
![Page 8: Preemptive Error Detection with FindBugs](https://reader036.vdocuments.us/reader036/viewer/2022062419/557c1da7d8b42a65268b4aef/html5/thumbnails/8.jpg)
Bugs Detection Process – Author Ant Build Script
projectFile can be generated via GUI tool.http://0rz.tw/584k0 Get further info: http://0rz.tw/ed4mX
projectFile can be generated via GUI tool.http://0rz.tw/584k0 Get further info: http://0rz.tw/ed4mX
Build.xml
Attach.Attach.
![Page 9: Preemptive Error Detection with FindBugs](https://reader036.vdocuments.us/reader036/viewer/2022062419/557c1da7d8b42a65268b4aef/html5/thumbnails/9.jpg)
Bugs Detection Process – Generate Bug Reports
….
![Page 10: Preemptive Error Detection with FindBugs](https://reader036.vdocuments.us/reader036/viewer/2022062419/557c1da7d8b42a65268b4aef/html5/thumbnails/10.jpg)
FindBugs Analysis Report
![Page 11: Preemptive Error Detection with FindBugs](https://reader036.vdocuments.us/reader036/viewer/2022062419/557c1da7d8b42a65268b4aef/html5/thumbnails/11.jpg)
FindBugs Analysis Report – cont.
![Page 12: Preemptive Error Detection with FindBugs](https://reader036.vdocuments.us/reader036/viewer/2022062419/557c1da7d8b42a65268b4aef/html5/thumbnails/12.jpg)
FindBugs Analysis Report – cont.