Program: 35258
Project: 35258
Buggy source:
@TargetApi(Build.VERSION_CODES.KITKAT) public GiraffePlayer setDisplayModel(int targetDisplayModel){
  if (targetDisplayModel == displayModel) {
    return this;
  }
  if (boxContainerRef == null || boxContainerRef.get() == null) {
    return this;
  }
  lastDisplayModel=displayModel;
  final ViewGroup displayBoxContainer=boxContainerRef.get();
  final boolean usingAnim=usingAnim();
  if (targetDisplayModel == DISPLAY_FULL_WINDOW) {
    Activity activity=getActivity();
    if (activity == null) {
      return this;
    }
    UIHelper uiHelper=UIHelper.with(activity);
    if (videoInfo.isPortraitWhenFullScreen()) {
      uiHelper.requestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
      ignoreOrientation=ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE;
    }
    ViewGroup activityBox=(ViewGroup)activity.findViewById(android.R.id.content);
    animateIntoContainerAndThen(activityBox,new VideoViewAnimationListener(){
      @Override public void onStart(      ViewGroup src,      ViewGroup target){
        removeFloatContainer();
      }
      @Override public void onEnd(      ViewGroup src,      ViewGroup target){
        proxyListener().onDisplayModelChange(displayModel,DISPLAY_FULL_WINDOW);
        displayModel=DISPLAY_FULL_WINDOW;
      }
    }
);
  }
 else   if (targetDisplayModel == DISPLAY_NORMAL) {
    final Activity activity=getActivity();
    if (activity == null) {
      return this;
    }
    final VideoView videoView=PlayerManager.getInstance().getVideoView(videoInfo);
    if (videoView == null) {
      return this;
    }
    UIHelper uiHelper=UIHelper.with(activity);
    if (videoInfo.isPortraitWhenFullScreen()) {
      uiHelper.requestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
      ignoreOrientation=ActivityInfo.SCREEN_ORIENTATION_PORTRAIT;
    }
    uiHelper.showActionBar(true).fullScreen(false);
    animateIntoContainerAndThen(videoView,new VideoViewAnimationListener(){
      @Override public void onStart(      ViewGroup src,      ViewGroup target){
        removeFloatContainer();
      }
      @Override public void onEnd(      ViewGroup src,      ViewGroup target){
        proxyListener().onDisplayModelChange(displayModel,DISPLAY_NORMAL);
        displayModel=DISPLAY_NORMAL;
      }
    }
);
  }
 else   if (targetDisplayModel == DISPLAY_FLOAT) {
    Activity activity=getActivity();
    if (activity == null) {
      return this;
    }
    UIHelper uiHelper=UIHelper.with(activity);
    if (videoInfo.isPortraitWhenFullScreen()) {
      uiHelper.requestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
      ignoreOrientation=ActivityInfo.SCREEN_ORIENTATION_PORTRAIT;
    }
    uiHelper.showActionBar(true).fullScreen(false);
    final ViewGroup floatBox=createFloatBox();
    floatBox.setVisibility(View.INVISIBLE);
    animateIntoContainerAndThen(floatBox,new VideoViewAnimationListener(){
      @Override void onEnd(      ViewGroup src,      ViewGroup target){
        floatBox.setVisibility(View.VISIBLE);
        proxyListener().onDisplayModelChange(displayModel,DISPLAY_FLOAT);
        displayModel=DISPLAY_FLOAT;
      }
    }
);
  }
  return this;
}

Fixed version (ground truth):
@TargetApi(Build.VERSION_CODES.KITKAT) public GiraffePlayer setDisplayModel(int targetDisplayModel){
  if (targetDisplayModel == displayModel) {
    return this;
  }
  if (boxContainerRef == null || boxContainerRef.get() == null) {
    return this;
  }
  lastDisplayModel=displayModel;
  if (targetDisplayModel == DISPLAY_FULL_WINDOW) {
    Activity activity=getActivity();
    if (activity == null) {
      return this;
    }
    UIHelper uiHelper=UIHelper.with(activity);
    if (videoInfo.isPortraitWhenFullScreen()) {
      uiHelper.requestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
      ignoreOrientation=ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE;
    }
    uiHelper.showActionBar(false).fullScreen(true);
    ViewGroup activityBox=(ViewGroup)activity.findViewById(android.R.id.content);
    animateIntoContainerAndThen(activityBox,new VideoViewAnimationListener(){
      @Override public void onStart(      ViewGroup src,      ViewGroup target){
        removeFloatContainer();
      }
      @Override public void onEnd(      ViewGroup src,      ViewGroup target){
        proxyListener().onDisplayModelChange(displayModel,DISPLAY_FULL_WINDOW);
        displayModel=DISPLAY_FULL_WINDOW;
      }
    }
);
  }
 else   if (targetDisplayModel == DISPLAY_NORMAL) {
    final Activity activity=getActivity();
    if (activity == null) {
      return this;
    }
    final VideoView videoView=PlayerManager.getInstance().getVideoView(videoInfo);
    if (videoView == null) {
      return this;
    }
    UIHelper uiHelper=UIHelper.with(activity);
    if (videoInfo.isPortraitWhenFullScreen()) {
      uiHelper.requestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
      ignoreOrientation=ActivityInfo.SCREEN_ORIENTATION_PORTRAIT;
    }
    uiHelper.showActionBar(true).fullScreen(false);
    animateIntoContainerAndThen(videoView,new VideoViewAnimationListener(){
      @Override public void onStart(      ViewGroup src,      ViewGroup target){
        removeFloatContainer();
      }
      @Override public void onEnd(      ViewGroup src,      ViewGroup target){
        proxyListener().onDisplayModelChange(displayModel,DISPLAY_NORMAL);
        displayModel=DISPLAY_NORMAL;
      }
    }
);
  }
 else   if (targetDisplayModel == DISPLAY_FLOAT) {
    Activity activity=getActivity();
    if (activity == null) {
      return this;
    }
    UIHelper uiHelper=UIHelper.with(activity);
    if (videoInfo.isPortraitWhenFullScreen()) {
      uiHelper.requestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
      ignoreOrientation=ActivityInfo.SCREEN_ORIENTATION_PORTRAIT;
    }
    uiHelper.showActionBar(true).fullScreen(false);
    final ViewGroup floatBox=createFloatBox();
    floatBox.setVisibility(View.INVISIBLE);
    animateIntoContainerAndThen(floatBox,new VideoViewAnimationListener(){
      @Override void onEnd(      ViewGroup src,      ViewGroup target){
        floatBox.setVisibility(View.VISIBLE);
        proxyListener().onDisplayModelChange(displayModel,DISPLAY_FLOAT);
        displayModel=DISPLAY_FLOAT;
      }
    }
);
  }
  return this;
}