nus-yam/ex-repair huggingface dataset:
Program: 677
Project: 677
Buggy source:
private void dumpProcessInternalLocked(PrintWriter pw,String prefix,ProcessState proc,boolean dumpAll){
  if (dumpAll) {
    pw.print(prefix);
    pw.print("String_Node_Str");
    pw.print(Integer.toHexString(System.identityHashCode(proc)));
    pw.print("String_Node_Str");
    pw.print(Integer.toHexString(System.identityHashCode(proc.mCommonProcess)));
    pw.print("String_Node_Str");
    pw.println(proc.mPackage);
    if (proc.mMultiPackage) {
      pw.print(prefix);
      pw.print("String_Node_Str");
      pw.println(proc.mMultiPackage);
    }
    if (proc != proc.mCommonProcess) {
      pw.print(prefix);
      pw.print("String_Node_Str");
      pw.print(proc.mCommonProcess.mName);
      pw.print("String_Node_Str");
      pw.print(proc.mCommonProcess.mUid);
      pw.print("String_Node_Str");
      pw.println(proc.mCommonProcess.mPackage);
    }
  }
  pw.print(prefix);
  pw.print("String_Node_Str");
  pw.println(proc.mActive);
  if (proc.mDead) {
    pw.print(prefix);
    pw.print("String_Node_Str");
    pw.println(proc.mDead);
  }
  pw.print(prefix);
  pw.print("String_Node_Str");
  pw.print(proc.mNumActiveServices);
  pw.print("String_Node_Str");
  pw.println(proc.mNumStartedServices);
}

Fixed version (ground truth):
private void dumpProcessInternalLocked(PrintWriter pw,String prefix,ProcessState proc,boolean dumpAll){
  if (dumpAll) {
    pw.print(prefix);
    pw.print("String_Node_Str");
    pw.print(Integer.toHexString(System.identityHashCode(proc)));
    pw.print("String_Node_Str");
    pw.print(Integer.toHexString(System.identityHashCode(proc.mCommonProcess)));
    pw.print("String_Node_Str");
    pw.println(proc.mPackage);
    if (proc.mMultiPackage) {
      pw.print(prefix);
      pw.print("String_Node_Str");
      pw.println(proc.mMultiPackage);
    }
    if (proc != proc.mCommonProcess) {
      pw.print(prefix);
      pw.print("String_Node_Str");
      pw.print(proc.mCommonProcess.mName);
      pw.print("String_Node_Str");
      pw.print(proc.mCommonProcess.mUid);
      pw.print("String_Node_Str");
      pw.println(proc.mCommonProcess.mPackage);
    }
  }
  if (proc.mActive) {
    pw.print(prefix);
    pw.print("String_Node_Str");
    pw.println(proc.mActive);
  }
  if (proc.mDead) {
    pw.print(prefix);
    pw.print("String_Node_Str");
    pw.println(proc.mDead);
  }
  if (proc.mNumActiveServices != 0 || proc.mNumStartedServices != 0) {
    pw.print(prefix);
    pw.print("String_Node_Str");
    pw.print(proc.mNumActiveServices);
    pw.print("String_Node_Str");
    pw.println(proc.mNumStartedServices);
  }
}
Program: 679
Project: 679
Buggy source:
private final List<ProviderInfo> generateApplicationProvidersLocked(ProcessRecord app){
  List<ProviderInfo> providers=null;
  try {
    providers=AppGlobals.getPackageManager().queryContentProviders(app.processName,app.uid,STOCK_PM_FLAGS | PackageManager.GET_URI_PERMISSION_PATTERNS);
  }
 catch (  RemoteException ex) {
  }
  if (DEBUG_MU)   Slog.v(TAG_MU,"String_Node_Str" + app.uid);
  int userId=app.userId;
  if (providers != null) {
    int N=providers.size();
    app.pubProviders.ensureCapacity(N + app.pubProviders.size());
    for (int i=0; i < N; i++) {
      ProviderInfo cpi=(ProviderInfo)providers.get(i);
      boolean singleton=isSingleton(cpi.processName,cpi.applicationInfo,cpi.name,cpi.flags);
      if (singleton && UserHandle.getUserId(app.uid) != 0) {
        providers.remove(i);
        N--;
        i--;
        continue;
      }
      ComponentName comp=new ComponentName(cpi.packageName,cpi.name);
      ContentProviderRecord cpr=mProviderMap.getProviderByClass(comp,userId);
      if (cpr == null) {
        cpr=new ContentProviderRecord(this,cpi,app.info,comp,singleton);
        mProviderMap.putProviderByClass(comp,cpr);
      }
      if (DEBUG_MU)       Slog.v(TAG_MU,"String_Node_Str" + cpr.uid);
      app.pubProviders.put(cpi.name,cpr);
      app.addPackage(cpi.applicationInfo.packageName,mProcessStats);
      ensurePackageDexOpt(cpi.applicationInfo.packageName);
    }
  }
  return providers;
}

Fixed version (ground truth):
private final List<ProviderInfo> generateApplicationProvidersLocked(ProcessRecord app){
  List<ProviderInfo> providers=null;
  try {
    providers=AppGlobals.getPackageManager().queryContentProviders(app.processName,app.uid,STOCK_PM_FLAGS | PackageManager.GET_URI_PERMISSION_PATTERNS);
  }
 catch (  RemoteException ex) {
  }
  if (DEBUG_MU)   Slog.v(TAG_MU,"String_Node_Str" + app.uid);
  int userId=app.userId;
  if (providers != null) {
    int N=providers.size();
    app.pubProviders.ensureCapacity(N + app.pubProviders.size());
    for (int i=0; i < N; i++) {
      ProviderInfo cpi=(ProviderInfo)providers.get(i);
      boolean singleton=isSingleton(cpi.processName,cpi.applicationInfo,cpi.name,cpi.flags);
      if (singleton && UserHandle.getUserId(app.uid) != 0) {
        providers.remove(i);
        N--;
        i--;
        continue;
      }
      ComponentName comp=new ComponentName(cpi.packageName,cpi.name);
      ContentProviderRecord cpr=mProviderMap.getProviderByClass(comp,userId);
      if (cpr == null) {
        cpr=new ContentProviderRecord(this,cpi,app.info,comp,singleton);
        mProviderMap.putProviderByClass(comp,cpr);
      }
      if (DEBUG_MU)       Slog.v(TAG_MU,"String_Node_Str" + cpr.uid);
      app.pubProviders.put(cpi.name,cpr);
      if (!cpi.multiprocess || !"String_Node_Str".equals(cpi.packageName)) {
        app.addPackage(cpi.applicationInfo.packageName,mProcessStats);
      }
      ensurePackageDexOpt(cpi.applicationInfo.packageName);
    }
  }
  return providers;
}
Program: 681
Project: 681
Buggy source:
void startSpecificActivityLocked(ActivityRecord r,boolean andResume,boolean checkConfig){
  ProcessRecord app=mService.getProcessRecordLocked(r.processName,r.info.applicationInfo.uid,true);
  r.task.stack.setLaunchTime(r);
  if (app != null && app.thread != null) {
    try {
      app.addPackage(r.info.packageName,mService.mProcessStats);
      realStartActivityLocked(r,app,andResume,checkConfig);
      return;
    }
 catch (    RemoteException e) {
      Slog.w(TAG,"String_Node_Str" + r.intent.getComponent().flattenToShortString(),e);
    }
  }
  mService.startProcessLocked(r.processName,r.info.applicationInfo,true,0,"String_Node_Str",r.intent.getComponent(),false,false,true);
}

