nus-yam/ex-repair huggingface dataset:
Program: 194043
Project: 194043
Buggy source:
Parcel readParcel(){
  if (DEBUG_PARCEL)   Log.d(TAG,"String_Node_Str" + mCurParcel.dataPosition() + "String_Node_Str"+ mCurParcel.dataAvail()+ "String_Node_Str"+ mNumReadWindows+ "String_Node_Str"+ mNumReadViews);
  if (mCurParcel.readInt() != 0) {
    return mCurParcel;
  }
  mTransferToken=mCurParcel.readStrongBinder();
  if (mTransferToken == null) {
    throw new IllegalStateException("String_Node_Str");
  }
  if (DEBUG_PARCEL)   Log.d(TAG,"String_Node_Str" + mCurParcel.dataPosition() + "String_Node_Str"+ mTransferToken);
  fetchData();
  if (DEBUG_PARCEL)   Log.d(TAG,"String_Node_Str" + mCurParcel.dataPosition());
  mStringReader=new PooledStringReader(mCurParcel);
  if (DEBUG_PARCEL)   Log.d(TAG,"String_Node_Str" + mStringReader.getStringCount());
  if (DEBUG_PARCEL)   Log.d(TAG,"String_Node_Str" + mCurParcel.dataPosition() + "String_Node_Str"+ mCurParcel.dataAvail()+ "String_Node_Str"+ mNumReadWindows+ "String_Node_Str"+ mNumReadViews);
  mCurParcel.readInt();
  return mCurParcel;
}

Fixed version (ground truth):
Parcel readParcel(int validateToken,int level){
  if (DEBUG_PARCEL)   Log.d(TAG,"String_Node_Str" + mCurParcel.dataPosition() + "String_Node_Str"+ mCurParcel.dataAvail()+ "String_Node_Str"+ mNumReadWindows+ "String_Node_Str"+ mNumReadViews+ "String_Node_Str"+ level);
  int token=mCurParcel.readInt();
  if (token != 0) {
    if (token != validateToken) {
      throw new BadParcelableException("String_Node_Str" + Integer.toHexString(token) + "String_Node_Str"+ Integer.toHexString(validateToken));
    }
    return mCurParcel;
  }
  mTransferToken=mCurParcel.readStrongBinder();
  if (mTransferToken == null) {
    throw new IllegalStateException("String_Node_Str");
  }
  if (DEBUG_PARCEL)   Log.d(TAG,"String_Node_Str" + mCurParcel.dataPosition() + "String_Node_Str"+ mTransferToken);
  fetchData();
  if (DEBUG_PARCEL)   Log.d(TAG,"String_Node_Str" + mCurParcel.dataPosition());
  mStringReader=new PooledStringReader(mCurParcel);
  if (DEBUG_PARCEL)   Log.d(TAG,"String_Node_Str" + mStringReader.getStringCount());
  if (DEBUG_PARCEL)   Log.d(TAG,"String_Node_Str" + mCurParcel.dataPosition() + "String_Node_Str"+ mCurParcel.dataAvail()+ "String_Node_Str"+ mNumReadWindows+ "String_Node_Str"+ mNumReadViews);
  mCurParcel.readInt();
  return mCurParcel;
}
Program: 194046
Project: 194046
Buggy source:
WindowNode(ParcelTransferReader reader){
  Parcel in=reader.readParcel();
  reader.mNumReadWindows++;
  mX=in.readInt();
  mY=in.readInt();
  mWidth=in.readInt();
  mHeight=in.readInt();
  mTitle=TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(in);
  mDisplayId=in.readInt();
  mRoot=new ViewNode(reader);
}

Fixed version (ground truth):
WindowNode(ParcelTransferReader reader){
  Parcel in=reader.readParcel(VALIDATE_WINDOW_TOKEN,0);
  reader.mNumReadWindows++;
  mX=in.readInt();
  mY=in.readInt();
  mWidth=in.readInt();
  mHeight=in.readInt();
  mTitle=TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(in);
  mDisplayId=in.readInt();
  mRoot=new ViewNode(reader,0);
}
Program: 194047
Project: 194047
Buggy source:
@Override public long getStartClockTime(){
  if (!isStartClockTimeValid()) {
    mStartClockTime=System.currentTimeMillis();
    if (isStartClockTimeValid()) {
      recordCurrentTimeChangeLocked(mStartClockTime,SystemClock.elapsedRealtime(),SystemClock.uptimeMillis());
    }
  }
  return mStartClockTime;
}

Fixed version (ground truth):
@Override public long getStartClockTime(){
  final long currentTime=System.currentTimeMillis();
  if (ensureStartClockTime(currentTime)) {
    recordCurrentTimeChangeLocked(currentTime,SystemClock.elapsedRealtime(),SystemClock.uptimeMillis());
  }
  return mStartClockTime;
}
Program: 194048
Project: 194048
Buggy source:
public void noteCurrentTimeChangedLocked(){
  final long currentTime=System.currentTimeMillis();
  final long elapsedRealtime=SystemClock.elapsedRealtime();
  final long uptime=SystemClock.uptimeMillis();
  recordCurrentTimeChangeLocked(currentTime,elapsedRealtime,uptime);
  if (isStartClockTimeValid()) {
    mStartClockTime=currentTime;
  }
}

Fixed version (ground truth):
public void noteCurrentTimeChangedLocked(){
  final long currentTime=System.currentTimeMillis();
  final long elapsedRealtime=SystemClock.elapsedRealtime();
  final long uptime=SystemClock.uptimeMillis();
  recordCurrentTimeChangeLocked(currentTime,elapsedRealtime,uptime);
  ensureStartClockTime(currentTime);
}
Program: 194049
Project: 194049
Buggy source:
@Override public long getStartClockTime(){
  if (!isStartClockTimeValid()) {
    mStartClockTime=System.currentTimeMillis();
    if (isStartClockTimeValid()) {
      recordCurrentTimeChangeLocked(mStartClockTime,SystemClock.elapsedRealtime(),SystemClock.uptimeMillis());
    }
  }
  return mStartClockTime;
}

