Program: 172398
Project: 172398
Buggy source:
@Override public void getMessageFromFirebaseUser(String senderUid,String receiverUid){
  final String room_type_1=senderUid + "String_Node_Str" + receiverUid;
  final String room_type_2=receiverUid + "String_Node_Str" + senderUid;
  final DatabaseReference databaseReference=FirebaseDatabase.getInstance().getReference();
  databaseReference.child(Constants.INSTANCE.getARG_CHAT_ROOMS()).getRef().addListenerForSingleValueEvent(new ValueEventListener(){
    @Override public void onDataChange(    DataSnapshot dataSnapshot){
      if (dataSnapshot.hasChild(room_type_1)) {
        Log.e(TAG,"String_Node_Str" + room_type_1 + "String_Node_Str");
        FirebaseDatabase.getInstance().getReference().child(Constants.INSTANCE.getARG_CHAT_ROOMS()).child(room_type_1).addChildEventListener(new ChildEventListener(){
          @Override public void onChildAdded(          DataSnapshot dataSnapshot,          String s){
            Chat chat=dataSnapshot.getValue(Chat.class);
            mOnGetMessagesListener.onGetMessagesSuccess(chat);
          }
          @Override public void onChildChanged(          DataSnapshot dataSnapshot,          String s){
          }
          @Override public void onChildRemoved(          DataSnapshot dataSnapshot){
          }
          @Override public void onChildMoved(          DataSnapshot dataSnapshot,          String s){
          }
          @Override public void onCancelled(          DatabaseError databaseError){
            mOnGetMessagesListener.onGetMessagesFailure("String_Node_Str" + databaseError.getMessage());
          }
        }
);
      }
 else       if (dataSnapshot.hasChild(room_type_2)) {
        Log.e(TAG,"String_Node_Str" + room_type_2 + "String_Node_Str");
        FirebaseDatabase.getInstance().getReference().child(Constants.INSTANCE.getARG_CHAT_ROOMS()).child(room_type_2).addChildEventListener(new ChildEventListener(){
          @Override public void onChildAdded(          DataSnapshot dataSnapshot,          String s){
            Chat chat=dataSnapshot.getValue(Chat.class);
            mOnGetMessagesListener.onGetMessagesSuccess(chat);
          }
          @Override public void onChildChanged(          DataSnapshot dataSnapshot,          String s){
          }
          @Override public void onChildRemoved(          DataSnapshot dataSnapshot){
          }
          @Override public void onChildMoved(          DataSnapshot dataSnapshot,          String s){
          }
          @Override public void onCancelled(          DatabaseError databaseError){
            mOnGetMessagesListener.onGetMessagesFailure("String_Node_Str" + databaseError.getMessage());
          }
        }
);
      }
 else {
        Log.e(TAG,"String_Node_Str");
      }
    }
    @Override public void onCancelled(    DatabaseError databaseError){
      mOnGetMessagesListener.onGetMessagesFailure("String_Node_Str" + databaseError.getMessage());
    }
  }
);
}

Fixed version (ground truth):
@Override public void getMessageFromFirebaseUser(@NonNull String senderUid,@NonNull String receiverUid){
  final String room_type_1=senderUid + "String_Node_Str" + receiverUid;
  final String room_type_2=receiverUid + "String_Node_Str" + senderUid;
  final DatabaseReference databaseReference=FirebaseDatabase.getInstance().getReference();
  databaseReference.child(Constants.INSTANCE.getARG_CHAT_ROOMS()).getRef().addListenerForSingleValueEvent(new ValueEventListener(){
    @Override public void onDataChange(    DataSnapshot dataSnapshot){
      if (dataSnapshot.hasChild(room_type_1)) {
        Log.e(TAG,"String_Node_Str" + room_type_1 + "String_Node_Str");
        FirebaseDatabase.getInstance().getReference().child(Constants.INSTANCE.getARG_CHAT_ROOMS()).child(room_type_1).addChildEventListener(new ChildEventListener(){
          @Override public void onChildAdded(          DataSnapshot dataSnapshot,          String s){
            Chat chat=dataSnapshot.getValue(Chat.class);
            mOnGetMessagesListener.onGetMessagesSuccess(chat);
          }
          @Override public void onChildChanged(          DataSnapshot dataSnapshot,          String s){
          }
          @Override public void onChildRemoved(          DataSnapshot dataSnapshot){
          }
          @Override public void onChildMoved(          DataSnapshot dataSnapshot,          String s){
          }
          @Override public void onCancelled(          DatabaseError databaseError){
            mOnGetMessagesListener.onGetMessagesFailure("String_Node_Str" + databaseError.getMessage());
          }
        }
);
      }
 else       if (dataSnapshot.hasChild(room_type_2)) {
        Log.e(TAG,"String_Node_Str" + room_type_2 + "String_Node_Str");
        FirebaseDatabase.getInstance().getReference().child(Constants.INSTANCE.getARG_CHAT_ROOMS()).child(room_type_2).addChildEventListener(new ChildEventListener(){
          @Override public void onChildAdded(          DataSnapshot dataSnapshot,          String s){
            Chat chat=dataSnapshot.getValue(Chat.class);
            mOnGetMessagesListener.onGetMessagesSuccess(chat);
          }
          @Override public void onChildChanged(          DataSnapshot dataSnapshot,          String s){
          }
          @Override public void onChildRemoved(          DataSnapshot dataSnapshot){
          }
          @Override public void onChildMoved(          DataSnapshot dataSnapshot,          String s){
          }
          @Override public void onCancelled(          DatabaseError databaseError){
            mOnGetMessagesListener.onGetMessagesFailure("String_Node_Str" + databaseError.getMessage());
          }
        }
);
      }
 else {
        Log.e(TAG,"String_Node_Str");
      }
    }
    @Override public void onCancelled(    DatabaseError databaseError){
      mOnGetMessagesListener.onGetMessagesFailure("String_Node_Str" + databaseError.getMessage());
    }
  }
);
}