nus-yam/ex-repair huggingface dataset:
Program: 192433
Project: 192433
Buggy source:
/** 
 * Updates the limits lists and column map with the given item metadata.
 * @param absoluteChildRect The absolute rectangle for the child view being processed.
 * @param adapterPosition The position of the child view being processed.
 */
private void recordItemData(Rect absoluteChildRect,int adapterPosition){
  if (mColumnBounds.size() != mHelper.getColumnCount()) {
    recordLimits(mColumnBounds,new Limits(absoluteChildRect.left,absoluteChildRect.right));
  }
  if (mRowBounds.size() != mHelper.getRowCount()) {
    recordLimits(mRowBounds,new Limits(absoluteChildRect.top,absoluteChildRect.bottom));
  }
  SparseIntArray columnList=mColumns.get(absoluteChildRect.left);
  if (columnList == null) {
    columnList=new SparseIntArray();
    mColumns.put(absoluteChildRect.left,columnList);
  }
  columnList.put(absoluteChildRect.top,adapterPosition);
}

Fixed version (ground truth):
/** 
 * Updates the limits lists and column map with the given item metadata.
 * @param absoluteChildRect The absolute rectangle for the child view being processed.
 * @param adapterPosition The position of the child view being processed.
 */
private void recordItemData(Rect absoluteChildRect,int adapterPosition){
  if (mColumnBounds.size() != mHelper.getColumnCount()) {
    recordLimits(mColumnBounds,new Limits(absoluteChildRect.left,absoluteChildRect.right));
  }
  recordLimits(mRowBounds,new Limits(absoluteChildRect.top,absoluteChildRect.bottom));
  SparseIntArray columnList=mColumns.get(absoluteChildRect.left);
  if (columnList == null) {
    columnList=new SparseIntArray();
    mColumns.put(absoluteChildRect.left,columnList);
  }
  columnList.put(absoluteChildRect.top,adapterPosition);
}
Program: 192434
Project: 192434
Buggy source:
@Override public Selection createFromParcel(Parcel in,ClassLoader loader){
  return new Selection(in.readString(),(ArrayList<String>)in.readArrayList(loader));
}

Fixed version (ground truth):
@Override public Selection createFromParcel(Parcel in,ClassLoader loader){
  return new Selection(in.readString(),in.readArrayList(loader));
}
Program: 192435
Project: 192435
Buggy source:
@Override public String toString(){
  if (size() <= 0) {
    return "String_Node_Str";
  }
  StringBuilder buffer=new StringBuilder(size() * 28);
  buffer.append("String_Node_Str").append("String_Node_Str" + mSelection.size()).append("String_Node_Str" + mSelection).append("String_Node_Str" + mProvisionalSelection.size()).append("String_Node_Str" + mProvisionalSelection).append("String_Node_Str");
  return buffer.toString();
}

Fixed version (ground truth):
@Override public String toString(){
  return "String_Node_Str" + lowerLimit + "String_Node_Str"+ upperLimit+ "String_Node_Str";
}
Program: 192436
Project: 192436
Buggy source:
/** 
 * Processes a MotionEvent by starting, ending, or resizing the band select overlay.
 * @param input
 */
private void processInputEvent(InputEvent input){
  assert(input.isMouseEvent());
  if (shouldStop(input)) {
    endBandSelect();
    return;
  }
  if (!isActive()) {
    return;
  }
  mCurrentPosition=input.getOrigin();
  scrollViewIfNecessary();
  resizeBandSelectRectangle();
}

Fixed version (ground truth):
/** 
 * Processes a MotionEvent by starting, ending, or resizing the band select overlay.
 * @param input
 */
private void processInputEvent(InputEvent input){
  assert(input.isMouseEvent());
  if (shouldStop(input)) {
    endBandSelect();
    return;
  }
  if (!isActive()) {
    return;
  }
  mCurrentPosition=input.getOrigin();
  mModel.resizeSelection(input.getOrigin());
  scrollViewIfNecessary();
  resizeBandSelectRectangle();
}
Program: 192437
Project: 192437
Buggy source:
/** 
 * @return a LongSamplingCounter, measuring time spent in the idle state inmilliseconds.
 */
@Override public LongSamplingCounter getIdleTimeCounter(){
  return mRxTimeMillis;
}

Fixed version (ground truth):
/** 
 * @return a LongSamplingCounter, measuring time spent in the idle state inmilliseconds.
 */
@Override public LongSamplingCounter getIdleTimeCounter(){
  return mIdleTimeMillis;
}
Program: 192438
Project: 192438
Buggy source:
/** 
 * Updates the limits lists and column map with the given item metadata.
 * @param absoluteChildRect The absolute rectangle for the child view being processed.
 * @param adapterPosition The position of the child view being processed.
 */
private void recordItemData(Rect absoluteChildRect,int adapterPosition){
  if (mColumnBounds.size() != mHelper.getColumnCount()) {
    recordLimits(mColumnBounds,new Limits(absoluteChildRect.left,absoluteChildRect.right));
  }
  if (mRowBounds.size() != mHelper.getRowCount()) {
    recordLimits(mRowBounds,new Limits(absoluteChildRect.top,absoluteChildRect.bottom));
  }
  SparseIntArray columnList=mColumns.get(absoluteChildRect.left);
  if (columnList == null) {
    columnList=new SparseIntArray();
    mColumns.put(absoluteChildRect.left,columnList);
  }
  columnList.put(absoluteChildRect.top,adapterPosition);
}

Fixed version (ground truth):
/** 
 * Updates the limits lists and column map with the given item metadata.
 * @param absoluteChildRect The absolute rectangle for the child view being processed.
 * @param adapterPosition The position of the child view being processed.
 */
private void recordItemData(Rect absoluteChildRect,int adapterPosition){
  if (mColumnBounds.size() != mHelper.getColumnCount()) {
    recordLimits(mColumnBounds,new Limits(absoluteChildRect.left,absoluteChildRect.right));
  }
  recordLimits(mRowBounds,new Limits(absoluteChildRect.top,absoluteChildRect.bottom));
  SparseIntArray columnList=mColumns.get(absoluteChildRect.left);
  if (columnList == null) {
    columnList=new SparseIntArray();
    mColumns.put(absoluteChildRect.left,columnList);
  }
  columnList.put(absoluteChildRect.top,adapterPosition);
}
Program: 192439
Project: 192439
Buggy source:
@Override public Selection createFromParcel(Parcel in,ClassLoader loader){
  return new Selection(in.readString(),(ArrayList<String>)in.readArrayList(loader));
}

Fixed version (ground truth):
@Override public Selection createFromParcel(Parcel in,ClassLoader loader){
  return new Selection(in.readString(),in.readArrayList(loader));
}
Program: 192440
Project: 192440
Buggy source:
@Override public String toString(){
  if (size() <= 0) {
    return "String_Node_Str";
  }
  StringBuilder buffer=new StringBuilder(size() * 28);
  buffer.append("String_Node_Str").append("String_Node_Str" + mSelection.size()).append("String_Node_Str" + mSelection).append("String_Node_Str" + mProvisionalSelection.size()).append("String_Node_Str" + mProvisionalSelection).append("String_Node_Str");
  return buffer.toString();
}

