nus-yam/ex-repair huggingface dataset:
Program: 616
Project: 616
Buggy source:
@Override public void clearForcedDisplayDensity(int displayId){
  if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) != PackageManager.PERMISSION_GRANTED) {
    throw new SecurityException("String_Node_Str" + android.Manifest.permission.WRITE_SECURE_SETTINGS);
  }
  if (displayId != Display.DEFAULT_DISPLAY) {
    throw new IllegalArgumentException("String_Node_Str");
  }
synchronized (mWindowMap) {
    final DisplayContent displayContent=getDisplayContentLocked(displayId);
    if (displayContent != null) {
      setForcedDisplayDensityLocked(displayContent,displayContent.mInitialDisplayDensity);
      Settings.Global.putString(mContext.getContentResolver(),Settings.Global.DISPLAY_DENSITY_FORCED,"String_Node_Str");
    }
  }
}

Fixed version (ground truth):
@Override public void clearForcedDisplayDensity(int displayId){
  if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) != PackageManager.PERMISSION_GRANTED) {
    throw new SecurityException("String_Node_Str" + android.Manifest.permission.WRITE_SECURE_SETTINGS);
  }
  if (displayId != Display.DEFAULT_DISPLAY) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  final long ident=Binder.clearCallingIdentity();
  try {
synchronized (mWindowMap) {
      final DisplayContent displayContent=getDisplayContentLocked(displayId);
      if (displayContent != null) {
        setForcedDisplayDensityLocked(displayContent,displayContent.mInitialDisplayDensity);
        Settings.Global.putString(mContext.getContentResolver(),Settings.Global.DISPLAY_DENSITY_FORCED,"String_Node_Str");
      }
    }
  }
  finally {
    Binder.restoreCallingIdentity(ident);
  }
}
Program: 617
Project: 617
Buggy source:
@Override public void setOverscan(int displayId,int left,int top,int right,int bottom){
  if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) != PackageManager.PERMISSION_GRANTED) {
    throw new SecurityException("String_Node_Str" + android.Manifest.permission.WRITE_SECURE_SETTINGS);
  }
synchronized (mWindowMap) {
    DisplayContent displayContent=getDisplayContentLocked(displayId);
    if (displayContent != null) {
      setOverscanLocked(displayContent,left,top,right,bottom);
    }
  }
}

Fixed version (ground truth):
@Override public void setOverscan(int displayId,int left,int top,int right,int bottom){
  if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) != PackageManager.PERMISSION_GRANTED) {
    throw new SecurityException("String_Node_Str" + android.Manifest.permission.WRITE_SECURE_SETTINGS);
  }
  final long ident=Binder.clearCallingIdentity();
  try {
synchronized (mWindowMap) {
      DisplayContent displayContent=getDisplayContentLocked(displayId);
      if (displayContent != null) {
        setOverscanLocked(displayContent,left,top,right,bottom);
      }
    }
  }
  finally {
    Binder.restoreCallingIdentity(ident);
  }
}
Program: 618
Project: 618
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: 619
Project: 619
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: 620
Project: 620
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: 622
Project: 622
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: 624
Project: 624
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: 626
Project: 626
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: 628
Project: 628
Buggy source:
@Override public void setForcedDisplayDensity(int displayId,int density){
  if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) != PackageManager.PERMISSION_GRANTED) {
    throw new SecurityException("String_Node_Str" + android.Manifest.permission.WRITE_SECURE_SETTINGS);
  }
  if (displayId != Display.DEFAULT_DISPLAY) {
    throw new IllegalArgumentException("String_Node_Str");
  }
synchronized (mWindowMap) {
    final DisplayContent displayContent=getDisplayContentLocked(displayId);
    if (displayContent != null) {
      setForcedDisplayDensityLocked(displayContent,density);
      Settings.Global.putString(mContext.getContentResolver(),Settings.Global.DISPLAY_DENSITY_FORCED,Integer.toString(density));
    }
  }
}

