- A Concurrent Affair - https://www.concurrentaffair.org -

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 [1].

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 [2] arg[]) throws IOException [3] {
    Scanner s = null;
// String f = null;
   
    try {
      s.useDelimiter("\t");
      s = new Scanner(new BufferedReader [4](new
                                           FileReader [5]("test.txt")));
     
      while (s.hasNext()) {
        System [6].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.

[7] [8]Share [9]
2 Comments (Open | Close)

2 Comments To "The Dumbest DrJava Bug Report Yet"

#1 Comment By Aviad On April 22, 2008 @ 10:48

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 Comment By Mathias On April 22, 2008 @ 11:32

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.