nus-yam/ex-repair huggingface dataset:
Program: 731
Project: 731
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: 732
Project: 732
Buggy source:
/** 
 * Updates the PAC Manager with current Proxy information. This is called by the ConnectivityService directly before a broadcast takes place to allow the PacManager to indicate that the broadcast should not be sent and the PacManager will trigger a new broadcast when it is ready.
 * @param proxy Proxy information that is about to be broadcast.
 * @return Returns true when the broadcast should not be sent
 */
public synchronized boolean setCurrentProxyScriptUrl(ProxyProperties proxy){
  if (!TextUtils.isEmpty(proxy.getPacFileUrl())) {
    if (proxy.getPacFileUrl().equals(mPacUrl)) {
      return false;
    }
synchronized (mProxyLock) {
      mPacUrl=proxy.getPacFileUrl();
    }
    mCurrentDelay=DELAY_1;
    mHasSentBroadcast=false;
    mHasDownloaded=false;
    getAlarmManager().cancel(mPacRefreshIntent);
    bind();
    return true;
  }
 else {
    getAlarmManager().cancel(mPacRefreshIntent);
synchronized (mProxyLock) {
      mPacUrl=null;
      mCurrentPac=null;
      if (mProxyService != null) {
        try {
          mProxyService.stopPacSystem();
        }
 catch (        RemoteException e) {
          Log.w(TAG,"String_Node_Str",e);
        }
 finally {
          unbind();
        }
      }
    }
    return false;
  }
}

Fixed version (ground truth):
/** 
 * Updates the PAC Manager with current Proxy information. This is called by the ConnectivityService directly before a broadcast takes place to allow the PacManager to indicate that the broadcast should not be sent and the PacManager will trigger a new broadcast when it is ready.
 * @param proxy Proxy information that is about to be broadcast.
 * @return Returns true when the broadcast should not be sent
 */
public synchronized boolean setCurrentProxyScriptUrl(ProxyProperties proxy){
  if (!TextUtils.isEmpty(proxy.getPacFileUrl())) {
    if (proxy.getPacFileUrl().equals(mPacUrl) && (proxy.getPort() > 0)) {
      return false;
    }
synchronized (mProxyLock) {
      mPacUrl=proxy.getPacFileUrl();
    }
    mCurrentDelay=DELAY_1;
    mHasSentBroadcast=false;
    mHasDownloaded=false;
    getAlarmManager().cancel(mPacRefreshIntent);
    bind();
    return true;
  }
 else {
    getAlarmManager().cancel(mPacRefreshIntent);
synchronized (mProxyLock) {
      mPacUrl=null;
      mCurrentPac=null;
      if (mProxyService != null) {
        try {
          mProxyService.stopPacSystem();
        }
 catch (        RemoteException e) {
          Log.w(TAG,"String_Node_Str",e);
        }
 finally {
          unbind();
        }
      }
    }
    return false;
  }
}
Program: 733
Project: 733
Buggy source:
/** 
 * Updates the PAC Manager with current Proxy information. This is called by the ConnectivityService directly before a broadcast takes place to allow the PacManager to indicate that the broadcast should not be sent and the PacManager will trigger a new broadcast when it is ready.
 * @param proxy Proxy information that is about to be broadcast.
 * @return Returns true when the broadcast should not be sent
 */
public synchronized boolean setCurrentProxyScriptUrl(ProxyProperties proxy){
  if (!TextUtils.isEmpty(proxy.getPacFileUrl())) {
    if (proxy.getPacFileUrl().equals(mPacUrl)) {
      return false;
    }
synchronized (mProxyLock) {
      mPacUrl=proxy.getPacFileUrl();
    }
    mCurrentDelay=DELAY_1;
    mHasSentBroadcast=false;
    mHasDownloaded=false;
    getAlarmManager().cancel(mPacRefreshIntent);
    bind();
    return true;
  }
 else {
    getAlarmManager().cancel(mPacRefreshIntent);
synchronized (mProxyLock) {
      mPacUrl=null;
      mCurrentPac=null;
      if (mProxyService != null) {
        try {
          mProxyService.stopPacSystem();
        }
 catch (        RemoteException e) {
          Log.w(TAG,"String_Node_Str",e);
        }
 finally {
          unbind();
        }
      }
    }
    return false;
  }
}

Fixed version (ground truth):
/** 
 * Updates the PAC Manager with current Proxy information. This is called by the ConnectivityService directly before a broadcast takes place to allow the PacManager to indicate that the broadcast should not be sent and the PacManager will trigger a new broadcast when it is ready.
 * @param proxy Proxy information that is about to be broadcast.
 * @return Returns true when the broadcast should not be sent
 */
public synchronized boolean setCurrentProxyScriptUrl(ProxyProperties proxy){
  if (!TextUtils.isEmpty(proxy.getPacFileUrl())) {
    if (proxy.getPacFileUrl().equals(mPacUrl) && (proxy.getPort() > 0)) {
      return false;
    }
synchronized (mProxyLock) {
      mPacUrl=proxy.getPacFileUrl();
    }
    mCurrentDelay=DELAY_1;
    mHasSentBroadcast=false;
    mHasDownloaded=false;
    getAlarmManager().cancel(mPacRefreshIntent);
    bind();
    return true;
  }
 else {
    getAlarmManager().cancel(mPacRefreshIntent);
synchronized (mProxyLock) {
      mPacUrl=null;
      mCurrentPac=null;
      if (mProxyService != null) {
        try {
          mProxyService.stopPacSystem();
        }
 catch (        RemoteException e) {
          Log.w(TAG,"String_Node_Str",e);
        }
 finally {
          unbind();
        }
      }
    }
    return false;
  }
}
Program: 734
Project: 734
Buggy source:
/** 
 * Updates the PAC Manager with current Proxy information. This is called by the ConnectivityService directly before a broadcast takes place to allow the PacManager to indicate that the broadcast should not be sent and the PacManager will trigger a new broadcast when it is ready.
 * @param proxy Proxy information that is about to be broadcast.
 * @return Returns true when the broadcast should not be sent
 */
