nus-yam/ex-repair huggingface dataset:
Program: 192167
Project: 192167
Buggy source:
public void startExitAnimation(){
  mDismissArea.animate().setDuration(mShortDuration).setInterpolator(Interpolators.FAST_OUT_SLOW_IN).alpha(0.0f);
  mTaskCardView.animate().setDuration(mShortDuration).setInterpolator(Interpolators.FAST_OUT_SLOW_IN).translationYBy(-mCardYDelta).alpha(1.0f);
}

Fixed version (ground truth):
public void startExitAnimation(){
  mDismissArea.animate().setDuration(mShortDuration).setInterpolator(Interpolators.FAST_OUT_SLOW_IN).alpha(0.0f);
  mRecentsTvCard.animate().setDuration(mShortDuration).setInterpolator(Interpolators.FAST_OUT_SLOW_IN).translationYBy(-mCardYDelta).alpha(1.0f);
}
Program: 192168
Project: 192168
Buggy source:
public void startDismissAnimation(Animator.AnimatorListener listener){
  mDismissArea.animate().setDuration(mShortDuration).setInterpolator(Interpolators.FAST_OUT_SLOW_IN).alpha(0.0f);
  mTaskCardView.animate().setDuration(mLongDuration).setInterpolator(Interpolators.FAST_OUT_SLOW_IN).translationYBy(mCardYDelta).alpha(0.0f).setListener(listener);
}

Fixed version (ground truth):
public void startDismissAnimation(Animator.AnimatorListener listener){
  mDismissArea.animate().setDuration(mShortDuration).setInterpolator(Interpolators.FAST_OUT_SLOW_IN).alpha(0.0f);
  mRecentsTvCard.animate().setDuration(mLongDuration).setInterpolator(Interpolators.FAST_OUT_SLOW_IN).translationYBy(mCardYDelta).alpha(0.0f).setListener(listener);
}
Program: 192169
Project: 192169
Buggy source:
public void startEnterAnimation(){
  mDismissArea.animate().setDuration(mShortDuration).setInterpolator(Interpolators.FAST_OUT_SLOW_IN).alpha(1.0f);
  mTaskCardView.animate().setDuration(mShortDuration).setInterpolator(Interpolators.FAST_OUT_SLOW_IN).translationYBy(mCardYDelta).alpha(0.5f);
}

Fixed version (ground truth):
public void startEnterAnimation(){
  mDismissArea.animate().setDuration(mShortDuration).setInterpolator(Interpolators.FAST_OUT_SLOW_IN).alpha(1.0f);
  mRecentsTvCard.animate().setDuration(mShortDuration).setInterpolator(Interpolators.FAST_OUT_SLOW_IN).translationYBy(mCardYDelta).alpha(0.5f);
}
Program: 192170
Project: 192170
Buggy source:
public TaskStackHorizontalGridView setTaskStackViewAdapter(TaskStackHorizontalViewAdapter taskStackViewAdapter){
  if (mTaskStackHorizontalView != null) {
    mTaskStackHorizontalView.setAdapter(taskStackViewAdapter);
  }
  return mTaskStackHorizontalView;
}

Fixed version (ground truth):
public TaskStackHorizontalGridView setTaskStackViewAdapter(TaskStackHorizontalViewAdapter taskStackViewAdapter){
  if (mTaskStackHorizontalView != null) {
    mTaskStackHorizontalView.setAdapter(taskStackViewAdapter);
    taskStackViewAdapter.setTaskStackHorizontalGridView(mTaskStackHorizontalView);
  }
  return mTaskStackHorizontalView;
}
Program: 192171
Project: 192171
Buggy source:
public void startDismissTaskAnimation(Animator.AnimatorListener listener){
  mDismissAnimationsHolder.startDismissAnimation(listener);
}

Fixed version (ground truth):
public void startDismissTaskAnimation(Animator.AnimatorListener listener){
  mDismissState=false;
  mDismissAnimationsHolder.startDismissAnimation(listener);
}
Program: 192172
Project: 192172
Buggy source:
@Override public void onStackTaskRemoved(TaskStack stack,Task removedTask,boolean wasFrontMostTask,Task newFrontMostTask,AnimationProps animation,boolean fromDockGesture){
  getAdapter().notifyItemRemoved(stack.getStackTasks().indexOf(removedTask));
  if (mFocusedTask == removedTask) {
    resetFocusedTask(removedTask);
  }
  if (mStack.getStackTaskCount() == 0) {
    boolean shouldFinishActivity=(mStack.getStackTaskCount() == 0);
    if (shouldFinishActivity) {
      EventBus.getDefault().send(new AllTaskViewsDismissedEvent(fromDockGesture ? R.string.recents_empty_message : R.string.recents_empty_message_dismissed_all));
    }
  }
}

Fixed version (ground truth):
@Override public void onStackTaskRemoved(TaskStack stack,Task removedTask,boolean wasFrontMostTask,Task newFrontMostTask,AnimationProps animation,boolean fromDockGesture){
  ((TaskStackHorizontalViewAdapter)getAdapter()).removeTask(removedTask);
  if (mFocusedTask == removedTask) {
    resetFocusedTask(removedTask);
  }
  if (mStack.getStackTaskCount() == 0) {
    boolean shouldFinishActivity=(mStack.getStackTaskCount() == 0);
    if (shouldFinishActivity) {
      EventBus.getDefault().send(new AllTaskViewsDismissedEvent(fromDockGesture ? R.string.recents_empty_message : R.string.recents_empty_message_dismissed_all));
    }
  }
}
Program: 192173
Project: 192173
Buggy source:
@Override public void onStackTaskAdded(TaskStack stack,Task newTask){
  getAdapter().notifyItemInserted(stack.getStackTasks().indexOf(newTask));
}

Fixed version (ground truth):
@Override public void onStackTaskAdded(TaskStack stack,Task newTask){
  ((TaskStackHorizontalViewAdapter)getAdapter()).addTaskAt(newTask,stack.indexOfStackTask(newTask));
}
Program: 192174
Project: 192174
Buggy source:
@Override public void onClick(View v){
  try {
    if (mTaskCardView.isInDismissState()) {
      mTaskCardView.startDismissTaskAnimation(getRemoveAtListener(getAdapterPosition(),mTaskCardView));
    }
 else {
      EventBus.getDefault().send(new LaunchTvTaskEvent(mTaskCardView,mTask,null,INVALID_STACK_ID));
      ((Activity)(v.getContext())).finish();
    }
  }
 catch (  Exception e) {
    Log.e(TAG,v.getContext().getString(R.string.recents_launch_error_message,mTask.title),e);
  }
}

Fixed version (ground truth):
@Override public void onClick(View v){
  try {
    if (mTaskCardView.isInDismissState()) {
      mTaskCardView.startDismissTaskAnimation(getRemoveAtListener(getAdapterPosition(),mTaskCardView.getTask()));
    }
 else {
      EventBus.getDefault().send(new LaunchTvTaskEvent(mTaskCardView,mTask,null,INVALID_STACK_ID));
      ((Activity)(v.getContext())).finish();
    }
  }
 catch (  Exception e) {
    Log.e(TAG,v.getContext().getString(R.string.recents_launch_error_message,mTask.title),e);
  }
}
Program: 192175
Project: 192175
Buggy source:
@Override public void onAnimationEnd(Animator animation){
  removeAt(position);
  EventBus.getDefault().send(new DeleteTaskDataEvent(taskCardView.getTask()));
}

Fixed version (ground truth):
@Override public void onAnimationEnd(Animator animation){
  removeAt(position);
  EventBus.getDefault().send(new DeleteTaskDataEvent(task));
}
Program: 192176
Project: 192176
Buggy source:
private Animator.AnimatorListener getRemoveAtListener(final int position,final TaskCardView taskCardView){
  return new Animator.AnimatorListener(){
    @Override public void onAnimationStart(    Animator animation){
    }
    @Override public void onAnimationEnd(    Animator animation){
      removeAt(position);
      EventBus.getDefault().send(new DeleteTaskDataEvent(taskCardView.getTask()));
    }
    @Override public void onAnimationCancel(    Animator animation){
    }
    @Override public void onAnimationRepeat(    Animator animation){
    }
  }
;
}

Fixed version (ground truth):
private Animator.AnimatorListener getRemoveAtListener(final int position,final Task task){
  return new Animator.AnimatorListener(){
    @Override public void onAnimationStart(    Animator animation){
    }
    @Override public void onAnimationEnd(    Animator animation){
      removeAt(position);
      EventBus.getDefault().send(new DeleteTaskDataEvent(task));
    }
    @Override public void onAnimationCancel(    Animator animation){
    }
    @Override public void onAnimationRepeat(    Animator animation){
    }
  }
;
}
Program: 192177
Project: 192177
Buggy source:
private void removeAt(int position){
  mTaskList.remove(position);
  notifyItemRemoved(position);
}

Fixed version (ground truth):
private void removeAt(int position){
  Task removedTask=mTaskList.remove(position);
  if (mGridView != null) {
    mGridView.getStack().removeTask(removedTask,AnimationProps.IMMEDIATE,false);
  }
  notifyItemRemoved(position);
}
Program: 192178
Project: 192178
Buggy source:
private boolean isCarrierApp(String packageName){
synchronized (mLock) {
    if (mCarrierPrivilegedApps == null) {
      fetchCarrierPrivilegedAppsLocked();
    }
  }
  return mCarrierPrivilegedApps.contains(packageName);
}

Fixed version (ground truth):
private boolean isCarrierApp(String packageName){
synchronized (mLock) {
    if (!mHaveCarrierPrivilegedApps) {
      fetchCarrierPrivilegedAppsLocked();
    }
    if (mCarrierPrivilegedApps != null) {
      return mCarrierPrivilegedApps.contains(packageName);
    }
    return false;
  }
}
Program: 192179
Project: 192179
Buggy source:
void clearCarrierPrivilegedApps(){
  if (DEBUG) {
    Slog.i(TAG,"String_Node_Str");
  }
synchronized (mLock) {
    mCarrierPrivilegedApps=null;
  }
}

Fixed version (ground truth):
void clearCarrierPrivilegedApps(){
  if (DEBUG) {
    Slog.i(TAG,"String_Node_Str");
  }
synchronized (mLock) {
    mHaveCarrierPrivilegedApps=false;
    mCarrierPrivilegedApps=null;
  }
}
Program: 192180
Project: 192180
Buggy source:
private void fetchCarrierPrivilegedAppsLocked(){
  TelephonyManager telephonyManager=getContext().getSystemService(TelephonyManager.class);
  mCarrierPrivilegedApps=telephonyManager.getPackagesWithCarrierPrivileges();
  if (DEBUG) {
    Slog.d(TAG,"String_Node_Str" + mCarrierPrivilegedApps);
  }
}

Fixed version (ground truth):
private void fetchCarrierPrivilegedAppsLocked(){
  TelephonyManager telephonyManager=getContext().getSystemService(TelephonyManager.class);
  mCarrierPrivilegedApps=telephonyManager.getPackagesWithCarrierPrivileges();
  mHaveCarrierPrivilegedApps=true;
  if (DEBUG) {
    Slog.d(TAG,"String_Node_Str" + mCarrierPrivilegedApps);
  }
}
Program: 192181
Project: 192181
Buggy source:
private boolean isCarrierApp(String packageName){
synchronized (mLock) {
    if (mCarrierPrivilegedApps == null) {
      fetchCarrierPrivilegedAppsLocked();
    }
  }
  return mCarrierPrivilegedApps.contains(packageName);
}

Fixed version (ground truth):
private boolean isCarrierApp(String packageName){
synchronized (mLock) {
    if (!mHaveCarrierPrivilegedApps) {
      fetchCarrierPrivilegedAppsLocked();
    }
    if (mCarrierPrivilegedApps != null) {
      return mCarrierPrivilegedApps.contains(packageName);
    }
    return false;
  }
}
Program: 192182
Project: 192182
Buggy source:
void clearCarrierPrivilegedApps(){
  if (DEBUG) {
    Slog.i(TAG,"String_Node_Str");
  }
synchronized (mLock) {
    mCarrierPrivilegedApps=null;
  }
}

Fixed version (ground truth):
void clearCarrierPrivilegedApps(){
  if (DEBUG) {
    Slog.i(TAG,"String_Node_Str");
  }
synchronized (mLock) {
    mHaveCarrierPrivilegedApps=false;
    mCarrierPrivilegedApps=null;
  }
}
Program: 192183
Project: 192183
Buggy source:
private void fetchCarrierPrivilegedAppsLocked(){
  TelephonyManager telephonyManager=getContext().getSystemService(TelephonyManager.class);
  mCarrierPrivilegedApps=telephonyManager.getPackagesWithCarrierPrivileges();
  if (DEBUG) {
    Slog.d(TAG,"String_Node_Str" + mCarrierPrivilegedApps);
  }
}

