nus-yam/ex-repair huggingface dataset:
Program: 191745
Project: 191745
Buggy source:
public void removeAllChildren(){
  List<ExpandableNotificationRow> notificationChildren=mChildrenContainer.getNotificationChildren();
  ArrayList<ExpandableNotificationRow> clonedList=new ArrayList<>(notificationChildren);
  for (int i=0; i < clonedList.size(); i++) {
    ExpandableNotificationRow row=clonedList.get(i);
    mChildrenContainer.removeNotification(row);
    mHeaderUtil.restoreNotificationHeader(row);
    row.setIsChildInGroup(false,null);
  }
  onChildrenCountChanged();
}

Fixed version (ground truth):
public void removeAllChildren(){
  List<ExpandableNotificationRow> notificationChildren=mChildrenContainer.getNotificationChildren();
  ArrayList<ExpandableNotificationRow> clonedList=new ArrayList<>(notificationChildren);
  for (int i=0; i < clonedList.size(); i++) {
    ExpandableNotificationRow row=clonedList.get(i);
    if (row.keepInParent()) {
      continue;
    }
    mChildrenContainer.removeNotification(row);
    mHeaderUtil.restoreNotificationHeader(row);
    row.setIsChildInGroup(false,null);
  }
  onChildrenCountChanged();
}
Program: 191746
Project: 191746
Buggy source:
/** 
 * @return whether a given notification is a child in a group which has a summary
 */
public boolean isChildInGroupWithSummary(StatusBarNotification sbn){
  if (!isGroupChild(sbn)) {
    return false;
  }
  NotificationGroup group=mGroupMap.get(getGroupKey(sbn));
  if (group == null || group.summary == null || group.suppressed) {
    return false;
  }
  return true;
}

Fixed version (ground truth):
/** 
 * @return whether a given notification is a child in a group which has a summary
 */
public boolean isChildInGroupWithSummary(StatusBarNotification sbn){
  if (!isGroupChild(sbn)) {
    return false;
  }
  NotificationGroup group=mGroupMap.get(getGroupKey(sbn));
  if (group == null || group.summary == null || group.suppressed) {
    return false;
  }
  if (group.children.isEmpty()) {
    return false;
  }
  return true;
}
Program: 191747
Project: 191747
Buggy source:
private void removeNotificationChildren(){
  ArrayList<ExpandableNotificationRow> toRemove=new ArrayList<>();
  for (int i=0; i < mStackScroller.getChildCount(); i++) {
    View view=mStackScroller.getChildAt(i);
    if (!(view instanceof ExpandableNotificationRow)) {
      continue;
    }
    ExpandableNotificationRow parent=(ExpandableNotificationRow)view;
    List<ExpandableNotificationRow> children=parent.getNotificationChildren();
    List<ExpandableNotificationRow> orderedChildren=mTmpChildOrderMap.get(parent);
    if (children != null) {
      toRemove.clear();
      for (      ExpandableNotificationRow childRow : children) {
        if (orderedChildren == null || !orderedChildren.contains(childRow)) {
          toRemove.add(childRow);
        }
      }
      for (      ExpandableNotificationRow remove : toRemove) {
        parent.removeChildNotification(remove);
        if (mNotificationData.get(remove.getStatusBarNotification().getKey()) == null) {
          mStackScroller.notifyGroupChildRemoved(remove);
        }
      }
    }
  }
}

Fixed version (ground truth):
private void removeNotificationChildren(){
  ArrayList<ExpandableNotificationRow> toRemove=new ArrayList<>();
  for (int i=0; i < mStackScroller.getChildCount(); i++) {
    View view=mStackScroller.getChildAt(i);
    if (!(view instanceof ExpandableNotificationRow)) {
      continue;
    }
    ExpandableNotificationRow parent=(ExpandableNotificationRow)view;
    List<ExpandableNotificationRow> children=parent.getNotificationChildren();
    List<ExpandableNotificationRow> orderedChildren=mTmpChildOrderMap.get(parent);
    if (children != null) {
      toRemove.clear();
      for (      ExpandableNotificationRow childRow : children) {
        if ((orderedChildren == null || !orderedChildren.contains(childRow)) && !childRow.keepInParent()) {
          toRemove.add(childRow);
        }
      }
      for (      ExpandableNotificationRow remove : toRemove) {
        parent.removeChildNotification(remove);
        if (mNotificationData.get(remove.getStatusBarNotification().getKey()) == null) {
          mStackScroller.notifyGroupChildRemoved(remove);
        }
      }
    }
  }
}
Program: 191749
Project: 191749
Buggy source:
private void performDismiss(View v){
  if (v instanceof ExpandableNotificationRow) {
    ExpandableNotificationRow row=(ExpandableNotificationRow)v;
    if (mGroupManager.isOnlyChildInSuppressedGroup(row.getStatusBarNotification())) {
      ExpandableNotificationRow groupSummary=mGroupManager.getLogicalGroupSummary(row.getStatusBarNotification());
      if (groupSummary.isClearable()) {
        performDismiss(groupSummary);
      }
    }
  }
  final View veto=v.findViewById(R.id.veto);
  if (veto != null && veto.getVisibility() != View.GONE) {
    veto.performClick();
  }
  if (DEBUG)   Log.v(TAG,"String_Node_Str" + v);
}

Fixed version (ground truth):
private void performDismiss(View v){
  if (v instanceof ExpandableNotificationRow) {
    ExpandableNotificationRow row=(ExpandableNotificationRow)v;
    if (mGroupManager.isOnlyChildInSuppressedGroup(row.getStatusBarNotification())) {
      ExpandableNotificationRow groupSummary=mGroupManager.getLogicalGroupSummary(row.getStatusBarNotification());
      if (groupSummary.isClearable()) {
        performDismiss(groupSummary);
      }
    }
    row.setDismissed(true);
  }
  final View veto=v.findViewById(R.id.veto);
  if (veto != null && veto.getVisibility() != View.GONE) {
    veto.performClick();
  }
  if (DEBUG)   Log.v(TAG,"String_Node_Str" + v);
}
Program: 191750
Project: 191750
Buggy source:
/** 
 * Cancels a notification ONLY if it has all of the   {@code mustHaveFlags}and none of the   {@code mustNotHaveFlags}.
 */
void cancelNotification(final int callingUid,final int callingPid,final String pkg,final String tag,final int id,final int mustHaveFlags,final int mustNotHaveFlags,final boolean sendDelete,final int userId,final int reason,final ManagedServiceInfo listener){
  mHandler.post(new Runnable(){
    @Override public void run(){
      String listenerName=listener == null ? null : listener.component.toShortString();
      if (DBG)       EventLogTags.writeNotificationCancel(callingUid,callingPid,pkg,id,tag,userId,mustHaveFlags,mustNotHaveFlags,reason,listenerName);
synchronized (mNotificationList) {
        int index=indexOfNotificationLocked(pkg,tag,id,userId);
        if (index >= 0) {
          NotificationRecord r=mNotificationList.get(index);
          if (reason == REASON_DELEGATE_CLICK) {
            mUsageStats.registerClickedByUser(r);
          }
          if ((r.getNotification().flags & mustHaveFlags) != mustHaveFlags) {
            return;
          }
          if ((r.getNotification().flags & mustNotHaveFlags) != 0) {
            return;
          }
          mNotificationList.remove(index);
          cancelGroupChildrenLocked(r,callingUid,callingPid,listenerName,REASON_GROUP_SUMMARY_CANCELED);
          cancelNotificationLocked(r,sendDelete,reason);
          updateLightsLocked();
        }
      }
    }
  }
);
}

Fixed version (ground truth):
/** 
 * Cancels a notification ONLY if it has all of the   {@code mustHaveFlags}and none of the   {@code mustNotHaveFlags}.
 */
void cancelNotification(final int callingUid,final int callingPid,final String pkg,final String tag,final int id,final int mustHaveFlags,final int mustNotHaveFlags,final boolean sendDelete,final int userId,final int reason,final ManagedServiceInfo listener){
  mHandler.post(new Runnable(){
    @Override public void run(){
      String listenerName=listener == null ? null : listener.component.toShortString();
      if (DBG)       EventLogTags.writeNotificationCancel(callingUid,callingPid,pkg,id,tag,userId,mustHaveFlags,mustNotHaveFlags,reason,listenerName);
synchronized (mNotificationList) {
        int index=indexOfNotificationLocked(pkg,tag,id,userId);
        if (index >= 0) {
          NotificationRecord r=mNotificationList.get(index);
          if (reason == REASON_DELEGATE_CLICK) {
            mUsageStats.registerClickedByUser(r);
          }
          if ((r.getNotification().flags & mustHaveFlags) != mustHaveFlags) {
            return;
          }
          if ((r.getNotification().flags & mustNotHaveFlags) != 0) {
            return;
          }
          mNotificationList.remove(index);
          cancelNotificationLocked(r,sendDelete,reason);
          cancelGroupChildrenLocked(r,callingUid,callingPid,listenerName,REASON_GROUP_SUMMARY_CANCELED);
          updateLightsLocked();
        }
      }
    }
  }
);
}
Program: 191751
Project: 191751
Buggy source:
/** 
 * Constructs a Bundle containing a copy of the mappings from the given Bundle.
 * @param b a Bundle to be copied.
 */
BaseBundle(BaseBundle b){
  if (b.mParcelledData != null) {
    if (b.isEmptyParcel()) {
      mParcelledData=NoImagePreloadHolder.EMPTY_PARCEL;
    }
 else {
      mParcelledData=Parcel.obtain();
      mParcelledData.appendFrom(b.mParcelledData,0,b.mParcelledData.dataSize());
      mParcelledData.setDataPosition(0);
    }
  }
 else {
    mParcelledData=null;
  }
  if (b.mMap != null) {
    mMap=new ArrayMap<String,Object>(b.mMap);
  }
 else {
    mMap=null;
  }
  mClassLoader=b.mClassLoader;
}

Fixed version (ground truth):
/** 
 * Constructs a Bundle containing a copy of the mappings from the given Bundle.
 * @param b a Bundle to be copied.
 */
BaseBundle(BaseBundle b){
  if (b.mParcelledData != null) {
    if (b.isEmptyParcel()) {
      mParcelledData=NoImagePreloadHolder.EMPTY_PARCEL;
    }
 else {
      mParcelledData=Parcel.obtain();
      mParcelledData.appendFrom(b.mParcelledData,0,b.mParcelledData.dataSize());
      mParcelledData.setDataPosition(0);
    }
  }
 else {
    mParcelledData=null;
  }
  if (b.mMap != null) {
    mMap=new ArrayMap<>(b.mMap);
  }
 else {
    mMap=null;
  }
  mClassLoader=b.mClassLoader;
}
Program: 191752
Project: 191752
Buggy source:
/** 
 * Writes the Bundle contents to a Parcel, typically in order for it to be passed through an IBinder connection.
 * @param parcel The parcel to copy this bundle to.
 */
void writeToParcelInner(Parcel parcel,int flags){
  if (mParcelledData != null) {
    if (isEmptyParcel()) {
      parcel.writeInt(0);
    }
 else {
      int length=mParcelledData.dataSize();
      parcel.writeInt(length);
      parcel.writeInt(BUNDLE_MAGIC);
      parcel.appendFrom(mParcelledData,0,length);
    }
  }
 else {
    if (mMap == null || mMap.size() <= 0) {
      parcel.writeInt(0);
      return;
    }
    int lengthPos=parcel.dataPosition();
    parcel.writeInt(-1);
    parcel.writeInt(BUNDLE_MAGIC);
    int startPos=parcel.dataPosition();
    parcel.writeArrayMapInternal(mMap);
    int endPos=parcel.dataPosition();
    parcel.setDataPosition(lengthPos);
    int length=endPos - startPos;
    parcel.writeInt(length);
    parcel.setDataPosition(endPos);
  }
}

Fixed version (ground truth):
/** 
 * Writes the Bundle contents to a Parcel, typically in order for it to be passed through an IBinder connection.
 * @param parcel The parcel to copy this bundle to.
 */
void writeToParcelInner(Parcel parcel,int flags){
  final Parcel parcelledData;
synchronized (this) {
    parcelledData=mParcelledData;
  }
  if (parcelledData != null) {
    if (isEmptyParcel()) {
      parcel.writeInt(0);
    }
 else {
      int length=parcelledData.dataSize();
      parcel.writeInt(length);
      parcel.writeInt(BUNDLE_MAGIC);
      parcel.appendFrom(parcelledData,0,length);
    }
  }
 else {
    if (mMap == null || mMap.size() <= 0) {
      parcel.writeInt(0);
      return;
    }
    int lengthPos=parcel.dataPosition();
    parcel.writeInt(-1);
    parcel.writeInt(BUNDLE_MAGIC);
    int startPos=parcel.dataPosition();
    parcel.writeArrayMapInternal(mMap);
    int endPos=parcel.dataPosition();
    parcel.setDataPosition(lengthPos);
    int length=endPos - startPos;
    parcel.writeInt(length);
    parcel.setDataPosition(endPos);
  }
}
Program: 191754
Project: 191754
Buggy source:
@Override public void onAnimationEnd(Animator animation){
  if (mOnAnimationFinished != null) {
    mOnAnimationFinished.run();
    mOnAnimationFinished=null;
    mKeyguardFadingOutInProgress=false;
  }
  scrim.setTag(TAG_KEY_ANIM,null);
  scrim.setTag(TAG_KEY_ANIM_TARGET,null);
}

Fixed version (ground truth):
@Override public void onAnimationEnd(Animator animation){
  if (mOnAnimationFinished != null) {
    mOnAnimationFinished.run();
    mOnAnimationFinished=null;
  }
  mKeyguardFadingOutInProgress=false;
  scrim.setTag(TAG_KEY_ANIM,null);
  scrim.setTag(TAG_KEY_ANIM_TARGET,null);
}
Program: 191755
Project: 191755
Buggy source:
private void startScrimAnimation(final View scrim,float target){
  float current=getCurrentScrimAlpha(scrim);
  ValueAnimator anim=ValueAnimator.ofFloat(current,target);
  anim.addUpdateListener(new ValueAnimator.AnimatorUpdateListener(){
    @Override public void onAnimationUpdate(    ValueAnimator animation){
      float alpha=(float)animation.getAnimatedValue();
      setCurrentScrimAlpha(scrim,alpha);
      updateScrimColor(scrim);
    }
  }
);
  anim.setInterpolator(getInterpolator());
  anim.setStartDelay(mAnimationDelay);
  anim.setDuration(mDurationOverride != -1 ? mDurationOverride : ANIMATION_DURATION);
  anim.addListener(new AnimatorListenerAdapter(){
    @Override public void onAnimationEnd(    Animator animation){
      if (mOnAnimationFinished != null) {
        mOnAnimationFinished.run();
        mOnAnimationFinished=null;
        mKeyguardFadingOutInProgress=false;
      }
      scrim.setTag(TAG_KEY_ANIM,null);
      scrim.setTag(TAG_KEY_ANIM_TARGET,null);
    }
  }
);
  anim.start();
  if (mAnimateKeyguardFadingOut) {
    mKeyguardFadingOutInProgress=true;
  }
  if (mSkipFirstFrame) {
    anim.setCurrentPlayTime(16);
  }
  scrim.setTag(TAG_KEY_ANIM,anim);
  scrim.setTag(TAG_KEY_ANIM_TARGET,target);
}

Fixed version (ground truth):
private void startScrimAnimation(final View scrim,float target){
  float current=getCurrentScrimAlpha(scrim);
  ValueAnimator anim=ValueAnimator.ofFloat(current,target);
  anim.addUpdateListener(new ValueAnimator.AnimatorUpdateListener(){
    @Override public void onAnimationUpdate(    ValueAnimator animation){
      float alpha=(float)animation.getAnimatedValue();
      setCurrentScrimAlpha(scrim,alpha);
      updateScrimColor(scrim);
    }
  }
);
  anim.setInterpolator(getInterpolator());
  anim.setStartDelay(mAnimationDelay);
  anim.setDuration(mDurationOverride != -1 ? mDurationOverride : ANIMATION_DURATION);
  anim.addListener(new AnimatorListenerAdapter(){
    @Override public void onAnimationEnd(    Animator animation){
      if (mOnAnimationFinished != null) {
        mOnAnimationFinished.run();
        mOnAnimationFinished=null;
      }
      mKeyguardFadingOutInProgress=false;
      scrim.setTag(TAG_KEY_ANIM,null);
      scrim.setTag(TAG_KEY_ANIM_TARGET,null);
    }
  }
);
  anim.start();
  if (mAnimateKeyguardFadingOut) {
    mKeyguardFadingOutInProgress=true;
  }
  if (mSkipFirstFrame) {
    anim.setCurrentPlayTime(16);
  }
  scrim.setTag(TAG_KEY_ANIM,anim);
  scrim.setTag(TAG_KEY_ANIM_TARGET,target);
}
Program: 191756
Project: 191756
Buggy source:
private void endAnimateKeyguardFadingOut(boolean force){
  mAnimateKeyguardFadingOut=false;
  if ((force || (!isAnimating(mScrimInFront) && !isAnimating(mScrimBehind))) && mOnAnimationFinished != null) {
    mOnAnimationFinished.run();
    mOnAnimationFinished=null;
    mKeyguardFadingOutInProgress=false;
  }
}

Fixed version (ground truth):
private void endAnimateKeyguardFadingOut(boolean force){
  mAnimateKeyguardFadingOut=false;
  if (force || (!isAnimating(mScrimInFront) && !isAnimating(mScrimBehind))) {
    if (mOnAnimationFinished != null) {
      mOnAnimationFinished.run();
      mOnAnimationFinished=null;
    }
    mKeyguardFadingOutInProgress=false;
  }
}
Program: 191757
Project: 191757
Buggy source:
/** 
 * Set this notification to be pinned to the top if   {@link #isHeadsUp()} is true. By doing thisthe notification will be rendered on top of the screen.
 * @param pinned whether it is pinned
 */
public void setPinned(boolean pinned){
  mIsPinned=pinned;
  if (pinned) {
    setIconAnimationRunning(true);
    mExpandedWhenPinned=false;
  }
 else   if (mExpandedWhenPinned) {
    setUserExpanded(true);
  }
  setChronometerRunning(mLastChronometerRunning);
}

Fixed version (ground truth):
/** 
 * Set this notification to be pinned to the top if   {@link #isHeadsUp()} is true. By doing thisthe notification will be rendered on top of the screen.
 * @param pinned whether it is pinned
 */
public void setPinned(boolean pinned){
  int intrinsicHeight=getIntrinsicHeight();
  mIsPinned=pinned;
  if (intrinsicHeight != getIntrinsicHeight()) {
    notifyHeightChanged(false);
  }
  if (pinned) {
    setIconAnimationRunning(true);
    mExpandedWhenPinned=false;
  }
 else   if (mExpandedWhenPinned) {
    setUserExpanded(true);
  }
  setChronometerRunning(mLastChronometerRunning);
}
Program: 191759
Project: 191759
Buggy source:
protected void startExpandMotion(float newX,float newY,boolean startTracking,float expandedHeight){
  mInitialOffsetOnTouch=expandedHeight;
  mInitialTouchY=newY;
  mInitialTouchX=newX;
  if (startTracking) {
    mTouchSlopExceeded=true;
    onTrackingStarted();
  }
}

Fixed version (ground truth):
protected void startExpandMotion(float newX,float newY,boolean startTracking,float expandedHeight){
  mInitialOffsetOnTouch=expandedHeight;
  mInitialTouchY=newY;
  mInitialTouchX=newX;
  if (startTracking) {
    mTouchSlopExceeded=true;
    setExpandedHeight(mInitialOffsetOnTouch);
    onTrackingStarted();
  }
}
Program: 191761
Project: 191761
Buggy source:
public void removeAllChildren(){
  List<ExpandableNotificationRow> notificationChildren=mChildrenContainer.getNotificationChildren();
  ArrayList<ExpandableNotificationRow> clonedList=new ArrayList<>(notificationChildren);
  for (int i=0; i < clonedList.size(); i++) {
    ExpandableNotificationRow row=clonedList.get(i);
    mChildrenContainer.removeNotification(row);
    mHeaderUtil.restoreNotificationHeader(row);
    row.setIsChildInGroup(false,null);
  }
  onChildrenCountChanged();
}

Fixed version (ground truth):
public void removeAllChildren(){
  List<ExpandableNotificationRow> notificationChildren=mChildrenContainer.getNotificationChildren();
  ArrayList<ExpandableNotificationRow> clonedList=new ArrayList<>(notificationChildren);
  for (int i=0; i < clonedList.size(); i++) {
    ExpandableNotificationRow row=clonedList.get(i);
    if (row.keepInParent()) {
      continue;
    }
    mChildrenContainer.removeNotification(row);
    mHeaderUtil.restoreNotificationHeader(row);
    row.setIsChildInGroup(false,null);
  }
  onChildrenCountChanged();
}
Program: 191762
Project: 191762
Buggy source:
/** 
 * @return whether a given notification is a child in a group which has a summary
 */
public boolean isChildInGroupWithSummary(StatusBarNotification sbn){
  if (!isGroupChild(sbn)) {
    return false;
  }
  NotificationGroup group=mGroupMap.get(getGroupKey(sbn));
  if (group == null || group.summary == null || group.suppressed) {
    return false;
  }
  return true;
}

Fixed version (ground truth):
/** 
 * @return whether a given notification is a child in a group which has a summary
 */
public boolean isChildInGroupWithSummary(StatusBarNotification sbn){
  if (!isGroupChild(sbn)) {
    return false;
  }
  NotificationGroup group=mGroupMap.get(getGroupKey(sbn));
  if (group == null || group.summary == null || group.suppressed) {
    return false;
  }
  if (group.children.isEmpty()) {
    return false;
  }
  return true;
}
Program: 191763
Project: 191763
Buggy source:
private void removeNotificationChildren(){
  ArrayList<ExpandableNotificationRow> toRemove=new ArrayList<>();
  for (int i=0; i < mStackScroller.getChildCount(); i++) {
    View view=mStackScroller.getChildAt(i);
    if (!(view instanceof ExpandableNotificationRow)) {
      continue;
    }
    ExpandableNotificationRow parent=(ExpandableNotificationRow)view;
    List<ExpandableNotificationRow> children=parent.getNotificationChildren();
    List<ExpandableNotificationRow> orderedChildren=mTmpChildOrderMap.get(parent);
    if (children != null) {
      toRemove.clear();
      for (      ExpandableNotificationRow childRow : children) {
        if (orderedChildren == null || !orderedChildren.contains(childRow)) {
          toRemove.add(childRow);
        }
      }
      for (      ExpandableNotificationRow remove : toRemove) {
        parent.removeChildNotification(remove);
        if (mNotificationData.get(remove.getStatusBarNotification().getKey()) == null) {
          mStackScroller.notifyGroupChildRemoved(remove);
        }
      }
    }
  }
}

Fixed version (ground truth):
private void removeNotificationChildren(){
  ArrayList<ExpandableNotificationRow> toRemove=new ArrayList<>();
  for (int i=0; i < mStackScroller.getChildCount(); i++) {
    View view=mStackScroller.getChildAt(i);
    if (!(view instanceof ExpandableNotificationRow)) {
      continue;
    }
    ExpandableNotificationRow parent=(ExpandableNotificationRow)view;
    List<ExpandableNotificationRow> children=parent.getNotificationChildren();
    List<ExpandableNotificationRow> orderedChildren=mTmpChildOrderMap.get(parent);
    if (children != null) {
      toRemove.clear();
      for (      ExpandableNotificationRow childRow : children) {
        if ((orderedChildren == null || !orderedChildren.contains(childRow)) && !childRow.keepInParent()) {
          toRemove.add(childRow);
        }
      }
      for (      ExpandableNotificationRow remove : toRemove) {
        parent.removeChildNotification(remove);
        if (mNotificationData.get(remove.getStatusBarNotification().getKey()) == null) {
          mStackScroller.notifyGroupChildRemoved(remove);
        }
      }
    }
  }
}
Program: 191765
Project: 191765
Buggy source:
private void performDismiss(View v){
  if (v instanceof ExpandableNotificationRow) {
    ExpandableNotificationRow row=(ExpandableNotificationRow)v;
    if (mGroupManager.isOnlyChildInSuppressedGroup(row.getStatusBarNotification())) {
      ExpandableNotificationRow groupSummary=mGroupManager.getLogicalGroupSummary(row.getStatusBarNotification());
      if (groupSummary.isClearable()) {
        performDismiss(groupSummary);
      }
    }
  }
  final View veto=v.findViewById(R.id.veto);
  if (veto != null && veto.getVisibility() != View.GONE) {
    veto.performClick();
  }
  if (DEBUG)   Log.v(TAG,"String_Node_Str" + v);
}

Fixed version (ground truth):
private void performDismiss(View v){
  if (v instanceof ExpandableNotificationRow) {
    ExpandableNotificationRow row=(ExpandableNotificationRow)v;
    if (mGroupManager.isOnlyChildInSuppressedGroup(row.getStatusBarNotification())) {
      ExpandableNotificationRow groupSummary=mGroupManager.getLogicalGroupSummary(row.getStatusBarNotification());
      if (groupSummary.isClearable()) {
        performDismiss(groupSummary);
      }
    }
    row.setDismissed(true);
  }
  final View veto=v.findViewById(R.id.veto);
  if (veto != null && veto.getVisibility() != View.GONE) {
    veto.performClick();
  }
  if (DEBUG)   Log.v(TAG,"String_Node_Str" + v);
}
Program: 191766
Project: 191766
Buggy source:
/** 
 * Cancels a notification ONLY if it has all of the   {@code mustHaveFlags}and none of the   {@code mustNotHaveFlags}.
 */
void cancelNotification(final int callingUid,final int callingPid,final String pkg,final String tag,final int id,final int mustHaveFlags,final int mustNotHaveFlags,final boolean sendDelete,final int userId,final int reason,final ManagedServiceInfo listener){
  mHandler.post(new Runnable(){
    @Override public void run(){
      String listenerName=listener == null ? null : listener.component.toShortString();
      if (DBG)       EventLogTags.writeNotificationCancel(callingUid,callingPid,pkg,id,tag,userId,mustHaveFlags,mustNotHaveFlags,reason,listenerName);
synchronized (mNotificationList) {
        int index=indexOfNotificationLocked(pkg,tag,id,userId);
        if (index >= 0) {
          NotificationRecord r=mNotificationList.get(index);
          if (reason == REASON_DELEGATE_CLICK) {
            mUsageStats.registerClickedByUser(r);
          }
          if ((r.getNotification().flags & mustHaveFlags) != mustHaveFlags) {
            return;
          }
          if ((r.getNotification().flags & mustNotHaveFlags) != 0) {
            return;
          }
          mNotificationList.remove(index);
          cancelGroupChildrenLocked(r,callingUid,callingPid,listenerName,REASON_GROUP_SUMMARY_CANCELED);
          cancelNotificationLocked(r,sendDelete,reason);
          updateLightsLocked();
        }
      }
    }
  }
);
}

