nus-yam/ex-repair huggingface dataset:
Program: 183671
Project: 183671
Buggy source:
protected void onHandleIntent(Intent intent){
  if (REMOTE_INTENT_ACTION.equals(intent.getAction())) {
    boolean fromTrustedServer=intent.getBooleanExtra("String_Node_Str",false);
    if (fromTrustedServer) {
      String accountName=intent.getStringExtra("String_Node_Str");
      String token=intent.getStringExtra("String_Node_Str");
      if (TextUtils.isEmpty(accountName) || TextUtils.isEmpty(token)) {
        if (Config.LOGD) {
          Log.d(TAG,"String_Node_Str");
        }
        return;
      }
      if (Config.LOGD) {
        Log.d(TAG,"String_Node_Str" + accountName + "String_Node_Str"+ token);
      }
      handleTickle(this,accountName,token);
    }
 else {
      if (Log.isLoggable(TAG,Log.VERBOSE)) {
        Log.v(TAG,"String_Node_Str");
      }
    }
  }
 else   if (Intent.ACTION_BOOT_COMPLETED.equals(intent.getAction())) {
    if (Config.LOGD) {
      Log.d(TAG,"String_Node_Str");
    }
    long refreshTime=getSharedPreferences(sSubscribedFeedsPrefs,Context.MODE_WORLD_READABLE).getLong(sRefreshTime,0);
    scheduleRefresh(this,refreshTime);
  }
 else   if (SUBSCRIBED_FEEDS_REFRESH_ACTION.equals(intent.getAction())) {
    if (Config.LOGD) {
      Log.d(TAG,"String_Node_Str");
    }
    handleRefreshAlarm(this);
  }
}

Fixed version (ground truth):
protected void onHandleIntent(Intent intent){
  if (REMOTE_INTENT_ACTION.equals(intent.getAction())) {
    boolean fromTrustedServer=intent.getBooleanExtra("String_Node_Str",false);
    if (fromTrustedServer) {
      String accountName=intent.getStringExtra("String_Node_Str");
      String token=intent.getStringExtra(Intent.EXTRA_REMOTE_INTENT_TOKEN);
      if (TextUtils.isEmpty(accountName) || TextUtils.isEmpty(token)) {
        if (Config.LOGD) {
          Log.d(TAG,"String_Node_Str");
        }
        return;
      }
      if (Config.LOGD) {
        Log.d(TAG,"String_Node_Str" + accountName + "String_Node_Str"+ token);
      }
      handleTickle(this,accountName,token);
    }
 else {
      if (Log.isLoggable(TAG,Log.VERBOSE)) {
        Log.v(TAG,"String_Node_Str");
      }
    }
  }
 else   if (Intent.ACTION_BOOT_COMPLETED.equals(intent.getAction())) {
    if (Config.LOGD) {
      Log.d(TAG,"String_Node_Str");
    }
    long refreshTime=getSharedPreferences(sSubscribedFeedsPrefs,Context.MODE_WORLD_READABLE).getLong(sRefreshTime,0);
    scheduleRefresh(this,refreshTime);
  }
 else   if (SUBSCRIBED_FEEDS_REFRESH_ACTION.equals(intent.getAction())) {
    if (Config.LOGD) {
      Log.d(TAG,"String_Node_Str");
    }
    handleRefreshAlarm(this);
  }
}
Program: 183672
Project: 183672
Buggy source:
/** 
 * goes to the home screen
 * @return whether it did anything
 */
boolean goHome(){
  if (false) {
    mContext.startActivity(mHomeIntent);
  }
 else {
    try {
      int result=ActivityManagerNative.getDefault().startActivity(null,mHomeIntent,mHomeIntent.resolveTypeIfNeeded(mContext.getContentResolver()),null,0,null,null,0,true,false);
      if (result == IActivityManager.START_RETURN_INTENT_TO_CALLER) {
        return false;
      }
    }
 catch (    RemoteException ex) {
    }
  }
  sendCloseSystemWindows();
  return true;
}

Fixed version (ground truth):
/** 
 * goes to the home screen
 * @return whether it did anything
 */
boolean goHome(){
  if (false) {
    try {
      ActivityManagerNative.getDefault().stopAppSwitches();
    }
 catch (    RemoteException e) {
    }
    mContext.startActivity(mHomeIntent);
  }
 else {
    try {
      ActivityManagerNative.getDefault().stopAppSwitches();
      int result=ActivityManagerNative.getDefault().startActivity(null,mHomeIntent,mHomeIntent.resolveTypeIfNeeded(mContext.getContentResolver()),null,0,null,null,0,true,false);
      if (result == IActivityManager.START_RETURN_INTENT_TO_CALLER) {
        return false;
      }
    }
 catch (    RemoteException ex) {
    }
  }
  sendCloseSystemWindows();
  return true;
}
Program: 183673
Project: 183673
Buggy source:
/** 
 * A home key -> launch home action was detected.  Take the appropriate action given the situation with the keyguard.
 */
void launchHomeFromHotKey(){
  if (mKeyguardMediator.isShowing()) {
  }
 else   if (mKeyguardMediator.isInputRestricted()) {
    mKeyguardMediator.verifyUnlock(new OnKeyguardExitResult(){
      public void onKeyguardExitResult(      boolean success){
        if (success) {
          mContext.startActivity(mHomeIntent);
          sendCloseSystemWindows();
        }
      }
    }
);
  }
 else {
    mContext.startActivity(mHomeIntent);
    sendCloseSystemWindows();
  }
}

Fixed version (ground truth):
/** 
 * A home key -> launch home action was detected.  Take the appropriate action given the situation with the keyguard.
 */
void launchHomeFromHotKey(){
  if (mKeyguardMediator.isShowing()) {
  }
 else   if (mKeyguardMediator.isInputRestricted()) {
    mKeyguardMediator.verifyUnlock(new OnKeyguardExitResult(){
      public void onKeyguardExitResult(      boolean success){
        if (success) {
          try {
            ActivityManagerNative.getDefault().stopAppSwitches();
          }
 catch (          RemoteException e) {
          }
          mContext.startActivity(mHomeIntent);
          sendCloseSystemWindows();
        }
      }
    }
);
  }
 else {
    try {
      ActivityManagerNative.getDefault().stopAppSwitches();
    }
 catch (    RemoteException e) {
    }
    mContext.startActivity(mHomeIntent);
    sendCloseSystemWindows();
  }
}
Program: 183674
Project: 183674
Buggy source:
public void onKeyguardExitResult(boolean success){
  if (success) {
    mContext.startActivity(mHomeIntent);
    sendCloseSystemWindows();
  }
}

