nus-yam/ex-repair huggingface dataset:
Program: 196408
Project: 196408
Buggy source:
@Override public boolean addGpsStatusListener(IGpsStatusListener listener,String packageName){
  if (mGpsStatusProvider == null) {
    return false;
  }
  int allowedResolutionLevel=getCallerAllowedResolutionLevel();
  checkResolutionLevelIsSufficientForProviderUse(allowedResolutionLevel,LocationManager.GPS_PROVIDER);
  final int uid=Binder.getCallingUid();
  final long ident=Binder.clearCallingIdentity();
  try {
    if (!checkLocationAccess(uid,packageName,allowedResolutionLevel)) {
      return false;
    }
  }
  finally {
    Binder.restoreCallingIdentity(ident);
  }
  try {
    mGpsStatusProvider.addGpsStatusListener(listener);
  }
 catch (  RemoteException e) {
    Slog.e(TAG,"String_Node_Str",e);
    return false;
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean addGpsStatusListener(IGpsStatusListener listener,String packageName){
  int allowedResolutionLevel=getCallerAllowedResolutionLevel();
  checkResolutionLevelIsSufficientForProviderUse(allowedResolutionLevel,LocationManager.GPS_PROVIDER);
  final int uid=Binder.getCallingUid();
  final long ident=Binder.clearCallingIdentity();
  try {
    if (!checkLocationAccess(uid,packageName,allowedResolutionLevel)) {
      return false;
    }
  }
  finally {
    Binder.restoreCallingIdentity(ident);
  }
  if (mGpsStatusProvider == null) {
    return false;
  }
  try {
    mGpsStatusProvider.addGpsStatusListener(listener);
  }
 catch (  RemoteException e) {
    Slog.e(TAG,"String_Node_Str",e);
    return false;
  }
  return true;
}
Program: 196409
Project: 196409
Buggy source:
/** 
 * Toggles the recents activity 
 */
void toggleRecentsActivity(){
  if (System.currentTimeMillis() - mLastToggleTime < sMinToggleDelay) {
    return;
  }
  ActivityManager.RunningTaskInfo topTask=getTopMostTask();
  AtomicBoolean isTopTaskHome=new AtomicBoolean();
  if (isRecentsTopMost(topTask,isTopTaskHome)) {
    Intent intent=new Intent(ACTION_TOGGLE_RECENTS_ACTIVITY);
    intent.setPackage(mContext.getPackageName());
    intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT | Intent.FLAG_RECEIVER_FOREGROUND);
    mContext.sendBroadcastAsUser(intent,UserHandle.CURRENT);
    mLastToggleTime=System.currentTimeMillis();
    return;
  }
 else {
    startRecentsActivity(topTask,isTopTaskHome.get());
  }
}

Fixed version (ground truth):
/** 
 * Toggles the recents activity 
 */
void toggleRecentsActivity(){
  long currentTime=System.currentTimeMillis();
  if ((currentTime > mLastToggleTime) && (currentTime - mLastToggleTime) < sMinToggleDelay) {
    return;
  }
  ActivityManager.RunningTaskInfo topTask=getTopMostTask();
  AtomicBoolean isTopTaskHome=new AtomicBoolean();
  if (isRecentsTopMost(topTask,isTopTaskHome)) {
    Intent intent=new Intent(ACTION_TOGGLE_RECENTS_ACTIVITY);
    intent.setPackage(mContext.getPackageName());
    intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT | Intent.FLAG_RECEIVER_FOREGROUND);
    mContext.sendBroadcastAsUser(intent,UserHandle.CURRENT);
    mLastToggleTime=System.currentTimeMillis();
    return;
  }
 else {
    startRecentsActivity(topTask,isTopTaskHome.get());
  }
}
Program: 196410
Project: 196410
Buggy source:
/** 
 * Phase 1: Move everything upwards.
 */
private void startUnlockHintAnimationPhase1(final Runnable onAnimationFinished){
  float target=Math.max(0,getMaxPanelHeight() - mHintDistance);
  ValueAnimator animator=createHeightAnimator(target);
  animator.setDuration(250);
  animator.setInterpolator(mFastOutSlowInInterpolator);
  animator.addListener(new AnimatorListenerAdapter(){
    private boolean mCancelled;
    @Override public void onAnimationCancel(    Animator animation){
      mCancelled=true;
    }
    @Override public void onAnimationEnd(    Animator animation){
      if (mCancelled) {
        mHeightAnimator=null;
        onAnimationFinished.run();
      }
 else {
        startUnlockHintAnimationPhase2(onAnimationFinished);
      }
    }
  }
);
  animator.start();
  mHeightAnimator=animator;
  mOriginalIndicationY=mKeyguardBottomArea.getIndicationView().getY();
  mKeyguardBottomArea.getIndicationView().animate().y(mOriginalIndicationY - mHintDistance).setDuration(250).setInterpolator(mFastOutSlowInInterpolator).withEndAction(new Runnable(){
    @Override public void run(){
      mKeyguardBottomArea.getIndicationView().animate().y(mOriginalIndicationY).setDuration(450).setInterpolator(mBounceInterpolator).start();
    }
  }
).start();
}

Fixed version (ground truth):
/** 
 * Phase 1: Move everything upwards.
 */
private void startUnlockHintAnimationPhase1(final Runnable onAnimationFinished){
  float target=Math.max(0,getMaxPanelHeight() - mHintDistance);
  ValueAnimator animator=createHeightAnimator(target);
  animator.setDuration(250);
  animator.setInterpolator(mFastOutSlowInInterpolator);
  animator.addListener(new AnimatorListenerAdapter(){
    private boolean mCancelled;
    @Override public void onAnimationCancel(    Animator animation){
      mCancelled=true;
    }
    @Override public void onAnimationEnd(    Animator animation){
      if (mCancelled) {
        mHeightAnimator=null;
        onAnimationFinished.run();
      }
 else {
        startUnlockHintAnimationPhase2(onAnimationFinished);
      }
    }
  }
);
  animator.start();
  mHeightAnimator=animator;
  mKeyguardBottomArea.getIndicationView().animate().translationY(-mHintDistance).setDuration(250).setInterpolator(mFastOutSlowInInterpolator).withEndAction(new Runnable(){
    @Override public void run(){
      mKeyguardBottomArea.getIndicationView().animate().translationY(0).setDuration(450).setInterpolator(mBounceInterpolator).start();
    }
  }
).start();
}
Program: 196411
Project: 196411
Buggy source:
void wakeup(TaskRecord task,boolean flush){
synchronized (this) {
    if (task != null) {
      int queueNdx;
      for (queueNdx=mWriteQueue.size() - 1; queueNdx >= 0; --queueNdx) {
        final WriteQueueItem item=mWriteQueue.get(queueNdx);
        if (item instanceof TaskWriteQueueItem && ((TaskWriteQueueItem)item).mTask == task) {
          if (!task.inRecents) {
            removeThumbnails(task);
          }
          break;
        }
      }
      if (queueNdx < 0) {
        mWriteQueue.add(new TaskWriteQueueItem(task));
      }
    }
 else {
      mWriteQueue.add(new WriteQueueItem());
    }
    if (flush || mWriteQueue.size() > MAX_WRITE_QUEUE_LENGTH) {
      mNextWriteTime=FLUSH_QUEUE;
    }
 else     if (mNextWriteTime == 0) {
      mNextWriteTime=SystemClock.uptimeMillis() + PRE_TASK_DELAY_MS;
    }
    if (DEBUG)     Slog.d(TAG,"String_Node_Str" + task + "String_Node_Str"+ flush+ "String_Node_Str"+ mNextWriteTime+ "String_Node_Str"+ mWriteQueue.size()+ "String_Node_Str"+ Debug.getCallers(4));
    notifyAll();
  }
  yieldIfQueueTooDeep();
}

