Program: 187160
Project: 187160
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 (mLastTabFrag instanceof OrderClipsFragment) {
    ((OrderClipsFragment)mLastTabFrag).stopPlaybackOnTabChange();
  }
  if (tab.getPosition() == 0) {
    if (mMenu != null) {
      mMenu.findItem(R.id.itemForward).setEnabled(true);
    }
    layout=R.layout.fragment_add_clips;
    if (mFragmentTab0 == null) {
      mFragmentTab0=new AddClipsFragment();
      Bundle args=new Bundle();
      args.putInt(AddClipsFragment.ARG_SECTION_NUMBER,tab.getPosition() + 1);
      args.putInt("String_Node_Str",layout);
      args.putInt("String_Node_Str",mSceneIndex);
      mFragmentTab0.setArguments(args);
      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.itemForward).setEnabled(true);
      if (!(mMPM.mProject.getStoryType() == Project.STORY_TYPE_ESSAY || mMPM.mProject.getStoryType() == Project.STORY_TYPE_PHOTO)) {
        mMenu.findItem(R.id.itemTrim).setVisible(true);
      }
    }
    if (mFragmentTab1 == null) {
      mFragmentTab1=new OrderClipsFragment();
      Bundle args=new Bundle();
      args.putInt(OrderClipsFragment.ARG_SECTION_NUMBER,tab.getPosition() + 1);
      args.putInt("String_Node_Str",layout);
      mFragmentTab1.setArguments(args);
      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) {
    if (mMPM.mProject.isTemplateStory()) {
      Intent intent=new Intent(getBaseContext(),StoryTemplateActivity.class);
      intent.putExtra("String_Node_Str",mProject.getTemplatePath());
      intent.putExtra("String_Node_Str",mMPM.mProject.getStoryType());
      intent.putExtra("String_Node_Str",mMPM.mProject.getId());
      intent.putExtra("String_Node_Str",mMPM.mProject.getTitle());
      startActivity(intent);
      finish();
    }
 else {
      layout=R.layout.fragment_complete_story;
      if (mPublishFragment == null) {
        mPublishFragment=new PublishFragment();
        Bundle args=new Bundle();
        args.putInt(PublishFragment.ARG_SECTION_NUMBER,tab.getPosition() + 1);
        args.putInt("String_Node_Str",layout);
        mPublishFragment.setArguments(args);
        fm.beginTransaction().add(R.id.container,mPublishFragment,layout + "String_Node_Str").commit();
      }
 else {
        fm.beginTransaction().show(mPublishFragment).commit();
      }
      mLastTabFrag=mPublishFragment;
    }
  }
}

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.itemTrim).setVisible(false);
  }
  if (mLastTabFrag instanceof OrderClipsFragment) {
    ((OrderClipsFragment)mLastTabFrag).stopPlaybackOnTabChange();
  }
  if (tab.getPosition() == 0) {
    if (mMenu != null) {
      mMenu.findItem(R.id.itemForward).setEnabled(true);
    }
    layout=R.layout.fragment_add_clips;
    if (mFragmentTab0 == null) {
      mFragmentTab0=new AddClipsFragment();
      Bundle args=new Bundle();
      args.putInt(AddClipsFragment.ARG_SECTION_NUMBER,tab.getPosition() + 1);
      args.putInt("String_Node_Str",layout);
      args.putInt("String_Node_Str",mSceneIndex);
      mFragmentTab0.setArguments(args);
      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.itemForward).setEnabled(true);
      if (!(mMPM.mProject.getStoryType() == Project.STORY_TYPE_ESSAY || mMPM.mProject.getStoryType() == Project.STORY_TYPE_PHOTO)) {
        mMenu.findItem(R.id.itemTrim).setVisible(true);
      }
    }
    if (mFragmentTab1 == null) {
      mFragmentTab1=new OrderClipsFragment();
      Bundle args=new Bundle();
      args.putInt(OrderClipsFragment.ARG_SECTION_NUMBER,tab.getPosition() + 1);
      args.putInt("String_Node_Str",layout);
      mFragmentTab1.setArguments(args);
      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) {
    if (mMPM.mProject.isTemplateStory()) {
      Intent intent=new Intent(getBaseContext(),StoryTemplateActivity.class);
      intent.putExtra("String_Node_Str",mProject.getTemplatePath());
      intent.putExtra("String_Node_Str",mMPM.mProject.getStoryType());
      intent.putExtra("String_Node_Str",mMPM.mProject.getId());
      intent.putExtra("String_Node_Str",mMPM.mProject.getTitle());
      startActivity(intent);
      finish();
    }
 else {
      layout=R.layout.fragment_complete_story;
      if (mPublishFragment == null) {
        mPublishFragment=new PublishFragment();
        Bundle args=new Bundle();
        args.putInt(PublishFragment.ARG_SECTION_NUMBER,tab.getPosition() + 1);
        args.putInt("String_Node_Str",layout);
        mPublishFragment.setArguments(args);
        fm.beginTransaction().add(R.id.container,mPublishFragment,layout + "String_Node_Str").commit();
      }
 else {
        fm.beginTransaction().show(mPublishFragment).commit();
      }
      mLastTabFrag=mPublishFragment;
    }
  }
}