nus-yam/ex-repair huggingface dataset:
Program: 2099
Project: 2099
Buggy source:
final ActivityRecord finishCurrentActivityLocked(ActivityRecord r,int mode,boolean oomAdj){
  if (mode == FINISH_AFTER_VISIBLE && r.nowVisible) {
    if (!mStackSupervisor.mStoppingActivities.contains(r)) {
      mStackSupervisor.mStoppingActivities.add(r);
      if (mStackSupervisor.mStoppingActivities.size() > 3 || r.frontOfTask && mTaskHistory.size() <= 1) {
        mStackSupervisor.scheduleIdleLocked();
      }
 else {
        checkReadyForSleepLocked();
      }
    }
    if (DEBUG_STATES)     Slog.v(TAG,"String_Node_Str" + r + "String_Node_Str");
    r.state=ActivityState.STOPPING;
    if (oomAdj) {
      mService.updateOomAdjLocked();
    }
    return r;
  }
  mStackSupervisor.mStoppingActivities.remove(r);
  mGoingToSleepActivities.remove(r);
  mStackSupervisor.mWaitingVisibleActivities.remove(r);
  if (mResumedActivity == r) {
    mResumedActivity=null;
  }
  final ActivityState prevState=r.state;
  if (DEBUG_STATES)   Slog.v(TAG,"String_Node_Str" + r);
  r.state=ActivityState.FINISHING;
  if (mode == FINISH_IMMEDIATELY || prevState == ActivityState.STOPPED || prevState == ActivityState.INITIALIZING) {
    boolean activityRemoved=destroyActivityLocked(r,true,oomAdj,"String_Node_Str");
    if (activityRemoved) {
      mStackSupervisor.getFocusedStack().resumeTopActivityLocked(null);
    }
    return activityRemoved ? null : r;
  }
  if (localLOGV)   Slog.v(TAG,"String_Node_Str" + r);
  mStackSupervisor.mFinishingActivities.add(r);
  mStackSupervisor.getFocusedStack().resumeTopActivityLocked(null);
  return r;
}

Fixed version (ground truth):
final ActivityRecord finishCurrentActivityLocked(ActivityRecord r,int mode,boolean oomAdj){
  if (mode == FINISH_AFTER_VISIBLE && r.nowVisible) {
    if (!mStackSupervisor.mStoppingActivities.contains(r)) {
      mStackSupervisor.mStoppingActivities.add(r);
      if (mStackSupervisor.mStoppingActivities.size() > 3 || r.frontOfTask && mTaskHistory.size() <= 1) {
        mStackSupervisor.scheduleIdleLocked();
      }
 else {
        checkReadyForSleepLocked();
      }
    }
    if (DEBUG_STATES)     Slog.v(TAG,"String_Node_Str" + r + "String_Node_Str");
    r.state=ActivityState.STOPPING;
    if (oomAdj) {
      mService.updateOomAdjLocked();
    }
    return r;
  }
  mStackSupervisor.mStoppingActivities.remove(r);
  mGoingToSleepActivities.remove(r);
  mStackSupervisor.mWaitingVisibleActivities.remove(r);
  if (mResumedActivity == r) {
    mResumedActivity=null;
  }
  final ActivityState prevState=r.state;
  if (DEBUG_STATES)   Slog.v(TAG,"String_Node_Str" + r);
  r.state=ActivityState.FINISHING;
  if (mode == FINISH_IMMEDIATELY || prevState == ActivityState.STOPPED || prevState == ActivityState.INITIALIZING) {
    boolean activityRemoved=destroyActivityLocked(r,true,oomAdj,"String_Node_Str");
    if (activityRemoved) {
      mStackSupervisor.resumeTopActivitiesLocked();
    }
    return activityRemoved ? null : r;
  }
  if (localLOGV)   Slog.v(TAG,"String_Node_Str" + r);
  mStackSupervisor.mFinishingActivities.add(r);
  mStackSupervisor.getFocusedStack().resumeTopActivityLocked(null);
  return r;
}
Program: 2100
Project: 2100
Buggy source:
final void activityDestroyedLocked(IBinder token){
  final long origId=Binder.clearCallingIdentity();
  try {
    ActivityRecord r=ActivityRecord.forToken(token);
    if (r != null) {
      mHandler.removeMessages(DESTROY_TIMEOUT_MSG,r);
    }
    if (isInStackLocked(token) != null) {
      if (r.state == ActivityState.DESTROYING) {
        cleanUpActivityLocked(r,true,false);
        removeActivityFromHistoryLocked(r);
      }
    }
    mStackSupervisor.getFocusedStack().resumeTopActivityLocked(null);
  }
  finally {
    Binder.restoreCallingIdentity(origId);
  }
}

Fixed version (ground truth):
final void activityDestroyedLocked(IBinder token){
  final long origId=Binder.clearCallingIdentity();
  try {
    ActivityRecord r=ActivityRecord.forToken(token);
    if (r != null) {
      mHandler.removeMessages(DESTROY_TIMEOUT_MSG,r);
    }
    if (isInStackLocked(token) != null) {
      if (r.state == ActivityState.DESTROYING) {
        cleanUpActivityLocked(r,true,false);
        removeActivityFromHistoryLocked(r);
      }
    }
    mStackSupervisor.resumeTopActivitiesLocked();
  }
  finally {
    Binder.restoreCallingIdentity(origId);
  }
}
Program: 2101
Project: 2101
Buggy source:
void handleAppDiedLocked(ProcessRecord app,boolean restarting){
  if (!containsApp(app)) {
    return;
  }
  if (mPausingActivity != null && mPausingActivity.app == app) {
    if (DEBUG_PAUSE || DEBUG_CLEANUP)     Slog.v(TAG,"String_Node_Str" + mPausingActivity);
    mPausingActivity=null;
  }
  if (mLastPausedActivity != null && mLastPausedActivity.app == app) {
    mLastPausedActivity=null;
  }
  boolean hasVisibleActivities=removeHistoryRecordsForAppLocked(app);
  if (!restarting) {
    ActivityStack stack=mStackSupervisor.getFocusedStack();
    if (stack == null) {
      mStackSupervisor.resumeHomeActivity(null);
    }
 else     if (!stack.resumeTopActivityLocked(null)) {
      if (hasVisibleActivities) {
        ensureActivitiesVisibleLocked(null,0);
      }
    }
  }
}

