Program: 39383
Project: 39383
Buggy source:
@Override public View onCreateView(LayoutInflater inflater,ViewGroup container,Bundle savedInstanceState){
  recordManager=new RecordManager(getActivity());
  View view=inflater.inflate(R.layout.record_frg_layout,container,false);
  backGround=view.findViewById(R.id.background);
  mAddRecordBt=(FloatingActionButton)view.findViewById(R.id.add_new_record);
  mAddRecordBt.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View v){
      Intent intent=new Intent(getActivity(),CreateOrEditRecordActivity.class);
      getActivity().startActivityForResult(intent,MainActivity.REQUEST_RECORD);
    }
  }
);
  foot=View.inflate(getActivity(),R.layout.record_foot,null);
  footTv=((TextView)foot.findViewById(R.id.foot_tip));
  nullTipTv=((TextView)view.findViewById(R.id.null_tip));
  recordLv=(ListView)view.findViewById(R.id.record_lv);
  recordLv.addFooterView(foot);
  recordDetailDOs=new ArrayList<>();
  mRecordAdapter=new RecordAdapter(getActivity(),recordDetailDOs,this);
  recordLv.setAdapter(mRecordAdapter);
  recordLv.setOverScrollMode(View.OVER_SCROLL_NEVER);
  reload(true);
  recordLv.setOnScrollListener(new AbsListView.OnScrollListener(){
    @Override public void onScrollStateChanged(    AbsListView view,    int scrollState){
    }
    @Override public void onScroll(    AbsListView view,    int firstVisibleItem,    int visibleItemCount,    int totalItemCount){
      if (totalItemCount == 0)       return;
      if (firstVisibleItem + visibleItemCount == totalItemCount && !isRefresh) {
        loadData();
      }
    }
  }
);
  ((MainActivity)getActivity()).setReloadRecordCallBack(this);
  return view;
}

Fixed version (ground truth):
@Override public View onCreateView(LayoutInflater inflater,ViewGroup container,Bundle savedInstanceState){
  recordManager=new RecordManager(getActivity());
  View view=inflater.inflate(R.layout.record_frg_layout,container,false);
  backGround=view.findViewById(R.id.background);
  mAddRecordBt=(FloatingActionButton)view.findViewById(R.id.add_new_record);
  mAddRecordBt.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View v){
      mRecordAdapter.resetOptStatus();
      Intent intent=new Intent(getActivity(),CreateOrEditRecordActivity.class);
      getActivity().startActivityForResult(intent,MainActivity.REQUEST_RECORD);
    }
  }
);
  foot=View.inflate(getActivity(),R.layout.record_foot,null);
  footTv=((TextView)foot.findViewById(R.id.foot_tip));
  nullTipTv=((TextView)view.findViewById(R.id.null_tip));
  recordLv=(ListView)view.findViewById(R.id.record_lv);
  recordLv.addFooterView(foot);
  recordDetailDOs=new ArrayList<>();
  mRecordAdapter=new RecordAdapter(getActivity(),recordDetailDOs,this);
  recordLv.setAdapter(mRecordAdapter);
  recordLv.setOverScrollMode(View.OVER_SCROLL_NEVER);
  reload(true);
  recordLv.setOnScrollListener(new AbsListView.OnScrollListener(){
    @Override public void onScrollStateChanged(    AbsListView view,    int scrollState){
    }
    @Override public void onScroll(    AbsListView view,    int firstVisibleItem,    int visibleItemCount,    int totalItemCount){
      if (totalItemCount == 0)       return;
      if (firstVisibleItem + visibleItemCount == totalItemCount && !isRefresh) {
        loadData();
      }
    }
  }
);
  ((MainActivity)getActivity()).setReloadRecordCallBack(this);
  return view;
}