Fixed version (ground truth):
@Override public long getStartClockTime(){
  final long currentTime=System.currentTimeMillis();
  if (ensureStartClockTime(currentTime)) {
    recordCurrentTimeChangeLocked(currentTime,SystemClock.elapsedRealtime(),SystemClock.uptimeMillis());
  }
  return mStartClockTime;
}
Program: 194050
Project: 194050
Buggy source:
public void noteCurrentTimeChangedLocked(){
  final long currentTime=System.currentTimeMillis();
  final long elapsedRealtime=SystemClock.elapsedRealtime();
  final long uptime=SystemClock.uptimeMillis();
  recordCurrentTimeChangeLocked(currentTime,elapsedRealtime,uptime);
  if (isStartClockTimeValid()) {
    mStartClockTime=currentTime;
  }
}

Fixed version (ground truth):
public void noteCurrentTimeChangedLocked(){
  final long currentTime=System.currentTimeMillis();
  final long elapsedRealtime=SystemClock.elapsedRealtime();
  final long uptime=SystemClock.uptimeMillis();
  recordCurrentTimeChangeLocked(currentTime,elapsedRealtime,uptime);
  ensureStartClockTime(currentTime);
}
Program: 194051
Project: 194051
Buggy source:
Parcel readParcel(){
  if (DEBUG_PARCEL)   Log.d(TAG,"String_Node_Str" + mCurParcel.dataPosition() + "String_Node_Str"+ mCurParcel.dataAvail()+ "String_Node_Str"+ mNumReadWindows+ "String_Node_Str"+ mNumReadViews);
  if (mCurParcel.readInt() != 0) {
    return mCurParcel;
  }
  mTransferToken=mCurParcel.readStrongBinder();
  if (mTransferToken == null) {
    throw new IllegalStateException("String_Node_Str");
  }
  if (DEBUG_PARCEL)   Log.d(TAG,"String_Node_Str" + mCurParcel.dataPosition() + "String_Node_Str"+ mTransferToken);
  fetchData();
  if (DEBUG_PARCEL)   Log.d(TAG,"String_Node_Str" + mCurParcel.dataPosition());
  mStringReader=new PooledStringReader(mCurParcel);
  if (DEBUG_PARCEL)   Log.d(TAG,"String_Node_Str" + mStringReader.getStringCount());
  if (DEBUG_PARCEL)   Log.d(TAG,"String_Node_Str" + mCurParcel.dataPosition() + "String_Node_Str"+ mCurParcel.dataAvail()+ "String_Node_Str"+ mNumReadWindows+ "String_Node_Str"+ mNumReadViews);
  mCurParcel.readInt();
  return mCurParcel;
}

Fixed version (ground truth):
Parcel readParcel(int validateToken,int level){
  if (DEBUG_PARCEL)   Log.d(TAG,"String_Node_Str" + mCurParcel.dataPosition() + "String_Node_Str"+ mCurParcel.dataAvail()+ "String_Node_Str"+ mNumReadWindows+ "String_Node_Str"+ mNumReadViews+ "String_Node_Str"+ level);
  int token=mCurParcel.readInt();
  if (token != 0) {
    if (token != validateToken) {
      throw new BadParcelableException("String_Node_Str" + Integer.toHexString(token) + "String_Node_Str"+ Integer.toHexString(validateToken));
    }
    return mCurParcel;
  }
  mTransferToken=mCurParcel.readStrongBinder();
  if (mTransferToken == null) {
    throw new IllegalStateException("String_Node_Str");
  }
  if (DEBUG_PARCEL)   Log.d(TAG,"String_Node_Str" + mCurParcel.dataPosition() + "String_Node_Str"+ mTransferToken);
  fetchData();
  if (DEBUG_PARCEL)   Log.d(TAG,"String_Node_Str" + mCurParcel.dataPosition());
  mStringReader=new PooledStringReader(mCurParcel);
  if (DEBUG_PARCEL)   Log.d(TAG,"String_Node_Str" + mStringReader.getStringCount());
  if (DEBUG_PARCEL)   Log.d(TAG,"String_Node_Str" + mCurParcel.dataPosition() + "String_Node_Str"+ mCurParcel.dataAvail()+ "String_Node_Str"+ mNumReadWindows+ "String_Node_Str"+ mNumReadViews);
  mCurParcel.readInt();
  return mCurParcel;
}
Program: 194054
Project: 194054
Buggy source:
WindowNode(ParcelTransferReader reader){
  Parcel in=reader.readParcel();
  reader.mNumReadWindows++;
  mX=in.readInt();
  mY=in.readInt();
  mWidth=in.readInt();
  mHeight=in.readInt();
  mTitle=TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(in);
  mDisplayId=in.readInt();
  mRoot=new ViewNode(reader);
}

Fixed version (ground truth):
WindowNode(ParcelTransferReader reader){
  Parcel in=reader.readParcel(VALIDATE_WINDOW_TOKEN,0);
  reader.mNumReadWindows++;
  mX=in.readInt();
  mY=in.readInt();
  mWidth=in.readInt();
  mHeight=in.readInt();
  mTitle=TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(in);
  mDisplayId=in.readInt();
  mRoot=new ViewNode(reader,0);
}
Program: 194055
Project: 194055
Buggy source:
@Override public long getStartClockTime(){
  if (!isStartClockTimeValid()) {
    mStartClockTime=System.currentTimeMillis();
    if (isStartClockTimeValid()) {
      recordCurrentTimeChangeLocked(mStartClockTime,SystemClock.elapsedRealtime(),SystemClock.uptimeMillis());
    }
  }
  return mStartClockTime;
}

Fixed version (ground truth):
@Override public long getStartClockTime(){
  final long currentTime=System.currentTimeMillis();
  if (ensureStartClockTime(currentTime)) {
    recordCurrentTimeChangeLocked(currentTime,SystemClock.elapsedRealtime(),SystemClock.uptimeMillis());
  }
  return mStartClockTime;
}
Program: 194056
Project: 194056
Buggy source:
public void noteCurrentTimeChangedLocked(){
  final long currentTime=System.currentTimeMillis();
  final long elapsedRealtime=SystemClock.elapsedRealtime();
  final long uptime=SystemClock.uptimeMillis();
  recordCurrentTimeChangeLocked(currentTime,elapsedRealtime,uptime);
  if (isStartClockTimeValid()) {
    mStartClockTime=currentTime;
  }
}

Fixed version (ground truth):
public void noteCurrentTimeChangedLocked(){
  final long currentTime=System.currentTimeMillis();
  final long elapsedRealtime=SystemClock.elapsedRealtime();
  final long uptime=SystemClock.uptimeMillis();
  recordCurrentTimeChangeLocked(currentTime,elapsedRealtime,uptime);
  ensureStartClockTime(currentTime);
}
Program: 194057
Project: 194057
Buggy source:
Parcel readParcel(){
  if (DEBUG_PARCEL)   Log.d(TAG,"String_Node_Str" + mCurParcel.dataPosition() + "String_Node_Str"+ mCurParcel.dataAvail()+ "String_Node_Str"+ mNumReadWindows+ "String_Node_Str"+ mNumReadViews);
  if (mCurParcel.readInt() != 0) {
    return mCurParcel;
  }
  mTransferToken=mCurParcel.readStrongBinder();
  if (mTransferToken == null) {
    throw new IllegalStateException("String_Node_Str");
  }
  if (DEBUG_PARCEL)   Log.d(TAG,"String_Node_Str" + mCurParcel.dataPosition() + "String_Node_Str"+ mTransferToken);
  fetchData();
  if (DEBUG_PARCEL)   Log.d(TAG,"String_Node_Str" + mCurParcel.dataPosition());
  mStringReader=new PooledStringReader(mCurParcel);
  if (DEBUG_PARCEL)   Log.d(TAG,"String_Node_Str" + mStringReader.getStringCount());
  if (DEBUG_PARCEL)   Log.d(TAG,"String_Node_Str" + mCurParcel.dataPosition() + "String_Node_Str"+ mCurParcel.dataAvail()+ "String_Node_Str"+ mNumReadWindows+ "String_Node_Str"+ mNumReadViews);
  mCurParcel.readInt();
  return mCurParcel;
}

Fixed version (ground truth):
Parcel readParcel(int validateToken,int level){
  if (DEBUG_PARCEL)   Log.d(TAG,"String_Node_Str" + mCurParcel.dataPosition() + "String_Node_Str"+ mCurParcel.dataAvail()+ "String_Node_Str"+ mNumReadWindows+ "String_Node_Str"+ mNumReadViews+ "String_Node_Str"+ level);
  int token=mCurParcel.readInt();
  if (token != 0) {
    if (token != validateToken) {
      throw new BadParcelableException("String_Node_Str" + Integer.toHexString(token) + "String_Node_Str"+ Integer.toHexString(validateToken));
    }
    return mCurParcel;
  }
  mTransferToken=mCurParcel.readStrongBinder();
  if (mTransferToken == null) {
    throw new IllegalStateException("String_Node_Str");
  }
  if (DEBUG_PARCEL)   Log.d(TAG,"String_Node_Str" + mCurParcel.dataPosition() + "String_Node_Str"+ mTransferToken);
  fetchData();
  if (DEBUG_PARCEL)   Log.d(TAG,"String_Node_Str" + mCurParcel.dataPosition());
  mStringReader=new PooledStringReader(mCurParcel);
  if (DEBUG_PARCEL)   Log.d(TAG,"String_Node_Str" + mStringReader.getStringCount());
  if (DEBUG_PARCEL)   Log.d(TAG,"String_Node_Str" + mCurParcel.dataPosition() + "String_Node_Str"+ mCurParcel.dataAvail()+ "String_Node_Str"+ mNumReadWindows+ "String_Node_Str"+ mNumReadViews);
  mCurParcel.readInt();
  return mCurParcel;
}
Program: 194060
Project: 194060
Buggy source:
WindowNode(ParcelTransferReader reader){
  Parcel in=reader.readParcel();
  reader.mNumReadWindows++;
  mX=in.readInt();
  mY=in.readInt();
  mWidth=in.readInt();
  mHeight=in.readInt();
  mTitle=TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(in);
  mDisplayId=in.readInt();
  mRoot=new ViewNode(reader);
}

Fixed version (ground truth):
WindowNode(ParcelTransferReader reader){
  Parcel in=reader.readParcel(VALIDATE_WINDOW_TOKEN,0);
  reader.mNumReadWindows++;
  mX=in.readInt();
  mY=in.readInt();
  mWidth=in.readInt();
  mHeight=in.readInt();
  mTitle=TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(in);
  mDisplayId=in.readInt();
  mRoot=new ViewNode(reader,0);
}
Program: 194061
Project: 194061
Buggy source:
Parcel readParcel(){
  if (DEBUG_PARCEL)   Log.d(TAG,"String_Node_Str" + mCurParcel.dataPosition() + "String_Node_Str"+ mCurParcel.dataAvail()+ "String_Node_Str"+ mNumReadWindows+ "String_Node_Str"+ mNumReadViews);
  if (mCurParcel.readInt() != 0) {
    return mCurParcel;
  }
  mTransferToken=mCurParcel.readStrongBinder();
  if (mTransferToken == null) {
    throw new IllegalStateException("String_Node_Str");
  }
  if (DEBUG_PARCEL)   Log.d(TAG,"String_Node_Str" + mCurParcel.dataPosition() + "String_Node_Str"+ mTransferToken);
  fetchData();
  if (DEBUG_PARCEL)   Log.d(TAG,"String_Node_Str" + mCurParcel.dataPosition());
  mStringReader=new PooledStringReader(mCurParcel);
  if (DEBUG_PARCEL)   Log.d(TAG,"String_Node_Str" + mStringReader.getStringCount());
  if (DEBUG_PARCEL)   Log.d(TAG,"String_Node_Str" + mCurParcel.dataPosition() + "String_Node_Str"+ mCurParcel.dataAvail()+ "String_Node_Str"+ mNumReadWindows+ "String_Node_Str"+ mNumReadViews);
  mCurParcel.readInt();
  return mCurParcel;
}