Fixed version (ground truth):
void handleAppDiedLocked(ProcessRecord app,boolean restarting){
  if (!containsApp(app)) {
    return;
  }
  if (mPausingActivity != null && mPausingActivity.app == app) {
    if (DEBUG_PAUSE || DEBUG_CLEANUP)     Slog.v(TAG,"String_Node_Str" + mPausingActivity);
    mPausingActivity=null;
  }
  if (mLastPausedActivity != null && mLastPausedActivity.app == app) {
    mLastPausedActivity=null;
  }
  boolean hasVisibleActivities=removeHistoryRecordsForAppLocked(app);
  if (!restarting) {
    ActivityStack stack=mStackSupervisor.getFocusedStack();
    if (stack == null) {
      mStackSupervisor.resumeHomeActivity(null);
    }
 else     if (!mStackSupervisor.resumeTopActivitiesLocked(stack,null,null)) {
      if (hasVisibleActivities) {
        ensureActivitiesVisibleLocked(null,0);
      }
    }
  }
}
Program: 2104
Project: 2104
Buggy source:
final void moveTaskToFrontLocked(TaskRecord tr,ActivityRecord reason,Bundle options){
  if (DEBUG_SWITCH)   Slog.v(TAG,"String_Node_Str" + tr);
  final int numTasks=mTaskHistory.size();
  final int index=mTaskHistory.indexOf(tr);
  if (numTasks == 0 || index < 0 || index == numTasks - 1) {
    if (reason != null && (reason.intent.getFlags() & Intent.FLAG_ACTIVITY_NO_ANIMATION) != 0) {
      ActivityOptions.abort(options);
    }
 else {
      updateTransitLocked(AppTransition.TRANSIT_TASK_TO_FRONT,options);
    }
    return;
  }
  mTaskHistory.remove(tr);
  mTaskHistory.add(tr);
  if (DEBUG_TRANSITION)   Slog.v(TAG,"String_Node_Str" + tr);
  if (reason != null && (reason.intent.getFlags() & Intent.FLAG_ACTIVITY_NO_ANIMATION) != 0) {
    mWindowManager.prepareAppTransition(AppTransition.TRANSIT_NONE,false);
    ActivityRecord r=topRunningActivityLocked(null);
    if (r != null) {
      mNoAnimActivities.add(r);
    }
    ActivityOptions.abort(options);
  }
 else {
    updateTransitLocked(AppTransition.TRANSIT_TASK_TO_FRONT,options);
  }
  mWindowManager.moveTaskToTop(tr.taskId);
  mStackSupervisor.getFocusedStack().resumeTopActivityLocked(null);
  EventLog.writeEvent(EventLogTags.AM_TASK_TO_FRONT,tr.userId,tr.taskId);
  if (VALIDATE_TOKENS) {
    validateAppTokensLocked();
  }
}

Fixed version (ground truth):
final void moveTaskToFrontLocked(TaskRecord tr,ActivityRecord reason,Bundle options){
  if (DEBUG_SWITCH)   Slog.v(TAG,"String_Node_Str" + tr);
  final int numTasks=mTaskHistory.size();
  final int index=mTaskHistory.indexOf(tr);
  if (numTasks == 0 || index < 0 || index == numTasks - 1) {
    if (reason != null && (reason.intent.getFlags() & Intent.FLAG_ACTIVITY_NO_ANIMATION) != 0) {
      ActivityOptions.abort(options);
    }
 else {
      updateTransitLocked(AppTransition.TRANSIT_TASK_TO_FRONT,options);
    }
    return;
  }
  mTaskHistory.remove(tr);
  mTaskHistory.add(tr);
  if (DEBUG_TRANSITION)   Slog.v(TAG,"String_Node_Str" + tr);
  if (reason != null && (reason.intent.getFlags() & Intent.FLAG_ACTIVITY_NO_ANIMATION) != 0) {
    mWindowManager.prepareAppTransition(AppTransition.TRANSIT_NONE,false);
    ActivityRecord r=topRunningActivityLocked(null);
    if (r != null) {
      mNoAnimActivities.add(r);
    }
    ActivityOptions.abort(options);
  }
 else {
    updateTransitLocked(AppTransition.TRANSIT_TASK_TO_FRONT,options);
  }
  mWindowManager.moveTaskToTop(tr.taskId);
  mStackSupervisor.resumeTopActivitiesLocked();
  EventLog.writeEvent(EventLogTags.AM_TASK_TO_FRONT,tr.userId,tr.taskId);
  if (VALIDATE_TOKENS) {
    validateAppTokensLocked();
  }
}
Program: 2109
Project: 2109
Buggy source:
boolean resumeHomeActivity(ActivityRecord prev){
  moveHomeStack(true);
  if (prev != null) {
    prev.mLaunchHomeTaskNext=false;
  }
  if (mHomeStack.topRunningActivityLocked(null) != null) {
    return mHomeStack.resumeTopActivityLocked(prev);
  }
  return mService.startHomeActivityLocked(mCurrentUser);
}

Fixed version (ground truth):
boolean resumeHomeActivity(ActivityRecord prev){
  moveHomeStack(true);
  if (prev != null) {
    prev.mLaunchHomeTaskNext=false;
  }
  if (mHomeStack.topRunningActivityLocked(null) != null) {
    return resumeTopActivitiesLocked(mHomeStack,prev,null);
  }
  return mService.startHomeActivityLocked(mCurrentUser);
}
Program: 2110
Project: 2110
Buggy source:
void comeOutOfSleepIfNeededLocked(){
  for (int stackNdx=mStacks.size() - 1; stackNdx >= 0; --stackNdx) {
    final ActivityStack stack=mStacks.get(stackNdx);
    stack.awakeFromSleepingLocked();
    if (isFrontStack(stack)) {
      stack.resumeTopActivityLocked(null);
    }
  }
}

Fixed version (ground truth):
void comeOutOfSleepIfNeededLocked(){
  for (int stackNdx=mStacks.size() - 1; stackNdx >= 0; --stackNdx) {
    final ActivityStack stack=mStacks.get(stackNdx);
    stack.awakeFromSleepingLocked();
    if (isFrontStack(stack)) {
      resumeTopActivitiesLocked();
    }
  }
}
Program: 2112
Project: 2112
Buggy source:
void resumeTopActivitiesLocked(){
  for (int stackNdx=mStacks.size() - 1; stackNdx >= 0; --stackNdx) {
    final ActivityStack stack=mStacks.get(stackNdx);
    if (isFrontStack(stack)) {
      stack.resumeTopActivityLocked(null);
    }
  }
}

Fixed version (ground truth):
boolean resumeTopActivitiesLocked(ActivityStack targetStack,ActivityRecord target,Bundle targetOptions){
  if (targetStack == null) {
    targetStack=getFocusedStack();
  }
  boolean result=false;
  for (int stackNdx=mStacks.size() - 1; stackNdx >= 0; --stackNdx) {
    final ActivityStack stack=mStacks.get(stackNdx);
    if (isFrontStack(stack)) {
      if (stack == targetStack) {
        result=stack.resumeTopActivityLocked(target,targetOptions);
      }
 else {
        stack.resumeTopActivityLocked(null);
      }
    }
  }
  return result;
}
Program: 2113
Project: 2113
Buggy source:
final void scheduleIdleLocked(){
  mHandler.obtainMessage(IDLE_NOW_MSG).sendToTarget();
}

Fixed version (ground truth):
final void scheduleIdleLocked(){
  mHandler.sendEmptyMessage(IDLE_NOW_MSG);
}
Program: 2114
Project: 2114
Buggy source:
@Override public void handleMessage(Message msg){
switch (msg.what) {
case IDLE_TIMEOUT_MSG:
{
      if (mService.mDidDexOpt) {
        mService.mDidDexOpt=false;
        Message nmsg=mHandler.obtainMessage(IDLE_TIMEOUT_MSG);
        nmsg.obj=msg.obj;
        mHandler.sendMessageDelayed(nmsg,IDLE_TIMEOUT);
        return;
      }
      activityIdleInternal((ActivityRecord)msg.obj);
    }
  break;
case IDLE_NOW_MSG:
{
  activityIdleInternal((ActivityRecord)msg.obj);
}
break;
}
}