Fixed version (ground truth):
@Override public String toString(){
  return "String_Node_Str" + lowerLimit + "String_Node_Str"+ upperLimit+ "String_Node_Str";
}
Program: 192441
Project: 192441
Buggy source:
/** 
 * Processes a MotionEvent by starting, ending, or resizing the band select overlay.
 * @param input
 */
private void processInputEvent(InputEvent input){
  assert(input.isMouseEvent());
  if (shouldStop(input)) {
    endBandSelect();
    return;
  }
  if (!isActive()) {
    return;
  }
  mCurrentPosition=input.getOrigin();
  scrollViewIfNecessary();
  resizeBandSelectRectangle();
}

Fixed version (ground truth):
/** 
 * Processes a MotionEvent by starting, ending, or resizing the band select overlay.
 * @param input
 */
private void processInputEvent(InputEvent input){
  assert(input.isMouseEvent());
  if (shouldStop(input)) {
    endBandSelect();
    return;
  }
  if (!isActive()) {
    return;
  }
  mCurrentPosition=input.getOrigin();
  mModel.resizeSelection(input.getOrigin());
  scrollViewIfNecessary();
  resizeBandSelectRectangle();
}
Program: 192442
Project: 192442
Buggy source:
private void doKeyguardLaterLocked(long timeout){
  long when=SystemClock.elapsedRealtime() + timeout;
  Intent intent=new Intent(DELAYED_KEYGUARD_ACTION);
  intent.putExtra("String_Node_Str",mDelayedShowingSequence);
  PendingIntent sender=PendingIntent.getBroadcast(mContext,0,intent,PendingIntent.FLAG_CANCEL_CURRENT);
  mAlarmManager.set(AlarmManager.ELAPSED_REALTIME_WAKEUP,when,sender);
  if (DEBUG)   Log.d(TAG,"String_Node_Str" + mDelayedShowingSequence);
  doKeyguardLaterForChildProfilesLocked();
}

Fixed version (ground truth):
private void doKeyguardLaterLocked(long timeout){
  long when=SystemClock.elapsedRealtime() + timeout;
  Intent intent=new Intent(DELAYED_KEYGUARD_ACTION);
  intent.putExtra("String_Node_Str",mDelayedShowingSequence);
  PendingIntent sender=PendingIntent.getBroadcast(mContext,0,intent,PendingIntent.FLAG_CANCEL_CURRENT);
  mAlarmManager.setExactAndAllowWhileIdle(AlarmManager.ELAPSED_REALTIME_WAKEUP,when,sender);
  if (DEBUG)   Log.d(TAG,"String_Node_Str" + mDelayedShowingSequence);
  doKeyguardLaterForChildProfilesLocked();
}
Program: 192443
Project: 192443
Buggy source:
private void doKeyguardLaterForChildProfilesLocked(){
  UserManager um=UserManager.get(mContext);
  List<UserInfo> profiles=um.getEnabledProfiles(UserHandle.myUserId());
  for (  UserInfo info : profiles) {
    if (mLockPatternUtils.isSeparateProfileChallengeEnabled(info.id)) {
      long userTimeout=getLockTimeout(info.id);
      long userWhen=SystemClock.elapsedRealtime() + userTimeout;
      Intent lockIntent=new Intent(DELAYED_LOCK_PROFILE_ACTION);
      lockIntent.putExtra(Intent.EXTRA_USER_ID,info.id);
      PendingIntent lockSender=PendingIntent.getBroadcast(mContext,0,lockIntent,PendingIntent.FLAG_CANCEL_CURRENT);
      mAlarmManager.set(AlarmManager.ELAPSED_REALTIME_WAKEUP,userWhen,lockSender);
    }
  }
}

Fixed version (ground truth):
private void doKeyguardLaterForChildProfilesLocked(){
  UserManager um=UserManager.get(mContext);
  List<UserInfo> profiles=um.getEnabledProfiles(UserHandle.myUserId());
  for (  UserInfo info : profiles) {
    if (mLockPatternUtils.isSeparateProfileChallengeEnabled(info.id)) {
      long userTimeout=getLockTimeout(info.id);
      long userWhen=SystemClock.elapsedRealtime() + userTimeout;
      Intent lockIntent=new Intent(DELAYED_LOCK_PROFILE_ACTION);
      lockIntent.putExtra(Intent.EXTRA_USER_ID,info.id);
      PendingIntent lockSender=PendingIntent.getBroadcast(mContext,0,lockIntent,PendingIntent.FLAG_CANCEL_CURRENT);
      mAlarmManager.setExactAndAllowWhileIdle(AlarmManager.ELAPSED_REALTIME_WAKEUP,userWhen,lockSender);
    }
  }
}
Program: 192444
Project: 192444
Buggy source:
public void clearAnimation(){
  if (animation != null) {
    animation=null;
    animating=true;
  }
  clearThumbnail();
  if (mAppToken.deferClearAllDrawn) {
    mAppToken.allDrawn=false;
    mAppToken.deferClearAllDrawn=false;
  }
  usingTransferredAnimation=false;
}

Fixed version (ground truth):
public void clearAnimation(){
  if (animation != null) {
    animating=true;
  }
  clearThumbnail();
  setNullAnimation();
  if (mAppToken.deferClearAllDrawn) {
    mAppToken.allDrawn=false;
    mAppToken.deferClearAllDrawn=false;
  }
}
Program: 192445
Project: 192445
Buggy source:
private boolean stepAnimation(long currentTime){
  if (animation == null) {
    return false;
  }
  transformation.clear();
  final long animationFrameTime=getAnimationFrameTime(animation,currentTime);
  boolean hasMoreFrames=animation.getTransformation(animationFrameTime,transformation);
  if (!hasMoreFrames) {
    if (deferThumbnailDestruction && !deferFinalFrameCleanup) {
      deferFinalFrameCleanup=true;
      hasMoreFrames=true;
    }
 else {
      if (false && DEBUG_ANIM)       Slog.v(TAG,"String_Node_Str" + mAppToken + "String_Node_Str"+ hasMoreFrames+ "String_Node_Str"+ transformation+ "String_Node_Str"+ mProlongAnimation);
      deferFinalFrameCleanup=false;
      if (mProlongAnimation == PROLONG_ANIMATION_AT_END) {
        hasMoreFrames=true;
      }
 else {
        animation=null;
        clearThumbnail();
        if (DEBUG_ANIM)         Slog.v(TAG,"String_Node_Str" + mAppToken + "String_Node_Str"+ currentTime);
      }
    }
  }
  hasTransformation=hasMoreFrames;
  return hasMoreFrames;
}