Fixed version (ground truth):
void wakeup(TaskRecord task,boolean flush){
synchronized (this) {
    if (task != null) {
      int queueNdx;
      for (queueNdx=mWriteQueue.size() - 1; queueNdx >= 0; --queueNdx) {
        final WriteQueueItem item=mWriteQueue.get(queueNdx);
        if (item instanceof TaskWriteQueueItem && ((TaskWriteQueueItem)item).mTask == task) {
          if (!task.inRecents) {
            removeThumbnails(task);
          }
          break;
        }
      }
      if (queueNdx < 0 && task.isPersistable) {
        mWriteQueue.add(new TaskWriteQueueItem(task));
      }
    }
 else {
      mWriteQueue.add(new WriteQueueItem());
    }
    if (flush || mWriteQueue.size() > MAX_WRITE_QUEUE_LENGTH) {
      mNextWriteTime=FLUSH_QUEUE;
    }
 else     if (mNextWriteTime == 0) {
      mNextWriteTime=SystemClock.uptimeMillis() + PRE_TASK_DELAY_MS;
    }
    if (DEBUG)     Slog.d(TAG,"String_Node_Str" + task + "String_Node_Str"+ flush+ "String_Node_Str"+ mNextWriteTime+ "String_Node_Str"+ mWriteQueue.size()+ "String_Node_Str"+ Debug.getCallers(4));
    notifyAll();
  }
  yieldIfQueueTooDeep();
}
Program: 196413
Project: 196413
Buggy source:
void wakeup(TaskRecord task,boolean flush){
synchronized (this) {
    if (task != null) {
      int queueNdx;
      for (queueNdx=mWriteQueue.size() - 1; queueNdx >= 0; --queueNdx) {
        final WriteQueueItem item=mWriteQueue.get(queueNdx);
        if (item instanceof TaskWriteQueueItem && ((TaskWriteQueueItem)item).mTask == task) {
          if (!task.inRecents) {
            removeThumbnails(task);
          }
          break;
        }
      }
      if (queueNdx < 0) {
        mWriteQueue.add(new TaskWriteQueueItem(task));
      }
    }
 else {
      mWriteQueue.add(new WriteQueueItem());
    }
    if (flush || mWriteQueue.size() > MAX_WRITE_QUEUE_LENGTH) {
      mNextWriteTime=FLUSH_QUEUE;
    }
 else     if (mNextWriteTime == 0) {
      mNextWriteTime=SystemClock.uptimeMillis() + PRE_TASK_DELAY_MS;
    }
    if (DEBUG)     Slog.d(TAG,"String_Node_Str" + task + "String_Node_Str"+ flush+ "String_Node_Str"+ mNextWriteTime+ "String_Node_Str"+ mWriteQueue.size()+ "String_Node_Str"+ Debug.getCallers(4));
    notifyAll();
  }
  yieldIfQueueTooDeep();
}

Fixed version (ground truth):
void wakeup(TaskRecord task,boolean flush){
synchronized (this) {
    if (task != null) {
      int queueNdx;
      for (queueNdx=mWriteQueue.size() - 1; queueNdx >= 0; --queueNdx) {
        final WriteQueueItem item=mWriteQueue.get(queueNdx);
        if (item instanceof TaskWriteQueueItem && ((TaskWriteQueueItem)item).mTask == task) {
          if (!task.inRecents) {
            removeThumbnails(task);
          }
          break;
        }
      }
      if (queueNdx < 0 && task.isPersistable) {
        mWriteQueue.add(new TaskWriteQueueItem(task));
      }
    }
 else {
      mWriteQueue.add(new WriteQueueItem());
    }
    if (flush || mWriteQueue.size() > MAX_WRITE_QUEUE_LENGTH) {
      mNextWriteTime=FLUSH_QUEUE;
    }
 else     if (mNextWriteTime == 0) {
      mNextWriteTime=SystemClock.uptimeMillis() + PRE_TASK_DELAY_MS;
    }
    if (DEBUG)     Slog.d(TAG,"String_Node_Str" + task + "String_Node_Str"+ flush+ "String_Node_Str"+ mNextWriteTime+ "String_Node_Str"+ mWriteQueue.size()+ "String_Node_Str"+ Debug.getCallers(4));
    notifyAll();
  }
  yieldIfQueueTooDeep();
}
Program: 196415
Project: 196415
Buggy source:
void wakeup(TaskRecord task,boolean flush){
synchronized (this) {
    if (task != null) {
      int queueNdx;
      for (queueNdx=mWriteQueue.size() - 1; queueNdx >= 0; --queueNdx) {
        final WriteQueueItem item=mWriteQueue.get(queueNdx);
        if (item instanceof TaskWriteQueueItem && ((TaskWriteQueueItem)item).mTask == task) {
          if (!task.inRecents) {
            removeThumbnails(task);
          }
          break;
        }
      }
      if (queueNdx < 0) {
        mWriteQueue.add(new TaskWriteQueueItem(task));
      }
    }
 else {
      mWriteQueue.add(new WriteQueueItem());
    }
    if (flush || mWriteQueue.size() > MAX_WRITE_QUEUE_LENGTH) {
      mNextWriteTime=FLUSH_QUEUE;
    }
 else     if (mNextWriteTime == 0) {
      mNextWriteTime=SystemClock.uptimeMillis() + PRE_TASK_DELAY_MS;
    }
    if (DEBUG)     Slog.d(TAG,"String_Node_Str" + task + "String_Node_Str"+ flush+ "String_Node_Str"+ mNextWriteTime+ "String_Node_Str"+ mWriteQueue.size()+ "String_Node_Str"+ Debug.getCallers(4));
    notifyAll();
  }
  yieldIfQueueTooDeep();
}