Fixed version (ground truth):
@Override public void handleMessage(Message msg){
switch (msg.what) {
case IDLE_TIMEOUT_MSG:
{
      if (mService.mDidDexOpt) {
        mService.mDidDexOpt=false;
        Message nmsg=mHandler.obtainMessage(IDLE_TIMEOUT_MSG);
        nmsg.obj=msg.obj;
        mHandler.sendMessageDelayed(nmsg,IDLE_TIMEOUT);
        return;
      }
      activityIdleInternal((ActivityRecord)msg.obj);
    }
  break;
case IDLE_NOW_MSG:
{
  activityIdleInternal((ActivityRecord)msg.obj);
}
break;
case RESUME_TOP_ACTIVITY_MSG:
{
synchronized (mService) {
resumeTopActivitiesLocked();
}
}
break;
}
}
Program: 2115
Project: 2115
Buggy source:
void moveTaskToStack(int taskId,int stackId,boolean toTop){
  final ActivityStack stack=getStack(stackId);
  if (stack == null) {
    Slog.w(TAG,"String_Node_Str" + stackId);
    return;
  }
  stack.moveTask(taskId,toTop);
  stack.resumeTopActivityLocked(null);
}

Fixed version (ground truth):
void moveTaskToStack(int taskId,int stackId,boolean toTop){
  final ActivityStack stack=getStack(stackId);
  if (stack == null) {
    Slog.w(TAG,"String_Node_Str" + stackId);
    return;
  }
  stack.moveTask(taskId,toTop);
  resumeTopActivitiesLocked();
}
Program: 2116
Project: 2116
Buggy source:
/** 
 * Begin an animation to a new dim value. NOTE: Must be called with Surface transaction open.
 * @param layer The layer to set the surface to.
 * @param alpha The dim value to end at.
 * @param duration How long to take to get there in milliseconds.
 */
void show(int layer,float alpha,long duration){
  if (DEBUG)   Slog.v(TAG,"String_Node_Str" + layer + "String_Node_Str"+ alpha+ "String_Node_Str"+ duration);
  if (mDimSurface == null) {
    Slog.e(TAG,"String_Node_Str");
    mTargetAlpha=mAlpha=0;
    return;
  }
  final DisplayInfo info=mDisplayContent.getDisplayInfo();
  final int dw=(int)(info.logicalWidth * 1.5);
  final int dh=(int)(info.logicalHeight * 1.5);
  final float xPos=-1 * dw / 6;
  final float yPos=-1 * dh / 6;
  if (mLastDimWidth != dw || mLastDimHeight != dh || mLayer != layer) {
    try {
      mDimSurface.setPosition(xPos,yPos);
      mDimSurface.setSize(dw,dh);
      mDimSurface.setLayer(layer);
    }
 catch (    RuntimeException e) {
      Slog.w(TAG,"String_Node_Str",e);
    }
    mLastDimWidth=dw;
    mLastDimHeight=dh;
    mLayer=layer;
  }
  long curTime=SystemClock.uptimeMillis();
  final boolean animating=isAnimating();
  if ((animating && (mTargetAlpha != alpha || durationEndsEarlier(duration))) || (!animating && mAlpha != alpha)) {
    if (duration <= 0) {
      setAlpha(alpha);
    }
 else {
      mStartAlpha=mAlpha;
      mStartTime=curTime;
      mDuration=duration;
    }
  }
  if (DEBUG)   Slog.v(TAG,"String_Node_Str" + mStartAlpha + "String_Node_Str"+ mStartTime);
  mTargetAlpha=alpha;
}

Fixed version (ground truth):
/** 
 * Begin an animation to a new dim value. NOTE: Must be called with Surface transaction open.
 * @param layer The layer to set the surface to.
 * @param alpha The dim value to end at.
 * @param duration How long to take to get there in milliseconds.
 */
void show(int layer,float alpha,long duration){
  if (DEBUG)   Slog.v(TAG,"String_Node_Str" + layer + "String_Node_Str"+ alpha+ "String_Node_Str"+ duration);
  if (mDimSurface == null) {
    Slog.e(TAG,"String_Node_Str");
    mTargetAlpha=mAlpha=0;
    return;
  }
  if (!mLastBounds.equals(mBounds) || mLayer != layer) {
    try {
      mDimSurface.setPosition(mBounds.left,mBounds.top);
      mDimSurface.setSize(mBounds.width(),mBounds.height());
      mDimSurface.setLayer(layer);
    }
 catch (    RuntimeException e) {
      Slog.w(TAG,"String_Node_Str",e);
    }
    mLastBounds.set(mBounds);
    mLayer=layer;
  }
  long curTime=SystemClock.uptimeMillis();
  final boolean animating=isAnimating();
  if ((animating && (mTargetAlpha != alpha || durationEndsEarlier(duration))) || (!animating && mAlpha != alpha)) {
    if (duration <= 0) {
      setAlpha(alpha);
    }
 else {
      mStartAlpha=mAlpha;
      mStartTime=curTime;
      mDuration=duration;
    }
  }
  if (DEBUG)   Slog.v(TAG,"String_Node_Str" + mStartAlpha + "String_Node_Str"+ mStartTime);
  mTargetAlpha=alpha;
}
Program: 2117
Project: 2117
Buggy source:
public void printTo(String prefix,PrintWriter pw){
  pw.print(prefix);
  pw.print("String_Node_Str");
  pw.print(mDimSurface);
  pw.print("String_Node_Str");
  pw.print(mLayer);
  pw.print("String_Node_Str");
  pw.println(mAlpha);
  pw.print(prefix);
  pw.print("String_Node_Str");
  pw.print(mLastDimWidth);
  pw.print("String_Node_Str");
  pw.println(mLastDimHeight);
  pw.print(prefix);
  pw.print("String_Node_Str");
  pw.print("String_Node_Str");
  pw.print(mDuration);
  pw.print("String_Node_Str");
  pw.print(mStartTime);
  pw.print("String_Node_Str");
  pw.println(SystemClock.uptimeMillis());
  pw.print(prefix);
  pw.print("String_Node_Str");
  pw.print(mStartAlpha);
  pw.print("String_Node_Str");
  pw.println(mTargetAlpha);
}

