Program: 32136
Project: 32136
Buggy source:
@Override public View onCreateView(LayoutInflater inflater,ViewGroup container,Bundle savedInstanceState){
  Log.d(LOG_TAG,"String_Node_Str");
  View v=super.onCreateView(inflater,container,savedInstanceState);
  mContext=getActivity().getApplicationContext();
  String roomId=getArguments().getString(ARG_ROOM_ID);
  if (null == mSession) {
    List<Fragment> fragments=null;
    FragmentManager fm=getActivity().getSupportFragmentManager();
    if (null != fm) {
      fragments=fm.getFragments();
    }
    if (null != fragments) {
      for (      Fragment fragment : fragments) {
        if (fragment instanceof MatrixMessageListFragment) {
          mMatrixMessagesListener=(MatrixMessageListFragment)fragment;
          mSession=((MatrixMessageListFragment)fragment).getSession();
        }
      }
    }
  }
  if (mSession == null) {
    throw new RuntimeException("String_Node_Str");
  }
  if (null == mEventTimeline) {
    mEventTimeline=mMatrixMessagesListener.getEventTimeLine();
  }
 else {
    mEventTimeline.addEventTimelineListener(mEventTimelineListener);
    sendInitialMessagesLoaded();
    return v;
  }
  if (null != mEventTimeline) {
    mEventTimeline.addEventTimelineListener(mEventTimelineListener);
    mRoom=mEventTimeline.getRoom();
  }
  if (null == mRoom) {
    mRoom=mSession.getDataHandler().getRoom(roomId);
  }
  if ((null != mEventTimeline) && !mEventTimeline.isLiveTimeline() && (null != mEventTimeline.getInitialEventId())) {
    initializeTimeline();
  }
 else {
    boolean joinedRoom=false;
    if ((mRoom != null) && (null != mEventTimeline)) {
      mEventTimeline.initHistory();
      if (null != mRoom.getState().creator) {
        RoomMember self=mRoom.getMember(mSession.getCredentials().userId);
        if (self != null && RoomMember.MEMBERSHIP_JOIN.equals(self.membership)) {
          joinedRoom=true;
        }
      }
      mRoom.addEventListener(mEventListener);
      if (!mEventTimeline.isLiveTimeline()) {
        previewRoom();
      }
 else       if (!joinedRoom) {
        Log.d(LOG_TAG,"String_Node_Str" + roomId);
        joinRoom();
      }
 else {
        requestInitialHistory();
      }
    }
 else {
      sendInitialMessagesLoaded();
    }
  }
  return v;
}

Fixed version (ground truth):
@Override public View onCreateView(LayoutInflater inflater,ViewGroup container,Bundle savedInstanceState){
  Log.d(LOG_TAG,"String_Node_Str");
  View v=super.onCreateView(inflater,container,savedInstanceState);
  mContext=getActivity().getApplicationContext();
  String roomId=getArguments().getString(ARG_ROOM_ID);
  if (null == mSession) {
    List<Fragment> fragments=null;
    FragmentManager fm=getActivity().getSupportFragmentManager();
    if (null != fm) {
      fragments=fm.getFragments();
    }
    if (null != fragments) {
      for (      Fragment fragment : fragments) {
        if (fragment instanceof MatrixMessageListFragment) {
          mMatrixMessagesListener=(MatrixMessageListFragment)fragment;
          mSession=((MatrixMessageListFragment)fragment).getSession();
        }
      }
    }
  }
  if (mSession == null) {
    throw new RuntimeException("String_Node_Str");
  }
  if (null == mEventTimeline) {
    mEventTimeline=mMatrixMessagesListener.getEventTimeLine();
  }
 else {
    mEventTimeline.addEventTimelineListener(mEventTimelineListener);
    sendInitialMessagesLoaded();
    return v;
  }
  if (null != mEventTimeline) {
    mEventTimeline.addEventTimelineListener(mEventTimelineListener);
    mRoom=mEventTimeline.getRoom();
  }
  if (null == mRoom) {
    mRoom=mSession.getDataHandler().getRoom(roomId);
  }
  if ((null != mEventTimeline) && (null == mEventTimeline.mDataHandler)) {
    mEventTimeline.setDataHandler(mSession.getDataHandler());
  }
  if ((null != mEventTimeline) && !mEventTimeline.isLiveTimeline() && (null != mEventTimeline.getInitialEventId())) {
    initializeTimeline();
  }
 else {
    boolean joinedRoom=false;
    if ((mRoom != null) && (null != mEventTimeline)) {
      mEventTimeline.initHistory();
      if (null != mRoom.getState().creator) {
        RoomMember self=mRoom.getMember(mSession.getCredentials().userId);
        if (self != null && RoomMember.MEMBERSHIP_JOIN.equals(self.membership)) {
          joinedRoom=true;
        }
      }
      mRoom.addEventListener(mEventListener);
      if (!mEventTimeline.isLiveTimeline()) {
        previewRoom();
      }
 else       if (!joinedRoom) {
        Log.d(LOG_TAG,"String_Node_Str" + roomId);
        joinRoom();
      }
 else {
        requestInitialHistory();
      }
    }
 else {
      sendInitialMessagesLoaded();
    }
  }
  return v;
}