Fixed version (ground truth):
void wakeup(TaskRecord task,boolean flush){
synchronized (this) {
    if (task != null) {
      int queueNdx;
      for (queueNdx=mWriteQueue.size() - 1; queueNdx >= 0; --queueNdx) {
        final WriteQueueItem item=mWriteQueue.get(queueNdx);
        if (item instanceof TaskWriteQueueItem && ((TaskWriteQueueItem)item).mTask == task) {
          if (!task.inRecents) {
            removeThumbnails(task);
          }
          break;
        }
      }
      if (queueNdx < 0 && task.isPersistable) {
        mWriteQueue.add(new TaskWriteQueueItem(task));
      }
    }
 else {
      mWriteQueue.add(new WriteQueueItem());
    }
    if (flush || mWriteQueue.size() > MAX_WRITE_QUEUE_LENGTH) {
      mNextWriteTime=FLUSH_QUEUE;
    }
 else     if (mNextWriteTime == 0) {
      mNextWriteTime=SystemClock.uptimeMillis() + PRE_TASK_DELAY_MS;
    }
    if (DEBUG)     Slog.d(TAG,"String_Node_Str" + task + "String_Node_Str"+ flush+ "String_Node_Str"+ mNextWriteTime+ "String_Node_Str"+ mWriteQueue.size()+ "String_Node_Str"+ Debug.getCallers(4));
    notifyAll();
  }
  yieldIfQueueTooDeep();
}
Program: 196417
Project: 196417
Buggy source:
void wakeup(TaskRecord task,boolean flush){
synchronized (this) {
    if (task != null) {
      int queueNdx;
      for (queueNdx=mWriteQueue.size() - 1; queueNdx >= 0; --queueNdx) {
        final WriteQueueItem item=mWriteQueue.get(queueNdx);
        if (item instanceof TaskWriteQueueItem && ((TaskWriteQueueItem)item).mTask == task) {
          if (!task.inRecents) {
            removeThumbnails(task);
          }
          break;
        }
      }
      if (queueNdx < 0) {
        mWriteQueue.add(new TaskWriteQueueItem(task));
      }
    }
 else {
      mWriteQueue.add(new WriteQueueItem());
    }
    if (flush || mWriteQueue.size() > MAX_WRITE_QUEUE_LENGTH) {
      mNextWriteTime=FLUSH_QUEUE;
    }
 else     if (mNextWriteTime == 0) {
      mNextWriteTime=SystemClock.uptimeMillis() + PRE_TASK_DELAY_MS;
    }
    if (DEBUG)     Slog.d(TAG,"String_Node_Str" + task + "String_Node_Str"+ flush+ "String_Node_Str"+ mNextWriteTime+ "String_Node_Str"+ mWriteQueue.size()+ "String_Node_Str"+ Debug.getCallers(4));
    notifyAll();
  }
  yieldIfQueueTooDeep();
}

Fixed version (ground truth):
void wakeup(TaskRecord task,boolean flush){
synchronized (this) {
    if (task != null) {
      int queueNdx;
      for (queueNdx=mWriteQueue.size() - 1; queueNdx >= 0; --queueNdx) {
        final WriteQueueItem item=mWriteQueue.get(queueNdx);
        if (item instanceof TaskWriteQueueItem && ((TaskWriteQueueItem)item).mTask == task) {
          if (!task.inRecents) {
            removeThumbnails(task);
          }
          break;
        }
      }
      if (queueNdx < 0 && task.isPersistable) {
        mWriteQueue.add(new TaskWriteQueueItem(task));
      }
    }
 else {
      mWriteQueue.add(new WriteQueueItem());
    }
    if (flush || mWriteQueue.size() > MAX_WRITE_QUEUE_LENGTH) {
      mNextWriteTime=FLUSH_QUEUE;
    }
 else     if (mNextWriteTime == 0) {
      mNextWriteTime=SystemClock.uptimeMillis() + PRE_TASK_DELAY_MS;
    }
    if (DEBUG)     Slog.d(TAG,"String_Node_Str" + task + "String_Node_Str"+ flush+ "String_Node_Str"+ mNextWriteTime+ "String_Node_Str"+ mWriteQueue.size()+ "String_Node_Str"+ Debug.getCallers(4));
    notifyAll();
  }
  yieldIfQueueTooDeep();
}
Program: 196419
Project: 196419
Buggy source:
void wakeup(TaskRecord task,boolean flush){
synchronized (this) {
    if (task != null) {
      int queueNdx;
      for (queueNdx=mWriteQueue.size() - 1; queueNdx >= 0; --queueNdx) {
        final WriteQueueItem item=mWriteQueue.get(queueNdx);
        if (item instanceof TaskWriteQueueItem && ((TaskWriteQueueItem)item).mTask == task) {
          if (!task.inRecents) {
            removeThumbnails(task);
          }
          break;
        }
      }
      if (queueNdx < 0) {
        mWriteQueue.add(new TaskWriteQueueItem(task));
      }
    }
 else {
      mWriteQueue.add(new WriteQueueItem());
    }
    if (flush || mWriteQueue.size() > MAX_WRITE_QUEUE_LENGTH) {
      mNextWriteTime=FLUSH_QUEUE;
    }
 else     if (mNextWriteTime == 0) {
      mNextWriteTime=SystemClock.uptimeMillis() + PRE_TASK_DELAY_MS;
    }
    if (DEBUG)     Slog.d(TAG,"String_Node_Str" + task + "String_Node_Str"+ flush+ "String_Node_Str"+ mNextWriteTime+ "String_Node_Str"+ mWriteQueue.size()+ "String_Node_Str"+ Debug.getCallers(4));
    notifyAll();
  }
  yieldIfQueueTooDeep();
}

Fixed version (ground truth):
void wakeup(TaskRecord task,boolean flush){
synchronized (this) {
    if (task != null) {
      int queueNdx;
      for (queueNdx=mWriteQueue.size() - 1; queueNdx >= 0; --queueNdx) {
        final WriteQueueItem item=mWriteQueue.get(queueNdx);
        if (item instanceof TaskWriteQueueItem && ((TaskWriteQueueItem)item).mTask == task) {
          if (!task.inRecents) {
            removeThumbnails(task);
          }
          break;
        }
      }
      if (queueNdx < 0 && task.isPersistable) {
        mWriteQueue.add(new TaskWriteQueueItem(task));
      }
    }
 else {
      mWriteQueue.add(new WriteQueueItem());
    }
    if (flush || mWriteQueue.size() > MAX_WRITE_QUEUE_LENGTH) {
      mNextWriteTime=FLUSH_QUEUE;
    }
 else     if (mNextWriteTime == 0) {
      mNextWriteTime=SystemClock.uptimeMillis() + PRE_TASK_DELAY_MS;
    }
    if (DEBUG)     Slog.d(TAG,"String_Node_Str" + task + "String_Node_Str"+ flush+ "String_Node_Str"+ mNextWriteTime+ "String_Node_Str"+ mWriteQueue.size()+ "String_Node_Str"+ Debug.getCallers(4));
    notifyAll();
  }
  yieldIfQueueTooDeep();
}
Program: 196422
Project: 196422
Buggy source:
public void setTrustManaged(boolean trustManaged){
  if (trustManaged == mTrustManaged && mState != STATE_UNSET)   return;
  mTrustManaged=trustManaged;
  if (mAnimating) {
    updateState(true);
  }
}