Fixed version (ground truth):
private void fetchCarrierPrivilegedAppsLocked(){
  TelephonyManager telephonyManager=getContext().getSystemService(TelephonyManager.class);
  mCarrierPrivilegedApps=telephonyManager.getPackagesWithCarrierPrivileges();
  mHaveCarrierPrivilegedApps=true;
  if (DEBUG) {
    Slog.d(TAG,"String_Node_Str" + mCarrierPrivilegedApps);
  }
}
Program: 192184
Project: 192184
Buggy source:
@Override public void onHeadsUpStateChanged(NotificationData.Entry entry,boolean isHeadsUp){
  final StatusBarNotification sbn=entry.notification;
  if (entry.row.isHeadsUp()) {
    if (shouldIsolate(sbn)) {
      onEntryRemovedInternal(entry,entry.notification);
      mIsolatedEntries.put(sbn.getKey(),sbn);
      onEntryAdded(entry);
      updateSuppression(mGroupMap.get(entry.notification.getGroupKey()));
      mListener.onGroupsChanged();
    }
  }
 else {
    if (mIsolatedEntries.containsKey(sbn.getKey())) {
      onEntryRemovedInternal(entry,entry.notification);
      mIsolatedEntries.remove(sbn.getKey());
      onEntryAdded(entry);
      mListener.onGroupsChanged();
    }
  }
}

Fixed version (ground truth):
@Override public void onHeadsUpStateChanged(NotificationData.Entry entry,boolean isHeadsUp){
  final StatusBarNotification sbn=entry.notification;
  if (entry.row.isHeadsUp()) {
    if (shouldIsolate(sbn)) {
      onEntryRemovedInternal(entry,entry.notification);
      mIsolatedEntries.put(sbn.getKey(),sbn);
      onEntryAdded(entry);
      updateSuppression(mGroupMap.get(entry.notification.getGroupKey()));
      mListener.onGroupsChanged();
    }
 else {
      handleSuppressedSummaryHeadsUpped(entry);
    }
  }
 else {
    if (mIsolatedEntries.containsKey(sbn.getKey())) {
      onEntryRemovedInternal(entry,entry.notification);
      mIsolatedEntries.remove(sbn.getKey());
      onEntryAdded(entry);
      mListener.onGroupsChanged();
    }
  }
}
Program: 192185
Project: 192185
Buggy source:
private void updateSuppression(NotificationGroup group){
  if (group == null) {
    return;
  }
  boolean prevSuppressed=group.suppressed;
  group.suppressed=group.summary != null && !group.expanded && (group.children.size() == 1 || (group.children.size() == 0 && group.summary.notification.getNotification().isGroupSummary() && hasIsolatedChildren(group)));
  if (prevSuppressed != group.suppressed) {
    mListener.onGroupsChanged();
  }
}

Fixed version (ground truth):
private void updateSuppression(NotificationGroup group){
  if (group == null) {
    return;
  }
  boolean prevSuppressed=group.suppressed;
  group.suppressed=group.summary != null && !group.expanded && (group.children.size() == 1 || (group.children.size() == 0 && group.summary.notification.getNotification().isGroupSummary() && hasIsolatedChildren(group)));
  if (prevSuppressed != group.suppressed) {
    if (group.suppressed) {
      handleSuppressedSummaryHeadsUpped(group.summary);
    }
    mListener.onGroupsChanged();
  }
}
Program: 192187
Project: 192187
Buggy source:
/** 
 * Called when updating or posting a notification to the heads up.
 */
public void updateNotification(NotificationData.Entry headsUp,boolean alert){
  if (DEBUG)   Log.v(TAG,"String_Node_Str");
  headsUp.row.sendAccessibilityEvent(AccessibilityEvent.TYPE_WINDOW_CONTENT_CHANGED);
  if (alert) {
    HeadsUpEntry headsUpEntry=mHeadsUpEntries.get(headsUp.key);
    headsUpEntry.updateEntry();
    setEntryPinned(headsUpEntry,shouldHeadsUpBecomePinned(headsUp));
  }
}

Fixed version (ground truth):
/** 
 * Called when updating or posting a notification to the heads up.
 */
public void updateNotification(NotificationData.Entry headsUp,boolean alert){
  if (DEBUG)   Log.v(TAG,"String_Node_Str");
  headsUp.row.sendAccessibilityEvent(AccessibilityEvent.TYPE_WINDOW_CONTENT_CHANGED);
  if (alert) {
    HeadsUpEntry headsUpEntry=mHeadsUpEntries.get(headsUp.key);
    if (headsUpEntry == null) {
      return;
    }
    headsUpEntry.updateEntry();
    setEntryPinned(headsUpEntry,shouldHeadsUpBecomePinned(headsUp));
  }
}
Program: 192188
Project: 192188
Buggy source:
@Override public void onHeadsUpStateChanged(NotificationData.Entry entry,boolean isHeadsUp){
  final StatusBarNotification sbn=entry.notification;
  if (entry.row.isHeadsUp()) {
    if (shouldIsolate(sbn)) {
      onEntryRemovedInternal(entry,entry.notification);
      mIsolatedEntries.put(sbn.getKey(),sbn);
      onEntryAdded(entry);
      updateSuppression(mGroupMap.get(entry.notification.getGroupKey()));
      mListener.onGroupsChanged();
    }
  }
 else {
    if (mIsolatedEntries.containsKey(sbn.getKey())) {
      onEntryRemovedInternal(entry,entry.notification);
      mIsolatedEntries.remove(sbn.getKey());
      onEntryAdded(entry);
      mListener.onGroupsChanged();
    }
  }
}

Fixed version (ground truth):
@Override public void onHeadsUpStateChanged(NotificationData.Entry entry,boolean isHeadsUp){
  final StatusBarNotification sbn=entry.notification;
  if (entry.row.isHeadsUp()) {
    if (shouldIsolate(sbn)) {
      onEntryRemovedInternal(entry,entry.notification);
      mIsolatedEntries.put(sbn.getKey(),sbn);
      onEntryAdded(entry);
      updateSuppression(mGroupMap.get(entry.notification.getGroupKey()));
      mListener.onGroupsChanged();
    }
 else {
      handleSuppressedSummaryHeadsUpped(entry);
    }
  }
 else {
    if (mIsolatedEntries.containsKey(sbn.getKey())) {
      onEntryRemovedInternal(entry,entry.notification);
      mIsolatedEntries.remove(sbn.getKey());
      onEntryAdded(entry);
      mListener.onGroupsChanged();
    }
  }
}
Program: 192189
Project: 192189
Buggy source:
private void updateSuppression(NotificationGroup group){
  if (group == null) {
    return;
  }
  boolean prevSuppressed=group.suppressed;
  group.suppressed=group.summary != null && !group.expanded && (group.children.size() == 1 || (group.children.size() == 0 && group.summary.notification.getNotification().isGroupSummary() && hasIsolatedChildren(group)));
  if (prevSuppressed != group.suppressed) {
    mListener.onGroupsChanged();
  }
}

