Program: 32169
Project: 32169
Buggy source:
/** 
 * Store a live room event.
 * @param event The event to be stored.
 */
public void storeLiveRoomEvent(Event event){
  if (!isActive()) {
    Log.e(LOG_TAG,"String_Node_Str");
    return;
  }
  Room room=getRoom(event.roomId);
  if (null != room) {
    boolean store=false;
    if (Event.EVENT_TYPE_REDACTION.equals(event.type)) {
      if (event.getRedacts() != null) {
        mStore.updateEventContent(event.roomId,event.getRedacts(),event.getContentAsJsonObject());
        ArrayList<Event> events=new ArrayList<Event>(mStore.getRoomMessages(event.roomId));
        for (int index=events.size() - 1; index >= 0; index--) {
          Event anEvent=events.get(index);
          if (RoomSummary.isSupportedEvent(anEvent)) {
            store=true;
            event=anEvent;
            break;
          }
        }
      }
    }
 else     if (!Event.EVENT_TYPE_TYPING.equals(event.type) && !Event.EVENT_TYPE_RECEIPT.equals(event.type)) {
      store=!event.isCallEvent() || !Event.EVENT_TYPE_CALL_CANDIDATES.equals(event.type);
      if (Event.EVENT_TYPE_STATE_ROOM_MEMBER.equals(event.type) && mCredentials.userId.equals(event.stateKey)) {
        String membership=event.content.getAsJsonObject().getAsJsonPrimitive("String_Node_Str").getAsString();
        if (RoomMember.MEMBERSHIP_LEAVE.equals(membership) || RoomMember.MEMBERSHIP_BAN.equals(membership)) {
          store=false;
          if (null != this.getStore().getRoom(event.roomId)) {
            this.getStore().deleteRoom(event.roomId);
            this.onLeaveRoom(event.roomId);
          }
        }
      }
    }
    if (store) {
      if ((null != event.getSender()) && (null != event.eventId)) {
        room.handleReceiptData(new ReceiptData(event.getSender(),event.eventId,event.originServerTs));
      }
      mStore.storeLiveRoomEvent(event);
      if (RoomSummary.isSupportedEvent(event)) {
        RoomSummary summary=mStore.storeSummary(event.roomId,event,room.getLiveState(),mCredentials.userId);
        if (Event.EVENT_TYPE_STATE_ROOM_NAME.equals(event.type) || Event.EVENT_TYPE_STATE_ROOM_ALIASES.equals(event.type) || Event.EVENT_TYPE_STATE_ROOM_MEMBER.equals(event.type)) {
          if (null != summary) {
            summary.setName(room.getName(mCredentials.userId));
          }
        }
      }
    }
    if (Event.EVENT_TYPE_STATE_ROOM_CREATE.equals(event.type)) {
      this.onNewRoom(event.roomId);
    }
    if (Event.EVENT_TYPE_STATE_ROOM_MEMBER.equals(event.type) && mCredentials.userId.equals(event.stateKey)) {
      String membership=event.content.getAsJsonObject().getAsJsonPrimitive("String_Node_Str").getAsString();
      if (RoomMember.MEMBERSHIP_JOIN.equals(membership)) {
        this.onJoinRoom(event.roomId);
      }
 else       if (RoomMember.MEMBERSHIP_INVITE.equals(membership)) {
        this.onNewRoom(event.roomId);
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Store a live room event.
 * @param event The event to be stored.
 */
public void storeLiveRoomEvent(Event event){
  if (!isActive()) {
    Log.e(LOG_TAG,"String_Node_Str");
    return;
  }
  Room room=getRoom(event.roomId);
  if (null != room) {
    boolean store=false;
    if (Event.EVENT_TYPE_REDACTION.equals(event.type)) {
      if (event.getRedacts() != null) {
        mStore.updateEventContent(event.roomId,event.getRedacts(),event.getContentAsJsonObject());
        ArrayList<Event> events=new ArrayList<Event>(mStore.getRoomMessages(event.roomId));
        for (int index=events.size() - 1; index >= 0; index--) {
          Event anEvent=events.get(index);
          if (RoomSummary.isSupportedEvent(anEvent)) {
            store=true;
            event=anEvent;
            break;
          }
        }
      }
    }
 else     if (!Event.EVENT_TYPE_TYPING.equals(event.type) && !Event.EVENT_TYPE_RECEIPT.equals(event.type)) {
      store=!event.isCallEvent() || !Event.EVENT_TYPE_CALL_CANDIDATES.equals(event.type);
      if (Event.EVENT_TYPE_STATE_ROOM_MEMBER.equals(event.type) && mCredentials.userId.equals(event.stateKey)) {
        String membership=event.content.getAsJsonObject().getAsJsonPrimitive("String_Node_Str").getAsString();
        if (RoomMember.MEMBERSHIP_LEAVE.equals(membership) || RoomMember.MEMBERSHIP_BAN.equals(membership)) {
          store=false;
        }
      }
    }
    if (store) {
      if ((null != event.getSender()) && (null != event.eventId)) {
        room.handleReceiptData(new ReceiptData(event.getSender(),event.eventId,event.originServerTs));
      }
      mStore.storeLiveRoomEvent(event);
      if (RoomSummary.isSupportedEvent(event)) {
        RoomSummary summary=mStore.storeSummary(event.roomId,event,room.getLiveState(),mCredentials.userId);
        if (Event.EVENT_TYPE_STATE_ROOM_NAME.equals(event.type) || Event.EVENT_TYPE_STATE_ROOM_ALIASES.equals(event.type) || Event.EVENT_TYPE_STATE_ROOM_MEMBER.equals(event.type)) {
          if (null != summary) {
            summary.setName(room.getName(mCredentials.userId));
          }
        }
      }
    }
    if (Event.EVENT_TYPE_STATE_ROOM_CREATE.equals(event.type)) {
      this.onNewRoom(event.roomId);
    }
    if (Event.EVENT_TYPE_STATE_ROOM_MEMBER.equals(event.type) && mCredentials.userId.equals(event.stateKey)) {
      String membership=event.content.getAsJsonObject().getAsJsonPrimitive("String_Node_Str").getAsString();
      if (RoomMember.MEMBERSHIP_JOIN.equals(membership)) {
        this.onJoinRoom(event.roomId);
      }
 else       if (RoomMember.MEMBERSHIP_INVITE.equals(membership)) {
        this.onNewRoom(event.roomId);
      }
    }
  }
}