public synchronized boolean setCurrentProxyScriptUrl(ProxyProperties proxy){
  if (!TextUtils.isEmpty(proxy.getPacFileUrl())) {
    if (proxy.getPacFileUrl().equals(mPacUrl)) {
      return false;
    }
synchronized (mProxyLock) {
      mPacUrl=proxy.getPacFileUrl();
    }
    mCurrentDelay=DELAY_1;
    mHasSentBroadcast=false;
    mHasDownloaded=false;
    getAlarmManager().cancel(mPacRefreshIntent);
    bind();
    return true;
  }
 else {
    getAlarmManager().cancel(mPacRefreshIntent);
synchronized (mProxyLock) {
      mPacUrl=null;
      mCurrentPac=null;
      if (mProxyService != null) {
        try {
          mProxyService.stopPacSystem();
        }
 catch (        RemoteException e) {
          Log.w(TAG,"String_Node_Str",e);
        }
 finally {
          unbind();
        }
      }
    }
    return false;
  }
}

Fixed version (ground truth):
/** 
 * Updates the PAC Manager with current Proxy information. This is called by the ConnectivityService directly before a broadcast takes place to allow the PacManager to indicate that the broadcast should not be sent and the PacManager will trigger a new broadcast when it is ready.
 * @param proxy Proxy information that is about to be broadcast.
 * @return Returns true when the broadcast should not be sent
 */
public synchronized boolean setCurrentProxyScriptUrl(ProxyProperties proxy){
  if (!TextUtils.isEmpty(proxy.getPacFileUrl())) {
    if (proxy.getPacFileUrl().equals(mPacUrl) && (proxy.getPort() > 0)) {
      return false;
    }
synchronized (mProxyLock) {
      mPacUrl=proxy.getPacFileUrl();
    }
    mCurrentDelay=DELAY_1;
    mHasSentBroadcast=false;
    mHasDownloaded=false;
    getAlarmManager().cancel(mPacRefreshIntent);
    bind();
    return true;
  }
 else {
    getAlarmManager().cancel(mPacRefreshIntent);
synchronized (mProxyLock) {
      mPacUrl=null;
      mCurrentPac=null;
      if (mProxyService != null) {
        try {
          mProxyService.stopPacSystem();
        }
 catch (        RemoteException e) {
          Log.w(TAG,"String_Node_Str",e);
        }
 finally {
          unbind();
        }
      }
    }
    return false;
  }
}
Program: 735
Project: 735
Buggy source:
/** 
 * Updates the PAC Manager with current Proxy information. This is called by the ConnectivityService directly before a broadcast takes place to allow the PacManager to indicate that the broadcast should not be sent and the PacManager will trigger a new broadcast when it is ready.
 * @param proxy Proxy information that is about to be broadcast.
 * @return Returns true when the broadcast should not be sent
 */
public synchronized boolean setCurrentProxyScriptUrl(ProxyProperties proxy){
  if (!TextUtils.isEmpty(proxy.getPacFileUrl())) {
    if (proxy.getPacFileUrl().equals(mPacUrl)) {
      return false;
    }
synchronized (mProxyLock) {
      mPacUrl=proxy.getPacFileUrl();
    }
    mCurrentDelay=DELAY_1;
    mHasSentBroadcast=false;
    mHasDownloaded=false;
    getAlarmManager().cancel(mPacRefreshIntent);
    bind();
    return true;
  }
 else {
    getAlarmManager().cancel(mPacRefreshIntent);
synchronized (mProxyLock) {
      mPacUrl=null;
      mCurrentPac=null;
      if (mProxyService != null) {
        try {
          mProxyService.stopPacSystem();
        }
 catch (        RemoteException e) {
          Log.w(TAG,"String_Node_Str",e);
        }
 finally {
          unbind();
        }
      }
    }
    return false;
  }
}

Fixed version (ground truth):
/** 
 * Updates the PAC Manager with current Proxy information. This is called by the ConnectivityService directly before a broadcast takes place to allow the PacManager to indicate that the broadcast should not be sent and the PacManager will trigger a new broadcast when it is ready.
 * @param proxy Proxy information that is about to be broadcast.
 * @return Returns true when the broadcast should not be sent
 */
public synchronized boolean setCurrentProxyScriptUrl(ProxyProperties proxy){
  if (!TextUtils.isEmpty(proxy.getPacFileUrl())) {
    if (proxy.getPacFileUrl().equals(mPacUrl) && (proxy.getPort() > 0)) {
      return false;
    }
synchronized (mProxyLock) {
      mPacUrl=proxy.getPacFileUrl();
    }
    mCurrentDelay=DELAY_1;
    mHasSentBroadcast=false;
    mHasDownloaded=false;
    getAlarmManager().cancel(mPacRefreshIntent);
    bind();
    return true;
  }
 else {
    getAlarmManager().cancel(mPacRefreshIntent);
synchronized (mProxyLock) {
      mPacUrl=null;
      mCurrentPac=null;
      if (mProxyService != null) {
        try {
          mProxyService.stopPacSystem();
        }
 catch (        RemoteException e) {
          Log.w(TAG,"String_Node_Str",e);
        }
 finally {
          unbind();
        }
      }
    }
    return false;
  }
}
Program: 736
Project: 736
Buggy source:
static int wtf(int logId,String tag,String msg,Throwable tr){
  TerribleFailure what=new TerribleFailure(msg,tr);
  int bytes=println_native(logId,ASSERT,tag,msg + '\n' + getStackTraceString(tr));
  sWtfHandler.onTerribleFailure(tag,what);
  return bytes;
}

Fixed version (ground truth):
static int wtf(int logId,String tag,String msg,Throwable tr,boolean localStack){
  TerribleFailure what=new TerribleFailure(msg,tr);
  int bytes=println_native(logId,ASSERT,tag,msg + '\n' + getStackTraceString(localStack ? what : tr));
  sWtfHandler.onTerribleFailure(tag,what);
  return bytes;
}
Program: 737
Project: 737
Buggy source:
static int wtfStack(int logId,String tag,String msg){
  TerribleFailure here=new TerribleFailure("String_Node_Str",null);
  here.fillInStackTrace();
  return wtf(logId,tag,msg,here);
}

Fixed version (ground truth):
/** 
 * Like   {@link #wtf(String,String)}, but also writes to the log the full call stack.
 * @hide
 */
public static int wtfStack(String tag,String msg){
  return wtf(LOG_ID_MAIN,tag,msg,null,true);
}
Program: 738
Project: 738
Buggy source:
public static int wtf(String tag,String msg,Throwable tr){
  return Log.wtf(Log.LOG_ID_SYSTEM,tag,msg,tr);
}

Fixed version (ground truth):
public static int wtf(String tag,String msg,Throwable tr){
  return Log.wtf(Log.LOG_ID_SYSTEM,tag,msg,tr,false);
}
Program: 739
Project: 739
Buggy source:
public static int wtfStack(String tag,String msg){
  return Log.wtfStack(Log.LOG_ID_SYSTEM,tag,msg);
}

Fixed version (ground truth):
public static int wtfStack(String tag,String msg){
  return Log.wtf(Log.LOG_ID_SYSTEM,tag,msg,null,true);
}
Program: 740
Project: 740
Buggy source:
public void clearCurrentOwner(Object owner){
  if (mOwner == owner) {
    mOwner=null;
    mProc.decActiveServices(mName);
    if (mStartedState != STATE_NOTHING || mBoundState != STATE_NOTHING || mExecState != STATE_NOTHING) {
      long now=SystemClock.uptimeMillis();
      if (mStartedState != STATE_NOTHING) {
        Slog.wtfStack(TAG,"String_Node_Str" + owner + "String_Node_Str"+ mPackage+ "String_Node_Str"+ mName+ "String_Node_Str"+ mProc);
        setStarted(false,0,now);
      }
      if (mBoundState != STATE_NOTHING) {
        Slog.wtfStack(TAG,"String_Node_Str" + owner + "String_Node_Str"+ mPackage+ "String_Node_Str"+ mName+ "String_Node_Str"+ mProc);
        setBound(false,0,now);
      }
      if (mExecState != STATE_NOTHING) {
        Slog.wtfStack(TAG,"String_Node_Str" + owner + "String_Node_Str"+ mPackage+ "String_Node_Str"+ mName+ "String_Node_Str"+ mProc);
        setExecuting(false,0,now);
      }
    }
  }
}

Fixed version (ground truth):
public void clearCurrentOwner(Object owner,boolean silently){
  if (mOwner == owner) {
    mProc.decActiveServices(mName);
    if (mStartedState != STATE_NOTHING || mBoundState != STATE_NOTHING || mExecState != STATE_NOTHING) {
      long now=SystemClock.uptimeMillis();
      if (mStartedState != STATE_NOTHING) {
        if (!silently) {
          Slog.wtfStack(TAG,"String_Node_Str" + owner + "String_Node_Str"+ mPackage+ "String_Node_Str"+ mName+ "String_Node_Str"+ mProc);
        }
        setStarted(false,0,now);
      }
      if (mBoundState != STATE_NOTHING) {
        if (!silently) {
          Slog.wtfStack(TAG,"String_Node_Str" + owner + "String_Node_Str"+ mPackage+ "String_Node_Str"+ mName+ "String_Node_Str"+ mProc);
        }
        setBound(false,0,now);
      }
      if (mExecState != STATE_NOTHING) {
        if (!silently) {
          Slog.wtfStack(TAG,"String_Node_Str" + owner + "String_Node_Str"+ mPackage+ "String_Node_Str"+ mName+ "String_Node_Str"+ mProc);
        }
        setExecuting(false,0,now);
      }
    }
    mOwner=null;
  }
}
Program: 741
Project: 741
Buggy source:
private void serviceDoneExecutingLocked(ServiceRecord r,boolean inDestroying,boolean finishing){
  if (DEBUG_SERVICE)   Slog.v(TAG,"String_Node_Str" + r + "String_Node_Str"+ r.executeNesting+ "String_Node_Str"+ inDestroying+ "String_Node_Str"+ r.app);
 else   if (DEBUG_SERVICE_EXECUTING)   Slog.v(TAG,"String_Node_Str" + r.shortName);
  r.executeNesting--;
  if (r.executeNesting <= 0) {
    if (r.app != null) {
      if (DEBUG_SERVICE)       Slog.v(TAG,"String_Node_Str" + r.shortName);
      r.app.execServicesFg=false;
      r.app.executingServices.remove(r);
      if (r.app.executingServices.size() == 0) {
        if (DEBUG_SERVICE || DEBUG_SERVICE_EXECUTING)         Slog.v(TAG,"String_Node_Str" + r.shortName);
        mAm.mHandler.removeMessages(ActivityManagerService.SERVICE_TIMEOUT_MSG,r.app);
      }
 else       if (r.executeFg) {
        for (int i=r.app.executingServices.size() - 1; i >= 0; i--) {
          if (r.app.executingServices.valueAt(i).executeFg) {
            r.app.execServicesFg=true;
            break;
          }
        }
      }
      if (inDestroying) {
        if (DEBUG_SERVICE)         Slog.v(TAG,"String_Node_Str" + r);
        mDestroyingServices.remove(r);
        r.bindings.clear();
      }
      mAm.updateOomAdjLocked(r.app);
    }
    r.executeFg=false;
    if (r.tracker != null) {
      r.tracker.setExecuting(false,mAm.mProcessStats.getMemFactorLocked(),SystemClock.uptimeMillis());
      if (finishing) {
        r.tracker.clearCurrentOwner(r);
        r.tracker=null;
      }
    }
  }
}

Fixed version (ground truth):
private void serviceDoneExecutingLocked(ServiceRecord r,boolean inDestroying,boolean finishing){
  if (DEBUG_SERVICE)   Slog.v(TAG,"String_Node_Str" + r + "String_Node_Str"+ r.executeNesting+ "String_Node_Str"+ inDestroying+ "String_Node_Str"+ r.app);
 else   if (DEBUG_SERVICE_EXECUTING)   Slog.v(TAG,"String_Node_Str" + r.shortName);
  r.executeNesting--;
  if (r.executeNesting <= 0) {
    if (r.app != null) {
      if (DEBUG_SERVICE)       Slog.v(TAG,"String_Node_Str" + r.shortName);
      r.app.execServicesFg=false;
      r.app.executingServices.remove(r);
      if (r.app.executingServices.size() == 0) {
        if (DEBUG_SERVICE || DEBUG_SERVICE_EXECUTING)         Slog.v(TAG,"String_Node_Str" + r.shortName);
        mAm.mHandler.removeMessages(ActivityManagerService.SERVICE_TIMEOUT_MSG,r.app);
      }
 else       if (r.executeFg) {
        for (int i=r.app.executingServices.size() - 1; i >= 0; i--) {
          if (r.app.executingServices.valueAt(i).executeFg) {
            r.app.execServicesFg=true;
            break;
          }
        }
      }
      if (inDestroying) {
        if (DEBUG_SERVICE)         Slog.v(TAG,"String_Node_Str" + r);
        mDestroyingServices.remove(r);
        r.bindings.clear();
      }
      mAm.updateOomAdjLocked(r.app);
    }
    r.executeFg=false;
    if (r.tracker != null) {
      r.tracker.setExecuting(false,mAm.mProcessStats.getMemFactorLocked(),SystemClock.uptimeMillis());
      if (finishing) {
        r.tracker.clearCurrentOwner(r,false);
        r.tracker=null;
      }
    }
  }
}
Program: 744
Project: 744
Buggy source:
public void forceClearTracker(){
  if (tracker != null) {
    int memFactor=ams.mProcessStats.getMemFactorLocked();
    long now=SystemClock.uptimeMillis();
    tracker.setStarted(false,memFactor,now);
    tracker.setBound(false,memFactor,now);
    tracker.setExecuting(false,memFactor,now);
    tracker.clearCurrentOwner(this);
    tracker=null;
  }
}