Fixed version (ground truth):
private void updateSuppression(NotificationGroup group){
  if (group == null) {
    return;
  }
  boolean prevSuppressed=group.suppressed;
  group.suppressed=group.summary != null && !group.expanded && (group.children.size() == 1 || (group.children.size() == 0 && group.summary.notification.getNotification().isGroupSummary() && hasIsolatedChildren(group)));
  if (prevSuppressed != group.suppressed) {
    if (group.suppressed) {
      handleSuppressedSummaryHeadsUpped(group.summary);
    }
    mListener.onGroupsChanged();
  }
}
Program: 192191
Project: 192191
Buggy source:
/** 
 * Called when updating or posting a notification to the heads up.
 */
public void updateNotification(NotificationData.Entry headsUp,boolean alert){
  if (DEBUG)   Log.v(TAG,"String_Node_Str");
  headsUp.row.sendAccessibilityEvent(AccessibilityEvent.TYPE_WINDOW_CONTENT_CHANGED);
  if (alert) {
    HeadsUpEntry headsUpEntry=mHeadsUpEntries.get(headsUp.key);
    headsUpEntry.updateEntry();
    setEntryPinned(headsUpEntry,shouldHeadsUpBecomePinned(headsUp));
  }
}

Fixed version (ground truth):
/** 
 * Called when updating or posting a notification to the heads up.
 */
public void updateNotification(NotificationData.Entry headsUp,boolean alert){
  if (DEBUG)   Log.v(TAG,"String_Node_Str");
  headsUp.row.sendAccessibilityEvent(AccessibilityEvent.TYPE_WINDOW_CONTENT_CHANGED);
  if (alert) {
    HeadsUpEntry headsUpEntry=mHeadsUpEntries.get(headsUp.key);
    if (headsUpEntry == null) {
      return;
    }
    headsUpEntry.updateEntry();
    setEntryPinned(headsUpEntry,shouldHeadsUpBecomePinned(headsUp));
  }
}
Program: 192192
Project: 192192
Buggy source:
/** 
 * Gets the GNSS receiver internal hardware clock value in nanoseconds. <p>This value is expected to be monotonically increasing while the hardware clock remains powered on. For the case of a hardware clock that is not continuously on, see the  {@link #getHardwareClockDiscontinuityCount} field. The GPS time can be derived by adding{@link #getFullBiasNanos()} and {@link #getBiasNanos()} (when they are available) to thisvalue. Sub-nanosecond accuracy can be provided by means of  {@link #getBiasNanos()}. <p>The error estimate for this value (if applicable) is   {@link #getTimeUncertaintyNanos()}.
 */
public long getTimeNanos(){
  return mTimeNanos;
}

Fixed version (ground truth):
/** 
 * Gets the GNSS receiver internal hardware clock value in nanoseconds. <p>This value is expected to be monotonically increasing while the hardware clock remains powered on. For the case of a hardware clock that is not continuously on, see the  {@link #getHardwareClockDiscontinuityCount} field. The GPS time can be derived by subtractingthe sum of  {@link #getFullBiasNanos()} and {@link #getBiasNanos()} (when they are available)from this value. Sub-nanosecond accuracy can be provided by means of  {@link #getBiasNanos()}. <p>The error estimate for this value (if applicable) is   {@link #getTimeUncertaintyNanos()}.
 */
public long getTimeNanos(){
  return mTimeNanos;
}
Program: 192193
Project: 192193
Buggy source:
/** 
 * Gets the leap second associated with the clock's time. <p>The sign of the value is defined by the following equation: <pre> UtcTimeNanos = TimeNanos + (FullBiasNanos + BiasNanos) - LeapSecond * 1,000,000,000</pre> <p>The value is only available if   {@link #hasLeapSecond()} is {@code true}.
 */
public int getLeapSecond(){
  return mLeapSecond;
}

Fixed version (ground truth):
/** 
 * Gets the leap second associated with the clock's time. <p>The sign of the value is defined by the following equation: <pre> UtcTimeNanos = TimeNanos - (FullBiasNanos + BiasNanos) - LeapSecond * 1,000,000,000</pre> <p>The value is only available if   {@link #hasLeapSecond()} is {@code true}.
 */
public int getLeapSecond(){
  return mLeapSecond;
}
Program: 192194
Project: 192194
Buggy source:
/** 
 * Gets the difference between hardware clock (  {@link #getTimeNanos()}) inside GPS receiver and the true GPS time since 0000Z, January 6, 1980, in nanoseconds. <p>This value is available if the receiver has estimated GPS time. If the computed time is for a non-GPS constellation, the time offset of that constellation to GPS has to be applied to fill this value. The value is only available if   {@link #hasFullBiasNanos()} is{@code true}. <p>The error estimate for the sum of this field and   {@link #getBiasNanos} is{@link #getBiasUncertaintyNanos()}. <p>The sign of the value is defined by the following equation: <pre> local estimate of GPS time = TimeNanos + (FullBiasNanos + BiasNanos)</pre>
 */
public long getFullBiasNanos(){
  return mFullBiasNanos;
}

Fixed version (ground truth):
/** 
 * Gets the difference between hardware clock (  {@link #getTimeNanos()}) inside GPS receiver and the true GPS time since 0000Z, January 6, 1980, in nanoseconds. <p>This value is available if the receiver has estimated GPS time. If the computed time is for a non-GPS constellation, the time offset of that constellation to GPS has to be applied to fill this value. The value is only available if   {@link #hasFullBiasNanos()} is{@code true}. <p>The error estimate for the sum of this field and   {@link #getBiasNanos} is{@link #getBiasUncertaintyNanos()}. <p>The sign of the value is defined by the following equation: <pre> local estimate of GPS time = TimeNanos - (FullBiasNanos + BiasNanos)</pre>
 */
public long getFullBiasNanos(){
  return mFullBiasNanos;
}
Program: 192195
Project: 192195
Buggy source:
/** 
 * Gets the GNSS receiver internal hardware clock value in nanoseconds. <p>This value is expected to be monotonically increasing while the hardware clock remains powered on. For the case of a hardware clock that is not continuously on, see the  {@link #getHardwareClockDiscontinuityCount} field. The GPS time can be derived by adding{@link #getFullBiasNanos()} and {@link #getBiasNanos()} (when they are available) to thisvalue. Sub-nanosecond accuracy can be provided by means of  {@link #getBiasNanos()}. <p>The error estimate for this value (if applicable) is   {@link #getTimeUncertaintyNanos()}.
 */