Fixed version (ground truth):
@Override public void setForcedDisplayDensity(int displayId,int density){
  if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) != PackageManager.PERMISSION_GRANTED) {
    throw new SecurityException("String_Node_Str" + android.Manifest.permission.WRITE_SECURE_SETTINGS);
  }
  if (displayId != Display.DEFAULT_DISPLAY) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  final long ident=Binder.clearCallingIdentity();
  try {
synchronized (mWindowMap) {
      final DisplayContent displayContent=getDisplayContentLocked(displayId);
      if (displayContent != null) {
        setForcedDisplayDensityLocked(displayContent,density);
        Settings.Global.putString(mContext.getContentResolver(),Settings.Global.DISPLAY_DENSITY_FORCED,Integer.toString(density));
      }
    }
  }
  finally {
    Binder.restoreCallingIdentity(ident);
  }
}
Program: 629
Project: 629
Buggy source:
@Override public void setForcedDisplaySize(int displayId,int width,int height){
  if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) != PackageManager.PERMISSION_GRANTED) {
    throw new SecurityException("String_Node_Str" + android.Manifest.permission.WRITE_SECURE_SETTINGS);
  }
  if (displayId != Display.DEFAULT_DISPLAY) {
    throw new IllegalArgumentException("String_Node_Str");
  }
synchronized (mWindowMap) {
    final int MIN_WIDTH=200;
    final int MIN_HEIGHT=200;
    final int MAX_SCALE=2;
    final DisplayContent displayContent=getDisplayContentLocked(displayId);
    if (displayContent != null) {
      width=Math.min(Math.max(width,MIN_WIDTH),displayContent.mInitialDisplayWidth * MAX_SCALE);
      height=Math.min(Math.max(height,MIN_HEIGHT),displayContent.mInitialDisplayHeight * MAX_SCALE);
      setForcedDisplaySizeLocked(displayContent,width,height);
      Settings.Global.putString(mContext.getContentResolver(),Settings.Global.DISPLAY_SIZE_FORCED,width + "String_Node_Str" + height);
    }
  }
}

Fixed version (ground truth):
@Override public void setForcedDisplaySize(int displayId,int width,int height){
  if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) != PackageManager.PERMISSION_GRANTED) {
    throw new SecurityException("String_Node_Str" + android.Manifest.permission.WRITE_SECURE_SETTINGS);
  }
  if (displayId != Display.DEFAULT_DISPLAY) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  final long ident=Binder.clearCallingIdentity();
  try {
synchronized (mWindowMap) {
      final int MIN_WIDTH=200;
      final int MIN_HEIGHT=200;
      final int MAX_SCALE=2;
      final DisplayContent displayContent=getDisplayContentLocked(displayId);
      if (displayContent != null) {
        width=Math.min(Math.max(width,MIN_WIDTH),displayContent.mInitialDisplayWidth * MAX_SCALE);
        height=Math.min(Math.max(height,MIN_HEIGHT),displayContent.mInitialDisplayHeight * MAX_SCALE);
        setForcedDisplaySizeLocked(displayContent,width,height);
        Settings.Global.putString(mContext.getContentResolver(),Settings.Global.DISPLAY_SIZE_FORCED,width + "String_Node_Str" + height);
      }
    }
  }
  finally {
    Binder.restoreCallingIdentity(ident);
  }
}
Program: 630
Project: 630
Buggy source:
@Override public void clearForcedDisplaySize(int displayId){
  if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) != PackageManager.PERMISSION_GRANTED) {
    throw new SecurityException("String_Node_Str" + android.Manifest.permission.WRITE_SECURE_SETTINGS);
  }
  if (displayId != Display.DEFAULT_DISPLAY) {
    throw new IllegalArgumentException("String_Node_Str");
  }
synchronized (mWindowMap) {
    final DisplayContent displayContent=getDisplayContentLocked(displayId);
    if (displayContent != null) {
      setForcedDisplaySizeLocked(displayContent,displayContent.mInitialDisplayWidth,displayContent.mInitialDisplayHeight);
      Settings.Global.putString(mContext.getContentResolver(),Settings.Global.DISPLAY_SIZE_FORCED,"String_Node_Str");
    }
  }
}

