Program: 62566
Project: 62566
Buggy source:
@Override protected void initEventAndData(){
  super.initEventAndData();
  mFeedArticleDataList=new ArrayList<>();
  mAdapter=new ArticleListAdapter(R.layout.item_search_pager,mFeedArticleDataList);
  mAdapter.setOnItemClickListener((adapter,view,position) -> {
    articlePosition=position;
    ActivityOptions options=ActivityOptions.makeSceneTransitionAnimation(_mActivity,view,getString(R.string.share_view));
    JudgeUtils.startArticleDetailActivity(_mActivity,options,mAdapter.getData().get(position).getId(),mAdapter.getData().get(position).getTitle(),mAdapter.getData().get(position).getLink(),mAdapter.getData().get(position).isCollect(),false,false);
  }
);
  mAdapter.setOnItemChildClickListener((adapter,view,position) -> {
switch (view.getId()) {
case R.id.item_search_pager_chapterName:
      JudgeUtils.startKnowledgeHierarchyDetailActivity(_mActivity,true,mAdapter.getData().get(position).getSuperChapterName(),mAdapter.getData().get(position).getChapterName(),mAdapter.getData().get(position).getChapterId());
    break;
case R.id.item_search_pager_like_iv:
  likeEvent(position);
break;
case R.id.item_search_pager_tag_red_tv:
String superChapterName=mAdapter.getData().get(position).getSuperChapterName();
if (superChapterName.contains(getString(R.string.open_project))) {
RxBus.getDefault().post(new SwitchProjectEvent());
}
 else if (superChapterName.contains(getString(R.string.navigation))) {
RxBus.getDefault().post(new SwitchNavigationEvent());
}
break;
default :
break;
}
}
);
mRecyclerView.setLayoutManager(new LinearLayoutManager(_mActivity));
LinearLayout mHeaderGroup=((LinearLayout)LayoutInflater.from(_mActivity).inflate(R.layout.head_banner,null));
mBanner=mHeaderGroup.findViewById(R.id.head_banner);
mHeaderGroup.removeView(mBanner);
mAdapter.addHeaderView(mBanner);
mRecyclerView.setAdapter(mAdapter);
setRefresh();
if (!TextUtils.isEmpty(mPresenter.getLoginAccount()) && !TextUtils.isEmpty(mPresenter.getLoginPassword()) && !isRecreate) {
mPresenter.loadMainPagerData();
}
 else {
mPresenter.autoRefresh();
}
if (CommonUtils.isNetworkConnected()) {
showLoading();
}
}

Fixed version (ground truth):
@Override protected void initEventAndData(){
  super.initEventAndData();
  mFeedArticleDataList=new ArrayList<>();
  mAdapter=new ArticleListAdapter(R.layout.item_search_pager,mFeedArticleDataList);
  mAdapter.setOnItemClickListener((adapter,view,position) -> {
    if (mAdapter.getData().size() <= 0 || mAdapter.getData().size() < position) {
      return;
    }
    articlePosition=position;
    ActivityOptions options=ActivityOptions.makeSceneTransitionAnimation(_mActivity,view,getString(R.string.share_view));
    JudgeUtils.startArticleDetailActivity(_mActivity,options,mAdapter.getData().get(position).getId(),mAdapter.getData().get(position).getTitle(),mAdapter.getData().get(position).getLink(),mAdapter.getData().get(position).isCollect(),false,false);
  }
);
  mAdapter.setOnItemChildClickListener((adapter,view,position) -> {
switch (view.getId()) {
case R.id.item_search_pager_chapterName:
      if (mAdapter.getData().size() <= 0 || mAdapter.getData().size() <= position) {
        return;
      }
    JudgeUtils.startKnowledgeHierarchyDetailActivity(_mActivity,true,mAdapter.getData().get(position).getSuperChapterName(),mAdapter.getData().get(position).getChapterName(),mAdapter.getData().get(position).getChapterId());
  break;
case R.id.item_search_pager_like_iv:
likeEvent(position);
break;
case R.id.item_search_pager_tag_red_tv:
if (mAdapter.getData().size() <= 0 || mAdapter.getData().size() <= position) {
return;
}
String superChapterName=mAdapter.getData().get(position).getSuperChapterName();
if (superChapterName.contains(getString(R.string.open_project))) {
RxBus.getDefault().post(new SwitchProjectEvent());
}
 else if (superChapterName.contains(getString(R.string.navigation))) {
RxBus.getDefault().post(new SwitchNavigationEvent());
}
break;
default :
break;
}
}
);
mRecyclerView.setLayoutManager(new LinearLayoutManager(_mActivity));
LinearLayout mHeaderGroup=((LinearLayout)LayoutInflater.from(_mActivity).inflate(R.layout.head_banner,null));
mBanner=mHeaderGroup.findViewById(R.id.head_banner);
mHeaderGroup.removeView(mBanner);
mAdapter.addHeaderView(mBanner);
mRecyclerView.setAdapter(mAdapter);
setRefresh();
if (!TextUtils.isEmpty(mPresenter.getLoginAccount()) && !TextUtils.isEmpty(mPresenter.getLoginPassword()) && !isRecreate) {
mPresenter.loadMainPagerData();
}
 else {
mPresenter.autoRefresh();
}
if (CommonUtils.isNetworkConnected()) {
showLoading();
}
}