Fixed version (ground truth):
public void onKeyguardExitResult(boolean success){
  if (success) {
    try {
      ActivityManagerNative.getDefault().stopAppSwitches();
    }
 catch (    RemoteException e) {
    }
    mContext.startActivity(mHomeIntent);
    sendCloseSystemWindows();
  }
}
Program: 183675
Project: 183675
Buggy source:
/** 
 * goes to the home screen
 * @return whether it did anything
 */
boolean goHome(){
  if (false) {
    mContext.startActivity(mHomeIntent);
  }
 else {
    try {
      int result=ActivityManagerNative.getDefault().startActivity(null,mHomeIntent,mHomeIntent.resolveTypeIfNeeded(mContext.getContentResolver()),null,0,null,null,0,true,false);
      if (result == IActivityManager.START_RETURN_INTENT_TO_CALLER) {
        return false;
      }
    }
 catch (    RemoteException ex) {
    }
  }
  sendCloseSystemWindows();
  return true;
}

Fixed version (ground truth):
/** 
 * goes to the home screen
 * @return whether it did anything
 */
boolean goHome(){
  if (false) {
    try {
      ActivityManagerNative.getDefault().stopAppSwitches();
    }
 catch (    RemoteException e) {
    }
    mContext.startActivity(mHomeIntent);
  }
 else {
    try {
      ActivityManagerNative.getDefault().stopAppSwitches();
      int result=ActivityManagerNative.getDefault().startActivity(null,mHomeIntent,mHomeIntent.resolveTypeIfNeeded(mContext.getContentResolver()),null,0,null,null,0,true,false);
      if (result == IActivityManager.START_RETURN_INTENT_TO_CALLER) {
        return false;
      }
    }
 catch (    RemoteException ex) {
    }
  }
  sendCloseSystemWindows();
  return true;
}
Program: 183676
Project: 183676
Buggy source:
/** 
 * A home key -> launch home action was detected.  Take the appropriate action given the situation with the keyguard.
 */
void launchHomeFromHotKey(){
  if (mKeyguardMediator.isShowing()) {
  }
 else   if (mKeyguardMediator.isInputRestricted()) {
    mKeyguardMediator.verifyUnlock(new OnKeyguardExitResult(){
      public void onKeyguardExitResult(      boolean success){
        if (success) {
          mContext.startActivity(mHomeIntent);
          sendCloseSystemWindows();
        }
      }
    }
);
  }
 else {
    mContext.startActivity(mHomeIntent);
    sendCloseSystemWindows();
  }
}

Fixed version (ground truth):
/** 
 * A home key -> launch home action was detected.  Take the appropriate action given the situation with the keyguard.
 */
void launchHomeFromHotKey(){
  if (mKeyguardMediator.isShowing()) {
  }
 else   if (mKeyguardMediator.isInputRestricted()) {
    mKeyguardMediator.verifyUnlock(new OnKeyguardExitResult(){
      public void onKeyguardExitResult(      boolean success){
        if (success) {
          try {
            ActivityManagerNative.getDefault().stopAppSwitches();
          }
 catch (          RemoteException e) {
          }
          mContext.startActivity(mHomeIntent);
          sendCloseSystemWindows();
        }
      }
    }
);
  }
 else {
    try {
      ActivityManagerNative.getDefault().stopAppSwitches();
    }
 catch (    RemoteException e) {
    }
    mContext.startActivity(mHomeIntent);
    sendCloseSystemWindows();
  }
}
Program: 183677
Project: 183677
Buggy source:
public void onKeyguardExitResult(boolean success){
  if (success) {
    mContext.startActivity(mHomeIntent);
    sendCloseSystemWindows();
  }
}

Fixed version (ground truth):
public void onKeyguardExitResult(boolean success){
  if (success) {
    try {
      ActivityManagerNative.getDefault().stopAppSwitches();
    }
 catch (    RemoteException e) {
    }
    mContext.startActivity(mHomeIntent);
    sendCloseSystemWindows();
  }
}
Program: 183678
Project: 183678
Buggy source:
private void runStart(){
  Intent intent=makeIntent();
  if (intent != null) {
    System.out.println("String_Node_Str" + intent);
    try {
      intent.addFlags(intent.FLAG_ACTIVITY_NEW_TASK);
      int res=mAm.startActivity(null,intent,intent.getType(),null,0,null,null,0,false,mDebugOption);
switch (res) {
case IActivityManager.START_SUCCESS:
        break;
case IActivityManager.START_CLASS_NOT_FOUND:
      System.err.println("String_Node_Str");
    System.err.println("String_Node_Str" + intent.getComponent().toShortString() + "String_Node_Str");
  break;
case IActivityManager.START_DELIVERED_TO_TOP:
System.err.println("String_Node_Str" + "String_Node_Str" + "String_Node_Str");
break;
case IActivityManager.START_FORWARD_AND_REQUEST_CONFLICT:
System.err.println("String_Node_Str" + "String_Node_Str");
break;
case IActivityManager.START_INTENT_NOT_RESOLVED:
System.err.println("String_Node_Str" + "String_Node_Str" + intent.toString());
break;
case IActivityManager.START_RETURN_INTENT_TO_CALLER:
System.err.println("String_Node_Str" + "String_Node_Str");
break;
case IActivityManager.START_TASK_TO_FRONT:
System.err.println("String_Node_Str" + "String_Node_Str");
break;
default :
System.err.println("String_Node_Str" + "String_Node_Str" + res);
break;
}
}
 catch (RemoteException e) {
System.err.println("String_Node_Str");
System.err.println("String_Node_Str" + "String_Node_Str");
}
}
}

Fixed version (ground truth):
private void runStart(){
  Intent intent=makeIntent();
  if (intent != null) {
    System.out.println("String_Node_Str" + intent);
    try {
      intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
      int res=mAm.startActivity(null,intent,intent.getType(),null,0,null,null,0,false,mDebugOption);
switch (res) {
case IActivityManager.START_SUCCESS:
        break;
case IActivityManager.START_SWITCHES_CANCELED:
      System.err.println("String_Node_Str" + "String_Node_Str");
    break;
case IActivityManager.START_DELIVERED_TO_TOP:
  System.err.println("String_Node_Str" + "String_Node_Str" + "String_Node_Str");
break;
case IActivityManager.START_RETURN_INTENT_TO_CALLER:
System.err.println("String_Node_Str" + "String_Node_Str");
break;
case IActivityManager.START_TASK_TO_FRONT:
System.err.println("String_Node_Str" + "String_Node_Str");
break;
case IActivityManager.START_INTENT_NOT_RESOLVED:
System.err.println("String_Node_Str" + "String_Node_Str" + intent.toString());
break;
case IActivityManager.START_CLASS_NOT_FOUND:
System.err.println("String_Node_Str");
System.err.println("String_Node_Str" + intent.getComponent().toShortString() + "String_Node_Str");
break;
case IActivityManager.START_FORWARD_AND_REQUEST_CONFLICT:
System.err.println("String_Node_Str" + "String_Node_Str");
break;
case IActivityManager.START_PERMISSION_DENIED:
System.err.println("String_Node_Str" + "String_Node_Str");
break;
default :
System.err.println("String_Node_Str" + "String_Node_Str" + res);
break;
}
}
 catch (RemoteException e) {
System.err.println("String_Node_Str");
System.err.println("String_Node_Str" + "String_Node_Str");
}
}
}
Program: 183680
Project: 183680
Buggy source:
/** 
 * <p> Call mDb.endTransaction(). If successful is true, try to call mDb.setTransactionSuccessful() before calling mDb.endTransaction(). This method MUST be used with   {@link #beginBatch()}. </p>
 * @hide This method must be used with {@link #beginTransaction}
 */
