Program: 162631
Project: 162631
Buggy source:
@Override public View onCreateView(LayoutInflater inflater,ViewGroup container,Bundle savedInstanceState){
  ViewGroup rootView=(ViewGroup)inflater.inflate(R.layout.tabfragment,container,false);
  Sp=PreferenceManager.getDefaultSharedPreferences(getActivity());
  path0=Sp.getString("String_Node_Str","String_Node_Str");
  path1=Sp.getString("String_Node_Str","String_Node_Str");
  mViewPager=(ViewPager)rootView.findViewById(R.id.pager);
  STRIP=((android.support.v4.view.PagerTitleStrip)rootView.findViewById(R.id.pager_title_strip));
  STRIP.setBackgroundDrawable(new ColorDrawable(Color.parseColor(((MainActivity)getActivity()).skin)));
  if (getArguments() != null)   path=getArguments().getString("String_Node_Str");
  mViewPager.setOnPageChangeListener(new ViewPager.OnPageChangeListener(){
    public void onPageScrolled(    int p1,    float p2,    int p3){
      String name=fragments.get(mViewPager.getCurrentItem()).getClass().getName();
      if (name.contains("String_Node_Str")) {
        Main ma=((Main)fragments.get(mViewPager.getCurrentItem()));
        if (ma.mActionMode != null) {
          ma.mActionMode.finish();
          ma.mActionMode=null;
        }
      }
 else       if (name.contains("String_Node_Str")) {
        ZipViewer ma=((ZipViewer)fragments.get(mViewPager.getCurrentItem()));
        if (ma.mActionMode != null) {
          ma.mActionMode.finish();
          ma.mActionMode=null;
        }
      }
    }
    public void onPageSelected(    int p1){
      currenttab=p1;
      String name=fragments.get(p1).getClass().getName();
      if (name.contains("String_Node_Str")) {
        Main ma=((Main)fragments.get(p1));
        if (ma.current != null) {
          ((MainActivity)getActivity()).updateDrawer(ma.current);
          ma.bbar(ma.current);
          try {
            ((TextView)STRIP.getChildAt(p1)).setText(ma.current);
          }
 catch (          Exception e) {
            e.printStackTrace();
          }
        }
      }
 else       if (name.contains("String_Node_Str")) {
        ZipViewer ma=((ZipViewer)fragments.get(p1));
        ma.bbar();
      }
    }
    public void onPageScrollStateChanged(    int p1){
    }
  }
);
  if (savedInstanceState == null) {
    mSectionsPagerAdapter=new ScreenSlidePagerAdapter(getActivity().getSupportFragmentManager());
    int i=Sp.getInt("String_Node_Str",0);
    if (i == 0) {
      addTab(path0);
      addTab(path1);
    }
 else {
      for (int j=0; j < i; j++) {
        addTab(Sp.getString("String_Node_Str" + j,"String_Node_Str"));
      }
    }
    if (path != null && path.trim().length() != 0) {
      addTab1(path);
    }
    mViewPager.setAdapter(mSectionsPagerAdapter);
    if (path != null && path.trim().length() != 0) {
      mViewPager.setCurrentItem(fragments.size() - 1);
    }
 else {
      int k=Sp.getInt("String_Node_Str",0);
      try {
        mViewPager.setCurrentItem(k,true);
      }
 catch (      Exception e) {
        e.printStackTrace();
      }
    }
  }
 else {
    fragments.clear();
    tabs=savedInstanceState.getStringArrayList("String_Node_Str");
    for (int i=0; i < tabs.size(); i++) {
      fragments.add(i,getActivity().getSupportFragmentManager().getFragment(savedInstanceState,"String_Node_Str" + i));
    }
    mSectionsPagerAdapter=new ScreenSlidePagerAdapter(getActivity().getSupportFragmentManager());
    mViewPager.setAdapter(mSectionsPagerAdapter);
  }
  return rootView;
}