Fixed version (ground truth):
private boolean stepAnimation(long currentTime){
  if (animation == null) {
    return false;
  }
  transformation.clear();
  final long animationFrameTime=getAnimationFrameTime(animation,currentTime);
  boolean hasMoreFrames=animation.getTransformation(animationFrameTime,transformation);
  if (!hasMoreFrames) {
    if (deferThumbnailDestruction && !deferFinalFrameCleanup) {
      deferFinalFrameCleanup=true;
      hasMoreFrames=true;
    }
 else {
      if (false && DEBUG_ANIM)       Slog.v(TAG,"String_Node_Str" + mAppToken + "String_Node_Str"+ hasMoreFrames+ "String_Node_Str"+ transformation+ "String_Node_Str"+ mProlongAnimation);
      deferFinalFrameCleanup=false;
      if (mProlongAnimation == PROLONG_ANIMATION_AT_END) {
        hasMoreFrames=true;
      }
 else {
        setNullAnimation();
        clearThumbnail();
        if (DEBUG_ANIM)         Slog.v(TAG,"String_Node_Str" + mAppToken + "String_Node_Str"+ currentTime);
      }
    }
  }
  hasTransformation=hasMoreFrames;
  return hasMoreFrames;
}
Program: 192446
Project: 192446
Buggy source:
void transferCurrentAnimation(AppWindowAnimator toAppAnimator,WindowStateAnimator transferWinAnimator){
  if (animation != null) {
    toAppAnimator.animation=animation;
    animation=null;
    toAppAnimator.animating=animating;
    toAppAnimator.animLayerAdjustment=animLayerAdjustment;
    animLayerAdjustment=0;
    toAppAnimator.updateLayers();
    updateLayers();
    toAppAnimator.usingTransferredAnimation=true;
  }
  if (transferWinAnimator != null) {
    mAllAppWinAnimators.remove(transferWinAnimator);
    toAppAnimator.mAllAppWinAnimators.add(transferWinAnimator);
    transferWinAnimator.mAppAnimator=toAppAnimator;
  }
}

Fixed version (ground truth):
void transferCurrentAnimation(AppWindowAnimator toAppAnimator,WindowStateAnimator transferWinAnimator){
  if (animation != null) {
    toAppAnimator.animation=animation;
    toAppAnimator.animating=animating;
    toAppAnimator.animLayerAdjustment=animLayerAdjustment;
    setNullAnimation();
    animLayerAdjustment=0;
    toAppAnimator.updateLayers();
    updateLayers();
    toAppAnimator.usingTransferredAnimation=true;
  }
  if (transferWinAnimator != null) {
    mAllAppWinAnimators.remove(transferWinAnimator);
    toAppAnimator.mAllAppWinAnimators.add(transferWinAnimator);
    transferWinAnimator.mAppAnimator=toAppAnimator;
  }
}
Program: 192448
Project: 192448
Buggy source:
void updateTokenInPlaceLocked(AppWindowToken wtoken,int transit){
  if (transit != AppTransition.TRANSIT_UNSET) {
    if (wtoken.mAppAnimator.animation == AppWindowAnimator.sDummyAnimation) {
      wtoken.mAppAnimator.animation=null;
    }
    applyAnimationLocked(wtoken,null,transit,false,false);
  }
}

Fixed version (ground truth):
void updateTokenInPlaceLocked(AppWindowToken wtoken,int transit){
  if (transit != AppTransition.TRANSIT_UNSET) {
    if (wtoken.mAppAnimator.animation == AppWindowAnimator.sDummyAnimation) {
      wtoken.mAppAnimator.setNullAnimation();
    }
    applyAnimationLocked(wtoken,null,transit,false,false);
  }
}
Program: 192450
Project: 192450
Buggy source:
private boolean tryStartExitingAnimation(WindowState win,WindowStateAnimator winAnimator,boolean isDefaultDisplay,boolean focusMayChange){
  int transit=WindowManagerPolicy.TRANSIT_EXIT;
  if (win.mAttrs.type == TYPE_APPLICATION_STARTING) {
    transit=WindowManagerPolicy.TRANSIT_PREVIEW_DONE;
  }
  if (win.isWinVisibleLw() && winAnimator.applyAnimationLocked(transit,false)) {
    focusMayChange=isDefaultDisplay;
    win.mAnimatingExit=true;
  }
 else   if (win.mWinAnimator.isAnimating()) {
    win.mAnimatingExit=true;
  }
 else   if (mWallpaperControllerLocked.isWallpaperTarget(win)) {
    win.mAnimatingExit=true;
    win.mWinAnimator.mAnimating=true;
  }
 else {
    if (mInputMethodWindow == win) {
      mInputMethodWindow=null;
    }
    win.destroyOrSaveSurface();
  }
  if (mAccessibilityController != null && win.getDisplayId() == Display.DEFAULT_DISPLAY) {
    mAccessibilityController.onWindowTransitionLocked(win,transit);
  }
  return focusMayChange;
}

Fixed version (ground truth):
private boolean tryStartExitingAnimation(WindowState win,WindowStateAnimator winAnimator,boolean isDefaultDisplay,boolean focusMayChange){
  int transit=WindowManagerPolicy.TRANSIT_EXIT;
  if (win.mAttrs.type == TYPE_APPLICATION_STARTING) {
    transit=WindowManagerPolicy.TRANSIT_PREVIEW_DONE;
  }
  if (win.isWinVisibleLw() && winAnimator.applyAnimationLocked(transit,false)) {
    focusMayChange=isDefaultDisplay;
    win.mAnimatingExit=true;
    win.mWinAnimator.mAnimating=true;
  }
 else   if (win.mWinAnimator.isAnimating()) {
    win.mAnimatingExit=true;
    win.mWinAnimator.mAnimating=true;
  }
 else   if (mWallpaperControllerLocked.isWallpaperTarget(win)) {
    win.mAnimatingExit=true;
    win.mWinAnimator.mAnimating=true;
  }
 else {
    if (mInputMethodWindow == win) {
      mInputMethodWindow=null;
    }
    win.destroyOrSaveSurface();
  }
  if (mAccessibilityController != null && win.getDisplayId() == Display.DEFAULT_DISPLAY) {
    mAccessibilityController.onWindowTransitionLocked(win,transit);
  }
  return focusMayChange;
}
Program: 192452
Project: 192452
Buggy source:
private void handleClosingApps(int transit,LayoutParams animLp,boolean voiceInteraction,LayerAndToken layerAndToken){
  final int appsCount;
  appsCount=mService.mClosingApps.size();
  for (int i=0; i < appsCount; i++) {
    AppWindowToken wtoken=mService.mClosingApps.valueAt(i);
    final AppWindowAnimator appAnimator=wtoken.mAppAnimator;
    if (DEBUG_APP_TRANSITIONS)     Slog.v(TAG,"String_Node_Str" + wtoken);
    appAnimator.clearThumbnail();
    appAnimator.animation=null;
    wtoken.inPendingTransaction=false;
    mService.setTokenVisibilityLocked(wtoken,animLp,false,transit,false,voiceInteraction);
    wtoken.updateReportedVisibilityLocked();
    wtoken.allDrawn=true;
    wtoken.deferClearAllDrawn=false;
    if (wtoken.startingWindow != null && !wtoken.startingWindow.mAnimatingExit) {
      mService.scheduleRemoveStartingWindowLocked(wtoken);
    }
    mService.mAnimator.mAppWindowAnimating|=appAnimator.isAnimating();
    if (animLp != null) {
      int layer=-1;
      for (int j=0; j < wtoken.windows.size(); j++) {
        WindowState win=wtoken.windows.get(j);
        if (win.mWinAnimator.mAnimLayer > layer) {
          layer=win.mWinAnimator.mAnimLayer;
        }
      }
      if (layerAndToken.token == null || layer > layerAndToken.layer) {
        layerAndToken.token=wtoken;
        layerAndToken.layer=layer;
      }
    }
    if (mService.mAppTransition.isNextAppTransitionThumbnailDown()) {
      createThumbnailAppAnimator(transit,wtoken,0,layerAndToken.layer);
    }
  }
}

