Program: 58222
Project: 58222
Buggy source:
@Override public void onViewCreated(View view,Bundle savedInstanceState){
  super.onViewCreated(view,savedInstanceState);
  setHasOptionsMenu(true);
  mThreadClient.getBus().register(mThreadEventHelper);
  mLoadMoreProgressBar=(ProgressBar)view.findViewById(R.id.load_more_progress_bar);
  mRefreshLayout=(XDARefreshLayout)view.findViewById(R.id.swipe_refresh_layout);
  mRefreshLayout.setXDAColourScheme();
  mRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener(){
    @Override public void onRefresh(){
      UIUtils.updateEmptyViewState(getView(),mRecyclerView,mAdapter.getItemCount());
      reloadTheFirstPage();
    }
  }
);
  mRecyclerView=(RecyclerView)view.findViewById(android.R.id.list);
  mRecyclerView.setAdapter(mAdapter);
  mRecyclerView.setLayoutManager(new XDALinerLayoutManager(getActivity()));
  ViewCompat.setOverScrollMode(mRecyclerView,ViewCompat.OVER_SCROLL_NEVER);
  mModeHelper.setRecyclerView(mRecyclerView);
  final FloatingActionButton button=(FloatingActionButton)view.findViewById(R.id.thread_fragment_create_thread);
  button.setOnClickListener(new CreateThreadListener());
  if (CompatUtils.hasL()) {
    CompatUtils.setBackground(button,getResources().getDrawable(R.drawable.fab_background));
  }
 else {
    button.setBackgroundColor(getResources().getColor(R.color.fab_color));
  }
  final ActionBar bar=getActivity().getActionBar();
  bar.show();
  bar.setTitle(mForumTitle);
  bar.setSubtitle(mParentForumTitle);
  if (mInfiniteScrollListener != null) {
    mInfiniteScrollListener.updateRecyclerView(mRecyclerView);
  }
  if (mAdapter.getItemCount() != 0) {
    return;
  }
  if (savedInstanceState == null) {
    loadTheFirstPage();
  }
 else {
    final List<AugmentedUnifiedThread> threads=savedInstanceState.getParcelableArrayList(THREADS_SAVED_STATE);
    if (Utils.isCollectionEmpty(threads)) {
      loadTheFirstPage();
    }
 else {
      mTotalPages=savedInstanceState.getInt(PAGES_SAVED_STATE);
      if (mInfiniteScrollListener == null) {
        mInfiniteScrollListener=createInfiniteScrollListener(mTotalPages);
      }
 else {
      }
      addDataToAdapter(threads);
    }
  }
}

Fixed version (ground truth):
@Override public void onViewCreated(View view,Bundle savedInstanceState){
  super.onViewCreated(view,savedInstanceState);
  setHasOptionsMenu(true);
  mThreadClient.getBus().register(mThreadEventHelper);
  mLoadMoreProgressBar=(ProgressBar)view.findViewById(R.id.load_more_progress_bar);
  mRefreshLayout=(XDARefreshLayout)view.findViewById(R.id.swipe_refresh_layout);
  mRefreshLayout.setXDAColourScheme();
  mRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener(){
    @Override public void onRefresh(){
      UIUtils.updateEmptyViewState(getView(),mRecyclerView,mAdapter.getItemCount());
      reloadTheFirstPage();
    }
  }
);
  mRecyclerView=(RecyclerView)view.findViewById(android.R.id.list);
  mRecyclerView.setAdapter(mAdapter);
  mRecyclerView.setLayoutManager(new XDALinerLayoutManager(getActivity()));
  ViewCompat.setOverScrollMode(mRecyclerView,ViewCompat.OVER_SCROLL_NEVER);
  mModeHelper.setRecyclerView(mRecyclerView);
  final FloatingActionButton button=(FloatingActionButton)view.findViewById(R.id.thread_fragment_create_thread);
  button.setOnClickListener(new CreateThreadListener());
  if (CompatUtils.hasL()) {
    CompatUtils.setBackground(button,getResources().getDrawable(R.drawable.fab_background));
  }
 else {
    button.setBackgroundColor(getResources().getColor(R.color.fab_color));
  }
  final ActionBar bar=getActivity().getActionBar();
  bar.show();
  bar.setTitle(mForumTitle);
  bar.setSubtitle(mParentForumTitle);
  bar.setNavigationMode(ActionBar.NAVIGATION_MODE_LIST);
  bar.setListNavigationCallbacks(mSpinnerAdapter,mSpinnerAdapter);
  bar.setSelectedNavigationItem(mSpinnerAdapter.getCount() - 1);
  if (mInfiniteScrollListener != null) {
    mInfiniteScrollListener.updateRecyclerView(mRecyclerView);
  }
  if (mAdapter.getItemCount() != 0) {
    return;
  }
  if (savedInstanceState == null) {
    loadTheFirstPage();
  }
 else {
    final List<AugmentedUnifiedThread> threads=savedInstanceState.getParcelableArrayList(THREADS_SAVED_STATE);
    if (Utils.isCollectionEmpty(threads)) {
      loadTheFirstPage();
    }
 else {
      mTotalPages=savedInstanceState.getInt(PAGES_SAVED_STATE);
      if (mInfiniteScrollListener == null) {
        mInfiniteScrollListener=createInfiniteScrollListener(mTotalPages);
      }
 else {
      }
      addDataToAdapter(threads);
    }
  }
}