findbugs project

Job ID: 32214637

Budget: $10 – $50 USD

The purpose of the project is to achieve a deeper understanding and hands-on experience with a static
analysis tool called FindBugs.
1. Installation
a) Download and Install FindBugs following the descriptions found in this website:
http://findbugs.sourceforge.net/manual/installing.html
Or Download findbugs-3.0.1.zip from blackboard and unzip.
b) Download two jar files from blackboard
Course Documents → Projects & Assignments → jar files download for Static analysis
You need to unzip the zip file to get the jar files.
2. Running
Follow the instructions under the Section “1. Quick Start”, under this link:
http://findbugs.sourceforge.net/manual/running.html
3. Experiments (static analysis):
a. Create a new project,
b. load weka.jar in the “Class archives and directories to analyze” field
c. load weka-src.jar in the “source directories” field
d. Click analyze
4. Submission: A report showing the followings
A. The total number of bugs found
B. How many different categories of bugs found? Show the snapshot as shown in the GUI
C. Choose a subcategory from each of the categories (A,B,C,D,E,F,G,H) as per instruction in each
category box (see Table in next page). For example, if your group number is 5, your subcategory for
category B = 5 % 7 + 1 = 6, that is “stream not closed at all paths”. If you didn’t find the
subcategory, then choose the next available one from the list (Table in the next page)
D. For each bug you have to report the following:
i. The title of the bug (shown in RED in findbugs),
ii. The description of the bug (also shown in findbugs)
iii. The method where the bug is found
iv. The buggy statement, previous two statements and next two statements, with line numbers.
v. The bug fix, i.e., the modification you will do to the code to fix the bug, and resulting code.
E. Find the following subcategory of bugs by browsing through all the categories, and provide a
report (as described in Q 4.D above) for each one:
i. Null pointer dereference
ii. Switch case falls through
iii. Unwritten field
iv. Useless control flow
Related categories: Software Testing Network Security