Fixed version (ground truth):
private void handleClosingApps(int transit,LayoutParams animLp,boolean voiceInteraction,LayerAndToken layerAndToken){
  final int appsCount;
  appsCount=mService.mClosingApps.size();
  for (int i=0; i < appsCount; i++) {
    AppWindowToken wtoken=mService.mClosingApps.valueAt(i);
    final AppWindowAnimator appAnimator=wtoken.mAppAnimator;
    if (DEBUG_APP_TRANSITIONS)     Slog.v(TAG,"String_Node_Str" + wtoken);
    appAnimator.clearThumbnail();
    appAnimator.setNullAnimation();
    wtoken.inPendingTransaction=false;
    mService.setTokenVisibilityLocked(wtoken,animLp,false,transit,false,voiceInteraction);
    wtoken.updateReportedVisibilityLocked();
    wtoken.allDrawn=true;
    wtoken.deferClearAllDrawn=false;
    if (wtoken.startingWindow != null && !wtoken.startingWindow.mAnimatingExit) {
      mService.scheduleRemoveStartingWindowLocked(wtoken);
    }
    mService.mAnimator.mAppWindowAnimating|=appAnimator.isAnimating();
    if (animLp != null) {
      int layer=-1;
      for (int j=0; j < wtoken.windows.size(); j++) {
        WindowState win=wtoken.windows.get(j);
        if (win.mWinAnimator.mAnimLayer > layer) {
          layer=win.mWinAnimator.mAnimLayer;
        }
      }
      if (layerAndToken.token == null || layer > layerAndToken.layer) {
        layerAndToken.token=wtoken;
        layerAndToken.layer=layer;
      }
    }
    if (mService.mAppTransition.isNextAppTransitionThumbnailDown()) {
      createThumbnailAppAnimator(transit,wtoken,0,layerAndToken.layer);
    }
  }
}
Program: 192453
Project: 192453
Buggy source:
private void processApplicationsAnimatingInPlace(int transit){
  if (transit == AppTransition.TRANSIT_TASK_IN_PLACE) {
    final WindowState win=mService.findFocusedWindowLocked(mService.getDefaultDisplayContentLocked());
    if (win != null) {
      final AppWindowToken wtoken=win.mAppToken;
      final AppWindowAnimator appAnimator=wtoken.mAppAnimator;
      if (DEBUG_APP_TRANSITIONS)       Slog.v(TAG,"String_Node_Str" + wtoken);
      appAnimator.clearThumbnail();
      appAnimator.animation=null;
      mService.updateTokenInPlaceLocked(wtoken,transit);
      wtoken.updateReportedVisibilityLocked();
      appAnimator.mAllAppWinAnimators.clear();
      final int N=wtoken.allAppWindows.size();
      for (int j=0; j < N; j++) {
        appAnimator.mAllAppWinAnimators.add(wtoken.allAppWindows.get(j).mWinAnimator);
      }
      mService.mAnimator.mAppWindowAnimating|=appAnimator.isAnimating();
      mService.mAnimator.orAnimating(appAnimator.showAllWindowsLocked());
    }
  }
}

Fixed version (ground truth):
private void processApplicationsAnimatingInPlace(int transit){
  if (transit == AppTransition.TRANSIT_TASK_IN_PLACE) {
    final WindowState win=mService.findFocusedWindowLocked(mService.getDefaultDisplayContentLocked());
    if (win != null) {
      final AppWindowToken wtoken=win.mAppToken;
      final AppWindowAnimator appAnimator=wtoken.mAppAnimator;
      if (DEBUG_APP_TRANSITIONS)       Slog.v(TAG,"String_Node_Str" + wtoken);
      appAnimator.clearThumbnail();
      appAnimator.setNullAnimation();
      mService.updateTokenInPlaceLocked(wtoken,transit);
      wtoken.updateReportedVisibilityLocked();
      appAnimator.mAllAppWinAnimators.clear();
      final int N=wtoken.allAppWindows.size();
      for (int j=0; j < N; j++) {
        appAnimator.mAllAppWinAnimators.add(wtoken.allAppWindows.get(j).mWinAnimator);
      }
      mService.mAnimator.mAppWindowAnimating|=appAnimator.isAnimating();
      mService.mAnimator.orAnimating(appAnimator.showAllWindowsLocked());
    }
  }
}
Program: 192454
Project: 192454
Buggy source:
public void clearAnimation(){
  if (animation != null) {
    animation=null;
    animating=true;
  }
  clearThumbnail();
  if (mAppToken.deferClearAllDrawn) {
    mAppToken.allDrawn=false;
    mAppToken.deferClearAllDrawn=false;
  }
  usingTransferredAnimation=false;
}

Fixed version (ground truth):
public void clearAnimation(){
  if (animation != null) {
    animating=true;
  }
  clearThumbnail();
  setNullAnimation();
  if (mAppToken.deferClearAllDrawn) {
    mAppToken.allDrawn=false;
    mAppToken.deferClearAllDrawn=false;
  }
}
Program: 192455
Project: 192455
Buggy source:
private boolean stepAnimation(long currentTime){
  if (animation == null) {
    return false;
  }
  transformation.clear();
  final long animationFrameTime=getAnimationFrameTime(animation,currentTime);
  boolean hasMoreFrames=animation.getTransformation(animationFrameTime,transformation);
  if (!hasMoreFrames) {
    if (deferThumbnailDestruction && !deferFinalFrameCleanup) {
      deferFinalFrameCleanup=true;
      hasMoreFrames=true;
    }
 else {
      if (false && DEBUG_ANIM)       Slog.v(TAG,"String_Node_Str" + mAppToken + "String_Node_Str"+ hasMoreFrames+ "String_Node_Str"+ transformation+ "String_Node_Str"+ mProlongAnimation);
      deferFinalFrameCleanup=false;
      if (mProlongAnimation == PROLONG_ANIMATION_AT_END) {
        hasMoreFrames=true;
      }
 else {
        animation=null;
        clearThumbnail();
        if (DEBUG_ANIM)         Slog.v(TAG,"String_Node_Str" + mAppToken + "String_Node_Str"+ currentTime);
      }
    }
  }
  hasTransformation=hasMoreFrames;
  return hasMoreFrames;
}

