Program: 2595
Project: 2595
Buggy source:
public RoomNotificationPresenter(final XmppSession session,final XmppRoster roster,final RoomPresenter roomPresenter,final Room room){
  this.roomPresenter=roomPresenter;
  me=session.getCurrentUserURI().getNode();
  room.addOccupantChangedHandler(new OccupantChangedHandler(){
    @Override public void onOccupantChanged(    final OccupantChangedEvent event){
      if (event.isAdded()) {
        final String body=i18n().occupantHasJoined(event.getOccupant().getNick());
        show(body);
      }
 else       if (event.isRemoved()) {
        if (!me.equals(event.getOccupant().getUserUri().getNode())) {
          final String body=i18n().occupantHasLeft(event.getOccupant().getNick());
          show(body);
        }
      }
    }
  }
);
  RoomSubject.addRoomSubjectChangedHandler(room,new RoomSubjectChangedHandler(){
    @Override public void onSubjectChanged(    final RoomSubjectChangedEvent event){
      final Occupant occupant=room.getOccupantByOccupantUri(event.getOccupantUri());
      String message;
      if (occupant != null) {
        message=i18n().roomSubjectChanged(occupant.getNick(),event.getSubject());
      }
 else {
        message=i18n().roomSubjectChangedAnonymous(event.getSubject());
      }
      show(message);
    }
  }
);
  room.addRoomInvitationSentHandler(new RoomInvitationSentHandler(){
    private boolean isEmpty(    final String reason){
      return (reason == null) || reason.trim().equals("String_Node_Str");
    }
    @Override public void onRoomInvitationSent(    final RoomInvitationSentEvent event){
      final XmppURI userJid=event.getUserJid();
      final RosterItem item=roster.getItemByJID(userJid);
      final String name=((item != null) && (item.getName() != null)) ? item.getName() : userJid.getNode();
      final String body=isEmpty(event.getReasonText()) ? i18n().invitationSent(name) : i18n().invitationSentWithReason(name,event.getReasonText());
      show(body);
    }
  }
);
}

Fixed version (ground truth):
public RoomNotificationPresenter(final XmppSession session,final XmppRoster roster,final RoomPresenter roomPresenter,final Room room){
  this.roomPresenter=roomPresenter;
  me=session.getCurrentUserURI().getNode();
  room.addOccupantChangedHandler(new OccupantChangedHandler(){
    @Override public void onOccupantChanged(    final OccupantChangedEvent event){
      if (event.isAdded()) {
        final String body=i18n().occupantHasJoined(event.getOccupant().getNick());
        show(body);
      }
 else       if (event.isRemoved()) {
        final XmppURI occupantUserUri=event.getOccupant().getUserUri();
        final String node=occupantUserUri != null ? occupantUserUri.getNode() : null;
        if (!me.equals(node)) {
          final String body=i18n().occupantHasLeft(event.getOccupant().getNick());
          show(body);
        }
      }
    }
  }
);
  RoomSubject.addRoomSubjectChangedHandler(room,new RoomSubjectChangedHandler(){
    @Override public void onSubjectChanged(    final RoomSubjectChangedEvent event){
      final Occupant occupant=room.getOccupantByOccupantUri(event.getOccupantUri());
      String message;
      if (occupant != null) {
        message=i18n().roomSubjectChanged(occupant.getNick(),event.getSubject());
      }
 else {
        message=i18n().roomSubjectChangedAnonymous(event.getSubject());
      }
      show(message);
    }
  }
);
  room.addRoomInvitationSentHandler(new RoomInvitationSentHandler(){
    @Override public void onRoomInvitationSent(    final RoomInvitationSentEvent event){
      final XmppURI userJid=event.getUserJid();
      final RosterItem item=roster.getItemByJID(userJid);
      final String name=((item != null) && (item.getName() != null)) ? item.getName() : userJid.getNode();
      final String body=isEmpty(event.getReasonText()) ? i18n().invitationSent(name) : i18n().invitationSentWithReason(name,event.getReasonText());
      show(body);
    }
    private boolean isEmpty(    final String reason){
      return (reason == null) || reason.trim().equals("String_Node_Str");
    }
  }
);
}