Fixed version (ground truth):
void startSpecificActivityLocked(ActivityRecord r,boolean andResume,boolean checkConfig){
  ProcessRecord app=mService.getProcessRecordLocked(r.processName,r.info.applicationInfo.uid,true);
  r.task.stack.setLaunchTime(r);
  if (app != null && app.thread != null) {
    try {
      if ((r.info.flags & ActivityInfo.FLAG_MULTIPROCESS) == 0 || !"String_Node_Str".equals(r.info.packageName)) {
        app.addPackage(r.info.packageName,mService.mProcessStats);
      }
      realStartActivityLocked(r,app,andResume,checkConfig);
      return;
    }
 catch (    RemoteException e) {
      Slog.w(TAG,"String_Node_Str" + r.intent.getComponent().flattenToShortString(),e);
    }
  }
  mService.startProcessLocked(r.processName,r.info.applicationInfo,true,0,"String_Node_Str",r.intent.getComponent(),false,false,true);
}
Program: 683
Project: 683
Buggy source:
public static long dumpSingleTime(PrintWriter pw,String prefix,long[] durations,int curState,long curStartTime,long now){
  long totalTime=0;
  int printedScreen=-1;
  for (int iscreen=0; iscreen < ADJ_COUNT; iscreen+=ADJ_SCREEN_MOD) {
    int printedMem=-1;
    for (int imem=0; imem < ADJ_MEM_FACTOR_COUNT; imem++) {
      int state=imem + iscreen;
      long time=durations[state];
      String running="String_Node_Str";
      if (curState == state) {
        time+=now - curStartTime;
        if (pw != null) {
          running="String_Node_Str";
        }
      }
      if (time != 0) {
        if (pw != null) {
          pw.print(prefix);
          printScreenLabel(pw,printedScreen != iscreen ? iscreen : STATE_NOTHING);
          printedScreen=iscreen;
          printMemLabel(pw,printedMem != imem ? imem : STATE_NOTHING);
          printedMem=imem;
          TimeUtils.formatDuration(time,pw);
          pw.println(running);
        }
        totalTime+=time;
      }
    }
  }
  if (totalTime != 0 && pw != null) {
    pw.print(prefix);
    printScreenLabel(pw,STATE_NOTHING);
    pw.print("String_Node_Str");
    TimeUtils.formatDuration(totalTime,pw);
    pw.println();
  }
  return totalTime;
}

Fixed version (ground truth):
public static long dumpSingleTime(PrintWriter pw,String prefix,long[] durations,int curState,long curStartTime,long now){
  long totalTime=0;
  int printedScreen=-1;
  for (int iscreen=0; iscreen < ADJ_COUNT; iscreen+=ADJ_SCREEN_MOD) {
    int printedMem=-1;
    for (int imem=0; imem < ADJ_MEM_FACTOR_COUNT; imem++) {
      int state=imem + iscreen;
      long time=durations[state];
      String running="String_Node_Str";
      if (curState == state) {
        time+=now - curStartTime;
        if (pw != null) {
          running="String_Node_Str";
        }
      }
      if (time != 0) {
        if (pw != null) {
          pw.print(prefix);
          printScreenLabel(pw,printedScreen != iscreen ? iscreen : STATE_NOTHING);
          printedScreen=iscreen;
          printMemLabel(pw,printedMem != imem ? imem : STATE_NOTHING,(char)0);
          printedMem=imem;
          pw.print("String_Node_Str");
          TimeUtils.formatDuration(time,pw);
          pw.println(running);
        }
        totalTime+=time;
      }
    }
  }
  if (totalTime != 0 && pw != null) {
    pw.print(prefix);
    pw.print("String_Node_Str");
    TimeUtils.formatDuration(totalTime,pw);
    pw.println();
  }
  return totalTime;
}
Program: 684
Project: 684
Buggy source:
private static void printMemLabel(PrintWriter pw,int offset){
switch (offset) {
case ADJ_NOTHING:
    pw.print("String_Node_Str");
  break;
case ADJ_MEM_FACTOR_NORMAL:
pw.print("String_Node_Str");
break;
case ADJ_MEM_FACTOR_MODERATE:
pw.print("String_Node_Str");
break;
case ADJ_MEM_FACTOR_LOW:
pw.print("String_Node_Str");
break;
case ADJ_MEM_FACTOR_CRITICAL:
pw.print("String_Node_Str");
break;
default :
pw.print("String_Node_Str");
break;
}
}

Fixed version (ground truth):
private static void printMemLabel(PrintWriter pw,int offset,char sep){
switch (offset) {
case ADJ_NOTHING:
    pw.print("String_Node_Str");
  if (sep != 0)   pw.print(' ');
break;
case ADJ_MEM_FACTOR_NORMAL:
pw.print("String_Node_Str");
if (sep != 0) pw.print(sep);
break;
case ADJ_MEM_FACTOR_MODERATE:
pw.print("String_Node_Str");
if (sep != 0) pw.print(sep);
break;
case ADJ_MEM_FACTOR_LOW:
pw.print("String_Node_Str");
if (sep != 0) pw.print(sep);
break;
case ADJ_MEM_FACTOR_CRITICAL:
pw.print("String_Node_Str");
if (sep != 0) pw.print(sep);
break;
default :
pw.print("String_Node_Str");
if (sep != 0) pw.print(sep);
break;
}
}
Program: 685
Project: 685
Buggy source:
public static long dumpSingleServiceTime(PrintWriter pw,String prefix,ServiceState service,int serviceType,int curState,long curStartTime,long now){
  long totalTime=0;
  int printedScreen=-1;
  for (int iscreen=0; iscreen < ADJ_COUNT; iscreen+=ADJ_SCREEN_MOD) {
    int printedMem=-1;
    for (int imem=0; imem < ADJ_MEM_FACTOR_COUNT; imem++) {
      int state=imem + iscreen;
      long time=service.getDuration(serviceType,curState,curStartTime,state,now);
      String running="String_Node_Str";
      if (curState == state && pw != null) {
        running="String_Node_Str";
      }
      if (time != 0) {
        if (pw != null) {
          pw.print(prefix);
          printScreenLabel(pw,printedScreen != iscreen ? iscreen : STATE_NOTHING);
          printedScreen=iscreen;
          printMemLabel(pw,printedMem != imem ? imem : STATE_NOTHING);
          printedMem=imem;
          TimeUtils.formatDuration(time,pw);
          pw.println(running);
        }
        totalTime+=time;
      }
    }
  }
  if (totalTime != 0 && pw != null) {
    pw.print(prefix);
    printScreenLabel(pw,STATE_NOTHING);
    pw.print("String_Node_Str");
    TimeUtils.formatDuration(totalTime,pw);
    pw.println();
  }
  return totalTime;
}

