The Dumbest DrJava Bug Report Yet

Looking at DrJava bug reports often makes me upset: Either because there is a bug in DrJava, or because there might be a bug in DrJava, but I can’t know for sure because the user neglected to provide crucial information about the system DrJava was running on and the source code that was edited.

Then there is a completely different category: Bug reports filed by users who are so unbelievably ignorant that they report a bug in a "Hello World"-level program of theirs as a bug in DrJava. That really makes me lose my cool.

In order to vent a little, I herewith present you the dumbest DrJava bug report yet: [ 1914390 ] Unhandled exception: java.lang.NullPointerException.

Check out this masterpiece of software engineering:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import java.io.*;
import java.util.Scanner;

public class ScanFajlli {
  public static void main(String arg[]) throws IOException {
    Scanner s = null;
// String f = null;
   
    try {
      s.useDelimiter("\t");
      s = new Scanner(new BufferedReader(new
                                           FileReader("test.txt")));
     
      while (s.hasNext()) {
        System.out.println(s.next());
      }
    } finally {
      if (s != null) {
        s.close();
      }
    }
  }
}

It’s difficult to put the null value and the method call any closer together. Truly stunning.

Share

About Mathias

Software development engineer. Principal developer of DrJava. Recent Ph.D. graduate from the Department of Computer Science at Rice University.
This entry was posted in Code Pranger, DrJava, Ramblings. Bookmark the permalink.

2 Responses to The Dumbest DrJava Bug Report Yet

  1. Aviad says:

    I went to take a look at the bug, and noticed that it was set to “Closed”. That’s interesting; do you prefer setting these kind of bugs to “Closed” rather than “Not Bug” – it seems to me that using “Not Bug” allows for better statistics regarding amount of bug fixes made in a release etc?

  2. Mathias says:

    Hi Aviad, thanks for your comment. The “status” is either “open”, “pending”, “closed”, or “deleted”. Neither of those options mean “not a bug”. Then there is the “resolution” field, which indicates what was done about the bug report. Among the options there, like “fixed”, “postponed”, “won’t fix” or “works for me”, the option “invalid” seemed to be the closest to “not a bug”.

    I donate to SourceForge and get more information than regular users, but I haven’t dug through all the settings yet. Perhaps there is a way to actually add a “not a bug” option to “resolution”.

    However, setting the “status” to “closed” means for me that the report was properly dealt with. I would have deleted it if a user had obviously submitted the same report twice, for example, but that’s about the only case.

    Thanks again for reading.

Leave a Reply