What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 131 Stack Exchange communities.

We frequently have questions about NullPointerExceptions in Java where the process is basically the same, with minor variations:

  1. I have a NullPointerException
  2. What's the stack trace?
  3. What's a stack trace?
  4. This is what a stack trace is (in some cases: and this is how modify your code to avoid suppressing it).
  5. OK, here's the stack trace.
  6. Your variable x must be null.
  7. No, it can't be null.
  8. Yes it is, because you've declared it but not initialized it.

or something very similar.

Obviously the ideal answer would be "learn to use a debugger", but this will be too much work for some people, so the second-best answer would be a detailed step-by-step guide that covers all those bases.

Also, obviously there are plenty of duplicates for these questions that must come up when the users are typing in their questions. But I suspect these new users either look at the duplicate questions, and think "That's completely different code, that's not applicable to my situation", or don't even bother to look at them.

share|improve this question
2  
So a "master" question like this for Java, and you would just mark as duplicate? –  gunr2171 Nov 10 '13 at 21:34
1  
Are you serious? –  Yosi Nov 10 '13 at 21:39
    
I'm half-serious. Robots ("bots") have been used for years on Wikipedia, with great success. Even before that, they were used on IRC. They're even starting to post useful comments on Reddit. StackOverflow is kind of behind the times on this one. –  Robin Green Nov 10 '13 at 21:40
4  
This question might be the work of a bot itself, well played! –  davidsleeps Nov 10 '13 at 21:45
2  
Close these as no effort. –  Won't Nov 10 '13 at 21:47
2  
@Won't that is kind of harsh. These are people who don't know what a stack trace is or what to do with one; they lack the basic level of knowledge to know what they don't know. –  Robin Green Nov 10 '13 at 21:48
3  
No, we can't. Where would we find such a nice rep boost? –  Szymon Nov 10 '13 at 21:53
    
What is a stack trace, and how can I use it to debug my application errors? is the first result if I Google "java stack trace". –  Dukeling Nov 10 '13 at 21:57
1  
@Dukeling - Google only works if you know what you're looking for. When a stack trace appears in your logs, I don't think it says "this is called a stack trace". These folks haven't yet learned what all that output they're seeing really is. With that said, I do agree those questions should be closed as a duplicate. –  jmort253 Nov 10 '13 at 22:11
1  
After step 2 above, @jmort253, the asker has the keyword to look for. –  Josh Caswell Nov 10 '13 at 22:12
    
@JoshCaswell - Sure, but we shouldn't let it get past that step. Instead, we should politely say "see this duplicate post for an explanation of what you're problem is and do some further reading on 'stack traces'. Good luck!". But in order to get to step 2, that person has to first get past step 1. –  jmort253 Nov 10 '13 at 22:13
    
That sounds like a plan I can agree with, @jmort253. –  Josh Caswell Nov 10 '13 at 22:15
    
Shouldn't we first fix the "non-static method cannot be referenced from a static context" Java programming bot before we tackle the NPE bot? –  Hovercraft Full Of Eels Nov 11 '13 at 2:56
    
@RobinGreen They may indeed be "people who don't know what a stack trace is or what to do with one; they lack the basic level of knowledge to know what they don't know". While these people may very well need assistance, StackOverflow might not be the place for them. They don't sound like professional and enthusiast programmers, so their questions might not be suitable for StackOverflow. –  Joshua Taylor Nov 11 '13 at 3:02
    
Yup, close as NE. –  Won't Nov 11 '13 at 13:38

1 Answer 1

People in some tags have taken to creating canonical question / answer pairs that they close these questions as duplicate of. For example, How do you parse and process HTML/XML in PHP? or How do I compare strings in Java?

What you describe sounds like a good canonical Q/A (that includes some advice on how to debug, etc.) might work great.

share|improve this answer
3  
For example, stackoverflow.com/questions/513832/… is the duplicate question every time someone posts a question where they used == to compare when they should have used .equals(). Every time I see a question nominated as a duplicate of this, I "robotically" vote to close. It's nice to have more eyes on things, but in this case, it feels like a waste of my time to have to cast that vote. –  Kevin Panko Nov 10 '13 at 22:02
    
Random thought - I would love to see some rule-based similarity for these questions, e.g. if the question is tagged / contains "Java" and contains "NullPointerException", this question always shows up on top of the similar / related questions lists, though we may end up with too many rules / overlapping rules eventually. –  Dukeling Nov 10 '13 at 22:04
    
@Dukeling I think they're doing that to some extent already, in the duplicate dialog that suggests questions –  Pëkka Nov 10 '13 at 22:05
2  
@probablyPekka I assume the similarity checking is fairly generic at the moment - too many other stuff tends to 'confuse' it and it often ends up pointing you in completely the wrong direction. –  Dukeling Nov 10 '13 at 22:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .