nus-yam/ex-repair huggingface dataset:
Program: 193724
Project: 193724
Buggy source:
private PendingAssistExtras enqueueAssistContext(int requestType,Intent intent,String hint,IResultReceiver receiver,IBinder activityToken,int userHandle,Bundle args,long timeout){
  enforceCallingPermission(android.Manifest.permission.GET_TOP_ACTIVITY_INFO,"String_Node_Str");
synchronized (this) {
    ActivityRecord activity=getFocusedStack().topActivity();
    if (activity == null) {
      Slog.w(TAG,"String_Node_Str");
      return null;
    }
    if (activity.app == null || activity.app.thread == null) {
      Slog.w(TAG,"String_Node_Str" + activity);
      return null;
    }
    if (activityToken != null) {
      ActivityRecord caller=ActivityRecord.forTokenLocked(activityToken);
      if (activity != caller) {
        Slog.w(TAG,"String_Node_Str" + caller + "String_Node_Str"+ activity);
        return null;
      }
    }
    PendingAssistExtras pae;
    Bundle extras=new Bundle();
    if (args != null) {
      extras.putAll(args);
    }
    extras.putString(Intent.EXTRA_ASSIST_PACKAGE,activity.packageName);
    extras.putInt(Intent.EXTRA_ASSIST_UID,activity.app.uid);
    pae=new PendingAssistExtras(activity,extras,intent,hint,receiver,userHandle);
    try {
      activity.app.thread.requestAssistContextExtras(activity.appToken,pae,requestType);
      mPendingAssistExtras.add(pae);
      mHandler.postDelayed(pae,timeout);
    }
 catch (    RemoteException e) {
      Slog.w(TAG,"String_Node_Str" + activity);
      return null;
    }
    return pae;
  }
}

Fixed version (ground truth):
private PendingAssistExtras enqueueAssistContext(int requestType,Intent intent,String hint,IResultReceiver receiver,IBinder activityToken,int userHandle,Bundle args,long timeout){
  enforceCallingPermission(android.Manifest.permission.GET_TOP_ACTIVITY_INFO,"String_Node_Str");
synchronized (this) {
    ActivityRecord activity=getFocusedStack().topActivity();
    if (activity == null) {
      Slog.w(TAG,"String_Node_Str");
      return null;
    }
    if (activity.app == null || activity.app.thread == null) {
      Slog.w(TAG,"String_Node_Str" + activity);
      return null;
    }
    if (activityToken != null) {
      ActivityRecord caller=ActivityRecord.forTokenLocked(activityToken);
      if (activity != caller) {
        Slog.w(TAG,"String_Node_Str" + caller + "String_Node_Str"+ activity);
        return null;
      }
    }
    PendingAssistExtras pae;
    Bundle extras=new Bundle();
    if (args != null) {
      extras.putAll(args);
    }
    extras.putString(Intent.EXTRA_ASSIST_PACKAGE,activity.packageName);
    extras.putInt(Intent.EXTRA_ASSIST_UID,activity.app.uid);
    pae=new PendingAssistExtras(activity,extras,intent,hint,receiver,userHandle);
    try {
      activity.app.thread.requestAssistContextExtras(activity.appToken,pae,requestType);
      mPendingAssistExtras.add(pae);
      mUiHandler.postDelayed(pae,timeout);
    }
 catch (    RemoteException e) {
      Slog.w(TAG,"String_Node_Str" + activity);
      return null;
    }
    return pae;
  }
}
Program: 193725
Project: 193725
Buggy source:
@Override public Bundle getAssistContextExtras(int requestType){
  PendingAssistExtras pae=enqueueAssistContext(requestType,null,null,null,null,UserHandle.getCallingUserId(),null,PENDING_ASSIST_EXTRAS_TIMEOUT);
  if (pae == null) {
    return null;
  }
synchronized (pae) {
    while (!pae.haveResult) {
      try {
        pae.wait();
      }
 catch (      InterruptedException e) {
      }
    }
  }
synchronized (this) {
    buildAssistBundleLocked(pae,pae.result);
    mPendingAssistExtras.remove(pae);
    mHandler.removeCallbacks(pae);
  }
  return pae.extras;
}

Fixed version (ground truth):
@Override public Bundle getAssistContextExtras(int requestType){
  PendingAssistExtras pae=enqueueAssistContext(requestType,null,null,null,null,UserHandle.getCallingUserId(),null,PENDING_ASSIST_EXTRAS_TIMEOUT);
  if (pae == null) {
    return null;
  }
synchronized (pae) {
    while (!pae.haveResult) {
      try {
        pae.wait();
      }
 catch (      InterruptedException e) {
      }
    }
  }
synchronized (this) {
    buildAssistBundleLocked(pae,pae.result);
    mPendingAssistExtras.remove(pae);
    mUiHandler.removeCallbacks(pae);
  }
  return pae.extras;
}
Program: 193727
Project: 193727
Buggy source:
private PendingAssistExtras enqueueAssistContext(int requestType,Intent intent,String hint,IResultReceiver receiver,IBinder activityToken,int userHandle,Bundle args,long timeout){
  enforceCallingPermission(android.Manifest.permission.GET_TOP_ACTIVITY_INFO,"String_Node_Str");
synchronized (this) {
    ActivityRecord activity=getFocusedStack().topActivity();
    if (activity == null) {
      Slog.w(TAG,"String_Node_Str");
      return null;
    }
    if (activity.app == null || activity.app.thread == null) {
      Slog.w(TAG,"String_Node_Str" + activity);
      return null;
    }
    if (activityToken != null) {
      ActivityRecord caller=ActivityRecord.forTokenLocked(activityToken);
      if (activity != caller) {
        Slog.w(TAG,"String_Node_Str" + caller + "String_Node_Str"+ activity);
        return null;
      }
    }
    PendingAssistExtras pae;
    Bundle extras=new Bundle();
    if (args != null) {
      extras.putAll(args);
    }
    extras.putString(Intent.EXTRA_ASSIST_PACKAGE,activity.packageName);
    extras.putInt(Intent.EXTRA_ASSIST_UID,activity.app.uid);
    pae=new PendingAssistExtras(activity,extras,intent,hint,receiver,userHandle);
    try {
      activity.app.thread.requestAssistContextExtras(activity.appToken,pae,requestType);
      mPendingAssistExtras.add(pae);
      mHandler.postDelayed(pae,timeout);
    }
 catch (    RemoteException e) {
      Slog.w(TAG,"String_Node_Str" + activity);
      return null;
    }
    return pae;
  }
}

Fixed version (ground truth):
private PendingAssistExtras enqueueAssistContext(int requestType,Intent intent,String hint,IResultReceiver receiver,IBinder activityToken,int userHandle,Bundle args,long timeout){
  enforceCallingPermission(android.Manifest.permission.GET_TOP_ACTIVITY_INFO,"String_Node_Str");
synchronized (this) {
    ActivityRecord activity=getFocusedStack().topActivity();
    if (activity == null) {
      Slog.w(TAG,"String_Node_Str");
      return null;
    }
    if (activity.app == null || activity.app.thread == null) {
      Slog.w(TAG,"String_Node_Str" + activity);
      return null;
    }
    if (activityToken != null) {
      ActivityRecord caller=ActivityRecord.forTokenLocked(activityToken);
      if (activity != caller) {
        Slog.w(TAG,"String_Node_Str" + caller + "String_Node_Str"+ activity);
        return null;
      }
    }
    PendingAssistExtras pae;
    Bundle extras=new Bundle();
    if (args != null) {
      extras.putAll(args);
    }
    extras.putString(Intent.EXTRA_ASSIST_PACKAGE,activity.packageName);
    extras.putInt(Intent.EXTRA_ASSIST_UID,activity.app.uid);
    pae=new PendingAssistExtras(activity,extras,intent,hint,receiver,userHandle);
    try {
      activity.app.thread.requestAssistContextExtras(activity.appToken,pae,requestType);
      mPendingAssistExtras.add(pae);
      mUiHandler.postDelayed(pae,timeout);
    }
 catch (    RemoteException e) {
      Slog.w(TAG,"String_Node_Str" + activity);
      return null;
    }
    return pae;
  }
}
Program: 193728
Project: 193728
Buggy source:
@Override public Bundle getAssistContextExtras(int requestType){
  PendingAssistExtras pae=enqueueAssistContext(requestType,null,null,null,null,UserHandle.getCallingUserId(),null,PENDING_ASSIST_EXTRAS_TIMEOUT);
  if (pae == null) {
    return null;
  }
synchronized (pae) {
    while (!pae.haveResult) {
      try {
        pae.wait();
      }
 catch (      InterruptedException e) {
      }
    }
  }
synchronized (this) {
    buildAssistBundleLocked(pae,pae.result);
    mPendingAssistExtras.remove(pae);
    mHandler.removeCallbacks(pae);
  }
  return pae.extras;
}

Fixed version (ground truth):
@Override public Bundle getAssistContextExtras(int requestType){
  PendingAssistExtras pae=enqueueAssistContext(requestType,null,null,null,null,UserHandle.getCallingUserId(),null,PENDING_ASSIST_EXTRAS_TIMEOUT);
  if (pae == null) {
    return null;
  }
synchronized (pae) {
    while (!pae.haveResult) {
      try {
        pae.wait();
      }
 catch (      InterruptedException e) {
      }
    }
  }
synchronized (this) {
    buildAssistBundleLocked(pae,pae.result);
    mPendingAssistExtras.remove(pae);
    mUiHandler.removeCallbacks(pae);
  }
  return pae.extras;
}
Program: 193730
Project: 193730
Buggy source:
private PendingAssistExtras enqueueAssistContext(int requestType,Intent intent,String hint,IResultReceiver receiver,IBinder activityToken,int userHandle,Bundle args,long timeout){
  enforceCallingPermission(android.Manifest.permission.GET_TOP_ACTIVITY_INFO,"String_Node_Str");
synchronized (this) {
    ActivityRecord activity=getFocusedStack().topActivity();
    if (activity == null) {
      Slog.w(TAG,"String_Node_Str");
      return null;
    }
    if (activity.app == null || activity.app.thread == null) {
      Slog.w(TAG,"String_Node_Str" + activity);
      return null;
    }
    if (activityToken != null) {
      ActivityRecord caller=ActivityRecord.forTokenLocked(activityToken);
      if (activity != caller) {
        Slog.w(TAG,"String_Node_Str" + caller + "String_Node_Str"+ activity);
        return null;
      }
    }
    PendingAssistExtras pae;
    Bundle extras=new Bundle();
    if (args != null) {
      extras.putAll(args);
    }
    extras.putString(Intent.EXTRA_ASSIST_PACKAGE,activity.packageName);
    extras.putInt(Intent.EXTRA_ASSIST_UID,activity.app.uid);
    pae=new PendingAssistExtras(activity,extras,intent,hint,receiver,userHandle);
    try {
      activity.app.thread.requestAssistContextExtras(activity.appToken,pae,requestType);
      mPendingAssistExtras.add(pae);
      mHandler.postDelayed(pae,timeout);
    }
 catch (    RemoteException e) {
      Slog.w(TAG,"String_Node_Str" + activity);
      return null;
    }
    return pae;
  }
}

Fixed version (ground truth):
private PendingAssistExtras enqueueAssistContext(int requestType,Intent intent,String hint,IResultReceiver receiver,IBinder activityToken,int userHandle,Bundle args,long timeout){
  enforceCallingPermission(android.Manifest.permission.GET_TOP_ACTIVITY_INFO,"String_Node_Str");
synchronized (this) {
    ActivityRecord activity=getFocusedStack().topActivity();
    if (activity == null) {
      Slog.w(TAG,"String_Node_Str");
      return null;
    }
    if (activity.app == null || activity.app.thread == null) {
      Slog.w(TAG,"String_Node_Str" + activity);
      return null;
    }
    if (activityToken != null) {
      ActivityRecord caller=ActivityRecord.forTokenLocked(activityToken);
      if (activity != caller) {
        Slog.w(TAG,"String_Node_Str" + caller + "String_Node_Str"+ activity);
        return null;
      }
    }
    PendingAssistExtras pae;
    Bundle extras=new Bundle();
    if (args != null) {
      extras.putAll(args);
    }
    extras.putString(Intent.EXTRA_ASSIST_PACKAGE,activity.packageName);
    extras.putInt(Intent.EXTRA_ASSIST_UID,activity.app.uid);
    pae=new PendingAssistExtras(activity,extras,intent,hint,receiver,userHandle);
    try {
      activity.app.thread.requestAssistContextExtras(activity.appToken,pae,requestType);
      mPendingAssistExtras.add(pae);
      mUiHandler.postDelayed(pae,timeout);
    }
 catch (    RemoteException e) {
      Slog.w(TAG,"String_Node_Str" + activity);
      return null;
    }
    return pae;
  }
}
Program: 193731
Project: 193731
Buggy source:
private void dumpHelp(PrintWriter pw){
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
}

Fixed version (ground truth):
private void dumpHelp(PrintWriter pw){
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
}
Program: 193732
Project: 193732
Buggy source:
private void dumpHelp(PrintWriter pw){
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
}

Fixed version (ground truth):
private void dumpHelp(PrintWriter pw){
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
}
Program: 193733
Project: 193733
Buggy source:
private void dumpHelp(PrintWriter pw){
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
}

Fixed version (ground truth):
private void dumpHelp(PrintWriter pw){
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
}
Program: 193734
Project: 193734
Buggy source:
private void dumpHelp(PrintWriter pw){
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
}

Fixed version (ground truth):
private void dumpHelp(PrintWriter pw){
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
}
Program: 193735
Project: 193735
Buggy source:
private void dumpHelp(PrintWriter pw){
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
}

Fixed version (ground truth):
private void dumpHelp(PrintWriter pw){
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
}
Program: 193736
Project: 193736
Buggy source:
private void dumpHelp(PrintWriter pw){
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
}

Fixed version (ground truth):
private void dumpHelp(PrintWriter pw){
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
}
Program: 193737
Project: 193737
Buggy source:
private void dumpHelp(PrintWriter pw){
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
}

Fixed version (ground truth):
private void dumpHelp(PrintWriter pw){
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
}
Program: 193738
Project: 193738
Buggy source:
private void dumpHelp(PrintWriter pw){
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
}

Fixed version (ground truth):
private void dumpHelp(PrintWriter pw){
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
}
Program: 193739
Project: 193739
Buggy source:
public AnyMotionDetector(AlarmManager am,PowerManager pm,Handler handler,SensorManager sm,DeviceIdleCallback callback){
  if (DEBUG)   Slog.d(TAG,"String_Node_Str");
  mAlarmManager=am;
  mWakeLock=pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK,TAG);
  mHandler=handler;
  mSensorManager=sm;
  mAccelSensor=mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);
  mMeasurementInProgress=false;
  mState=STATE_INACTIVE;
  mCallback=callback;
  mRunningStats=new RunningSignalStats();
  mNumSufficientSamples=(int)Math.ceil(((double)ORIENTATION_MEASUREMENT_DURATION_MILLIS / SAMPLING_INTERVAL_MILLIS));
  if (DEBUG)   Slog.d(TAG,"String_Node_Str" + mNumSufficientSamples);
}

Fixed version (ground truth):
public AnyMotionDetector(PowerManager pm,Handler handler,SensorManager sm,DeviceIdleCallback callback){
  if (DEBUG)   Slog.d(TAG,"String_Node_Str");
  mWakeLock=pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK,TAG);
  mWakeLock.setReferenceCounted(false);
  mHandler=handler;
  mSensorManager=sm;
  mAccelSensor=mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);
  mMeasurementInProgress=false;
  mState=STATE_INACTIVE;
  mCallback=callback;
  mRunningStats=new RunningSignalStats();
  mNumSufficientSamples=(int)Math.ceil(((double)ORIENTATION_MEASUREMENT_DURATION_MILLIS / SAMPLING_INTERVAL_MILLIS));
  if (DEBUG)   Slog.d(TAG,"String_Node_Str" + mNumSufficientSamples);
}
Program: 193740
Project: 193740
Buggy source:
private void startOrientationMeasurement(){
  if (DEBUG)   Slog.d(TAG,"String_Node_Str" + mMeasurementInProgress + "String_Node_Str"+ (mAccelSensor != null));
  if (!mMeasurementInProgress && mAccelSensor != null) {
    if (mSensorManager.registerListener(mListener,mAccelSensor,SAMPLING_INTERVAL_MILLIS * 1000)) {
      mWakeLock.acquire();
      mMeasurementInProgress=true;
      mDetectionStartTime=SystemClock.elapsedRealtime();
      mRunningStats.reset();
    }
    Message msg=Message.obtain(mHandler,mMeasurementTimeout);
    msg.setAsynchronous(true);
    mHandler.sendMessageDelayed(msg,ACCELEROMETER_DATA_TIMEOUT_MILLIS);
  }
}

Fixed version (ground truth):
private void startOrientationMeasurement(){
  if (DEBUG)   Slog.d(TAG,"String_Node_Str" + mMeasurementInProgress + "String_Node_Str"+ (mAccelSensor != null));
  if (!mMeasurementInProgress && mAccelSensor != null) {
    if (mSensorManager.registerListener(mListener,mAccelSensor,SAMPLING_INTERVAL_MILLIS * 1000)) {
      mWakeLock.acquire();
      mMeasurementInProgress=true;
      mRunningStats.reset();
    }
    Message msg=Message.obtain(mHandler,mMeasurementTimeout);
    msg.setAsynchronous(true);
    mHandler.sendMessageDelayed(msg,ACCELEROMETER_DATA_TIMEOUT_MILLIS);
  }
}
Program: 193742
Project: 193742
Buggy source:
public AnyMotionDetector(AlarmManager am,PowerManager pm,Handler handler,SensorManager sm,DeviceIdleCallback callback){
  if (DEBUG)   Slog.d(TAG,"String_Node_Str");
  mAlarmManager=am;
  mWakeLock=pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK,TAG);
  mHandler=handler;
  mSensorManager=sm;
  mAccelSensor=mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);
  mMeasurementInProgress=false;
  mState=STATE_INACTIVE;
  mCallback=callback;
  mRunningStats=new RunningSignalStats();
  mNumSufficientSamples=(int)Math.ceil(((double)ORIENTATION_MEASUREMENT_DURATION_MILLIS / SAMPLING_INTERVAL_MILLIS));
  if (DEBUG)   Slog.d(TAG,"String_Node_Str" + mNumSufficientSamples);
}

Fixed version (ground truth):
public AnyMotionDetector(PowerManager pm,Handler handler,SensorManager sm,DeviceIdleCallback callback){
  if (DEBUG)   Slog.d(TAG,"String_Node_Str");
  mWakeLock=pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK,TAG);
  mWakeLock.setReferenceCounted(false);
  mHandler=handler;
  mSensorManager=sm;
  mAccelSensor=mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);
  mMeasurementInProgress=false;
  mState=STATE_INACTIVE;
  mCallback=callback;
  mRunningStats=new RunningSignalStats();
  mNumSufficientSamples=(int)Math.ceil(((double)ORIENTATION_MEASUREMENT_DURATION_MILLIS / SAMPLING_INTERVAL_MILLIS));
  if (DEBUG)   Slog.d(TAG,"String_Node_Str" + mNumSufficientSamples);
}
Program: 193743
Project: 193743
Buggy source:
private void startOrientationMeasurement(){
  if (DEBUG)   Slog.d(TAG,"String_Node_Str" + mMeasurementInProgress + "String_Node_Str"+ (mAccelSensor != null));
  if (!mMeasurementInProgress && mAccelSensor != null) {
    if (mSensorManager.registerListener(mListener,mAccelSensor,SAMPLING_INTERVAL_MILLIS * 1000)) {
      mWakeLock.acquire();
      mMeasurementInProgress=true;
      mDetectionStartTime=SystemClock.elapsedRealtime();
      mRunningStats.reset();
    }
    Message msg=Message.obtain(mHandler,mMeasurementTimeout);
    msg.setAsynchronous(true);
    mHandler.sendMessageDelayed(msg,ACCELEROMETER_DATA_TIMEOUT_MILLIS);
  }
}

Fixed version (ground truth):
private void startOrientationMeasurement(){
  if (DEBUG)   Slog.d(TAG,"String_Node_Str" + mMeasurementInProgress + "String_Node_Str"+ (mAccelSensor != null));
  if (!mMeasurementInProgress && mAccelSensor != null) {
    if (mSensorManager.registerListener(mListener,mAccelSensor,SAMPLING_INTERVAL_MILLIS * 1000)) {
      mWakeLock.acquire();
      mMeasurementInProgress=true;
      mRunningStats.reset();
    }
    Message msg=Message.obtain(mHandler,mMeasurementTimeout);
    msg.setAsynchronous(true);
    mHandler.sendMessageDelayed(msg,ACCELEROMETER_DATA_TIMEOUT_MILLIS);
  }
}
Program: 193745
Project: 193745
Buggy source:
public AnyMotionDetector(AlarmManager am,PowerManager pm,Handler handler,SensorManager sm,DeviceIdleCallback callback){
  if (DEBUG)   Slog.d(TAG,"String_Node_Str");
  mAlarmManager=am;
  mWakeLock=pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK,TAG);
  mHandler=handler;
  mSensorManager=sm;
  mAccelSensor=mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);
  mMeasurementInProgress=false;
  mState=STATE_INACTIVE;
  mCallback=callback;
  mRunningStats=new RunningSignalStats();
  mNumSufficientSamples=(int)Math.ceil(((double)ORIENTATION_MEASUREMENT_DURATION_MILLIS / SAMPLING_INTERVAL_MILLIS));
  if (DEBUG)   Slog.d(TAG,"String_Node_Str" + mNumSufficientSamples);
}

Fixed version (ground truth):
public AnyMotionDetector(PowerManager pm,Handler handler,SensorManager sm,DeviceIdleCallback callback){
  if (DEBUG)   Slog.d(TAG,"String_Node_Str");
  mWakeLock=pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK,TAG);
  mWakeLock.setReferenceCounted(false);
  mHandler=handler;
  mSensorManager=sm;
  mAccelSensor=mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);
  mMeasurementInProgress=false;
  mState=STATE_INACTIVE;
  mCallback=callback;
  mRunningStats=new RunningSignalStats();
  mNumSufficientSamples=(int)Math.ceil(((double)ORIENTATION_MEASUREMENT_DURATION_MILLIS / SAMPLING_INTERVAL_MILLIS));
  if (DEBUG)   Slog.d(TAG,"String_Node_Str" + mNumSufficientSamples);
}
Program: 193746
Project: 193746
Buggy source:
private void startOrientationMeasurement(){
  if (DEBUG)   Slog.d(TAG,"String_Node_Str" + mMeasurementInProgress + "String_Node_Str"+ (mAccelSensor != null));
  if (!mMeasurementInProgress && mAccelSensor != null) {
    if (mSensorManager.registerListener(mListener,mAccelSensor,SAMPLING_INTERVAL_MILLIS * 1000)) {
      mWakeLock.acquire();
      mMeasurementInProgress=true;
      mDetectionStartTime=SystemClock.elapsedRealtime();
      mRunningStats.reset();
    }
    Message msg=Message.obtain(mHandler,mMeasurementTimeout);
    msg.setAsynchronous(true);
    mHandler.sendMessageDelayed(msg,ACCELEROMETER_DATA_TIMEOUT_MILLIS);
  }
}

Fixed version (ground truth):
private void startOrientationMeasurement(){
  if (DEBUG)   Slog.d(TAG,"String_Node_Str" + mMeasurementInProgress + "String_Node_Str"+ (mAccelSensor != null));
  if (!mMeasurementInProgress && mAccelSensor != null) {
    if (mSensorManager.registerListener(mListener,mAccelSensor,SAMPLING_INTERVAL_MILLIS * 1000)) {
      mWakeLock.acquire();
      mMeasurementInProgress=true;
      mRunningStats.reset();
    }
    Message msg=Message.obtain(mHandler,mMeasurementTimeout);
    msg.setAsynchronous(true);
    mHandler.sendMessageDelayed(msg,ACCELEROMETER_DATA_TIMEOUT_MILLIS);
  }
}
Program: 193748
Project: 193748
Buggy source:
public AnyMotionDetector(AlarmManager am,PowerManager pm,Handler handler,SensorManager sm,DeviceIdleCallback callback){
  if (DEBUG)   Slog.d(TAG,"String_Node_Str");
  mAlarmManager=am;
  mWakeLock=pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK,TAG);
  mHandler=handler;
  mSensorManager=sm;
  mAccelSensor=mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);
  mMeasurementInProgress=false;
  mState=STATE_INACTIVE;
  mCallback=callback;
  mRunningStats=new RunningSignalStats();
  mNumSufficientSamples=(int)Math.ceil(((double)ORIENTATION_MEASUREMENT_DURATION_MILLIS / SAMPLING_INTERVAL_MILLIS));
  if (DEBUG)   Slog.d(TAG,"String_Node_Str" + mNumSufficientSamples);
}

Fixed version (ground truth):
public AnyMotionDetector(PowerManager pm,Handler handler,SensorManager sm,DeviceIdleCallback callback){
  if (DEBUG)   Slog.d(TAG,"String_Node_Str");
  mWakeLock=pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK,TAG);
  mWakeLock.setReferenceCounted(false);
  mHandler=handler;
  mSensorManager=sm;
  mAccelSensor=mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);
  mMeasurementInProgress=false;
  mState=STATE_INACTIVE;
  mCallback=callback;
  mRunningStats=new RunningSignalStats();
  mNumSufficientSamples=(int)Math.ceil(((double)ORIENTATION_MEASUREMENT_DURATION_MILLIS / SAMPLING_INTERVAL_MILLIS));
  if (DEBUG)   Slog.d(TAG,"String_Node_Str" + mNumSufficientSamples);
}
Program: 193749
Project: 193749
Buggy source:
private void startOrientationMeasurement(){
  if (DEBUG)   Slog.d(TAG,"String_Node_Str" + mMeasurementInProgress + "String_Node_Str"+ (mAccelSensor != null));
  if (!mMeasurementInProgress && mAccelSensor != null) {
    if (mSensorManager.registerListener(mListener,mAccelSensor,SAMPLING_INTERVAL_MILLIS * 1000)) {
      mWakeLock.acquire();
      mMeasurementInProgress=true;
      mDetectionStartTime=SystemClock.elapsedRealtime();
      mRunningStats.reset();
    }
    Message msg=Message.obtain(mHandler,mMeasurementTimeout);
    msg.setAsynchronous(true);
    mHandler.sendMessageDelayed(msg,ACCELEROMETER_DATA_TIMEOUT_MILLIS);
  }
}

Fixed version (ground truth):
private void startOrientationMeasurement(){
  if (DEBUG)   Slog.d(TAG,"String_Node_Str" + mMeasurementInProgress + "String_Node_Str"+ (mAccelSensor != null));
  if (!mMeasurementInProgress && mAccelSensor != null) {
    if (mSensorManager.registerListener(mListener,mAccelSensor,SAMPLING_INTERVAL_MILLIS * 1000)) {
      mWakeLock.acquire();
      mMeasurementInProgress=true;
      mRunningStats.reset();
    }
    Message msg=Message.obtain(mHandler,mMeasurementTimeout);
    msg.setAsynchronous(true);
    mHandler.sendMessageDelayed(msg,ACCELEROMETER_DATA_TIMEOUT_MILLIS);
  }
}
Program: 193751
Project: 193751
Buggy source:
public AnyMotionDetector(AlarmManager am,PowerManager pm,Handler handler,SensorManager sm,DeviceIdleCallback callback){
  if (DEBUG)   Slog.d(TAG,"String_Node_Str");
  mAlarmManager=am;
  mWakeLock=pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK,TAG);
  mHandler=handler;
  mSensorManager=sm;
  mAccelSensor=mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);
  mMeasurementInProgress=false;
  mState=STATE_INACTIVE;
  mCallback=callback;
  mRunningStats=new RunningSignalStats();
  mNumSufficientSamples=(int)Math.ceil(((double)ORIENTATION_MEASUREMENT_DURATION_MILLIS / SAMPLING_INTERVAL_MILLIS));
  if (DEBUG)   Slog.d(TAG,"String_Node_Str" + mNumSufficientSamples);
}

Fixed version (ground truth):
public AnyMotionDetector(PowerManager pm,Handler handler,SensorManager sm,DeviceIdleCallback callback){
  if (DEBUG)   Slog.d(TAG,"String_Node_Str");
  mWakeLock=pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK,TAG);
  mWakeLock.setReferenceCounted(false);
  mHandler=handler;
  mSensorManager=sm;
  mAccelSensor=mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);
  mMeasurementInProgress=false;
  mState=STATE_INACTIVE;
  mCallback=callback;
  mRunningStats=new RunningSignalStats();
  mNumSufficientSamples=(int)Math.ceil(((double)ORIENTATION_MEASUREMENT_DURATION_MILLIS / SAMPLING_INTERVAL_MILLIS));
  if (DEBUG)   Slog.d(TAG,"String_Node_Str" + mNumSufficientSamples);
}
Program: 193752
Project: 193752
Buggy source:
private void startOrientationMeasurement(){
  if (DEBUG)   Slog.d(TAG,"String_Node_Str" + mMeasurementInProgress + "String_Node_Str"+ (mAccelSensor != null));
  if (!mMeasurementInProgress && mAccelSensor != null) {
    if (mSensorManager.registerListener(mListener,mAccelSensor,SAMPLING_INTERVAL_MILLIS * 1000)) {
      mWakeLock.acquire();
      mMeasurementInProgress=true;
      mDetectionStartTime=SystemClock.elapsedRealtime();
      mRunningStats.reset();
    }
    Message msg=Message.obtain(mHandler,mMeasurementTimeout);
    msg.setAsynchronous(true);
    mHandler.sendMessageDelayed(msg,ACCELEROMETER_DATA_TIMEOUT_MILLIS);
  }
}

Fixed version (ground truth):
private void startOrientationMeasurement(){
  if (DEBUG)   Slog.d(TAG,"String_Node_Str" + mMeasurementInProgress + "String_Node_Str"+ (mAccelSensor != null));
  if (!mMeasurementInProgress && mAccelSensor != null) {
    if (mSensorManager.registerListener(mListener,mAccelSensor,SAMPLING_INTERVAL_MILLIS * 1000)) {
      mWakeLock.acquire();
      mMeasurementInProgress=true;
      mRunningStats.reset();
    }
    Message msg=Message.obtain(mHandler,mMeasurementTimeout);
    msg.setAsynchronous(true);
    mHandler.sendMessageDelayed(msg,ACCELEROMETER_DATA_TIMEOUT_MILLIS);
  }
}
Program: 193754
Project: 193754
Buggy source:
public AnyMotionDetector(AlarmManager am,PowerManager pm,Handler handler,SensorManager sm,DeviceIdleCallback callback){
  if (DEBUG)   Slog.d(TAG,"String_Node_Str");
  mAlarmManager=am;
  mWakeLock=pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK,TAG);
  mHandler=handler;
  mSensorManager=sm;
  mAccelSensor=mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);
  mMeasurementInProgress=false;
  mState=STATE_INACTIVE;
  mCallback=callback;
  mRunningStats=new RunningSignalStats();
  mNumSufficientSamples=(int)Math.ceil(((double)ORIENTATION_MEASUREMENT_DURATION_MILLIS / SAMPLING_INTERVAL_MILLIS));
  if (DEBUG)   Slog.d(TAG,"String_Node_Str" + mNumSufficientSamples);
}

