Program: 38547
Project: 38547
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();
  }
switch (view.getId()) {
case R.id.straightenButton:
{
      mCurrentImage=showImageView(R.id.imageStraighten);
      String ename=mCurrentImage.getContext().getString(R.string.straighten);
      mUtilityPanel.setEffectName(ename);
      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.flip);
  mUtilityPanel.setEffectName(ename);
  mUtilityPanel.setShowParameter(false);
  break;
}
case R.id.vignetteButton:
{
mCurrentImage=showImageView(R.id.imageShow).setShowControls(true);
String ename=mCurrentImage.getContext().getString(R.string.vignette);
mUtilityPanel.setEffectName(ename);
ensureFilter("String_Node_Str");
break;
}
case R.id.curvesButtonRGB:
{
ImageCurves curves=(ImageCurves)showImageView(R.id.imageCurves);
String ename=curves.getContext().getString(R.string.curvesRGB);
mUtilityPanel.setEffectName(ename);
mUtilityPanel.setShowParameter(false);
curves.setUseRed(true);
curves.setUseGreen(true);
curves.setUseBlue(true);
curves.reloadCurve();
mCurrentImage=curves;
break;
}
case R.id.sharpenButton:
{
mCurrentImage=showImageView(R.id.imageZoom).setShowControls(true);
String ename=mCurrentImage.getContext().getString(R.string.sharpen);
mUtilityPanel.setEffectName(ename);
ensureFilter("String_Node_Str");
break;
}
case R.id.contrastButton:
{
mCurrentImage=showImageView(R.id.imageShow).setShowControls(true);
String ename=mCurrentImage.getContext().getString(R.string.contrast);
mUtilityPanel.setEffectName(ename);
ensureFilter("String_Node_Str");
break;
}
case R.id.saturationButton:
{
mCurrentImage=showImageView(R.id.imageShow).setShowControls(true);
String ename=mCurrentImage.getContext().getString(R.string.saturation);
mUtilityPanel.setEffectName(ename);
ensureFilter("String_Node_Str");
break;
}
case R.id.wbalanceButton:
{
mCurrentImage=showImageView(R.id.imageShow).setShowControls(false);
String ename=mCurrentImage.getContext().getString(R.string.wbalance);
mUtilityPanel.setEffectName(ename);
mUtilityPanel.setShowParameter(false);
ensureFilter("String_Node_Str");
break;
}
case R.id.hueButton:
{
mCurrentImage=showImageView(R.id.imageShow).setShowControls(true);
String ename=mCurrentImage.getContext().getString(R.string.hue);
mUtilityPanel.setEffectName(ename);
ensureFilter("String_Node_Str");
break;
}
case R.id.exposureButton:
{
mCurrentImage=showImageView(R.id.imageShow).setShowControls(true);
String ename=mCurrentImage.getContext().getString(R.string.exposure);
mUtilityPanel.setEffectName(ename);
ensureFilter("String_Node_Str");
break;
}
case R.id.vibranceButton:
{
mCurrentImage=showImageView(R.id.imageShow).setShowControls(true);
String ename=mCurrentImage.getContext().getString(R.string.vibrance);
mUtilityPanel.setEffectName(ename);
ensureFilter("String_Node_Str");
break;
}
case R.id.shadowRecoveryButton:
{
mCurrentImage=showImageView(R.id.imageShow).setShowControls(true);
String ename=mCurrentImage.getContext().getString(R.string.shadow_recovery);
mUtilityPanel.setEffectName(ename);
ensureFilter("String_Node_Str");
break;
}
case R.id.redEyeButton:
{
mCurrentImage=showImageView(R.id.imageShow).setShowControls(true);
String ename=mCurrentImage.getContext().getString(R.string.redeye);
mUtilityPanel.setEffectName(ename);
ensureFilter("String_Node_Str");
break;
}
case R.id.applyEffect:
{
showPanel(mCurrentPanel);
break;
}
}
mCurrentImage.select();
}

Fixed version (ground truth):
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();
  }
switch (view.getId()) {
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);
    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.flip);
mUtilityPanel.setEffectName(ename);
mUtilityPanel.setShowParameter(false);
break;
}
case R.id.vignetteButton:
{
mCurrentImage=showImageView(R.id.imageShow).setShowControls(true);
String ename=mCurrentImage.getContext().getString(R.string.vignette);
mUtilityPanel.setEffectName(ename);
ensureFilter("String_Node_Str");
break;
}
case R.id.curvesButtonRGB:
{
ImageCurves curves=(ImageCurves)showImageView(R.id.imageCurves);
String ename=curves.getContext().getString(R.string.curvesRGB);
mUtilityPanel.setEffectName(ename);
mUtilityPanel.setShowParameter(false);
curves.setUseRed(true);
curves.setUseGreen(true);
curves.setUseBlue(true);
curves.reloadCurve();
mCurrentImage=curves;
break;
}
case R.id.sharpenButton:
{
mCurrentImage=showImageView(R.id.imageZoom).setShowControls(true);
String ename=mCurrentImage.getContext().getString(R.string.sharpen);
mUtilityPanel.setEffectName(ename);
ensureFilter("String_Node_Str");
break;
}
case R.id.contrastButton:
{
mCurrentImage=showImageView(R.id.imageShow).setShowControls(true);
String ename=mCurrentImage.getContext().getString(R.string.contrast);
mUtilityPanel.setEffectName(ename);
ensureFilter("String_Node_Str");
break;
}
case R.id.saturationButton:
{
mCurrentImage=showImageView(R.id.imageShow).setShowControls(true);
String ename=mCurrentImage.getContext().getString(R.string.saturation);
mUtilityPanel.setEffectName(ename);
ensureFilter("String_Node_Str");
break;
}
case R.id.wbalanceButton:
{
mCurrentImage=showImageView(R.id.imageShow).setShowControls(false);
String ename=mCurrentImage.getContext().getString(R.string.wbalance);
mUtilityPanel.setEffectName(ename);
mUtilityPanel.setShowParameter(false);
ensureFilter("String_Node_Str");
break;
}
case R.id.hueButton:
{
mCurrentImage=showImageView(R.id.imageShow).setShowControls(true);
String ename=mCurrentImage.getContext().getString(R.string.hue);
mUtilityPanel.setEffectName(ename);
ensureFilter("String_Node_Str");
break;
}
case R.id.exposureButton:
{
mCurrentImage=showImageView(R.id.imageShow).setShowControls(true);
String ename=mCurrentImage.getContext().getString(R.string.exposure);
mUtilityPanel.setEffectName(ename);
ensureFilter("String_Node_Str");
break;
}
case R.id.vibranceButton:
{
mCurrentImage=showImageView(R.id.imageShow).setShowControls(true);
String ename=mCurrentImage.getContext().getString(R.string.vibrance);
mUtilityPanel.setEffectName(ename);
ensureFilter("String_Node_Str");
break;
}
case R.id.shadowRecoveryButton:
{
mCurrentImage=showImageView(R.id.imageShow).setShowControls(true);
String ename=mCurrentImage.getContext().getString(R.string.shadow_recovery);
mUtilityPanel.setEffectName(ename);
ensureFilter("String_Node_Str");
break;
}
case R.id.redEyeButton:
{
mCurrentImage=showImageView(R.id.imageShow).setShowControls(true);
String ename=mCurrentImage.getContext().getString(R.string.redeye);
mUtilityPanel.setEffectName(ename);
ensureFilter("String_Node_Str");
break;
}
case R.id.applyEffect:
{
showPanel(mCurrentPanel);
break;
}
}
mCurrentImage.select();
}