Fixed version (ground truth):
@Override public void clearForcedDisplaySize(int displayId){
  if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) != PackageManager.PERMISSION_GRANTED) {
    throw new SecurityException("String_Node_Str" + android.Manifest.permission.WRITE_SECURE_SETTINGS);
  }
  if (displayId != Display.DEFAULT_DISPLAY) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  final long ident=Binder.clearCallingIdentity();
  try {
synchronized (mWindowMap) {
      final DisplayContent displayContent=getDisplayContentLocked(displayId);
      if (displayContent != null) {
        setForcedDisplaySizeLocked(displayContent,displayContent.mInitialDisplayWidth,displayContent.mInitialDisplayHeight);
        Settings.Global.putString(mContext.getContentResolver(),Settings.Global.DISPLAY_SIZE_FORCED,"String_Node_Str");
      }
    }
  }
  finally {
    Binder.restoreCallingIdentity(ident);
  }
}
Program: 631
Project: 631
Buggy source:
@Override public void clearForcedDisplayDensity(int displayId){
  if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) != PackageManager.PERMISSION_GRANTED) {
    throw new SecurityException("String_Node_Str" + android.Manifest.permission.WRITE_SECURE_SETTINGS);
  }
  if (displayId != Display.DEFAULT_DISPLAY) {
    throw new IllegalArgumentException("String_Node_Str");
  }
synchronized (mWindowMap) {
    final DisplayContent displayContent=getDisplayContentLocked(displayId);
    if (displayContent != null) {
      setForcedDisplayDensityLocked(displayContent,displayContent.mInitialDisplayDensity);
      Settings.Global.putString(mContext.getContentResolver(),Settings.Global.DISPLAY_DENSITY_FORCED,"String_Node_Str");
    }
  }
}

Fixed version (ground truth):
@Override public void clearForcedDisplayDensity(int displayId){
  if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) != PackageManager.PERMISSION_GRANTED) {
    throw new SecurityException("String_Node_Str" + android.Manifest.permission.WRITE_SECURE_SETTINGS);
  }
  if (displayId != Display.DEFAULT_DISPLAY) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  final long ident=Binder.clearCallingIdentity();
  try {
synchronized (mWindowMap) {
      final DisplayContent displayContent=getDisplayContentLocked(displayId);
      if (displayContent != null) {
        setForcedDisplayDensityLocked(displayContent,displayContent.mInitialDisplayDensity);
        Settings.Global.putString(mContext.getContentResolver(),Settings.Global.DISPLAY_DENSITY_FORCED,"String_Node_Str");
      }
    }
  }
  finally {
    Binder.restoreCallingIdentity(ident);
  }
}
Program: 632
Project: 632
Buggy source:
@Override public void setOverscan(int displayId,int left,int top,int right,int bottom){
  if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) != PackageManager.PERMISSION_GRANTED) {
    throw new SecurityException("String_Node_Str" + android.Manifest.permission.WRITE_SECURE_SETTINGS);
  }
synchronized (mWindowMap) {
    DisplayContent displayContent=getDisplayContentLocked(displayId);
    if (displayContent != null) {
      setOverscanLocked(displayContent,left,top,right,bottom);
    }
  }
}

Fixed version (ground truth):
@Override public void setOverscan(int displayId,int left,int top,int right,int bottom){
  if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) != PackageManager.PERMISSION_GRANTED) {
    throw new SecurityException("String_Node_Str" + android.Manifest.permission.WRITE_SECURE_SETTINGS);
  }
  final long ident=Binder.clearCallingIdentity();
  try {
synchronized (mWindowMap) {
      DisplayContent displayContent=getDisplayContentLocked(displayId);
      if (displayContent != null) {
        setOverscanLocked(displayContent,left,top,right,bottom);
      }
    }
  }
  finally {
    Binder.restoreCallingIdentity(ident);
  }
}
Program: 633
Project: 633
Buggy source:
@Override public void setForcedDisplayDensity(int displayId,int density){
  if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) != PackageManager.PERMISSION_GRANTED) {
    throw new SecurityException("String_Node_Str" + android.Manifest.permission.WRITE_SECURE_SETTINGS);
  }
  if (displayId != Display.DEFAULT_DISPLAY) {
    throw new IllegalArgumentException("String_Node_Str");
  }
synchronized (mWindowMap) {
    final DisplayContent displayContent=getDisplayContentLocked(displayId);
    if (displayContent != null) {
      setForcedDisplayDensityLocked(displayContent,density);
      Settings.Global.putString(mContext.getContentResolver(),Settings.Global.DISPLAY_DENSITY_FORCED,Integer.toString(density));
    }
  }
}