Fixed version (ground truth):
public void forceClearTracker(){
  if (tracker != null) {
    tracker.clearCurrentOwner(this,true);
    tracker=null;
  }
}
Program: 746
Project: 746
Buggy source:
static int wtf(int logId,String tag,String msg,Throwable tr){
  TerribleFailure what=new TerribleFailure(msg,tr);
  int bytes=println_native(logId,ASSERT,tag,msg + '\n' + getStackTraceString(tr));
  sWtfHandler.onTerribleFailure(tag,what);
  return bytes;
}

Fixed version (ground truth):
static int wtf(int logId,String tag,String msg,Throwable tr,boolean localStack){
  TerribleFailure what=new TerribleFailure(msg,tr);
  int bytes=println_native(logId,ASSERT,tag,msg + '\n' + getStackTraceString(localStack ? what : tr));
  sWtfHandler.onTerribleFailure(tag,what);
  return bytes;
}
Program: 747
Project: 747
Buggy source:
static int wtfStack(int logId,String tag,String msg){
  TerribleFailure here=new TerribleFailure("String_Node_Str",null);
  here.fillInStackTrace();
  return wtf(logId,tag,msg,here);
}

Fixed version (ground truth):
/** 
 * Like   {@link #wtf(String,String)}, but also writes to the log the full call stack.
 * @hide
 */
public static int wtfStack(String tag,String msg){
  return wtf(LOG_ID_MAIN,tag,msg,null,true);
}
Program: 748
Project: 748
Buggy source:
public static int wtf(String tag,String msg,Throwable tr){
  return Log.wtf(Log.LOG_ID_SYSTEM,tag,msg,tr);
}

Fixed version (ground truth):
public static int wtf(String tag,String msg,Throwable tr){
  return Log.wtf(Log.LOG_ID_SYSTEM,tag,msg,tr,false);
}
Program: 749
Project: 749
Buggy source:
public static int wtfStack(String tag,String msg){
  return Log.wtfStack(Log.LOG_ID_SYSTEM,tag,msg);
}

Fixed version (ground truth):
public static int wtfStack(String tag,String msg){
  return Log.wtf(Log.LOG_ID_SYSTEM,tag,msg,null,true);
}
Program: 750
Project: 750
Buggy source:
public void clearCurrentOwner(Object owner){
  if (mOwner == owner) {
    mOwner=null;
    mProc.decActiveServices(mName);
    if (mStartedState != STATE_NOTHING || mBoundState != STATE_NOTHING || mExecState != STATE_NOTHING) {
      long now=SystemClock.uptimeMillis();
      if (mStartedState != STATE_NOTHING) {
        Slog.wtfStack(TAG,"String_Node_Str" + owner + "String_Node_Str"+ mPackage+ "String_Node_Str"+ mName+ "String_Node_Str"+ mProc);
        setStarted(false,0,now);
      }
      if (mBoundState != STATE_NOTHING) {
        Slog.wtfStack(TAG,"String_Node_Str" + owner + "String_Node_Str"+ mPackage+ "String_Node_Str"+ mName+ "String_Node_Str"+ mProc);
        setBound(false,0,now);
      }
      if (mExecState != STATE_NOTHING) {
        Slog.wtfStack(TAG,"String_Node_Str" + owner + "String_Node_Str"+ mPackage+ "String_Node_Str"+ mName+ "String_Node_Str"+ mProc);
        setExecuting(false,0,now);
      }
    }
  }
}

Fixed version (ground truth):
public void clearCurrentOwner(Object owner,boolean silently){
  if (mOwner == owner) {
    mProc.decActiveServices(mName);
    if (mStartedState != STATE_NOTHING || mBoundState != STATE_NOTHING || mExecState != STATE_NOTHING) {
      long now=SystemClock.uptimeMillis();
      if (mStartedState != STATE_NOTHING) {
        if (!silently) {
          Slog.wtfStack(TAG,"String_Node_Str" + owner + "String_Node_Str"+ mPackage+ "String_Node_Str"+ mName+ "String_Node_Str"+ mProc);
        }
        setStarted(false,0,now);
      }
      if (mBoundState != STATE_NOTHING) {
        if (!silently) {
          Slog.wtfStack(TAG,"String_Node_Str" + owner + "String_Node_Str"+ mPackage+ "String_Node_Str"+ mName+ "String_Node_Str"+ mProc);
        }
        setBound(false,0,now);
      }
      if (mExecState != STATE_NOTHING) {
        if (!silently) {
          Slog.wtfStack(TAG,"String_Node_Str" + owner + "String_Node_Str"+ mPackage+ "String_Node_Str"+ mName+ "String_Node_Str"+ mProc);
        }
        setExecuting(false,0,now);
      }
    }
    mOwner=null;
  }
}
Program: 751
Project: 751
Buggy source:
private void serviceDoneExecutingLocked(ServiceRecord r,boolean inDestroying,boolean finishing){
  if (DEBUG_SERVICE)   Slog.v(TAG,"String_Node_Str" + r + "String_Node_Str"+ r.executeNesting+ "String_Node_Str"+ inDestroying+ "String_Node_Str"+ r.app);
 else   if (DEBUG_SERVICE_EXECUTING)   Slog.v(TAG,"String_Node_Str" + r.shortName);
  r.executeNesting--;
  if (r.executeNesting <= 0) {
    if (r.app != null) {
      if (DEBUG_SERVICE)       Slog.v(TAG,"String_Node_Str" + r.shortName);
      r.app.execServicesFg=false;
      r.app.executingServices.remove(r);
      if (r.app.executingServices.size() == 0) {
        if (DEBUG_SERVICE || DEBUG_SERVICE_EXECUTING)         Slog.v(TAG,"String_Node_Str" + r.shortName);
        mAm.mHandler.removeMessages(ActivityManagerService.SERVICE_TIMEOUT_MSG,r.app);
      }
 else       if (r.executeFg) {
        for (int i=r.app.executingServices.size() - 1; i >= 0; i--) {
          if (r.app.executingServices.valueAt(i).executeFg) {
            r.app.execServicesFg=true;
            break;
          }
        }
      }
      if (inDestroying) {
        if (DEBUG_SERVICE)         Slog.v(TAG,"String_Node_Str" + r);
        mDestroyingServices.remove(r);
        r.bindings.clear();
      }
      mAm.updateOomAdjLocked(r.app);
    }
    r.executeFg=false;
    if (r.tracker != null) {
      r.tracker.setExecuting(false,mAm.mProcessStats.getMemFactorLocked(),SystemClock.uptimeMillis());
      if (finishing) {
        r.tracker.clearCurrentOwner(r);
        r.tracker=null;
      }
    }
  }
}

