Program: 162582
Project: 162582
Buggy source:
@Override public void onActivityCreated(Bundle savedInstanceState){
  super.onActivityCreated(savedInstanceState);
  setHasOptionsMenu(false);
  mainActivity=(MainActivity)getActivity();
  utils=new Futils();
  String x=getSelectionColor();
  skinselection=Color.parseColor(x);
  color=calculatevalues(x);
  ColorMatrix colorMatrix=new ColorMatrix(calculatefilter(color));
  colorMatrixColorFilter=new ColorMatrixColorFilter(colorMatrix);
  history=new HistoryManager(getActivity(),"String_Node_Str");
  hidden=new HistoryManager(getActivity(),"String_Node_Str");
  hiddenfiles=hidden.readTable();
  rootMode=Sp.getBoolean("String_Node_Str",false);
  showHidden=Sp.getBoolean("String_Node_Str",false);
  coloriseIcons=Sp.getBoolean("String_Node_Str",false);
  if (islist) {
    folder=res.getDrawable(R.drawable.ic_grid_folder_new);
  }
 else {
    folder=res.getDrawable(R.drawable.ic_grid_folder1);
  }
  folder=res.getDrawable(R.drawable.ic_grid_folder_new);
  getSortModes();
  darkimage=res.getDrawable(R.drawable.ic_doc_image_dark);
  darkvideo=res.getDrawable(R.drawable.ic_doc_video_dark);
  this.setRetainInstance(false);
  File f;
  if (savepaths)   f=new File(current);
 else   f=new File(home);
  mainActivity.initiatebbar();
  scroll=(HorizontalScrollView)rootView.findViewById(R.id.scroll);
  scroll1=(HorizontalScrollView)rootView.findViewById(R.id.scroll1);
  footerView=getActivity().getLayoutInflater().inflate(R.layout.divider,null);
  mSwipeRefreshLayout=(SwipeRefreshLayout)rootView.findViewById(R.id.activity_main_swipe_refresh_layout);
  mSwipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener(){
    @Override public void onRefresh(){
      loadlist(new File(current),false);
    }
  }
);
  if (savedInstanceState == null) {
    if (Intentpath != null) {
      File file1=new File(Intentpath);
      if (file1.isDirectory()) {
        loadlist(file1,false);
      }
 else {
        utils.openFile(file1,mainActivity);
        loadlist(f,false);
      }
    }
 else {
      loadlist(f,false);
    }
  }
 else {
    Bundle b=new Bundle();
    String cur=savedInstanceState.getString("String_Node_Str");
    if (cur != null) {
      b.putInt("String_Node_Str",savedInstanceState.getInt("String_Node_Str"));
      b.putInt("String_Node_Str",savedInstanceState.getInt("String_Node_Str"));
      scrolls.put(cur,b);
      list=savedInstanceState.getParcelableArrayList("String_Node_Str");
      if (savedInstanceState.getBoolean("String_Node_Str")) {
        try {
          results=true;
          slist=savedInstanceState.getParcelableArrayList("String_Node_Str");
          ((TextView)ma.pathbar.findViewById(R.id.pathname)).setText(ma.utils.getString(ma.getActivity(),R.string.searchresults));
          ma.adapter=new Recycleradapter(ma,slist,ma.getActivity());
          ma.listView.setAdapter(ma.adapter);
          ma.results=true;
        }
 catch (        Exception e) {
        }
      }
 else {
        createViews(list,true,new File(cur));
      }
      if (savedInstanceState.getBoolean("String_Node_Str")) {
        for (        int i : savedInstanceState.getIntegerArrayList("String_Node_Str")) {
          adapter.toggleChecked(i);
        }
      }
    }
  }
  mSwipeRefreshLayout.setProgressViewOffset(true,paddingTop,paddingTop + dpToPx(72));
}