Fixed version (ground truth):
public static long dumpSingleServiceTime(PrintWriter pw,String prefix,ServiceState service,int serviceType,int curState,long curStartTime,long now){
  long totalTime=0;
  int printedScreen=-1;
  for (int iscreen=0; iscreen < ADJ_COUNT; iscreen+=ADJ_SCREEN_MOD) {
    int printedMem=-1;
    for (int imem=0; imem < ADJ_MEM_FACTOR_COUNT; imem++) {
      int state=imem + iscreen;
      long time=service.getDuration(serviceType,curState,curStartTime,state,now);
      String running="String_Node_Str";
      if (curState == state && pw != null) {
        running="String_Node_Str";
      }
      if (time != 0) {
        if (pw != null) {
          pw.print(prefix);
          printScreenLabel(pw,printedScreen != iscreen ? iscreen : STATE_NOTHING);
          printedScreen=iscreen;
          printMemLabel(pw,printedMem != imem ? imem : STATE_NOTHING,(char)0);
          printedMem=imem;
          pw.print("String_Node_Str");
          TimeUtils.formatDuration(time,pw);
          pw.println(running);
        }
        totalTime+=time;
      }
    }
  }
  if (totalTime != 0 && pw != null) {
    pw.print(prefix);
    pw.print("String_Node_Str");
    TimeUtils.formatDuration(totalTime,pw);
    pw.println();
  }
  return totalTime;
}
Program: 687
Project: 687
Buggy source:
private void dumpProcessInternalLocked(PrintWriter pw,String prefix,ProcessState proc,boolean dumpAll){
  if (dumpAll) {
    pw.print(prefix);
    pw.print("String_Node_Str");
    pw.print(Integer.toHexString(System.identityHashCode(proc)));
    pw.print("String_Node_Str");
    pw.print(Integer.toHexString(System.identityHashCode(proc.mCommonProcess)));
    pw.print("String_Node_Str");
    pw.println(proc.mPackage);
    if (proc.mMultiPackage) {
      pw.print(prefix);
      pw.print("String_Node_Str");
      pw.println(proc.mMultiPackage);
    }
    if (proc != proc.mCommonProcess) {
      pw.print(prefix);
      pw.print("String_Node_Str");
      pw.print(proc.mCommonProcess.mName);
      pw.print("String_Node_Str");
      pw.print(proc.mCommonProcess.mUid);
      pw.print("String_Node_Str");
      pw.println(proc.mCommonProcess.mPackage);
    }
  }
  pw.print(prefix);
  pw.print("String_Node_Str");
  pw.println(proc.mActive);
  if (proc.mDead) {
    pw.print(prefix);
    pw.print("String_Node_Str");
    pw.println(proc.mDead);
  }
  pw.print(prefix);
  pw.print("String_Node_Str");
  pw.print(proc.mNumActiveServices);
  pw.print("String_Node_Str");
  pw.println(proc.mNumStartedServices);
}

Fixed version (ground truth):
private void dumpProcessInternalLocked(PrintWriter pw,String prefix,ProcessState proc,boolean dumpAll){
  if (dumpAll) {
    pw.print(prefix);
    pw.print("String_Node_Str");
    pw.print(Integer.toHexString(System.identityHashCode(proc)));
    pw.print("String_Node_Str");
    pw.print(Integer.toHexString(System.identityHashCode(proc.mCommonProcess)));
    pw.print("String_Node_Str");
    pw.println(proc.mPackage);
    if (proc.mMultiPackage) {
      pw.print(prefix);
      pw.print("String_Node_Str");
      pw.println(proc.mMultiPackage);
    }
    if (proc != proc.mCommonProcess) {
      pw.print(prefix);
      pw.print("String_Node_Str");
      pw.print(proc.mCommonProcess.mName);
      pw.print("String_Node_Str");
      pw.print(proc.mCommonProcess.mUid);
      pw.print("String_Node_Str");
      pw.println(proc.mCommonProcess.mPackage);
    }
  }
  if (proc.mActive) {
    pw.print(prefix);
    pw.print("String_Node_Str");
    pw.println(proc.mActive);
  }
  if (proc.mDead) {
    pw.print(prefix);
    pw.print("String_Node_Str");
    pw.println(proc.mDead);
  }
  if (proc.mNumActiveServices != 0 || proc.mNumStartedServices != 0) {
    pw.print(prefix);
    pw.print("String_Node_Str");
    pw.print(proc.mNumActiveServices);
    pw.print("String_Node_Str");
    pw.println(proc.mNumStartedServices);
  }
}
Program: 689
Project: 689
Buggy source:
private final List<ProviderInfo> generateApplicationProvidersLocked(ProcessRecord app){
  List<ProviderInfo> providers=null;
  try {
    providers=AppGlobals.getPackageManager().queryContentProviders(app.processName,app.uid,STOCK_PM_FLAGS | PackageManager.GET_URI_PERMISSION_PATTERNS);
  }
 catch (  RemoteException ex) {
  }
  if (DEBUG_MU)   Slog.v(TAG_MU,"String_Node_Str" + app.uid);
  int userId=app.userId;
  if (providers != null) {
    int N=providers.size();
    app.pubProviders.ensureCapacity(N + app.pubProviders.size());
    for (int i=0; i < N; i++) {
      ProviderInfo cpi=(ProviderInfo)providers.get(i);
      boolean singleton=isSingleton(cpi.processName,cpi.applicationInfo,cpi.name,cpi.flags);
      if (singleton && UserHandle.getUserId(app.uid) != 0) {
        providers.remove(i);
        N--;
        i--;
        continue;
      }
      ComponentName comp=new ComponentName(cpi.packageName,cpi.name);
      ContentProviderRecord cpr=mProviderMap.getProviderByClass(comp,userId);
      if (cpr == null) {
        cpr=new ContentProviderRecord(this,cpi,app.info,comp,singleton);
        mProviderMap.putProviderByClass(comp,cpr);
      }
      if (DEBUG_MU)       Slog.v(TAG_MU,"String_Node_Str" + cpr.uid);
      app.pubProviders.put(cpi.name,cpr);
      app.addPackage(cpi.applicationInfo.packageName,mProcessStats);
      ensurePackageDexOpt(cpi.applicationInfo.packageName);
    }
  }
  return providers;
}