Fixed version (ground truth):
private void serviceDoneExecutingLocked(ServiceRecord r,boolean inDestroying,boolean finishing){
  if (DEBUG_SERVICE)   Slog.v(TAG,"String_Node_Str" + r + "String_Node_Str"+ r.executeNesting+ "String_Node_Str"+ inDestroying+ "String_Node_Str"+ r.app);
 else   if (DEBUG_SERVICE_EXECUTING)   Slog.v(TAG,"String_Node_Str" + r.shortName);
  r.executeNesting--;
  if (r.executeNesting <= 0) {
    if (r.app != null) {
      if (DEBUG_SERVICE)       Slog.v(TAG,"String_Node_Str" + r.shortName);
      r.app.execServicesFg=false;
      r.app.executingServices.remove(r);
      if (r.app.executingServices.size() == 0) {
        if (DEBUG_SERVICE || DEBUG_SERVICE_EXECUTING)         Slog.v(TAG,"String_Node_Str" + r.shortName);
        mAm.mHandler.removeMessages(ActivityManagerService.SERVICE_TIMEOUT_MSG,r.app);
      }
 else       if (r.executeFg) {
        for (int i=r.app.executingServices.size() - 1; i >= 0; i--) {
          if (r.app.executingServices.valueAt(i).executeFg) {
            r.app.execServicesFg=true;
            break;
          }
        }
      }
      if (inDestroying) {
        if (DEBUG_SERVICE)         Slog.v(TAG,"String_Node_Str" + r);
        mDestroyingServices.remove(r);
        r.bindings.clear();
      }
      mAm.updateOomAdjLocked(r.app);
    }
    r.executeFg=false;
    if (r.tracker != null) {
      r.tracker.setExecuting(false,mAm.mProcessStats.getMemFactorLocked(),SystemClock.uptimeMillis());
      if (finishing) {
        r.tracker.clearCurrentOwner(r,false);
        r.tracker=null;
      }
    }
  }
}
Program: 754
Project: 754
Buggy source:
public void forceClearTracker(){
  if (tracker != null) {
    int memFactor=ams.mProcessStats.getMemFactorLocked();
    long now=SystemClock.uptimeMillis();
    tracker.setStarted(false,memFactor,now);
    tracker.setBound(false,memFactor,now);
    tracker.setExecuting(false,memFactor,now);
    tracker.clearCurrentOwner(this);
    tracker=null;
  }
}

Fixed version (ground truth):
public void forceClearTracker(){
  if (tracker != null) {
    tracker.clearCurrentOwner(this,true);
    tracker=null;
  }
}
Program: 756
Project: 756
Buggy source:
static int wtf(int logId,String tag,String msg,Throwable tr){
  TerribleFailure what=new TerribleFailure(msg,tr);
  int bytes=println_native(logId,ASSERT,tag,msg + '\n' + getStackTraceString(tr));
  sWtfHandler.onTerribleFailure(tag,what);
  return bytes;
}

Fixed version (ground truth):
static int wtf(int logId,String tag,String msg,Throwable tr,boolean localStack){
  TerribleFailure what=new TerribleFailure(msg,tr);
  int bytes=println_native(logId,ASSERT,tag,msg + '\n' + getStackTraceString(localStack ? what : tr));
  sWtfHandler.onTerribleFailure(tag,what);
  return bytes;
}
Program: 757
Project: 757
Buggy source:
static int wtfStack(int logId,String tag,String msg){
  TerribleFailure here=new TerribleFailure("String_Node_Str",null);
  here.fillInStackTrace();
  return wtf(logId,tag,msg,here);
}

Fixed version (ground truth):
/** 
 * Like   {@link #wtf(String,String)}, but also writes to the log the full call stack.
 * @hide
 */
public static int wtfStack(String tag,String msg){
  return wtf(LOG_ID_MAIN,tag,msg,null,true);
}
Program: 758
Project: 758
Buggy source:
public static int wtf(String tag,String msg,Throwable tr){
  return Log.wtf(Log.LOG_ID_SYSTEM,tag,msg,tr);
}

Fixed version (ground truth):
public static int wtf(String tag,String msg,Throwable tr){
  return Log.wtf(Log.LOG_ID_SYSTEM,tag,msg,tr,false);
}
Program: 759
Project: 759
Buggy source:
public static int wtfStack(String tag,String msg){
  return Log.wtfStack(Log.LOG_ID_SYSTEM,tag,msg);
}

Fixed version (ground truth):
public static int wtfStack(String tag,String msg){
  return Log.wtf(Log.LOG_ID_SYSTEM,tag,msg,null,true);
}
Program: 760
Project: 760
Buggy source:
public void clearCurrentOwner(Object owner){
  if (mOwner == owner) {
    mOwner=null;
    mProc.decActiveServices(mName);
    if (mStartedState != STATE_NOTHING || mBoundState != STATE_NOTHING || mExecState != STATE_NOTHING) {
      long now=SystemClock.uptimeMillis();
      if (mStartedState != STATE_NOTHING) {
        Slog.wtfStack(TAG,"String_Node_Str" + owner + "String_Node_Str"+ mPackage+ "String_Node_Str"+ mName+ "String_Node_Str"+ mProc);
        setStarted(false,0,now);
      }
      if (mBoundState != STATE_NOTHING) {
        Slog.wtfStack(TAG,"String_Node_Str" + owner + "String_Node_Str"+ mPackage+ "String_Node_Str"+ mName+ "String_Node_Str"+ mProc);
        setBound(false,0,now);
      }
      if (mExecState != STATE_NOTHING) {
        Slog.wtfStack(TAG,"String_Node_Str" + owner + "String_Node_Str"+ mPackage+ "String_Node_Str"+ mName+ "String_Node_Str"+ mProc);
        setExecuting(false,0,now);
      }
    }
  }
}

