nus-yam/ex-repair huggingface dataset:
Program: 195406
Project: 195406
Buggy source:
private List<ResolveInfo> filterCandidatesWithDomainPreferedActivitiesLPr(List<ResolveInfo> candidates){
  if (DEBUG_PREFERRED) {
    Slog.v("String_Node_Str","String_Node_Str" + candidates.size());
  }
  final int userId=UserHandle.getCallingUserId();
  ArrayList<ResolveInfo> result=new ArrayList<ResolveInfo>();
  ArrayList<ResolveInfo> neverList=new ArrayList<ResolveInfo>();
  ArrayList<ResolveInfo> matchAllList=new ArrayList<ResolveInfo>();
synchronized (mPackages) {
    final int count=candidates.size();
    for (int n=0; n < count; n++) {
      ResolveInfo info=candidates.get(n);
      String packageName=info.activityInfo.packageName;
      PackageSetting ps=mSettings.mPackages.get(packageName);
      if (ps != null) {
        int status=getDomainVerificationStatusLPr(ps,userId);
        if (status == INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_ALWAYS) {
          result.add(info);
        }
 else         if (status == INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_NEVER) {
          neverList.add(info);
        }
        if (info.handleAllWebDataURI) {
          matchAllList.add(info);
        }
      }
    }
    if (result.size() == 0) {
      result.addAll(candidates);
    }
    result.removeAll(neverList);
    result.removeAll(matchAllList);
    if (result.size() == 0) {
      result.addAll(matchAllList);
    }
  }
  if (DEBUG_PREFERRED) {
    Slog.v("String_Node_Str","String_Node_Str" + result.size());
  }
  return result;
}

Fixed version (ground truth):
private List<ResolveInfo> filterCandidatesWithDomainPreferedActivitiesLPr(List<ResolveInfo> candidates){
  if (DEBUG_PREFERRED) {
    Slog.v("String_Node_Str","String_Node_Str" + candidates.size());
  }
  final int userId=UserHandle.getCallingUserId();
  ArrayList<ResolveInfo> result=new ArrayList<ResolveInfo>();
  ArrayList<ResolveInfo> neverList=new ArrayList<ResolveInfo>();
  ArrayList<ResolveInfo> matchAllList=new ArrayList<ResolveInfo>();
synchronized (mPackages) {
    final int count=candidates.size();
    for (int n=0; n < count; n++) {
      ResolveInfo info=candidates.get(n);
      String packageName=info.activityInfo.packageName;
      PackageSetting ps=mSettings.mPackages.get(packageName);
      if (ps != null) {
        int status=getDomainVerificationStatusLPr(ps,userId);
        if (status == INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_ALWAYS || status == INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_UNDEFINED) {
          result.add(info);
        }
 else         if (status == INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_NEVER) {
          neverList.add(info);
        }
        if (info.handleAllWebDataURI) {
          matchAllList.add(info);
        }
      }
    }
    if (result.size() == 0) {
      result.addAll(candidates);
    }
    result.removeAll(neverList);
    result.removeAll(matchAllList);
    if (result.size() == 0) {
      result.addAll(matchAllList);
    }
  }
  if (DEBUG_PREFERRED) {
    Slog.v("String_Node_Str","String_Node_Str" + result.size());
  }
  return result;
}
Program: 195407
Project: 195407
Buggy source:
@Override protected void onDetachedFromWindow(){
  if (mIndeterminate) {
    stopAnimation();
  }
  if (mRefreshProgressRunnable != null) {
    removeCallbacks(mRefreshProgressRunnable);
  }
  if (mRefreshProgressRunnable != null && mRefreshIsPosted) {
    removeCallbacks(mRefreshProgressRunnable);
  }
  if (mAccessibilityEventSender != null) {
    removeCallbacks(mAccessibilityEventSender);
  }
  super.onDetachedFromWindow();
  mAttached=false;
}

Fixed version (ground truth):
@Override protected void onDetachedFromWindow(){
  if (mIndeterminate) {
    stopAnimation();
  }
  if (mRefreshProgressRunnable != null) {
    removeCallbacks(mRefreshProgressRunnable);
    mRefreshIsPosted=false;
  }
  if (mAccessibilityEventSender != null) {
    removeCallbacks(mAccessibilityEventSender);
  }
  super.onDetachedFromWindow();
  mAttached=false;
}
Program: 195408
Project: 195408
Buggy source:
@Override protected void onDetachedFromWindow(){
  if (mIndeterminate) {
    stopAnimation();
  }
  if (mRefreshProgressRunnable != null) {
    removeCallbacks(mRefreshProgressRunnable);
  }
  if (mRefreshProgressRunnable != null && mRefreshIsPosted) {
    removeCallbacks(mRefreshProgressRunnable);
  }
  if (mAccessibilityEventSender != null) {
    removeCallbacks(mAccessibilityEventSender);
  }
  super.onDetachedFromWindow();
  mAttached=false;
}

Fixed version (ground truth):
@Override protected void onDetachedFromWindow(){
  if (mIndeterminate) {
    stopAnimation();
  }
  if (mRefreshProgressRunnable != null) {
    removeCallbacks(mRefreshProgressRunnable);
    mRefreshIsPosted=false;
  }
  if (mAccessibilityEventSender != null) {
    removeCallbacks(mAccessibilityEventSender);
  }
  super.onDetachedFromWindow();
  mAttached=false;
}
Program: 195409
Project: 195409
Buggy source:
@Override public void release(){
synchronized (mService) {
    if (mContainerState == CONTAINER_STATE_FINISHING) {
      return;
    }
    mContainerState=CONTAINER_STATE_FINISHING;
    final Message msg=mHandler.obtainMessage(CONTAINER_TASK_LIST_EMPTY_TIMEOUT,this);
    mHandler.sendMessageDelayed(msg,2000);
    long origId=Binder.clearCallingIdentity();
    try {
      mStack.finishAllActivitiesLocked(false);
      removePendingActivityLaunchesLocked(mStack);
    }
  finally {
      Binder.restoreCallingIdentity(origId);
    }
  }
}

Fixed version (ground truth):
@Override public void release(){
synchronized (mService) {
    if (mContainerState == CONTAINER_STATE_FINISHING) {
      return;
    }
    mContainerState=CONTAINER_STATE_FINISHING;
    long origId=Binder.clearCallingIdentity();
    try {
      mStack.finishAllActivitiesLocked(false);
      removePendingActivityLaunchesLocked(mStack);
    }
  finally {
      Binder.restoreCallingIdentity(origId);
    }
  }
}
Program: 195410
Project: 195410
Buggy source:
void onTaskListEmptyLocked(){
  mHandler.removeMessages(CONTAINER_TASK_LIST_EMPTY_TIMEOUT,this);
  detachLocked();
  deleteActivityContainer(this);
  mHandler.obtainMessage(CONTAINER_CALLBACK_TASK_LIST_EMPTY,this).sendToTarget();
}

