Program: 71181
Project: 71181
Buggy source:
@Override protected void onCreate(@Nullable Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_swip_recycler_view);
  setTitleBarTitle(getClass().getSimpleName().replace("String_Node_Str","String_Node_Str"));
  swipeRefreshRecyclerView=findViewById(R.id.swipe_recycler_view);
  swipeRefreshRecyclerView.setLayoutManager(new GridLayoutManager(this,2,RecyclerView.VERTICAL,false));
  DividerItemDecoration decoration=new DividerItemDecoration(this,DividerItemDecoration.VERTICAL);
  decoration.setDrawable(CompatDrawableResourceUtils.getDrawable(this,R.drawable.item_decoration_shape));
  swipeRefreshRecyclerView.getRecyclerView().addItemDecoration(decoration);
  swipeRefreshRecyclerView.getSwipeRefreshLayout().setColorSchemeColors(0xFF3F51B5,0xFF303F9F,0xFFFF4081,Color.CYAN);
  int topMargin=(int)TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP,64,getResources().getDisplayMetrics());
  FrameLayout.LayoutParams params=new FrameLayout.LayoutParams(FrameLayout.LayoutParams.WRAP_CONTENT,FrameLayout.LayoutParams.WRAP_CONTENT);
  params.gravity=Gravity.CENTER_HORIZONTAL;
  params.topMargin=topMargin;
  swipeRefreshRecyclerView.setEmptyView(createEmptyView(),params);
  swipeRefreshRecyclerView.setLoadMoreView(createLoadMoreView());
  swipeRefreshRecyclerView.setCustomRefreshListener(new SwipeRefreshRecyclerView.OnCustomRefreshListener(){
    @Override public void onRefresh(){
      pageIndex=1;
      new Handler().postDelayed(new Runnable(){
        @Override public void run(){
          swipeRefreshRecyclerView.refreshComplete();
          List<Banner> banners=getRandomBanners();
          adapter.setItems(banners);
          swipeRefreshRecyclerView.setHaveMore(banners.size() >= pageSize);
          swipeRefreshRecyclerView.showEmptyViewIfNecessary();
        }
      }
,3000);
    }
    @Override public void onLoadMore(){
      pageIndex++;
      new Handler().postDelayed(new Runnable(){
        @Override public void run(){
          swipeRefreshRecyclerView.loadMoreComplete();
          List<Banner> banners=getRandomBanners();
          adapter.addItems(banners);
          swipeRefreshRecyclerView.setHaveMore(banners.size() >= pageSize);
        }
      }
,3000);
    }
  }
);
  adapter=new LinearAdapter();
  adapter.setOnItemClickListener(new OnItemClickListener<Banner>(){
    @Override public void onItemClick(    View view,    Banner item){
      Toast.makeText(view.getContext(),item.getLabel(),Toast.LENGTH_SHORT).show();
    }
    @Override public void onItemClick(    View view,    Banner item,    int adapterPosition,    int layoutPosition){
    }
  }
);
  adapter.setOnItemLongClickListener(new OnItemLongClickListener<Banner>(){
    @Override public boolean onItemLongClick(    View view,    Banner item){
      return false;
    }
    @Override public boolean onItemLongClick(    View view,    Banner item,    int adapterPosition,    int layoutPosition){
      return false;
    }
  }
);
  swipeRefreshRecyclerView.setAdapter(adapter);
  swipeRefreshRecyclerView.refreshDelay(300);
}

Fixed version (ground truth):
@Override protected void onCreate(@Nullable Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_swip_recycler_view);
  setTitleBarTitle(getClass().getSimpleName().replace("String_Node_Str","String_Node_Str"));
  swipeRefreshRecyclerView=findViewById(R.id.swipe_recycler_view);
  swipeRefreshRecyclerView.setLayoutManager(new GridLayoutManager(this,2,RecyclerView.VERTICAL,false));
  DividerItemDecoration decoration=new DividerItemDecoration(this,DividerItemDecoration.VERTICAL);
  decoration.setDrawable(CompatDrawableResourceUtils.getDrawable(this,R.drawable.item_decoration_shape));
  swipeRefreshRecyclerView.getRecyclerView().addItemDecoration(new HorizontalSpaceItemDecoration(getResources().getDimensionPixelOffset(R.dimen.space_2),getResources().getDimensionPixelOffset(R.dimen.space_4),getResources().getDimensionPixelOffset(R.dimen.space_2),0));
  swipeRefreshRecyclerView.getSwipeRefreshLayout().setColorSchemeColors(0xFF3F51B5,0xFF303F9F,0xFFFF4081,Color.CYAN);
  int topMargin=(int)TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP,64,getResources().getDisplayMetrics());
  FrameLayout.LayoutParams params=new FrameLayout.LayoutParams(FrameLayout.LayoutParams.WRAP_CONTENT,FrameLayout.LayoutParams.WRAP_CONTENT);
  params.gravity=Gravity.CENTER_HORIZONTAL;
  params.topMargin=topMargin;
  swipeRefreshRecyclerView.setEmptyView(createEmptyView(),params);
  swipeRefreshRecyclerView.setLoadMoreView(createLoadMoreView());
  swipeRefreshRecyclerView.setCustomRefreshListener(new SwipeRefreshRecyclerView.OnCustomRefreshListener(){
    @Override public void onRefresh(){
      pageIndex=1;
      new Handler().postDelayed(new Runnable(){
        @Override public void run(){
          swipeRefreshRecyclerView.refreshComplete();
          List<Banner> banners=getRandomBanners();
          adapter.setItems(banners);
          swipeRefreshRecyclerView.setHaveMore(banners.size() >= pageSize);
          swipeRefreshRecyclerView.showEmptyViewIfNecessary();
        }
      }
,3000);
    }
    @Override public void onLoadMore(){
      pageIndex++;
      new Handler().postDelayed(new Runnable(){
        @Override public void run(){
          swipeRefreshRecyclerView.loadMoreComplete();
          List<Banner> banners=getRandomBanners();
          adapter.addItems(banners);
          swipeRefreshRecyclerView.setHaveMore(banners.size() >= pageSize);
        }
      }
,3000);
    }
  }
);
  adapter=new LinearAdapter();
  adapter.setOnItemClickListener(new OnItemClickListener<Banner>(){
    @Override public void onItemClick(    View view,    Banner item){
      Toast.makeText(view.getContext(),item.getLabel(),Toast.LENGTH_SHORT).show();
    }
    @Override public void onItemClick(    View view,    Banner item,    int adapterPosition,    int layoutPosition){
    }
  }
);
  adapter.setOnItemLongClickListener(new OnItemLongClickListener<Banner>(){
    @Override public boolean onItemLongClick(    View view,    Banner item){
      return false;
    }
    @Override public boolean onItemLongClick(    View view,    Banner item,    int adapterPosition,    int layoutPosition){
      return false;
    }
  }
);
  swipeRefreshRecyclerView.setAdapter(adapter);
  swipeRefreshRecyclerView.refreshDelay(300);
}