Program: 191523
Project: 191523
Buggy source:
/** 
 * Returns the created options as a Bundle, which can be passed to  {@link android.content.Context#startActivity(android.content.Intent,android.os.Bundle) Context.startActivity(Intent, Bundle)} and related methods.Note that the returned Bundle is still owned by the ActivityOptions object; you must not modify it, but can supply it to the startActivity methods that take an options Bundle.
 */
public Bundle toBundle(){
  if (mAnimationType == ANIM_DEFAULT) {
    return null;
  }
  Bundle b=new Bundle();
  if (mPackageName != null) {
    b.putString(KEY_PACKAGE_NAME,mPackageName);
  }
  if (mLaunchBounds != null) {
    b.putParcelable(KEY_LAUNCH_BOUNDS,mLaunchBounds);
  }
  b.putInt(KEY_ANIM_TYPE,mAnimationType);
  if (mUsageTimeReport != null) {
    b.putParcelable(KEY_USAGE_TIME_REPORT,mUsageTimeReport);
  }
switch (mAnimationType) {
case ANIM_CUSTOM:
    b.putInt(KEY_ANIM_ENTER_RES_ID,mCustomEnterResId);
  b.putInt(KEY_ANIM_EXIT_RES_ID,mCustomExitResId);
b.putBinder(KEY_ANIM_START_LISTENER,mAnimationStartedListener != null ? mAnimationStartedListener.asBinder() : null);
break;
case ANIM_CUSTOM_IN_PLACE:
b.putInt(KEY_ANIM_IN_PLACE_RES_ID,mCustomInPlaceResId);
break;
case ANIM_SCALE_UP:
case ANIM_CLIP_REVEAL:
b.putInt(KEY_ANIM_START_X,mStartX);
b.putInt(KEY_ANIM_START_Y,mStartY);
b.putInt(KEY_ANIM_WIDTH,mWidth);
b.putInt(KEY_ANIM_HEIGHT,mHeight);
break;
case ANIM_THUMBNAIL_SCALE_UP:
case ANIM_THUMBNAIL_SCALE_DOWN:
case ANIM_THUMBNAIL_ASPECT_SCALE_UP:
case ANIM_THUMBNAIL_ASPECT_SCALE_DOWN:
b.putParcelable(KEY_ANIM_THUMBNAIL,mThumbnail);
b.putInt(KEY_ANIM_START_X,mStartX);
b.putInt(KEY_ANIM_START_Y,mStartY);
b.putInt(KEY_ANIM_WIDTH,mWidth);
b.putInt(KEY_ANIM_HEIGHT,mHeight);
b.putBinder(KEY_ANIM_START_LISTENER,mAnimationStartedListener != null ? mAnimationStartedListener.asBinder() : null);
break;
case ANIM_SCENE_TRANSITION:
if (mTransitionReceiver != null) {
b.putParcelable(KEY_TRANSITION_COMPLETE_LISTENER,mTransitionReceiver);
}
b.putBoolean(KEY_TRANSITION_IS_RETURNING,mIsReturning);
b.putStringArrayList(KEY_TRANSITION_SHARED_ELEMENTS,mSharedElementNames);
b.putParcelable(KEY_RESULT_DATA,mResultData);
b.putInt(KEY_RESULT_CODE,mResultCode);
b.putInt(KEY_EXIT_COORDINATOR_INDEX,mExitCoordinatorIndex);
break;
}
b.putInt(KEY_LAUNCH_STACK_ID,mLaunchStackId);
b.putInt(KEY_LAUNCH_TASK_ID,mLaunchTaskId);
b.putBoolean(KEY_DONT_MOVE_TO_FRONT,mAvoidMoveToFront);
b.putInt(KEY_DOCK_CREATE_MODE,mDockCreateMode);
if (mAnimSpecs != null) {
b.putParcelableArray(KEY_ANIM_SPECS,mAnimSpecs);
}
if (mAnimationFinishedListener != null) {
b.putBinder(KEY_ANIMATION_FINISHED_LISTENER,mAnimationFinishedListener.asBinder());
}
return b;
}