Fixed version (ground truth):
void onTaskListEmptyLocked(){
  detachLocked();
  deleteActivityContainer(this);
  mHandler.obtainMessage(CONTAINER_CALLBACK_TASK_LIST_EMPTY,this).sendToTarget();
}
Program: 195412
Project: 195412
Buggy source:
@Override public void release(){
synchronized (mService) {
    if (mContainerState == CONTAINER_STATE_FINISHING) {
      return;
    }
    mContainerState=CONTAINER_STATE_FINISHING;
    final Message msg=mHandler.obtainMessage(CONTAINER_TASK_LIST_EMPTY_TIMEOUT,this);
    mHandler.sendMessageDelayed(msg,2000);
    long origId=Binder.clearCallingIdentity();
    try {
      mStack.finishAllActivitiesLocked(false);
      removePendingActivityLaunchesLocked(mStack);
    }
  finally {
      Binder.restoreCallingIdentity(origId);
    }
  }
}

Fixed version (ground truth):
@Override public void release(){
synchronized (mService) {
    if (mContainerState == CONTAINER_STATE_FINISHING) {
      return;
    }
    mContainerState=CONTAINER_STATE_FINISHING;
    long origId=Binder.clearCallingIdentity();
    try {
      mStack.finishAllActivitiesLocked(false);
      removePendingActivityLaunchesLocked(mStack);
    }
  finally {
      Binder.restoreCallingIdentity(origId);
    }
  }
}
Program: 195413
Project: 195413
Buggy source:
void onTaskListEmptyLocked(){
  mHandler.removeMessages(CONTAINER_TASK_LIST_EMPTY_TIMEOUT,this);
  detachLocked();
  deleteActivityContainer(this);
  mHandler.obtainMessage(CONTAINER_CALLBACK_TASK_LIST_EMPTY,this).sendToTarget();
}

Fixed version (ground truth):
void onTaskListEmptyLocked(){
  detachLocked();
  deleteActivityContainer(this);
  mHandler.obtainMessage(CONTAINER_CALLBACK_TASK_LIST_EMPTY,this).sendToTarget();
}
Program: 195415
Project: 195415
Buggy source:
@Override protected void onDetachedFromWindow(){
  if (mIndeterminate) {
    stopAnimation();
  }
  if (mRefreshProgressRunnable != null) {
    removeCallbacks(mRefreshProgressRunnable);
  }
  if (mRefreshProgressRunnable != null && mRefreshIsPosted) {
    removeCallbacks(mRefreshProgressRunnable);
  }
  if (mAccessibilityEventSender != null) {
    removeCallbacks(mAccessibilityEventSender);
  }
  super.onDetachedFromWindow();
  mAttached=false;
}

Fixed version (ground truth):
@Override protected void onDetachedFromWindow(){
  if (mIndeterminate) {
    stopAnimation();
  }
  if (mRefreshProgressRunnable != null) {
    removeCallbacks(mRefreshProgressRunnable);
    mRefreshIsPosted=false;
  }
  if (mAccessibilityEventSender != null) {
    removeCallbacks(mAccessibilityEventSender);
  }
  super.onDetachedFromWindow();
  mAttached=false;
}
Program: 195416
Project: 195416
Buggy source:
@Override protected void onDetachedFromWindow(){
  if (mIndeterminate) {
    stopAnimation();
  }
  if (mRefreshProgressRunnable != null) {
    removeCallbacks(mRefreshProgressRunnable);
  }
  if (mRefreshProgressRunnable != null && mRefreshIsPosted) {
    removeCallbacks(mRefreshProgressRunnable);
  }
  if (mAccessibilityEventSender != null) {
    removeCallbacks(mAccessibilityEventSender);
  }
  super.onDetachedFromWindow();
  mAttached=false;
}

Fixed version (ground truth):
@Override protected void onDetachedFromWindow(){
  if (mIndeterminate) {
    stopAnimation();
  }
  if (mRefreshProgressRunnable != null) {
    removeCallbacks(mRefreshProgressRunnable);
    mRefreshIsPosted=false;
  }
  if (mAccessibilityEventSender != null) {
    removeCallbacks(mAccessibilityEventSender);
  }
  super.onDetachedFromWindow();
  mAttached=false;
}
Program: 195417
Project: 195417
Buggy source:
/** 
 * Create an intrinsic for applying a blur to an allocation. The default radius is 5.0. Supported elements types are   {@link Element#U8_4}
 * @param rs The RenderScript context
 * @param e Element type for inputs and outputs
 * @return ScriptIntrinsicBlur
 */
public static ScriptIntrinsicBlur create(RenderScript rs,Element e){
  if ((!e.isCompatible(Element.U8_4(rs))) && (!e.isCompatible(Element.U8(rs)))) {
    throw new RSIllegalArgumentException("String_Node_Str");
  }
  long id=rs.nScriptIntrinsicCreate(5,e.getID(rs));
  ScriptIntrinsicBlur sib=new ScriptIntrinsicBlur(id,rs);
  sib.setRadius(5.f);
  return sib;
}

Fixed version (ground truth):
/** 
 * Create an intrinsic for applying a blur to an allocation. The default radius is 5.0. Supported elements types are   {@link Element#U8_4 Element#U8}
 * @param rs The RenderScript context
 * @param e Element type for inputs and outputs
 * @return ScriptIntrinsicBlur
 */
public static ScriptIntrinsicBlur create(RenderScript rs,Element e){
  if ((!e.isCompatible(Element.U8_4(rs))) && (!e.isCompatible(Element.U8(rs)))) {
    throw new RSIllegalArgumentException("String_Node_Str");
  }
  long id=rs.nScriptIntrinsicCreate(5,e.getID(rs));
  ScriptIntrinsicBlur sib=new ScriptIntrinsicBlur(id,rs);
  sib.setRadius(5.f);
  return sib;
}
Program: 195418
Project: 195418
Buggy source:
/** 
 * Create an intrinsic for applying a blur to an allocation. The default radius is 5.0. Supported elements types are   {@link Element#U8_4}
 * @param rs The RenderScript context
 * @param e Element type for inputs and outputs
 * @return ScriptIntrinsicBlur
 */
public static ScriptIntrinsicBlur create(RenderScript rs,Element e){
  if ((!e.isCompatible(Element.U8_4(rs))) && (!e.isCompatible(Element.U8(rs)))) {
    throw new RSIllegalArgumentException("String_Node_Str");
  }
  long id=rs.nScriptIntrinsicCreate(5,e.getID(rs));
  ScriptIntrinsicBlur sib=new ScriptIntrinsicBlur(id,rs);
  sib.setRadius(5.f);
  return sib;
}

Fixed version (ground truth):
/** 
 * Create an intrinsic for applying a blur to an allocation. The default radius is 5.0. Supported elements types are   {@link Element#U8_4 Element#U8}
 * @param rs The RenderScript context
 * @param e Element type for inputs and outputs
 * @return ScriptIntrinsicBlur
 */
public static ScriptIntrinsicBlur create(RenderScript rs,Element e){
  if ((!e.isCompatible(Element.U8_4(rs))) && (!e.isCompatible(Element.U8(rs)))) {
    throw new RSIllegalArgumentException("String_Node_Str");
  }
  long id=rs.nScriptIntrinsicCreate(5,e.getID(rs));
  ScriptIntrinsicBlur sib=new ScriptIntrinsicBlur(id,rs);
  sib.setRadius(5.f);
  return sib;
}
Program: 195419
Project: 195419
Buggy source:
/** 
 * Create an intrinsic for applying a blur to an allocation. The default radius is 5.0. Supported elements types are   {@link Element#U8_4}
 * @param rs The RenderScript context
 * @param e Element type for inputs and outputs
 * @return ScriptIntrinsicBlur
 */