Fixed version (ground truth):
Parcel readParcel(int validateToken,int level){
  if (DEBUG_PARCEL)   Log.d(TAG,"String_Node_Str" + mCurParcel.dataPosition() + "String_Node_Str"+ mCurParcel.dataAvail()+ "String_Node_Str"+ mNumReadWindows+ "String_Node_Str"+ mNumReadViews+ "String_Node_Str"+ level);
  int token=mCurParcel.readInt();
  if (token != 0) {
    if (token != validateToken) {
      throw new BadParcelableException("String_Node_Str" + Integer.toHexString(token) + "String_Node_Str"+ Integer.toHexString(validateToken));
    }
    return mCurParcel;
  }
  mTransferToken=mCurParcel.readStrongBinder();
  if (mTransferToken == null) {
    throw new IllegalStateException("String_Node_Str");
  }
  if (DEBUG_PARCEL)   Log.d(TAG,"String_Node_Str" + mCurParcel.dataPosition() + "String_Node_Str"+ mTransferToken);
  fetchData();
  if (DEBUG_PARCEL)   Log.d(TAG,"String_Node_Str" + mCurParcel.dataPosition());
  mStringReader=new PooledStringReader(mCurParcel);
  if (DEBUG_PARCEL)   Log.d(TAG,"String_Node_Str" + mStringReader.getStringCount());
  if (DEBUG_PARCEL)   Log.d(TAG,"String_Node_Str" + mCurParcel.dataPosition() + "String_Node_Str"+ mCurParcel.dataAvail()+ "String_Node_Str"+ mNumReadWindows+ "String_Node_Str"+ mNumReadViews);
  mCurParcel.readInt();
  return mCurParcel;
}
Program: 194064
Project: 194064
Buggy source:
WindowNode(ParcelTransferReader reader){
  Parcel in=reader.readParcel();
  reader.mNumReadWindows++;
  mX=in.readInt();
  mY=in.readInt();
  mWidth=in.readInt();
  mHeight=in.readInt();
  mTitle=TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(in);
  mDisplayId=in.readInt();
  mRoot=new ViewNode(reader);
}

Fixed version (ground truth):
WindowNode(ParcelTransferReader reader){
  Parcel in=reader.readParcel(VALIDATE_WINDOW_TOKEN,0);
  reader.mNumReadWindows++;
  mX=in.readInt();
  mY=in.readInt();
  mWidth=in.readInt();
  mHeight=in.readInt();
  mTitle=TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(in);
  mDisplayId=in.readInt();
  mRoot=new ViewNode(reader,0);
}
Program: 194065
Project: 194065
Buggy source:
@Override public long getStartClockTime(){
  if (!isStartClockTimeValid()) {
    mStartClockTime=System.currentTimeMillis();
    if (isStartClockTimeValid()) {
      recordCurrentTimeChangeLocked(mStartClockTime,SystemClock.elapsedRealtime(),SystemClock.uptimeMillis());
    }
  }
  return mStartClockTime;
}

Fixed version (ground truth):
@Override public long getStartClockTime(){
  final long currentTime=System.currentTimeMillis();
  if (ensureStartClockTime(currentTime)) {
    recordCurrentTimeChangeLocked(currentTime,SystemClock.elapsedRealtime(),SystemClock.uptimeMillis());
  }
  return mStartClockTime;
}
Program: 194066
Project: 194066
Buggy source:
public void noteCurrentTimeChangedLocked(){
  final long currentTime=System.currentTimeMillis();
  final long elapsedRealtime=SystemClock.elapsedRealtime();
  final long uptime=SystemClock.uptimeMillis();
  recordCurrentTimeChangeLocked(currentTime,elapsedRealtime,uptime);
  if (isStartClockTimeValid()) {
    mStartClockTime=currentTime;
  }
}

Fixed version (ground truth):
public void noteCurrentTimeChangedLocked(){
  final long currentTime=System.currentTimeMillis();
  final long elapsedRealtime=SystemClock.elapsedRealtime();
  final long uptime=SystemClock.uptimeMillis();
  recordCurrentTimeChangeLocked(currentTime,elapsedRealtime,uptime);
  ensureStartClockTime(currentTime);
}
Program: 194067
Project: 194067
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) {
    final TaskRecord task=mTaskHistory.get(taskNdx);
    final boolean notCurrentUserTask=!mStackSupervisor.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_FOR_ALL_USERS) == 0) {
        return null;
      }
      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=!mStackSupervisor.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_FOR_ALL_USERS) == 0) {
        continue;
      }
      if (!r.finishing && r.intent.getComponent().equals(cls) && r.userId == userId) {
        return r;
      }
    }
  }
  return null;
}
Program: 194068
Project: 194068
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) {
    final TaskRecord task=mTaskHistory.get(taskNdx);
    final boolean notCurrentUserTask=!mStackSupervisor.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_FOR_ALL_USERS) == 0) {
        return null;
      }
      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=!mStackSupervisor.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_FOR_ALL_USERS) == 0) {
        continue;
      }
      if (!r.finishing && r.intent.getComponent().equals(cls) && r.userId == userId) {
        return r;
      }
    }
  }
  return null;
}
Program: 194069
Project: 194069
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) {
    final TaskRecord task=mTaskHistory.get(taskNdx);
    final boolean notCurrentUserTask=!mStackSupervisor.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_FOR_ALL_USERS) == 0) {
        return null;
      }
      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=!mStackSupervisor.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_FOR_ALL_USERS) == 0) {
        continue;
      }
      if (!r.finishing && r.intent.getComponent().equals(cls) && r.userId == userId) {
        return r;
      }
    }
  }
  return null;
}
Program: 194070
Project: 194070
Buggy source:
Parcel readParcel(){
  if (DEBUG_PARCEL)   Log.d(TAG,"String_Node_Str" + mCurParcel.dataPosition() + "String_Node_Str"+ mCurParcel.dataAvail()+ "String_Node_Str"+ mNumReadWindows+ "String_Node_Str"+ mNumReadViews);
  if (mCurParcel.readInt() != 0) {
    return mCurParcel;
  }
  mTransferToken=mCurParcel.readStrongBinder();
  if (mTransferToken == null) {
    throw new IllegalStateException("String_Node_Str");
  }
  if (DEBUG_PARCEL)   Log.d(TAG,"String_Node_Str" + mCurParcel.dataPosition() + "String_Node_Str"+ mTransferToken);
  fetchData();
  if (DEBUG_PARCEL)   Log.d(TAG,"String_Node_Str" + mCurParcel.dataPosition());
  mStringReader=new PooledStringReader(mCurParcel);
  if (DEBUG_PARCEL)   Log.d(TAG,"String_Node_Str" + mStringReader.getStringCount());
  if (DEBUG_PARCEL)   Log.d(TAG,"String_Node_Str" + mCurParcel.dataPosition() + "String_Node_Str"+ mCurParcel.dataAvail()+ "String_Node_Str"+ mNumReadWindows+ "String_Node_Str"+ mNumReadViews);
  mCurParcel.readInt();
  return mCurParcel;
}

