I know I can find out if a variable is null in Java using these techniques:
(var==null)
try { ... } catch (NullPointerException e) { ...}
if (this.superSL.items.get(name).getSource().compareTo(VIsualShoppingList.Source_EXTRA)==0) {
Since it's possible to cause a null pointer exception without even involving a variable:
throw new NullPointerException();
I would have to say that there is no generic way to pin down a null pointer exception to a specific variable.
Your best bet would be to put as few as possible statements on each line so that it becomes obvious what caused the null pointer exception. Consider refactoring your code in the question to look something like this:
List items = this.superSL.items;
String name = items.get(name);
String source = name.getSource();
if (source.compareTo(VIsualShoppingList.Source_EXTRA) == 0) {
// ...
}
It's more lines of code to be sure. But it's also more readable and more maintainable.