Program: 52095
Project: 52095
Buggy source:
/** 
 * Recreates SuperCardToasts that were showing during an orientation change. <br>
 * @param bundle
 * @param activity
 */
public static void onRestoreState(Bundle bundle,Activity activity){
  if (bundle == null) {
    return;
  }
  for (  SuperCardToast oldSuperCardToast : (SuperCardToast[])bundle.getSerializable(BUNDLE)) {
    SuperCardToast newSuperCardToast;
    if (oldSuperCardToast.getType() == Type.BUTTON) {
      newSuperCardToast=new SuperCardToast(activity,Type.BUTTON);
      newSuperCardToast.setButtonOnClickListener(oldSuperCardToast.getButtonOnClickListener());
      newSuperCardToast.setButtonText(oldSuperCardToast.getButtonText());
      newSuperCardToast.setButtonTextSizeFloat(oldSuperCardToast.getButtonTextSize());
      newSuperCardToast.setButtonTextColor(oldSuperCardToast.getButtonTextColor());
      newSuperCardToast.setButtonTextTypeface(oldSuperCardToast.getButtonTextTypeface());
      if (oldSuperCardToast.getButtonDrawable() != null) {
        newSuperCardToast.setButtonDrawable(oldSuperCardToast.getButtonDrawable());
      }
 else       if (oldSuperCardToast.getButtonResource() != 0) {
        newSuperCardToast.setButtonResource(oldSuperCardToast.getButtonResource());
      }
      if (oldSuperCardToast.getButtonDividerDrawable() != null) {
        newSuperCardToast.setButtonDividerDrawable(oldSuperCardToast.getButtonDividerDrawable());
      }
 else       if (oldSuperCardToast.getButtonDividerResource() != 0) {
        newSuperCardToast.setButtonDividerResource(oldSuperCardToast.getButtonDividerResource());
      }
    }
 else     if (oldSuperCardToast.getType() == Type.PROGRESS) {
      newSuperCardToast=new SuperCardToast(activity,Type.PROGRESS);
      newSuperCardToast.setProgressIndeterminate(oldSuperCardToast.getProgressIndeterminate());
      newSuperCardToast.setProgress(oldSuperCardToast.getProgress());
    }
 else     if (oldSuperCardToast.getType() == Type.PROGRESS_HORIZONTAL) {
      newSuperCardToast=new SuperCardToast(activity,Type.PROGRESS_HORIZONTAL);
      newSuperCardToast.setProgressIndeterminate(oldSuperCardToast.getProgressIndeterminate());
      newSuperCardToast.setProgress(oldSuperCardToast.getProgress());
    }
 else {
      newSuperCardToast=new SuperCardToast(activity);
    }
    newSuperCardToast.setText(oldSuperCardToast.getText());
    newSuperCardToast.setTextColor(oldSuperCardToast.getTextColor());
    newSuperCardToast.setTextSizeFloat(oldSuperCardToast.getTextSize());
    newSuperCardToast.setDuration(oldSuperCardToast.getDuration());
    newSuperCardToast.setIndeterminate(oldSuperCardToast.isIndeterminate());
    if (oldSuperCardToast.getIconDrawable() != null && oldSuperCardToast.getIconPosition() != null) {
      newSuperCardToast.setIconDrawable(oldSuperCardToast.getIconDrawable(),oldSuperCardToast.getIconPosition());
    }
 else     if (oldSuperCardToast.getIconResource() != 0 && oldSuperCardToast.getIconPosition() != null) {
      newSuperCardToast.setIconResource(oldSuperCardToast.getIconResource(),oldSuperCardToast.getIconPosition());
    }
    newSuperCardToast.setOnClickListener(oldSuperCardToast.getOnClickListener());
    if (oldSuperCardToast.getBackgroundDrawable() != null) {
      newSuperCardToast.setBackgroundDrawable(oldSuperCardToast.getBackgroundDrawable());
    }
 else {
      newSuperCardToast.setBackgroundResource(oldSuperCardToast.getBackgroundResource());
    }
    newSuperCardToast.setTypeface(oldSuperCardToast.getTypeface());
    newSuperCardToast.setTouchToDismiss(oldSuperCardToast.isTouchDismissable());
    newSuperCardToast.setOnDismissListener(oldSuperCardToast.getOnDismissListener());
    newSuperCardToast.setSwipeToDismiss(oldSuperCardToast.isSwipeDismissable());
    newSuperCardToast.show();
  }
}