Fixed version (ground truth):
private final List<ProviderInfo> generateApplicationProvidersLocked(ProcessRecord app){
  List<ProviderInfo> providers=null;
  try {
    providers=AppGlobals.getPackageManager().queryContentProviders(app.processName,app.uid,STOCK_PM_FLAGS | PackageManager.GET_URI_PERMISSION_PATTERNS);
  }
 catch (  RemoteException ex) {
  }
  if (DEBUG_MU)   Slog.v(TAG_MU,"String_Node_Str" + app.uid);
  int userId=app.userId;
  if (providers != null) {
    int N=providers.size();
    app.pubProviders.ensureCapacity(N + app.pubProviders.size());
    for (int i=0; i < N; i++) {
      ProviderInfo cpi=(ProviderInfo)providers.get(i);
      boolean singleton=isSingleton(cpi.processName,cpi.applicationInfo,cpi.name,cpi.flags);
      if (singleton && UserHandle.getUserId(app.uid) != 0) {
        providers.remove(i);
        N--;
        i--;
        continue;
      }
      ComponentName comp=new ComponentName(cpi.packageName,cpi.name);
      ContentProviderRecord cpr=mProviderMap.getProviderByClass(comp,userId);
      if (cpr == null) {
        cpr=new ContentProviderRecord(this,cpi,app.info,comp,singleton);
        mProviderMap.putProviderByClass(comp,cpr);
      }
      if (DEBUG_MU)       Slog.v(TAG_MU,"String_Node_Str" + cpr.uid);
      app.pubProviders.put(cpi.name,cpr);
      if (!cpi.multiprocess || !"String_Node_Str".equals(cpi.packageName)) {
        app.addPackage(cpi.applicationInfo.packageName,mProcessStats);
      }
      ensurePackageDexOpt(cpi.applicationInfo.packageName);
    }
  }
  return providers;
}
Program: 691
Project: 691
Buggy source:
void startSpecificActivityLocked(ActivityRecord r,boolean andResume,boolean checkConfig){
  ProcessRecord app=mService.getProcessRecordLocked(r.processName,r.info.applicationInfo.uid,true);
  r.task.stack.setLaunchTime(r);
  if (app != null && app.thread != null) {
    try {
      app.addPackage(r.info.packageName,mService.mProcessStats);
      realStartActivityLocked(r,app,andResume,checkConfig);
      return;
    }
 catch (    RemoteException e) {
      Slog.w(TAG,"String_Node_Str" + r.intent.getComponent().flattenToShortString(),e);
    }
  }
  mService.startProcessLocked(r.processName,r.info.applicationInfo,true,0,"String_Node_Str",r.intent.getComponent(),false,false,true);
}

Fixed version (ground truth):
void startSpecificActivityLocked(ActivityRecord r,boolean andResume,boolean checkConfig){
  ProcessRecord app=mService.getProcessRecordLocked(r.processName,r.info.applicationInfo.uid,true);
  r.task.stack.setLaunchTime(r);
  if (app != null && app.thread != null) {
    try {
      if ((r.info.flags & ActivityInfo.FLAG_MULTIPROCESS) == 0 || !"String_Node_Str".equals(r.info.packageName)) {
        app.addPackage(r.info.packageName,mService.mProcessStats);
      }
      realStartActivityLocked(r,app,andResume,checkConfig);
      return;
    }
 catch (    RemoteException e) {
      Slog.w(TAG,"String_Node_Str" + r.intent.getComponent().flattenToShortString(),e);
    }
  }
  mService.startProcessLocked(r.processName,r.info.applicationInfo,true,0,"String_Node_Str",r.intent.getComponent(),false,false,true);
}
Program: 693
Project: 693
Buggy source:
/** 
 * Sets the padding. The view may add on the space required to display the scrollbars, depending on the style and visibility of the scrollbars. So the values returned from   {@link #getPaddingLeft},   {@link #getPaddingTop},  {@link #getPaddingRight} and {@link #getPaddingBottom} may be differentfrom the values set in this call.
 * @attr ref android.R.styleable#View_padding
 * @attr ref android.R.styleable#View_paddingBottom
 * @attr ref android.R.styleable#View_paddingLeft
 * @attr ref android.R.styleable#View_paddingRight
 * @attr ref android.R.styleable#View_paddingTop
 * @param left the left padding in pixels
 * @param top the top padding in pixels
 * @param right the right padding in pixels
 * @param bottom the bottom padding in pixels
 */
public void setPadding(int left,int top,int right,int bottom){
  resetResolvedPadding();
  mUserPaddingStart=UNDEFINED_PADDING;
  mUserPaddingEnd=UNDEFINED_PADDING;
  mUserPaddingLeftInitial=left;
  mUserPaddingRightInitial=right;
  internalSetPadding(left,top,right,bottom);
}

Fixed version (ground truth):
/** 
 * Sets the padding. The view may add on the space required to display the scrollbars, depending on the style and visibility of the scrollbars. So the values returned from   {@link #getPaddingLeft},   {@link #getPaddingTop},  {@link #getPaddingRight} and {@link #getPaddingBottom} may be differentfrom the values set in this call.
 * @attr ref android.R.styleable#View_padding
 * @attr ref android.R.styleable#View_paddingBottom
 * @attr ref android.R.styleable#View_paddingLeft
 * @attr ref android.R.styleable#View_paddingRight
 * @attr ref android.R.styleable#View_paddingTop
 * @param left the left padding in pixels
 * @param top the top padding in pixels
 * @param right the right padding in pixels
 * @param bottom the bottom padding in pixels
 */
public void setPadding(int left,int top,int right,int bottom){
  resetResolvedPadding();
  mUserPaddingStart=UNDEFINED_PADDING;
  mUserPaddingEnd=UNDEFINED_PADDING;
  mUserPaddingLeftInitial=left;
  mUserPaddingRightInitial=right;
  mUseBackgroundPadding=false;
  internalSetPadding(left,top,right,bottom);
}
Program: 695
Project: 695
Buggy source:
/** 
 * Resolve all RTL related properties.
 * @return true if resolution of RTL properties has been done
 * @hide
 */
public boolean resolveRtlPropertiesIfNeeded(){
  if (!needRtlPropertiesResolution())   return false;
  if (!isLayoutDirectionResolved()) {
    resolveLayoutDirection();
    resolveLayoutParams();
  }
  if (!isTextDirectionResolved()) {
    resolveTextDirection();
  }
  if (!isTextAlignmentResolved()) {
    resolveTextAlignment();
  }
  if (!isPaddingResolved()) {
    resolvePadding();
  }
  if (!isDrawablesResolved()) {
    resolveDrawables();
  }
  onRtlPropertiesChanged(getLayoutDirection());
  return true;
}

Fixed version (ground truth):
/** 
 * Resolve all RTL related properties.
 * @return true if resolution of RTL properties has been done
 * @hide
 */