public static ScriptIntrinsicBlur create(RenderScript rs,Element e){
  if ((!e.isCompatible(Element.U8_4(rs))) && (!e.isCompatible(Element.U8(rs)))) {
    throw new RSIllegalArgumentException("String_Node_Str");
  }
  long id=rs.nScriptIntrinsicCreate(5,e.getID(rs));
  ScriptIntrinsicBlur sib=new ScriptIntrinsicBlur(id,rs);
  sib.setRadius(5.f);
  return sib;
}

Fixed version (ground truth):
/** 
 * Create an intrinsic for applying a blur to an allocation. The default radius is 5.0. Supported elements types are   {@link Element#U8_4 Element#U8}
 * @param rs The RenderScript context
 * @param e Element type for inputs and outputs
 * @return ScriptIntrinsicBlur
 */
public static ScriptIntrinsicBlur create(RenderScript rs,Element e){
  if ((!e.isCompatible(Element.U8_4(rs))) && (!e.isCompatible(Element.U8(rs)))) {
    throw new RSIllegalArgumentException("String_Node_Str");
  }
  long id=rs.nScriptIntrinsicCreate(5,e.getID(rs));
  ScriptIntrinsicBlur sib=new ScriptIntrinsicBlur(id,rs);
  sib.setRadius(5.f);
  return sib;
}
Program: 195420
Project: 195420
Buggy source:
private void insertTaskAtTop(TaskRecord task){
  if (task.isOverHomeStack()) {
    final TaskRecord nextTask=getNextTask(task);
    if (nextTask != null) {
      nextTask.setTaskToReturnTo(task.getTaskToReturnTo());
    }
  }
  if (isOnHomeDisplay()) {
    ActivityStack lastStack=mStackSupervisor.getLastStack();
    final boolean fromHome=lastStack.isHomeStack();
    if (!isHomeStack() && (fromHome || topTask() != task)) {
      task.setTaskToReturnTo(fromHome ? lastStack.topTask() == null ? HOME_ACTIVITY_TYPE : lastStack.topTask().taskType : APPLICATION_ACTIVITY_TYPE);
    }
  }
 else {
    task.setTaskToReturnTo(APPLICATION_ACTIVITY_TYPE);
  }
  mTaskHistory.remove(task);
  int taskNdx=mTaskHistory.size();
  if (!isCurrentProfileLocked(task.userId)) {
    while (--taskNdx >= 0) {
      if (!isCurrentProfileLocked(mTaskHistory.get(taskNdx).userId)) {
        break;
      }
    }
    ++taskNdx;
  }
  mTaskHistory.add(taskNdx,task);
  updateTaskMovement(task,true);
}

Fixed version (ground truth):
private void insertTaskAtTop(TaskRecord task,ActivityRecord newActivity){
  if (task.isOverHomeStack()) {
    final TaskRecord nextTask=getNextTask(task);
    if (nextTask != null) {
      nextTask.setTaskToReturnTo(task.getTaskToReturnTo());
    }
  }
  if (isOnHomeDisplay()) {
    ActivityStack lastStack=mStackSupervisor.getLastStack();
    final boolean fromHome=lastStack.isHomeStack();
    if (!isHomeStack() && (fromHome || topTask() != task)) {
      task.setTaskToReturnTo(fromHome ? lastStack.topTask() == null ? HOME_ACTIVITY_TYPE : lastStack.topTask().taskType : APPLICATION_ACTIVITY_TYPE);
    }
  }
 else {
    task.setTaskToReturnTo(APPLICATION_ACTIVITY_TYPE);
  }
  mTaskHistory.remove(task);
  int taskNdx=mTaskHistory.size();
  final boolean notShownWhenLocked=(newActivity != null && (newActivity.info.flags & FLAG_SHOW_ON_LOCK_SCREEN) == 0) || (newActivity == null && task.topRunningActivityLocked(null) == null);
  if (!isCurrentProfileLocked(task.userId) && notShownWhenLocked) {
    while (--taskNdx >= 0) {
      final TaskRecord tmpTask=mTaskHistory.get(taskNdx);
      if (!isCurrentProfileLocked(tmpTask.userId) || tmpTask.topRunningActivityLocked(null) == null) {
        break;
      }
    }
    ++taskNdx;
  }
  mTaskHistory.add(taskNdx,task);
  updateTaskMovement(task,true);
}
Program: 195421
Project: 195421
Buggy source:
/** 
 * Returns the first activity (starting from the top of the stack) that is the same as the given activity.  Returns null if no such activity is found.
 */