Fixed version (ground truth):
public AnyMotionDetector(PowerManager pm,Handler handler,SensorManager sm,DeviceIdleCallback callback){
  if (DEBUG)   Slog.d(TAG,"String_Node_Str");
  mWakeLock=pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK,TAG);
  mWakeLock.setReferenceCounted(false);
  mHandler=handler;
  mSensorManager=sm;
  mAccelSensor=mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);
  mMeasurementInProgress=false;
  mState=STATE_INACTIVE;
  mCallback=callback;
  mRunningStats=new RunningSignalStats();
  mNumSufficientSamples=(int)Math.ceil(((double)ORIENTATION_MEASUREMENT_DURATION_MILLIS / SAMPLING_INTERVAL_MILLIS));
  if (DEBUG)   Slog.d(TAG,"String_Node_Str" + mNumSufficientSamples);
}
Program: 193755
Project: 193755
Buggy source:
private void startOrientationMeasurement(){
  if (DEBUG)   Slog.d(TAG,"String_Node_Str" + mMeasurementInProgress + "String_Node_Str"+ (mAccelSensor != null));
  if (!mMeasurementInProgress && mAccelSensor != null) {
    if (mSensorManager.registerListener(mListener,mAccelSensor,SAMPLING_INTERVAL_MILLIS * 1000)) {
      mWakeLock.acquire();
      mMeasurementInProgress=true;
      mDetectionStartTime=SystemClock.elapsedRealtime();
      mRunningStats.reset();
    }
    Message msg=Message.obtain(mHandler,mMeasurementTimeout);
    msg.setAsynchronous(true);
    mHandler.sendMessageDelayed(msg,ACCELEROMETER_DATA_TIMEOUT_MILLIS);
  }
}

Fixed version (ground truth):
private void startOrientationMeasurement(){
  if (DEBUG)   Slog.d(TAG,"String_Node_Str" + mMeasurementInProgress + "String_Node_Str"+ (mAccelSensor != null));
  if (!mMeasurementInProgress && mAccelSensor != null) {
    if (mSensorManager.registerListener(mListener,mAccelSensor,SAMPLING_INTERVAL_MILLIS * 1000)) {
      mWakeLock.acquire();
      mMeasurementInProgress=true;
      mRunningStats.reset();
    }
    Message msg=Message.obtain(mHandler,mMeasurementTimeout);
    msg.setAsynchronous(true);
    mHandler.sendMessageDelayed(msg,ACCELEROMETER_DATA_TIMEOUT_MILLIS);
  }
}
Program: 193757
Project: 193757
Buggy source:
public AnyMotionDetector(AlarmManager am,PowerManager pm,Handler handler,SensorManager sm,DeviceIdleCallback callback){
  if (DEBUG)   Slog.d(TAG,"String_Node_Str");
  mAlarmManager=am;
  mWakeLock=pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK,TAG);
  mHandler=handler;
  mSensorManager=sm;
  mAccelSensor=mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);
  mMeasurementInProgress=false;
  mState=STATE_INACTIVE;
  mCallback=callback;
  mRunningStats=new RunningSignalStats();
  mNumSufficientSamples=(int)Math.ceil(((double)ORIENTATION_MEASUREMENT_DURATION_MILLIS / SAMPLING_INTERVAL_MILLIS));
  if (DEBUG)   Slog.d(TAG,"String_Node_Str" + mNumSufficientSamples);
}

Fixed version (ground truth):
public AnyMotionDetector(PowerManager pm,Handler handler,SensorManager sm,DeviceIdleCallback callback){
  if (DEBUG)   Slog.d(TAG,"String_Node_Str");
  mWakeLock=pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK,TAG);
  mWakeLock.setReferenceCounted(false);
  mHandler=handler;
  mSensorManager=sm;
  mAccelSensor=mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);
  mMeasurementInProgress=false;
  mState=STATE_INACTIVE;
  mCallback=callback;
  mRunningStats=new RunningSignalStats();
  mNumSufficientSamples=(int)Math.ceil(((double)ORIENTATION_MEASUREMENT_DURATION_MILLIS / SAMPLING_INTERVAL_MILLIS));
  if (DEBUG)   Slog.d(TAG,"String_Node_Str" + mNumSufficientSamples);
}
Program: 193758
Project: 193758
Buggy source:
private void startOrientationMeasurement(){
  if (DEBUG)   Slog.d(TAG,"String_Node_Str" + mMeasurementInProgress + "String_Node_Str"+ (mAccelSensor != null));
  if (!mMeasurementInProgress && mAccelSensor != null) {
    if (mSensorManager.registerListener(mListener,mAccelSensor,SAMPLING_INTERVAL_MILLIS * 1000)) {
      mWakeLock.acquire();
      mMeasurementInProgress=true;
      mDetectionStartTime=SystemClock.elapsedRealtime();
      mRunningStats.reset();
    }
    Message msg=Message.obtain(mHandler,mMeasurementTimeout);
    msg.setAsynchronous(true);
    mHandler.sendMessageDelayed(msg,ACCELEROMETER_DATA_TIMEOUT_MILLIS);
  }
}