public boolean resolveRtlPropertiesIfNeeded(){
  if (!needRtlPropertiesResolution())   return false;
  if (!isLayoutDirectionResolved()) {
    resolveLayoutDirection();
    resolveLayoutParams();
  }
  if (!isTextDirectionResolved()) {
    resolveTextDirection();
  }
  if (!isTextAlignmentResolved()) {
    resolveTextAlignment();
  }
  if (!isDrawablesResolved()) {
    resolveDrawables();
  }
  if (!isPaddingResolved()) {
    resolvePadding();
  }
  onRtlPropertiesChanged(getLayoutDirection());
  return true;
}
Program: 696
Project: 696
Buggy source:
/** 
 * Sets the relative padding. The view may add on the space required to display the scrollbars, depending on the style and visibility of the scrollbars. So the values returned from   {@link #getPaddingStart},   {@link #getPaddingTop},  {@link #getPaddingEnd} and {@link #getPaddingBottom} may be differentfrom the values set in this call.
 * @attr ref android.R.styleable#View_padding
 * @attr ref android.R.styleable#View_paddingBottom
 * @attr ref android.R.styleable#View_paddingStart
 * @attr ref android.R.styleable#View_paddingEnd
 * @attr ref android.R.styleable#View_paddingTop
 * @param start the start padding in pixels
 * @param top the top padding in pixels
 * @param end the end padding in pixels
 * @param bottom the bottom padding in pixels
 */
public void setPaddingRelative(int start,int top,int end,int bottom){
  resetResolvedPadding();
  mUserPaddingStart=start;
  mUserPaddingEnd=end;
switch (getLayoutDirection()) {
case LAYOUT_DIRECTION_RTL:
    mUserPaddingLeftInitial=end;
  mUserPaddingRightInitial=start;
internalSetPadding(end,top,start,bottom);
break;
case LAYOUT_DIRECTION_LTR:
default :
mUserPaddingLeftInitial=start;
mUserPaddingRightInitial=end;
internalSetPadding(start,top,end,bottom);
}
}

Fixed version (ground truth):
/** 
 * Sets the relative padding. The view may add on the space required to display the scrollbars, depending on the style and visibility of the scrollbars. So the values returned from   {@link #getPaddingStart},   {@link #getPaddingTop},  {@link #getPaddingEnd} and {@link #getPaddingBottom} may be differentfrom the values set in this call.
 * @attr ref android.R.styleable#View_padding
 * @attr ref android.R.styleable#View_paddingBottom
 * @attr ref android.R.styleable#View_paddingStart
 * @attr ref android.R.styleable#View_paddingEnd
 * @attr ref android.R.styleable#View_paddingTop
 * @param start the start padding in pixels
 * @param top the top padding in pixels
 * @param end the end padding in pixels
 * @param bottom the bottom padding in pixels
 */
public void setPaddingRelative(int start,int top,int end,int bottom){
  resetResolvedPadding();
  mUserPaddingStart=start;
  mUserPaddingEnd=end;
  mUseBackgroundPadding=false;
switch (getLayoutDirection()) {
case LAYOUT_DIRECTION_RTL:
    mUserPaddingLeftInitial=end;
  mUserPaddingRightInitial=start;
internalSetPadding(end,top,start,bottom);
break;
case LAYOUT_DIRECTION_LTR:
default :
mUserPaddingLeftInitial=start;
mUserPaddingRightInitial=end;
internalSetPadding(start,top,end,bottom);
}
}
Program: 697
Project: 697
Buggy source:
/** 
 * Resolves padding depending on layout direction, if applicable, and recomputes internal padding values to adjust for scroll bars.
 * @hide
 */
public void resolvePadding(){
  final int resolvedLayoutDirection=getLayoutDirection();
  if (!isRtlCompatibilityMode()) {
switch (resolvedLayoutDirection) {
case LAYOUT_DIRECTION_RTL:
      if (mUserPaddingStart != UNDEFINED_PADDING) {
        mUserPaddingRight=mUserPaddingStart;
      }
 else {
        mUserPaddingRight=mUserPaddingRightInitial;
      }
    if (mUserPaddingEnd != UNDEFINED_PADDING) {
      mUserPaddingLeft=mUserPaddingEnd;
    }
 else {
      mUserPaddingLeft=mUserPaddingLeftInitial;
    }
  break;
case LAYOUT_DIRECTION_LTR:
default :
if (mUserPaddingStart != UNDEFINED_PADDING) {
  mUserPaddingLeft=mUserPaddingStart;
}
 else {
  mUserPaddingLeft=mUserPaddingLeftInitial;
}
if (mUserPaddingEnd != UNDEFINED_PADDING) {
mUserPaddingRight=mUserPaddingEnd;
}
 else {
mUserPaddingRight=mUserPaddingRightInitial;
}
}
mUserPaddingBottom=(mUserPaddingBottom >= 0) ? mUserPaddingBottom : mPaddingBottom;
}
internalSetPadding(mUserPaddingLeft,mPaddingTop,mUserPaddingRight,mUserPaddingBottom);
onRtlPropertiesChanged(resolvedLayoutDirection);
mPrivateFlags2|=PFLAG2_PADDING_RESOLVED;
}

Fixed version (ground truth):
/** 
 * Resolves padding depending on layout direction, if applicable, and recomputes internal padding values to adjust for scroll bars.
 * @hide
 */
public void resolvePadding(){
  final int resolvedLayoutDirection=getLayoutDirection();
  if (!isRtlCompatibilityMode()) {
    if (mBackground != null && mUseBackgroundPadding) {
      Rect padding=sThreadLocal.get();
      if (padding == null) {
        padding=new Rect();
        sThreadLocal.set(padding);
      }
      mBackground.getPadding(padding);
      mUserPaddingLeftInitial=padding.left;
      mUserPaddingRightInitial=padding.right;
    }
switch (resolvedLayoutDirection) {
case LAYOUT_DIRECTION_RTL:
      if (mUserPaddingStart != UNDEFINED_PADDING) {
        mUserPaddingRight=mUserPaddingStart;
      }
 else {
        mUserPaddingRight=mUserPaddingRightInitial;
      }
    if (mUserPaddingEnd != UNDEFINED_PADDING) {
      mUserPaddingLeft=mUserPaddingEnd;
    }
 else {
      mUserPaddingLeft=mUserPaddingLeftInitial;
    }
  break;
case LAYOUT_DIRECTION_LTR:
default :
if (mUserPaddingStart != UNDEFINED_PADDING) {
  mUserPaddingLeft=mUserPaddingStart;
}
 else {
  mUserPaddingLeft=mUserPaddingLeftInitial;
}
if (mUserPaddingEnd != UNDEFINED_PADDING) {
mUserPaddingRight=mUserPaddingEnd;
}
 else {
mUserPaddingRight=mUserPaddingRightInitial;
}
}
mUserPaddingBottom=(mUserPaddingBottom >= 0) ? mUserPaddingBottom : mPaddingBottom;
}
internalSetPadding(mUserPaddingLeft,mPaddingTop,mUserPaddingRight,mUserPaddingBottom);
onRtlPropertiesChanged(resolvedLayoutDirection);
mPrivateFlags2|=PFLAG2_PADDING_RESOLVED;
}
Program: 698
Project: 698
Buggy source:
/** 
 * @hide
 */
