There is a bug where if the roster entry has no name, the RosterEntry name field is null which causes setName() to generate a nullpointerexception.
Quick fix:
changed
if (name != null && this.name.equals(name))
to…
if (name != null && !(this.name == null) && this.name.equals(name))