Fixed version (ground truth):
private boolean stepAnimation(long currentTime){
  if (animation == null) {
    return false;
  }
  transformation.clear();
  final long animationFrameTime=getAnimationFrameTime(animation,currentTime);
  boolean hasMoreFrames=animation.getTransformation(animationFrameTime,transformation);
  if (!hasMoreFrames) {
    if (deferThumbnailDestruction && !deferFinalFrameCleanup) {
      deferFinalFrameCleanup=true;
      hasMoreFrames=true;
    }
 else {
      if (false && DEBUG_ANIM)       Slog.v(TAG,"String_Node_Str" + mAppToken + "String_Node_Str"+ hasMoreFrames+ "String_Node_Str"+ transformation+ "String_Node_Str"+ mProlongAnimation);
      deferFinalFrameCleanup=false;
      if (mProlongAnimation == PROLONG_ANIMATION_AT_END) {
        hasMoreFrames=true;
      }
 else {
        setNullAnimation();
        clearThumbnail();
        if (DEBUG_ANIM)         Slog.v(TAG,"String_Node_Str" + mAppToken + "String_Node_Str"+ currentTime);
      }
    }
  }
  hasTransformation=hasMoreFrames;
  return hasMoreFrames;
}
Program: 192456
Project: 192456
Buggy source:
void transferCurrentAnimation(AppWindowAnimator toAppAnimator,WindowStateAnimator transferWinAnimator){
  if (animation != null) {
    toAppAnimator.animation=animation;
    animation=null;
    toAppAnimator.animating=animating;
    toAppAnimator.animLayerAdjustment=animLayerAdjustment;
    animLayerAdjustment=0;
    toAppAnimator.updateLayers();
    updateLayers();
    toAppAnimator.usingTransferredAnimation=true;
  }
  if (transferWinAnimator != null) {
    mAllAppWinAnimators.remove(transferWinAnimator);
    toAppAnimator.mAllAppWinAnimators.add(transferWinAnimator);
    transferWinAnimator.mAppAnimator=toAppAnimator;
  }
}

Fixed version (ground truth):
void transferCurrentAnimation(AppWindowAnimator toAppAnimator,WindowStateAnimator transferWinAnimator){
  if (animation != null) {
    toAppAnimator.animation=animation;
    toAppAnimator.animating=animating;
    toAppAnimator.animLayerAdjustment=animLayerAdjustment;
    setNullAnimation();
    animLayerAdjustment=0;
    toAppAnimator.updateLayers();
    updateLayers();
    toAppAnimator.usingTransferredAnimation=true;
  }
  if (transferWinAnimator != null) {
    mAllAppWinAnimators.remove(transferWinAnimator);
    toAppAnimator.mAllAppWinAnimators.add(transferWinAnimator);
    transferWinAnimator.mAppAnimator=toAppAnimator;
  }
}
Program: 192458
Project: 192458
Buggy source:
void updateTokenInPlaceLocked(AppWindowToken wtoken,int transit){
  if (transit != AppTransition.TRANSIT_UNSET) {
    if (wtoken.mAppAnimator.animation == AppWindowAnimator.sDummyAnimation) {
      wtoken.mAppAnimator.animation=null;
    }
    applyAnimationLocked(wtoken,null,transit,false,false);
  }
}

Fixed version (ground truth):
void updateTokenInPlaceLocked(AppWindowToken wtoken,int transit){
  if (transit != AppTransition.TRANSIT_UNSET) {
    if (wtoken.mAppAnimator.animation == AppWindowAnimator.sDummyAnimation) {
      wtoken.mAppAnimator.setNullAnimation();
    }
    applyAnimationLocked(wtoken,null,transit,false,false);
  }
}
Program: 192460
Project: 192460
Buggy source:
private boolean tryStartExitingAnimation(WindowState win,WindowStateAnimator winAnimator,boolean isDefaultDisplay,boolean focusMayChange){
  int transit=WindowManagerPolicy.TRANSIT_EXIT;
  if (win.mAttrs.type == TYPE_APPLICATION_STARTING) {
    transit=WindowManagerPolicy.TRANSIT_PREVIEW_DONE;
  }
  if (win.isWinVisibleLw() && winAnimator.applyAnimationLocked(transit,false)) {
    focusMayChange=isDefaultDisplay;
    win.mAnimatingExit=true;
  }
 else   if (win.mWinAnimator.isAnimating()) {
    win.mAnimatingExit=true;
  }
 else   if (mWallpaperControllerLocked.isWallpaperTarget(win)) {
    win.mAnimatingExit=true;
    win.mWinAnimator.mAnimating=true;
  }
 else {
    if (mInputMethodWindow == win) {
      mInputMethodWindow=null;
    }
    win.destroyOrSaveSurface();
  }
  if (mAccessibilityController != null && win.getDisplayId() == Display.DEFAULT_DISPLAY) {
    mAccessibilityController.onWindowTransitionLocked(win,transit);
  }
  return focusMayChange;
}

Fixed version (ground truth):
private boolean tryStartExitingAnimation(WindowState win,WindowStateAnimator winAnimator,boolean isDefaultDisplay,boolean focusMayChange){
  int transit=WindowManagerPolicy.TRANSIT_EXIT;
  if (win.mAttrs.type == TYPE_APPLICATION_STARTING) {
    transit=WindowManagerPolicy.TRANSIT_PREVIEW_DONE;
  }
  if (win.isWinVisibleLw() && winAnimator.applyAnimationLocked(transit,false)) {
    focusMayChange=isDefaultDisplay;
    win.mAnimatingExit=true;
    win.mWinAnimator.mAnimating=true;
  }
 else   if (win.mWinAnimator.isAnimating()) {
    win.mAnimatingExit=true;
    win.mWinAnimator.mAnimating=true;
  }
 else   if (mWallpaperControllerLocked.isWallpaperTarget(win)) {
    win.mAnimatingExit=true;
    win.mWinAnimator.mAnimating=true;
  }
 else {
    if (mInputMethodWindow == win) {
      mInputMethodWindow=null;
    }
    win.destroyOrSaveSurface();
  }
  if (mAccessibilityController != null && win.getDisplayId() == Display.DEFAULT_DISPLAY) {
    mAccessibilityController.onWindowTransitionLocked(win,transit);
  }
  return focusMayChange;
}
Program: 192462
Project: 192462
Buggy source:
private void handleClosingApps(int transit,LayoutParams animLp,boolean voiceInteraction,LayerAndToken layerAndToken){
  final int appsCount;
  appsCount=mService.mClosingApps.size();
  for (int i=0; i < appsCount; i++) {
    AppWindowToken wtoken=mService.mClosingApps.valueAt(i);
    final AppWindowAnimator appAnimator=wtoken.mAppAnimator;
    if (DEBUG_APP_TRANSITIONS)     Slog.v(TAG,"String_Node_Str" + wtoken);
    appAnimator.clearThumbnail();
    appAnimator.animation=null;
    wtoken.inPendingTransaction=false;
    mService.setTokenVisibilityLocked(wtoken,animLp,false,transit,false,voiceInteraction);
    wtoken.updateReportedVisibilityLocked();
    wtoken.allDrawn=true;
    wtoken.deferClearAllDrawn=false;
    if (wtoken.startingWindow != null && !wtoken.startingWindow.mAnimatingExit) {
      mService.scheduleRemoveStartingWindowLocked(wtoken);
    }
    mService.mAnimator.mAppWindowAnimating|=appAnimator.isAnimating();
    if (animLp != null) {
      int layer=-1;
      for (int j=0; j < wtoken.windows.size(); j++) {
        WindowState win=wtoken.windows.get(j);
        if (win.mWinAnimator.mAnimLayer > layer) {
          layer=win.mWinAnimator.mAnimLayer;
        }
      }
      if (layerAndToken.token == null || layer > layerAndToken.layer) {
        layerAndToken.token=wtoken;
        layerAndToken.layer=layer;
      }
    }
    if (mService.mAppTransition.isNextAppTransitionThumbnailDown()) {
      createThumbnailAppAnimator(transit,wtoken,0,layerAndToken.layer);
    }
  }
}