Fixed version (ground truth):
/** 
 * Recreates SuperCardToasts that were showing during an orientation change. <br>
 * @param bundle
 * @param activity
 */
public static void onRestoreState(Bundle bundle,Activity activity){
  if (bundle == null) {
    return;
  }
  for (  SuperCardToast oldSuperCardToast : (SuperCardToast[])bundle.getSerializable(BUNDLE)) {
    SuperCardToast newSuperCardToast;
    if (oldSuperCardToast.getType() == Type.BUTTON) {
      newSuperCardToast=new SuperCardToast(activity,Type.BUTTON);
      newSuperCardToast.setButtonOnClickListener(oldSuperCardToast.getButtonOnClickListener());
      newSuperCardToast.setButtonText(oldSuperCardToast.getButtonText());
      newSuperCardToast.setButtonTextSizeFloat(oldSuperCardToast.getButtonTextSize());
      newSuperCardToast.setButtonTextColor(oldSuperCardToast.getButtonTextColor());
      newSuperCardToast.setButtonTextTypeface(oldSuperCardToast.getButtonTextTypeface());
      if (oldSuperCardToast.getButtonDrawable() != null) {
        newSuperCardToast.setButtonDrawable(oldSuperCardToast.getButtonDrawable());
      }
 else       if (oldSuperCardToast.getButtonResource() != 0) {
        newSuperCardToast.setButtonResource(oldSuperCardToast.getButtonResource());
      }
      if (oldSuperCardToast.getButtonDividerDrawable() != null) {
        newSuperCardToast.setButtonDividerDrawable(oldSuperCardToast.getButtonDividerDrawable());
      }
 else       if (oldSuperCardToast.getButtonDividerResource() != 0) {
        newSuperCardToast.setButtonDividerResource(oldSuperCardToast.getButtonDividerResource());
      }
    }
 else     if (oldSuperCardToast.getType() == Type.PROGRESS) {
      newSuperCardToast=new SuperCardToast(activity,Type.PROGRESS);
      newSuperCardToast.setProgressIndeterminate(oldSuperCardToast.getProgressIndeterminate());
      newSuperCardToast.setProgress(oldSuperCardToast.getProgress());
    }
 else     if (oldSuperCardToast.getType() == Type.PROGRESS_HORIZONTAL) {
      newSuperCardToast=new SuperCardToast(activity,Type.PROGRESS_HORIZONTAL);
      newSuperCardToast.setProgressIndeterminate(oldSuperCardToast.getProgressIndeterminate());
      newSuperCardToast.setProgress(oldSuperCardToast.getProgress());
    }
 else {
      newSuperCardToast=new SuperCardToast(activity);
    }
    newSuperCardToast.setText(oldSuperCardToast.getText());
    newSuperCardToast.setTextColor(oldSuperCardToast.getTextColor());
    newSuperCardToast.setTextSizeFloat(oldSuperCardToast.getTextSize());
    newSuperCardToast.setDuration(oldSuperCardToast.getDuration());
    newSuperCardToast.setIndeterminate(oldSuperCardToast.isIndeterminate());
    if (oldSuperCardToast.getIconDrawable() != null && oldSuperCardToast.getIconPosition() != null) {
      newSuperCardToast.setIconDrawable(oldSuperCardToast.getIconDrawable(),oldSuperCardToast.getIconPosition());
    }
 else     if (oldSuperCardToast.getIconResource() != 0 && oldSuperCardToast.getIconPosition() != null) {
      newSuperCardToast.setIconResource(oldSuperCardToast.getIconResource(),oldSuperCardToast.getIconPosition());
    }
    newSuperCardToast.setOnClickListener(oldSuperCardToast.getOnClickListener());
    if (oldSuperCardToast.getBackgroundDrawable() != null) {
      newSuperCardToast.setBackgroundDrawable(oldSuperCardToast.getBackgroundDrawable());
    }
 else {
      newSuperCardToast.setBackgroundResource(oldSuperCardToast.getBackgroundResource());
    }
    newSuperCardToast.setTypeface(oldSuperCardToast.getTypeface());
    if (oldSuperCardToast.isTouchDismissable()) {
      newSuperCardToast.setTouchToDismiss(oldSuperCardToast.isTouchDismissable());
    }
 else     if (oldSuperCardToast.isSwipeDismissable()) {
      newSuperCardToast.setSwipeToDismiss(oldSuperCardToast.isSwipeDismissable());
    }
    newSuperCardToast.setOnDismissListener(oldSuperCardToast.getOnDismissListener());
    newSuperCardToast.show();
  }
}