public long getTimeNanos(){
  return mTimeNanos;
}

Fixed version (ground truth):
/** 
 * Gets the GNSS receiver internal hardware clock value in nanoseconds. <p>This value is expected to be monotonically increasing while the hardware clock remains powered on. For the case of a hardware clock that is not continuously on, see the  {@link #getHardwareClockDiscontinuityCount} field. The GPS time can be derived by subtractingthe sum of  {@link #getFullBiasNanos()} and {@link #getBiasNanos()} (when they are available)from this value. Sub-nanosecond accuracy can be provided by means of  {@link #getBiasNanos()}. <p>The error estimate for this value (if applicable) is   {@link #getTimeUncertaintyNanos()}.
 */
public long getTimeNanos(){
  return mTimeNanos;
}
Program: 192196
Project: 192196
Buggy source:
/** 
 * Gets the leap second associated with the clock's time. <p>The sign of the value is defined by the following equation: <pre> UtcTimeNanos = TimeNanos + (FullBiasNanos + BiasNanos) - LeapSecond * 1,000,000,000</pre> <p>The value is only available if   {@link #hasLeapSecond()} is {@code true}.
 */
public int getLeapSecond(){
  return mLeapSecond;
}

Fixed version (ground truth):
/** 
 * Gets the leap second associated with the clock's time. <p>The sign of the value is defined by the following equation: <pre> UtcTimeNanos = TimeNanos - (FullBiasNanos + BiasNanos) - LeapSecond * 1,000,000,000</pre> <p>The value is only available if   {@link #hasLeapSecond()} is {@code true}.
 */
public int getLeapSecond(){
  return mLeapSecond;
}
Program: 192197
Project: 192197
Buggy source:
/** 
 * Gets the difference between hardware clock (  {@link #getTimeNanos()}) inside GPS receiver and the true GPS time since 0000Z, January 6, 1980, in nanoseconds. <p>This value is available if the receiver has estimated GPS time. If the computed time is for a non-GPS constellation, the time offset of that constellation to GPS has to be applied to fill this value. The value is only available if   {@link #hasFullBiasNanos()} is{@code true}. <p>The error estimate for the sum of this field and   {@link #getBiasNanos} is{@link #getBiasUncertaintyNanos()}. <p>The sign of the value is defined by the following equation: <pre> local estimate of GPS time = TimeNanos + (FullBiasNanos + BiasNanos)</pre>
 */
public long getFullBiasNanos(){
  return mFullBiasNanos;
}

Fixed version (ground truth):
/** 
 * Gets the difference between hardware clock (  {@link #getTimeNanos()}) inside GPS receiver and the true GPS time since 0000Z, January 6, 1980, in nanoseconds. <p>This value is available if the receiver has estimated GPS time. If the computed time is for a non-GPS constellation, the time offset of that constellation to GPS has to be applied to fill this value. The value is only available if   {@link #hasFullBiasNanos()} is{@code true}. <p>The error estimate for the sum of this field and   {@link #getBiasNanos} is{@link #getBiasUncertaintyNanos()}. <p>The sign of the value is defined by the following equation: <pre> local estimate of GPS time = TimeNanos - (FullBiasNanos + BiasNanos)</pre>
 */
public long getFullBiasNanos(){
  return mFullBiasNanos;
}
Program: 192198
Project: 192198
Buggy source:
private void updateSoftKeyboardShowModeLocked(UserState userState){
  final int userId=userState.mUserId;
  if ((userId == mCurrentUserId) && (userState.mSoftKeyboardShowMode != 0)) {
    boolean serviceChangingSoftKeyboardModeIsEnabled=userState.mEnabledServices.contains(userState.mServiceChangingSoftKeyboardMode);
    if (!serviceChangingSoftKeyboardModeIsEnabled) {
      final long identity=Binder.clearCallingIdentity();
      try {
        Settings.Secure.putIntForUser(mContext.getContentResolver(),Settings.Secure.ACCESSIBILITY_SOFT_KEYBOARD_MODE,0,userState.mUserId);
      }
  finally {
        Binder.restoreCallingIdentity(identity);
      }
      userState.mSoftKeyboardShowMode=0;
      userState.mServiceChangingSoftKeyboardMode=null;
    }
    notifySoftKeyboardShowModeChangedLocked(userState.mSoftKeyboardShowMode);
  }
}

Fixed version (ground truth):
private void updateSoftKeyboardShowModeLocked(UserState userState){
  final int userId=userState.mUserId;
  if ((userId == mCurrentUserId) && (userState.mSoftKeyboardShowMode != 0)) {
    boolean serviceChangingSoftKeyboardModeIsEnabled=userState.mEnabledServices.contains(userState.mServiceChangingSoftKeyboardMode);
    if (!serviceChangingSoftKeyboardModeIsEnabled) {
      final long identity=Binder.clearCallingIdentity();
      try {
        Settings.Secure.putIntForUser(mContext.getContentResolver(),Settings.Secure.ACCESSIBILITY_SOFT_KEYBOARD_MODE,0,userState.mUserId);
      }
  finally {
        Binder.restoreCallingIdentity(identity);
      }
      userState.mSoftKeyboardShowMode=0;
      userState.mServiceChangingSoftKeyboardMode=null;
      notifySoftKeyboardShowModeChangedLocked(userState.mSoftKeyboardShowMode);
    }
  }
}
Program: 192200
Project: 192200
Buggy source:
@Override public void stopJob(JobParameters jobParams){
  ensureHandler();
  Message m=Message.obtain(mHandler,MSG_STOP_JOB,jobParams);
  m.sendToTarget();
}

Fixed version (ground truth):
@Override public void stopJob(JobParameters jobParams) throws RemoteException {
  JobService service=mService.get();
  if (service != null) {
    service.ensureHandler();
    Message m=Message.obtain(service.mHandler,MSG_STOP_JOB,jobParams);
    m.sendToTarget();
  }
}
Program: 192201
Project: 192201
Buggy source:
@Override public void startJob(JobParameters jobParams){
  ensureHandler();
  Message m=Message.obtain(mHandler,MSG_EXECUTE_JOB,jobParams);
  m.sendToTarget();
}

Fixed version (ground truth):
@Override public void startJob(JobParameters jobParams) throws RemoteException {
  JobService service=mService.get();
  if (service != null) {
    service.ensureHandler();
    Message m=Message.obtain(service.mHandler,MSG_EXECUTE_JOB,jobParams);
    m.sendToTarget();
  }
}
Program: 192202
Project: 192202
Buggy source:
/** 
 * @hide 
 */