Fixed version (ground truth):
@Override public void setForcedDisplayDensity(int displayId,int density){
  if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) != PackageManager.PERMISSION_GRANTED) {
    throw new SecurityException("String_Node_Str" + android.Manifest.permission.WRITE_SECURE_SETTINGS);
  }
  if (displayId != Display.DEFAULT_DISPLAY) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  final long ident=Binder.clearCallingIdentity();
  try {
synchronized (mWindowMap) {
      final DisplayContent displayContent=getDisplayContentLocked(displayId);
      if (displayContent != null) {
        setForcedDisplayDensityLocked(displayContent,density);
        Settings.Global.putString(mContext.getContentResolver(),Settings.Global.DISPLAY_DENSITY_FORCED,Integer.toString(density));
      }
    }
  }
  finally {
    Binder.restoreCallingIdentity(ident);
  }
}
Program: 634
Project: 634
Buggy source:
@Override public void setForcedDisplaySize(int displayId,int width,int height){
  if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) != PackageManager.PERMISSION_GRANTED) {
    throw new SecurityException("String_Node_Str" + android.Manifest.permission.WRITE_SECURE_SETTINGS);
  }
  if (displayId != Display.DEFAULT_DISPLAY) {
    throw new IllegalArgumentException("String_Node_Str");
  }
synchronized (mWindowMap) {
    final int MIN_WIDTH=200;
    final int MIN_HEIGHT=200;
    final int MAX_SCALE=2;
    final DisplayContent displayContent=getDisplayContentLocked(displayId);
    if (displayContent != null) {
      width=Math.min(Math.max(width,MIN_WIDTH),displayContent.mInitialDisplayWidth * MAX_SCALE);
      height=Math.min(Math.max(height,MIN_HEIGHT),displayContent.mInitialDisplayHeight * MAX_SCALE);
      setForcedDisplaySizeLocked(displayContent,width,height);
      Settings.Global.putString(mContext.getContentResolver(),Settings.Global.DISPLAY_SIZE_FORCED,width + "String_Node_Str" + height);
    }
  }
}

Fixed version (ground truth):
@Override public void setForcedDisplaySize(int displayId,int width,int height){
  if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) != PackageManager.PERMISSION_GRANTED) {
    throw new SecurityException("String_Node_Str" + android.Manifest.permission.WRITE_SECURE_SETTINGS);
  }
  if (displayId != Display.DEFAULT_DISPLAY) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  final long ident=Binder.clearCallingIdentity();
  try {
synchronized (mWindowMap) {
      final int MIN_WIDTH=200;
      final int MIN_HEIGHT=200;
      final int MAX_SCALE=2;
      final DisplayContent displayContent=getDisplayContentLocked(displayId);
      if (displayContent != null) {
        width=Math.min(Math.max(width,MIN_WIDTH),displayContent.mInitialDisplayWidth * MAX_SCALE);
        height=Math.min(Math.max(height,MIN_HEIGHT),displayContent.mInitialDisplayHeight * MAX_SCALE);
        setForcedDisplaySizeLocked(displayContent,width,height);
        Settings.Global.putString(mContext.getContentResolver(),Settings.Global.DISPLAY_SIZE_FORCED,width + "String_Node_Str" + height);
      }
    }
  }
  finally {
    Binder.restoreCallingIdentity(ident);
  }
}
Program: 635
Project: 635
Buggy source:
@Override public void clearForcedDisplaySize(int displayId){
  if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) != PackageManager.PERMISSION_GRANTED) {
    throw new SecurityException("String_Node_Str" + android.Manifest.permission.WRITE_SECURE_SETTINGS);
  }
  if (displayId != Display.DEFAULT_DISPLAY) {
    throw new IllegalArgumentException("String_Node_Str");
  }
synchronized (mWindowMap) {
    final DisplayContent displayContent=getDisplayContentLocked(displayId);
    if (displayContent != null) {
      setForcedDisplaySizeLocked(displayContent,displayContent.mInitialDisplayWidth,displayContent.mInitialDisplayHeight);
      Settings.Global.putString(mContext.getContentResolver(),Settings.Global.DISPLAY_SIZE_FORCED,"String_Node_Str");
    }
  }
}

