Program: 38471
Project: 38471
Buggy source:
public void showComponent(View view){
  if (mUtilityPanel != null && !mUtilityPanel.selected()) {
    Panel current=mPanels.get(mCurrentPanel);
    ViewPropertyAnimator anim1=current.unselect(-1,VERTICAL_MOVE);
    anim1.start();
    if (mUtilityPanel != null) {
      ViewPropertyAnimator anim2=mUtilityPanel.select();
      anim2.start();
    }
  }
  if (mCurrentImage != null) {
    mCurrentImage.unselect();
  }
  mUtilityPanel.hideAccessoryViews();
  if (view instanceof ImageSmallFilter) {
    ImageSmallFilter component=(ImageSmallFilter)view;
    ImageFilter filter=component.getImageFilter();
    if (filter.getEditingViewId() != 0) {
      mCurrentImage=showImageView(filter.getEditingViewId());
      mCurrentImage.setShowControls(filter.showEditingControls());
      String ename=mCurrentImage.getContext().getString(filter.getTextId());
      mUtilityPanel.setEffectName(ename);
      if (mCurrentImage.useUtilityPanel()) {
        mCurrentImage.openUtilityPanel(mUtilityPanel.mAccessoryViewList);
      }
      mUtilityPanel.setShowParameter(filter.showParameterValue());
      ensureFilter(ename);
      mCurrentImage.select();
    }
    return;
  }
switch (view.getId()) {
case R.id.tinyplanetButton:
{
      mCurrentImage=showImageView(R.id.imageTinyPlanet).setShowControls(true);
      String ename=mCurrentImage.getContext().getString(R.string.tinyplanet);
      mUtilityPanel.setEffectName(ename);
      ensureFilter(ename);
      if (!mDisableFilterButtons) {
        mActivity.disableFilterButtons();
        mDisableFilterButtons=true;
      }
      break;
    }
case R.id.straightenButton:
{
    mCurrentImage=showImageView(R.id.imageStraighten);
    String ename=mCurrentImage.getContext().getString(R.string.straighten);
    mUtilityPanel.setEffectName(ename);
    break;
  }
case R.id.cropButton:
{
  mCurrentImage=showImageView(R.id.imageCrop);
  String ename=mCurrentImage.getContext().getString(R.string.crop);
  mUtilityPanel.setEffectName(ename);
  mUtilityPanel.setShowParameter(false);
  if (mCurrentImage instanceof ImageCrop && mUtilityPanel.firstTimeCropDisplayed) {
    ((ImageCrop)mCurrentImage).clear();
    mUtilityPanel.firstTimeCropDisplayed=false;
  }
  ((ImageCrop)mCurrentImage).setFixedAspect(mFixedAspect);
  break;
}
case R.id.rotateButton:
{
mCurrentImage=showImageView(R.id.imageRotate);
String ename=mCurrentImage.getContext().getString(R.string.rotate);
mUtilityPanel.setEffectName(ename);
break;
}
case R.id.flipButton:
{
mCurrentImage=showImageView(R.id.imageFlip);
String ename=mCurrentImage.getContext().getString(R.string.mirror);
mUtilityPanel.setEffectName(ename);
mUtilityPanel.setShowParameter(false);
break;
}
case R.id.redEyeButton:
{
mCurrentImage=showImageView(R.id.imageRedEyes).setShowControls(true);
String ename=mCurrentImage.getContext().getString(R.string.redeye);
mUtilityPanel.setEffectName(ename);
ensureFilter(ename);
break;
}
case R.id.applyEffect:
{
if (mMasterImage.getCurrentFilter() instanceof ImageFilterTinyPlanet) {
mActivity.saveImage();
}
 else {
if (mCurrentImage instanceof ImageCrop) {
((ImageCrop)mCurrentImage).saveAndSetPreset();
}
showPanel(mCurrentPanel);
}
break;
}
}
if (mCurrentImage.useUtilityPanel()) {
mCurrentImage.openUtilityPanel(mUtilityPanel.mAccessoryViewList);
}
mCurrentImage.select();
}