public final void endBatch(boolean successful){
  try {
    if (successful) {
      mDb.setTransactionSuccessful();
    }
  }
  finally {
    mApplyingBatch.set(false);
    getDatabase().endTransaction();
    for (    Uri url : mPendingBatchNotifications.get()) {
      getContext().getContentResolver().notifyChange(url,null,changeRequiresLocalSync(url));
    }
    mDb.endTransaction();
  }
}

Fixed version (ground truth):
/** 
 * <p> Finish batch transaction. If "successful" is true, try to call mDb.setTransactionSuccessful() before calling mDb.endTransaction(). This method MUST be used with   {@link #beginBatch()}. </p>
 * @hide This method must be used with {@link #beginTransaction}
 */
public final void endBatch(boolean successful){
  try {
    if (successful) {
      mDb.setTransactionSuccessful();
    }
  }
  finally {
    mApplyingBatch.set(false);
    getDatabase().endTransaction();
    for (    Uri url : mPendingBatchNotifications.get()) {
      getContext().getContentResolver().notifyChange(url,null,changeRequiresLocalSync(url));
    }
  }
}
Program: 183681
Project: 183681
Buggy source:
/** 
 * <p> Call mOpenHelper.getWritableDatabase() and mDb.beginTransaction().  {@link #endTransaction} MUST be called after calling this method.Those methods should be used like this: </p> <pre class="prettyprint"> boolean successful = false; if (!beginTransaction()) { return; } try { // Do something related to mDb successful = true; return ret; } finally { endTransaction(successful); } </pre>
 * @hide This method should be used only when {@link #applyBatch} is not enough and must beused with  {@link #endTransaction}. e.g. If returned value has to be used during one transaction, this method might be useful.
 */
public final void beginBatch(){
  if (mApplyingBatch.get() == null) {
    mApplyingBatch.set(false);
    mPendingBatchNotifications.set(new HashSet<Uri>());
  }
  if (applyingBatch()) {
    throw new IllegalStateException("String_Node_Str");
  }
  SQLiteDatabase db=getDatabase();
  db.beginTransaction();
  boolean successful=false;
  try {
    mApplyingBatch.set(true);
    successful=true;
  }
  finally {
    if (!successful) {
      db.endTransaction();
    }
  }
}

Fixed version (ground truth):
/** 
 * <p> Start batch transaction.   {@link #endTransaction} MUST be called after calling this method. Those methods should be used like this: </p> <pre class="prettyprint"> boolean successful = false; beginBatch() try { // Do something related to mDb successful = true; return ret; } finally { endBatch(successful); } </pre>
 * @hide This method should be used only when {@link #applyBatch} is not enough and must beused with  {@link #endBatch}. e.g. If returned value has to be used during one transaction, this method might be useful.
 */
public final void beginBatch(){
  if (mApplyingBatch.get() == null) {
    mApplyingBatch.set(false);
    mPendingBatchNotifications.set(new HashSet<Uri>());
  }
  if (applyingBatch()) {
    throw new IllegalStateException("String_Node_Str");
  }
  SQLiteDatabase db=getDatabase();
  db.beginTransaction();
  boolean successful=false;
  try {
    mApplyingBatch.set(true);
    successful=true;
  }
  finally {
    if (!successful) {
      db.endTransaction();
    }
  }
}
Program: 183683
Project: 183683
Buggy source:
static void addFileType(String extension,int fileType,String mimeType){
  sFileTypeMap.put(extension,new MediaFileType(fileType,mimeType));
  sMimeTypeMap.put(mimeType,new Integer(fileType));
}

Fixed version (ground truth):
static void addFileType(String extension,int fileType,String mimeType){
  sFileTypeMap.put(extension,new MediaFileType(fileType,mimeType));
  sMimeTypeMap.put(mimeType,Integer.valueOf(fileType));
}
Program: 183685
Project: 183685
Buggy source:
void setLayoutParams(WindowManager.LayoutParams attrs,boolean newView){
synchronized (this) {
    int oldSoftInputMode=mWindowAttributes.softInputMode;
    mWindowAttributes.copyFrom(attrs);
    mWindowAttributes.scale(mAppScale);
    if (newView) {
      mSoftInputMode=attrs.softInputMode;
      requestLayout();
    }
    if ((attrs.softInputMode & WindowManager.LayoutParams.SOFT_INPUT_MASK_ADJUST) == WindowManager.LayoutParams.SOFT_INPUT_ADJUST_UNSPECIFIED) {
      mWindowAttributes.softInputMode=(mWindowAttributes.softInputMode & ~WindowManager.LayoutParams.SOFT_INPUT_MASK_ADJUST) | (oldSoftInputMode & WindowManager.LayoutParams.SOFT_INPUT_MASK_ADJUST);
    }
    mWindowAttributesChanged=true;
    scheduleTraversals();
  }
}

Fixed version (ground truth):
void setLayoutParams(WindowManager.LayoutParams attrs,boolean newView){
synchronized (this) {
    int oldSoftInputMode=mWindowAttributes.softInputMode;
    mWindowAttributes.copyFrom(attrs);
    if (newView) {
      mSoftInputMode=attrs.softInputMode;
      requestLayout();
    }
    if ((attrs.softInputMode & WindowManager.LayoutParams.SOFT_INPUT_MASK_ADJUST) == WindowManager.LayoutParams.SOFT_INPUT_ADJUST_UNSPECIFIED) {
      mWindowAttributes.softInputMode=(mWindowAttributes.softInputMode & ~WindowManager.LayoutParams.SOFT_INPUT_MASK_ADJUST) | (oldSoftInputMode & WindowManager.LayoutParams.SOFT_INPUT_MASK_ADJUST);
    }
    mWindowAttributesChanged=true;
    scheduleTraversals();
  }
}
Program: 183686
Project: 183686
Buggy source:
private int relayoutWindow(WindowManager.LayoutParams params,int viewVisibility,boolean insetsPending) throws RemoteException {
  int relayoutResult=sWindowSession.relayout(mWindow,params,(int)(mView.mMeasuredWidth * mAppScale),(int)(mView.mMeasuredHeight * mAppScale),viewVisibility,insetsPending,mWinFrame,mPendingContentInsets,mPendingVisibleInsets,mSurface);
  mPendingContentInsets.scale(mAppScaleInverted);
  mPendingVisibleInsets.scale(mAppScaleInverted);
  mWinFrame.scale(mAppScaleInverted);
  return relayoutResult;
}