Fixed version (ground truth):
public void clearCurrentOwner(Object owner,boolean silently){
  if (mOwner == owner) {
    mProc.decActiveServices(mName);
    if (mStartedState != STATE_NOTHING || mBoundState != STATE_NOTHING || mExecState != STATE_NOTHING) {
      long now=SystemClock.uptimeMillis();
      if (mStartedState != STATE_NOTHING) {
        if (!silently) {
          Slog.wtfStack(TAG,"String_Node_Str" + owner + "String_Node_Str"+ mPackage+ "String_Node_Str"+ mName+ "String_Node_Str"+ mProc);
        }
        setStarted(false,0,now);
      }
      if (mBoundState != STATE_NOTHING) {
        if (!silently) {
          Slog.wtfStack(TAG,"String_Node_Str" + owner + "String_Node_Str"+ mPackage+ "String_Node_Str"+ mName+ "String_Node_Str"+ mProc);
        }
        setBound(false,0,now);
      }
      if (mExecState != STATE_NOTHING) {
        if (!silently) {
          Slog.wtfStack(TAG,"String_Node_Str" + owner + "String_Node_Str"+ mPackage+ "String_Node_Str"+ mName+ "String_Node_Str"+ mProc);
        }
        setExecuting(false,0,now);
      }
    }
    mOwner=null;
  }
}
Program: 761
Project: 761
Buggy source:
private void serviceDoneExecutingLocked(ServiceRecord r,boolean inDestroying,boolean finishing){
  if (DEBUG_SERVICE)   Slog.v(TAG,"String_Node_Str" + r + "String_Node_Str"+ r.executeNesting+ "String_Node_Str"+ inDestroying+ "String_Node_Str"+ r.app);
 else   if (DEBUG_SERVICE_EXECUTING)   Slog.v(TAG,"String_Node_Str" + r.shortName);
  r.executeNesting--;
  if (r.executeNesting <= 0) {
    if (r.app != null) {
      if (DEBUG_SERVICE)       Slog.v(TAG,"String_Node_Str" + r.shortName);
      r.app.execServicesFg=false;
      r.app.executingServices.remove(r);
      if (r.app.executingServices.size() == 0) {
        if (DEBUG_SERVICE || DEBUG_SERVICE_EXECUTING)         Slog.v(TAG,"String_Node_Str" + r.shortName);
        mAm.mHandler.removeMessages(ActivityManagerService.SERVICE_TIMEOUT_MSG,r.app);
      }
 else       if (r.executeFg) {
        for (int i=r.app.executingServices.size() - 1; i >= 0; i--) {
          if (r.app.executingServices.valueAt(i).executeFg) {
            r.app.execServicesFg=true;
            break;
          }
        }
      }
      if (inDestroying) {
        if (DEBUG_SERVICE)         Slog.v(TAG,"String_Node_Str" + r);
        mDestroyingServices.remove(r);
        r.bindings.clear();
      }
      mAm.updateOomAdjLocked(r.app);
    }
    r.executeFg=false;
    if (r.tracker != null) {
      r.tracker.setExecuting(false,mAm.mProcessStats.getMemFactorLocked(),SystemClock.uptimeMillis());
      if (finishing) {
        r.tracker.clearCurrentOwner(r);
        r.tracker=null;
      }
    }
  }
}

Fixed version (ground truth):
private void serviceDoneExecutingLocked(ServiceRecord r,boolean inDestroying,boolean finishing){
  if (DEBUG_SERVICE)   Slog.v(TAG,"String_Node_Str" + r + "String_Node_Str"+ r.executeNesting+ "String_Node_Str"+ inDestroying+ "String_Node_Str"+ r.app);
 else   if (DEBUG_SERVICE_EXECUTING)   Slog.v(TAG,"String_Node_Str" + r.shortName);
  r.executeNesting--;
  if (r.executeNesting <= 0) {
    if (r.app != null) {
      if (DEBUG_SERVICE)       Slog.v(TAG,"String_Node_Str" + r.shortName);
      r.app.execServicesFg=false;
      r.app.executingServices.remove(r);
      if (r.app.executingServices.size() == 0) {
        if (DEBUG_SERVICE || DEBUG_SERVICE_EXECUTING)         Slog.v(TAG,"String_Node_Str" + r.shortName);
        mAm.mHandler.removeMessages(ActivityManagerService.SERVICE_TIMEOUT_MSG,r.app);
      }
 else       if (r.executeFg) {
        for (int i=r.app.executingServices.size() - 1; i >= 0; i--) {
          if (r.app.executingServices.valueAt(i).executeFg) {
            r.app.execServicesFg=true;
            break;
          }
        }
      }
      if (inDestroying) {
        if (DEBUG_SERVICE)         Slog.v(TAG,"String_Node_Str" + r);
        mDestroyingServices.remove(r);
        r.bindings.clear();
      }
      mAm.updateOomAdjLocked(r.app);
    }
    r.executeFg=false;
    if (r.tracker != null) {
      r.tracker.setExecuting(false,mAm.mProcessStats.getMemFactorLocked(),SystemClock.uptimeMillis());
      if (finishing) {
        r.tracker.clearCurrentOwner(r,false);
        r.tracker=null;
      }
    }
  }
}
Program: 764
Project: 764
Buggy source:
public void forceClearTracker(){
  if (tracker != null) {
    int memFactor=ams.mProcessStats.getMemFactorLocked();
    long now=SystemClock.uptimeMillis();
    tracker.setStarted(false,memFactor,now);
    tracker.setBound(false,memFactor,now);
    tracker.setExecuting(false,memFactor,now);
    tracker.clearCurrentOwner(this);
    tracker=null;
  }
}

Fixed version (ground truth):
public void forceClearTracker(){
  if (tracker != null) {
    tracker.clearCurrentOwner(this,true);
    tracker=null;
  }
}
Program: 766
Project: 766
Buggy source:
static int wtf(int logId,String tag,String msg,Throwable tr){
  TerribleFailure what=new TerribleFailure(msg,tr);
  int bytes=println_native(logId,ASSERT,tag,msg + '\n' + getStackTraceString(tr));
  sWtfHandler.onTerribleFailure(tag,what);
  return bytes;
}