public final IBinder onBind(Intent intent){
  return mBinder.asBinder();
}

Fixed version (ground truth):
/** 
 * @hide 
 */
public final IBinder onBind(Intent intent){
  if (mBinder == null) {
    mBinder=new JobInterface(this);
  }
  return mBinder.asBinder();
}
Program: 192204
Project: 192204
Buggy source:
static void dumpHelp(PrintWriter pw){
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
}

Fixed version (ground truth):
static void dumpHelp(PrintWriter pw){
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
}
Program: 192206
Project: 192206
Buggy source:
private static String lightStateToString(int state){
switch (state) {
case LIGHT_STATE_ACTIVE:
    return "String_Node_Str";
case LIGHT_STATE_INACTIVE:
  return "String_Node_Str";
case LIGHT_STATE_PRE_IDLE:
return "String_Node_Str";
case LIGHT_STATE_IDLE:
return "String_Node_Str";
case LIGHT_STATE_IDLE_MAINTENANCE:
return "String_Node_Str";
case LIGHT_STATE_OVERRIDE:
return "String_Node_Str";
default :
return Integer.toString(state);
}
}

Fixed version (ground truth):
private static String lightStateToString(int state){
switch (state) {
case LIGHT_STATE_ACTIVE:
    return "String_Node_Str";
case LIGHT_STATE_INACTIVE:
  return "String_Node_Str";
case LIGHT_STATE_PRE_IDLE:
return "String_Node_Str";
case LIGHT_STATE_IDLE:
return "String_Node_Str";
case LIGHT_STATE_WAITING_FOR_NETWORK:
return "String_Node_Str";
case LIGHT_STATE_IDLE_MAINTENANCE:
return "String_Node_Str";
case LIGHT_STATE_OVERRIDE:
return "String_Node_Str";
default :
return Integer.toString(state);
}
}
Program: 192207
Project: 192207
Buggy source:
void scheduleLightAlarmLocked(long delay){
  if (DEBUG)   Slog.d(TAG,"String_Node_Str" + delay + "String_Node_Str");
  if (mMotionSensor == null) {
    return;
  }
  mNextLightAlarmTime=SystemClock.elapsedRealtime() + delay;
  mAlarmManager.set(AlarmManager.ELAPSED_REALTIME_WAKEUP,mNextLightAlarmTime,"String_Node_Str",mLightAlarmListener,mHandler);
}

Fixed version (ground truth):
void scheduleLightAlarmLocked(long delay){
  if (DEBUG)   Slog.d(TAG,"String_Node_Str" + delay + "String_Node_Str");
  mNextLightAlarmTime=SystemClock.elapsedRealtime() + delay;
  mAlarmManager.set(AlarmManager.ELAPSED_REALTIME_WAKEUP,mNextLightAlarmTime,"String_Node_Str",mLightAlarmListener,mHandler);
}
Program: 192211
Project: 192211
Buggy source:
private boolean isFlushed(SpeechItem speechItem){
synchronized (mFlushedObjects) {
    return mFlushAll || mFlushedObjects.contains(speechItem.getCallerIdentity());
  }
}

Fixed version (ground truth):
private boolean isFlushed(SpeechItem speechItem){
synchronized (mFlushedObjects) {
    return mFlushAll > 0 || mFlushedObjects.contains(speechItem.getCallerIdentity());
  }
}
Program: 192212
Project: 192212
Buggy source:
private void startFlushingSpeechItems(Object callerIdentity){
synchronized (mFlushedObjects) {
    if (callerIdentity == null) {
      mFlushAll=true;
    }
 else {
      mFlushedObjects.add(callerIdentity);
    }
  }
}

Fixed version (ground truth):
private void startFlushingSpeechItems(Object callerIdentity){
synchronized (mFlushedObjects) {
    if (callerIdentity == null) {
      mFlushAll+=1;
    }
 else {
      mFlushedObjects.add(callerIdentity);
    }
  }
}
Program: 192213
Project: 192213
Buggy source:
private void endFlushingSpeechItems(Object callerIdentity){
synchronized (mFlushedObjects) {
    if (callerIdentity == null) {
      mFlushAll=false;
    }
 else {
      mFlushedObjects.remove(callerIdentity);
    }
  }
}

Fixed version (ground truth):
private void endFlushingSpeechItems(Object callerIdentity){
synchronized (mFlushedObjects) {
    if (callerIdentity == null) {
      mFlushAll-=1;
    }
 else {
      mFlushedObjects.remove(callerIdentity);
    }
  }
}
Program: 192216
Project: 192216
Buggy source:
static void dumpHelp(PrintWriter pw){
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
}

Fixed version (ground truth):
static void dumpHelp(PrintWriter pw){
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
}
Program: 192218
Project: 192218
Buggy source:
private static String lightStateToString(int state){
switch (state) {
case LIGHT_STATE_ACTIVE:
    return "String_Node_Str";
case LIGHT_STATE_INACTIVE:
  return "String_Node_Str";
case LIGHT_STATE_PRE_IDLE:
return "String_Node_Str";
case LIGHT_STATE_IDLE:
return "String_Node_Str";
case LIGHT_STATE_IDLE_MAINTENANCE:
return "String_Node_Str";
case LIGHT_STATE_OVERRIDE:
return "String_Node_Str";
default :
return Integer.toString(state);
}
}

Fixed version (ground truth):
private static String lightStateToString(int state){
switch (state) {
case LIGHT_STATE_ACTIVE:
    return "String_Node_Str";
case LIGHT_STATE_INACTIVE:
  return "String_Node_Str";
case LIGHT_STATE_PRE_IDLE:
return "String_Node_Str";
case LIGHT_STATE_IDLE:
return "String_Node_Str";
case LIGHT_STATE_WAITING_FOR_NETWORK:
return "String_Node_Str";
case LIGHT_STATE_IDLE_MAINTENANCE:
return "String_Node_Str";
case LIGHT_STATE_OVERRIDE:
return "String_Node_Str";
default :
return Integer.toString(state);
}
}
Program: 192219
Project: 192219
Buggy source:
void scheduleLightAlarmLocked(long delay){
  if (DEBUG)   Slog.d(TAG,"String_Node_Str" + delay + "String_Node_Str");
  if (mMotionSensor == null) {
    return;
  }
  mNextLightAlarmTime=SystemClock.elapsedRealtime() + delay;
  mAlarmManager.set(AlarmManager.ELAPSED_REALTIME_WAKEUP,mNextLightAlarmTime,"String_Node_Str",mLightAlarmListener,mHandler);
}