Fixed version (ground truth):
/** 
 * Returns the created options as a Bundle, which can be passed to  {@link android.content.Context#startActivity(android.content.Intent,android.os.Bundle) Context.startActivity(Intent, Bundle)} and related methods.Note that the returned Bundle is still owned by the ActivityOptions object; you must not modify it, but can supply it to the startActivity methods that take an options Bundle.
 */
public Bundle toBundle(){
  if (mAnimationType == ANIM_DEFAULT) {
    return null;
  }
  Bundle b=new Bundle();
  if (mPackageName != null) {
    b.putString(KEY_PACKAGE_NAME,mPackageName);
  }
  if (mLaunchBounds != null) {
    b.putParcelable(KEY_LAUNCH_BOUNDS,mLaunchBounds);
  }
  b.putInt(KEY_ANIM_TYPE,mAnimationType);
  if (mUsageTimeReport != null) {
    b.putParcelable(KEY_USAGE_TIME_REPORT,mUsageTimeReport);
  }
switch (mAnimationType) {
case ANIM_CUSTOM:
    b.putInt(KEY_ANIM_ENTER_RES_ID,mCustomEnterResId);
  b.putInt(KEY_ANIM_EXIT_RES_ID,mCustomExitResId);
b.putBinder(KEY_ANIM_START_LISTENER,mAnimationStartedListener != null ? mAnimationStartedListener.asBinder() : null);
break;
case ANIM_CUSTOM_IN_PLACE:
b.putInt(KEY_ANIM_IN_PLACE_RES_ID,mCustomInPlaceResId);
break;
case ANIM_SCALE_UP:
case ANIM_CLIP_REVEAL:
b.putInt(KEY_ANIM_START_X,mStartX);
b.putInt(KEY_ANIM_START_Y,mStartY);
b.putInt(KEY_ANIM_WIDTH,mWidth);
b.putInt(KEY_ANIM_HEIGHT,mHeight);
break;
case ANIM_THUMBNAIL_SCALE_UP:
case ANIM_THUMBNAIL_SCALE_DOWN:
case ANIM_THUMBNAIL_ASPECT_SCALE_UP:
case ANIM_THUMBNAIL_ASPECT_SCALE_DOWN:
b.putParcelable(KEY_ANIM_THUMBNAIL,mThumbnail);
b.putInt(KEY_ANIM_START_X,mStartX);
b.putInt(KEY_ANIM_START_Y,mStartY);
b.putInt(KEY_ANIM_WIDTH,mWidth);
b.putInt(KEY_ANIM_HEIGHT,mHeight);
b.putBinder(KEY_ANIM_START_LISTENER,mAnimationStartedListener != null ? mAnimationStartedListener.asBinder() : null);
break;
case ANIM_SCENE_TRANSITION:
if (mTransitionReceiver != null) {
b.putParcelable(KEY_TRANSITION_COMPLETE_LISTENER,mTransitionReceiver);
}
b.putBoolean(KEY_TRANSITION_IS_RETURNING,mIsReturning);
b.putStringArrayList(KEY_TRANSITION_SHARED_ELEMENTS,mSharedElementNames);
b.putParcelable(KEY_RESULT_DATA,mResultData);
b.putInt(KEY_RESULT_CODE,mResultCode);
b.putInt(KEY_EXIT_COORDINATOR_INDEX,mExitCoordinatorIndex);
break;
}
b.putInt(KEY_LAUNCH_STACK_ID,mLaunchStackId);
b.putInt(KEY_LAUNCH_TASK_ID,mLaunchTaskId);
b.putBoolean(KEY_TASK_OVERLAY,mTaskOverlay);
b.putInt(KEY_DOCK_CREATE_MODE,mDockCreateMode);
if (mAnimSpecs != null) {
b.putParcelableArray(KEY_ANIM_SPECS,mAnimSpecs);
}
if (mAnimationFinishedListener != null) {
b.putBinder(KEY_ANIMATION_FINISHED_LISTENER,mAnimationFinishedListener.asBinder());
}
return b;
}