JavaWizard

Summary:  The goal of the JavaWizard (JWiz) project is to uncover information about the kinds of errors made by Java programmers, and use this information to determine ways in which to improve overall Java software quality.  Better understanding of Java programming errors could lead to improvements in Java software quality in a number of ways, such as:

  • Redesign to prevent/reduce the occurrence of errors due to poor class library design;
  • Targeting problematic idioms or domains where increased education and emphasis is necessary.
  • Automated tool support for error detection.

Our approach involves the development and use of a software tool named JavaWizard (or JWiz). JWiz is a source code analysis tool which searches for certain types of run-time programming errors (such as the use of “==” rather than the “equals” method to compare two strings). Over 50 kinds of Java programming errors are searched for using this tool.

We performed a case study over a period of four weeks, where several student programming projects were analyzed for the occurrence of programming errors of the kind searched for by JavaWiz. The case study was designed to assess whether JavaWiz was useful for detection of Java programming errors, and whether the kinds of errors found appear to suggest useful improvements to the language. Programmers submitted their program after the first clean compile, but before performing any testing. We analyzed these programs using JWiz. After the programmers completed debugging the program (and recording the time spent removing each defect), we gave them the results of the JWiz analysis and asked them which errors they had found during their debugging and how long it took them to remove the errors.

We collected data from 14 students over three programming projects which produced approximately 12,800 lines of code. JavaWiz raised 267 warnings on this code. We classified each warning as one of the following:

  1. Functional errors, where the warning must be fixed for the program to work properly.
  2. Maintenance errors, where the warning need not be fixed, but the code would be considered to be bad style.
  3. False positives, where the warning was produced by code that was properly implemented, according to the developer.

Out of 267 JWiz warnings, there were 79 functional errors, 110 maintenance errors, and 78 false positives. In the case of functional errors, we were able to collect data on the time spent by programmers to detect the errors that JWiz found automatically. This data shows that JavaWizard could have eliminated a total of five and a half hours, or 7.3 percent of the total time spent debugging in the test phase.

Principal researcher(s): Jennifer Geis

Publications: Citations and publications

Project Page: Not available.

Status: Active development 1997 – 1998.