Fixed version (ground truth):
public void setTrustManaged(boolean trustManaged){
  if (trustManaged == mTrustManaged && mState != STATE_UNSET)   return;
  mTrustManaged=trustManaged;
  updateState(true);
}
Program: 196423
Project: 196423
Buggy source:
public void start(){
  if (!mAnimating) {
    mAnimating=true;
    updateState(true);
  }
}

Fixed version (ground truth):
public void start(){
  if (!mAnimating) {
    mAnimating=true;
    updateState(true);
    invalidateSelf();
  }
}
Program: 196424
Project: 196424
Buggy source:
public void stop(){
  if (mAnimating) {
    mAnimating=false;
    if (mCurAnimator != null) {
      mCurAnimator.cancel();
      mCurAnimator=null;
    }
    mState=STATE_UNSET;
    mCurAlpha=0;
    mCurInnerRadius=mInnerRadiusEnter;
  }
}

Fixed version (ground truth):
public void stop(){
  if (mAnimating) {
    mAnimating=false;
    if (mCurAnimator != null) {
      mCurAnimator.cancel();
      mCurAnimator=null;
    }
    mState=STATE_UNSET;
    mCurAlpha=0;
    mCurInnerRadius=mInnerRadiusEnter;
    invalidateSelf();
  }
}
Program: 196426
Project: 196426
Buggy source:
public void setTrustManaged(boolean trustManaged){
  if (trustManaged == mTrustManaged && mState != STATE_UNSET)   return;
  mTrustManaged=trustManaged;
  if (mAnimating) {
    updateState(true);
  }
}

Fixed version (ground truth):
public void setTrustManaged(boolean trustManaged){
  if (trustManaged == mTrustManaged && mState != STATE_UNSET)   return;
  mTrustManaged=trustManaged;
  updateState(true);
}
Program: 196427
Project: 196427
Buggy source:
public void start(){
  if (!mAnimating) {
    mAnimating=true;
    updateState(true);
  }
}

Fixed version (ground truth):
public void start(){
  if (!mAnimating) {
    mAnimating=true;
    updateState(true);
    invalidateSelf();
  }
}
Program: 196428
Project: 196428
Buggy source:
public void stop(){
  if (mAnimating) {
    mAnimating=false;
    if (mCurAnimator != null) {
      mCurAnimator.cancel();
      mCurAnimator=null;
    }
    mState=STATE_UNSET;
    mCurAlpha=0;
    mCurInnerRadius=mInnerRadiusEnter;
  }
}

Fixed version (ground truth):
public void stop(){
  if (mAnimating) {
    mAnimating=false;
    if (mCurAnimator != null) {
      mCurAnimator.cancel();
      mCurAnimator=null;
    }
    mState=STATE_UNSET;
    mCurAlpha=0;
    mCurInnerRadius=mInnerRadiusEnter;
    invalidateSelf();
  }
}
Program: 196430
Project: 196430
Buggy source:
public void setTrustManaged(boolean trustManaged){
  if (trustManaged == mTrustManaged && mState != STATE_UNSET)   return;
  mTrustManaged=trustManaged;
  if (mAnimating) {
    updateState(true);
  }
}

Fixed version (ground truth):
public void setTrustManaged(boolean trustManaged){
  if (trustManaged == mTrustManaged && mState != STATE_UNSET)   return;
  mTrustManaged=trustManaged;
  updateState(true);
}
Program: 196431
Project: 196431
Buggy source:
public void start(){
  if (!mAnimating) {
    mAnimating=true;
    updateState(true);
  }
}

Fixed version (ground truth):
public void start(){
  if (!mAnimating) {
    mAnimating=true;
    updateState(true);
    invalidateSelf();
  }
}
Program: 196432
Project: 196432
Buggy source:
public void stop(){
  if (mAnimating) {
    mAnimating=false;
    if (mCurAnimator != null) {
      mCurAnimator.cancel();
      mCurAnimator=null;
    }
    mState=STATE_UNSET;
    mCurAlpha=0;
    mCurInnerRadius=mInnerRadiusEnter;
  }
}

Fixed version (ground truth):
public void stop(){
  if (mAnimating) {
    mAnimating=false;
    if (mCurAnimator != null) {
      mCurAnimator.cancel();
      mCurAnimator=null;
    }
    mState=STATE_UNSET;
    mCurAlpha=0;
    mCurInnerRadius=mInnerRadiusEnter;
    invalidateSelf();
  }
}
Program: 196434
Project: 196434
Buggy source:
public void setTrustManaged(boolean trustManaged){
  if (trustManaged == mTrustManaged && mState != STATE_UNSET)   return;
  mTrustManaged=trustManaged;
  if (mAnimating) {
    updateState(true);
  }
}

Fixed version (ground truth):
public void setTrustManaged(boolean trustManaged){
  if (trustManaged == mTrustManaged && mState != STATE_UNSET)   return;
  mTrustManaged=trustManaged;
  updateState(true);
}
Program: 196435
Project: 196435
Buggy source:
public void start(){
  if (!mAnimating) {
    mAnimating=true;
    updateState(true);
  }
}

Fixed version (ground truth):
public void start(){
  if (!mAnimating) {
    mAnimating=true;
    updateState(true);
    invalidateSelf();
  }
}
Program: 196436
Project: 196436
Buggy source:
public void stop(){
  if (mAnimating) {
    mAnimating=false;
    if (mCurAnimator != null) {
      mCurAnimator.cancel();
      mCurAnimator=null;
    }
    mState=STATE_UNSET;
    mCurAlpha=0;
    mCurInnerRadius=mInnerRadiusEnter;
  }
}

Fixed version (ground truth):
public void stop(){
  if (mAnimating) {
    mAnimating=false;
    if (mCurAnimator != null) {
      mCurAnimator.cancel();
      mCurAnimator=null;
    }
    mState=STATE_UNSET;
    mCurAlpha=0;
    mCurInnerRadius=mInnerRadiusEnter;
    invalidateSelf();
  }
}
Program: 196437
Project: 196437
Buggy source:
public long getTotalSizeKb(){
  return mInfos[Debug.MEMINFO_TOTAL];
}

Fixed version (ground truth):
/** 
 * Total amount of RAM available to the kernel.
 */
public long getTotalSizeKb(){
  return mInfos[Debug.MEMINFO_TOTAL];
}
Program: 196438
Project: 196438
Buggy source:
public long getCachedSize(){
  return mInfos[Debug.MEMINFO_CACHED] * 1024;
}

Fixed version (ground truth):
/** 
 * Amount of RAM that the kernel is being used for caches, not counting caches that are mapped in to processes.
 */
public long getCachedSize(){
  return getCachedSizeKb() * 1024;
}
Program: 196439
Project: 196439
Buggy source:
public long getTotalSize(){
  return mInfos[Debug.MEMINFO_TOTAL] * 1024;
}

Fixed version (ground truth):
/** 
 * Total amount of RAM available to the kernel.
 */
public long getTotalSize(){
  return mInfos[Debug.MEMINFO_TOTAL] * 1024;
}
Program: 196440
Project: 196440
Buggy source:
public long getFreeSize(){
  return mInfos[Debug.MEMINFO_FREE] * 1024;
}