ActivityRecord findActivityLocked(Intent intent,ActivityInfo info){
  ComponentName cls=intent.getComponent();
  if (info.targetActivity != null) {
    cls=new ComponentName(info.packageName,info.targetActivity);
  }
  final int userId=UserHandle.getUserId(info.applicationInfo.uid);
  for (int taskNdx=mTaskHistory.size() - 1; taskNdx >= 0; --taskNdx) {
    TaskRecord task=mTaskHistory.get(taskNdx);
    if (!isCurrentProfileLocked(task.userId)) {
      return null;
    }
    final ArrayList<ActivityRecord> activities=task.mActivities;
    for (int activityNdx=activities.size() - 1; activityNdx >= 0; --activityNdx) {
      ActivityRecord r=activities.get(activityNdx);
      if (!r.finishing && r.intent.getComponent().equals(cls) && r.userId == userId) {
        return r;
      }
    }
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Returns the first activity (starting from the top of the stack) that is the same as the given activity.  Returns null if no such activity is found.
 */
ActivityRecord findActivityLocked(Intent intent,ActivityInfo info){
  ComponentName cls=intent.getComponent();
  if (info.targetActivity != null) {
    cls=new ComponentName(info.packageName,info.targetActivity);
  }
  final int userId=UserHandle.getUserId(info.applicationInfo.uid);
  for (int taskNdx=mTaskHistory.size() - 1; taskNdx >= 0; --taskNdx) {
    final TaskRecord task=mTaskHistory.get(taskNdx);
    final boolean notCurrentUserTask=!isCurrentProfileLocked(task.userId);
    final ArrayList<ActivityRecord> activities=task.mActivities;
    for (int activityNdx=activities.size() - 1; activityNdx >= 0; --activityNdx) {
      ActivityRecord r=activities.get(activityNdx);
      if (notCurrentUserTask && (r.info.flags & FLAG_SHOW_ON_LOCK_SCREEN) == 0) {
        return null;
      }
      if (!r.finishing && r.intent.getComponent().equals(cls) && r.userId == userId) {
        return r;
      }
    }
  }
  return null;
}
Program: 195422
Project: 195422
Buggy source:
void addTask(final TaskRecord task,final boolean toTop,boolean moving){
  task.stack=this;
  if (toTop) {
    insertTaskAtTop(task);
  }
 else {
    mTaskHistory.add(0,task);
    updateTaskMovement(task,false);
  }
  if (!moving && task.voiceSession != null) {
    try {
      task.voiceSession.taskStarted(task.intent,task.taskId);
    }
 catch (    RemoteException e) {
    }
  }
}

Fixed version (ground truth):
void addTask(final TaskRecord task,final boolean toTop,boolean moving){
  task.stack=this;
  if (toTop) {
    insertTaskAtTop(task,null);
  }
 else {
    mTaskHistory.add(0,task);
    updateTaskMovement(task,false);
  }
  if (!moving && task.voiceSession != null) {
    try {
      task.voiceSession.taskStarted(task.intent,task.taskId);
    }
 catch (    RemoteException e) {
    }
  }
}
Program: 195423
Project: 195423
Buggy source:
final void moveTaskToFrontLocked(TaskRecord tr,boolean noAnimation,Bundle options,String reason){
  if (DEBUG_SWITCH)   Slog.v(TAG_SWITCH,"String_Node_Str" + tr);
  final int numTasks=mTaskHistory.size();
  final int index=mTaskHistory.indexOf(tr);
  if (numTasks == 0 || index < 0) {
    if (noAnimation) {
      ActivityOptions.abort(options);
    }
 else {
      updateTransitLocked(AppTransition.TRANSIT_TASK_TO_FRONT,options);
    }
    return;
  }
  insertTaskAtTop(tr);
  ActivityRecord r=topRunningActivityLocked(null);
  mService.setFocusedActivityLocked(r,reason);
  if (DEBUG_TRANSITION)   Slog.v(TAG_TRANSITION,"String_Node_Str" + tr);
  if (noAnimation) {
    mWindowManager.prepareAppTransition(AppTransition.TRANSIT_NONE,false);
    if (r != null) {
      mNoAnimActivities.add(r);
    }
    ActivityOptions.abort(options);
  }
 else {
    updateTransitLocked(AppTransition.TRANSIT_TASK_TO_FRONT,options);
  }
  mStackSupervisor.resumeTopActivitiesLocked();
  EventLog.writeEvent(EventLogTags.AM_TASK_TO_FRONT,tr.userId,tr.taskId);
  if (VALIDATE_TOKENS) {
    validateAppTokensLocked();
  }
}

Fixed version (ground truth):
final void moveTaskToFrontLocked(TaskRecord tr,boolean noAnimation,Bundle options,String reason){
  if (DEBUG_SWITCH)   Slog.v(TAG_SWITCH,"String_Node_Str" + tr);
  final int numTasks=mTaskHistory.size();
  final int index=mTaskHistory.indexOf(tr);
  if (numTasks == 0 || index < 0) {
    if (noAnimation) {
      ActivityOptions.abort(options);
    }
 else {
      updateTransitLocked(AppTransition.TRANSIT_TASK_TO_FRONT,options);
    }
    return;
  }
  insertTaskAtTop(tr,null);
  ActivityRecord r=topRunningActivityLocked(null);
  mService.setFocusedActivityLocked(r,reason);
  if (DEBUG_TRANSITION)   Slog.v(TAG_TRANSITION,"String_Node_Str" + tr);
  if (noAnimation) {
    mWindowManager.prepareAppTransition(AppTransition.TRANSIT_NONE,false);
    if (r != null) {
      mNoAnimActivities.add(r);
    }
    ActivityOptions.abort(options);
  }
 else {
    updateTransitLocked(AppTransition.TRANSIT_TASK_TO_FRONT,options);
  }
  mStackSupervisor.resumeTopActivitiesLocked();
  EventLog.writeEvent(EventLogTags.AM_TASK_TO_FRONT,tr.userId,tr.taskId);
  if (VALIDATE_TOKENS) {
    validateAppTokensLocked();
  }
}
Program: 195425
Project: 195425
Buggy source:
boolean okToShowLocked(ActivityRecord r){
  return isCurrentProfileLocked(r.userId) || (r.info.flags & ActivityInfo.FLAG_SHOW_ON_LOCK_SCREEN) != 0;
}

Fixed version (ground truth):
boolean okToShowLocked(ActivityRecord r){
  return isCurrentProfileLocked(r.userId) || (r.info.flags & FLAG_SHOW_ON_LOCK_SCREEN) != 0;
}
Program: 195426
Project: 195426
Buggy source:
final void switchUserLocked(int userId){
  if (mCurrentUser == userId) {
    return;
  }
  mCurrentUser=userId;
  int index=mTaskHistory.size();
  for (int i=0; i < index; ) {
    TaskRecord task=mTaskHistory.get(i);
    if (isCurrentProfileLocked(task.userId)) {
      if (DEBUG_TASKS)       Slog.d(TAG_TASKS,"String_Node_Str" + getStackId() + "String_Node_Str"+ task+ "String_Node_Str");
      mTaskHistory.remove(i);
      mTaskHistory.add(task);
      --index;
    }
 else {
      ++i;
    }
  }
  if (VALIDATE_TOKENS) {
    validateAppTokensLocked();
  }
}

Fixed version (ground truth):
final void switchUserLocked(int userId){
  if (mCurrentUser == userId) {
    return;
  }
  mCurrentUser=userId;
  int index=mTaskHistory.size();
  for (int i=0; i < index; ) {
    final TaskRecord task=mTaskHistory.get(i);
    if (isCurrentProfileLocked(task.userId) || task.topRunningActivityLocked(null) != null) {
      if (DEBUG_TASKS)       Slog.d(TAG_TASKS,"String_Node_Str" + getStackId() + "String_Node_Str"+ task+ "String_Node_Str");
      mTaskHistory.remove(i);
      mTaskHistory.add(task);
      --index;
    }
 else {
      ++i;
    }
  }
  if (VALIDATE_TOKENS) {
    validateAppTokensLocked();
  }
}
Program: 195427
Project: 195427
Buggy source:
/** 
 * Put a Task in this stack. Used for adding and moving.
 * @param task The task to add.
 * @param toTop Whether to add it to the top or bottom.
 */
void addTask(Task task,boolean toTop){
  int stackNdx;
  if (!toTop) {
    stackNdx=0;
  }
 else {
    stackNdx=mTasks.size();
    if (!mService.isCurrentProfileLocked(task.mUserId)) {
      while (--stackNdx >= 0) {
        if (!mService.isCurrentProfileLocked(mTasks.get(stackNdx).mUserId)) {
          break;
        }
      }
      ++stackNdx;
    }
  }
  if (DEBUG_TASK_MOVEMENT)   Slog.d(TAG,"String_Node_Str" + task + "String_Node_Str"+ toTop+ "String_Node_Str"+ stackNdx);
  mTasks.add(stackNdx,task);
  task.mStack=this;
  if (toTop) {
    mDisplayContent.moveStack(this,true);
  }
  EventLog.writeEvent(EventLogTags.WM_TASK_MOVED,task.mTaskId,toTop ? 1 : 0,stackNdx);
}

Fixed version (ground truth):
/** 
 * Put a Task in this stack. Used for adding and moving.
 * @param task The task to add.
 * @param toTop Whether to add it to the top or bottom.
 * @param showWhenLocked Whether to show the task when the device is lockedregardless of the current user.
 */
void addTask(Task task,boolean toTop,boolean showWhenLocked){
  int stackNdx;
  if (!toTop) {
    stackNdx=0;
  }
 else {
    stackNdx=mTasks.size();
    if (!showWhenLocked && !mService.isCurrentProfileLocked(task.mUserId)) {
      while (--stackNdx >= 0) {
        final Task tmpTask=mTasks.get(stackNdx);
        if (!tmpTask.showWhenLocked() || !mService.isCurrentProfileLocked(tmpTask.mUserId)) {
          break;
        }
      }
      ++stackNdx;
    }
  }
  if (DEBUG_TASK_MOVEMENT)   Slog.d(TAG,"String_Node_Str" + task + "String_Node_Str"+ toTop+ "String_Node_Str"+ stackNdx);
  mTasks.add(stackNdx,task);
  task.mStack=this;
  if (toTop) {
    mDisplayContent.moveStack(this,true);
  }
  EventLog.writeEvent(EventLogTags.WM_TASK_MOVED,task.mTaskId,toTop ? 1 : 0,stackNdx);
}
Program: 195428
Project: 195428
Buggy source:
void switchUser(){
  int top=mTasks.size();
  for (int taskNdx=0; taskNdx < top; ++taskNdx) {
    Task task=mTasks.get(taskNdx);
    if (mService.isCurrentProfileLocked(task.mUserId)) {
      mTasks.remove(taskNdx);
      mTasks.add(task);
      --top;
    }
  }
}

Fixed version (ground truth):
void switchUser(){
  int top=mTasks.size();
  for (int taskNdx=0; taskNdx < top; ++taskNdx) {
    Task task=mTasks.get(taskNdx);
    if (mService.isCurrentProfileLocked(task.mUserId) || task.showWhenLocked()) {
      mTasks.remove(taskNdx);
      mTasks.add(task);
      --top;
    }
  }
}
Program: 195429
Project: 195429
Buggy source:
private Task createTaskLocked(int taskId,int stackId,int userId,AppWindowToken atoken){
  if (DEBUG_STACK)   Slog.i(TAG,"String_Node_Str" + taskId + "String_Node_Str"+ stackId+ "String_Node_Str"+ atoken);
  final TaskStack stack=mStackIdToStack.get(stackId);
  if (stack == null) {
    throw new IllegalArgumentException("String_Node_Str" + stackId);
  }
  EventLog.writeEvent(EventLogTags.WM_TASK_CREATED,taskId,stackId);
  Task task=new Task(taskId,stack,userId,this);
  mTaskIdToTask.put(taskId,task);
  stack.addTask(task,!atoken.mLaunchTaskBehind);
  return task;
}

Fixed version (ground truth):
private Task createTaskLocked(int taskId,int stackId,int userId,AppWindowToken atoken){
  if (DEBUG_STACK)   Slog.i(TAG,"String_Node_Str" + taskId + "String_Node_Str"+ stackId+ "String_Node_Str"+ atoken);
  final TaskStack stack=mStackIdToStack.get(stackId);
  if (stack == null) {
    throw new IllegalArgumentException("String_Node_Str" + stackId);
  }
  EventLog.writeEvent(EventLogTags.WM_TASK_CREATED,taskId,stackId);
  Task task=new Task(taskId,stack,userId,this);
  mTaskIdToTask.put(taskId,task);
  stack.addTask(task,!atoken.mLaunchTaskBehind,atoken.showWhenLocked);
  return task;
}
Program: 195430
Project: 195430
Buggy source:
/** 
 * Create an intrinsic for applying a blur to an allocation. The default radius is 5.0. Supported elements types are   {@link Element#U8_4}
 * @param rs The RenderScript context
 * @param e Element type for inputs and outputs
 * @return ScriptIntrinsicBlur
 */
public static ScriptIntrinsicBlur create(RenderScript rs,Element e){
  if ((!e.isCompatible(Element.U8_4(rs))) && (!e.isCompatible(Element.U8(rs)))) {
    throw new RSIllegalArgumentException("String_Node_Str");
  }
  long id=rs.nScriptIntrinsicCreate(5,e.getID(rs));
  ScriptIntrinsicBlur sib=new ScriptIntrinsicBlur(id,rs);
  sib.setRadius(5.f);
  return sib;
}

Fixed version (ground truth):
/** 
 * Create an intrinsic for applying a blur to an allocation. The default radius is 5.0. Supported elements types are   {@link Element#U8_4 Element#U8}
 * @param rs The RenderScript context
 * @param e Element type for inputs and outputs
 * @return ScriptIntrinsicBlur
 */
public static ScriptIntrinsicBlur create(RenderScript rs,Element e){
  if ((!e.isCompatible(Element.U8_4(rs))) && (!e.isCompatible(Element.U8(rs)))) {
    throw new RSIllegalArgumentException("String_Node_Str");
  }
  long id=rs.nScriptIntrinsicCreate(5,e.getID(rs));
  ScriptIntrinsicBlur sib=new ScriptIntrinsicBlur(id,rs);
  sib.setRadius(5.f);
  return sib;
}
Program: 195431
Project: 195431
Buggy source:
private void insertTaskAtTop(TaskRecord task){
  if (task.isOverHomeStack()) {
    final TaskRecord nextTask=getNextTask(task);
    if (nextTask != null) {
      nextTask.setTaskToReturnTo(task.getTaskToReturnTo());
    }
  }
  if (isOnHomeDisplay()) {
    ActivityStack lastStack=mStackSupervisor.getLastStack();
    final boolean fromHome=lastStack.isHomeStack();
    if (!isHomeStack() && (fromHome || topTask() != task)) {
      task.setTaskToReturnTo(fromHome ? lastStack.topTask() == null ? HOME_ACTIVITY_TYPE : lastStack.topTask().taskType : APPLICATION_ACTIVITY_TYPE);
    }
  }
 else {
    task.setTaskToReturnTo(APPLICATION_ACTIVITY_TYPE);
  }
  mTaskHistory.remove(task);
  int taskNdx=mTaskHistory.size();
  if (!isCurrentProfileLocked(task.userId)) {
    while (--taskNdx >= 0) {
      if (!isCurrentProfileLocked(mTaskHistory.get(taskNdx).userId)) {
        break;
      }
    }
    ++taskNdx;
  }
  mTaskHistory.add(taskNdx,task);
  updateTaskMovement(task,true);
}

Fixed version (ground truth):
private void insertTaskAtTop(TaskRecord task,ActivityRecord newActivity){
  if (task.isOverHomeStack()) {
    final TaskRecord nextTask=getNextTask(task);
    if (nextTask != null) {
      nextTask.setTaskToReturnTo(task.getTaskToReturnTo());
    }
  }
  if (isOnHomeDisplay()) {
    ActivityStack lastStack=mStackSupervisor.getLastStack();
    final boolean fromHome=lastStack.isHomeStack();
    if (!isHomeStack() && (fromHome || topTask() != task)) {
      task.setTaskToReturnTo(fromHome ? lastStack.topTask() == null ? HOME_ACTIVITY_TYPE : lastStack.topTask().taskType : APPLICATION_ACTIVITY_TYPE);
    }
  }
 else {
    task.setTaskToReturnTo(APPLICATION_ACTIVITY_TYPE);
  }
  mTaskHistory.remove(task);
  int taskNdx=mTaskHistory.size();
  final boolean notShownWhenLocked=(newActivity != null && (newActivity.info.flags & FLAG_SHOW_ON_LOCK_SCREEN) == 0) || (newActivity == null && task.topRunningActivityLocked(null) == null);
  if (!isCurrentProfileLocked(task.userId) && notShownWhenLocked) {
    while (--taskNdx >= 0) {
      final TaskRecord tmpTask=mTaskHistory.get(taskNdx);
      if (!isCurrentProfileLocked(tmpTask.userId) || tmpTask.topRunningActivityLocked(null) == null) {
        break;
      }
    }
    ++taskNdx;
  }
  mTaskHistory.add(taskNdx,task);
  updateTaskMovement(task,true);
}
Program: 195432
Project: 195432
Buggy source:
/** 
 * Returns the first activity (starting from the top of the stack) that is the same as the given activity.  Returns null if no such activity is found.
 */
ActivityRecord findActivityLocked(Intent intent,ActivityInfo info){
  ComponentName cls=intent.getComponent();
  if (info.targetActivity != null) {
    cls=new ComponentName(info.packageName,info.targetActivity);
  }
  final int userId=UserHandle.getUserId(info.applicationInfo.uid);
  for (int taskNdx=mTaskHistory.size() - 1; taskNdx >= 0; --taskNdx) {
    TaskRecord task=mTaskHistory.get(taskNdx);
    if (!isCurrentProfileLocked(task.userId)) {
      return null;
    }
    final ArrayList<ActivityRecord> activities=task.mActivities;
    for (int activityNdx=activities.size() - 1; activityNdx >= 0; --activityNdx) {
      ActivityRecord r=activities.get(activityNdx);
      if (!r.finishing && r.intent.getComponent().equals(cls) && r.userId == userId) {
        return r;
      }
    }
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Returns the first activity (starting from the top of the stack) that is the same as the given activity.  Returns null if no such activity is found.
 */
ActivityRecord findActivityLocked(Intent intent,ActivityInfo info){
  ComponentName cls=intent.getComponent();
  if (info.targetActivity != null) {
    cls=new ComponentName(info.packageName,info.targetActivity);
  }
  final int userId=UserHandle.getUserId(info.applicationInfo.uid);
  for (int taskNdx=mTaskHistory.size() - 1; taskNdx >= 0; --taskNdx) {
    final TaskRecord task=mTaskHistory.get(taskNdx);
    final boolean notCurrentUserTask=!isCurrentProfileLocked(task.userId);
    final ArrayList<ActivityRecord> activities=task.mActivities;
    for (int activityNdx=activities.size() - 1; activityNdx >= 0; --activityNdx) {
      ActivityRecord r=activities.get(activityNdx);
      if (notCurrentUserTask && (r.info.flags & FLAG_SHOW_ON_LOCK_SCREEN) == 0) {
        return null;
      }
      if (!r.finishing && r.intent.getComponent().equals(cls) && r.userId == userId) {
        return r;
      }
    }
  }
  return null;
}
Program: 195433
Project: 195433
Buggy source:
void addTask(final TaskRecord task,final boolean toTop,boolean moving){
  task.stack=this;
  if (toTop) {
    insertTaskAtTop(task);
  }
 else {
    mTaskHistory.add(0,task);
    updateTaskMovement(task,false);
  }
  if (!moving && task.voiceSession != null) {
    try {
      task.voiceSession.taskStarted(task.intent,task.taskId);
    }
 catch (    RemoteException e) {
    }
  }
}

Fixed version (ground truth):
void addTask(final TaskRecord task,final boolean toTop,boolean moving){
  task.stack=this;
  if (toTop) {
    insertTaskAtTop(task,null);
  }
 else {
    mTaskHistory.add(0,task);
    updateTaskMovement(task,false);
  }
  if (!moving && task.voiceSession != null) {
    try {
      task.voiceSession.taskStarted(task.intent,task.taskId);
    }
 catch (    RemoteException e) {
    }
  }
}
Program: 195434
Project: 195434
Buggy source:
final void moveTaskToFrontLocked(TaskRecord tr,boolean noAnimation,Bundle options,String reason){
  if (DEBUG_SWITCH)   Slog.v(TAG_SWITCH,"String_Node_Str" + tr);
  final int numTasks=mTaskHistory.size();
  final int index=mTaskHistory.indexOf(tr);
  if (numTasks == 0 || index < 0) {
    if (noAnimation) {
      ActivityOptions.abort(options);
    }
 else {
      updateTransitLocked(AppTransition.TRANSIT_TASK_TO_FRONT,options);
    }
    return;
  }
  insertTaskAtTop(tr);
  ActivityRecord r=topRunningActivityLocked(null);
  mService.setFocusedActivityLocked(r,reason);
  if (DEBUG_TRANSITION)   Slog.v(TAG_TRANSITION,"String_Node_Str" + tr);
  if (noAnimation) {
    mWindowManager.prepareAppTransition(AppTransition.TRANSIT_NONE,false);
    if (r != null) {
      mNoAnimActivities.add(r);
    }
    ActivityOptions.abort(options);
  }
 else {
    updateTransitLocked(AppTransition.TRANSIT_TASK_TO_FRONT,options);
  }
  mStackSupervisor.resumeTopActivitiesLocked();
  EventLog.writeEvent(EventLogTags.AM_TASK_TO_FRONT,tr.userId,tr.taskId);
  if (VALIDATE_TOKENS) {
    validateAppTokensLocked();
  }
}

Fixed version (ground truth):
final void moveTaskToFrontLocked(TaskRecord tr,boolean noAnimation,Bundle options,String reason){
  if (DEBUG_SWITCH)   Slog.v(TAG_SWITCH,"String_Node_Str" + tr);
  final int numTasks=mTaskHistory.size();
  final int index=mTaskHistory.indexOf(tr);
  if (numTasks == 0 || index < 0) {
    if (noAnimation) {
      ActivityOptions.abort(options);
    }
 else {
      updateTransitLocked(AppTransition.TRANSIT_TASK_TO_FRONT,options);
    }
    return;
  }
  insertTaskAtTop(tr,null);
  ActivityRecord r=topRunningActivityLocked(null);
  mService.setFocusedActivityLocked(r,reason);
  if (DEBUG_TRANSITION)   Slog.v(TAG_TRANSITION,"String_Node_Str" + tr);
  if (noAnimation) {
    mWindowManager.prepareAppTransition(AppTransition.TRANSIT_NONE,false);
    if (r != null) {
      mNoAnimActivities.add(r);
    }
    ActivityOptions.abort(options);
  }
 else {
    updateTransitLocked(AppTransition.TRANSIT_TASK_TO_FRONT,options);
  }
  mStackSupervisor.resumeTopActivitiesLocked();
  EventLog.writeEvent(EventLogTags.AM_TASK_TO_FRONT,tr.userId,tr.taskId);
  if (VALIDATE_TOKENS) {
    validateAppTokensLocked();
  }
}
Program: 195436
Project: 195436
Buggy source:
boolean okToShowLocked(ActivityRecord r){
  return isCurrentProfileLocked(r.userId) || (r.info.flags & ActivityInfo.FLAG_SHOW_ON_LOCK_SCREEN) != 0;
}

Fixed version (ground truth):
boolean okToShowLocked(ActivityRecord r){
  return isCurrentProfileLocked(r.userId) || (r.info.flags & FLAG_SHOW_ON_LOCK_SCREEN) != 0;
}
Program: 195437
Project: 195437
Buggy source:
final void switchUserLocked(int userId){
  if (mCurrentUser == userId) {
    return;
  }
  mCurrentUser=userId;
  int index=mTaskHistory.size();
  for (int i=0; i < index; ) {
    TaskRecord task=mTaskHistory.get(i);
    if (isCurrentProfileLocked(task.userId)) {
      if (DEBUG_TASKS)       Slog.d(TAG_TASKS,"String_Node_Str" + getStackId() + "String_Node_Str"+ task+ "String_Node_Str");
      mTaskHistory.remove(i);
      mTaskHistory.add(task);
      --index;
    }
 else {
      ++i;
    }
  }
  if (VALIDATE_TOKENS) {
    validateAppTokensLocked();
  }
}

Fixed version (ground truth):
final void switchUserLocked(int userId){
  if (mCurrentUser == userId) {
    return;
  }
  mCurrentUser=userId;
  int index=mTaskHistory.size();
  for (int i=0; i < index; ) {
    final TaskRecord task=mTaskHistory.get(i);
    if (isCurrentProfileLocked(task.userId) || task.topRunningActivityLocked(null) != null) {
      if (DEBUG_TASKS)       Slog.d(TAG_TASKS,"String_Node_Str" + getStackId() + "String_Node_Str"+ task+ "String_Node_Str");
      mTaskHistory.remove(i);
      mTaskHistory.add(task);
      --index;
    }
 else {
      ++i;
    }
  }
  if (VALIDATE_TOKENS) {
    validateAppTokensLocked();
  }
}
Program: 195438
Project: 195438
Buggy source:
/** 
 * Put a Task in this stack. Used for adding and moving.
 * @param task The task to add.
 * @param toTop Whether to add it to the top or bottom.
 */
void addTask(Task task,boolean toTop){
  int stackNdx;
  if (!toTop) {
    stackNdx=0;
  }
 else {
    stackNdx=mTasks.size();
    if (!mService.isCurrentProfileLocked(task.mUserId)) {
      while (--stackNdx >= 0) {
        if (!mService.isCurrentProfileLocked(mTasks.get(stackNdx).mUserId)) {
          break;
        }
      }
      ++stackNdx;
    }
  }
  if (DEBUG_TASK_MOVEMENT)   Slog.d(TAG,"String_Node_Str" + task + "String_Node_Str"+ toTop+ "String_Node_Str"+ stackNdx);
  mTasks.add(stackNdx,task);
  task.mStack=this;
  if (toTop) {
    mDisplayContent.moveStack(this,true);
  }
  EventLog.writeEvent(EventLogTags.WM_TASK_MOVED,task.mTaskId,toTop ? 1 : 0,stackNdx);
}

Fixed version (ground truth):
/** 
 * Put a Task in this stack. Used for adding and moving.
 * @param task The task to add.
 * @param toTop Whether to add it to the top or bottom.
 * @param showWhenLocked Whether to show the task when the device is lockedregardless of the current user.
 */
void addTask(Task task,boolean toTop,boolean showWhenLocked){
  int stackNdx;
  if (!toTop) {
    stackNdx=0;
  }
 else {
    stackNdx=mTasks.size();
    if (!showWhenLocked && !mService.isCurrentProfileLocked(task.mUserId)) {
      while (--stackNdx >= 0) {
        final Task tmpTask=mTasks.get(stackNdx);
        if (!tmpTask.showWhenLocked() || !mService.isCurrentProfileLocked(tmpTask.mUserId)) {
          break;
        }
      }
      ++stackNdx;
    }
  }
  if (DEBUG_TASK_MOVEMENT)   Slog.d(TAG,"String_Node_Str" + task + "String_Node_Str"+ toTop+ "String_Node_Str"+ stackNdx);
  mTasks.add(stackNdx,task);
  task.mStack=this;
  if (toTop) {
    mDisplayContent.moveStack(this,true);
  }
  EventLog.writeEvent(EventLogTags.WM_TASK_MOVED,task.mTaskId,toTop ? 1 : 0,stackNdx);
}
Program: 195439
Project: 195439
Buggy source:
void switchUser(){
  int top=mTasks.size();
  for (int taskNdx=0; taskNdx < top; ++taskNdx) {
    Task task=mTasks.get(taskNdx);
    if (mService.isCurrentProfileLocked(task.mUserId)) {
      mTasks.remove(taskNdx);
      mTasks.add(task);
      --top;
    }
  }
}

Fixed version (ground truth):
void switchUser(){
  int top=mTasks.size();
  for (int taskNdx=0; taskNdx < top; ++taskNdx) {
    Task task=mTasks.get(taskNdx);
    if (mService.isCurrentProfileLocked(task.mUserId) || task.showWhenLocked()) {
      mTasks.remove(taskNdx);
      mTasks.add(task);
      --top;
    }
  }
}
Program: 195440
Project: 195440
Buggy source:
private Task createTaskLocked(int taskId,int stackId,int userId,AppWindowToken atoken){
  if (DEBUG_STACK)   Slog.i(TAG,"String_Node_Str" + taskId + "String_Node_Str"+ stackId+ "String_Node_Str"+ atoken);
  final TaskStack stack=mStackIdToStack.get(stackId);
  if (stack == null) {
    throw new IllegalArgumentException("String_Node_Str" + stackId);
  }
  EventLog.writeEvent(EventLogTags.WM_TASK_CREATED,taskId,stackId);
  Task task=new Task(taskId,stack,userId,this);
  mTaskIdToTask.put(taskId,task);
  stack.addTask(task,!atoken.mLaunchTaskBehind);
  return task;
}

Fixed version (ground truth):
private Task createTaskLocked(int taskId,int stackId,int userId,AppWindowToken atoken){
  if (DEBUG_STACK)   Slog.i(TAG,"String_Node_Str" + taskId + "String_Node_Str"+ stackId+ "String_Node_Str"+ atoken);
  final TaskStack stack=mStackIdToStack.get(stackId);
  if (stack == null) {
    throw new IllegalArgumentException("String_Node_Str" + stackId);
  }
  EventLog.writeEvent(EventLogTags.WM_TASK_CREATED,taskId,stackId);
  Task task=new Task(taskId,stack,userId,this);
  mTaskIdToTask.put(taskId,task);
  stack.addTask(task,!atoken.mLaunchTaskBehind,atoken.showWhenLocked);
  return task;
}
Program: 195441
Project: 195441
Buggy source:
@Override public Expr visitQuestionQuestionOp(@NotNull BindingExpressionParser.QuestionQuestionOpContext ctx){
  final Expr left=ctx.left.accept(this);
  return mModel.ternary(mModel.comparison("String_Node_Str",left,mModel.symbol("String_Node_Str",Object.class)),left,ctx.right.accept(this));
}

Fixed version (ground truth):
@Override public Expr visitQuestionQuestionOp(@NotNull BindingExpressionParser.QuestionQuestionOpContext ctx){
  final Expr left=ctx.left.accept(this);
  return mModel.ternary(mModel.comparison("String_Node_Str",left,mModel.symbol("String_Node_Str",Object.class)),ctx.right.accept(this),left);
}
Program: 195442
Project: 195442
Buggy source:
public boolean markAsReadIfDone(){
  if (mRead) {
    return false;
  }
  BitSet clone=(BitSet)mShouldReadWithConditionals.clone();
  clone.andNot(mReadSoFar);
  mRead=clone.isEmpty();
  if (!mRead && !mReadSoFar.isEmpty()) {
    for (int i=clone.nextSetBit(0); i != -1; i=clone.nextSetBit(i + 1)) {
      final Expr expr=mModel.findFlagExpression(i);
      if (!expr.isConditional()) {
        continue;
      }
      final BitSet readForConditional=expr.findConditionalFlags();
      clone.andNot(readForConditional);
      final BitSet invalidFlags=(BitSet)getInvalidFlags().clone();
      invalidFlags.andNot(readForConditional);
      mRead=invalidFlags.isEmpty() || clone.isEmpty();
    }
  }
  return mRead;
}

Fixed version (ground truth):
public boolean markAsReadIfDone(){
  if (mRead) {
    return false;
  }
  BitSet clone=(BitSet)mShouldReadWithConditionals.clone();
  clone.andNot(mReadSoFar);
  mRead=clone.isEmpty();
  if (!mRead && !mReadSoFar.isEmpty()) {
    for (int i=clone.nextSetBit(0); i != -1; i=clone.nextSetBit(i + 1)) {
      final Expr expr=mModel.findFlagExpression(i);
      if (!expr.isConditional()) {
        continue;
      }
      final BitSet readForConditional=expr.findConditionalFlags();
      clone.andNot(readForConditional);
      final BitSet invalidFlags=(BitSet)getInvalidFlags().clone();
      invalidFlags.andNot(readForConditional);
      mRead=invalidFlags.isEmpty() || clone.isEmpty();
    }
  }
  if (mRead) {
    mShouldReadFlags=null;
  }
  return mRead;
}
Program: 195443
Project: 195443
Buggy source:
public boolean considerElevatingConditionals(Expr cond){
  boolean elevated=false;
  for (  Dependency dependency : mDependencies) {
    if (dependency.isConditional() && dependency.getCondition() == cond) {
      dependency.elevate();
      if (!dependency.getOther().isRead()) {
        elevated=true;
      }
    }
  }
  return elevated;
}

Fixed version (ground truth):
public boolean considerElevatingConditionals(Expr justRead){
  boolean elevated=false;
  for (  Dependency dependency : mDependencies) {
    if (dependency.isConditional() && dependency.getCondition() == justRead) {
      dependency.elevate();
      elevated=true;
    }
  }
  return elevated;
}
Program: 195444
Project: 195444
Buggy source:
public Iterable<Expr> filterShouldRead(Iterable<Expr> exprs){
  return Iterables.filter(exprs,sShouldReadPred);
}

Fixed version (ground truth):
public static Iterable<Expr> filterShouldRead(Iterable<Expr> exprs){
  return toCollection(Iterables.filter(exprs,sShouldReadPred));
}
Program: 195445
Project: 195445
Buggy source:
/** 
 * Create an intrinsic for applying a blur to an allocation. The default radius is 5.0. Supported elements types are   {@link Element#U8_4}
 * @param rs The RenderScript context
 * @param e Element type for inputs and outputs
 * @return ScriptIntrinsicBlur
 */
public static ScriptIntrinsicBlur create(RenderScript rs,Element e){
  if ((!e.isCompatible(Element.U8_4(rs))) && (!e.isCompatible(Element.U8(rs)))) {
    throw new RSIllegalArgumentException("String_Node_Str");
  }
  long id=rs.nScriptIntrinsicCreate(5,e.getID(rs));
  ScriptIntrinsicBlur sib=new ScriptIntrinsicBlur(id,rs);
  sib.setRadius(5.f);
  return sib;
}

Fixed version (ground truth):
/** 
 * Create an intrinsic for applying a blur to an allocation. The default radius is 5.0. Supported elements types are   {@link Element#U8_4 Element#U8}
 * @param rs The RenderScript context
 * @param e Element type for inputs and outputs
 * @return ScriptIntrinsicBlur
 */
public static ScriptIntrinsicBlur create(RenderScript rs,Element e){
  if ((!e.isCompatible(Element.U8_4(rs))) && (!e.isCompatible(Element.U8(rs)))) {
    throw new RSIllegalArgumentException("String_Node_Str");
  }
  long id=rs.nScriptIntrinsicCreate(5,e.getID(rs));
  ScriptIntrinsicBlur sib=new ScriptIntrinsicBlur(id,rs);
  sib.setRadius(5.f);
  return sib;
}
Program: 195450
Project: 195450
Buggy source:
/** 
 * Set the layout direction from the Locale.
 * @param locale The Locale. If null will set the layout direction to{@link View#LAYOUT_DIRECTION_LTR}. If not null will set it to the layout direction corresponding to the Locale.
 * @see {@link View#LAYOUT_DIRECTION_LTR} and {@link View#LAYOUT_DIRECTION_RTL}
 */
public void setLayoutDirection(Locale locale){
  final int layoutDirection=1 + TextUtils.getLayoutDirectionFromLocale(locale);
  screenLayout=(screenLayout & ~SCREENLAYOUT_LAYOUTDIR_MASK) | (layoutDirection << SCREENLAYOUT_LAYOUTDIR_SHIFT);
}

Fixed version (ground truth):
/** 
 * Set the layout direction from the Locale.
 * @param locale The Locale. If null will set the layout direction to{@link View#LAYOUT_DIRECTION_LTR}. If not null will set it to the layout direction corresponding to the Locale.
 * @see View#LAYOUT_DIRECTION_LTR
 * @see View#LAYOUT_DIRECTION_RTL
 */
public void setLayoutDirection(Locale locale){
  final int layoutDirection=1 + TextUtils.getLayoutDirectionFromLocale(locale);
  screenLayout=(screenLayout & ~SCREENLAYOUT_LAYOUTDIR_MASK) | (layoutDirection << SCREENLAYOUT_LAYOUTDIR_SHIFT);
}
Program: 195451
Project: 195451
Buggy source:
/** 
 * defines the method to be invoked when database corruption is detected.
 * @param dbObj the {@link SQLiteDatabase} object representing the database on which corruptionis detected.
 */
void onCorruption(SQLiteDatabase dbObj);

Fixed version (ground truth):
/** 
 * The method invoked when database corruption is detected.
 * @param dbObj the {@link SQLiteDatabase} object representing the database on which corruptionis detected.
 */
void onCorruption(SQLiteDatabase dbObj);
Program: 195452
Project: 195452
Buggy source:
/** 
 * Sets the color of the status bar to   {@param color}. For this to take effect, the window must be drawing the system bar backgrounds with  {@link android.view.WindowManager.LayoutParams#FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS} and{@link android.view.WindowManager.LayoutParams#FLAG_TRANSLUCENT_STATUS} must not be set.If  {@param color} is not opaque, consider setting{@link android.view.View#SYSTEM_UI_FLAG_LAYOUT_STABLE} and{@link android.view.View#SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN}. <p> The transitionName for the view background will be "android:status:background". </p>
 */
public abstract void setStatusBarColor(@ColorInt int color);

Fixed version (ground truth):
/** 
 * Sets the color of the status bar to   {@code color}. For this to take effect, the window must be drawing the system bar backgrounds with  {@link android.view.WindowManager.LayoutParams#FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS} and{@link android.view.WindowManager.LayoutParams#FLAG_TRANSLUCENT_STATUS} must not be set.If  {@code color} is not opaque, consider setting{@link android.view.View#SYSTEM_UI_FLAG_LAYOUT_STABLE} and{@link android.view.View#SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN}. <p> The transitionName for the view background will be "android:status:background". </p>
 */
public abstract void setStatusBarColor(@ColorInt int color);