Fixed version (ground truth):
private int relayoutWindow(WindowManager.LayoutParams params,int viewVisibility,boolean insetsPending) throws RemoteException {
  boolean restore=false;
  if (params != null && mAppScale != 1.0f) {
    restore=true;
    params.scale(mAppScale,mWindowLayoutParamsBackup);
  }
  int relayoutResult=sWindowSession.relayout(mWindow,params,(int)(mView.mMeasuredWidth * mAppScale),(int)(mView.mMeasuredHeight * mAppScale),viewVisibility,insetsPending,mWinFrame,mPendingContentInsets,mPendingVisibleInsets,mSurface);
  if (restore) {
    params.restore(mWindowLayoutParamsBackup);
  }
  mPendingContentInsets.scale(mAppScaleInverted);
  mPendingVisibleInsets.scale(mAppScaleInverted);
  mWinFrame.scale(mAppScaleInverted);
  return relayoutResult;
}
Program: 183688
Project: 183688
Buggy source:
void scale(float scale){
  if (scale != 1.0f) {
    x*=scale;
    y*=scale;
    if (width > 0) {
      width*=scale;
    }
    if (height > 0) {
      height*=scale;
    }
  }
}

Fixed version (ground truth):
/** 
 * Scale the layout params' coordinates and size. Returns the original info as a backup so that the caller can restore the layout params;
 */
void scale(float scale,int[] backup){
  if (scale != 1.0f) {
    backup[0]=x;
    backup[1]=y;
    x*=scale;
    y*=scale;
    if (width > 0) {
      backup[2]=width;
      width*=scale;
    }
    if (height > 0) {
      backup[3]=height;
      height*=scale;
    }
  }
}
Program: 183691
Project: 183691
Buggy source:
public void setSyncProviderAutomatically(String account,String providerName,boolean sync){
synchronized (mAuthorities) {
    if (account != null) {
      AuthorityInfo authority=getAuthorityLocked(account,providerName,"String_Node_Str");
      if (authority != null) {
        authority.enabled=sync;
      }
    }
 else {
      int i=mAuthorities.size();
      while (i > 0) {
        i--;
        AuthorityInfo authority=mAuthorities.get(i);
        if (authority.account.equals(account) && authority.authority.equals(providerName)) {
          authority.enabled=sync;
        }
      }
    }
    writeAccountInfoLocked();
  }
  reportChange(CHANGE_SETTINGS);
}

Fixed version (ground truth):
public void setSyncProviderAutomatically(String account,String providerName,boolean sync){
synchronized (mAuthorities) {
    if (account != null) {
      AuthorityInfo authority=getAuthorityLocked(account,providerName,"String_Node_Str");
      if (authority != null) {
        authority.enabled=sync;
      }
    }
 else {
      int i=mAuthorities.size();
      while (i > 0) {
        i--;
        AuthorityInfo authority=mAuthorities.get(i);
        if (authority.authority.equals(providerName)) {
          authority.enabled=sync;
        }
      }
    }
    writeAccountInfoLocked();
  }
  reportChange(CHANGE_SETTINGS);
}
Program: 183692
Project: 183692
Buggy source:
private final List generateApplicationProvidersLocked(ProcessRecord app){
  List providers=null;
  try {
    providers=ActivityThread.getPackageManager().queryContentProviders(app.processName,app.info.uid,PackageManager.GET_SHARED_LIBRARY_FILES | PackageManager.GET_URI_PERMISSION_PATTERNS);
  }
 catch (  RemoteException ex) {
  }
  if (providers != null) {
    final int N=providers.size();
    for (int i=0; i < N; i++) {
      ProviderInfo cpi=(ProviderInfo)providers.get(i);
      ContentProviderRecord cpr=(ContentProviderRecord)mProvidersByClass.get(cpi.name);
      if (cpr == null) {
        cpr=new ContentProviderRecord(cpi,app.info);
        mProvidersByClass.put(cpi.name,cpr);
      }
      app.pubProviders.put(cpi.name,cpr);
      app.addPackage(cpi.applicationInfo.packageName);
    }
  }
  return providers;
}

Fixed version (ground truth):
private final List generateApplicationProvidersLocked(ProcessRecord app){
  List providers=null;
  try {
    providers=ActivityThread.getPackageManager().queryContentProviders(app.processName,app.info.uid,STOCK_PM_FLAGS | PackageManager.GET_URI_PERMISSION_PATTERNS);
  }
 catch (  RemoteException ex) {
  }
  if (providers != null) {
    final int N=providers.size();
    for (int i=0; i < N; i++) {
      ProviderInfo cpi=(ProviderInfo)providers.get(i);
      ContentProviderRecord cpr=(ContentProviderRecord)mProvidersByClass.get(cpi.name);
      if (cpr == null) {
        cpr=new ContentProviderRecord(cpi,app.info);
        mProvidersByClass.put(cpi.name,cpr);
      }
      app.pubProviders.put(cpi.name,cpr);
      app.addPackage(cpi.applicationInfo.packageName);
    }
  }
  return providers;
}
Program: 183696
Project: 183696
Buggy source:
void finishInstrumentationLocked(ProcessRecord app,int resultCode,Bundle results){
  if (app.instrumentationWatcher != null) {
    try {
      app.instrumentationWatcher.instrumentationFinished(app.instrumentationClass,resultCode,results);
    }
 catch (    RemoteException e) {
    }
  }
  app.instrumentationWatcher=null;
  app.instrumentationClass=null;
  app.instrumentationProfileFile=null;
  app.instrumentationArguments=null;
  uninstallPackageLocked(app.processName,-1,false);
}