Fixed version (ground truth):
/** 
 * Cancels a notification ONLY if it has all of the   {@code mustHaveFlags}and none of the   {@code mustNotHaveFlags}.
 */
void cancelNotification(final int callingUid,final int callingPid,final String pkg,final String tag,final int id,final int mustHaveFlags,final int mustNotHaveFlags,final boolean sendDelete,final int userId,final int reason,final ManagedServiceInfo listener){
  mHandler.post(new Runnable(){
    @Override public void run(){
      String listenerName=listener == null ? null : listener.component.toShortString();
      if (DBG)       EventLogTags.writeNotificationCancel(callingUid,callingPid,pkg,id,tag,userId,mustHaveFlags,mustNotHaveFlags,reason,listenerName);
synchronized (mNotificationList) {
        int index=indexOfNotificationLocked(pkg,tag,id,userId);
        if (index >= 0) {
          NotificationRecord r=mNotificationList.get(index);
          if (reason == REASON_DELEGATE_CLICK) {
            mUsageStats.registerClickedByUser(r);
          }
          if ((r.getNotification().flags & mustHaveFlags) != mustHaveFlags) {
            return;
          }
          if ((r.getNotification().flags & mustNotHaveFlags) != 0) {
            return;
          }
          mNotificationList.remove(index);
          cancelNotificationLocked(r,sendDelete,reason);
          cancelGroupChildrenLocked(r,callingUid,callingPid,listenerName,REASON_GROUP_SUMMARY_CANCELED);
          updateLightsLocked();
        }
      }
    }
  }
);
}
Program: 191767
Project: 191767
Buggy source:
/** 
 * Constructs a Bundle containing a copy of the mappings from the given Bundle.
 * @param b a Bundle to be copied.
 */
BaseBundle(BaseBundle b){
  if (b.mParcelledData != null) {
    if (b.isEmptyParcel()) {
      mParcelledData=NoImagePreloadHolder.EMPTY_PARCEL;
    }
 else {
      mParcelledData=Parcel.obtain();
      mParcelledData.appendFrom(b.mParcelledData,0,b.mParcelledData.dataSize());
      mParcelledData.setDataPosition(0);
    }
  }
 else {
    mParcelledData=null;
  }
  if (b.mMap != null) {
    mMap=new ArrayMap<String,Object>(b.mMap);
  }
 else {
    mMap=null;
  }
  mClassLoader=b.mClassLoader;
}

Fixed version (ground truth):
/** 
 * Constructs a Bundle containing a copy of the mappings from the given Bundle.
 * @param b a Bundle to be copied.
 */
BaseBundle(BaseBundle b){
  if (b.mParcelledData != null) {
    if (b.isEmptyParcel()) {
      mParcelledData=NoImagePreloadHolder.EMPTY_PARCEL;
    }
 else {
      mParcelledData=Parcel.obtain();
      mParcelledData.appendFrom(b.mParcelledData,0,b.mParcelledData.dataSize());
      mParcelledData.setDataPosition(0);
    }
  }
 else {
    mParcelledData=null;
  }
  if (b.mMap != null) {
    mMap=new ArrayMap<>(b.mMap);
  }
 else {
    mMap=null;
  }
  mClassLoader=b.mClassLoader;
}
Program: 191768
Project: 191768
Buggy source:
/** 
 * Writes the Bundle contents to a Parcel, typically in order for it to be passed through an IBinder connection.
 * @param parcel The parcel to copy this bundle to.
 */
void writeToParcelInner(Parcel parcel,int flags){
  if (mParcelledData != null) {
    if (isEmptyParcel()) {
      parcel.writeInt(0);
    }
 else {
      int length=mParcelledData.dataSize();
      parcel.writeInt(length);
      parcel.writeInt(BUNDLE_MAGIC);
      parcel.appendFrom(mParcelledData,0,length);
    }
  }
 else {
    if (mMap == null || mMap.size() <= 0) {
      parcel.writeInt(0);
      return;
    }
    int lengthPos=parcel.dataPosition();
    parcel.writeInt(-1);
    parcel.writeInt(BUNDLE_MAGIC);
    int startPos=parcel.dataPosition();
    parcel.writeArrayMapInternal(mMap);
    int endPos=parcel.dataPosition();
    parcel.setDataPosition(lengthPos);
    int length=endPos - startPos;
    parcel.writeInt(length);
    parcel.setDataPosition(endPos);
  }
}

Fixed version (ground truth):
/** 
 * Writes the Bundle contents to a Parcel, typically in order for it to be passed through an IBinder connection.
 * @param parcel The parcel to copy this bundle to.
 */
void writeToParcelInner(Parcel parcel,int flags){
  final Parcel parcelledData;
synchronized (this) {
    parcelledData=mParcelledData;
  }
  if (parcelledData != null) {
    if (isEmptyParcel()) {
      parcel.writeInt(0);
    }
 else {
      int length=parcelledData.dataSize();
      parcel.writeInt(length);
      parcel.writeInt(BUNDLE_MAGIC);
      parcel.appendFrom(parcelledData,0,length);
    }
  }
 else {
    if (mMap == null || mMap.size() <= 0) {
      parcel.writeInt(0);
      return;
    }
    int lengthPos=parcel.dataPosition();
    parcel.writeInt(-1);
    parcel.writeInt(BUNDLE_MAGIC);
    int startPos=parcel.dataPosition();
    parcel.writeArrayMapInternal(mMap);
    int endPos=parcel.dataPosition();
    parcel.setDataPosition(lengthPos);
    int length=endPos - startPos;
    parcel.writeInt(length);
    parcel.setDataPosition(endPos);
  }
}
Program: 191770
Project: 191770
Buggy source:
/** 
 * If non-null, returns only shortcuts associated with the activity.
 */
public void setActivity(@Nullable ComponentName activity){
  mActivity=activity;
}

Fixed version (ground truth):
/** 
 * If non-null, returns only shortcuts associated with the activity, which are  {@link ShortcutInfo}s that have null   {@link ShortcutInfo#getActivityComponent()}, or  {@link ShortcutInfo#getActivityComponent()} equals to {@code activity}.
 */
public void setActivity(@Nullable ComponentName activity){
  mActivity=activity;
}
Program: 191771
Project: 191771
Buggy source:
private void notifyListeners(@NonNull String packageName,@UserIdInt int userId){
  if (!mUserManager.isUserRunning(userId)) {
    return;
  }
  postToHandler(() -> {
    final ArrayList<ShortcutChangeListener> copy;
synchronized (mLock) {
      copy=new ArrayList<>(mListeners);
    }
    for (int i=copy.size() - 1; i >= 0; i--) {
      copy.get(i).onShortcutChanged(packageName,userId);
    }
  }
);
}

Fixed version (ground truth):
private void notifyListeners(@NonNull String packageName,@UserIdInt int userId){
  final long token=injectClearCallingIdentity();
  try {
    if (!mUserManager.isUserRunning(userId)) {
      return;
    }
  }
  finally {
    injectRestoreCallingIdentity(token);
  }
  postToHandler(() -> {
    final ArrayList<ShortcutChangeListener> copy;
synchronized (mLock) {
      copy=new ArrayList<>(mListeners);
    }
    for (int i=copy.size() - 1; i >= 0; i--) {
      copy.get(i).onShortcutChanged(packageName,userId);
    }
  }
);
}
Program: 191772
Project: 191772
Buggy source:
private void getShortcutsInnerLocked(int launcherUserId,@NonNull String callingPackage,@Nullable String packageName,@Nullable List<String> shortcutIds,long changedSince,@Nullable ComponentName componentName,int queryFlags,int userId,ArrayList<ShortcutInfo> ret,int cloneFlag){
  final ArraySet<String> ids=shortcutIds == null ? null : new ArraySet<>(shortcutIds);
  getPackageShortcutsLocked(packageName,userId).findAll(ShortcutService.this,ret,(  ShortcutInfo si) -> {
    if (si.getLastChangedTimestamp() < changedSince) {
      return false;
    }
    if (ids != null && !ids.contains(si.getId())) {
      return false;
    }
    if (componentName != null && !componentName.equals(si.getActivityComponent())) {
      return false;
    }
    final boolean matchDynamic=((queryFlags & ShortcutQuery.FLAG_GET_DYNAMIC) != 0) && si.isDynamic();
    final boolean matchPinned=((queryFlags & ShortcutQuery.FLAG_GET_PINNED) != 0) && si.isPinned();
    return matchDynamic || matchPinned;
  }
,cloneFlag,callingPackage,launcherUserId);
}

Fixed version (ground truth):
private void getShortcutsInnerLocked(int launcherUserId,@NonNull String callingPackage,@Nullable String packageName,@Nullable List<String> shortcutIds,long changedSince,@Nullable ComponentName componentName,int queryFlags,int userId,ArrayList<ShortcutInfo> ret,int cloneFlag){
  final ArraySet<String> ids=shortcutIds == null ? null : new ArraySet<>(shortcutIds);
  getPackageShortcutsLocked(packageName,userId).findAll(ShortcutService.this,ret,(  ShortcutInfo si) -> {
    if (si.getLastChangedTimestamp() < changedSince) {
      return false;
    }
    if (ids != null && !ids.contains(si.getId())) {
      return false;
    }
    if (componentName != null) {
      if (si.getActivityComponent() != null && !si.getActivityComponent().equals(componentName)) {
        return false;
      }
    }
    final boolean matchDynamic=((queryFlags & ShortcutQuery.FLAG_GET_DYNAMIC) != 0) && si.isDynamic();
    final boolean matchPinned=((queryFlags & ShortcutQuery.FLAG_GET_PINNED) != 0) && si.isPinned();
    return matchDynamic || matchPinned;
  }
,cloneFlag,callingPackage,launcherUserId);
}
Program: 191777
Project: 191777
Buggy source:
/** 
 * Constructs a Bundle containing a copy of the mappings from the given Bundle.
 * @param b a Bundle to be copied.
 */
BaseBundle(BaseBundle b){
  if (b.mParcelledData != null) {
    if (b.isEmptyParcel()) {
      mParcelledData=NoImagePreloadHolder.EMPTY_PARCEL;
    }
 else {
      mParcelledData=Parcel.obtain();
      mParcelledData.appendFrom(b.mParcelledData,0,b.mParcelledData.dataSize());
      mParcelledData.setDataPosition(0);
    }
  }
 else {
    mParcelledData=null;
  }
  if (b.mMap != null) {
    mMap=new ArrayMap<String,Object>(b.mMap);
  }
 else {
    mMap=null;
  }
  mClassLoader=b.mClassLoader;
}

Fixed version (ground truth):
/** 
 * Constructs a Bundle containing a copy of the mappings from the given Bundle.
 * @param b a Bundle to be copied.
 */
BaseBundle(BaseBundle b){
  if (b.mParcelledData != null) {
    if (b.isEmptyParcel()) {
      mParcelledData=NoImagePreloadHolder.EMPTY_PARCEL;
    }
 else {
      mParcelledData=Parcel.obtain();
      mParcelledData.appendFrom(b.mParcelledData,0,b.mParcelledData.dataSize());
      mParcelledData.setDataPosition(0);
    }
  }
 else {
    mParcelledData=null;
  }
  if (b.mMap != null) {
    mMap=new ArrayMap<>(b.mMap);
  }
 else {
    mMap=null;
  }
  mClassLoader=b.mClassLoader;
}
Program: 191778
Project: 191778
Buggy source:
/** 
 * Writes the Bundle contents to a Parcel, typically in order for it to be passed through an IBinder connection.
 * @param parcel The parcel to copy this bundle to.
 */
void writeToParcelInner(Parcel parcel,int flags){
  if (mParcelledData != null) {
    if (isEmptyParcel()) {
      parcel.writeInt(0);
    }
 else {
      int length=mParcelledData.dataSize();
      parcel.writeInt(length);
      parcel.writeInt(BUNDLE_MAGIC);
      parcel.appendFrom(mParcelledData,0,length);
    }
  }
 else {
    if (mMap == null || mMap.size() <= 0) {
      parcel.writeInt(0);
      return;
    }
    int lengthPos=parcel.dataPosition();
    parcel.writeInt(-1);
    parcel.writeInt(BUNDLE_MAGIC);
    int startPos=parcel.dataPosition();
    parcel.writeArrayMapInternal(mMap);
    int endPos=parcel.dataPosition();
    parcel.setDataPosition(lengthPos);
    int length=endPos - startPos;
    parcel.writeInt(length);
    parcel.setDataPosition(endPos);
  }
}

Fixed version (ground truth):
/** 
 * Writes the Bundle contents to a Parcel, typically in order for it to be passed through an IBinder connection.
 * @param parcel The parcel to copy this bundle to.
 */
void writeToParcelInner(Parcel parcel,int flags){
  final Parcel parcelledData;
synchronized (this) {
    parcelledData=mParcelledData;
  }
  if (parcelledData != null) {
    if (isEmptyParcel()) {
      parcel.writeInt(0);
    }
 else {
      int length=parcelledData.dataSize();
      parcel.writeInt(length);
      parcel.writeInt(BUNDLE_MAGIC);
      parcel.appendFrom(parcelledData,0,length);
    }
  }
 else {
    if (mMap == null || mMap.size() <= 0) {
      parcel.writeInt(0);
      return;
    }
    int lengthPos=parcel.dataPosition();
    parcel.writeInt(-1);
    parcel.writeInt(BUNDLE_MAGIC);
    int startPos=parcel.dataPosition();
    parcel.writeArrayMapInternal(mMap);
    int endPos=parcel.dataPosition();
    parcel.setDataPosition(lengthPos);
    int length=endPos - startPos;
    parcel.writeInt(length);
    parcel.setDataPosition(endPos);
  }
}
Program: 191780
Project: 191780
Buggy source:
/** 
 * If non-null, returns only shortcuts associated with the activity.
 */
public void setActivity(@Nullable ComponentName activity){
  mActivity=activity;
}

Fixed version (ground truth):
/** 
 * If non-null, returns only shortcuts associated with the activity, which are  {@link ShortcutInfo}s that have null   {@link ShortcutInfo#getActivityComponent()}, or  {@link ShortcutInfo#getActivityComponent()} equals to {@code activity}.
 */
public void setActivity(@Nullable ComponentName activity){
  mActivity=activity;
}
Program: 191781
Project: 191781
Buggy source:
private void notifyListeners(@NonNull String packageName,@UserIdInt int userId){
  if (!mUserManager.isUserRunning(userId)) {
    return;
  }
  postToHandler(() -> {
    final ArrayList<ShortcutChangeListener> copy;
synchronized (mLock) {
      copy=new ArrayList<>(mListeners);
    }
    for (int i=copy.size() - 1; i >= 0; i--) {
      copy.get(i).onShortcutChanged(packageName,userId);
    }
  }
);
}

Fixed version (ground truth):
private void notifyListeners(@NonNull String packageName,@UserIdInt int userId){
  final long token=injectClearCallingIdentity();
  try {
    if (!mUserManager.isUserRunning(userId)) {
      return;
    }
  }
  finally {
    injectRestoreCallingIdentity(token);
  }
  postToHandler(() -> {
    final ArrayList<ShortcutChangeListener> copy;
synchronized (mLock) {
      copy=new ArrayList<>(mListeners);
    }
    for (int i=copy.size() - 1; i >= 0; i--) {
      copy.get(i).onShortcutChanged(packageName,userId);
    }
  }
);
}
Program: 191782
Project: 191782
Buggy source:
private void getShortcutsInnerLocked(int launcherUserId,@NonNull String callingPackage,@Nullable String packageName,@Nullable List<String> shortcutIds,long changedSince,@Nullable ComponentName componentName,int queryFlags,int userId,ArrayList<ShortcutInfo> ret,int cloneFlag){
  final ArraySet<String> ids=shortcutIds == null ? null : new ArraySet<>(shortcutIds);
  getPackageShortcutsLocked(packageName,userId).findAll(ShortcutService.this,ret,(  ShortcutInfo si) -> {
    if (si.getLastChangedTimestamp() < changedSince) {
      return false;
    }
    if (ids != null && !ids.contains(si.getId())) {
      return false;
    }
    if (componentName != null && !componentName.equals(si.getActivityComponent())) {
      return false;
    }
    final boolean matchDynamic=((queryFlags & ShortcutQuery.FLAG_GET_DYNAMIC) != 0) && si.isDynamic();
    final boolean matchPinned=((queryFlags & ShortcutQuery.FLAG_GET_PINNED) != 0) && si.isPinned();
    return matchDynamic || matchPinned;
  }
,cloneFlag,callingPackage,launcherUserId);
}

Fixed version (ground truth):
private void getShortcutsInnerLocked(int launcherUserId,@NonNull String callingPackage,@Nullable String packageName,@Nullable List<String> shortcutIds,long changedSince,@Nullable ComponentName componentName,int queryFlags,int userId,ArrayList<ShortcutInfo> ret,int cloneFlag){
  final ArraySet<String> ids=shortcutIds == null ? null : new ArraySet<>(shortcutIds);
  getPackageShortcutsLocked(packageName,userId).findAll(ShortcutService.this,ret,(  ShortcutInfo si) -> {
    if (si.getLastChangedTimestamp() < changedSince) {
      return false;
    }
    if (ids != null && !ids.contains(si.getId())) {
      return false;
    }
    if (componentName != null) {
      if (si.getActivityComponent() != null && !si.getActivityComponent().equals(componentName)) {
        return false;
      }
    }
    final boolean matchDynamic=((queryFlags & ShortcutQuery.FLAG_GET_DYNAMIC) != 0) && si.isDynamic();
    final boolean matchPinned=((queryFlags & ShortcutQuery.FLAG_GET_PINNED) != 0) && si.isPinned();
    return matchDynamic || matchPinned;
  }
,cloneFlag,callingPackage,launcherUserId);
}
Program: 191787
Project: 191787
Buggy source:
/** 
 * Callback for when a job is completed.
 * @param needsReschedule Whether the implementing class should reschedule this job.
 */
public void onJobCompleted(JobStatus jobStatus,boolean needsReschedule);

Fixed version (ground truth):
/** 
 * Callback for when a job is completed.
 * @param needsReschedule Whether the implementing class should reschedule this job.
 */
void onJobCompleted(JobStatus jobStatus,boolean needsReschedule);
Program: 191788
Project: 191788
Buggy source:
public void noteInactive(JobStatus job){
  final long now=SystemClock.uptimeMillis();
  if (job.lastEvaluatedPriority >= JobInfo.PRIORITY_TOP_APP) {
    mCurDataSet.decActiveTop(job.getSourceUid(),job.getSourcePackageName(),now);
  }
 else {
    mCurDataSet.decActive(job.getSourceUid(),job.getSourcePackageName(),now);
  }
  rebatchIfNeeded(now);
}

Fixed version (ground truth):
public void noteInactive(JobStatus job){
  final long now=SystemClock.uptimeMillis();
  if (job.lastEvaluatedPriority >= JobInfo.PRIORITY_TOP_APP) {
    mCurDataSet.decActiveTop(job.getSourceUid(),job.getSourcePackageName(),now);
  }
 else {
    mCurDataSet.decActive(job.getSourceUid(),job.getSourcePackageName(),now);
  }
  rebatchIfNeeded(now);
  addEvent(EVENT_STOP_JOB,job.getSourceUid(),job.getBatteryName());
}
Program: 191789
Project: 191789
Buggy source:
public void noteActive(JobStatus job){
  final long now=SystemClock.uptimeMillis();
  rebatchIfNeeded(now);
  if (job.lastEvaluatedPriority >= JobInfo.PRIORITY_TOP_APP) {
    mCurDataSet.incActiveTop(job.getSourceUid(),job.getSourcePackageName(),now);
  }
 else {
    mCurDataSet.incActive(job.getSourceUid(),job.getSourcePackageName(),now);
  }
}

