Program: 187242
Project: 187242
Buggy source:
@Override public void onTabSelected(ActionBar.Tab tab,FragmentTransaction fragmentTransaction){
  int layout=R.layout.fragment_add_clips;
  FragmentManager fm=getSupportFragmentManager();
  if (mMenu != null) {
    mMenu.findItem(R.id.itemInfo).setVisible(false);
    mMenu.findItem(R.id.itemTrim).setVisible(false);
  }
  if (tab.getPosition() == 0) {
    if (mMenu != null) {
      mMenu.findItem(R.id.itemForward).setEnabled(true);
    }
    layout=R.layout.fragment_add_clips;
    if (mFragmentTab0 == null) {
      try {
        mFragmentTab0=new AddClipsFragment(layout,fm,templateJsonPath);
        Bundle args=new Bundle();
        args.putInt(AddClipsFragment.ARG_SECTION_NUMBER,tab.getPosition() + 1);
        mFragmentTab0.setArguments(args);
      }
 catch (      IOException e) {
        Log.e("String_Node_Str","String_Node_Str",e);
      }
catch (      JSONException e) {
        Log.e("String_Node_Str","String_Node_Str",e);
      }
      fm.beginTransaction().add(R.id.container,mFragmentTab0,layout + "String_Node_Str").commit();
    }
 else {
      fm.beginTransaction().show(mFragmentTab0).commit();
    }
    mLastTabFrag=mFragmentTab0;
  }
 else   if (tab.getPosition() == 1) {
    layout=R.layout.fragment_order_clips;
    if (mMenu != null) {
      mMenu.findItem(R.id.itemInfo).setVisible(true);
      mMenu.findItem(R.id.itemTrim).setVisible(true);
      mMenu.findItem(R.id.itemForward).setEnabled(true);
    }
    if (mFragmentTab1 == null) {
      try {
        mFragmentTab1=new OrderClipsFragment(layout);
        Bundle args=new Bundle();
        args.putInt(OrderClipsFragment.ARG_SECTION_NUMBER,tab.getPosition() + 1);
        mFragmentTab1.setArguments(args);
      }
 catch (      IOException e) {
        Log.e("String_Node_Str","String_Node_Str",e);
      }
catch (      JSONException e) {
        Log.e("String_Node_Str","String_Node_Str",e);
      }
      fm.beginTransaction().add(R.id.container,mFragmentTab1,layout + "String_Node_Str").commit();
    }
 else {
      ((OrderClipsFragment)mFragmentTab1).loadMedia();
      fm.beginTransaction().show(mFragmentTab1).commit();
    }
    mLastTabFrag=mFragmentTab1;
  }
 else   if (tab.getPosition() == 2) {
    layout=R.layout.fragment_story_publish;
    if (mMenu != null)     mMenu.findItem(R.id.itemForward).setEnabled(false);
    if (mFragmentTab2 == null) {
      try {
        mFragmentTab2=new PublishFragment(layout);
        Bundle args=new Bundle();
        args.putInt(PublishFragment.ARG_SECTION_NUMBER,tab.getPosition() + 1);
        mFragmentTab2.setArguments(args);
      }
 catch (      IOException e) {
        Log.e("String_Node_Str","String_Node_Str",e);
      }
catch (      JSONException e) {
        Log.e("String_Node_Str","String_Node_Str",e);
      }
      fm.beginTransaction().add(R.id.container,mFragmentTab2,layout + "String_Node_Str").commit();
    }
 else {
      fm.beginTransaction().show(mFragmentTab2).commit();
    }
    mLastTabFrag=mFragmentTab2;
  }
}

Fixed version (ground truth):
@Override public void onTabSelected(ActionBar.Tab tab,FragmentTransaction fragmentTransaction){
  int layout=R.layout.fragment_add_clips;
  FragmentManager fm=getSupportFragmentManager();
  if (mMenu != null) {
    mMenu.findItem(R.id.itemInfo).setVisible(false);
    mMenu.findItem(R.id.itemTrim).setVisible(false);
  }
  if (tab.getPosition() == 0) {
    if (mMenu != null) {
      mMenu.findItem(R.id.itemForward).setEnabled(true);
    }
    layout=R.layout.fragment_add_clips;
    if (mFragmentTab0 == null) {
      try {
        mFragmentTab0=new AddClipsFragment(layout,fm,templateJsonPath);
        Bundle args=new Bundle();
        args.putInt(AddClipsFragment.ARG_SECTION_NUMBER,tab.getPosition() + 1);
        mFragmentTab0.setArguments(args);
      }
 catch (      IOException e) {
        Log.e("String_Node_Str","String_Node_Str",e);
      }
catch (      JSONException e) {
        Log.e("String_Node_Str","String_Node_Str",e);
      }
      fm.beginTransaction().add(R.id.container,mFragmentTab0,layout + "String_Node_Str").commit();
    }
 else {
      fm.beginTransaction().show(mFragmentTab0).commit();
    }
    mLastTabFrag=mFragmentTab0;
  }
 else   if (tab.getPosition() == 1) {
    layout=R.layout.fragment_order_clips;
    if (mMenu != null) {
      mMenu.findItem(R.id.itemInfo).setVisible(true);
      mMenu.findItem(R.id.itemTrim).setVisible(true);
      mMenu.findItem(R.id.itemForward).setEnabled(true);
    }
    if (mFragmentTab1 == null) {
      try {
        mFragmentTab1=new OrderClipsFragment(layout);
        Bundle args=new Bundle();
        args.putInt(OrderClipsFragment.ARG_SECTION_NUMBER,tab.getPosition() + 1);
        mFragmentTab1.setArguments(args);
      }
 catch (      IOException e) {
        Log.e("String_Node_Str","String_Node_Str",e);
      }
catch (      JSONException e) {
        Log.e("String_Node_Str","String_Node_Str",e);
      }
      fm.beginTransaction().add(R.id.container,mFragmentTab1,layout + "String_Node_Str").commit();
    }
 else {
      ((OrderClipsFragment)mFragmentTab1).loadMedia();
      fm.beginTransaction().show(mFragmentTab1).commit();
    }
    mLastTabFrag=mFragmentTab1;
  }
 else   if (tab.getPosition() == 2) {
    layout=R.layout.fragment_story_publish;
    if (mPublishFragment == null) {
      try {
        mPublishFragment=new PublishFragment(layout);
        Bundle args=new Bundle();
        args.putInt(PublishFragment.ARG_SECTION_NUMBER,tab.getPosition() + 1);
        mPublishFragment.setArguments(args);
      }
 catch (      IOException e) {
        Log.e("String_Node_Str","String_Node_Str",e);
      }
catch (      JSONException e) {
        Log.e("String_Node_Str","String_Node_Str",e);
      }
      fm.beginTransaction().add(R.id.container,mPublishFragment,layout + "String_Node_Str").commit();
    }
 else {
      fm.beginTransaction().show(mPublishFragment).commit();
    }
    mLastTabFrag=mPublishFragment;
  }
}