Fixed version (ground truth):
Parcel readParcel(int validateToken,int level){
  if (DEBUG_PARCEL)   Log.d(TAG,"String_Node_Str" + mCurParcel.dataPosition() + "String_Node_Str"+ mCurParcel.dataAvail()+ "String_Node_Str"+ mNumReadWindows+ "String_Node_Str"+ mNumReadViews+ "String_Node_Str"+ level);
  int token=mCurParcel.readInt();
  if (token != 0) {
    if (token != validateToken) {
      throw new BadParcelableException("String_Node_Str" + Integer.toHexString(token) + "String_Node_Str"+ Integer.toHexString(validateToken));
    }
    return mCurParcel;
  }
  mTransferToken=mCurParcel.readStrongBinder();
  if (mTransferToken == null) {
    throw new IllegalStateException("String_Node_Str");
  }
  if (DEBUG_PARCEL)   Log.d(TAG,"String_Node_Str" + mCurParcel.dataPosition() + "String_Node_Str"+ mTransferToken);
  fetchData();
  if (DEBUG_PARCEL)   Log.d(TAG,"String_Node_Str" + mCurParcel.dataPosition());
  mStringReader=new PooledStringReader(mCurParcel);
  if (DEBUG_PARCEL)   Log.d(TAG,"String_Node_Str" + mStringReader.getStringCount());
  if (DEBUG_PARCEL)   Log.d(TAG,"String_Node_Str" + mCurParcel.dataPosition() + "String_Node_Str"+ mCurParcel.dataAvail()+ "String_Node_Str"+ mNumReadWindows+ "String_Node_Str"+ mNumReadViews);
  mCurParcel.readInt();
  return mCurParcel;
}
Program: 194073
Project: 194073
Buggy source:
WindowNode(ParcelTransferReader reader){
  Parcel in=reader.readParcel();
  reader.mNumReadWindows++;
  mX=in.readInt();
  mY=in.readInt();
  mWidth=in.readInt();
  mHeight=in.readInt();
  mTitle=TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(in);
  mDisplayId=in.readInt();
  mRoot=new ViewNode(reader);
}

Fixed version (ground truth):
WindowNode(ParcelTransferReader reader){
  Parcel in=reader.readParcel(VALIDATE_WINDOW_TOKEN,0);
  reader.mNumReadWindows++;
  mX=in.readInt();
  mY=in.readInt();
  mWidth=in.readInt();
  mHeight=in.readInt();
  mTitle=TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(in);
  mDisplayId=in.readInt();
  mRoot=new ViewNode(reader,0);
}
Program: 194074
Project: 194074
Buggy source:
private static int showUsage(){
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  return 1;
}

Fixed version (ground truth):
private static int showUsage(){
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  return 1;
}
Program: 194075
Project: 194075
Buggy source:
public void runListDisks() throws RemoteException {
  final DiskInfo[] disks=mSm.getDisks();
  for (  DiskInfo disk : disks) {
    System.out.println(disk.getId());
  }
}

Fixed version (ground truth):
public void runListDisks() throws RemoteException {
  final boolean onlyAdoptable="String_Node_Str".equals(nextArg());
  final DiskInfo[] disks=mSm.getDisks();
  for (  DiskInfo disk : disks) {
    if (!onlyAdoptable || disk.isAdoptable()) {
      System.out.println(disk.getId());
    }
  }
}
Program: 194076
Project: 194076
Buggy source:
public void run(String[] args) throws Exception {
  if (args.length < 1) {
    throw new IllegalArgumentException();
  }
  mSm=IMountService.Stub.asInterface(ServiceManager.getService("String_Node_Str"));
  if (mSm == null) {
    throw new RemoteException("String_Node_Str");
  }
  mArgs=args;
  String op=args[0];
  mNextArg=1;
  if ("String_Node_Str".equals(op)) {
    runListDisks();
  }
 else   if ("String_Node_Str".equals(op)) {
    runListVolumes();
  }
 else   if ("String_Node_Str".equals(op)) {
    runHasAdoptable();
  }
 else   if ("String_Node_Str".equals(op)) {
    runGetPrimaryStorageUuid();
  }
 else   if ("String_Node_Str".equals(op)) {
    runSetForceAdoptable();
  }
 else   if ("String_Node_Str".equals(op)) {
    runPartition();
  }
 else   if ("String_Node_Str".equals(op)) {
    runMount();
  }
 else   if ("String_Node_Str".equals(op)) {
    runUnmount();
  }
 else   if ("String_Node_Str".equals(op)) {
    runFormat();
  }
 else   if ("String_Node_Str".equals(op)) {
    runForget();
  }
 else {
    throw new IllegalArgumentException();
  }
}

