Program: 192110
Project: 192110
Buggy source:
/** 
 * Choose the correct animation and set it to the passed WindowState.
 * @param transit If AppTransition.TRANSIT_PREVIEW_DONE and the app window has been drawnthen the animation will be app_starting_exit. Any other value loads the animation from the switch statement below.
 * @param isEntrance The animation type the last time this was called. Used to keep fromloading the same animation twice.
 * @return true if an animation has been loaded.
 */
boolean applyAnimationLocked(int transit,boolean isEntrance){
  if ((mLocalAnimating && mAnimationIsEntrance == isEntrance) || mKeyguardGoingAwayAnimation) {
    if (mAnimation != null && mKeyguardGoingAwayAnimation && transit == WindowManagerPolicy.TRANSIT_PREVIEW_DONE) {
      applyFadeoutDuringKeyguardExitAnimation();
    }
    return true;
  }
  if (mService.okToDisplay()) {
    int anim=mPolicy.selectAnimationLw(mWin,transit);
    int attr=-1;
    Animation a=null;
    if (anim != 0) {
      a=anim != -1 ? AnimationUtils.loadAnimation(mContext,anim) : null;
    }
 else {
switch (transit) {
case WindowManagerPolicy.TRANSIT_ENTER:
        attr=com.android.internal.R.styleable.WindowAnimation_windowEnterAnimation;
      break;
case WindowManagerPolicy.TRANSIT_EXIT:
    attr=com.android.internal.R.styleable.WindowAnimation_windowExitAnimation;
  break;
case WindowManagerPolicy.TRANSIT_SHOW:
attr=com.android.internal.R.styleable.WindowAnimation_windowShowAnimation;
break;
case WindowManagerPolicy.TRANSIT_HIDE:
attr=com.android.internal.R.styleable.WindowAnimation_windowHideAnimation;
break;
}
if (attr >= 0) {
a=mService.mAppTransition.loadAnimationAttr(mWin.mAttrs,attr);
}
}
if (DEBUG_ANIM) Slog.v(TAG,"String_Node_Str" + this + "String_Node_Str"+ anim+ "String_Node_Str"+ Integer.toHexString(attr)+ "String_Node_Str"+ a+ "String_Node_Str"+ transit+ "String_Node_Str"+ isEntrance+ "String_Node_Str"+ Debug.getCallers(3));
if (a != null) {
if (DEBUG_ANIM) logWithStack(TAG,"String_Node_Str" + a + "String_Node_Str"+ this);
setAnimation(a);
mAnimationIsEntrance=isEntrance;
}
}
 else {
clearAnimation();
}
if (mWin.mAttrs.type == TYPE_INPUT_METHOD) {
mService.adjustForImeIfNeeded(mWin.mDisplayContent);
}
return mAnimation != null;
}

Fixed version (ground truth):
/** 
 * Choose the correct animation and set it to the passed WindowState.
 * @param transit If AppTransition.TRANSIT_PREVIEW_DONE and the app window has been drawnthen the animation will be app_starting_exit. Any other value loads the animation from the switch statement below.
 * @param isEntrance The animation type the last time this was called. Used to keep fromloading the same animation twice.
 * @return true if an animation has been loaded.
 */
boolean applyAnimationLocked(int transit,boolean isEntrance){
  if ((mLocalAnimating && mAnimationIsEntrance == isEntrance) || mKeyguardGoingAwayAnimation) {
    if (mAnimation != null && mKeyguardGoingAwayAnimation && transit == WindowManagerPolicy.TRANSIT_PREVIEW_DONE) {
      applyFadeoutDuringKeyguardExitAnimation();
    }
    return true;
  }
  if (mService.okToDisplay()) {
    int anim=mPolicy.selectAnimationLw(mWin,transit);
    int attr=-1;
    Animation a=null;
    if (anim != 0) {
      a=anim != -1 ? AnimationUtils.loadAnimation(mContext,anim) : null;
    }
 else {
switch (transit) {
case WindowManagerPolicy.TRANSIT_ENTER:
        attr=com.android.internal.R.styleable.WindowAnimation_windowEnterAnimation;
      break;
case WindowManagerPolicy.TRANSIT_EXIT:
    attr=com.android.internal.R.styleable.WindowAnimation_windowExitAnimation;
  break;
case WindowManagerPolicy.TRANSIT_SHOW:
attr=com.android.internal.R.styleable.WindowAnimation_windowShowAnimation;
break;
case WindowManagerPolicy.TRANSIT_HIDE:
attr=com.android.internal.R.styleable.WindowAnimation_windowHideAnimation;
break;
}
if (attr >= 0) {
a=mService.mAppTransition.loadAnimationAttr(mWin.mAttrs,attr);
}
}
if (DEBUG_ANIM) Slog.v(TAG,"String_Node_Str" + this + "String_Node_Str"+ anim+ "String_Node_Str"+ Integer.toHexString(attr)+ "String_Node_Str"+ a+ "String_Node_Str"+ transit+ "String_Node_Str"+ isEntrance+ "String_Node_Str"+ Debug.getCallers(3));
if (a != null) {
if (DEBUG_ANIM) logWithStack(TAG,"String_Node_Str" + a + "String_Node_Str"+ this);
setAnimation(a);
mAnimationIsEntrance=isEntrance;
}
}
 else {
clearAnimation();
}
if (mWin.mAttrs.type == TYPE_INPUT_METHOD) {
mService.adjustForImeIfNeeded(mWin.mDisplayContent);
if (isEntrance) {
mWin.setDisplayLayoutNeeded();
mService.mWindowPlacerLocked.requestTraversal();
}
}
return mAnimation != null;
}