Fixed version (ground truth):
static int wtf(int logId,String tag,String msg,Throwable tr,boolean localStack){
  TerribleFailure what=new TerribleFailure(msg,tr);
  int bytes=println_native(logId,ASSERT,tag,msg + '\n' + getStackTraceString(localStack ? what : tr));
  sWtfHandler.onTerribleFailure(tag,what);
  return bytes;
}
Program: 767
Project: 767
Buggy source:
static int wtfStack(int logId,String tag,String msg){
  TerribleFailure here=new TerribleFailure("String_Node_Str",null);
  here.fillInStackTrace();
  return wtf(logId,tag,msg,here);
}

Fixed version (ground truth):
/** 
 * Like   {@link #wtf(String,String)}, but also writes to the log the full call stack.
 * @hide
 */
public static int wtfStack(String tag,String msg){
  return wtf(LOG_ID_MAIN,tag,msg,null,true);
}
Program: 768
Project: 768
Buggy source:
public static int wtf(String tag,String msg,Throwable tr){
  return Log.wtf(Log.LOG_ID_SYSTEM,tag,msg,tr);
}

Fixed version (ground truth):
public static int wtf(String tag,String msg,Throwable tr){
  return Log.wtf(Log.LOG_ID_SYSTEM,tag,msg,tr,false);
}
Program: 769
Project: 769
Buggy source:
public static int wtfStack(String tag,String msg){
  return Log.wtfStack(Log.LOG_ID_SYSTEM,tag,msg);
}

Fixed version (ground truth):
public static int wtfStack(String tag,String msg){
  return Log.wtf(Log.LOG_ID_SYSTEM,tag,msg,null,true);
}
Program: 770
Project: 770
Buggy source:
public void clearCurrentOwner(Object owner){
  if (mOwner == owner) {
    mOwner=null;
    mProc.decActiveServices(mName);
    if (mStartedState != STATE_NOTHING || mBoundState != STATE_NOTHING || mExecState != STATE_NOTHING) {
      long now=SystemClock.uptimeMillis();
      if (mStartedState != STATE_NOTHING) {
        Slog.wtfStack(TAG,"String_Node_Str" + owner + "String_Node_Str"+ mPackage+ "String_Node_Str"+ mName+ "String_Node_Str"+ mProc);
        setStarted(false,0,now);
      }
      if (mBoundState != STATE_NOTHING) {
        Slog.wtfStack(TAG,"String_Node_Str" + owner + "String_Node_Str"+ mPackage+ "String_Node_Str"+ mName+ "String_Node_Str"+ mProc);
        setBound(false,0,now);
      }
      if (mExecState != STATE_NOTHING) {
        Slog.wtfStack(TAG,"String_Node_Str" + owner + "String_Node_Str"+ mPackage+ "String_Node_Str"+ mName+ "String_Node_Str"+ mProc);
        setExecuting(false,0,now);
      }
    }
  }
}

Fixed version (ground truth):
public void clearCurrentOwner(Object owner,boolean silently){
  if (mOwner == owner) {
    mProc.decActiveServices(mName);
    if (mStartedState != STATE_NOTHING || mBoundState != STATE_NOTHING || mExecState != STATE_NOTHING) {
      long now=SystemClock.uptimeMillis();
      if (mStartedState != STATE_NOTHING) {
        if (!silently) {
          Slog.wtfStack(TAG,"String_Node_Str" + owner + "String_Node_Str"+ mPackage+ "String_Node_Str"+ mName+ "String_Node_Str"+ mProc);
        }
        setStarted(false,0,now);
      }
      if (mBoundState != STATE_NOTHING) {
        if (!silently) {
          Slog.wtfStack(TAG,"String_Node_Str" + owner + "String_Node_Str"+ mPackage+ "String_Node_Str"+ mName+ "String_Node_Str"+ mProc);
        }
        setBound(false,0,now);
      }
      if (mExecState != STATE_NOTHING) {
        if (!silently) {
          Slog.wtfStack(TAG,"String_Node_Str" + owner + "String_Node_Str"+ mPackage+ "String_Node_Str"+ mName+ "String_Node_Str"+ mProc);
        }
        setExecuting(false,0,now);
      }
    }
    mOwner=null;
  }
}
Program: 771
Project: 771
Buggy source:
private void serviceDoneExecutingLocked(ServiceRecord r,boolean inDestroying,boolean finishing){
  if (DEBUG_SERVICE)   Slog.v(TAG,"String_Node_Str" + r + "String_Node_Str"+ r.executeNesting+ "String_Node_Str"+ inDestroying+ "String_Node_Str"+ r.app);
 else   if (DEBUG_SERVICE_EXECUTING)   Slog.v(TAG,"String_Node_Str" + r.shortName);
  r.executeNesting--;
  if (r.executeNesting <= 0) {
    if (r.app != null) {
      if (DEBUG_SERVICE)       Slog.v(TAG,"String_Node_Str" + r.shortName);
      r.app.execServicesFg=false;
      r.app.executingServices.remove(r);
      if (r.app.executingServices.size() == 0) {
        if (DEBUG_SERVICE || DEBUG_SERVICE_EXECUTING)         Slog.v(TAG,"String_Node_Str" + r.shortName);
        mAm.mHandler.removeMessages(ActivityManagerService.SERVICE_TIMEOUT_MSG,r.app);
      }
 else       if (r.executeFg) {
        for (int i=r.app.executingServices.size() - 1; i >= 0; i--) {
          if (r.app.executingServices.valueAt(i).executeFg) {
            r.app.execServicesFg=true;
            break;
          }
        }
      }
      if (inDestroying) {
        if (DEBUG_SERVICE)         Slog.v(TAG,"String_Node_Str" + r);
        mDestroyingServices.remove(r);
        r.bindings.clear();
      }
      mAm.updateOomAdjLocked(r.app);
    }
    r.executeFg=false;
    if (r.tracker != null) {
      r.tracker.setExecuting(false,mAm.mProcessStats.getMemFactorLocked(),SystemClock.uptimeMillis());
      if (finishing) {
        r.tracker.clearCurrentOwner(r);
        r.tracker=null;
      }
    }
  }
}