Fixed version (ground truth):
@Override public void clearForcedDisplaySize(int displayId){
  if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) != PackageManager.PERMISSION_GRANTED) {
    throw new SecurityException("String_Node_Str" + android.Manifest.permission.WRITE_SECURE_SETTINGS);
  }
  if (displayId != Display.DEFAULT_DISPLAY) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  final long ident=Binder.clearCallingIdentity();
  try {
synchronized (mWindowMap) {
      final DisplayContent displayContent=getDisplayContentLocked(displayId);
      if (displayContent != null) {
        setForcedDisplaySizeLocked(displayContent,displayContent.mInitialDisplayWidth,displayContent.mInitialDisplayHeight);
        Settings.Global.putString(mContext.getContentResolver(),Settings.Global.DISPLAY_SIZE_FORCED,"String_Node_Str");
      }
    }
  }
  finally {
    Binder.restoreCallingIdentity(ident);
  }
}
Program: 636
Project: 636
Buggy source:
@Override public void clearForcedDisplayDensity(int displayId){
  if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) != PackageManager.PERMISSION_GRANTED) {
    throw new SecurityException("String_Node_Str" + android.Manifest.permission.WRITE_SECURE_SETTINGS);
  }
  if (displayId != Display.DEFAULT_DISPLAY) {
    throw new IllegalArgumentException("String_Node_Str");
  }
synchronized (mWindowMap) {
    final DisplayContent displayContent=getDisplayContentLocked(displayId);
    if (displayContent != null) {
      setForcedDisplayDensityLocked(displayContent,displayContent.mInitialDisplayDensity);
      Settings.Global.putString(mContext.getContentResolver(),Settings.Global.DISPLAY_DENSITY_FORCED,"String_Node_Str");
    }
  }
}

Fixed version (ground truth):
@Override public void clearForcedDisplayDensity(int displayId){
  if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) != PackageManager.PERMISSION_GRANTED) {
    throw new SecurityException("String_Node_Str" + android.Manifest.permission.WRITE_SECURE_SETTINGS);
  }
  if (displayId != Display.DEFAULT_DISPLAY) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  final long ident=Binder.clearCallingIdentity();
  try {
synchronized (mWindowMap) {
      final DisplayContent displayContent=getDisplayContentLocked(displayId);
      if (displayContent != null) {
        setForcedDisplayDensityLocked(displayContent,displayContent.mInitialDisplayDensity);
        Settings.Global.putString(mContext.getContentResolver(),Settings.Global.DISPLAY_DENSITY_FORCED,"String_Node_Str");
      }
    }
  }
  finally {
    Binder.restoreCallingIdentity(ident);
  }
}
Program: 637
Project: 637
Buggy source:
@Override public void setOverscan(int displayId,int left,int top,int right,int bottom){
  if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) != PackageManager.PERMISSION_GRANTED) {
    throw new SecurityException("String_Node_Str" + android.Manifest.permission.WRITE_SECURE_SETTINGS);
  }
synchronized (mWindowMap) {
    DisplayContent displayContent=getDisplayContentLocked(displayId);
    if (displayContent != null) {
      setOverscanLocked(displayContent,left,top,right,bottom);
    }
  }
}

Fixed version (ground truth):
@Override public void setOverscan(int displayId,int left,int top,int right,int bottom){
  if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) != PackageManager.PERMISSION_GRANTED) {
    throw new SecurityException("String_Node_Str" + android.Manifest.permission.WRITE_SECURE_SETTINGS);
  }
  final long ident=Binder.clearCallingIdentity();
  try {
synchronized (mWindowMap) {
      DisplayContent displayContent=getDisplayContentLocked(displayId);
      if (displayContent != null) {
        setOverscanLocked(displayContent,left,top,right,bottom);
      }
    }
  }
  finally {
    Binder.restoreCallingIdentity(ident);
  }
}
Program: 638
Project: 638
Buggy source:
@Override public void setForcedDisplayDensity(int displayId,int density){
  if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) != PackageManager.PERMISSION_GRANTED) {
    throw new SecurityException("String_Node_Str" + android.Manifest.permission.WRITE_SECURE_SETTINGS);
  }
  if (displayId != Display.DEFAULT_DISPLAY) {
    throw new IllegalArgumentException("String_Node_Str");
  }