Fixed version (ground truth):
/** 
 * Amount of RAM that is not being used for anything.
 */
public long getFreeSize(){
  return mInfos[Debug.MEMINFO_FREE] * 1024;
}
Program: 196441
Project: 196441
Buggy source:
public long getFreeSizeKb(){
  return mInfos[Debug.MEMINFO_FREE];
}

Fixed version (ground truth):
/** 
 * Amount of RAM that is not being used for anything.
 */
public long getFreeSizeKb(){
  return mInfos[Debug.MEMINFO_FREE];
}
Program: 196442
Project: 196442
Buggy source:
public long getCachedSizeKb(){
  return mInfos[Debug.MEMINFO_CACHED];
}

Fixed version (ground truth):
/** 
 * Amount of RAM that the kernel is being used for caches, not counting caches that are mapped in to processes.
 */
public long getCachedSizeKb(){
  return mInfos[Debug.MEMINFO_BUFFERS] + mInfos[Debug.MEMINFO_CACHED] - mInfos[Debug.MEMINFO_MAPPED];
}
Program: 196443
Project: 196443
Buggy source:
public long getTotalSizeKb(){
  return mInfos[Debug.MEMINFO_TOTAL];
}

Fixed version (ground truth):
/** 
 * Total amount of RAM available to the kernel.
 */
public long getTotalSizeKb(){
  return mInfos[Debug.MEMINFO_TOTAL];
}
Program: 196444
Project: 196444
Buggy source:
public long getCachedSize(){
  return mInfos[Debug.MEMINFO_CACHED] * 1024;
}

Fixed version (ground truth):
/** 
 * Amount of RAM that the kernel is being used for caches, not counting caches that are mapped in to processes.
 */
public long getCachedSize(){
  return getCachedSizeKb() * 1024;
}
Program: 196445
Project: 196445
Buggy source:
public long getTotalSize(){
  return mInfos[Debug.MEMINFO_TOTAL] * 1024;
}

Fixed version (ground truth):
/** 
 * Total amount of RAM available to the kernel.
 */
public long getTotalSize(){
  return mInfos[Debug.MEMINFO_TOTAL] * 1024;
}
Program: 196446
Project: 196446
Buggy source:
public long getFreeSize(){
  return mInfos[Debug.MEMINFO_FREE] * 1024;
}

Fixed version (ground truth):
/** 
 * Amount of RAM that is not being used for anything.
 */
public long getFreeSize(){
  return mInfos[Debug.MEMINFO_FREE] * 1024;
}
Program: 196447
Project: 196447
Buggy source:
public long getFreeSizeKb(){
  return mInfos[Debug.MEMINFO_FREE];
}

Fixed version (ground truth):
/** 
 * Amount of RAM that is not being used for anything.
 */
public long getFreeSizeKb(){
  return mInfos[Debug.MEMINFO_FREE];
}
Program: 196448
Project: 196448
Buggy source:
public long getCachedSizeKb(){
  return mInfos[Debug.MEMINFO_CACHED];
}

Fixed version (ground truth):
/** 
 * Amount of RAM that the kernel is being used for caches, not counting caches that are mapped in to processes.
 */
public long getCachedSizeKb(){
  return mInfos[Debug.MEMINFO_BUFFERS] + mInfos[Debug.MEMINFO_CACHED] - mInfos[Debug.MEMINFO_MAPPED];
}
Program: 196449
Project: 196449
Buggy source:
public long getTotalSizeKb(){
  return mInfos[Debug.MEMINFO_TOTAL];
}

Fixed version (ground truth):
/** 
 * Total amount of RAM available to the kernel.
 */
public long getTotalSizeKb(){
  return mInfos[Debug.MEMINFO_TOTAL];
}
Program: 196450
Project: 196450
Buggy source:
public long getCachedSize(){
  return mInfos[Debug.MEMINFO_CACHED] * 1024;
}

Fixed version (ground truth):
/** 
 * Amount of RAM that the kernel is being used for caches, not counting caches that are mapped in to processes.
 */
public long getCachedSize(){
  return getCachedSizeKb() * 1024;
}
Program: 196451
Project: 196451
Buggy source:
public long getTotalSize(){
  return mInfos[Debug.MEMINFO_TOTAL] * 1024;
}

Fixed version (ground truth):
/** 
 * Total amount of RAM available to the kernel.
 */
public long getTotalSize(){
  return mInfos[Debug.MEMINFO_TOTAL] * 1024;
}
Program: 196452
Project: 196452
Buggy source:
public long getFreeSize(){
  return mInfos[Debug.MEMINFO_FREE] * 1024;
}

Fixed version (ground truth):
/** 
 * Amount of RAM that is not being used for anything.
 */
public long getFreeSize(){
  return mInfos[Debug.MEMINFO_FREE] * 1024;
}
Program: 196453
Project: 196453
Buggy source:
public long getFreeSizeKb(){
  return mInfos[Debug.MEMINFO_FREE];
}

Fixed version (ground truth):
/** 
 * Amount of RAM that is not being used for anything.
 */
public long getFreeSizeKb(){
  return mInfos[Debug.MEMINFO_FREE];
}
Program: 196454
Project: 196454
Buggy source:
public long getCachedSizeKb(){
  return mInfos[Debug.MEMINFO_CACHED];
}

Fixed version (ground truth):
/** 
 * Amount of RAM that the kernel is being used for caches, not counting caches that are mapped in to processes.
 */
public long getCachedSizeKb(){
  return mInfos[Debug.MEMINFO_BUFFERS] + mInfos[Debug.MEMINFO_CACHED] - mInfos[Debug.MEMINFO_MAPPED];
}
Program: 196455
Project: 196455
Buggy source:
public long getTotalSizeKb(){
  return mInfos[Debug.MEMINFO_TOTAL];
}

Fixed version (ground truth):
/** 
 * Total amount of RAM available to the kernel.
 */
public long getTotalSizeKb(){
  return mInfos[Debug.MEMINFO_TOTAL];
}
Program: 196456
Project: 196456
Buggy source:
public long getCachedSize(){
  return mInfos[Debug.MEMINFO_CACHED] * 1024;
}

Fixed version (ground truth):
/** 
 * Amount of RAM that the kernel is being used for caches, not counting caches that are mapped in to processes.
 */
public long getCachedSize(){
  return getCachedSizeKb() * 1024;
}
Program: 196457
Project: 196457
Buggy source:
public long getTotalSize(){
  return mInfos[Debug.MEMINFO_TOTAL] * 1024;
}

Fixed version (ground truth):
/** 
 * Total amount of RAM available to the kernel.
 */
public long getTotalSize(){
  return mInfos[Debug.MEMINFO_TOTAL] * 1024;
}
Program: 196458
Project: 196458
Buggy source:
public long getFreeSize(){
  return mInfos[Debug.MEMINFO_FREE] * 1024;
}

Fixed version (ground truth):
/** 
 * Amount of RAM that is not being used for anything.
 */