@Override public Insets getOpticalInsets(){
  return (mCurrDrawable == null) ? Insets.NONE : mCurrDrawable.getOpticalInsets();
}

Fixed version (ground truth):
/** 
 * @hide
 */
@Override public Insets getOpticalInsets(){
  return mInsets;
}
Program: 700
Project: 700
Buggy source:
@Override public boolean getPadding(Rect padding){
  final Rect r=mDrawableContainerState.getConstantPadding();
  if (r != null) {
    padding.set(r);
    return true;
  }
  if (mCurrDrawable != null) {
    return mCurrDrawable.getPadding(padding);
  }
 else {
    return super.getPadding(padding);
  }
}

Fixed version (ground truth):
@Override public boolean getPadding(Rect padding){
  final Rect r=mDrawableContainerState.getConstantPadding();
  boolean result=true;
  if (r != null) {
    padding.set(r);
  }
 else {
    if (mCurrDrawable != null) {
      result=mCurrDrawable.getPadding(padding);
    }
 else {
      result=super.getPadding(padding);
    }
  }
  if (needsMirroring()) {
    final int left=padding.left;
    final int right=padding.right;
    padding.left=right;
    padding.right=left;
  }
  return result;
}
Program: 704
Project: 704
Buggy source:
@Override public String toString(){
  return "String_Node_Str" + mStackId + "String_Node_Str"+ mTaskHistory;
}

Fixed version (ground truth):
@Override public String toString(){
  return "String_Node_Str" + Integer.toHexString(System.identityHashCode(this)) + "String_Node_Str"+ mStackId+ "String_Node_Str"+ mTaskHistory.size()+ "String_Node_Str";
}
Program: 705
Project: 705
Buggy source:
ActivityRecord findTaskLocked(ActivityRecord r){
  for (int stackNdx=mStacks.size() - 1; stackNdx >= 0; --stackNdx) {
    final ActivityStack stack=mStacks.get(stackNdx);
    if (!r.isApplicationActivity() && !stack.isHomeStack()) {
      continue;
    }
    final ActivityRecord ar=stack.findTaskLocked(r);
    if (ar != null) {
      return ar;
    }
  }
  return null;
}

Fixed version (ground truth):
ActivityRecord findTaskLocked(ActivityRecord r){
  if (DEBUG_TASKS)   Slog.d(TAG,"String_Node_Str" + r);
  for (int stackNdx=mStacks.size() - 1; stackNdx >= 0; --stackNdx) {
    final ActivityStack stack=mStacks.get(stackNdx);
    if (!r.isApplicationActivity() && !stack.isHomeStack()) {
      if (DEBUG_TASKS)       Slog.d(TAG,"String_Node_Str" + stack);
      continue;
    }
    final ActivityRecord ar=stack.findTaskLocked(r);
    if (ar != null) {
      return ar;
    }
  }
  if (DEBUG_TASKS)   Slog.d(TAG,"String_Node_Str");
  return null;
}
Program: 707
Project: 707
Buggy source:
public synchronized void onScreenTurnedOn(final IKeyguardShowCallback callback){
  if (DEBUG)   Log.d(TAG,"String_Node_Str");
  mScreenOn=true;
  final IBinder token;
  final boolean disabled=mLockPatternUtils.isLockScreenDisabled() && !mLockPatternUtils.isSecure();
  if (mKeyguardHost == null || disabled) {
    token=null;
  }
 else {
    token=mKeyguardHost.getWindowToken();
  }
  if (mKeyguardView != null) {
    mKeyguardView.onScreenTurnedOn();
    if (callback != null) {
      if (mKeyguardHost.getVisibility() == View.VISIBLE) {
        mKeyguardHost.post(new Runnable(){
          @Override public void run(){
            try {
              callback.onShown(token);
            }
 catch (            RemoteException e) {
              Slog.w(TAG,"String_Node_Str",e);
            }
          }
        }
);
      }
 else {
        try {
          callback.onShown(token);
        }
 catch (        RemoteException e) {
          Slog.w(TAG,"String_Node_Str",e);
        }
      }
    }
  }
 else   if (callback != null) {
    try {
      callback.onShown(token);
    }
 catch (    RemoteException e) {
      Slog.w(TAG,"String_Node_Str",e);
    }
  }
}

Fixed version (ground truth):
public synchronized void onScreenTurnedOn(final IKeyguardShowCallback callback){
  if (DEBUG)   Log.d(TAG,"String_Node_Str");
  mScreenOn=true;
  final IBinder token=isShowing() ? mKeyguardHost.getWindowToken() : null;
  if (DEBUG && token == null)   Slog.v(TAG,"String_Node_Str" + (mKeyguardHost == null ? "String_Node_Str" : "String_Node_Str"));
  if (mKeyguardView != null) {
    mKeyguardView.onScreenTurnedOn();
    if (callback != null) {
      if (mKeyguardHost.getVisibility() == View.VISIBLE) {
        mKeyguardHost.post(new Runnable(){
          @Override public void run(){
            try {
              callback.onShown(token);
            }
 catch (            RemoteException e) {
              Slog.w(TAG,"String_Node_Str",e);
            }
          }
        }
);
      }
 else {
        try {
          callback.onShown(token);
        }
 catch (        RemoteException e) {
          Slog.w(TAG,"String_Node_Str",e);
        }
      }
    }
  }
 else   if (callback != null) {
    try {
      callback.onShown(token);
    }
 catch (    RemoteException e) {
      Slog.w(TAG,"String_Node_Str",e);
    }
  }
}
Program: 710
Project: 710
Buggy source:
@Override public String toString(){
  return "String_Node_Str" + mStackId + "String_Node_Str"+ mTaskHistory;
}

Fixed version (ground truth):
@Override public String toString(){
  return "String_Node_Str" + Integer.toHexString(System.identityHashCode(this)) + "String_Node_Str"+ mStackId+ "String_Node_Str"+ mTaskHistory.size()+ "String_Node_Str";
}
Program: 711
Project: 711
Buggy source:
ActivityRecord findTaskLocked(ActivityRecord r){
  for (int stackNdx=mStacks.size() - 1; stackNdx >= 0; --stackNdx) {
    final ActivityStack stack=mStacks.get(stackNdx);
    if (!r.isApplicationActivity() && !stack.isHomeStack()) {
      continue;
    }
    final ActivityRecord ar=stack.findTaskLocked(r);
    if (ar != null) {
      return ar;
    }
  }
  return null;
}

