Program: 162621
Project: 162621
Buggy source:
@Override public void onActivityCreated(Bundle savedInstanceState){
  super.onActivityCreated(savedInstanceState);
  setHasOptionsMenu(false);
  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);
  scroll=(HorizontalScrollView)rootView.findViewById(R.id.scroll);
  scroll1=(HorizontalScrollView)rootView.findViewById(R.id.scroll1);
  uimode=Integer.parseInt(Sp.getString("String_Node_Str","String_Node_Str"));
  if (uimode == 1 && islist) {
    float scale=getResources().getDisplayMetrics().density;
    int dpAsPixels=(int)(5 * scale + 0.5f);
    listView.setPadding(dpAsPixels,0,dpAsPixels,0);
    listView.addItemDecoration(new SpacesItemDecoration(dpAsPixels));
  }
  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);
        }
      }
    }
  }
}

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(current,this);
  scroll=(HorizontalScrollView)rootView.findViewById(R.id.scroll);
  scroll1=(HorizontalScrollView)rootView.findViewById(R.id.scroll1);
  uimode=Integer.parseInt(Sp.getString("String_Node_Str","String_Node_Str"));
  if (uimode == 1 && islist) {
    float scale=getResources().getDisplayMetrics().density;
    int dpAsPixels=(int)(5 * scale + 0.5f);
    listView.setPadding(dpAsPixels,0,dpAsPixels,0);
    listView.addItemDecoration(new SpacesItemDecoration(dpAsPixels));
  }
  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);
        }
      }
    }
  }
}