public long getFreeSize(){
  return mInfos[Debug.MEMINFO_FREE] * 1024;
}
Program: 196459
Project: 196459
Buggy source:
public long getFreeSizeKb(){
  return mInfos[Debug.MEMINFO_FREE];
}

Fixed version (ground truth):
/** 
 * Amount of RAM that is not being used for anything.
 */
public long getFreeSizeKb(){
  return mInfos[Debug.MEMINFO_FREE];
}
Program: 196460
Project: 196460
Buggy source:
public long getCachedSizeKb(){
  return mInfos[Debug.MEMINFO_CACHED];
}

Fixed version (ground truth):
/** 
 * Amount of RAM that the kernel is being used for caches, not counting caches that are mapped in to processes.
 */
public long getCachedSizeKb(){
  return mInfos[Debug.MEMINFO_BUFFERS] + mInfos[Debug.MEMINFO_CACHED] - mInfos[Debug.MEMINFO_MAPPED];
}
Program: 196461
Project: 196461
Buggy source:
public long getTotalSizeKb(){
  return mInfos[Debug.MEMINFO_TOTAL];
}

Fixed version (ground truth):
/** 
 * Total amount of RAM available to the kernel.
 */
public long getTotalSizeKb(){
  return mInfos[Debug.MEMINFO_TOTAL];
}
Program: 196462
Project: 196462
Buggy source:
public long getCachedSize(){
  return mInfos[Debug.MEMINFO_CACHED] * 1024;
}

Fixed version (ground truth):
/** 
 * Amount of RAM that the kernel is being used for caches, not counting caches that are mapped in to processes.
 */
public long getCachedSize(){
  return getCachedSizeKb() * 1024;
}
Program: 196463
Project: 196463
Buggy source:
public long getTotalSize(){
  return mInfos[Debug.MEMINFO_TOTAL] * 1024;
}

Fixed version (ground truth):
/** 
 * Total amount of RAM available to the kernel.
 */
public long getTotalSize(){
  return mInfos[Debug.MEMINFO_TOTAL] * 1024;
}
Program: 196464
Project: 196464
Buggy source:
public long getFreeSize(){
  return mInfos[Debug.MEMINFO_FREE] * 1024;
}

Fixed version (ground truth):
/** 
 * Amount of RAM that is not being used for anything.
 */
public long getFreeSize(){
  return mInfos[Debug.MEMINFO_FREE] * 1024;
}
Program: 196465
Project: 196465
Buggy source:
public long getFreeSizeKb(){
  return mInfos[Debug.MEMINFO_FREE];
}

Fixed version (ground truth):
/** 
 * Amount of RAM that is not being used for anything.
 */
public long getFreeSizeKb(){
  return mInfos[Debug.MEMINFO_FREE];
}
Program: 196466
Project: 196466
Buggy source:
public long getCachedSizeKb(){
  return mInfos[Debug.MEMINFO_CACHED];
}

Fixed version (ground truth):
/** 
 * Amount of RAM that the kernel is being used for caches, not counting caches that are mapped in to processes.
 */
public long getCachedSizeKb(){
  return mInfos[Debug.MEMINFO_BUFFERS] + mInfos[Debug.MEMINFO_CACHED] - mInfos[Debug.MEMINFO_MAPPED];
}
Program: 196467
Project: 196467
Buggy source:
/** 
 * Returns true if the time represented by this Time object occurs before the given time.
 * @param that a given Time object to compare against
 * @return true if this time is less than the given time
 */
public boolean before(Time that){
  return Time.compare(this,that) < 0;
}

Fixed version (ground truth):
/** 
 * Returns true if the time represented by this Time object occurs before the given time. <p> Equivalent to   {@code Time.compare(this, that) &lt; 0}. See  {@link #compare(Time,Time)} for details.
 * @param that a given Time object to compare against
 * @return true if this time is less than the given time
 */
public boolean before(Time that){
  return Time.compare(this,that) < 0;
}
Program: 196468
Project: 196468
Buggy source:
/** 
 * Returns true if the day of the given time is the epoch on the Julian Calendar (January 1, 1970 on the Gregorian calendar).
 * @param time the time to test
 * @return true if epoch.
 */
public static boolean isEpoch(Time time){
  long millis=time.toMillis(true);
  return getJulianDay(millis,0) == EPOCH_JULIAN_DAY;
}

Fixed version (ground truth):
/** 
 * Returns true if the day of the given time is the epoch on the Julian Calendar (January 1, 1970 on the Gregorian calendar). <p> This method can return an incorrect answer when the date / time fields have been set to a local time that contradicts the available timezone information.
 * @param time the time to test
 * @return true if epoch.
 */
public static boolean isEpoch(Time time){
  long millis=time.toMillis(true);
  return getJulianDay(millis,0) == EPOCH_JULIAN_DAY;
}
Program: 196469
Project: 196469
Buggy source:
/** 
 * Ensures the values in each field are in range. For example if the current value of this calendar is March 32, normalize() will convert it to April 1. It also fills in weekDay, yearDay, isDst and gmtoff. <p> If "ignoreDst" is true, then this method sets the "isDst" field to -1 (the "unknown" value) before normalizing.  It then computes the correct value for "isDst". <p> See   {@link #toMillis(boolean)} for more information about when touse <tt>true</tt> or <tt>false</tt> for "ignoreDst".
 * @return the UTC milliseconds since the epoch
 */
public long normalize(boolean ignoreDst){
  calculator.copyFieldsFromTime(this);
  long timeInMillis=calculator.toMillis(ignoreDst);
  calculator.copyFieldsToTime(this);
  return timeInMillis;
}

Fixed version (ground truth):
/** 
 * Ensures the values in each field are in range. For example if the current value of this calendar is March 32, normalize() will convert it to April 1. It also fills in weekDay, yearDay, isDst and gmtoff. <p> If "ignoreDst" is true, then this method sets the "isDst" field to -1 (the "unknown" value) before normalizing.  It then computes the time in milliseconds and sets the correct value for "isDst" if the fields resolve to a valid date / time. <p> See   {@link #toMillis(boolean)} for more information about when touse <tt>true</tt> or <tt>false</tt> for "ignoreDst" and when  {@code -1}might be returned.
 * @return the UTC milliseconds since the epoch, or {@code -1}
 */
public long normalize(boolean ignoreDst){
  calculator.copyFieldsFromTime(this);
  long timeInMillis=calculator.toMillis(ignoreDst);
  calculator.copyFieldsToTime(this);
  return timeInMillis;
}
Program: 196470
Project: 196470
Buggy source:
/** 
 * Returns true if the time represented by this Time object occurs after the given time.
 * @param that a given Time object to compare against
 * @return true if this time is greater than the given time
 */
public boolean after(Time that){
  return Time.compare(this,that) > 0;
}

Fixed version (ground truth):
/** 
 * Returns true if the time represented by this Time object occurs after the given time. <p> Equivalent to   {@code Time.compare(this, that) &gt; 0}. See  {@link #compare(Time,Time)} for details.
 * @param that a given Time object to compare against
 * @return true if this time is greater than the given time
 */