Fixed version (ground truth):
public void run(String[] args) throws Exception {
  if (args.length < 1) {
    throw new IllegalArgumentException();
  }
  mSm=IMountService.Stub.asInterface(ServiceManager.getService("String_Node_Str"));
  if (mSm == null) {
    throw new RemoteException("String_Node_Str");
  }
  mArgs=args;
  String op=args[0];
  mNextArg=1;
  if ("String_Node_Str".equals(op)) {
    runListDisks();
  }
 else   if ("String_Node_Str".equals(op)) {
    runListVolumes();
  }
 else   if ("String_Node_Str".equals(op)) {
    runHasAdoptable();
  }
 else   if ("String_Node_Str".equals(op)) {
    runGetPrimaryStorageUuid();
  }
 else   if ("String_Node_Str".equals(op)) {
    runSetForceAdoptable();
  }
 else   if ("String_Node_Str".equals(op)) {
    runPartition();
  }
 else   if ("String_Node_Str".equals(op)) {
    runMount();
  }
 else   if ("String_Node_Str".equals(op)) {
    runUnmount();
  }
 else   if ("String_Node_Str".equals(op)) {
    runFormat();
  }
 else   if ("String_Node_Str".equals(op)) {
    runBenchmark();
  }
 else   if ("String_Node_Str".equals(op)) {
    runForget();
  }
 else {
    throw new IllegalArgumentException();
  }
}
Program: 194080
Project: 194080
Buggy source:
@Override public long getStartClockTime(){
  if (!isStartClockTimeValid()) {
    mStartClockTime=System.currentTimeMillis();
    if (isStartClockTimeValid()) {
      recordCurrentTimeChangeLocked(mStartClockTime,SystemClock.elapsedRealtime(),SystemClock.uptimeMillis());
    }
  }
  return mStartClockTime;
}

Fixed version (ground truth):
@Override public long getStartClockTime(){
  final long currentTime=System.currentTimeMillis();
  if (ensureStartClockTime(currentTime)) {
    recordCurrentTimeChangeLocked(currentTime,SystemClock.elapsedRealtime(),SystemClock.uptimeMillis());
  }
  return mStartClockTime;
}
Program: 194081
Project: 194081
Buggy source:
public void noteCurrentTimeChangedLocked(){
  final long currentTime=System.currentTimeMillis();
  final long elapsedRealtime=SystemClock.elapsedRealtime();
  final long uptime=SystemClock.uptimeMillis();
  recordCurrentTimeChangeLocked(currentTime,elapsedRealtime,uptime);
  if (isStartClockTimeValid()) {
    mStartClockTime=currentTime;
  }
}

Fixed version (ground truth):
public void noteCurrentTimeChangedLocked(){
  final long currentTime=System.currentTimeMillis();
  final long elapsedRealtime=SystemClock.elapsedRealtime();
  final long uptime=SystemClock.uptimeMillis();
  recordCurrentTimeChangeLocked(currentTime,elapsedRealtime,uptime);
  ensureStartClockTime(currentTime);
}
Program: 194082
Project: 194082
Buggy source:
private static int showUsage(){
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  return 1;
}

Fixed version (ground truth):
private static int showUsage(){
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  return 1;
}
Program: 194083
Project: 194083
Buggy source:
public void runListDisks() throws RemoteException {
  final DiskInfo[] disks=mSm.getDisks();
  for (  DiskInfo disk : disks) {
    System.out.println(disk.getId());
  }
}

Fixed version (ground truth):
public void runListDisks() throws RemoteException {
  final boolean onlyAdoptable="String_Node_Str".equals(nextArg());
  final DiskInfo[] disks=mSm.getDisks();
  for (  DiskInfo disk : disks) {
    if (!onlyAdoptable || disk.isAdoptable()) {
      System.out.println(disk.getId());
    }
  }
}
Program: 194084
Project: 194084
Buggy source:
public void run(String[] args) throws Exception {
  if (args.length < 1) {
    throw new IllegalArgumentException();
  }
  mSm=IMountService.Stub.asInterface(ServiceManager.getService("String_Node_Str"));
  if (mSm == null) {
    throw new RemoteException("String_Node_Str");
  }
  mArgs=args;
  String op=args[0];
  mNextArg=1;
  if ("String_Node_Str".equals(op)) {
    runListDisks();
  }
 else   if ("String_Node_Str".equals(op)) {
    runListVolumes();
  }
 else   if ("String_Node_Str".equals(op)) {
    runHasAdoptable();
  }
 else   if ("String_Node_Str".equals(op)) {
    runGetPrimaryStorageUuid();
  }
 else   if ("String_Node_Str".equals(op)) {
    runSetForceAdoptable();
  }
 else   if ("String_Node_Str".equals(op)) {
    runPartition();
  }
 else   if ("String_Node_Str".equals(op)) {
    runMount();
  }
 else   if ("String_Node_Str".equals(op)) {
    runUnmount();
  }
 else   if ("String_Node_Str".equals(op)) {
    runFormat();
  }
 else   if ("String_Node_Str".equals(op)) {
    runForget();
  }
 else {
    throw new IllegalArgumentException();
  }
}