Fixed version (ground truth):
private void serviceDoneExecutingLocked(ServiceRecord r,boolean inDestroying,boolean finishing){
  if (DEBUG_SERVICE)   Slog.v(TAG,"String_Node_Str" + r + "String_Node_Str"+ r.executeNesting+ "String_Node_Str"+ inDestroying+ "String_Node_Str"+ r.app);
 else   if (DEBUG_SERVICE_EXECUTING)   Slog.v(TAG,"String_Node_Str" + r.shortName);
  r.executeNesting--;
  if (r.executeNesting <= 0) {
    if (r.app != null) {
      if (DEBUG_SERVICE)       Slog.v(TAG,"String_Node_Str" + r.shortName);
      r.app.execServicesFg=false;
      r.app.executingServices.remove(r);
      if (r.app.executingServices.size() == 0) {
        if (DEBUG_SERVICE || DEBUG_SERVICE_EXECUTING)         Slog.v(TAG,"String_Node_Str" + r.shortName);
        mAm.mHandler.removeMessages(ActivityManagerService.SERVICE_TIMEOUT_MSG,r.app);
      }
 else       if (r.executeFg) {
        for (int i=r.app.executingServices.size() - 1; i >= 0; i--) {
          if (r.app.executingServices.valueAt(i).executeFg) {
            r.app.execServicesFg=true;
            break;
          }
        }
      }
      if (inDestroying) {
        if (DEBUG_SERVICE)         Slog.v(TAG,"String_Node_Str" + r);
        mDestroyingServices.remove(r);
        r.bindings.clear();
      }
      mAm.updateOomAdjLocked(r.app);
    }
    r.executeFg=false;
    if (r.tracker != null) {
      r.tracker.setExecuting(false,mAm.mProcessStats.getMemFactorLocked(),SystemClock.uptimeMillis());
      if (finishing) {
        r.tracker.clearCurrentOwner(r,false);
        r.tracker=null;
      }
    }
  }
}
Program: 774
Project: 774
Buggy source:
public void forceClearTracker(){
  if (tracker != null) {
    int memFactor=ams.mProcessStats.getMemFactorLocked();
    long now=SystemClock.uptimeMillis();
    tracker.setStarted(false,memFactor,now);
    tracker.setBound(false,memFactor,now);
    tracker.setExecuting(false,memFactor,now);
    tracker.clearCurrentOwner(this);
    tracker=null;
  }
}

Fixed version (ground truth):
public void forceClearTracker(){
  if (tracker != null) {
    tracker.clearCurrentOwner(this,true);
    tracker=null;
  }
}
Program: 776
Project: 776
Buggy source:
static int wtf(int logId,String tag,String msg,Throwable tr){
  TerribleFailure what=new TerribleFailure(msg,tr);
  int bytes=println_native(logId,ASSERT,tag,msg + '\n' + getStackTraceString(tr));
  sWtfHandler.onTerribleFailure(tag,what);
  return bytes;
}

Fixed version (ground truth):
static int wtf(int logId,String tag,String msg,Throwable tr,boolean localStack){
  TerribleFailure what=new TerribleFailure(msg,tr);
  int bytes=println_native(logId,ASSERT,tag,msg + '\n' + getStackTraceString(localStack ? what : tr));
  sWtfHandler.onTerribleFailure(tag,what);
  return bytes;
}
Program: 777
Project: 777
Buggy source:
static int wtfStack(int logId,String tag,String msg){
  TerribleFailure here=new TerribleFailure("String_Node_Str",null);
  here.fillInStackTrace();
  return wtf(logId,tag,msg,here);
}

Fixed version (ground truth):
/** 
 * Like   {@link #wtf(String,String)}, but also writes to the log the full call stack.
 * @hide
 */
public static int wtfStack(String tag,String msg){
  return wtf(LOG_ID_MAIN,tag,msg,null,true);
}
Program: 778
Project: 778
Buggy source:
public static int wtf(String tag,String msg,Throwable tr){
  return Log.wtf(Log.LOG_ID_SYSTEM,tag,msg,tr);
}

Fixed version (ground truth):
public static int wtf(String tag,String msg,Throwable tr){
  return Log.wtf(Log.LOG_ID_SYSTEM,tag,msg,tr,false);
}
Program: 779
Project: 779
Buggy source:
public static int wtfStack(String tag,String msg){
  return Log.wtfStack(Log.LOG_ID_SYSTEM,tag,msg);
}

Fixed version (ground truth):
public static int wtfStack(String tag,String msg){
  return Log.wtf(Log.LOG_ID_SYSTEM,tag,msg,null,true);
}
Program: 780
Project: 780
Buggy source:
public void clearCurrentOwner(Object owner){
  if (mOwner == owner) {
    mOwner=null;
    mProc.decActiveServices(mName);
    if (mStartedState != STATE_NOTHING || mBoundState != STATE_NOTHING || mExecState != STATE_NOTHING) {
      long now=SystemClock.uptimeMillis();
      if (mStartedState != STATE_NOTHING) {
        Slog.wtfStack(TAG,"String_Node_Str" + owner + "String_Node_Str"+ mPackage+ "String_Node_Str"+ mName+ "String_Node_Str"+ mProc);
        setStarted(false,0,now);
      }
      if (mBoundState != STATE_NOTHING) {
        Slog.wtfStack(TAG,"String_Node_Str" + owner + "String_Node_Str"+ mPackage+ "String_Node_Str"+ mName+ "String_Node_Str"+ mProc);
        setBound(false,0,now);
      }
      if (mExecState != STATE_NOTHING) {
        Slog.wtfStack(TAG,"String_Node_Str" + owner + "String_Node_Str"+ mPackage+ "String_Node_Str"+ mName+ "String_Node_Str"+ mProc);
        setExecuting(false,0,now);
      }
    }
  }
}

Fixed version (ground truth):
public void clearCurrentOwner(Object owner,boolean silently){
  if (mOwner == owner) {
    mProc.decActiveServices(mName);
    if (mStartedState != STATE_NOTHING || mBoundState != STATE_NOTHING || mExecState != STATE_NOTHING) {
      long now=SystemClock.uptimeMillis();
      if (mStartedState != STATE_NOTHING) {
        if (!silently) {
          Slog.wtfStack(TAG,"String_Node_Str" + owner + "String_Node_Str"+ mPackage+ "String_Node_Str"+ mName+ "String_Node_Str"+ mProc);
        }
        setStarted(false,0,now);
      }
      if (mBoundState != STATE_NOTHING) {
        if (!silently) {
          Slog.wtfStack(TAG,"String_Node_Str" + owner + "String_Node_Str"+ mPackage+ "String_Node_Str"+ mName+ "String_Node_Str"+ mProc);
        }
        setBound(false,0,now);
      }
      if (mExecState != STATE_NOTHING) {
        if (!silently) {
          Slog.wtfStack(TAG,"String_Node_Str" + owner + "String_Node_Str"+ mPackage+ "String_Node_Str"+ mName+ "String_Node_Str"+ mProc);
        }
        setExecuting(false,0,now);
      }
    }
    mOwner=null;
  }
}