public boolean after(Time that){
  return Time.compare(this,that) > 0;
}
Program: 196471
Project: 196471
Buggy source:
/** 
 * Returns true if the time represented by this Time object occurs before the given time.
 * @param that a given Time object to compare against
 * @return true if this time is less than the given time
 */
public boolean before(Time that){
  return Time.compare(this,that) < 0;
}

Fixed version (ground truth):
/** 
 * Returns true if the time represented by this Time object occurs before the given time. <p> Equivalent to   {@code Time.compare(this, that) &lt; 0}. See  {@link #compare(Time,Time)} for details.
 * @param that a given Time object to compare against
 * @return true if this time is less than the given time
 */
public boolean before(Time that){
  return Time.compare(this,that) < 0;
}
Program: 196472
Project: 196472
Buggy source:
/** 
 * Returns true if the day of the given time is the epoch on the Julian Calendar (January 1, 1970 on the Gregorian calendar).
 * @param time the time to test
 * @return true if epoch.
 */
public static boolean isEpoch(Time time){
  long millis=time.toMillis(true);
  return getJulianDay(millis,0) == EPOCH_JULIAN_DAY;
}

Fixed version (ground truth):
/** 
 * Returns true if the day of the given time is the epoch on the Julian Calendar (January 1, 1970 on the Gregorian calendar). <p> This method can return an incorrect answer when the date / time fields have been set to a local time that contradicts the available timezone information.
 * @param time the time to test
 * @return true if epoch.
 */
public static boolean isEpoch(Time time){
  long millis=time.toMillis(true);
  return getJulianDay(millis,0) == EPOCH_JULIAN_DAY;
}
Program: 196473
Project: 196473
Buggy source:
/** 
 * Ensures the values in each field are in range. For example if the current value of this calendar is March 32, normalize() will convert it to April 1. It also fills in weekDay, yearDay, isDst and gmtoff. <p> If "ignoreDst" is true, then this method sets the "isDst" field to -1 (the "unknown" value) before normalizing.  It then computes the correct value for "isDst". <p> See   {@link #toMillis(boolean)} for more information about when touse <tt>true</tt> or <tt>false</tt> for "ignoreDst".
 * @return the UTC milliseconds since the epoch
 */
public long normalize(boolean ignoreDst){
  calculator.copyFieldsFromTime(this);
  long timeInMillis=calculator.toMillis(ignoreDst);
  calculator.copyFieldsToTime(this);
  return timeInMillis;
}

Fixed version (ground truth):
/** 
 * Ensures the values in each field are in range. For example if the current value of this calendar is March 32, normalize() will convert it to April 1. It also fills in weekDay, yearDay, isDst and gmtoff. <p> If "ignoreDst" is true, then this method sets the "isDst" field to -1 (the "unknown" value) before normalizing.  It then computes the time in milliseconds and sets the correct value for "isDst" if the fields resolve to a valid date / time. <p> See   {@link #toMillis(boolean)} for more information about when touse <tt>true</tt> or <tt>false</tt> for "ignoreDst" and when  {@code -1}might be returned.
 * @return the UTC milliseconds since the epoch, or {@code -1}
 */
public long normalize(boolean ignoreDst){
  calculator.copyFieldsFromTime(this);
  long timeInMillis=calculator.toMillis(ignoreDst);
  calculator.copyFieldsToTime(this);
  return timeInMillis;
}
Program: 196474
Project: 196474
Buggy source:
/** 
 * Returns true if the time represented by this Time object occurs after the given time.
 * @param that a given Time object to compare against
 * @return true if this time is greater than the given time
 */
public boolean after(Time that){
  return Time.compare(this,that) > 0;
}

Fixed version (ground truth):
/** 
 * Returns true if the time represented by this Time object occurs after the given time. <p> Equivalent to   {@code Time.compare(this, that) &gt; 0}. See  {@link #compare(Time,Time)} for details.
 * @param that a given Time object to compare against
 * @return true if this time is greater than the given time
 */
public boolean after(Time that){
  return Time.compare(this,that) > 0;
}
Program: 196475
Project: 196475
Buggy source:
/** 
 * Returns true if the time represented by this Time object occurs before the given time.
 * @param that a given Time object to compare against
 * @return true if this time is less than the given time
 */
public boolean before(Time that){
  return Time.compare(this,that) < 0;
}

Fixed version (ground truth):
/** 
 * Returns true if the time represented by this Time object occurs before the given time. <p> Equivalent to   {@code Time.compare(this, that) &lt; 0}. See  {@link #compare(Time,Time)} for details.
 * @param that a given Time object to compare against
 * @return true if this time is less than the given time
 */
public boolean before(Time that){
  return Time.compare(this,that) < 0;
}
Program: 196476
Project: 196476
Buggy source:
/** 
 * Returns true if the day of the given time is the epoch on the Julian Calendar (January 1, 1970 on the Gregorian calendar).
 * @param time the time to test
 * @return true if epoch.
 */
public static boolean isEpoch(Time time){
  long millis=time.toMillis(true);
  return getJulianDay(millis,0) == EPOCH_JULIAN_DAY;
}

Fixed version (ground truth):
/** 
 * Returns true if the day of the given time is the epoch on the Julian Calendar (January 1, 1970 on the Gregorian calendar). <p> This method can return an incorrect answer when the date / time fields have been set to a local time that contradicts the available timezone information.
 * @param time the time to test
 * @return true if epoch.
 */
public static boolean isEpoch(Time time){
  long millis=time.toMillis(true);
  return getJulianDay(millis,0) == EPOCH_JULIAN_DAY;
}
Program: 196477
Project: 196477
Buggy source:
/** 
 * Ensures the values in each field are in range. For example if the current value of this calendar is March 32, normalize() will convert it to April 1. It also fills in weekDay, yearDay, isDst and gmtoff. <p> If "ignoreDst" is true, then this method sets the "isDst" field to -1 (the "unknown" value) before normalizing.  It then computes the correct value for "isDst". <p> See   {@link #toMillis(boolean)} for more information about when touse <tt>true</tt> or <tt>false</tt> for "ignoreDst".
 * @return the UTC milliseconds since the epoch
 */
public long normalize(boolean ignoreDst){
  calculator.copyFieldsFromTime(this);
  long timeInMillis=calculator.toMillis(ignoreDst);
  calculator.copyFieldsToTime(this);
  return timeInMillis;
}

Fixed version (ground truth):
/** 
 * Ensures the values in each field are in range. For example if the current value of this calendar is March 32, normalize() will convert it to April 1. It also fills in weekDay, yearDay, isDst and gmtoff. <p> If "ignoreDst" is true, then this method sets the "isDst" field to -1 (the "unknown" value) before normalizing.  It then computes the time in milliseconds and sets the correct value for "isDst" if the fields resolve to a valid date / time. <p> See   {@link #toMillis(boolean)} for more information about when touse <tt>true</tt> or <tt>false</tt> for "ignoreDst" and when  {@code -1}might be returned.
 * @return the UTC milliseconds since the epoch, or {@code -1}
 */