Fixed version (ground truth):
ActivityRecord findTaskLocked(ActivityRecord r){
  if (DEBUG_TASKS)   Slog.d(TAG,"String_Node_Str" + r);
  for (int stackNdx=mStacks.size() - 1; stackNdx >= 0; --stackNdx) {
    final ActivityStack stack=mStacks.get(stackNdx);
    if (!r.isApplicationActivity() && !stack.isHomeStack()) {
      if (DEBUG_TASKS)       Slog.d(TAG,"String_Node_Str" + stack);
      continue;
    }
    final ActivityRecord ar=stack.findTaskLocked(r);
    if (ar != null) {
      return ar;
    }
  }
  if (DEBUG_TASKS)   Slog.d(TAG,"String_Node_Str");
  return null;
}
Program: 715
Project: 715
Buggy source:
@Override public String toString(){
  return "String_Node_Str" + mStackId + "String_Node_Str"+ mTaskHistory;
}

Fixed version (ground truth):
@Override public String toString(){
  return "String_Node_Str" + Integer.toHexString(System.identityHashCode(this)) + "String_Node_Str"+ mStackId+ "String_Node_Str"+ mTaskHistory.size()+ "String_Node_Str";
}
Program: 716
Project: 716
Buggy source:
ActivityRecord findTaskLocked(ActivityRecord r){
  for (int stackNdx=mStacks.size() - 1; stackNdx >= 0; --stackNdx) {
    final ActivityStack stack=mStacks.get(stackNdx);
    if (!r.isApplicationActivity() && !stack.isHomeStack()) {
      continue;
    }
    final ActivityRecord ar=stack.findTaskLocked(r);
    if (ar != null) {
      return ar;
    }
  }
  return null;
}

Fixed version (ground truth):
ActivityRecord findTaskLocked(ActivityRecord r){
  if (DEBUG_TASKS)   Slog.d(TAG,"String_Node_Str" + r);
  for (int stackNdx=mStacks.size() - 1; stackNdx >= 0; --stackNdx) {
    final ActivityStack stack=mStacks.get(stackNdx);
    if (!r.isApplicationActivity() && !stack.isHomeStack()) {
      if (DEBUG_TASKS)       Slog.d(TAG,"String_Node_Str" + stack);
      continue;
    }
    final ActivityRecord ar=stack.findTaskLocked(r);
    if (ar != null) {
      return ar;
    }
  }
  if (DEBUG_TASKS)   Slog.d(TAG,"String_Node_Str");
  return null;
}
Program: 720
Project: 720
Buggy source:
@Override public String toString(){
  return "String_Node_Str" + mStackId + "String_Node_Str"+ mTaskHistory;
}

Fixed version (ground truth):
@Override public String toString(){
  return "String_Node_Str" + Integer.toHexString(System.identityHashCode(this)) + "String_Node_Str"+ mStackId+ "String_Node_Str"+ mTaskHistory.size()+ "String_Node_Str";
}
Program: 721
Project: 721
Buggy source:
ActivityRecord findTaskLocked(ActivityRecord r){
  for (int stackNdx=mStacks.size() - 1; stackNdx >= 0; --stackNdx) {
    final ActivityStack stack=mStacks.get(stackNdx);
    if (!r.isApplicationActivity() && !stack.isHomeStack()) {
      continue;
    }
    final ActivityRecord ar=stack.findTaskLocked(r);
    if (ar != null) {
      return ar;
    }
  }
  return null;
}

Fixed version (ground truth):
ActivityRecord findTaskLocked(ActivityRecord r){
  if (DEBUG_TASKS)   Slog.d(TAG,"String_Node_Str" + r);
  for (int stackNdx=mStacks.size() - 1; stackNdx >= 0; --stackNdx) {
    final ActivityStack stack=mStacks.get(stackNdx);
    if (!r.isApplicationActivity() && !stack.isHomeStack()) {
      if (DEBUG_TASKS)       Slog.d(TAG,"String_Node_Str" + stack);
      continue;
    }
    final ActivityRecord ar=stack.findTaskLocked(r);
    if (ar != null) {
      return ar;
    }
  }
  if (DEBUG_TASKS)   Slog.d(TAG,"String_Node_Str");
  return null;
}
Program: 723
Project: 723
Buggy source:
public synchronized void onScreenTurnedOn(final IKeyguardShowCallback callback){
  if (DEBUG)   Log.d(TAG,"String_Node_Str");
  mScreenOn=true;
  final IBinder token;
  final boolean disabled=mLockPatternUtils.isLockScreenDisabled() && !mLockPatternUtils.isSecure();
  if (mKeyguardHost == null || disabled) {
    token=null;
  }
 else {
    token=mKeyguardHost.getWindowToken();
  }
  if (mKeyguardView != null) {
    mKeyguardView.onScreenTurnedOn();
    if (callback != null) {
      if (mKeyguardHost.getVisibility() == View.VISIBLE) {
        mKeyguardHost.post(new Runnable(){
          @Override public void run(){
            try {
              callback.onShown(token);
            }
 catch (            RemoteException e) {
              Slog.w(TAG,"String_Node_Str",e);
            }
          }
        }
);
      }
 else {
        try {
          callback.onShown(token);
        }
 catch (        RemoteException e) {
          Slog.w(TAG,"String_Node_Str",e);
        }
      }
    }
  }
 else   if (callback != null) {
    try {
      callback.onShown(token);
    }
 catch (    RemoteException e) {
      Slog.w(TAG,"String_Node_Str",e);
    }
  }
}

Fixed version (ground truth):
public synchronized void onScreenTurnedOn(final IKeyguardShowCallback callback){
  if (DEBUG)   Log.d(TAG,"String_Node_Str");
  mScreenOn=true;
  final IBinder token=isShowing() ? mKeyguardHost.getWindowToken() : null;
  if (DEBUG && token == null)   Slog.v(TAG,"String_Node_Str" + (mKeyguardHost == null ? "String_Node_Str" : "String_Node_Str"));
  if (mKeyguardView != null) {
    mKeyguardView.onScreenTurnedOn();
    if (callback != null) {
      if (mKeyguardHost.getVisibility() == View.VISIBLE) {
        mKeyguardHost.post(new Runnable(){
          @Override public void run(){
            try {
              callback.onShown(token);
            }
 catch (            RemoteException e) {
              Slog.w(TAG,"String_Node_Str",e);
            }
          }
        }
);
      }
 else {
        try {
          callback.onShown(token);
        }
 catch (        RemoteException e) {
          Slog.w(TAG,"String_Node_Str",e);
        }
      }
    }
  }
 else   if (callback != null) {
    try {
      callback.onShown(token);
    }
 catch (    RemoteException e) {
      Slog.w(TAG,"String_Node_Str",e);
    }
  }
}
Program: 726
Project: 726
Buggy source:
@Override public String toString(){
  return "String_Node_Str" + mStackId + "String_Node_Str"+ mTaskHistory;
}