Fixed version (ground truth):
private void startOrientationMeasurement(){
  if (DEBUG)   Slog.d(TAG,"String_Node_Str" + mMeasurementInProgress + "String_Node_Str"+ (mAccelSensor != null));
  if (!mMeasurementInProgress && mAccelSensor != null) {
    if (mSensorManager.registerListener(mListener,mAccelSensor,SAMPLING_INTERVAL_MILLIS * 1000)) {
      mWakeLock.acquire();
      mMeasurementInProgress=true;
      mRunningStats.reset();
    }
    Message msg=Message.obtain(mHandler,mMeasurementTimeout);
    msg.setAsynchronous(true);
    mHandler.sendMessageDelayed(msg,ACCELEROMETER_DATA_TIMEOUT_MILLIS);
  }
}
Program: 193760
Project: 193760
Buggy source:
public AnyMotionDetector(AlarmManager am,PowerManager pm,Handler handler,SensorManager sm,DeviceIdleCallback callback){
  if (DEBUG)   Slog.d(TAG,"String_Node_Str");
  mAlarmManager=am;
  mWakeLock=pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK,TAG);
  mHandler=handler;
  mSensorManager=sm;
  mAccelSensor=mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);
  mMeasurementInProgress=false;
  mState=STATE_INACTIVE;
  mCallback=callback;
  mRunningStats=new RunningSignalStats();
  mNumSufficientSamples=(int)Math.ceil(((double)ORIENTATION_MEASUREMENT_DURATION_MILLIS / SAMPLING_INTERVAL_MILLIS));
  if (DEBUG)   Slog.d(TAG,"String_Node_Str" + mNumSufficientSamples);
}

Fixed version (ground truth):
public AnyMotionDetector(PowerManager pm,Handler handler,SensorManager sm,DeviceIdleCallback callback){
  if (DEBUG)   Slog.d(TAG,"String_Node_Str");
  mWakeLock=pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK,TAG);
  mWakeLock.setReferenceCounted(false);
  mHandler=handler;
  mSensorManager=sm;
  mAccelSensor=mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);
  mMeasurementInProgress=false;
  mState=STATE_INACTIVE;
  mCallback=callback;
  mRunningStats=new RunningSignalStats();
  mNumSufficientSamples=(int)Math.ceil(((double)ORIENTATION_MEASUREMENT_DURATION_MILLIS / SAMPLING_INTERVAL_MILLIS));
  if (DEBUG)   Slog.d(TAG,"String_Node_Str" + mNumSufficientSamples);
}
Program: 193761
Project: 193761
Buggy source:
private void startOrientationMeasurement(){
  if (DEBUG)   Slog.d(TAG,"String_Node_Str" + mMeasurementInProgress + "String_Node_Str"+ (mAccelSensor != null));
  if (!mMeasurementInProgress && mAccelSensor != null) {
    if (mSensorManager.registerListener(mListener,mAccelSensor,SAMPLING_INTERVAL_MILLIS * 1000)) {
      mWakeLock.acquire();
      mMeasurementInProgress=true;
      mDetectionStartTime=SystemClock.elapsedRealtime();
      mRunningStats.reset();
    }
    Message msg=Message.obtain(mHandler,mMeasurementTimeout);
    msg.setAsynchronous(true);
    mHandler.sendMessageDelayed(msg,ACCELEROMETER_DATA_TIMEOUT_MILLIS);
  }
}

Fixed version (ground truth):
private void startOrientationMeasurement(){
  if (DEBUG)   Slog.d(TAG,"String_Node_Str" + mMeasurementInProgress + "String_Node_Str"+ (mAccelSensor != null));
  if (!mMeasurementInProgress && mAccelSensor != null) {
    if (mSensorManager.registerListener(mListener,mAccelSensor,SAMPLING_INTERVAL_MILLIS * 1000)) {
      mWakeLock.acquire();
      mMeasurementInProgress=true;
      mRunningStats.reset();
    }
    Message msg=Message.obtain(mHandler,mMeasurementTimeout);
    msg.setAsynchronous(true);
    mHandler.sendMessageDelayed(msg,ACCELEROMETER_DATA_TIMEOUT_MILLIS);
  }
}
Program: 193767
Project: 193767
Buggy source:
void dumpRuntimePermissionsLPr(PrintWriter pw,String prefix,ArraySet<String> permissionNames,List<PermissionState> permissionStates){
  if (!permissionStates.isEmpty()) {
    pw.print(prefix);
    pw.println("String_Node_Str");
    for (    PermissionState permissionState : permissionStates) {
      if (permissionNames != null && !permissionNames.contains(permissionState.getName())) {
        continue;
      }
      pw.print(prefix);
      pw.print("String_Node_Str");
      pw.print(permissionState.getName());
      pw.print("String_Node_Str");
      pw.print(permissionState.isGranted());
      pw.println(permissionFlagsToString("String_Node_Str",permissionState.getFlags()));
    }
  }
}

Fixed version (ground truth):
void dumpRuntimePermissionsLPr(PrintWriter pw,String prefix,ArraySet<String> permissionNames,List<PermissionState> permissionStates,boolean dumpAll){
  if (!permissionStates.isEmpty() || dumpAll) {
    pw.print(prefix);
    pw.println("String_Node_Str");
    for (    PermissionState permissionState : permissionStates) {
      if (permissionNames != null && !permissionNames.contains(permissionState.getName())) {
        continue;
      }
      pw.print(prefix);
      pw.print("String_Node_Str");
      pw.print(permissionState.getName());
      pw.print("String_Node_Str");
      pw.print(permissionState.isGranted());
      pw.println(permissionFlagsToString("String_Node_Str",permissionState.getFlags()));
    }
  }
}