Fixed version (ground truth):
void finishInstrumentationLocked(ProcessRecord app,int resultCode,Bundle results){
  if (app.instrumentationWatcher != null) {
    try {
      app.instrumentationWatcher.instrumentationFinished(app.instrumentationClass,resultCode,results);
    }
 catch (    RemoteException e) {
    }
  }
  app.instrumentationWatcher=null;
  app.instrumentationClass=null;
  app.instrumentationInfo=null;
  app.instrumentationProfileFile=null;
  app.instrumentationArguments=null;
  uninstallPackageLocked(app.processName,-1,false);
}
Program: 183697
Project: 183697
Buggy source:
final int startActivityInPackage(int uid,Intent intent,String resolvedType,IBinder resultTo,String resultWho,int requestCode,boolean onlyIfNeeded){
  final boolean componentSpecified=intent.getComponent() != null;
  intent=new Intent(intent);
  ActivityInfo aInfo;
  try {
    ResolveInfo rInfo=ActivityThread.getPackageManager().resolveIntent(intent,resolvedType,PackageManager.MATCH_DEFAULT_ONLY | PackageManager.GET_SHARED_LIBRARY_FILES);
    aInfo=rInfo != null ? rInfo.activityInfo : null;
  }
 catch (  RemoteException e) {
    aInfo=null;
  }
  if (aInfo != null) {
    intent.setComponent(new ComponentName(aInfo.applicationInfo.packageName,aInfo.name));
  }
synchronized (this) {
    return startActivityLocked(null,intent,resolvedType,null,0,aInfo,resultTo,resultWho,requestCode,-1,uid,onlyIfNeeded,componentSpecified);
  }
}

Fixed version (ground truth):
final int startActivityInPackage(int uid,Intent intent,String resolvedType,IBinder resultTo,String resultWho,int requestCode,boolean onlyIfNeeded){
  final boolean componentSpecified=intent.getComponent() != null;
  intent=new Intent(intent);
  ActivityInfo aInfo;
  try {
    ResolveInfo rInfo=ActivityThread.getPackageManager().resolveIntent(intent,resolvedType,PackageManager.MATCH_DEFAULT_ONLY | STOCK_PM_FLAGS);
    aInfo=rInfo != null ? rInfo.activityInfo : null;
  }
 catch (  RemoteException e) {
    aInfo=null;
  }
  if (aInfo != null) {
    intent.setComponent(new ComponentName(aInfo.applicationInfo.packageName,aInfo.name));
  }
synchronized (this) {
    return startActivityLocked(null,intent,resolvedType,null,0,aInfo,resultTo,resultWho,requestCode,-1,uid,onlyIfNeeded,componentSpecified);
  }
}
Program: 183698
Project: 183698
Buggy source:
public static void setSystemProcess(){
  try {
    ActivityManagerService m=mSelf;
    ServiceManager.addService("String_Node_Str",m);
    ServiceManager.addService("String_Node_Str",new MemBinder(m));
    if (MONITOR_CPU_USAGE) {
      ServiceManager.addService("String_Node_Str",new CpuBinder(m));
    }
    ServiceManager.addService("String_Node_Str",new BroadcastsBinder(m));
    ServiceManager.addService("String_Node_Str",new ServicesBinder(m));
    ServiceManager.addService("String_Node_Str",new SendersBinder(m));
    ServiceManager.addService("String_Node_Str",new ProvidersBinder(m));
    ServiceManager.addService("String_Node_Str",new PermissionController(m));
    ApplicationInfo info=mSelf.mContext.getPackageManager().getApplicationInfo("String_Node_Str",PackageManager.GET_SHARED_LIBRARY_FILES);
synchronized (mSelf) {
      ProcessRecord app=mSelf.newProcessRecordLocked(mSystemThread.getApplicationThread(),info,info.processName);
      app.persistent=true;
      app.pid=Process.myPid();
      app.maxAdj=SYSTEM_ADJ;
      mSelf.mProcessNames.put(app.processName,app.info.uid,app);
synchronized (mSelf.mPidsSelfLocked) {
        mSelf.mPidsSelfLocked.put(app.pid,app);
      }
      mSelf.updateLRUListLocked(app,true);
    }
  }
 catch (  PackageManager.NameNotFoundException e) {
    throw new RuntimeException("String_Node_Str",e);
  }
}

Fixed version (ground truth):
public static void setSystemProcess(){
  try {
    ActivityManagerService m=mSelf;
    ServiceManager.addService("String_Node_Str",m);
    ServiceManager.addService("String_Node_Str",new MemBinder(m));
    if (MONITOR_CPU_USAGE) {
      ServiceManager.addService("String_Node_Str",new CpuBinder(m));
    }
    ServiceManager.addService("String_Node_Str",new BroadcastsBinder(m));
    ServiceManager.addService("String_Node_Str",new ServicesBinder(m));
    ServiceManager.addService("String_Node_Str",new SendersBinder(m));
    ServiceManager.addService("String_Node_Str",new ProvidersBinder(m));
    ServiceManager.addService("String_Node_Str",new PermissionController(m));
    ApplicationInfo info=mSelf.mContext.getPackageManager().getApplicationInfo("String_Node_Str",STOCK_PM_FLAGS);
synchronized (mSelf) {
      ProcessRecord app=mSelf.newProcessRecordLocked(mSystemThread.getApplicationThread(),info,info.processName);
      app.persistent=true;
      app.pid=Process.myPid();
      app.maxAdj=SYSTEM_ADJ;
      mSelf.mProcessNames.put(app.processName,app.info.uid,app);
synchronized (mSelf.mPidsSelfLocked) {
        mSelf.mPidsSelfLocked.put(app.pid,app);
      }
      mSelf.updateLRUListLocked(app,true);
    }
  }
 catch (  PackageManager.NameNotFoundException e) {
    throw new RuntimeException("String_Node_Str",e);
  }
}
Program: 183699
Project: 183699
Buggy source:
public final int startActivity(IApplicationThread caller,Intent intent,String resolvedType,Uri[] grantedUriPermissions,int grantedMode,IBinder resultTo,String resultWho,int requestCode,boolean onlyIfNeeded,boolean debug){
  if (intent != null && intent.hasFileDescriptors()) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  final boolean componentSpecified=intent.getComponent() != null;
  intent=new Intent(intent);
  ActivityInfo aInfo;
  try {
    ResolveInfo rInfo=ActivityThread.getPackageManager().resolveIntent(intent,resolvedType,PackageManager.MATCH_DEFAULT_ONLY | PackageManager.GET_SHARED_LIBRARY_FILES);
    aInfo=rInfo != null ? rInfo.activityInfo : null;
  }
 catch (  RemoteException e) {
    aInfo=null;
  }
  if (aInfo != null) {
    intent.setComponent(new ComponentName(aInfo.applicationInfo.packageName,aInfo.name));
    if (debug) {
      if (!aInfo.processName.equals("String_Node_Str")) {
        setDebugApp(aInfo.processName,true,false);
      }
    }
  }
synchronized (this) {
    final long origId=Binder.clearCallingIdentity();
    int res=startActivityLocked(caller,intent,resolvedType,grantedUriPermissions,grantedMode,aInfo,resultTo,resultWho,requestCode,-1,-1,onlyIfNeeded,componentSpecified);
    Binder.restoreCallingIdentity(origId);
    return res;
  }
}