Fixed version (ground truth):
private void handleClosingApps(int transit,LayoutParams animLp,boolean voiceInteraction,LayerAndToken layerAndToken){
  final int appsCount;
  appsCount=mService.mClosingApps.size();
  for (int i=0; i < appsCount; i++) {
    AppWindowToken wtoken=mService.mClosingApps.valueAt(i);
    final AppWindowAnimator appAnimator=wtoken.mAppAnimator;
    if (DEBUG_APP_TRANSITIONS)     Slog.v(TAG,"String_Node_Str" + wtoken);
    appAnimator.clearThumbnail();
    appAnimator.setNullAnimation();
    wtoken.inPendingTransaction=false;
    mService.setTokenVisibilityLocked(wtoken,animLp,false,transit,false,voiceInteraction);
    wtoken.updateReportedVisibilityLocked();
    wtoken.allDrawn=true;
    wtoken.deferClearAllDrawn=false;
    if (wtoken.startingWindow != null && !wtoken.startingWindow.mAnimatingExit) {
      mService.scheduleRemoveStartingWindowLocked(wtoken);
    }
    mService.mAnimator.mAppWindowAnimating|=appAnimator.isAnimating();
    if (animLp != null) {
      int layer=-1;
      for (int j=0; j < wtoken.windows.size(); j++) {
        WindowState win=wtoken.windows.get(j);
        if (win.mWinAnimator.mAnimLayer > layer) {
          layer=win.mWinAnimator.mAnimLayer;
        }
      }
      if (layerAndToken.token == null || layer > layerAndToken.layer) {
        layerAndToken.token=wtoken;
        layerAndToken.layer=layer;
      }
    }
    if (mService.mAppTransition.isNextAppTransitionThumbnailDown()) {
      createThumbnailAppAnimator(transit,wtoken,0,layerAndToken.layer);
    }
  }
}
Program: 192463
Project: 192463
Buggy source:
private void processApplicationsAnimatingInPlace(int transit){
  if (transit == AppTransition.TRANSIT_TASK_IN_PLACE) {
    final WindowState win=mService.findFocusedWindowLocked(mService.getDefaultDisplayContentLocked());
    if (win != null) {
      final AppWindowToken wtoken=win.mAppToken;
      final AppWindowAnimator appAnimator=wtoken.mAppAnimator;
      if (DEBUG_APP_TRANSITIONS)       Slog.v(TAG,"String_Node_Str" + wtoken);
      appAnimator.clearThumbnail();
      appAnimator.animation=null;
      mService.updateTokenInPlaceLocked(wtoken,transit);
      wtoken.updateReportedVisibilityLocked();
      appAnimator.mAllAppWinAnimators.clear();
      final int N=wtoken.allAppWindows.size();
      for (int j=0; j < N; j++) {
        appAnimator.mAllAppWinAnimators.add(wtoken.allAppWindows.get(j).mWinAnimator);
      }
      mService.mAnimator.mAppWindowAnimating|=appAnimator.isAnimating();
      mService.mAnimator.orAnimating(appAnimator.showAllWindowsLocked());
    }
  }
}

Fixed version (ground truth):
private void processApplicationsAnimatingInPlace(int transit){
  if (transit == AppTransition.TRANSIT_TASK_IN_PLACE) {
    final WindowState win=mService.findFocusedWindowLocked(mService.getDefaultDisplayContentLocked());
    if (win != null) {
      final AppWindowToken wtoken=win.mAppToken;
      final AppWindowAnimator appAnimator=wtoken.mAppAnimator;
      if (DEBUG_APP_TRANSITIONS)       Slog.v(TAG,"String_Node_Str" + wtoken);
      appAnimator.clearThumbnail();
      appAnimator.setNullAnimation();
      mService.updateTokenInPlaceLocked(wtoken,transit);
      wtoken.updateReportedVisibilityLocked();
      appAnimator.mAllAppWinAnimators.clear();
      final int N=wtoken.allAppWindows.size();
      for (int j=0; j < N; j++) {
        appAnimator.mAllAppWinAnimators.add(wtoken.allAppWindows.get(j).mWinAnimator);
      }
      mService.mAnimator.mAppWindowAnimating|=appAnimator.isAnimating();
      mService.mAnimator.orAnimating(appAnimator.showAllWindowsLocked());
    }
  }
}
Program: 192464
Project: 192464
Buggy source:
public void clearAnimation(){
  if (animation != null) {
    animation=null;
    animating=true;
  }
  clearThumbnail();
  if (mAppToken.deferClearAllDrawn) {
    mAppToken.allDrawn=false;
    mAppToken.deferClearAllDrawn=false;
  }
  usingTransferredAnimation=false;
}

Fixed version (ground truth):
public void clearAnimation(){
  if (animation != null) {
    animating=true;
  }
  clearThumbnail();
  setNullAnimation();
  if (mAppToken.deferClearAllDrawn) {
    mAppToken.allDrawn=false;
    mAppToken.deferClearAllDrawn=false;
  }
}
Program: 192465
Project: 192465
Buggy source:
private boolean stepAnimation(long currentTime){
  if (animation == null) {
    return false;
  }
  transformation.clear();
  final long animationFrameTime=getAnimationFrameTime(animation,currentTime);
  boolean hasMoreFrames=animation.getTransformation(animationFrameTime,transformation);
  if (!hasMoreFrames) {
    if (deferThumbnailDestruction && !deferFinalFrameCleanup) {
      deferFinalFrameCleanup=true;
      hasMoreFrames=true;
    }
 else {
      if (false && DEBUG_ANIM)       Slog.v(TAG,"String_Node_Str" + mAppToken + "String_Node_Str"+ hasMoreFrames+ "String_Node_Str"+ transformation+ "String_Node_Str"+ mProlongAnimation);
      deferFinalFrameCleanup=false;
      if (mProlongAnimation == PROLONG_ANIMATION_AT_END) {
        hasMoreFrames=true;
      }
 else {
        animation=null;
        clearThumbnail();
        if (DEBUG_ANIM)         Slog.v(TAG,"String_Node_Str" + mAppToken + "String_Node_Str"+ currentTime);
      }
    }
  }
  hasTransformation=hasMoreFrames;
  return hasMoreFrames;
}