Fixed version (ground truth):
@Override public void onActivityCreated(Bundle savedInstanceState){
  super.onActivityCreated(savedInstanceState);
  setHasOptionsMenu(false);
  mainActivity=(MainActivity)getActivity();
  utils=new Futils();
  String x=getSelectionColor();
  skinselection=Color.parseColor(x);
  color=calculatevalues(x);
  ColorMatrix colorMatrix=new ColorMatrix(calculatefilter(color));
  colorMatrixColorFilter=new ColorMatrixColorFilter(colorMatrix);
  history=new HistoryManager(getActivity(),"String_Node_Str");
  hidden=new HistoryManager(getActivity(),"String_Node_Str");
  hiddenfiles=hidden.readTable();
  rootMode=Sp.getBoolean("String_Node_Str",false);
  showHidden=Sp.getBoolean("String_Node_Str",false);
  coloriseIcons=Sp.getBoolean("String_Node_Str",false);
  if (islist) {
    folder=res.getDrawable(R.drawable.ic_grid_folder_new);
  }
 else {
    folder=res.getDrawable(R.drawable.ic_grid_folder1);
  }
  folder=res.getDrawable(R.drawable.ic_grid_folder_new);
  getSortModes();
  darkimage=res.getDrawable(R.drawable.ic_doc_image_dark);
  darkvideo=res.getDrawable(R.drawable.ic_doc_video_dark);
  this.setRetainInstance(false);
  File f;
  if (savepaths)   f=new File(current);
 else   f=new File(home);
  mainActivity.initiatebbar();
  scroll=(HorizontalScrollView)rootView.findViewById(R.id.scroll);
  scroll1=(HorizontalScrollView)rootView.findViewById(R.id.scroll1);
  footerView=getActivity().getLayoutInflater().inflate(R.layout.divider,null);
  mSwipeRefreshLayout=(SwipeRefreshLayout)rootView.findViewById(R.id.activity_main_swipe_refresh_layout);
  mSwipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener(){
    @Override public void onRefresh(){
      loadlist(new File(current),false);
    }
  }
);
  if (savedInstanceState == null) {
    if (Intentpath != null) {
      File file1=new File(Intentpath);
      if (file1.isDirectory()) {
        loadlist(file1,false);
      }
 else {
        utils.openFile(file1,mainActivity);
        loadlist(f,false);
      }
    }
 else {
      loadlist(f,false);
    }
  }
 else {
    Bundle b=new Bundle();
    String cur=savedInstanceState.getString("String_Node_Str");
    if (cur != null) {
      b.putInt("String_Node_Str",savedInstanceState.getInt("String_Node_Str"));
      b.putInt("String_Node_Str",savedInstanceState.getInt("String_Node_Str"));
      scrolls.put(cur,b);
      list=savedInstanceState.getParcelableArrayList("String_Node_Str");
      if (savedInstanceState.getBoolean("String_Node_Str")) {
        try {
          results=true;
          slist=savedInstanceState.getParcelableArrayList("String_Node_Str");
          ((TextView)ma.pathbar.findViewById(R.id.pathname)).setText(ma.utils.getString(ma.getActivity(),R.string.searchresults));
          ma.adapter=new Recycleradapter(ma,slist,ma.getActivity());
          ma.listView.setAdapter(ma.adapter);
          ma.results=true;
        }
 catch (        Exception e) {
        }
      }
 else {
        createViews(list,true,new File(cur));
      }
      if (savedInstanceState.getBoolean("String_Node_Str")) {
        for (        int i : savedInstanceState.getIntegerArrayList("String_Node_Str")) {
          adapter.toggleChecked(i);
        }
      }
    }
  }
  mToolbarHeight=getToolbarHeight(getActivity());
  paddingTop=(mToolbarHeight) + dpToPx(72);
  if (hidemode == 2)   mToolbarHeight=paddingTop;
  mToolbarContainer.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener(){
    @Override public void onGlobalLayout(){
      if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.JELLY_BEAN) {
        mToolbarContainer.getViewTreeObserver().removeOnGlobalLayoutListener(this);
      }
 else {
        mToolbarContainer.getViewTreeObserver().removeGlobalOnLayoutListener(this);
      }
      paddingTop=mToolbarContainer.getHeight();
      if (hidemode != 2)       mToolbarHeight=mainActivity.toolbar.getHeight();
      if (scrollListener != null)       scrollListener.updatedimens(mToolbarHeight);
    }
  }
);
  scrollListener=new HidingScrollListener(mToolbarHeight){
    @Override public void onMoved(    int distance){
      mToolbarContainer.setTranslationY(-distance);
    }
    @Override public void onShow(){
      mToolbarContainer.animate().translationY(0).setInterpolator(new DecelerateInterpolator(2)).start();
    }
    @Override public void onHide(){
      mToolbarContainer.findViewById(R.id.lin).animate().translationY(-mToolbarHeight).setInterpolator(new AccelerateInterpolator(2)).start();
    }
  }
;
  mSwipeRefreshLayout.setProgressViewOffset(true,paddingTop,paddingTop + dpToPx(72));
}