Fixed version (ground truth):
public final int startActivity(IApplicationThread caller,Intent intent,String resolvedType,Uri[] grantedUriPermissions,int grantedMode,IBinder resultTo,String resultWho,int requestCode,boolean onlyIfNeeded,boolean debug){
  if (intent != null && intent.hasFileDescriptors()) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  final boolean componentSpecified=intent.getComponent() != null;
  intent=new Intent(intent);
  ActivityInfo aInfo;
  try {
    ResolveInfo rInfo=ActivityThread.getPackageManager().resolveIntent(intent,resolvedType,PackageManager.MATCH_DEFAULT_ONLY | STOCK_PM_FLAGS);
    aInfo=rInfo != null ? rInfo.activityInfo : null;
  }
 catch (  RemoteException e) {
    aInfo=null;
  }
  if (aInfo != null) {
    intent.setComponent(new ComponentName(aInfo.applicationInfo.packageName,aInfo.name));
    if (debug) {
      if (!aInfo.processName.equals("String_Node_Str")) {
        setDebugApp(aInfo.processName,true,false);
      }
    }
  }
synchronized (this) {
    final long origId=Binder.clearCallingIdentity();
    int res=startActivityLocked(caller,intent,resolvedType,grantedUriPermissions,grantedMode,aInfo,resultTo,resultWho,requestCode,-1,-1,onlyIfNeeded,componentSpecified);
    Binder.restoreCallingIdentity(origId);
    return res;
  }
}
Program: 183706
Project: 183706
Buggy source:
private final List generateApplicationProvidersLocked(ProcessRecord app){
  List providers=null;
  try {
    providers=ActivityThread.getPackageManager().queryContentProviders(app.processName,app.info.uid,PackageManager.GET_SHARED_LIBRARY_FILES | PackageManager.GET_URI_PERMISSION_PATTERNS);
  }
 catch (  RemoteException ex) {
  }
  if (providers != null) {
    final int N=providers.size();
    for (int i=0; i < N; i++) {
      ProviderInfo cpi=(ProviderInfo)providers.get(i);
      ContentProviderRecord cpr=(ContentProviderRecord)mProvidersByClass.get(cpi.name);
      if (cpr == null) {
        cpr=new ContentProviderRecord(cpi,app.info);
        mProvidersByClass.put(cpi.name,cpr);
      }
      app.pubProviders.put(cpi.name,cpr);
      app.addPackage(cpi.applicationInfo.packageName);
    }
  }
  return providers;
}

Fixed version (ground truth):
private final List generateApplicationProvidersLocked(ProcessRecord app){
  List providers=null;
  try {
    providers=ActivityThread.getPackageManager().queryContentProviders(app.processName,app.info.uid,STOCK_PM_FLAGS | PackageManager.GET_URI_PERMISSION_PATTERNS);
  }
 catch (  RemoteException ex) {
  }
  if (providers != null) {
    final int N=providers.size();
    for (int i=0; i < N; i++) {
      ProviderInfo cpi=(ProviderInfo)providers.get(i);
      ContentProviderRecord cpr=(ContentProviderRecord)mProvidersByClass.get(cpi.name);
      if (cpr == null) {
        cpr=new ContentProviderRecord(cpi,app.info);
        mProvidersByClass.put(cpi.name,cpr);
      }
      app.pubProviders.put(cpi.name,cpr);
      app.addPackage(cpi.applicationInfo.packageName);
    }
  }
  return providers;
}
Program: 183710
Project: 183710
Buggy source:
void finishInstrumentationLocked(ProcessRecord app,int resultCode,Bundle results){
  if (app.instrumentationWatcher != null) {
    try {
      app.instrumentationWatcher.instrumentationFinished(app.instrumentationClass,resultCode,results);
    }
 catch (    RemoteException e) {
    }
  }
  app.instrumentationWatcher=null;
  app.instrumentationClass=null;
  app.instrumentationProfileFile=null;
  app.instrumentationArguments=null;
  uninstallPackageLocked(app.processName,-1,false);
}

Fixed version (ground truth):
void finishInstrumentationLocked(ProcessRecord app,int resultCode,Bundle results){
  if (app.instrumentationWatcher != null) {
    try {
      app.instrumentationWatcher.instrumentationFinished(app.instrumentationClass,resultCode,results);
    }
 catch (    RemoteException e) {
    }
  }
  app.instrumentationWatcher=null;
  app.instrumentationClass=null;
  app.instrumentationInfo=null;
  app.instrumentationProfileFile=null;
  app.instrumentationArguments=null;
  uninstallPackageLocked(app.processName,-1,false);
}
Program: 183711
Project: 183711
Buggy source:
final int startActivityInPackage(int uid,Intent intent,String resolvedType,IBinder resultTo,String resultWho,int requestCode,boolean onlyIfNeeded){
  final boolean componentSpecified=intent.getComponent() != null;
  intent=new Intent(intent);
  ActivityInfo aInfo;
  try {
    ResolveInfo rInfo=ActivityThread.getPackageManager().resolveIntent(intent,resolvedType,PackageManager.MATCH_DEFAULT_ONLY | PackageManager.GET_SHARED_LIBRARY_FILES);
    aInfo=rInfo != null ? rInfo.activityInfo : null;
  }
 catch (  RemoteException e) {
    aInfo=null;
  }
  if (aInfo != null) {
    intent.setComponent(new ComponentName(aInfo.applicationInfo.packageName,aInfo.name));
  }
synchronized (this) {
    return startActivityLocked(null,intent,resolvedType,null,0,aInfo,resultTo,resultWho,requestCode,-1,uid,onlyIfNeeded,componentSpecified);
  }
}