Fixed version (ground truth):
@Override public String toString(){
  return "String_Node_Str" + Integer.toHexString(System.identityHashCode(this)) + "String_Node_Str"+ mStackId+ "String_Node_Str"+ mTaskHistory.size()+ "String_Node_Str";
}
Program: 727
Project: 727
Buggy source:
ActivityRecord findTaskLocked(ActivityRecord r){
  for (int stackNdx=mStacks.size() - 1; stackNdx >= 0; --stackNdx) {
    final ActivityStack stack=mStacks.get(stackNdx);
    if (!r.isApplicationActivity() && !stack.isHomeStack()) {
      continue;
    }
    final ActivityRecord ar=stack.findTaskLocked(r);
    if (ar != null) {
      return ar;
    }
  }
  return null;
}

Fixed version (ground truth):
ActivityRecord findTaskLocked(ActivityRecord r){
  if (DEBUG_TASKS)   Slog.d(TAG,"String_Node_Str" + r);
  for (int stackNdx=mStacks.size() - 1; stackNdx >= 0; --stackNdx) {
    final ActivityStack stack=mStacks.get(stackNdx);
    if (!r.isApplicationActivity() && !stack.isHomeStack()) {
      if (DEBUG_TASKS)       Slog.d(TAG,"String_Node_Str" + stack);
      continue;
    }
    final ActivityRecord ar=stack.findTaskLocked(r);
    if (ar != null) {
      return ar;
    }
  }
  if (DEBUG_TASKS)   Slog.d(TAG,"String_Node_Str");
  return null;
}
Program: 729
Project: 729
Buggy source:
public synchronized void onScreenTurnedOn(final IKeyguardShowCallback callback){
  if (DEBUG)   Log.d(TAG,"String_Node_Str");
  mScreenOn=true;
  final IBinder token;
  final boolean disabled=mLockPatternUtils.isLockScreenDisabled() && !mLockPatternUtils.isSecure();
  if (mKeyguardHost == null || disabled) {
    token=null;
  }
 else {
    token=mKeyguardHost.getWindowToken();
  }
  if (mKeyguardView != null) {
    mKeyguardView.onScreenTurnedOn();
    if (callback != null) {
      if (mKeyguardHost.getVisibility() == View.VISIBLE) {
        mKeyguardHost.post(new Runnable(){
          @Override public void run(){
            try {
              callback.onShown(token);
            }
 catch (            RemoteException e) {
              Slog.w(TAG,"String_Node_Str",e);
            }
          }
        }
);
      }
 else {
        try {
          callback.onShown(token);
        }
 catch (        RemoteException e) {
          Slog.w(TAG,"String_Node_Str",e);
        }
      }
    }
  }
 else   if (callback != null) {
    try {
      callback.onShown(token);
    }
 catch (    RemoteException e) {
      Slog.w(TAG,"String_Node_Str",e);
    }
  }
}

Fixed version (ground truth):
public synchronized void onScreenTurnedOn(final IKeyguardShowCallback callback){
  if (DEBUG)   Log.d(TAG,"String_Node_Str");
  mScreenOn=true;
  final IBinder token=isShowing() ? mKeyguardHost.getWindowToken() : null;
  if (DEBUG && token == null)   Slog.v(TAG,"String_Node_Str" + (mKeyguardHost == null ? "String_Node_Str" : "String_Node_Str"));
  if (mKeyguardView != null) {
    mKeyguardView.onScreenTurnedOn();
    if (callback != null) {
      if (mKeyguardHost.getVisibility() == View.VISIBLE) {
        mKeyguardHost.post(new Runnable(){
          @Override public void run(){
            try {
              callback.onShown(token);
            }
 catch (            RemoteException e) {
              Slog.w(TAG,"String_Node_Str",e);
            }
          }
        }
);
      }
 else {
        try {
          callback.onShown(token);
        }
 catch (        RemoteException e) {
          Slog.w(TAG,"String_Node_Str",e);
        }
      }
    }
  }
 else   if (callback != null) {
    try {
      callback.onShown(token);
    }
 catch (    RemoteException e) {
      Slog.w(TAG,"String_Node_Str",e);
    }
  }
}
Program: 730
Project: 730
Buggy source:
public synchronized void onScreenTurnedOn(final IKeyguardShowCallback callback){
  if (DEBUG)   Log.d(TAG,"String_Node_Str");
  mScreenOn=true;
  final IBinder token;
  final boolean disabled=mLockPatternUtils.isLockScreenDisabled() && !mLockPatternUtils.isSecure();
  if (mKeyguardHost == null || disabled) {
    token=null;
  }
 else {
    token=mKeyguardHost.getWindowToken();
  }
  if (mKeyguardView != null) {
    mKeyguardView.onScreenTurnedOn();
    if (callback != null) {
      if (mKeyguardHost.getVisibility() == View.VISIBLE) {
        mKeyguardHost.post(new Runnable(){
          @Override public void run(){
            try {
              callback.onShown(token);
            }
 catch (            RemoteException e) {
              Slog.w(TAG,"String_Node_Str",e);
            }
          }
        }
);
      }
 else {
        try {
          callback.onShown(token);
        }
 catch (        RemoteException e) {
          Slog.w(TAG,"String_Node_Str",e);
        }
      }
    }
  }
 else   if (callback != null) {
    try {
      callback.onShown(token);
    }
 catch (    RemoteException e) {
      Slog.w(TAG,"String_Node_Str",e);
    }
  }
}

Fixed version (ground truth):
public synchronized void onScreenTurnedOn(final IKeyguardShowCallback callback){
  if (DEBUG)   Log.d(TAG,"String_Node_Str");
  mScreenOn=true;
  final IBinder token=isShowing() ? mKeyguardHost.getWindowToken() : null;
  if (DEBUG && token == null)   Slog.v(TAG,"String_Node_Str" + (mKeyguardHost == null ? "String_Node_Str" : "String_Node_Str"));
  if (mKeyguardView != null) {
    mKeyguardView.onScreenTurnedOn();
    if (callback != null) {
      if (mKeyguardHost.getVisibility() == View.VISIBLE) {
        mKeyguardHost.post(new Runnable(){
          @Override public void run(){
            try {
              callback.onShown(token);
            }
 catch (            RemoteException e) {
              Slog.w(TAG,"String_Node_Str",e);
            }
          }
        }
);
      }
 else {
        try {
          callback.onShown(token);
        }
 catch (        RemoteException e) {
          Slog.w(TAG,"String_Node_Str",e);
        }
      }
    }
  }
 else   if (callback != null) {
    try {
      callback.onShown(token);
    }
 catch (    RemoteException e) {
      Slog.w(TAG,"String_Node_Str",e);
    }
  }
}