Fixed version (ground truth):
@Override public View onCreateView(LayoutInflater inflater,ViewGroup container,Bundle savedInstanceState){
  ViewGroup rootView=(ViewGroup)inflater.inflate(R.layout.tabfragment,container,false);
  Sp=PreferenceManager.getDefaultSharedPreferences(getActivity());
  path0=Sp.getString("String_Node_Str","String_Node_Str");
  path1=Sp.getString("String_Node_Str","String_Node_Str");
  mViewPager=(ViewPager)rootView.findViewById(R.id.pager);
  STRIP=((android.support.v4.view.PagerTitleStrip)rootView.findViewById(R.id.pager_title_strip));
  STRIP.setBackgroundDrawable(new ColorDrawable(Color.parseColor(((MainActivity)getActivity()).skin)));
  if (getArguments() != null)   path=getArguments().getString("String_Node_Str");
  mainActivity=((MainActivity)getActivity());
  mViewPager.setOnPageChangeListener(new ViewPager.OnPageChangeListener(){
    public void onPageScrolled(    int p1,    float p2,    int p3){
      String name=fragments.get(mViewPager.getCurrentItem()).getClass().getName();
      if (name.contains("String_Node_Str")) {
        Main ma=((Main)fragments.get(mViewPager.getCurrentItem()));
        if (ma.mActionMode != null) {
          ma.mActionMode.finish();
          ma.mActionMode=null;
        }
      }
 else       if (name.contains("String_Node_Str")) {
        ZipViewer ma=((ZipViewer)fragments.get(mViewPager.getCurrentItem()));
        if (ma.mActionMode != null) {
          ma.mActionMode.finish();
          ma.mActionMode=null;
        }
      }
    }
    public void onPageSelected(    int p1){
      currenttab=p1;
      mainActivity.updateActionButtons();
      String name=fragments.get(p1).getClass().getName();
      if (name.contains("String_Node_Str")) {
        Main ma=((Main)fragments.get(p1));
        if (ma.current != null) {
          mainActivity.updateDrawer(ma.current);
          ma.updatePath(ma.current);
          if (ma.buttons.getVisibility() == View.VISIBLE)           ma.bbar(ma.current);
          try {
            ((TextView)STRIP.getChildAt(p1)).setText(ma.current);
          }
 catch (          Exception e) {
            e.printStackTrace();
          }
        }
      }
 else       if (name.contains("String_Node_Str")) {
        ZipViewer ma=((ZipViewer)fragments.get(p1));
        ma.bbar();
      }
    }
    public void onPageScrollStateChanged(    int p1){
    }
  }
);
  if (savedInstanceState == null) {
    mSectionsPagerAdapter=new ScreenSlidePagerAdapter(getActivity().getSupportFragmentManager());
    int i=Sp.getInt("String_Node_Str",0);
    if (i == 0) {
      addTab(path0);
      addTab(path1);
    }
 else {
      for (int j=0; j < i; j++) {
        addTab(Sp.getString("String_Node_Str" + j,"String_Node_Str"));
      }
    }
    if (path != null && path.trim().length() != 0) {
      addTab1(path);
    }
    mViewPager.setAdapter(mSectionsPagerAdapter);
    if (path != null && path.trim().length() != 0) {
      mViewPager.setCurrentItem(fragments.size() - 1);
    }
 else {
      int k=Sp.getInt("String_Node_Str",0);
      try {
        mViewPager.setCurrentItem(k,true);
      }
 catch (      Exception e) {
        e.printStackTrace();
      }
    }
  }
 else {
    fragments.clear();
    tabs=savedInstanceState.getStringArrayList("String_Node_Str");
    for (int i=0; i < tabs.size(); i++) {
      fragments.add(i,getActivity().getSupportFragmentManager().getFragment(savedInstanceState,"String_Node_Str" + i));
    }
    mSectionsPagerAdapter=new ScreenSlidePagerAdapter(getActivity().getSupportFragmentManager());
    mViewPager.setAdapter(mSectionsPagerAdapter);
  }
  return rootView;
}