Fixed version (ground truth):
final int startActivityInPackage(int uid,Intent intent,String resolvedType,IBinder resultTo,String resultWho,int requestCode,boolean onlyIfNeeded){
  final boolean componentSpecified=intent.getComponent() != null;
  intent=new Intent(intent);
  ActivityInfo aInfo;
  try {
    ResolveInfo rInfo=ActivityThread.getPackageManager().resolveIntent(intent,resolvedType,PackageManager.MATCH_DEFAULT_ONLY | STOCK_PM_FLAGS);
    aInfo=rInfo != null ? rInfo.activityInfo : null;
  }
 catch (  RemoteException e) {
    aInfo=null;
  }
  if (aInfo != null) {
    intent.setComponent(new ComponentName(aInfo.applicationInfo.packageName,aInfo.name));
  }
synchronized (this) {
    return startActivityLocked(null,intent,resolvedType,null,0,aInfo,resultTo,resultWho,requestCode,-1,uid,onlyIfNeeded,componentSpecified);
  }
}
Program: 183712
Project: 183712
Buggy source:
public static void setSystemProcess(){
  try {
    ActivityManagerService m=mSelf;
    ServiceManager.addService("String_Node_Str",m);
    ServiceManager.addService("String_Node_Str",new MemBinder(m));
    if (MONITOR_CPU_USAGE) {
      ServiceManager.addService("String_Node_Str",new CpuBinder(m));
    }
    ServiceManager.addService("String_Node_Str",new BroadcastsBinder(m));
    ServiceManager.addService("String_Node_Str",new ServicesBinder(m));
    ServiceManager.addService("String_Node_Str",new SendersBinder(m));
    ServiceManager.addService("String_Node_Str",new ProvidersBinder(m));
    ServiceManager.addService("String_Node_Str",new PermissionController(m));
    ApplicationInfo info=mSelf.mContext.getPackageManager().getApplicationInfo("String_Node_Str",PackageManager.GET_SHARED_LIBRARY_FILES);
synchronized (mSelf) {
      ProcessRecord app=mSelf.newProcessRecordLocked(mSystemThread.getApplicationThread(),info,info.processName);
      app.persistent=true;
      app.pid=Process.myPid();
      app.maxAdj=SYSTEM_ADJ;
      mSelf.mProcessNames.put(app.processName,app.info.uid,app);
synchronized (mSelf.mPidsSelfLocked) {
        mSelf.mPidsSelfLocked.put(app.pid,app);
      }
      mSelf.updateLRUListLocked(app,true);
    }
  }
 catch (  PackageManager.NameNotFoundException e) {
    throw new RuntimeException("String_Node_Str",e);
  }
}

Fixed version (ground truth):
public static void setSystemProcess(){
  try {
    ActivityManagerService m=mSelf;
    ServiceManager.addService("String_Node_Str",m);
    ServiceManager.addService("String_Node_Str",new MemBinder(m));
    if (MONITOR_CPU_USAGE) {
      ServiceManager.addService("String_Node_Str",new CpuBinder(m));
    }
    ServiceManager.addService("String_Node_Str",new BroadcastsBinder(m));
    ServiceManager.addService("String_Node_Str",new ServicesBinder(m));
    ServiceManager.addService("String_Node_Str",new SendersBinder(m));
    ServiceManager.addService("String_Node_Str",new ProvidersBinder(m));
    ServiceManager.addService("String_Node_Str",new PermissionController(m));
    ApplicationInfo info=mSelf.mContext.getPackageManager().getApplicationInfo("String_Node_Str",STOCK_PM_FLAGS);
synchronized (mSelf) {
      ProcessRecord app=mSelf.newProcessRecordLocked(mSystemThread.getApplicationThread(),info,info.processName);
      app.persistent=true;
      app.pid=Process.myPid();
      app.maxAdj=SYSTEM_ADJ;
      mSelf.mProcessNames.put(app.processName,app.info.uid,app);
synchronized (mSelf.mPidsSelfLocked) {
        mSelf.mPidsSelfLocked.put(app.pid,app);
      }
      mSelf.updateLRUListLocked(app,true);
    }
  }
 catch (  PackageManager.NameNotFoundException e) {
    throw new RuntimeException("String_Node_Str",e);
  }
}
Program: 183713
Project: 183713
Buggy source:
public final int startActivity(IApplicationThread caller,Intent intent,String resolvedType,Uri[] grantedUriPermissions,int grantedMode,IBinder resultTo,String resultWho,int requestCode,boolean onlyIfNeeded,boolean debug){
  if (intent != null && intent.hasFileDescriptors()) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  final boolean componentSpecified=intent.getComponent() != null;
  intent=new Intent(intent);
  ActivityInfo aInfo;
  try {
    ResolveInfo rInfo=ActivityThread.getPackageManager().resolveIntent(intent,resolvedType,PackageManager.MATCH_DEFAULT_ONLY | PackageManager.GET_SHARED_LIBRARY_FILES);
    aInfo=rInfo != null ? rInfo.activityInfo : null;
  }
 catch (  RemoteException e) {
    aInfo=null;
  }
  if (aInfo != null) {
    intent.setComponent(new ComponentName(aInfo.applicationInfo.packageName,aInfo.name));
    if (debug) {
      if (!aInfo.processName.equals("String_Node_Str")) {
        setDebugApp(aInfo.processName,true,false);
      }
    }
  }
synchronized (this) {
    final long origId=Binder.clearCallingIdentity();
    int res=startActivityLocked(caller,intent,resolvedType,grantedUriPermissions,grantedMode,aInfo,resultTo,resultWho,requestCode,-1,-1,onlyIfNeeded,componentSpecified);
    Binder.restoreCallingIdentity(origId);
    return res;
  }
}

Fixed version (ground truth):
public final int startActivity(IApplicationThread caller,Intent intent,String resolvedType,Uri[] grantedUriPermissions,int grantedMode,IBinder resultTo,String resultWho,int requestCode,boolean onlyIfNeeded,boolean debug){
  if (intent != null && intent.hasFileDescriptors()) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  final boolean componentSpecified=intent.getComponent() != null;
  intent=new Intent(intent);
  ActivityInfo aInfo;
  try {
    ResolveInfo rInfo=ActivityThread.getPackageManager().resolveIntent(intent,resolvedType,PackageManager.MATCH_DEFAULT_ONLY | STOCK_PM_FLAGS);
    aInfo=rInfo != null ? rInfo.activityInfo : null;
  }
 catch (  RemoteException e) {
    aInfo=null;
  }
  if (aInfo != null) {
    intent.setComponent(new ComponentName(aInfo.applicationInfo.packageName,aInfo.name));
    if (debug) {
      if (!aInfo.processName.equals("String_Node_Str")) {
        setDebugApp(aInfo.processName,true,false);
      }
    }
  }
synchronized (this) {
    final long origId=Binder.clearCallingIdentity();
    int res=startActivityLocked(caller,intent,resolvedType,grantedUriPermissions,grantedMode,aInfo,resultTo,resultWho,requestCode,-1,-1,onlyIfNeeded,componentSpecified);
    Binder.restoreCallingIdentity(origId);
    return res;
  }
}
Program: 183720
Project: 183720
Buggy source:
@Suppress public void testStartUpTime() throws Exception {
  createDB();
  audioPlaybackStartupTime(MediaNames.MP3FILES);
  audioPlaybackStartupTime(MediaNames.AACFILES);
}