synchronized (mWindowMap) {
    final DisplayContent displayContent=getDisplayContentLocked(displayId);
    if (displayContent != null) {
      setForcedDisplayDensityLocked(displayContent,density);
      Settings.Global.putString(mContext.getContentResolver(),Settings.Global.DISPLAY_DENSITY_FORCED,Integer.toString(density));
    }
  }
}

Fixed version (ground truth):
@Override public void setForcedDisplayDensity(int displayId,int density){
  if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) != PackageManager.PERMISSION_GRANTED) {
    throw new SecurityException("String_Node_Str" + android.Manifest.permission.WRITE_SECURE_SETTINGS);
  }
  if (displayId != Display.DEFAULT_DISPLAY) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  final long ident=Binder.clearCallingIdentity();
  try {
synchronized (mWindowMap) {
      final DisplayContent displayContent=getDisplayContentLocked(displayId);
      if (displayContent != null) {
        setForcedDisplayDensityLocked(displayContent,density);
        Settings.Global.putString(mContext.getContentResolver(),Settings.Global.DISPLAY_DENSITY_FORCED,Integer.toString(density));
      }
    }
  }
  finally {
    Binder.restoreCallingIdentity(ident);
  }
}
Program: 639
Project: 639
Buggy source:
@Override public void setForcedDisplaySize(int displayId,int width,int height){
  if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) != PackageManager.PERMISSION_GRANTED) {
    throw new SecurityException("String_Node_Str" + android.Manifest.permission.WRITE_SECURE_SETTINGS);
  }
  if (displayId != Display.DEFAULT_DISPLAY) {
    throw new IllegalArgumentException("String_Node_Str");
  }
synchronized (mWindowMap) {
    final int MIN_WIDTH=200;
    final int MIN_HEIGHT=200;
    final int MAX_SCALE=2;
    final DisplayContent displayContent=getDisplayContentLocked(displayId);
    if (displayContent != null) {
      width=Math.min(Math.max(width,MIN_WIDTH),displayContent.mInitialDisplayWidth * MAX_SCALE);
      height=Math.min(Math.max(height,MIN_HEIGHT),displayContent.mInitialDisplayHeight * MAX_SCALE);
      setForcedDisplaySizeLocked(displayContent,width,height);
      Settings.Global.putString(mContext.getContentResolver(),Settings.Global.DISPLAY_SIZE_FORCED,width + "String_Node_Str" + height);
    }
  }
}

Fixed version (ground truth):
@Override public void setForcedDisplaySize(int displayId,int width,int height){
  if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) != PackageManager.PERMISSION_GRANTED) {
    throw new SecurityException("String_Node_Str" + android.Manifest.permission.WRITE_SECURE_SETTINGS);
  }
  if (displayId != Display.DEFAULT_DISPLAY) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  final long ident=Binder.clearCallingIdentity();
  try {
synchronized (mWindowMap) {
      final int MIN_WIDTH=200;
      final int MIN_HEIGHT=200;
      final int MAX_SCALE=2;
      final DisplayContent displayContent=getDisplayContentLocked(displayId);
      if (displayContent != null) {
        width=Math.min(Math.max(width,MIN_WIDTH),displayContent.mInitialDisplayWidth * MAX_SCALE);
        height=Math.min(Math.max(height,MIN_HEIGHT),displayContent.mInitialDisplayHeight * MAX_SCALE);
        setForcedDisplaySizeLocked(displayContent,width,height);
        Settings.Global.putString(mContext.getContentResolver(),Settings.Global.DISPLAY_SIZE_FORCED,width + "String_Node_Str" + height);
      }
    }
  }
  finally {
    Binder.restoreCallingIdentity(ident);
  }
}
Program: 640
Project: 640
Buggy source:
@Override public void clearForcedDisplaySize(int displayId){
  if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) != PackageManager.PERMISSION_GRANTED) {
    throw new SecurityException("String_Node_Str" + android.Manifest.permission.WRITE_SECURE_SETTINGS);
  }
  if (displayId != Display.DEFAULT_DISPLAY) {
    throw new IllegalArgumentException("String_Node_Str");
  }