public long normalize(boolean ignoreDst){
  calculator.copyFieldsFromTime(this);
  long timeInMillis=calculator.toMillis(ignoreDst);
  calculator.copyFieldsToTime(this);
  return timeInMillis;
}
Program: 196478
Project: 196478
Buggy source:
/** 
 * Returns true if the time represented by this Time object occurs after the given time.
 * @param that a given Time object to compare against
 * @return true if this time is greater than the given time
 */
public boolean after(Time that){
  return Time.compare(this,that) > 0;
}

Fixed version (ground truth):
/** 
 * Returns true if the time represented by this Time object occurs after the given time. <p> Equivalent to   {@code Time.compare(this, that) &gt; 0}. See  {@link #compare(Time,Time)} for details.
 * @param that a given Time object to compare against
 * @return true if this time is greater than the given time
 */
public boolean after(Time that){
  return Time.compare(this,that) > 0;
}
Program: 196480
Project: 196480
Buggy source:
public void setTrustManaged(boolean trustManaged){
  if (trustManaged == mTrustManaged && mState != STATE_UNSET)   return;
  mTrustManaged=trustManaged;
  if (mAnimating) {
    updateState(true);
  }
}

Fixed version (ground truth):
public void setTrustManaged(boolean trustManaged){
  if (trustManaged == mTrustManaged && mState != STATE_UNSET)   return;
  mTrustManaged=trustManaged;
  updateState(true);
}
Program: 196481
Project: 196481
Buggy source:
public void start(){
  if (!mAnimating) {
    mAnimating=true;
    updateState(true);
  }
}

Fixed version (ground truth):
public void start(){
  if (!mAnimating) {
    mAnimating=true;
    updateState(true);
    invalidateSelf();
  }
}
Program: 196482
Project: 196482
Buggy source:
public void stop(){
  if (mAnimating) {
    mAnimating=false;
    if (mCurAnimator != null) {
      mCurAnimator.cancel();
      mCurAnimator=null;
    }
    mState=STATE_UNSET;
    mCurAlpha=0;
    mCurInnerRadius=mInnerRadiusEnter;
  }
}

Fixed version (ground truth):
public void stop(){
  if (mAnimating) {
    mAnimating=false;
    if (mCurAnimator != null) {
      mCurAnimator.cancel();
      mCurAnimator=null;
    }
    mState=STATE_UNSET;
    mCurAlpha=0;
    mCurInnerRadius=mInnerRadiusEnter;
    invalidateSelf();
  }
}
Program: 196488
Project: 196488
Buggy source:
protected void onTrackingStarted(){
  mTracking=true;
  mCollapseAfterPeek=false;
  mBar.onTrackingStarted(PanelView.this);
  notifyExpandingStarted();
}

Fixed version (ground truth):
protected void onTrackingStarted(){
  mClosing=false;
  mTracking=true;
  mCollapseAfterPeek=false;
  mBar.onTrackingStarted(PanelView.this);
  notifyExpandingStarted();
}
Program: 196489
Project: 196489
Buggy source:
private void updateFirstChildHeightWhileExpanding(ViewGroup hostView){
  mFirstChildWhileExpanding=(ExpandableView)findFirstVisibleChild(hostView);
  if (mFirstChildWhileExpanding != null) {
    if (mExpandedOnStart) {
      mFirstChildMaxHeight=mFirstChildWhileExpanding.getActualHeight();
    }
 else {
      updateFirstChildMaxSizeToMaxHeight();
    }
  }
 else {
    mFirstChildMaxHeight=0;
  }
}

Fixed version (ground truth):
private void updateFirstChildHeightWhileExpanding(ViewGroup hostView){
  mFirstChildWhileExpanding=(ExpandableView)findFirstVisibleChild(hostView);
  if (mFirstChildWhileExpanding != null) {
    if (mExpandedOnStart) {
      mFirstChildMaxHeight=StackStateAnimator.getFinalActualHeight(mFirstChildWhileExpanding);
    }
 else {
      updateFirstChildMaxSizeToMaxHeight();
    }
  }
 else {
    mFirstChildMaxHeight=0;
  }
}
Program: 196490
Project: 196490
Buggy source:
public void notifyChildrenChanged(ViewGroup hostView){
  if (mIsExpansionChanging) {
    updateFirstChildHeightWhileExpanding(hostView);
  }
}

Fixed version (ground truth):
public void notifyChildrenChanged(final ViewGroup hostView){
  if (mIsExpansionChanging) {
    hostView.post(new Runnable(){
      @Override public void run(){
        updateFirstChildHeightWhileExpanding(hostView);
      }
    }
);
  }
}
Program: 196491
Project: 196491
Buggy source:
private <T>T getChildTag(View child,int tag){
  return (T)child.getTag(tag);
}

Fixed version (ground truth):
private static <T>T getChildTag(View child,int tag){
  return (T)child.getTag(tag);
}
Program: 196496
Project: 196496
Buggy source:
protected void onTrackingStarted(){
  mTracking=true;
  mCollapseAfterPeek=false;
  mBar.onTrackingStarted(PanelView.this);
  notifyExpandingStarted();
}

Fixed version (ground truth):
protected void onTrackingStarted(){
  mClosing=false;
  mTracking=true;
  mCollapseAfterPeek=false;
  mBar.onTrackingStarted(PanelView.this);
  notifyExpandingStarted();
}
Program: 196497
Project: 196497
Buggy source:
private void updateFirstChildHeightWhileExpanding(ViewGroup hostView){
  mFirstChildWhileExpanding=(ExpandableView)findFirstVisibleChild(hostView);
  if (mFirstChildWhileExpanding != null) {
    if (mExpandedOnStart) {
      mFirstChildMaxHeight=mFirstChildWhileExpanding.getActualHeight();
    }
 else {
      updateFirstChildMaxSizeToMaxHeight();
    }
  }
 else {
    mFirstChildMaxHeight=0;
  }
}

Fixed version (ground truth):
private void updateFirstChildHeightWhileExpanding(ViewGroup hostView){
  mFirstChildWhileExpanding=(ExpandableView)findFirstVisibleChild(hostView);
  if (mFirstChildWhileExpanding != null) {
    if (mExpandedOnStart) {
      mFirstChildMaxHeight=StackStateAnimator.getFinalActualHeight(mFirstChildWhileExpanding);
    }
 else {
      updateFirstChildMaxSizeToMaxHeight();
    }
  }
 else {
    mFirstChildMaxHeight=0;
  }
}
Program: 196498
Project: 196498
Buggy source:
public void notifyChildrenChanged(ViewGroup hostView){
  if (mIsExpansionChanging) {
    updateFirstChildHeightWhileExpanding(hostView);
  }
}

Fixed version (ground truth):
public void notifyChildrenChanged(final ViewGroup hostView){
  if (mIsExpansionChanging) {
    hostView.post(new Runnable(){
      @Override public void run(){
        updateFirstChildHeightWhileExpanding(hostView);
      }
    }
);
  }
}