Fixed version (ground truth):
public void showComponent(View view){
  boolean doPanelTransition=true;
  if (view instanceof FilterIconButton) {
    ImageFilter f=((FilterIconButton)view).getImageFilter();
    doPanelTransition=f.showUtilityPanel();
  }
  if (mUtilityPanel != null && !mUtilityPanel.selected() && doPanelTransition) {
    Panel current=mPanels.get(mCurrentPanel);
    ViewPropertyAnimator anim1=current.unselect(-1,VERTICAL_MOVE);
    anim1.start();
    if (mUtilityPanel != null) {
      ViewPropertyAnimator anim2=mUtilityPanel.select();
      anim2.start();
    }
  }
  if (mCurrentImage != null) {
    mCurrentImage.unselect();
  }
  mUtilityPanel.hideAccessoryViews();
  if (view instanceof FilterIconButton) {
    FilterIconButton component=(FilterIconButton)view;
    ImageFilter filter=component.getImageFilter();
    if (filter.getEditingViewId() != 0) {
      mCurrentImage=showImageView(filter.getEditingViewId());
      mCurrentImage.setShowControls(filter.showEditingControls());
      String ename=mCurrentImage.getContext().getString(filter.getTextId());
      mUtilityPanel.setEffectName(ename);
      if (mCurrentImage.useUtilityPanel()) {
        mCurrentImage.openUtilityPanel(mUtilityPanel.mAccessoryViewList);
      }
      mUtilityPanel.setShowParameter(filter.showParameterValue());
      if (filter != null) {
        mMasterImage.setCurrentFilter(filter);
      }
      mCurrentImage.select();
    }
    return;
  }
switch (view.getId()) {
case R.id.tinyplanetButton:
{
      mCurrentImage=showImageView(R.id.imageTinyPlanet).setShowControls(true);
      String ename=mCurrentImage.getContext().getString(R.string.tinyplanet);
      mUtilityPanel.setEffectName(ename);
      ensureFilter(ename);
      if (!mDisableFilterButtons) {
        mActivity.disableFilterButtons();
        mDisableFilterButtons=true;
      }
      break;
    }
case R.id.straightenButton:
{
    mCurrentImage=showImageView(R.id.imageStraighten);
    String ename=mCurrentImage.getContext().getString(R.string.straighten);
    mUtilityPanel.setEffectName(ename);
    break;
  }
case R.id.cropButton:
{
  mCurrentImage=showImageView(R.id.imageCrop);
  String ename=mCurrentImage.getContext().getString(R.string.crop);
  mUtilityPanel.setEffectName(ename);
  mUtilityPanel.setShowParameter(false);
  if (mCurrentImage instanceof ImageCrop && mUtilityPanel.firstTimeCropDisplayed) {
    ((ImageCrop)mCurrentImage).clear();
    mUtilityPanel.firstTimeCropDisplayed=false;
  }
  ((ImageCrop)mCurrentImage).setFixedAspect(mFixedAspect);
  break;
}
case R.id.rotateButton:
{
mCurrentImage=showImageView(R.id.imageRotate);
String ename=mCurrentImage.getContext().getString(R.string.rotate);
mUtilityPanel.setEffectName(ename);
break;
}
case R.id.flipButton:
{
mCurrentImage=showImageView(R.id.imageFlip);
String ename=mCurrentImage.getContext().getString(R.string.mirror);
mUtilityPanel.setEffectName(ename);
mUtilityPanel.setShowParameter(false);
break;
}
case R.id.redEyeButton:
{
mCurrentImage=showImageView(R.id.imageRedEyes).setShowControls(true);
String ename=mCurrentImage.getContext().getString(R.string.redeye);
mUtilityPanel.setEffectName(ename);
ensureFilter(ename);
break;
}
case R.id.applyEffect:
{
if (mMasterImage.getCurrentFilter() instanceof ImageFilterTinyPlanet) {
mActivity.saveImage();
}
 else {
if (mCurrentImage instanceof ImageCrop) {
((ImageCrop)mCurrentImage).saveAndSetPreset();
}
showPanel(mCurrentPanel);
}
break;
}
}
if (mCurrentImage.useUtilityPanel()) {
mCurrentImage.openUtilityPanel(mUtilityPanel.mAccessoryViewList);
}
mCurrentImage.select();
}