Fixed version (ground truth):
public void printTo(String prefix,PrintWriter pw){
  pw.print(prefix);
  pw.print("String_Node_Str");
  pw.print(mDimSurface);
  pw.print("String_Node_Str");
  pw.print(mLayer);
  pw.print("String_Node_Str");
  pw.println(mAlpha);
  pw.print(prefix);
  pw.print("String_Node_Str");
  pw.print(mLastBounds.toShortString());
  pw.print("String_Node_Str");
  pw.println(mBounds.toShortString());
  pw.print(prefix);
  pw.print("String_Node_Str");
  pw.print("String_Node_Str");
  pw.print(mDuration);
  pw.print("String_Node_Str");
  pw.print(mStartTime);
  pw.print("String_Node_Str");
  pw.println(SystemClock.uptimeMillis());
  pw.print(prefix);
  pw.print("String_Node_Str");
  pw.print(mStartAlpha);
  pw.print("String_Node_Str");
  pw.println(mTargetAlpha);
}
Program: 2118
Project: 2118
Buggy source:
public int getSizeInfo(String pkgName,int persona,String apkPath,String fwdLockApkPath,String asecPath,PackageStats pStats){
  StringBuilder builder=new StringBuilder("String_Node_Str");
  builder.append(' ');
  builder.append(pkgName);
  builder.append(' ');
  builder.append(persona);
  builder.append(' ');
  builder.append(apkPath);
  builder.append(' ');
  builder.append(fwdLockApkPath != null ? fwdLockApkPath : "String_Node_Str");
  builder.append(' ');
  builder.append(asecPath != null ? asecPath : "String_Node_Str");
  String s=transaction(builder.toString());
  String res[]=s.split("String_Node_Str");
  if ((res == null) || (res.length != 5)) {
    return -1;
  }
  try {
    pStats.codeSize=Long.parseLong(res[1]);
    pStats.dataSize=Long.parseLong(res[2]);
    pStats.cacheSize=Long.parseLong(res[3]);
    pStats.externalCodeSize=Long.parseLong(res[4]);
    return Integer.parseInt(res[0]);
  }
 catch (  NumberFormatException e) {
    return -1;
  }
}

Fixed version (ground truth):
public int getSizeInfo(String pkgName,int persona,String apkPath,String libDirPath,String fwdLockApkPath,String asecPath,PackageStats pStats){
  StringBuilder builder=new StringBuilder("String_Node_Str");
  builder.append(' ');
  builder.append(pkgName);
  builder.append(' ');
  builder.append(persona);
  builder.append(' ');
  builder.append(apkPath);
  builder.append(' ');
  builder.append(libDirPath != null ? libDirPath : "String_Node_Str");
  builder.append(' ');
  builder.append(fwdLockApkPath != null ? fwdLockApkPath : "String_Node_Str");
  builder.append(' ');
  builder.append(asecPath != null ? asecPath : "String_Node_Str");
  String s=transaction(builder.toString());
  String res[]=s.split("String_Node_Str");
  if ((res == null) || (res.length != 5)) {
    return -1;
  }
  try {
    pStats.codeSize=Long.parseLong(res[1]);
    pStats.dataSize=Long.parseLong(res[2]);
    pStats.cacheSize=Long.parseLong(res[3]);
    pStats.externalCodeSize=Long.parseLong(res[4]);
    return Integer.parseInt(res[0]);
  }
 catch (  NumberFormatException e) {
    return -1;
  }
}
Program: 2119
Project: 2119
Buggy source:
private boolean getPackageSizeInfoLI(String packageName,int userHandle,PackageStats pStats){
  if (packageName == null) {
    Slog.w(TAG,"String_Node_Str");
    return false;
  }
  PackageParser.Package p;
  boolean dataOnly=false;
  String asecPath=null;
synchronized (mPackages) {
    p=mPackages.get(packageName);
    if (p == null) {
      dataOnly=true;
      PackageSetting ps=mSettings.mPackages.get(packageName);
      if ((ps == null) || (ps.pkg == null)) {
        Slog.w(TAG,"String_Node_Str" + packageName + "String_Node_Str");
        return false;
      }
      p=ps.pkg;
    }
    if (p != null && (isExternal(p) || isForwardLocked(p))) {
      String secureContainerId=cidFromCodePath(p.applicationInfo.sourceDir);
      if (secureContainerId != null) {
        asecPath=PackageHelper.getSdFilesystem(secureContainerId);
      }
    }
  }
  String publicSrcDir=null;
  if (!dataOnly) {
    final ApplicationInfo applicationInfo=p.applicationInfo;
    if (applicationInfo == null) {
      Slog.w(TAG,"String_Node_Str" + packageName + "String_Node_Str");
      return false;
    }
    if (isForwardLocked(p)) {
      publicSrcDir=applicationInfo.publicSourceDir;
    }
  }
  int res=mInstaller.getSizeInfo(packageName,userHandle,p.mPath,publicSrcDir,asecPath,pStats);
  if (res < 0) {
    return false;
  }
  if (!isExternal(p)) {
    pStats.codeSize+=pStats.externalCodeSize;
    pStats.externalCodeSize=0L;
  }
  return true;
}

Fixed version (ground truth):
private boolean getPackageSizeInfoLI(String packageName,int userHandle,PackageStats pStats){
  if (packageName == null) {
    Slog.w(TAG,"String_Node_Str");
    return false;
  }
  PackageParser.Package p;
  boolean dataOnly=false;
  String libDirPath=null;
  String asecPath=null;
synchronized (mPackages) {
    p=mPackages.get(packageName);
    PackageSetting ps=mSettings.mPackages.get(packageName);
    if (p == null) {
      dataOnly=true;
      if ((ps == null) || (ps.pkg == null)) {
        Slog.w(TAG,"String_Node_Str" + packageName + "String_Node_Str");
        return false;
      }
      p=ps.pkg;
    }
    if (ps != null) {
      libDirPath=ps.nativeLibraryPathString;
    }
    if (p != null && (isExternal(p) || isForwardLocked(p))) {
      String secureContainerId=cidFromCodePath(p.applicationInfo.sourceDir);
      if (secureContainerId != null) {
        asecPath=PackageHelper.getSdFilesystem(secureContainerId);
      }
    }
  }
  String publicSrcDir=null;
  if (!dataOnly) {
    final ApplicationInfo applicationInfo=p.applicationInfo;
    if (applicationInfo == null) {
      Slog.w(TAG,"String_Node_Str" + packageName + "String_Node_Str");
      return false;
    }
    if (isForwardLocked(p)) {
      publicSrcDir=applicationInfo.publicSourceDir;
    }
  }
  int res=mInstaller.getSizeInfo(packageName,userHandle,p.mPath,libDirPath,publicSrcDir,asecPath,pStats);
  if (res < 0) {
    return false;
  }
  if (!isExternal(p)) {
    pStats.codeSize+=pStats.externalCodeSize;
    pStats.externalCodeSize=0L;
  }
  return true;
}
Program: 2120
Project: 2120
Buggy source:
private void cancelLoadingThumbnailsAndIcons(){
  if (mTaskLoader != null) {
    mTaskLoader.cancel(false);
    mTaskLoader=null;
  }
  if (mThumbnailLoader != null) {
    mThumbnailLoader.cancel(false);
    mThumbnailLoader=null;
  }
  mLoadedTasks=null;
  if (mRecentsPanel != null) {
    mRecentsPanel.onTaskLoadingCancelled();
  }
  mFirstScreenful=false;
  mState=State.CANCELLED;
}

Fixed version (ground truth):
private void cancelLoadingThumbnailsAndIcons(){
  if (mRecentsPanel != null && mRecentsPanel.isShowing()) {
    return;
  }
  if (mTaskLoader != null) {
    mTaskLoader.cancel(false);
    mTaskLoader=null;
  }
  if (mThumbnailLoader != null) {
    mThumbnailLoader.cancel(false);
    mThumbnailLoader=null;
  }
  mLoadedTasks=null;
  if (mRecentsPanel != null) {
    mRecentsPanel.onTaskLoadingCancelled();
  }
  mFirstScreenful=false;
  mState=State.CANCELLED;
}
Program: 2121
Project: 2121
Buggy source:
@Override public void onStart(){
  if (forceOpaqueBackground(this)) {
    updateWallpaperVisibility(false);
  }
 else {
    updateWallpaperVisibility(true);
  }
  mShowing=true;
  if (mRecentsPanel != null) {
    mRecentsPanel.refreshViews();
  }
  super.onStart();
}

Fixed version (ground truth):
@Override public void onStart(){
  if (forceOpaqueBackground(this)) {
    updateWallpaperVisibility(false);
  }
 else {
    updateWallpaperVisibility(true);
  }
  mShowing=true;
  if (mRecentsPanel != null) {
    mRecentsPanel.refreshRecentTasksList();
    mRecentsPanel.refreshViews();
  }
  super.onStart();
}
Program: 2122
Project: 2122
Buggy source:
public int getSizeInfo(String pkgName,int persona,String apkPath,String fwdLockApkPath,String asecPath,PackageStats pStats){
  StringBuilder builder=new StringBuilder("String_Node_Str");
  builder.append(' ');
  builder.append(pkgName);
  builder.append(' ');
  builder.append(persona);
  builder.append(' ');
  builder.append(apkPath);
  builder.append(' ');
  builder.append(fwdLockApkPath != null ? fwdLockApkPath : "String_Node_Str");
  builder.append(' ');
  builder.append(asecPath != null ? asecPath : "String_Node_Str");
  String s=transaction(builder.toString());
  String res[]=s.split("String_Node_Str");
  if ((res == null) || (res.length != 5)) {
    return -1;
  }
  try {
    pStats.codeSize=Long.parseLong(res[1]);
    pStats.dataSize=Long.parseLong(res[2]);
    pStats.cacheSize=Long.parseLong(res[3]);
    pStats.externalCodeSize=Long.parseLong(res[4]);
    return Integer.parseInt(res[0]);
  }
 catch (  NumberFormatException e) {
    return -1;
  }
}

Fixed version (ground truth):
public int getSizeInfo(String pkgName,int persona,String apkPath,String libDirPath,String fwdLockApkPath,String asecPath,PackageStats pStats){
  StringBuilder builder=new StringBuilder("String_Node_Str");
  builder.append(' ');
  builder.append(pkgName);
  builder.append(' ');
  builder.append(persona);
  builder.append(' ');
  builder.append(apkPath);
  builder.append(' ');
  builder.append(libDirPath != null ? libDirPath : "String_Node_Str");
  builder.append(' ');
  builder.append(fwdLockApkPath != null ? fwdLockApkPath : "String_Node_Str");
  builder.append(' ');
  builder.append(asecPath != null ? asecPath : "String_Node_Str");
  String s=transaction(builder.toString());
  String res[]=s.split("String_Node_Str");
  if ((res == null) || (res.length != 5)) {
    return -1;
  }
  try {
    pStats.codeSize=Long.parseLong(res[1]);
    pStats.dataSize=Long.parseLong(res[2]);
    pStats.cacheSize=Long.parseLong(res[3]);
    pStats.externalCodeSize=Long.parseLong(res[4]);
    return Integer.parseInt(res[0]);
  }
 catch (  NumberFormatException e) {
    return -1;
  }
}
Program: 2123
Project: 2123
Buggy source:
private boolean getPackageSizeInfoLI(String packageName,int userHandle,PackageStats pStats){
  if (packageName == null) {
    Slog.w(TAG,"String_Node_Str");
    return false;
  }
  PackageParser.Package p;
  boolean dataOnly=false;
  String asecPath=null;
synchronized (mPackages) {
    p=mPackages.get(packageName);
    if (p == null) {
      dataOnly=true;
      PackageSetting ps=mSettings.mPackages.get(packageName);
      if ((ps == null) || (ps.pkg == null)) {
        Slog.w(TAG,"String_Node_Str" + packageName + "String_Node_Str");
        return false;
      }
      p=ps.pkg;
    }
    if (p != null && (isExternal(p) || isForwardLocked(p))) {
      String secureContainerId=cidFromCodePath(p.applicationInfo.sourceDir);
      if (secureContainerId != null) {
        asecPath=PackageHelper.getSdFilesystem(secureContainerId);
      }
    }
  }
  String publicSrcDir=null;
  if (!dataOnly) {
    final ApplicationInfo applicationInfo=p.applicationInfo;
    if (applicationInfo == null) {
      Slog.w(TAG,"String_Node_Str" + packageName + "String_Node_Str");
      return false;
    }
    if (isForwardLocked(p)) {
      publicSrcDir=applicationInfo.publicSourceDir;
    }
  }
  int res=mInstaller.getSizeInfo(packageName,userHandle,p.mPath,publicSrcDir,asecPath,pStats);
  if (res < 0) {
    return false;
  }
  if (!isExternal(p)) {
    pStats.codeSize+=pStats.externalCodeSize;
    pStats.externalCodeSize=0L;
  }
  return true;
}

Fixed version (ground truth):
private boolean getPackageSizeInfoLI(String packageName,int userHandle,PackageStats pStats){
  if (packageName == null) {
    Slog.w(TAG,"String_Node_Str");
    return false;
  }
  PackageParser.Package p;
  boolean dataOnly=false;
  String libDirPath=null;
  String asecPath=null;
synchronized (mPackages) {
    p=mPackages.get(packageName);
    PackageSetting ps=mSettings.mPackages.get(packageName);
    if (p == null) {
      dataOnly=true;
      if ((ps == null) || (ps.pkg == null)) {
        Slog.w(TAG,"String_Node_Str" + packageName + "String_Node_Str");
        return false;
      }
      p=ps.pkg;
    }
    if (ps != null) {
      libDirPath=ps.nativeLibraryPathString;
    }
    if (p != null && (isExternal(p) || isForwardLocked(p))) {
      String secureContainerId=cidFromCodePath(p.applicationInfo.sourceDir);
      if (secureContainerId != null) {
        asecPath=PackageHelper.getSdFilesystem(secureContainerId);
      }
    }
  }
  String publicSrcDir=null;
  if (!dataOnly) {
    final ApplicationInfo applicationInfo=p.applicationInfo;
    if (applicationInfo == null) {
      Slog.w(TAG,"String_Node_Str" + packageName + "String_Node_Str");
      return false;
    }
    if (isForwardLocked(p)) {
      publicSrcDir=applicationInfo.publicSourceDir;
    }
  }
  int res=mInstaller.getSizeInfo(packageName,userHandle,p.mPath,libDirPath,publicSrcDir,asecPath,pStats);
  if (res < 0) {
    return false;
  }
  if (!isExternal(p)) {
    pStats.codeSize+=pStats.externalCodeSize;
    pStats.externalCodeSize=0L;
  }
  return true;
}
Program: 2125
Project: 2125
Buggy source:
public int getSizeInfo(String pkgName,int persona,String apkPath,String fwdLockApkPath,String asecPath,PackageStats pStats){
  StringBuilder builder=new StringBuilder("String_Node_Str");
  builder.append(' ');
  builder.append(pkgName);
  builder.append(' ');
  builder.append(persona);
  builder.append(' ');
  builder.append(apkPath);
  builder.append(' ');
  builder.append(fwdLockApkPath != null ? fwdLockApkPath : "String_Node_Str");
  builder.append(' ');
  builder.append(asecPath != null ? asecPath : "String_Node_Str");
  String s=transaction(builder.toString());
  String res[]=s.split("String_Node_Str");
  if ((res == null) || (res.length != 5)) {
    return -1;
  }
  try {
    pStats.codeSize=Long.parseLong(res[1]);
    pStats.dataSize=Long.parseLong(res[2]);
    pStats.cacheSize=Long.parseLong(res[3]);
    pStats.externalCodeSize=Long.parseLong(res[4]);
    return Integer.parseInt(res[0]);
  }
 catch (  NumberFormatException e) {
    return -1;
  }
}

