Computer Science 507
Software Engineering
Spring 2013, The College of Saint Rose
This week's lab exercise will introduce you to a tool that analyzes Java code for potential errors. Of course, it is impossible for a program to find all possible errors in another program. However, there are many common errors that can be found.
You may work alone or in groups of 2 or 3 for these exercises.
FindBugs Installation and Setup
The tool we will use this week is called FindBugs from the University of Maryland.
FindBugs finds bugs in Java programs, and is itself a Java program. That makes it very easy to install and use either standalone or as an Eclipse plugin. It is up to you how you decide to run FindBugs.
Follow the instructions in the FindBugs Manual to download, install, and run FindBugs on a computer of your choice.
A Simple Example
Copy the Java files from the directory /home/cs433/examples/javageneric on mogul.strose.edu to the computer where you installed FindBugs. Set up a project, add the directory containing the "javageneric" example code to the project and run an analysis.
A Larger Example
Next, we will analyze a larger Java example. If you have a Java program that you'd like to use (minimum 10 non-trival Java classes), please feel free to do so. Otherwise, you can use the "Structure package", the source code of which is available from here. To analyze this one, you'll add the "structure5" directory that is produced when you extract the gzip'ed tar file.
Interaction with JUnit
Submission and Grading
To submit the assignment, send your responses to the questions above to terescoj AT strose.edu by 6:00 PM, Monday, April 8, 2013. Please include a meaningful subject line (something like "CS507 Lab 7 Submission").
This lab will be graded out of 20 points.