title: print the class of the object(or the source code) that cause null pointer exception in Java
body: <p>Let's say there is a <strong>NullPointerException</strong> and I catch it.
  Can I somehow retrieve the name of the object that was null?  or 'most probably' was null?
  Or even better - retrieving the source code that the exception most likely occurred?</p>
  
  <p>We have a regression with thousands of tests, and many tests fail msg is something like <em>"NPE in line number.."</em>
  So we need to go to the source code of the test and see what was null... I would like to be able to put this info in the test log and to save us lots of time.
  Thanks</p>