Fixed version (ground truth):
public int getSizeInfo(String pkgName,int persona,String apkPath,String libDirPath,String fwdLockApkPath,String asecPath,PackageStats pStats){
  StringBuilder builder=new StringBuilder("String_Node_Str");
  builder.append(' ');
  builder.append(pkgName);
  builder.append(' ');
  builder.append(persona);
  builder.append(' ');
  builder.append(apkPath);
  builder.append(' ');
  builder.append(libDirPath != null ? libDirPath : "String_Node_Str");
  builder.append(' ');
  builder.append(fwdLockApkPath != null ? fwdLockApkPath : "String_Node_Str");
  builder.append(' ');
  builder.append(asecPath != null ? asecPath : "String_Node_Str");
  String s=transaction(builder.toString());
  String res[]=s.split("String_Node_Str");
  if ((res == null) || (res.length != 5)) {
    return -1;
  }
  try {
    pStats.codeSize=Long.parseLong(res[1]);
    pStats.dataSize=Long.parseLong(res[2]);
    pStats.cacheSize=Long.parseLong(res[3]);
    pStats.externalCodeSize=Long.parseLong(res[4]);
    return Integer.parseInt(res[0]);
  }
 catch (  NumberFormatException e) {
    return -1;
  }
}
Program: 2126
Project: 2126
Buggy source:
private boolean getPackageSizeInfoLI(String packageName,int userHandle,PackageStats pStats){
  if (packageName == null) {
    Slog.w(TAG,"String_Node_Str");
    return false;
  }
  PackageParser.Package p;
  boolean dataOnly=false;
  String asecPath=null;
synchronized (mPackages) {
    p=mPackages.get(packageName);
    if (p == null) {
      dataOnly=true;
      PackageSetting ps=mSettings.mPackages.get(packageName);
      if ((ps == null) || (ps.pkg == null)) {
        Slog.w(TAG,"String_Node_Str" + packageName + "String_Node_Str");
        return false;
      }
      p=ps.pkg;
    }
    if (p != null && (isExternal(p) || isForwardLocked(p))) {
      String secureContainerId=cidFromCodePath(p.applicationInfo.sourceDir);
      if (secureContainerId != null) {
        asecPath=PackageHelper.getSdFilesystem(secureContainerId);
      }
    }
  }
  String publicSrcDir=null;
  if (!dataOnly) {
    final ApplicationInfo applicationInfo=p.applicationInfo;
    if (applicationInfo == null) {
      Slog.w(TAG,"String_Node_Str" + packageName + "String_Node_Str");
      return false;
    }
    if (isForwardLocked(p)) {
      publicSrcDir=applicationInfo.publicSourceDir;
    }
  }
  int res=mInstaller.getSizeInfo(packageName,userHandle,p.mPath,publicSrcDir,asecPath,pStats);
  if (res < 0) {
    return false;
  }
  if (!isExternal(p)) {
    pStats.codeSize+=pStats.externalCodeSize;
    pStats.externalCodeSize=0L;
  }
  return true;
}

Fixed version (ground truth):
private boolean getPackageSizeInfoLI(String packageName,int userHandle,PackageStats pStats){
  if (packageName == null) {
    Slog.w(TAG,"String_Node_Str");
    return false;
  }
  PackageParser.Package p;
  boolean dataOnly=false;
  String libDirPath=null;
  String asecPath=null;
synchronized (mPackages) {
    p=mPackages.get(packageName);
    PackageSetting ps=mSettings.mPackages.get(packageName);
    if (p == null) {
      dataOnly=true;
      if ((ps == null) || (ps.pkg == null)) {
        Slog.w(TAG,"String_Node_Str" + packageName + "String_Node_Str");
        return false;
      }
      p=ps.pkg;
    }
    if (ps != null) {
      libDirPath=ps.nativeLibraryPathString;
    }
    if (p != null && (isExternal(p) || isForwardLocked(p))) {
      String secureContainerId=cidFromCodePath(p.applicationInfo.sourceDir);
      if (secureContainerId != null) {
        asecPath=PackageHelper.getSdFilesystem(secureContainerId);
      }
    }
  }
  String publicSrcDir=null;
  if (!dataOnly) {
    final ApplicationInfo applicationInfo=p.applicationInfo;
    if (applicationInfo == null) {
      Slog.w(TAG,"String_Node_Str" + packageName + "String_Node_Str");
      return false;
    }
    if (isForwardLocked(p)) {
      publicSrcDir=applicationInfo.publicSourceDir;
    }
  }
  int res=mInstaller.getSizeInfo(packageName,userHandle,p.mPath,libDirPath,publicSrcDir,asecPath,pStats);
  if (res < 0) {
    return false;
  }
  if (!isExternal(p)) {
    pStats.codeSize+=pStats.externalCodeSize;
    pStats.externalCodeSize=0L;
  }
  return true;
}
Program: 2127
Project: 2127
Buggy source:
public int getSizeInfo(String pkgName,int persona,String apkPath,String fwdLockApkPath,String asecPath,PackageStats pStats){
  StringBuilder builder=new StringBuilder("String_Node_Str");
  builder.append(' ');
  builder.append(pkgName);
  builder.append(' ');
  builder.append(persona);
  builder.append(' ');
  builder.append(apkPath);
  builder.append(' ');
  builder.append(fwdLockApkPath != null ? fwdLockApkPath : "String_Node_Str");
  builder.append(' ');
  builder.append(asecPath != null ? asecPath : "String_Node_Str");
  String s=transaction(builder.toString());
  String res[]=s.split("String_Node_Str");
  if ((res == null) || (res.length != 5)) {
    return -1;
  }
  try {
    pStats.codeSize=Long.parseLong(res[1]);
    pStats.dataSize=Long.parseLong(res[2]);
    pStats.cacheSize=Long.parseLong(res[3]);
    pStats.externalCodeSize=Long.parseLong(res[4]);
    return Integer.parseInt(res[0]);
  }
 catch (  NumberFormatException e) {
    return -1;
  }
}