Fixed version (ground truth):
public void run(String[] args) throws Exception {
  if (args.length < 1) {
    throw new IllegalArgumentException();
  }
  mSm=IMountService.Stub.asInterface(ServiceManager.getService("String_Node_Str"));
  if (mSm == null) {
    throw new RemoteException("String_Node_Str");
  }
  mArgs=args;
  String op=args[0];
  mNextArg=1;
  if ("String_Node_Str".equals(op)) {
    runListDisks();
  }
 else   if ("String_Node_Str".equals(op)) {
    runListVolumes();
  }
 else   if ("String_Node_Str".equals(op)) {
    runHasAdoptable();
  }
 else   if ("String_Node_Str".equals(op)) {
    runGetPrimaryStorageUuid();
  }
 else   if ("String_Node_Str".equals(op)) {
    runSetForceAdoptable();
  }
 else   if ("String_Node_Str".equals(op)) {
    runPartition();
  }
 else   if ("String_Node_Str".equals(op)) {
    runMount();
  }
 else   if ("String_Node_Str".equals(op)) {
    runUnmount();
  }
 else   if ("String_Node_Str".equals(op)) {
    runFormat();
  }
 else   if ("String_Node_Str".equals(op)) {
    runBenchmark();
  }
 else   if ("String_Node_Str".equals(op)) {
    runForget();
  }
 else {
    throw new IllegalArgumentException();
  }
}
Program: 194088
Project: 194088
Buggy source:
Parcel readParcel(){
  if (DEBUG_PARCEL)   Log.d(TAG,"String_Node_Str" + mCurParcel.dataPosition() + "String_Node_Str"+ mCurParcel.dataAvail()+ "String_Node_Str"+ mNumReadWindows+ "String_Node_Str"+ mNumReadViews);
  if (mCurParcel.readInt() != 0) {
    return mCurParcel;
  }
  mTransferToken=mCurParcel.readStrongBinder();
  if (mTransferToken == null) {
    throw new IllegalStateException("String_Node_Str");
  }
  if (DEBUG_PARCEL)   Log.d(TAG,"String_Node_Str" + mCurParcel.dataPosition() + "String_Node_Str"+ mTransferToken);
  fetchData();
  if (DEBUG_PARCEL)   Log.d(TAG,"String_Node_Str" + mCurParcel.dataPosition());
  mStringReader=new PooledStringReader(mCurParcel);
  if (DEBUG_PARCEL)   Log.d(TAG,"String_Node_Str" + mStringReader.getStringCount());
  if (DEBUG_PARCEL)   Log.d(TAG,"String_Node_Str" + mCurParcel.dataPosition() + "String_Node_Str"+ mCurParcel.dataAvail()+ "String_Node_Str"+ mNumReadWindows+ "String_Node_Str"+ mNumReadViews);
  mCurParcel.readInt();
  return mCurParcel;
}

Fixed version (ground truth):
Parcel readParcel(int validateToken,int level){
  if (DEBUG_PARCEL)   Log.d(TAG,"String_Node_Str" + mCurParcel.dataPosition() + "String_Node_Str"+ mCurParcel.dataAvail()+ "String_Node_Str"+ mNumReadWindows+ "String_Node_Str"+ mNumReadViews+ "String_Node_Str"+ level);
  int token=mCurParcel.readInt();
  if (token != 0) {
    if (token != validateToken) {
      throw new BadParcelableException("String_Node_Str" + Integer.toHexString(token) + "String_Node_Str"+ Integer.toHexString(validateToken));
    }
    return mCurParcel;
  }
  mTransferToken=mCurParcel.readStrongBinder();
  if (mTransferToken == null) {
    throw new IllegalStateException("String_Node_Str");
  }
  if (DEBUG_PARCEL)   Log.d(TAG,"String_Node_Str" + mCurParcel.dataPosition() + "String_Node_Str"+ mTransferToken);
  fetchData();
  if (DEBUG_PARCEL)   Log.d(TAG,"String_Node_Str" + mCurParcel.dataPosition());
  mStringReader=new PooledStringReader(mCurParcel);
  if (DEBUG_PARCEL)   Log.d(TAG,"String_Node_Str" + mStringReader.getStringCount());
  if (DEBUG_PARCEL)   Log.d(TAG,"String_Node_Str" + mCurParcel.dataPosition() + "String_Node_Str"+ mCurParcel.dataAvail()+ "String_Node_Str"+ mNumReadWindows+ "String_Node_Str"+ mNumReadViews);
  mCurParcel.readInt();
  return mCurParcel;
}
Program: 194091
Project: 194091
Buggy source:
WindowNode(ParcelTransferReader reader){
  Parcel in=reader.readParcel();
  reader.mNumReadWindows++;
  mX=in.readInt();
  mY=in.readInt();
  mWidth=in.readInt();
  mHeight=in.readInt();
  mTitle=TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(in);
  mDisplayId=in.readInt();
  mRoot=new ViewNode(reader);
}

Fixed version (ground truth):
WindowNode(ParcelTransferReader reader){
  Parcel in=reader.readParcel(VALIDATE_WINDOW_TOKEN,0);
  reader.mNumReadWindows++;
  mX=in.readInt();
  mY=in.readInt();
  mWidth=in.readInt();
  mHeight=in.readInt();
  mTitle=TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(in);
  mDisplayId=in.readInt();
  mRoot=new ViewNode(reader,0);
}
Program: 194092
Project: 194092
Buggy source:
@Override public long getStartClockTime(){
  if (!isStartClockTimeValid()) {
    mStartClockTime=System.currentTimeMillis();
    if (isStartClockTimeValid()) {
      recordCurrentTimeChangeLocked(mStartClockTime,SystemClock.elapsedRealtime(),SystemClock.uptimeMillis());
    }
  }
  return mStartClockTime;
}

Fixed version (ground truth):
@Override public long getStartClockTime(){
  final long currentTime=System.currentTimeMillis();
  if (ensureStartClockTime(currentTime)) {
    recordCurrentTimeChangeLocked(currentTime,SystemClock.elapsedRealtime(),SystemClock.uptimeMillis());
  }
  return mStartClockTime;
}
Program: 194093
Project: 194093
Buggy source:
public void noteCurrentTimeChangedLocked(){
  final long currentTime=System.currentTimeMillis();
  final long elapsedRealtime=SystemClock.elapsedRealtime();
  final long uptime=SystemClock.uptimeMillis();
  recordCurrentTimeChangeLocked(currentTime,elapsedRealtime,uptime);
  if (isStartClockTimeValid()) {
    mStartClockTime=currentTime;
  }
}