Fixed version (ground truth):
void scheduleLightAlarmLocked(long delay){
  if (DEBUG)   Slog.d(TAG,"String_Node_Str" + delay + "String_Node_Str");
  mNextLightAlarmTime=SystemClock.elapsedRealtime() + delay;
  mAlarmManager.set(AlarmManager.ELAPSED_REALTIME_WAKEUP,mNextLightAlarmTime,"String_Node_Str",mLightAlarmListener,mHandler);
}
Program: 192223
Project: 192223
Buggy source:
@Override public void stopJob(JobParameters jobParams){
  ensureHandler();
  Message m=Message.obtain(mHandler,MSG_STOP_JOB,jobParams);
  m.sendToTarget();
}

Fixed version (ground truth):
@Override public void stopJob(JobParameters jobParams) throws RemoteException {
  JobService service=mService.get();
  if (service != null) {
    service.ensureHandler();
    Message m=Message.obtain(service.mHandler,MSG_STOP_JOB,jobParams);
    m.sendToTarget();
  }
}
Program: 192224
Project: 192224
Buggy source:
@Override public void startJob(JobParameters jobParams){
  ensureHandler();
  Message m=Message.obtain(mHandler,MSG_EXECUTE_JOB,jobParams);
  m.sendToTarget();
}

Fixed version (ground truth):
@Override public void startJob(JobParameters jobParams) throws RemoteException {
  JobService service=mService.get();
  if (service != null) {
    service.ensureHandler();
    Message m=Message.obtain(service.mHandler,MSG_EXECUTE_JOB,jobParams);
    m.sendToTarget();
  }
}
Program: 192225
Project: 192225
Buggy source:
/** 
 * @hide 
 */
public final IBinder onBind(Intent intent){
  return mBinder.asBinder();
}

Fixed version (ground truth):
/** 
 * @hide 
 */
public final IBinder onBind(Intent intent){
  if (mBinder == null) {
    mBinder=new JobInterface(this);
  }
  return mBinder.asBinder();
}
Program: 192226
Project: 192226
Buggy source:
public void cancelPeek(){
  if (mPeekAnimator != null) {
    mPeekAnimator.cancel();
  }
  removeCallbacks(mPeekRunnable);
  mPeekPending=false;
  notifyBarPanelExpansionChanged();
}

Fixed version (ground truth):
public void cancelPeek(){
  boolean cancelled=mPeekPending;
  if (mPeekAnimator != null) {
    cancelled=true;
    mPeekAnimator.cancel();
  }
  removeCallbacks(mPeekRunnable);
  mPeekPending=false;
  if (cancelled) {
    notifyBarPanelExpansionChanged();
  }
}
Program: 192227
Project: 192227
Buggy source:
@Override public void onTrackingStarted(){
  super.onTrackingStarted();
  mBar.onTrackingStarted();
  mScrimController.onTrackingStarted();
}

Fixed version (ground truth):
@Override public void onTrackingStarted(){
  super.onTrackingStarted();
  mBar.onTrackingStarted();
  mScrimController.onTrackingStarted();
  removePendingHideExpandedRunnables();
}
Program: 192228
Project: 192228
Buggy source:
@Override public void run(){
  mBar.makeExpandedInvisible();
}

Fixed version (ground truth):
@Override public void run(){
  if (mPanelFraction == 0.0f) {
    mBar.makeExpandedInvisible();
  }
}
Program: 192230
Project: 192230
Buggy source:
private void adjustCropToStackBounds(WindowState w,Rect clipRect,Rect finalClipRect,boolean isFreeformResizing){
  final Task task=w.getTask();
  if (task == null || !task.cropWindowsToStackBounds()) {
    return;
  }
  final int stackClip=resolveStackClip();
  if (isAnimating() && stackClip == STACK_CLIP_NONE) {
    return;
  }
  final WindowState winShowWhenLocked=(WindowState)mPolicy.getWinShowWhenLockedLw();
  if (w == winShowWhenLocked) {
    return;
  }
  final TaskStack stack=task.mStack;
  stack.getDimBounds(mTmpStackBounds);
  final int frameX=isFreeformResizing ? (int)mSurfaceController.getX() : w.mFrame.left + mWin.mXOffset - w.getAttrs().surfaceInsets.left;
  final int frameY=isFreeformResizing ? (int)mSurfaceController.getY() : w.mFrame.top + mWin.mYOffset - w.getAttrs().surfaceInsets.top;
  final boolean useFinalClipRect=isAnimating() && stackClip == STACK_CLIP_AFTER_ANIM;
  if (useFinalClipRect) {
    finalClipRect.set(mTmpStackBounds);
  }
 else {
    clipRect.left=Math.max(0,Math.max(mTmpStackBounds.left,frameX + clipRect.left) - frameX);
    clipRect.top=Math.max(0,Math.max(mTmpStackBounds.top,frameY + clipRect.top) - frameY);
    clipRect.right=Math.max(0,Math.min(mTmpStackBounds.right,frameX + clipRect.right) - frameX);
    clipRect.bottom=Math.max(0,Math.min(mTmpStackBounds.bottom,frameY + clipRect.bottom) - frameY);
  }
}