Fixed version (ground truth):
public int getSizeInfo(String pkgName,int persona,String apkPath,String libDirPath,String fwdLockApkPath,String asecPath,PackageStats pStats){
  StringBuilder builder=new StringBuilder("String_Node_Str");
  builder.append(' ');
  builder.append(pkgName);
  builder.append(' ');
  builder.append(persona);
  builder.append(' ');
  builder.append(apkPath);
  builder.append(' ');
  builder.append(libDirPath != null ? libDirPath : "String_Node_Str");
  builder.append(' ');
  builder.append(fwdLockApkPath != null ? fwdLockApkPath : "String_Node_Str");
  builder.append(' ');
  builder.append(asecPath != null ? asecPath : "String_Node_Str");
  String s=transaction(builder.toString());
  String res[]=s.split("String_Node_Str");
  if ((res == null) || (res.length != 5)) {
    return -1;
  }
  try {
    pStats.codeSize=Long.parseLong(res[1]);
    pStats.dataSize=Long.parseLong(res[2]);
    pStats.cacheSize=Long.parseLong(res[3]);
    pStats.externalCodeSize=Long.parseLong(res[4]);
    return Integer.parseInt(res[0]);
  }
 catch (  NumberFormatException e) {
    return -1;
  }
}
Program: 2128
Project: 2128
Buggy source:
private boolean getPackageSizeInfoLI(String packageName,int userHandle,PackageStats pStats){
  if (packageName == null) {
    Slog.w(TAG,"String_Node_Str");
    return false;
  }
  PackageParser.Package p;
  boolean dataOnly=false;
  String asecPath=null;
synchronized (mPackages) {
    p=mPackages.get(packageName);
    if (p == null) {
      dataOnly=true;
      PackageSetting ps=mSettings.mPackages.get(packageName);
      if ((ps == null) || (ps.pkg == null)) {
        Slog.w(TAG,"String_Node_Str" + packageName + "String_Node_Str");
        return false;
      }
      p=ps.pkg;
    }
    if (p != null && (isExternal(p) || isForwardLocked(p))) {
      String secureContainerId=cidFromCodePath(p.applicationInfo.sourceDir);
      if (secureContainerId != null) {
        asecPath=PackageHelper.getSdFilesystem(secureContainerId);
      }
    }
  }
  String publicSrcDir=null;
  if (!dataOnly) {
    final ApplicationInfo applicationInfo=p.applicationInfo;
    if (applicationInfo == null) {
      Slog.w(TAG,"String_Node_Str" + packageName + "String_Node_Str");
      return false;
    }
    if (isForwardLocked(p)) {
      publicSrcDir=applicationInfo.publicSourceDir;
    }
  }
  int res=mInstaller.getSizeInfo(packageName,userHandle,p.mPath,publicSrcDir,asecPath,pStats);
  if (res < 0) {
    return false;
  }
  if (!isExternal(p)) {
    pStats.codeSize+=pStats.externalCodeSize;
    pStats.externalCodeSize=0L;
  }
  return true;
}

Fixed version (ground truth):
private boolean getPackageSizeInfoLI(String packageName,int userHandle,PackageStats pStats){
  if (packageName == null) {
    Slog.w(TAG,"String_Node_Str");
    return false;
  }
  PackageParser.Package p;
  boolean dataOnly=false;
  String libDirPath=null;
  String asecPath=null;
synchronized (mPackages) {
    p=mPackages.get(packageName);
    PackageSetting ps=mSettings.mPackages.get(packageName);
    if (p == null) {
      dataOnly=true;
      if ((ps == null) || (ps.pkg == null)) {
        Slog.w(TAG,"String_Node_Str" + packageName + "String_Node_Str");
        return false;
      }
      p=ps.pkg;
    }
    if (ps != null) {
      libDirPath=ps.nativeLibraryPathString;
    }
    if (p != null && (isExternal(p) || isForwardLocked(p))) {
      String secureContainerId=cidFromCodePath(p.applicationInfo.sourceDir);
      if (secureContainerId != null) {
        asecPath=PackageHelper.getSdFilesystem(secureContainerId);
      }
    }
  }
  String publicSrcDir=null;
  if (!dataOnly) {
    final ApplicationInfo applicationInfo=p.applicationInfo;
    if (applicationInfo == null) {
      Slog.w(TAG,"String_Node_Str" + packageName + "String_Node_Str");
      return false;
    }
    if (isForwardLocked(p)) {
      publicSrcDir=applicationInfo.publicSourceDir;
    }
  }
  int res=mInstaller.getSizeInfo(packageName,userHandle,p.mPath,libDirPath,publicSrcDir,asecPath,pStats);
  if (res < 0) {
    return false;
  }
  if (!isExternal(p)) {
    pStats.codeSize+=pStats.externalCodeSize;
    pStats.externalCodeSize=0L;
  }
  return true;
}
Program: 2129
Project: 2129
Buggy source:
@Override public boolean isGoneForLayoutLw(){
  final AppWindowToken atoken=mAppToken;
  return mViewVisibility == View.GONE || !mRelayoutCalled || (atoken == null && mRootToken.hidden) || (atoken != null && (atoken.hiddenRequested || atoken.hidden)) || mAttachedHidden || mExiting || mDestroying;
}

Fixed version (ground truth):
@Override public boolean isGoneForLayoutLw(){
  final AppWindowToken atoken=mAppToken;
  return mViewVisibility == View.GONE || !mRelayoutCalled || (atoken == null && mRootToken.hidden) || (atoken != null && (atoken.hiddenRequested || atoken.hidden)) || mAttachedHidden || (mExiting && !isAnimatingLw()) || mDestroying;
}
Program: 2130
Project: 2130
Buggy source:
/** 
 * Specifies the formatting pattern used to display the date and/or time in 24-hour mode. The formatting pattern syntax is described in  {@link DateFormat}. If this pattern is set to null,   {@link #getFormat12Hour()} will be usedeven in 24-hour mode. If both 24-hour and 12-hour formatting patterns are set to null,  {@link #DEFAULT_FORMAT_24_HOUR} and{@link #DEFAULT_FORMAT_12_HOUR} will be used instead.
 * @param format A date/time formatting pattern as described in {@link DateFormat}
 * @see #getFormat24Hour()
 * @see #is24HourModeEnabled()
 * @see #DEFAULT_FORMAT_24_HOUR
 * @see DateFormat
 * @attr ref android.R.styleable#TextClock_format24Hour
 */
@RemotableViewMethod public void setFormat24Hour(CharSequence format){
  mFormat24=format;
  chooseFormat();
  onTimeChanged();
}