synchronized (mWindowMap) {
    final DisplayContent displayContent=getDisplayContentLocked(displayId);
    if (displayContent != null) {
      setForcedDisplaySizeLocked(displayContent,displayContent.mInitialDisplayWidth,displayContent.mInitialDisplayHeight);
      Settings.Global.putString(mContext.getContentResolver(),Settings.Global.DISPLAY_SIZE_FORCED,"String_Node_Str");
    }
  }
}

Fixed version (ground truth):
@Override public void clearForcedDisplaySize(int displayId){
  if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) != PackageManager.PERMISSION_GRANTED) {
    throw new SecurityException("String_Node_Str" + android.Manifest.permission.WRITE_SECURE_SETTINGS);
  }
  if (displayId != Display.DEFAULT_DISPLAY) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  final long ident=Binder.clearCallingIdentity();
  try {
synchronized (mWindowMap) {
      final DisplayContent displayContent=getDisplayContentLocked(displayId);
      if (displayContent != null) {
        setForcedDisplaySizeLocked(displayContent,displayContent.mInitialDisplayWidth,displayContent.mInitialDisplayHeight);
        Settings.Global.putString(mContext.getContentResolver(),Settings.Global.DISPLAY_SIZE_FORCED,"String_Node_Str");
      }
    }
  }
  finally {
    Binder.restoreCallingIdentity(ident);
  }
}
Program: 641
Project: 641
Buggy source:
@Override public void clearForcedDisplayDensity(int displayId){
  if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) != PackageManager.PERMISSION_GRANTED) {
    throw new SecurityException("String_Node_Str" + android.Manifest.permission.WRITE_SECURE_SETTINGS);
  }
  if (displayId != Display.DEFAULT_DISPLAY) {
    throw new IllegalArgumentException("String_Node_Str");
  }
synchronized (mWindowMap) {
    final DisplayContent displayContent=getDisplayContentLocked(displayId);
    if (displayContent != null) {
      setForcedDisplayDensityLocked(displayContent,displayContent.mInitialDisplayDensity);
      Settings.Global.putString(mContext.getContentResolver(),Settings.Global.DISPLAY_DENSITY_FORCED,"String_Node_Str");
    }
  }
}

Fixed version (ground truth):
@Override public void clearForcedDisplayDensity(int displayId){
  if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) != PackageManager.PERMISSION_GRANTED) {
    throw new SecurityException("String_Node_Str" + android.Manifest.permission.WRITE_SECURE_SETTINGS);
  }
  if (displayId != Display.DEFAULT_DISPLAY) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  final long ident=Binder.clearCallingIdentity();
  try {
synchronized (mWindowMap) {
      final DisplayContent displayContent=getDisplayContentLocked(displayId);
      if (displayContent != null) {
        setForcedDisplayDensityLocked(displayContent,displayContent.mInitialDisplayDensity);
        Settings.Global.putString(mContext.getContentResolver(),Settings.Global.DISPLAY_DENSITY_FORCED,"String_Node_Str");
      }
    }
  }
  finally {
    Binder.restoreCallingIdentity(ident);
  }
}
Program: 642
Project: 642
Buggy source:
@Override public void setOverscan(int displayId,int left,int top,int right,int bottom){
  if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) != PackageManager.PERMISSION_GRANTED) {
    throw new SecurityException("String_Node_Str" + android.Manifest.permission.WRITE_SECURE_SETTINGS);
  }
synchronized (mWindowMap) {
    DisplayContent displayContent=getDisplayContentLocked(displayId);
    if (displayContent != null) {
      setOverscanLocked(displayContent,left,top,right,bottom);
    }
  }
}

Fixed version (ground truth):
@Override public void setOverscan(int displayId,int left,int top,int right,int bottom){
  if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) != PackageManager.PERMISSION_GRANTED) {
    throw new SecurityException("String_Node_Str" + android.Manifest.permission.WRITE_SECURE_SETTINGS);
  }
  final long ident=Binder.clearCallingIdentity();
  try {
synchronized (mWindowMap) {
      DisplayContent displayContent=getDisplayContentLocked(displayId);
      if (displayContent != null) {
        setOverscanLocked(displayContent,left,top,right,bottom);
      }
    }
  }
  finally {
    Binder.restoreCallingIdentity(ident);
  }
}
Program: 643
Project: 643
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: 644
Project: 644
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;
}
}