Fixed version (ground truth):
private void adjustCropToStackBounds(WindowState w,Rect clipRect,Rect finalClipRect,boolean isFreeformResizing){
  final Task task=w.getTask();
  if (task == null || !task.cropWindowsToStackBounds()) {
    return;
  }
  final int stackClip=resolveStackClip();
  if (isAnimating() && stackClip == STACK_CLIP_NONE) {
    return;
  }
  final WindowState winShowWhenLocked=(WindowState)mPolicy.getWinShowWhenLockedLw();
  if (w == winShowWhenLocked) {
    return;
  }
  final TaskStack stack=task.mStack;
  stack.getDimBounds(mTmpStackBounds);
  final Rect surfaceInsets=w.getAttrs().surfaceInsets;
  final int frameX=isFreeformResizing ? (int)mSurfaceController.getX() : w.mFrame.left + mWin.mXOffset - surfaceInsets.left;
  final int frameY=isFreeformResizing ? (int)mSurfaceController.getY() : w.mFrame.top + mWin.mYOffset - surfaceInsets.top;
  final boolean useFinalClipRect=isAnimating() && stackClip == STACK_CLIP_AFTER_ANIM;
  if (useFinalClipRect) {
    finalClipRect.set(mTmpStackBounds);
  }
 else {
    if (StackId.hasWindowShadow(stack.mStackId) && !StackId.isTaskResizeAllowed(stack.mStackId)) {
      mTmpStackBounds.inset(-surfaceInsets.left,-surfaceInsets.top,-surfaceInsets.right,-surfaceInsets.bottom);
    }
    clipRect.left=Math.max(0,Math.max(mTmpStackBounds.left,frameX + clipRect.left) - frameX);
    clipRect.top=Math.max(0,Math.max(mTmpStackBounds.top,frameY + clipRect.top) - frameY);
    clipRect.right=Math.max(0,Math.min(mTmpStackBounds.right,frameX + clipRect.right) - frameX);
    clipRect.bottom=Math.max(0,Math.min(mTmpStackBounds.bottom,frameY + clipRect.bottom) - frameY);
  }
}
Program: 192231
Project: 192231
Buggy source:
void updateSurfaceWindowCrop(Rect clipRect,Rect finalClipRect,boolean recoveringMemory){
  if (!clipRect.equals(mLastClipRect)) {
    mLastClipRect.set(clipRect);
    mSurfaceController.setCropInTransaction(clipRect,recoveringMemory);
  }
  if (!finalClipRect.equals(mLastFinalClipRect)) {
    mLastFinalClipRect.set(finalClipRect);
    mSurfaceController.setFinalCropInTransaction(finalClipRect);
  }
}

Fixed version (ground truth):
void updateSurfaceWindowCrop(Rect clipRect,Rect finalClipRect,boolean recoveringMemory){
  if (DEBUG_WINDOW_CROP)   Slog.d(TAG,"String_Node_Str" + mWin + "String_Node_Str"+ clipRect+ "String_Node_Str"+ finalClipRect);
  if (!clipRect.equals(mLastClipRect)) {
    mLastClipRect.set(clipRect);
    mSurfaceController.setCropInTransaction(clipRect,recoveringMemory);
  }
  if (!finalClipRect.equals(mLastFinalClipRect)) {
    mLastFinalClipRect.set(finalClipRect);
    mSurfaceController.setFinalCropInTransaction(finalClipRect);
  }
}
Program: 192235
Project: 192235
Buggy source:
public void cancelPeek(){
  if (mPeekAnimator != null) {
    mPeekAnimator.cancel();
  }
  removeCallbacks(mPeekRunnable);
  mPeekPending=false;
  notifyBarPanelExpansionChanged();
}

Fixed version (ground truth):
public void cancelPeek(){
  boolean cancelled=mPeekPending;
  if (mPeekAnimator != null) {
    cancelled=true;
    mPeekAnimator.cancel();
  }
  removeCallbacks(mPeekRunnable);
  mPeekPending=false;
  if (cancelled) {
    notifyBarPanelExpansionChanged();
  }
}
Program: 192236
Project: 192236
Buggy source:
@Override public void onTrackingStarted(){
  super.onTrackingStarted();
  mBar.onTrackingStarted();
  mScrimController.onTrackingStarted();
}

Fixed version (ground truth):
@Override public void onTrackingStarted(){
  super.onTrackingStarted();
  mBar.onTrackingStarted();
  mScrimController.onTrackingStarted();
  removePendingHideExpandedRunnables();
}
Program: 192237
Project: 192237
Buggy source:
@Override public void run(){
  mBar.makeExpandedInvisible();
}

Fixed version (ground truth):
@Override public void run(){
  if (mPanelFraction == 0.0f) {
    mBar.makeExpandedInvisible();
  }
}
Program: 192238
Project: 192238
Buggy source:
/** 
 * Sends a notification indicating the bugreport has finished so use can share it.
 */
private static void sendBugreportNotification(Context context,BugreportInfo info,boolean takingScreenshot){
  addDetailsToZipFile(context,info);
  final Intent shareIntent=new Intent(INTENT_BUGREPORT_SHARE);
  shareIntent.setClass(context,BugreportProgressService.class);
  shareIntent.setAction(INTENT_BUGREPORT_SHARE);
  shareIntent.putExtra(EXTRA_ID,info.id);
  shareIntent.putExtra(EXTRA_INFO,info);
  final String title, content;
  if (takingScreenshot) {
    title=context.getString(R.string.bugreport_finished_pending_screenshot_title,info.id);
    content=context.getString(R.string.bugreport_finished_pending_screenshot_text);
  }
 else {
    title=context.getString(R.string.bugreport_finished_title,info.id);
    content=context.getString(R.string.bugreport_finished_text);
  }
  final Notification.Builder builder=newBaseNotification(context).setContentTitle(title).setTicker(title).setContentText(content).setContentIntent(PendingIntent.getService(context,info.id,shareIntent,PendingIntent.FLAG_UPDATE_CURRENT)).setDeleteIntent(newCancelIntent(context,info));
  if (!TextUtils.isEmpty(info.name)) {
    builder.setContentInfo(info.name);
  }
  Log.v(TAG,"String_Node_Str" + info.id + "String_Node_Str"+ title);
  NotificationManager.from(context).notify(TAG,info.id,builder.build());
}

Fixed version (ground truth):
/** 
 * Sends a notification indicating the bugreport has finished so use can share it.
 */
private static void sendBugreportNotification(Context context,BugreportInfo info,boolean takingScreenshot){
  addDetailsToZipFile(context,info);
  final Intent shareIntent=new Intent(INTENT_BUGREPORT_SHARE);
  shareIntent.setClass(context,BugreportProgressService.class);
  shareIntent.setAction(INTENT_BUGREPORT_SHARE);
  shareIntent.putExtra(EXTRA_ID,info.id);
  shareIntent.putExtra(EXTRA_INFO,info);
  final String title, content;
  if (takingScreenshot) {
    title=context.getString(R.string.bugreport_finished_pending_screenshot_title,info.id);
    content=context.getString(R.string.bugreport_finished_pending_screenshot_text);
  }
 else {
    title=context.getString(R.string.bugreport_finished_title,info.id);
    content=context.getString(R.string.bugreport_finished_text);
  }
  final Notification.Builder builder=newBaseNotification(context).setContentTitle(title).setTicker(title).setContentText(content).setContentIntent(PendingIntent.getService(context,info.id,shareIntent,PendingIntent.FLAG_UPDATE_CURRENT)).setDeleteIntent(newCancelIntent(context,info));
  if (!TextUtils.isEmpty(info.name)) {
    builder.setSubText(info.name);
  }
  Log.v(TAG,"String_Node_Str" + info.id + "String_Node_Str"+ title);
  NotificationManager.from(context).notify(TAG,info.id,builder.build());
}