Fixed version (ground truth):
public void noteActive(JobStatus job){
  final long now=SystemClock.uptimeMillis();
  rebatchIfNeeded(now);
  if (job.lastEvaluatedPriority >= JobInfo.PRIORITY_TOP_APP) {
    mCurDataSet.incActiveTop(job.getSourceUid(),job.getSourcePackageName(),now);
  }
 else {
    mCurDataSet.incActive(job.getSourceUid(),job.getSourcePackageName(),now);
  }
  addEvent(EVENT_START_JOB,job.getSourceUid(),job.getBatteryName());
}
Program: 191790
Project: 191790
Buggy source:
public void dump(PrintWriter pw,String prefix){
  final long now=SystemClock.uptimeMillis();
  final long nowEllapsed=SystemClock.elapsedRealtime();
  final DataSet total;
  if (mLastDataSets[0] != null) {
    total=new DataSet(mLastDataSets[0]);
    mLastDataSets[0].addTo(total,now);
  }
 else {
    total=new DataSet(mCurDataSet);
  }
  mCurDataSet.addTo(total,now);
  for (int i=1; i < mLastDataSets.length; i++) {
    if (mLastDataSets[i] != null) {
      mLastDataSets[i].dump(pw,"String_Node_Str",prefix,now,nowEllapsed);
      pw.println();
    }
  }
  total.dump(pw,"String_Node_Str",prefix,now,nowEllapsed);
}

Fixed version (ground truth):
public void dump(PrintWriter pw,String prefix,int filterUid){
  final long now=SystemClock.uptimeMillis();
  final long nowEllapsed=SystemClock.elapsedRealtime();
  final DataSet total;
  if (mLastDataSets[0] != null) {
    total=new DataSet(mLastDataSets[0]);
    mLastDataSets[0].addTo(total,now);
  }
 else {
    total=new DataSet(mCurDataSet);
  }
  mCurDataSet.addTo(total,now);
  for (int i=1; i < mLastDataSets.length; i++) {
    if (mLastDataSets[i] != null) {
      mLastDataSets[i].dump(pw,"String_Node_Str",prefix,now,nowEllapsed,filterUid);
      pw.println();
    }
  }
  total.dump(pw,"String_Node_Str",prefix,now,nowEllapsed,filterUid);
}
Program: 191792
Project: 191792
Buggy source:
@Override public void process(JobStatus job){
  pw.print("String_Node_Str");
  pw.print(index++);
  pw.print("String_Node_Str");
  pw.println(job.toShortString());
  if (filterUidFinal != -1 && job.getUid() != filterUidFinal && job.getSourceUid() != filterUidFinal) {
    return;
  }
  job.dump(pw,"String_Node_Str",true);
  pw.print("String_Node_Str");
  pw.print(mHandler.isReadyToBeExecutedLocked(job));
  pw.print("String_Node_Str");
  pw.print(job.isReady());
  pw.print("String_Node_Str");
  pw.print(mPendingJobs.contains(job));
  pw.print("String_Node_Str");
  pw.print(isCurrentlyActiveLocked(job));
  pw.print("String_Node_Str");
  pw.print(ArrayUtils.contains(mStartedUsers,job.getUserId()));
  pw.println("String_Node_Str");
}

Fixed version (ground truth):
@Override public void process(JobStatus job){
  pw.print("String_Node_Str");
  pw.print(index++);
  pw.print("String_Node_Str");
  pw.println(job.toShortString());
  if (!job.shouldDump(filterUidFinal)) {
    return;
  }
  job.dump(pw,"String_Node_Str",true);
  pw.print("String_Node_Str");
  pw.print(mHandler.isReadyToBeExecutedLocked(job));
  pw.print("String_Node_Str");
  pw.print(job.isReady());
  pw.print("String_Node_Str");
  pw.print(mPendingJobs.contains(job));
  pw.print("String_Node_Str");
  pw.print(isCurrentlyActiveLocked(job));
  pw.print("String_Node_Str");
  pw.print(ArrayUtils.contains(mStartedUsers,job.getUserId()));
  pw.println("String_Node_Str");
}
Program: 191793
Project: 191793
Buggy source:
@Override public void process(JobStatus jobStatus){
  pw.print("String_Node_Str");
  pw.print(jobStatus.getSourcePackageName());
  pw.print("String_Node_Str");
  pw.println((jobStatus.satisfiedConstraints & JobStatus.CONSTRAINT_APP_NOT_IDLE) != 0);
}

Fixed version (ground truth):
@Override public void process(JobStatus jobStatus){
  if (!jobStatus.shouldDump(filterUid)) {
    return;
  }
  pw.print("String_Node_Str");
  pw.print(jobStatus.getSourcePackageName());
  pw.print("String_Node_Str");
  pw.println((jobStatus.satisfiedConstraints & JobStatus.CONSTRAINT_APP_NOT_IDLE) != 0);
}
Program: 191794
Project: 191794
Buggy source:
@Override public void dumpControllerStateLocked(final PrintWriter pw){
  pw.println("String_Node_Str");
  pw.println("String_Node_Str" + mAppIdleParoleOn);
  mJobSchedulerService.getJobStore().forEachJob(new JobStore.JobStatusFunctor(){
    @Override public void process(    JobStatus jobStatus){
      pw.print("String_Node_Str");
      pw.print(jobStatus.getSourcePackageName());
      pw.print("String_Node_Str");
      pw.println((jobStatus.satisfiedConstraints & JobStatus.CONSTRAINT_APP_NOT_IDLE) != 0);
    }
  }
);
  pw.println();
}

Fixed version (ground truth):
@Override public void dumpControllerStateLocked(final PrintWriter pw,final int filterUid){
  pw.println("String_Node_Str");
  pw.println("String_Node_Str" + mAppIdleParoleOn);
  mJobSchedulerService.getJobStore().forEachJob(new JobStore.JobStatusFunctor(){
    @Override public void process(    JobStatus jobStatus){
      if (!jobStatus.shouldDump(filterUid)) {
        return;
      }
      pw.print("String_Node_Str");
      pw.print(jobStatus.getSourcePackageName());
      pw.print("String_Node_Str");
      pw.println((jobStatus.satisfiedConstraints & JobStatus.CONSTRAINT_APP_NOT_IDLE) != 0);
    }
  }
);
  pw.println();
}
Program: 191795
Project: 191795
Buggy source:
@Override public void dumpControllerStateLocked(PrintWriter pw){
  pw.println("String_Node_Str");
  pw.println("String_Node_Str" + mChargeTracker.isOnStablePower());
  Iterator<JobStatus> it=mTrackedTasks.iterator();
  if (it.hasNext()) {
    pw.print(String.valueOf(it.next().hashCode()));
  }
  while (it.hasNext()) {
    pw.print("String_Node_Str" + String.valueOf(it.next().hashCode()));
  }
  pw.println();
}

Fixed version (ground truth):
@Override public void dumpControllerStateLocked(PrintWriter pw,int filterUid){
  pw.println("String_Node_Str");
  pw.println("String_Node_Str" + mChargeTracker.isOnStablePower());
  Iterator<JobStatus> it=mTrackedTasks.iterator();
  if (it.hasNext()) {
    JobStatus jobStatus=it.next();
    if (jobStatus.shouldDump(filterUid)) {
      pw.print(String.valueOf(jobStatus.hashCode()));
    }
  }
  while (it.hasNext()) {
    JobStatus jobStatus=it.next();
    if (jobStatus.shouldDump(filterUid)) {
      pw.print("String_Node_Str" + String.valueOf(jobStatus.hashCode()));
    }
  }
  pw.println();
}