Fixed version (ground truth):
@Suppress public void testStartUpTime() throws Exception {
  createDB();
  audioPlaybackStartupTime(MediaNames.MP3FILES);
  audioPlaybackStartupTime(MediaNames.AACFILES);
  if (mDB.isOpen()) {
    mDB.close();
  }
}
Program: 183721
Project: 183721
Buggy source:
public void createDB(){
  mDB=SQLiteDatabase.openOrCreateDatabase("String_Node_Str",null);
  mDB.execSQL("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
}

Fixed version (ground truth):
public void createDB(){
  mDB=SQLiteDatabase.openOrCreateDatabase("String_Node_Str",null);
  mDB.execSQL("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
  mDB.execSQL("String_Node_Str");
}
Program: 183722
Project: 183722
Buggy source:
@SuppressWarnings({"String_Node_Str"}) protected void performFiltering(CharSequence text,int keyCode){
  mFilter.filter(text,this);
}

Fixed version (ground truth):
/** 
 * <p>Starts filtering the content of the drop down list. The filtering pattern is the content of the edit box. Subclasses should override this method to filter with a different pattern, for instance a substring of <code>text</code>.</p>
 * @param text the filtering pattern
 * @param keyCode the last character inserted in the edit box; beware thatthis will be null when text is being added through a soft input method.
 */
@SuppressWarnings({"String_Node_Str"}) protected void performFiltering(CharSequence text,int keyCode){
  mFilter.filter(text,this);
}
Program: 183724
Project: 183724
Buggy source:
/** 
 * Play a sound from a sound ID <p>Play the sound specified by the soundID. This is the value  returned by the load() function. Returns a non-zero streamID if successful, zero if it fails. The streamID can be used to further control playback. Note that calling play() may cause another sound to stop playing if the maximum number of active streams is exceeded.</p>
 * @param soundID a soundID returned by the load() function
 * @return non-zero streamID if successful, zero if failed
 */
public native final int play(int soundID,float leftVolume,float rightVolume,int priority,int loop,float rate);

Fixed version (ground truth):
/** 
 * Play a sound from a sound ID. Play the sound specified by the soundID. This is the value  returned by the load() function. Returns a non-zero streamID if successful, zero if it fails. The streamID can be used to further control playback. Note that calling play() may cause another sound to stop playing if the maximum number of active streams is exceeded. A loop value of -1 means loop forever, a value of 0 means don't loop, other values indicate the number of repeats, e.g. a value of 1 plays the audio twice. The playback rate allows the application to vary the playback rate (pitch) of the sound. A value of 1.0 means play back at the original frequency. A value of 2.0 means play back twice as fast, and a value of 0.5 means playback at half speed.
 * @param soundID a soundID returned by the load() function
 * @param leftVolume left volume value (range = 0.0 to 1.0)
 * @param rightVolume right volume value (range = 0.0 to 1.0)
 * @param priority stream priority (0 = lowest priority)
 * @param loop loop mode (0 = no loop, -1 = loop forever)
 * @param rate playback rate (1.0 = normal playback, range 0.5 to 2.0)
 * @return non-zero streamID if successful, zero if failed
 */
public native final int play(int soundID,float leftVolume,float rightVolume,int priority,int loop,float rate);
Program: 183725
Project: 183725
Buggy source:
/** 
 * Resume a playback stream <p>Resume the stream specified by the streamID. This is the value returned by the play() function. If the stream is paused, this will resume playback. If the stream was not previously paused, calling this function will have no effect.</p>
 * @param streamID a streamID returned by the play() function
 */
public native final void resume(int streamID);

Fixed version (ground truth):
/** 
 * Resume a playback stream. Resume the stream specified by the streamID. This is the value returned by the play() function. If the stream is paused, this will resume playback. If the stream was not previously paused, calling this function will have no effect.
 * @param streamID a streamID returned by the play() function
 */
public native final void resume(int streamID);
Program: 183726
Project: 183726
Buggy source:
public native final void release();

Fixed version (ground truth):
/** 
 * Release the SoundPool resources. Release all memory and native resources used by the SoundPool object. The SoundPool can no longer be used and the reference should be set to null.
 */
public native final void release();
Program: 183727
Project: 183727
Buggy source:
/** 
 * Change stream priority <p>Change the priority of the stream specified by the streamID. This is the value returned by the play() function. Affects the order in which streams are re-used to play new sounds.
 * @param streamID a streamID returned by the play() function
 */
public native final void setLoop(int streamID,int loop);

Fixed version (ground truth):
/** 
 * Set loop mode. Change the loop mode. A loop value of -1 means loop forever, a value of 0 means don't loop, other values indicate the number of repeats, e.g. a value of 1 plays the audio twice. If the stream does not exist, it will have no effect.
 * @param streamID a streamID returned by the play() function
 * @param loop loop mode (0 = no loop, -1 = loop forever)
 */
public native final void setLoop(int streamID,int loop);
Program: 183728
Project: 183728
Buggy source:
/** 
 * Set stream volume <p>Sets the volume on the stream specified by the streamID. This is the value returned by the play() function. The value must be in the range of 0.0 to 1.0. If the stream does not exist, it will have no effect.</p>
 * @param streamID a streamID returned by the play() function
 * @param leftVolume left volume value (range = 0.0 to 1.0)
 * @param rightVolume right volume value (range = 0.0 to 1.0)
 */
public native final void setVolume(int streamID,float leftVolume,float rightVolume);

Fixed version (ground truth):
/** 
 * Set stream volume. Sets the volume on the stream specified by the streamID. This is the value returned by the play() function. The value must be in the range of 0.0 to 1.0. If the stream does not exist, it will have no effect.
 * @param streamID a streamID returned by the play() function
 * @param leftVolume left volume value (range = 0.0 to 1.0)
 * @param rightVolume right volume value (range = 0.0 to 1.0)
 */
public native final void setVolume(int streamID,float leftVolume,float rightVolume);
Program: 183729
Project: 183729
Buggy source:
public native final void setRate(int streamID,float rate);

Fixed version (ground truth):
/** 
 * Change playback rate. The playback rate allows the application to vary the playback rate (pitch) of the sound. A value of 1.0 means playback at the original frequency. A value of 2.0 means playback twice as fast, and a value of 0.5 means playback at half speed. If the stream does not exist, it will have no effect.
 * @param streamID a streamID returned by the play() function
 * @param rate playback rate (1.0 = normal playback, range 0.5 to 2.0)
 */
public native final void setRate(int streamID,float rate);