Fixed version (ground truth):
public void noteCurrentTimeChangedLocked(){
  final long currentTime=System.currentTimeMillis();
  final long elapsedRealtime=SystemClock.elapsedRealtime();
  final long uptime=SystemClock.uptimeMillis();
  recordCurrentTimeChangeLocked(currentTime,elapsedRealtime,uptime);
  ensureStartClockTime(currentTime);
}
Program: 194094
Project: 194094
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) {
    final TaskRecord task=mTaskHistory.get(taskNdx);
    final boolean notCurrentUserTask=!mStackSupervisor.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_FOR_ALL_USERS) == 0) {
        return null;
      }
      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=!mStackSupervisor.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_FOR_ALL_USERS) == 0) {
        continue;
      }
      if (!r.finishing && r.intent.getComponent().equals(cls) && r.userId == userId) {
        return r;
      }
    }
  }
  return null;
}
Program: 194095
Project: 194095
Buggy source:
Parcel readParcel(){
  if (DEBUG_PARCEL)   Log.d(TAG,"String_Node_Str" + mCurParcel.dataPosition() + "String_Node_Str"+ mCurParcel.dataAvail()+ "String_Node_Str"+ mNumReadWindows+ "String_Node_Str"+ mNumReadViews);
  if (mCurParcel.readInt() != 0) {
    return mCurParcel;
  }
  mTransferToken=mCurParcel.readStrongBinder();
  if (mTransferToken == null) {
    throw new IllegalStateException("String_Node_Str");
  }
  if (DEBUG_PARCEL)   Log.d(TAG,"String_Node_Str" + mCurParcel.dataPosition() + "String_Node_Str"+ mTransferToken);
  fetchData();
  if (DEBUG_PARCEL)   Log.d(TAG,"String_Node_Str" + mCurParcel.dataPosition());
  mStringReader=new PooledStringReader(mCurParcel);
  if (DEBUG_PARCEL)   Log.d(TAG,"String_Node_Str" + mStringReader.getStringCount());
  if (DEBUG_PARCEL)   Log.d(TAG,"String_Node_Str" + mCurParcel.dataPosition() + "String_Node_Str"+ mCurParcel.dataAvail()+ "String_Node_Str"+ mNumReadWindows+ "String_Node_Str"+ mNumReadViews);
  mCurParcel.readInt();
  return mCurParcel;
}

Fixed version (ground truth):
Parcel readParcel(int validateToken,int level){
  if (DEBUG_PARCEL)   Log.d(TAG,"String_Node_Str" + mCurParcel.dataPosition() + "String_Node_Str"+ mCurParcel.dataAvail()+ "String_Node_Str"+ mNumReadWindows+ "String_Node_Str"+ mNumReadViews+ "String_Node_Str"+ level);
  int token=mCurParcel.readInt();
  if (token != 0) {
    if (token != validateToken) {
      throw new BadParcelableException("String_Node_Str" + Integer.toHexString(token) + "String_Node_Str"+ Integer.toHexString(validateToken));
    }
    return mCurParcel;
  }
  mTransferToken=mCurParcel.readStrongBinder();
  if (mTransferToken == null) {
    throw new IllegalStateException("String_Node_Str");
  }
  if (DEBUG_PARCEL)   Log.d(TAG,"String_Node_Str" + mCurParcel.dataPosition() + "String_Node_Str"+ mTransferToken);
  fetchData();
  if (DEBUG_PARCEL)   Log.d(TAG,"String_Node_Str" + mCurParcel.dataPosition());
  mStringReader=new PooledStringReader(mCurParcel);
  if (DEBUG_PARCEL)   Log.d(TAG,"String_Node_Str" + mStringReader.getStringCount());
  if (DEBUG_PARCEL)   Log.d(TAG,"String_Node_Str" + mCurParcel.dataPosition() + "String_Node_Str"+ mCurParcel.dataAvail()+ "String_Node_Str"+ mNumReadWindows+ "String_Node_Str"+ mNumReadViews);
  mCurParcel.readInt();
  return mCurParcel;
}
Program: 194098
Project: 194098
Buggy source:
WindowNode(ParcelTransferReader reader){
  Parcel in=reader.readParcel();
  reader.mNumReadWindows++;
  mX=in.readInt();
  mY=in.readInt();
  mWidth=in.readInt();
  mHeight=in.readInt();
  mTitle=TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(in);
  mDisplayId=in.readInt();
  mRoot=new ViewNode(reader);
}

Fixed version (ground truth):
WindowNode(ParcelTransferReader reader){
  Parcel in=reader.readParcel(VALIDATE_WINDOW_TOKEN,0);
  reader.mNumReadWindows++;
  mX=in.readInt();
  mY=in.readInt();
  mWidth=in.readInt();
  mHeight=in.readInt();
  mTitle=TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(in);
  mDisplayId=in.readInt();
  mRoot=new ViewNode(reader,0);
}
Program: 194099
Project: 194099
Buggy source:
@Override public long getStartClockTime(){
  if (!isStartClockTimeValid()) {
    mStartClockTime=System.currentTimeMillis();
    if (isStartClockTimeValid()) {
      recordCurrentTimeChangeLocked(mStartClockTime,SystemClock.elapsedRealtime(),SystemClock.uptimeMillis());
    }
  }
  return mStartClockTime;
}

Fixed version (ground truth):
@Override public long getStartClockTime(){
  final long currentTime=System.currentTimeMillis();
  if (ensureStartClockTime(currentTime)) {
    recordCurrentTimeChangeLocked(currentTime,SystemClock.elapsedRealtime(),SystemClock.uptimeMillis());
  }
  return mStartClockTime;
}
Program: 194100
Project: 194100
Buggy source:
public void noteCurrentTimeChangedLocked(){
  final long currentTime=System.currentTimeMillis();
  final long elapsedRealtime=SystemClock.elapsedRealtime();
  final long uptime=SystemClock.uptimeMillis();
  recordCurrentTimeChangeLocked(currentTime,elapsedRealtime,uptime);
  if (isStartClockTimeValid()) {
    mStartClockTime=currentTime;
  }
}

Fixed version (ground truth):
public void noteCurrentTimeChangedLocked(){
  final long currentTime=System.currentTimeMillis();
  final long elapsedRealtime=SystemClock.elapsedRealtime();
  final long uptime=SystemClock.uptimeMillis();
  recordCurrentTimeChangeLocked(currentTime,elapsedRealtime,uptime);
  ensureStartClockTime(currentTime);
}