Fixed version (ground truth):
private boolean stepAnimation(long currentTime){
  if (animation == null) {
    return false;
  }
  transformation.clear();
  final long animationFrameTime=getAnimationFrameTime(animation,currentTime);
  boolean hasMoreFrames=animation.getTransformation(animationFrameTime,transformation);
  if (!hasMoreFrames) {
    if (deferThumbnailDestruction && !deferFinalFrameCleanup) {
      deferFinalFrameCleanup=true;
      hasMoreFrames=true;
    }
 else {
      if (false && DEBUG_ANIM)       Slog.v(TAG,"String_Node_Str" + mAppToken + "String_Node_Str"+ hasMoreFrames+ "String_Node_Str"+ transformation+ "String_Node_Str"+ mProlongAnimation);
      deferFinalFrameCleanup=false;
      if (mProlongAnimation == PROLONG_ANIMATION_AT_END) {
        hasMoreFrames=true;
      }
 else {
        setNullAnimation();
        clearThumbnail();
        if (DEBUG_ANIM)         Slog.v(TAG,"String_Node_Str" + mAppToken + "String_Node_Str"+ currentTime);
      }
    }
  }
  hasTransformation=hasMoreFrames;
  return hasMoreFrames;
}
Program: 192466
Project: 192466
Buggy source:
void transferCurrentAnimation(AppWindowAnimator toAppAnimator,WindowStateAnimator transferWinAnimator){
  if (animation != null) {
    toAppAnimator.animation=animation;
    animation=null;
    toAppAnimator.animating=animating;
    toAppAnimator.animLayerAdjustment=animLayerAdjustment;
    animLayerAdjustment=0;
    toAppAnimator.updateLayers();
    updateLayers();
    toAppAnimator.usingTransferredAnimation=true;
  }
  if (transferWinAnimator != null) {
    mAllAppWinAnimators.remove(transferWinAnimator);
    toAppAnimator.mAllAppWinAnimators.add(transferWinAnimator);
    transferWinAnimator.mAppAnimator=toAppAnimator;
  }
}

Fixed version (ground truth):
void transferCurrentAnimation(AppWindowAnimator toAppAnimator,WindowStateAnimator transferWinAnimator){
  if (animation != null) {
    toAppAnimator.animation=animation;
    toAppAnimator.animating=animating;
    toAppAnimator.animLayerAdjustment=animLayerAdjustment;
    setNullAnimation();
    animLayerAdjustment=0;
    toAppAnimator.updateLayers();
    updateLayers();
    toAppAnimator.usingTransferredAnimation=true;
  }
  if (transferWinAnimator != null) {
    mAllAppWinAnimators.remove(transferWinAnimator);
    toAppAnimator.mAllAppWinAnimators.add(transferWinAnimator);
    transferWinAnimator.mAppAnimator=toAppAnimator;
  }
}
Program: 192468
Project: 192468
Buggy source:
void updateTokenInPlaceLocked(AppWindowToken wtoken,int transit){
  if (transit != AppTransition.TRANSIT_UNSET) {
    if (wtoken.mAppAnimator.animation == AppWindowAnimator.sDummyAnimation) {
      wtoken.mAppAnimator.animation=null;
    }
    applyAnimationLocked(wtoken,null,transit,false,false);
  }
}

Fixed version (ground truth):
void updateTokenInPlaceLocked(AppWindowToken wtoken,int transit){
  if (transit != AppTransition.TRANSIT_UNSET) {
    if (wtoken.mAppAnimator.animation == AppWindowAnimator.sDummyAnimation) {
      wtoken.mAppAnimator.setNullAnimation();
    }
    applyAnimationLocked(wtoken,null,transit,false,false);
  }
}
Program: 192470
Project: 192470
Buggy source:
private boolean tryStartExitingAnimation(WindowState win,WindowStateAnimator winAnimator,boolean isDefaultDisplay,boolean focusMayChange){
  int transit=WindowManagerPolicy.TRANSIT_EXIT;
  if (win.mAttrs.type == TYPE_APPLICATION_STARTING) {
    transit=WindowManagerPolicy.TRANSIT_PREVIEW_DONE;
  }
  if (win.isWinVisibleLw() && winAnimator.applyAnimationLocked(transit,false)) {
    focusMayChange=isDefaultDisplay;
    win.mAnimatingExit=true;
  }
 else   if (win.mWinAnimator.isAnimating()) {
    win.mAnimatingExit=true;
  }
 else   if (mWallpaperControllerLocked.isWallpaperTarget(win)) {
    win.mAnimatingExit=true;
    win.mWinAnimator.mAnimating=true;
  }
 else {
    if (mInputMethodWindow == win) {
      mInputMethodWindow=null;
    }
    win.destroyOrSaveSurface();
  }
  if (mAccessibilityController != null && win.getDisplayId() == Display.DEFAULT_DISPLAY) {
    mAccessibilityController.onWindowTransitionLocked(win,transit);
  }
  return focusMayChange;
}