Fixed version (ground truth):
/** 
 * <p>Specifies the formatting pattern used to display the date and/or time in 24-hour mode. The formatting pattern syntax is described in  {@link DateFormat}.</p> <p>If this pattern is set to null,   {@link #getFormat24Hour()} will be usedeven in 12-hour mode. If both 24-hour and 12-hour formatting patterns are set to null, the default pattern for the current locale will be used instead.</p> <p><strong>Note:</strong> if styling is not needed, it is highly recommended you supply a format string generated by {@link DateFormat#getBestDateTimePattern(java.util.Locale,String)}. This method takes care of generating a format string adapted to the desired locale.</p>
 * @param format A date/time formatting pattern as described in {@link DateFormat}
 * @see #getFormat24Hour()
 * @see #is24HourModeEnabled()
 * @see DateFormat#getBestDateTimePattern(java.util.Locale,String)
 * @see DateFormat
 * @attr ref android.R.styleable#TextClock_format24Hour
 */
@RemotableViewMethod public void setFormat24Hour(CharSequence format){
  mFormat24=format;
  chooseFormat();
  onTimeChanged();
}
Program: 2131
Project: 2131
Buggy source:
/** 
 * Specifies the formatting pattern used to display the date and/or time in 12-hour mode. The formatting pattern syntax is described in  {@link DateFormat}. If this pattern is set to null,   {@link #getFormat24Hour()} will be usedeven in 12-hour mode. If both 24-hour and 12-hour formatting patterns are set to null,  {@link #DEFAULT_FORMAT_24_HOUR} and{@link #DEFAULT_FORMAT_12_HOUR} will be used instead.
 * @param format A date/time formatting pattern as described in {@link DateFormat}
 * @see #getFormat12Hour()
 * @see #is24HourModeEnabled()
 * @see #DEFAULT_FORMAT_12_HOUR
 * @see DateFormat
 * @attr ref android.R.styleable#TextClock_format12Hour
 */
@RemotableViewMethod public void setFormat12Hour(CharSequence format){
  mFormat12=format;
  chooseFormat();
  onTimeChanged();
}

Fixed version (ground truth):
/** 
 * <p>Specifies the formatting pattern used to display the date and/or time in 12-hour mode. The formatting pattern syntax is described in  {@link DateFormat}.</p> <p>If this pattern is set to null,   {@link #getFormat24Hour()} will be usedeven in 12-hour mode. If both 24-hour and 12-hour formatting patterns are set to null, the default pattern for the current locale will be used instead.</p> <p><strong>Note:</strong> if styling is not needed, it is highly recommended you supply a format string generated by {@link DateFormat#getBestDateTimePattern(java.util.Locale,String)}. This method takes care of generating a format string adapted to the desired locale.</p>
 * @param format A date/time formatting pattern as described in {@link DateFormat}
 * @see #getFormat12Hour()
 * @see #is24HourModeEnabled()
 * @see DateFormat#getBestDateTimePattern(java.util.Locale,String)
 * @see DateFormat
 * @attr ref android.R.styleable#TextClock_format12Hour
 */
@RemotableViewMethod public void setFormat12Hour(CharSequence format){
  mFormat12=format;
  chooseFormat();
  onTimeChanged();
}
Program: 2132
Project: 2132
Buggy source:
/** 
 * Indicates whether the system is currently using the 24-hour mode. When the system is in 24-hour mode, this view will use the pattern returned by   {@link #getFormat24Hour()}. In 12-hour mode, the pattern returned by   {@link #getFormat12Hour()} is used instead.If either one of the formats is null, the other format is used. If both formats are null, the default values  {@link #DEFAULT_FORMAT_12_HOUR}and   {@link #DEFAULT_FORMAT_24_HOUR} are used instead.
 * @return true if time should be displayed in 24-hour format, false if itshould be displayed in 12-hour format.
 * @see #setFormat12Hour(CharSequence)
 * @see #getFormat12Hour()
 * @see #setFormat24Hour(CharSequence)
 * @see #getFormat24Hour()
 */
public boolean is24HourModeEnabled(){
  return DateFormat.is24HourFormat(getContext());
}

Fixed version (ground truth):
/** 
 * Indicates whether the system is currently using the 24-hour mode. When the system is in 24-hour mode, this view will use the pattern returned by   {@link #getFormat24Hour()}. In 12-hour mode, the pattern returned by   {@link #getFormat12Hour()} is used instead.If either one of the formats is null, the other format is used. If both formats are null, the default formats for the current locale are used.
 * @return true if time should be displayed in 24-hour format, false if itshould be displayed in 12-hour format.
 * @see #setFormat12Hour(CharSequence)
 * @see #getFormat12Hour()
 * @see #setFormat24Hour(CharSequence)
 * @see #getFormat24Hour()
 */
public boolean is24HourModeEnabled(){
  return DateFormat.is24HourFormat(getContext());
}
Program: 2133
Project: 2133
Buggy source:
/** 
 * Returns whether DRM ringtones will be included.
 * @return Whether DRM ringtones will be included.
 * @see #setIncludeDrm(boolean) Obsolete - always returns false
 * @deprecated
 */
@Deprecated public boolean getIncludeDrm(){
  return false;
}

Fixed version (ground truth):
/** 
 * Returns whether DRM ringtones will be included.
 * @return Whether DRM ringtones will be included.
 * @see #setIncludeDrm(boolean) Obsolete - always returns false
 * @deprecated DRM ringtones are no longer supported
 */
@Deprecated public boolean getIncludeDrm(){
  return false;
}
Program: 2134
Project: 2134
Buggy source:
/** 
 * Sets whether to include DRM ringtones.
 * @param includeDrm Whether to include DRM ringtones.Obsolete - no longer does anything
 * @deprecated
 */
@Deprecated public void setIncludeDrm(boolean includeDrm){
  if (includeDrm) {
    Log.w(TAG,"String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Sets whether to include DRM ringtones.
 * @param includeDrm Whether to include DRM ringtones.Obsolete - no longer has any effect
 * @deprecated DRM ringtones are no longer supported
 */
@Deprecated public void setIncludeDrm(boolean includeDrm){
  if (includeDrm) {
    Log.w(TAG,"String_Node_Str");
  }
}
Program: 2135
Project: 2135
Buggy source:
/** 
 * Returns whether DRM ringtones will be included.
 * @return Whether DRM ringtones will be included.
 * @see #setIncludeDrm(boolean) Obsolete - always returns false
 * @deprecated
 */
@Deprecated public boolean getIncludeDrm(){
  return false;
}

Fixed version (ground truth):
/** 
 * Returns whether DRM ringtones will be included.
 * @return Whether DRM ringtones will be included.
 * @see #setIncludeDrm(boolean) Obsolete - always returns false
 * @deprecated DRM ringtones are no longer supported
 */
@Deprecated public boolean getIncludeDrm(){
  return false;
}
Program: 2136
Project: 2136
Buggy source:
/** 
 * Sets whether to include DRM ringtones.
 * @param includeDrm Whether to include DRM ringtones.Obsolete - no longer does anything
 * @deprecated
 */
@Deprecated public void setIncludeDrm(boolean includeDrm){
  if (includeDrm) {
    Log.w(TAG,"String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Sets whether to include DRM ringtones.
 * @param includeDrm Whether to include DRM ringtones.Obsolete - no longer has any effect
 * @deprecated DRM ringtones are no longer supported
 */
@Deprecated public void setIncludeDrm(boolean includeDrm){
  if (includeDrm) {
    Log.w(TAG,"String_Node_Str");
  }
}