Program: 162628
Project: 162628
Buggy source:
@Override public void onActivityCreated(Bundle savedInstanceState){
  super.onActivityCreated(savedInstanceState);
  setHasOptionsMenu(false);
  getActivity().findViewById(R.id.buttonbarframe).setVisibility(View.VISIBLE);
  list1=new ArrayList<String>();
  getActivity().findViewById(R.id.search).setVisibility(View.VISIBLE);
  getActivity().findViewById(R.id.action_overflow).setVisibility(View.VISIBLE);
  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 (aBoolean) {
    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);
  home=Sp.getString("String_Node_Str",mainActivity.val.get(0));
  this.setRetainInstance(false);
  File f=new File(Sp.getString("String_Node_Str",home));
  buttons=(LinearLayout)getActivity().findViewById(R.id.buttons);
  pathbar=(LinearLayout)getActivity().findViewById(R.id.pathbar);
  textView=(TextView)getActivity().findViewById(R.id.fullpath);
  pathbar.setBackgroundColor(Color.parseColor(skin));
  pathbar.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View view){
      crossfade();
      timer.cancel();
      timer.start();
    }
  }
);
  textView.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View view){
      crossfade();
      timer.cancel();
      timer.start();
    }
  }
);
  scroll=(HorizontalScrollView)getActivity().findViewById(R.id.scroll);
  scroll1=(HorizontalScrollView)getActivity().findViewById(R.id.scroll1);
  uimode=Integer.parseInt(Sp.getString("String_Node_Str","String_Node_Str"));
  if (uimode == 1) {
    float scale=getResources().getDisplayMetrics().density;
    int dpAsPixels=(int)(5 * scale + 0.5f);
    if (aBoolean) {
      listView.setPadding(dpAsPixels,0,dpAsPixels,0);
      listView.setDivider(null);
      listView.setDividerHeight(dpAsPixels);
    }
 else {
      gridView.setPadding(dpAsPixels,0,dpAsPixels,0);
    }
  }
  footerView=getActivity().getLayoutInflater().inflate(R.layout.divider,null);
  if (aBoolean) {
    listView.addFooterView(footerView);
    listView.setFastScrollEnabled(true);
  }
 else {
    gridView.setFastScrollEnabled(true);
  }
  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");
    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");
    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);
  getActivity().findViewById(R.id.buttonbarframe).setVisibility(View.VISIBLE);
  list1=new ArrayList<String>();
  getActivity().findViewById(R.id.search).setVisibility(View.VISIBLE);
  getActivity().findViewById(R.id.action_overflow).setVisibility(View.VISIBLE);
  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 (aBoolean) {
    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);
  home=Sp.getString("String_Node_Str",mainActivity.val.get(0));
  this.setRetainInstance(false);
  File f=new File(Sp.getString("String_Node_Str",home));
  buttons=(LinearLayout)getActivity().findViewById(R.id.buttons);
  pathbar=(LinearLayout)getActivity().findViewById(R.id.pathbar);
  textView=(TextView)getActivity().findViewById(R.id.fullpath);
  pathbar.setBackgroundColor(Color.parseColor(skin));
  scroll=(HorizontalScrollView)getActivity().findViewById(R.id.scroll);
  scroll1=(HorizontalScrollView)getActivity().findViewById(R.id.scroll1);
  uimode=Integer.parseInt(Sp.getString("String_Node_Str","String_Node_Str"));
  if (uimode == 1) {
    float scale=getResources().getDisplayMetrics().density;
    int dpAsPixels=(int)(5 * scale + 0.5f);
    if (aBoolean) {
      listView.setPadding(dpAsPixels,0,dpAsPixels,0);
      listView.setDivider(null);
      listView.setDividerHeight(dpAsPixels);
    }
 else {
      gridView.setPadding(dpAsPixels,0,dpAsPixels,0);
    }
  }
  footerView=getActivity().getLayoutInflater().inflate(R.layout.divider,null);
  if (aBoolean) {
    listView.addFooterView(footerView);
    listView.setFastScrollEnabled(true);
  }
 else {
    gridView.setFastScrollEnabled(true);
  }
  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");
    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");
    createViews(list,true,new File(cur));
    if (savedInstanceState.getBoolean("String_Node_Str")) {
      for (      int i : savedInstanceState.getIntegerArrayList("String_Node_Str")) {
        adapter.toggleChecked(i);
      }
    }
  }
}