Fixed version (ground truth):
private boolean tryStartExitingAnimation(WindowState win,WindowStateAnimator winAnimator,boolean isDefaultDisplay,boolean focusMayChange){
  int transit=WindowManagerPolicy.TRANSIT_EXIT;
  if (win.mAttrs.type == TYPE_APPLICATION_STARTING) {
    transit=WindowManagerPolicy.TRANSIT_PREVIEW_DONE;
  }
  if (win.isWinVisibleLw() && winAnimator.applyAnimationLocked(transit,false)) {
    focusMayChange=isDefaultDisplay;
    win.mAnimatingExit=true;
    win.mWinAnimator.mAnimating=true;
  }
 else   if (win.mWinAnimator.isAnimating()) {
    win.mAnimatingExit=true;
    win.mWinAnimator.mAnimating=true;
  }
 else   if (mWallpaperControllerLocked.isWallpaperTarget(win)) {
    win.mAnimatingExit=true;
    win.mWinAnimator.mAnimating=true;
  }
 else {
    if (mInputMethodWindow == win) {
      mInputMethodWindow=null;
    }
    win.destroyOrSaveSurface();
  }
  if (mAccessibilityController != null && win.getDisplayId() == Display.DEFAULT_DISPLAY) {
    mAccessibilityController.onWindowTransitionLocked(win,transit);
  }
  return focusMayChange;
}
Program: 192472
Project: 192472
Buggy source:
private void handleClosingApps(int transit,LayoutParams animLp,boolean voiceInteraction,LayerAndToken layerAndToken){
  final int appsCount;
  appsCount=mService.mClosingApps.size();
  for (int i=0; i < appsCount; i++) {
    AppWindowToken wtoken=mService.mClosingApps.valueAt(i);
    final AppWindowAnimator appAnimator=wtoken.mAppAnimator;
    if (DEBUG_APP_TRANSITIONS)     Slog.v(TAG,"String_Node_Str" + wtoken);
    appAnimator.clearThumbnail();
    appAnimator.animation=null;
    wtoken.inPendingTransaction=false;
    mService.setTokenVisibilityLocked(wtoken,animLp,false,transit,false,voiceInteraction);
    wtoken.updateReportedVisibilityLocked();
    wtoken.allDrawn=true;
    wtoken.deferClearAllDrawn=false;
    if (wtoken.startingWindow != null && !wtoken.startingWindow.mAnimatingExit) {
      mService.scheduleRemoveStartingWindowLocked(wtoken);
    }
    mService.mAnimator.mAppWindowAnimating|=appAnimator.isAnimating();
    if (animLp != null) {
      int layer=-1;
      for (int j=0; j < wtoken.windows.size(); j++) {
        WindowState win=wtoken.windows.get(j);
        if (win.mWinAnimator.mAnimLayer > layer) {
          layer=win.mWinAnimator.mAnimLayer;
        }
      }
      if (layerAndToken.token == null || layer > layerAndToken.layer) {
        layerAndToken.token=wtoken;
        layerAndToken.layer=layer;
      }
    }
    if (mService.mAppTransition.isNextAppTransitionThumbnailDown()) {
      createThumbnailAppAnimator(transit,wtoken,0,layerAndToken.layer);
    }
  }
}

Fixed version (ground truth):
private void handleClosingApps(int transit,LayoutParams animLp,boolean voiceInteraction,LayerAndToken layerAndToken){
  final int appsCount;
  appsCount=mService.mClosingApps.size();
  for (int i=0; i < appsCount; i++) {
    AppWindowToken wtoken=mService.mClosingApps.valueAt(i);
    final AppWindowAnimator appAnimator=wtoken.mAppAnimator;
    if (DEBUG_APP_TRANSITIONS)     Slog.v(TAG,"String_Node_Str" + wtoken);
    appAnimator.clearThumbnail();
    appAnimator.setNullAnimation();
    wtoken.inPendingTransaction=false;
    mService.setTokenVisibilityLocked(wtoken,animLp,false,transit,false,voiceInteraction);
    wtoken.updateReportedVisibilityLocked();
    wtoken.allDrawn=true;
    wtoken.deferClearAllDrawn=false;
    if (wtoken.startingWindow != null && !wtoken.startingWindow.mAnimatingExit) {
      mService.scheduleRemoveStartingWindowLocked(wtoken);
    }
    mService.mAnimator.mAppWindowAnimating|=appAnimator.isAnimating();
    if (animLp != null) {
      int layer=-1;
      for (int j=0; j < wtoken.windows.size(); j++) {
        WindowState win=wtoken.windows.get(j);
        if (win.mWinAnimator.mAnimLayer > layer) {
          layer=win.mWinAnimator.mAnimLayer;
        }
      }
      if (layerAndToken.token == null || layer > layerAndToken.layer) {
        layerAndToken.token=wtoken;
        layerAndToken.layer=layer;
      }
    }
    if (mService.mAppTransition.isNextAppTransitionThumbnailDown()) {
      createThumbnailAppAnimator(transit,wtoken,0,layerAndToken.layer);
    }
  }
}
Program: 192473
Project: 192473
Buggy source:
private void processApplicationsAnimatingInPlace(int transit){
  if (transit == AppTransition.TRANSIT_TASK_IN_PLACE) {
    final WindowState win=mService.findFocusedWindowLocked(mService.getDefaultDisplayContentLocked());
    if (win != null) {
      final AppWindowToken wtoken=win.mAppToken;
      final AppWindowAnimator appAnimator=wtoken.mAppAnimator;
      if (DEBUG_APP_TRANSITIONS)       Slog.v(TAG,"String_Node_Str" + wtoken);
      appAnimator.clearThumbnail();
      appAnimator.animation=null;
      mService.updateTokenInPlaceLocked(wtoken,transit);
      wtoken.updateReportedVisibilityLocked();
      appAnimator.mAllAppWinAnimators.clear();
      final int N=wtoken.allAppWindows.size();
      for (int j=0; j < N; j++) {
        appAnimator.mAllAppWinAnimators.add(wtoken.allAppWindows.get(j).mWinAnimator);
      }
      mService.mAnimator.mAppWindowAnimating|=appAnimator.isAnimating();
      mService.mAnimator.orAnimating(appAnimator.showAllWindowsLocked());
    }
  }
}

Fixed version (ground truth):
private void processApplicationsAnimatingInPlace(int transit){
  if (transit == AppTransition.TRANSIT_TASK_IN_PLACE) {
    final WindowState win=mService.findFocusedWindowLocked(mService.getDefaultDisplayContentLocked());
    if (win != null) {
      final AppWindowToken wtoken=win.mAppToken;
      final AppWindowAnimator appAnimator=wtoken.mAppAnimator;
      if (DEBUG_APP_TRANSITIONS)       Slog.v(TAG,"String_Node_Str" + wtoken);
      appAnimator.clearThumbnail();
      appAnimator.setNullAnimation();
      mService.updateTokenInPlaceLocked(wtoken,transit);
      wtoken.updateReportedVisibilityLocked();
      appAnimator.mAllAppWinAnimators.clear();
      final int N=wtoken.allAppWindows.size();
      for (int j=0; j < N; j++) {
        appAnimator.mAllAppWinAnimators.add(wtoken.allAppWindows.get(j).mWinAnimator);
      }
      mService.mAnimator.mAppWindowAnimating|=appAnimator.isAnimating();
      mService.mAnimator.orAnimating(appAnimator.showAllWindowsLocked());
    }
  }
}
Program: 192474
Project: 192474
Buggy source:
/** 
 * @return a LongSamplingCounter, measuring time spent in the idle state inmilliseconds.
 */
@Override public LongSamplingCounter getIdleTimeCounter(){
  return mRxTimeMillis;
}

Fixed version (ground truth):
/** 
 * @return a LongSamplingCounter, measuring time spent in the idle state inmilliseconds.
 */
@Override public LongSamplingCounter getIdleTimeCounter(){
  return mIdleTimeMillis;
}
Program: 192475
Project: 192475
Buggy source:
@Override public boolean onDoubleTap(MotionEvent event){
  mDoubleTapDetected=true;
  return mListener.onDoubleTapStarted();
}

Fixed version (ground truth):
@Override public boolean onDoubleTap(MotionEvent event){
  mDoubleTapDetected=true;
  return false;
}