nus-yam/ex-repair huggingface dataset:
Program: 193895
Project: 193895
Buggy source:
@Override protected void onStop(){
  super.onStop();
  MetricsLogger.hidden(this,MetricsLogger.OVERVIEW_ACTIVITY);
  RecentsTaskLoader loader=RecentsTaskLoader.getInstance();
  SystemServicesProxy ssp=loader.getSystemServicesProxy();
  Recents.notifyVisibilityChanged(this,ssp,false);
  mRecentsView.onRecentsHidden();
  unregisterReceiver(mServiceBroadcastReceiver);
  loader.unregisterReceivers();
}

Fixed version (ground truth):
@Override protected void onStop(){
  super.onStop();
  MetricsLogger.hidden(this,MetricsLogger.OVERVIEW_ACTIVITY);
  RecentsTaskLoader loader=RecentsTaskLoader.getInstance();
  SystemServicesProxy ssp=loader.getSystemServicesProxy();
  Recents.notifyVisibilityChanged(this,ssp,false);
  mRecentsView.onRecentsHidden();
  unregisterReceiver(mServiceBroadcastReceiver);
  loader.unregisterReceivers();
  mConfig.launchedFromHome=false;
  mConfig.launchedFromSearchHome=false;
  mConfig.launchedFromAppWithThumbnail=false;
  mConfig.launchedToTaskId=-1;
  mConfig.launchedWithAltTab=false;
  mConfig.launchedHasConfigurationChanged=false;
}
Program: 193896
Project: 193896
Buggy source:
@Override protected void onStart(){
  super.onStart();
  MetricsLogger.visible(this,MetricsLogger.OVERVIEW_ACTIVITY);
  RecentsTaskLoader loader=RecentsTaskLoader.getInstance();
  SystemServicesProxy ssp=loader.getSystemServicesProxy();
  Recents.notifyVisibilityChanged(this,ssp,true);
  IntentFilter filter=new IntentFilter();
  filter.addAction(Recents.ACTION_HIDE_RECENTS_ACTIVITY);
  filter.addAction(Recents.ACTION_TOGGLE_RECENTS_ACTIVITY);
  filter.addAction(Recents.ACTION_START_ENTER_ANIMATION);
  registerReceiver(mServiceBroadcastReceiver,filter);
  loader.registerReceivers(this,mRecentsView);
  updateRecentsTasks();
  if (mConfig.launchedHasConfigurationChanged) {
    onEnterAnimationTriggered();
  }
  if (!mConfig.launchedHasConfigurationChanged) {
    mRecentsView.disableLayersForOneFrame();
  }
}

Fixed version (ground truth):
@Override protected void onStart(){
  super.onStart();
  MetricsLogger.visible(this,MetricsLogger.OVERVIEW_ACTIVITY);
  RecentsTaskLoader loader=RecentsTaskLoader.getInstance();
  SystemServicesProxy ssp=loader.getSystemServicesProxy();
  Recents.notifyVisibilityChanged(this,ssp,true);
  IntentFilter filter=new IntentFilter();
  filter.addAction(Recents.ACTION_HIDE_RECENTS_ACTIVITY);
  filter.addAction(Recents.ACTION_TOGGLE_RECENTS_ACTIVITY);
  filter.addAction(Recents.ACTION_START_ENTER_ANIMATION);
  registerReceiver(mServiceBroadcastReceiver,filter);
  loader.registerReceivers(this,mRecentsView);
  updateRecentsTasks();
  boolean wasLaunchedByAm=!mConfig.launchedFromHome && !mConfig.launchedFromAppWithThumbnail;
  if (mConfig.launchedHasConfigurationChanged || wasLaunchedByAm) {
    onEnterAnimationTriggered();
  }
  if (!mConfig.launchedHasConfigurationChanged) {
    mRecentsView.disableLayersForOneFrame();
  }
}
Program: 193897
Project: 193897
Buggy source:
@Override protected void onStop(){
  super.onStop();
  MetricsLogger.hidden(this,MetricsLogger.OVERVIEW_ACTIVITY);
  RecentsTaskLoader loader=RecentsTaskLoader.getInstance();
  SystemServicesProxy ssp=loader.getSystemServicesProxy();
  Recents.notifyVisibilityChanged(this,ssp,false);
  mRecentsView.onRecentsHidden();
  unregisterReceiver(mServiceBroadcastReceiver);
  loader.unregisterReceivers();
}

Fixed version (ground truth):
@Override protected void onStop(){
  super.onStop();
  MetricsLogger.hidden(this,MetricsLogger.OVERVIEW_ACTIVITY);
  RecentsTaskLoader loader=RecentsTaskLoader.getInstance();
  SystemServicesProxy ssp=loader.getSystemServicesProxy();
  Recents.notifyVisibilityChanged(this,ssp,false);
  mRecentsView.onRecentsHidden();
  unregisterReceiver(mServiceBroadcastReceiver);
  loader.unregisterReceivers();
  mConfig.launchedFromHome=false;
  mConfig.launchedFromSearchHome=false;
  mConfig.launchedFromAppWithThumbnail=false;
  mConfig.launchedToTaskId=-1;
  mConfig.launchedWithAltTab=false;
  mConfig.launchedHasConfigurationChanged=false;
}
Program: 193898
Project: 193898
Buggy source:
@Override public List<ProviderInfo> queryContentProviders(String processName,int uid,int flags){
  try {
    return mPM.queryContentProviders(processName,uid,flags);
  }
 catch (  RemoteException e) {
    throw new RuntimeException("String_Node_Str",e);
  }
}

Fixed version (ground truth):
@Override public List<ProviderInfo> queryContentProviders(String processName,int uid,int flags){
  try {
    ParceledListSlice<ProviderInfo> slice=mPM.queryContentProviders(processName,uid,flags);
    return slice != null ? slice.getList() : null;
  }
 catch (  RemoteException e) {
    throw new RuntimeException("String_Node_Str",e);
  }
}
Program: 193899
Project: 193899
Buggy source:
@Override public List<ProviderInfo> queryContentProviders(String processName,int uid,int flags){
  try {
    return mPM.queryContentProviders(processName,uid,flags);
  }
 catch (  RemoteException e) {
    throw new RuntimeException("String_Node_Str",e);
  }
}

Fixed version (ground truth):
@Override public List<ProviderInfo> queryContentProviders(String processName,int uid,int flags){
  try {
    ParceledListSlice<ProviderInfo> slice=mPM.queryContentProviders(processName,uid,flags);
    return slice != null ? slice.getList() : null;
  }
 catch (  RemoteException e) {
    throw new RuntimeException("String_Node_Str",e);
  }
}
Program: 193900
Project: 193900
Buggy source:
@Override public List<ProviderInfo> queryContentProviders(String processName,int uid,int flags){
  try {
    return mPM.queryContentProviders(processName,uid,flags);
  }
 catch (  RemoteException e) {
    throw new RuntimeException("String_Node_Str",e);
  }
}

Fixed version (ground truth):
@Override public List<ProviderInfo> queryContentProviders(String processName,int uid,int flags){
  try {
    ParceledListSlice<ProviderInfo> slice=mPM.queryContentProviders(processName,uid,flags);
    return slice != null ? slice.getList() : null;
  }
 catch (  RemoteException e) {
    throw new RuntimeException("String_Node_Str",e);
  }
}
Program: 193901
Project: 193901
Buggy source:
@Override public List<ProviderInfo> queryContentProviders(String processName,int uid,int flags){
  try {
    return mPM.queryContentProviders(processName,uid,flags);
  }
 catch (  RemoteException e) {
    throw new RuntimeException("String_Node_Str",e);
  }
}

Fixed version (ground truth):
@Override public List<ProviderInfo> queryContentProviders(String processName,int uid,int flags){
  try {
    ParceledListSlice<ProviderInfo> slice=mPM.queryContentProviders(processName,uid,flags);
    return slice != null ? slice.getList() : null;
  }
 catch (  RemoteException e) {
    throw new RuntimeException("String_Node_Str",e);
  }
}
Program: 193902
Project: 193902
Buggy source:
@Override public List<ProviderInfo> queryContentProviders(String processName,int uid,int flags){
  try {
    return mPM.queryContentProviders(processName,uid,flags);
  }
 catch (  RemoteException e) {
    throw new RuntimeException("String_Node_Str",e);
  }
}

Fixed version (ground truth):
@Override public List<ProviderInfo> queryContentProviders(String processName,int uid,int flags){
  try {
    ParceledListSlice<ProviderInfo> slice=mPM.queryContentProviders(processName,uid,flags);
    return slice != null ? slice.getList() : null;
  }
 catch (  RemoteException e) {
    throw new RuntimeException("String_Node_Str",e);
  }
}
Program: 193903
Project: 193903
Buggy source:
@Override public List<ProviderInfo> queryContentProviders(String processName,int uid,int flags){
  try {
    return mPM.queryContentProviders(processName,uid,flags);
  }
 catch (  RemoteException e) {
    throw new RuntimeException("String_Node_Str",e);
  }
}

Fixed version (ground truth):
@Override public List<ProviderInfo> queryContentProviders(String processName,int uid,int flags){
  try {
    ParceledListSlice<ProviderInfo> slice=mPM.queryContentProviders(processName,uid,flags);
    return slice != null ? slice.getList() : null;
  }
 catch (  RemoteException e) {
    throw new RuntimeException("String_Node_Str",e);
  }
}
Program: 193904
Project: 193904
Buggy source:
@Override public List<ProviderInfo> queryContentProviders(String processName,int uid,int flags){
  try {
    return mPM.queryContentProviders(processName,uid,flags);
  }
 catch (  RemoteException e) {
    throw new RuntimeException("String_Node_Str",e);
  }
}

Fixed version (ground truth):
@Override public List<ProviderInfo> queryContentProviders(String processName,int uid,int flags){
  try {
    ParceledListSlice<ProviderInfo> slice=mPM.queryContentProviders(processName,uid,flags);
    return slice != null ? slice.getList() : null;
  }
 catch (  RemoteException e) {
    throw new RuntimeException("String_Node_Str",e);
  }
}
Program: 193905
Project: 193905
Buggy source:
@Override public List<ProviderInfo> queryContentProviders(String processName,int uid,int flags){
  try {
    return mPM.queryContentProviders(processName,uid,flags);
  }
 catch (  RemoteException e) {
    throw new RuntimeException("String_Node_Str",e);
  }
}

Fixed version (ground truth):
@Override public List<ProviderInfo> queryContentProviders(String processName,int uid,int flags){
  try {
    ParceledListSlice<ProviderInfo> slice=mPM.queryContentProviders(processName,uid,flags);
    return slice != null ? slice.getList() : null;
  }
 catch (  RemoteException e) {
    throw new RuntimeException("String_Node_Str",e);
  }
}
Program: 193906
Project: 193906
Buggy source:
@Override public void setAssistBlocked(boolean state){
  mNode.mFlags=(mNode.mFlags & ~ViewNode.FLAGS_ASSIST_BLOCKED) | (state ? 0 : ViewNode.FLAGS_ASSIST_BLOCKED);
}

Fixed version (ground truth):
@Override public void setAssistBlocked(boolean state){
  mNode.mFlags=(mNode.mFlags & ~ViewNode.FLAGS_ASSIST_BLOCKED) | (state ? ViewNode.FLAGS_ASSIST_BLOCKED : 0);
}
Program: 193911
Project: 193911
Buggy source:
private void updateClipping(){
  mClipRect.set(0,mClipTopOptimization,getWidth(),getActualHeight());
  setClipBounds(mClipRect);
}

Fixed version (ground truth):
private void updateClipping(){
  int top=mClipTopOptimization;
  if (top >= getActualHeight()) {
    top=getActualHeight() - 1;
  }
  mClipRect.set(0,top,getWidth(),getActualHeight());
  setClipBounds(mClipRect);
}
Program: 193913
Project: 193913
Buggy source:
private void updateClipping(){
  mClipRect.set(0,mClipTopOptimization,getWidth(),getActualHeight());
  setClipBounds(mClipRect);
}

Fixed version (ground truth):
private void updateClipping(){
  int top=mClipTopOptimization;
  if (top >= getActualHeight()) {
    top=getActualHeight() - 1;
  }
  mClipRect.set(0,top,getWidth(),getActualHeight());
  setClipBounds(mClipRect);
}
Program: 193916
Project: 193916
Buggy source:
private void updateClipping(){
  mClipRect.set(0,mClipTopOptimization,getWidth(),getActualHeight());
  setClipBounds(mClipRect);
}

Fixed version (ground truth):
private void updateClipping(){
  int top=mClipTopOptimization;
  if (top >= getActualHeight()) {
    top=getActualHeight() - 1;
  }
  mClipRect.set(0,top,getWidth(),getActualHeight());
  setClipBounds(mClipRect);
}
Program: 193918
Project: 193918
Buggy source:
@Override public void setAssistBlocked(boolean state){
  mNode.mFlags=(mNode.mFlags & ~ViewNode.FLAGS_ASSIST_BLOCKED) | (state ? 0 : ViewNode.FLAGS_ASSIST_BLOCKED);
}

Fixed version (ground truth):
@Override public void setAssistBlocked(boolean state){
  mNode.mFlags=(mNode.mFlags & ~ViewNode.FLAGS_ASSIST_BLOCKED) | (state ? ViewNode.FLAGS_ASSIST_BLOCKED : 0);
}
Program: 193923
Project: 193923
Buggy source:
@Override public void setAssistBlocked(boolean state){
  mNode.mFlags=(mNode.mFlags & ~ViewNode.FLAGS_ASSIST_BLOCKED) | (state ? 0 : ViewNode.FLAGS_ASSIST_BLOCKED);
}

Fixed version (ground truth):
@Override public void setAssistBlocked(boolean state){
  mNode.mFlags=(mNode.mFlags & ~ViewNode.FLAGS_ASSIST_BLOCKED) | (state ? ViewNode.FLAGS_ASSIST_BLOCKED : 0);
}
Program: 193927
Project: 193927
Buggy source:
@Override public void setAssistBlocked(boolean state){
  mNode.mFlags=(mNode.mFlags & ~ViewNode.FLAGS_ASSIST_BLOCKED) | (state ? 0 : ViewNode.FLAGS_ASSIST_BLOCKED);
}

Fixed version (ground truth):
@Override public void setAssistBlocked(boolean state){
  mNode.mFlags=(mNode.mFlags & ~ViewNode.FLAGS_ASSIST_BLOCKED) | (state ? ViewNode.FLAGS_ASSIST_BLOCKED : 0);
}
Program: 193931
Project: 193931
Buggy source:
@Override public void setAssistBlocked(boolean state){
  mNode.mFlags=(mNode.mFlags & ~ViewNode.FLAGS_ASSIST_BLOCKED) | (state ? 0 : ViewNode.FLAGS_ASSIST_BLOCKED);
}

Fixed version (ground truth):
@Override public void setAssistBlocked(boolean state){
  mNode.mFlags=(mNode.mFlags & ~ViewNode.FLAGS_ASSIST_BLOCKED) | (state ? ViewNode.FLAGS_ASSIST_BLOCKED : 0);
}
Program: 193935
Project: 193935
Buggy source:
@Override public void setAssistBlocked(boolean state){
  mNode.mFlags=(mNode.mFlags & ~ViewNode.FLAGS_ASSIST_BLOCKED) | (state ? 0 : ViewNode.FLAGS_ASSIST_BLOCKED);
}

Fixed version (ground truth):
@Override public void setAssistBlocked(boolean state){
  mNode.mFlags=(mNode.mFlags & ~ViewNode.FLAGS_ASSIST_BLOCKED) | (state ? ViewNode.FLAGS_ASSIST_BLOCKED : 0);
}
Program: 193939
Project: 193939
Buggy source:
private void updateClipping(){
  mClipRect.set(0,mClipTopOptimization,getWidth(),getActualHeight());
  setClipBounds(mClipRect);
}

Fixed version (ground truth):
private void updateClipping(){
  int top=mClipTopOptimization;
  if (top >= getActualHeight()) {
    top=getActualHeight() - 1;
  }
  mClipRect.set(0,top,getWidth(),getActualHeight());
  setClipBounds(mClipRect);
}
Program: 193941
Project: 193941
Buggy source:
private void updateClipping(){
  mClipRect.set(0,mClipTopOptimization,getWidth(),getActualHeight());
  setClipBounds(mClipRect);
}

Fixed version (ground truth):
private void updateClipping(){
  int top=mClipTopOptimization;
  if (top >= getActualHeight()) {
    top=getActualHeight() - 1;
  }
  mClipRect.set(0,top,getWidth(),getActualHeight());
  setClipBounds(mClipRect);
}
Program: 193943
Project: 193943
Buggy source:
private void updateClipping(){
  mClipRect.set(0,mClipTopOptimization,getWidth(),getActualHeight());
  setClipBounds(mClipRect);
}

Fixed version (ground truth):
private void updateClipping(){
  int top=mClipTopOptimization;
  if (top >= getActualHeight()) {
    top=getActualHeight() - 1;
  }
  mClipRect.set(0,top,getWidth(),getActualHeight());
  setClipBounds(mClipRect);
}
Program: 193945
Project: 193945
Buggy source:
private void updateClipping(){
  mClipRect.set(0,mClipTopOptimization,getWidth(),getActualHeight());
  setClipBounds(mClipRect);
}

Fixed version (ground truth):
private void updateClipping(){
  int top=mClipTopOptimization;
  if (top >= getActualHeight()) {
    top=getActualHeight() - 1;
  }
  mClipRect.set(0,top,getWidth(),getActualHeight());
  setClipBounds(mClipRect);
}
Program: 193948
Project: 193948
Buggy source:
@LayoutlibDelegate static float[] native_approximate(long nPath,float error){
  Bridge.getLog().warning(LayoutLog.TAG_UNSUPPORTED,"String_Node_Str",null);
  Path_Delegate pathDelegate=sManager.getDelegate(nPath);
  if (pathDelegate == null) {
    return null;
  }
  PathIterator pathIterator=pathDelegate.mPath.getPathIterator(null);
  float[] tmp=new float[6];
  float[] coords=new float[6];
  boolean isFirstPoint=true;
  while (!pathIterator.isDone()) {
    int type=pathIterator.currentSegment(tmp);
switch (type) {
case PathIterator.SEG_MOVETO:
case PathIterator.SEG_LINETO:
      store(coords,tmp,1,isFirstPoint);
    break;
case PathIterator.SEG_QUADTO:
  store(coords,tmp,2,isFirstPoint);
break;
case PathIterator.SEG_CUBICTO:
store(coords,tmp,3,isFirstPoint);
break;
case PathIterator.SEG_CLOSE:
}
isFirstPoint=false;
pathIterator.next();
}
if (isFirstPoint) {
return new float[0];
}
 else {
return coords;
}
}

Fixed version (ground truth):
@LayoutlibDelegate static float[] native_approximate(long nPath,float error){
  Bridge.getLog().warning(LayoutLog.TAG_UNSUPPORTED,"String_Node_Str",null);
  Path_Delegate pathDelegate=sManager.getDelegate(nPath);
  if (pathDelegate == null) {
    return null;
  }
  PathIterator pathIterator=pathDelegate.mPath.getPathIterator(null);
  float[] tmp=new float[6];
  float[] coords=new float[6];
  boolean isFirstPoint=true;
  while (!pathIterator.isDone()) {
    int type=pathIterator.currentSegment(tmp);
switch (type) {
case PathIterator.SEG_MOVETO:
case PathIterator.SEG_LINETO:
      store(tmp,coords,1,isFirstPoint);
    break;
case PathIterator.SEG_QUADTO:
  store(tmp,coords,2,isFirstPoint);
break;
case PathIterator.SEG_CUBICTO:
store(tmp,coords,3,isFirstPoint);
break;
case PathIterator.SEG_CLOSE:
}
isFirstPoint=false;
pathIterator.next();
}
if (isFirstPoint) {
return new float[0];
}
 else {
return coords;
}
}
Program: 193949
Project: 193949
Buggy source:
private static void store(float[] src,float[] dst,int count,boolean isFirst){
  if (isFirst) {
    dst[0]=0;
    dst[1]=src[0];
    dst[2]=src[1];
  }
  if (count > 1 || !isFirst) {
    dst[3]=1;
    dst[4]=src[2 * count];
    dst[5]=src[2 * count + 1];
  }
}

Fixed version (ground truth):
private static void store(float[] src,float[] dst,int count,boolean isFirst){
  if (isFirst) {
    dst[0]=0;
    dst[1]=src[0];
    dst[2]=src[1];
  }
  if (count > 1 || !isFirst) {
    dst[3]=1;
    dst[4]=src[2 * count - 2];
    dst[5]=src[2 * count - 1];
  }
}
Program: 193950
Project: 193950
Buggy source:
@Override public void setAssistBlocked(boolean state){
  mNode.mFlags=(mNode.mFlags & ~ViewNode.FLAGS_ASSIST_BLOCKED) | (state ? 0 : ViewNode.FLAGS_ASSIST_BLOCKED);
}

Fixed version (ground truth):
@Override public void setAssistBlocked(boolean state){
  mNode.mFlags=(mNode.mFlags & ~ViewNode.FLAGS_ASSIST_BLOCKED) | (state ? ViewNode.FLAGS_ASSIST_BLOCKED : 0);
}
Program: 193954
Project: 193954
Buggy source:
@Override public void setAssistBlocked(boolean state){
  mNode.mFlags=(mNode.mFlags & ~ViewNode.FLAGS_ASSIST_BLOCKED) | (state ? 0 : ViewNode.FLAGS_ASSIST_BLOCKED);
}

Fixed version (ground truth):
@Override public void setAssistBlocked(boolean state){
  mNode.mFlags=(mNode.mFlags & ~ViewNode.FLAGS_ASSIST_BLOCKED) | (state ? ViewNode.FLAGS_ASSIST_BLOCKED : 0);
}
Program: 193964
Project: 193964
Buggy source:
void keyValueAgentCleanup(){
  mBackupDataName.delete();
  mStageName.delete();
  try {
    if (mBackupData != null)     mBackupData.close();
  }
 catch (  IOException e) {
  }
  try {
    if (mNewState != null)     mNewState.close();
  }
 catch (  IOException e) {
  }
  mBackupData=mNewState=null;
  mNewStateName.delete();
  if (mCurrentPackage.applicationInfo != null) {
    try {
      mActivityManager.unbindBackupAgent(mCurrentPackage.applicationInfo);
      if (mTargetPackage == null && (mCurrentPackage.applicationInfo.flags & ApplicationInfo.FLAG_KILL_AFTER_RESTORE) != 0) {
        if (DEBUG)         Slog.d(TAG,"String_Node_Str" + mCurrentPackage.applicationInfo.processName);
        mActivityManager.killApplicationProcess(mCurrentPackage.applicationInfo.processName,mCurrentPackage.applicationInfo.uid);
      }
    }
 catch (    RemoteException e) {
    }
  }
  mBackupHandler.removeMessages(MSG_TIMEOUT,this);
synchronized (mCurrentOpLock) {
    mCurrentOperations.clear();
  }
}

Fixed version (ground truth):
void keyValueAgentCleanup(){
  mBackupDataName.delete();
  mStageName.delete();
  try {
    if (mBackupData != null)     mBackupData.close();
  }
 catch (  IOException e) {
  }
  try {
    if (mNewState != null)     mNewState.close();
  }
 catch (  IOException e) {
  }
  mBackupData=mNewState=null;
  mNewStateName.delete();
  if (mCurrentPackage.applicationInfo != null) {
    try {
      mActivityManager.unbindBackupAgent(mCurrentPackage.applicationInfo);
      final int appFlags=mCurrentPackage.applicationInfo.flags;
      final boolean killAfterRestore=(mRestoreDescription.getDataType() == RestoreDescription.TYPE_FULL_STREAM) || ((appFlags & ApplicationInfo.FLAG_KILL_AFTER_RESTORE) != 0);
      if (mTargetPackage == null && killAfterRestore) {
        if (DEBUG)         Slog.d(TAG,"String_Node_Str" + mCurrentPackage.applicationInfo.processName);
        mActivityManager.killApplicationProcess(mCurrentPackage.applicationInfo.processName,mCurrentPackage.applicationInfo.uid);
      }
    }
 catch (    RemoteException e) {
    }
  }
  mBackupHandler.removeMessages(MSG_TIMEOUT,this);
synchronized (mCurrentOpLock) {
    mCurrentOperations.clear();
  }
}
Program: 193965
Project: 193965
Buggy source:
void keyValueAgentCleanup(){
  mBackupDataName.delete();
  mStageName.delete();
  try {
    if (mBackupData != null)     mBackupData.close();
  }
 catch (  IOException e) {
  }
  try {
    if (mNewState != null)     mNewState.close();
  }
 catch (  IOException e) {
  }
  mBackupData=mNewState=null;
  mNewStateName.delete();
  if (mCurrentPackage.applicationInfo != null) {
    try {
      mActivityManager.unbindBackupAgent(mCurrentPackage.applicationInfo);
      if (mTargetPackage == null && (mCurrentPackage.applicationInfo.flags & ApplicationInfo.FLAG_KILL_AFTER_RESTORE) != 0) {
        if (DEBUG)         Slog.d(TAG,"String_Node_Str" + mCurrentPackage.applicationInfo.processName);
        mActivityManager.killApplicationProcess(mCurrentPackage.applicationInfo.processName,mCurrentPackage.applicationInfo.uid);
      }
    }
 catch (    RemoteException e) {
    }
  }
  mBackupHandler.removeMessages(MSG_TIMEOUT,this);
synchronized (mCurrentOpLock) {
    mCurrentOperations.clear();
  }
}

Fixed version (ground truth):
void keyValueAgentCleanup(){
  mBackupDataName.delete();
  mStageName.delete();
  try {
    if (mBackupData != null)     mBackupData.close();
  }
 catch (  IOException e) {
  }
  try {
    if (mNewState != null)     mNewState.close();
  }
 catch (  IOException e) {
  }
  mBackupData=mNewState=null;
  mNewStateName.delete();
  if (mCurrentPackage.applicationInfo != null) {
    try {
      mActivityManager.unbindBackupAgent(mCurrentPackage.applicationInfo);
      final int appFlags=mCurrentPackage.applicationInfo.flags;
      final boolean killAfterRestore=(mRestoreDescription.getDataType() == RestoreDescription.TYPE_FULL_STREAM) || ((appFlags & ApplicationInfo.FLAG_KILL_AFTER_RESTORE) != 0);
      if (mTargetPackage == null && killAfterRestore) {
        if (DEBUG)         Slog.d(TAG,"String_Node_Str" + mCurrentPackage.applicationInfo.processName);
        mActivityManager.killApplicationProcess(mCurrentPackage.applicationInfo.processName,mCurrentPackage.applicationInfo.uid);
      }
    }
 catch (    RemoteException e) {
    }
  }
  mBackupHandler.removeMessages(MSG_TIMEOUT,this);
synchronized (mCurrentOpLock) {
    mCurrentOperations.clear();
  }
}
Program: 193966
Project: 193966
Buggy source:
void keyValueAgentCleanup(){
  mBackupDataName.delete();
  mStageName.delete();
  try {
    if (mBackupData != null)     mBackupData.close();
  }
 catch (  IOException e) {
  }
  try {
    if (mNewState != null)     mNewState.close();
  }
 catch (  IOException e) {
  }
  mBackupData=mNewState=null;
  mNewStateName.delete();
  if (mCurrentPackage.applicationInfo != null) {
    try {
      mActivityManager.unbindBackupAgent(mCurrentPackage.applicationInfo);
      if (mTargetPackage == null && (mCurrentPackage.applicationInfo.flags & ApplicationInfo.FLAG_KILL_AFTER_RESTORE) != 0) {
        if (DEBUG)         Slog.d(TAG,"String_Node_Str" + mCurrentPackage.applicationInfo.processName);
        mActivityManager.killApplicationProcess(mCurrentPackage.applicationInfo.processName,mCurrentPackage.applicationInfo.uid);
      }
    }
 catch (    RemoteException e) {
    }
  }
  mBackupHandler.removeMessages(MSG_TIMEOUT,this);
synchronized (mCurrentOpLock) {
    mCurrentOperations.clear();
  }
}

Fixed version (ground truth):
void keyValueAgentCleanup(){
  mBackupDataName.delete();
  mStageName.delete();
  try {
    if (mBackupData != null)     mBackupData.close();
  }
 catch (  IOException e) {
  }
  try {
    if (mNewState != null)     mNewState.close();
  }
 catch (  IOException e) {
  }
  mBackupData=mNewState=null;
  mNewStateName.delete();
  if (mCurrentPackage.applicationInfo != null) {
    try {
      mActivityManager.unbindBackupAgent(mCurrentPackage.applicationInfo);
      final int appFlags=mCurrentPackage.applicationInfo.flags;
      final boolean killAfterRestore=(mRestoreDescription.getDataType() == RestoreDescription.TYPE_FULL_STREAM) || ((appFlags & ApplicationInfo.FLAG_KILL_AFTER_RESTORE) != 0);
      if (mTargetPackage == null && killAfterRestore) {
        if (DEBUG)         Slog.d(TAG,"String_Node_Str" + mCurrentPackage.applicationInfo.processName);
        mActivityManager.killApplicationProcess(mCurrentPackage.applicationInfo.processName,mCurrentPackage.applicationInfo.uid);
      }
    }
 catch (    RemoteException e) {
    }
  }
  mBackupHandler.removeMessages(MSG_TIMEOUT,this);
synchronized (mCurrentOpLock) {
    mCurrentOperations.clear();
  }
}
Program: 193967
Project: 193967
Buggy source:
void keyValueAgentCleanup(){
  mBackupDataName.delete();
  mStageName.delete();
  try {
    if (mBackupData != null)     mBackupData.close();
  }
 catch (  IOException e) {
  }
  try {
    if (mNewState != null)     mNewState.close();
  }
 catch (  IOException e) {
  }
  mBackupData=mNewState=null;
  mNewStateName.delete();
  if (mCurrentPackage.applicationInfo != null) {
    try {
      mActivityManager.unbindBackupAgent(mCurrentPackage.applicationInfo);
      if (mTargetPackage == null && (mCurrentPackage.applicationInfo.flags & ApplicationInfo.FLAG_KILL_AFTER_RESTORE) != 0) {
        if (DEBUG)         Slog.d(TAG,"String_Node_Str" + mCurrentPackage.applicationInfo.processName);
        mActivityManager.killApplicationProcess(mCurrentPackage.applicationInfo.processName,mCurrentPackage.applicationInfo.uid);
      }
    }
 catch (    RemoteException e) {
    }
  }
  mBackupHandler.removeMessages(MSG_TIMEOUT,this);
synchronized (mCurrentOpLock) {
    mCurrentOperations.clear();
  }
}

Fixed version (ground truth):
void keyValueAgentCleanup(){
  mBackupDataName.delete();
  mStageName.delete();
  try {
    if (mBackupData != null)     mBackupData.close();
  }
 catch (  IOException e) {
  }
  try {
    if (mNewState != null)     mNewState.close();
  }
 catch (  IOException e) {
  }
  mBackupData=mNewState=null;
  mNewStateName.delete();
  if (mCurrentPackage.applicationInfo != null) {
    try {
      mActivityManager.unbindBackupAgent(mCurrentPackage.applicationInfo);
      final int appFlags=mCurrentPackage.applicationInfo.flags;
      final boolean killAfterRestore=(mRestoreDescription.getDataType() == RestoreDescription.TYPE_FULL_STREAM) || ((appFlags & ApplicationInfo.FLAG_KILL_AFTER_RESTORE) != 0);
      if (mTargetPackage == null && killAfterRestore) {
        if (DEBUG)         Slog.d(TAG,"String_Node_Str" + mCurrentPackage.applicationInfo.processName);
        mActivityManager.killApplicationProcess(mCurrentPackage.applicationInfo.processName,mCurrentPackage.applicationInfo.uid);
      }
    }
 catch (    RemoteException e) {
    }
  }
  mBackupHandler.removeMessages(MSG_TIMEOUT,this);
synchronized (mCurrentOpLock) {
    mCurrentOperations.clear();
  }
}
Program: 193968
Project: 193968
Buggy source:
void keyValueAgentCleanup(){
  mBackupDataName.delete();
  mStageName.delete();
  try {
    if (mBackupData != null)     mBackupData.close();
  }
 catch (  IOException e) {
  }
  try {
    if (mNewState != null)     mNewState.close();
  }
 catch (  IOException e) {
  }
  mBackupData=mNewState=null;
  mNewStateName.delete();
  if (mCurrentPackage.applicationInfo != null) {
    try {
      mActivityManager.unbindBackupAgent(mCurrentPackage.applicationInfo);
      if (mTargetPackage == null && (mCurrentPackage.applicationInfo.flags & ApplicationInfo.FLAG_KILL_AFTER_RESTORE) != 0) {
        if (DEBUG)         Slog.d(TAG,"String_Node_Str" + mCurrentPackage.applicationInfo.processName);
        mActivityManager.killApplicationProcess(mCurrentPackage.applicationInfo.processName,mCurrentPackage.applicationInfo.uid);
      }
    }
 catch (    RemoteException e) {
    }
  }
  mBackupHandler.removeMessages(MSG_TIMEOUT,this);
synchronized (mCurrentOpLock) {
    mCurrentOperations.clear();
  }
}

Fixed version (ground truth):
void keyValueAgentCleanup(){
  mBackupDataName.delete();
  mStageName.delete();
  try {
    if (mBackupData != null)     mBackupData.close();
  }
 catch (  IOException e) {
  }
  try {
    if (mNewState != null)     mNewState.close();
  }
 catch (  IOException e) {
  }
  mBackupData=mNewState=null;
  mNewStateName.delete();
  if (mCurrentPackage.applicationInfo != null) {
    try {
      mActivityManager.unbindBackupAgent(mCurrentPackage.applicationInfo);
      final int appFlags=mCurrentPackage.applicationInfo.flags;
      final boolean killAfterRestore=(mRestoreDescription.getDataType() == RestoreDescription.TYPE_FULL_STREAM) || ((appFlags & ApplicationInfo.FLAG_KILL_AFTER_RESTORE) != 0);
      if (mTargetPackage == null && killAfterRestore) {
        if (DEBUG)         Slog.d(TAG,"String_Node_Str" + mCurrentPackage.applicationInfo.processName);
        mActivityManager.killApplicationProcess(mCurrentPackage.applicationInfo.processName,mCurrentPackage.applicationInfo.uid);
      }
    }
 catch (    RemoteException e) {
    }
  }
  mBackupHandler.removeMessages(MSG_TIMEOUT,this);
synchronized (mCurrentOpLock) {
    mCurrentOperations.clear();
  }
}
Program: 193969
Project: 193969
Buggy source:
void keyValueAgentCleanup(){
  mBackupDataName.delete();
  mStageName.delete();
  try {
    if (mBackupData != null)     mBackupData.close();
  }
 catch (  IOException e) {
  }
  try {
    if (mNewState != null)     mNewState.close();
  }
 catch (  IOException e) {
  }
  mBackupData=mNewState=null;
  mNewStateName.delete();
  if (mCurrentPackage.applicationInfo != null) {
    try {
      mActivityManager.unbindBackupAgent(mCurrentPackage.applicationInfo);
      if (mTargetPackage == null && (mCurrentPackage.applicationInfo.flags & ApplicationInfo.FLAG_KILL_AFTER_RESTORE) != 0) {
        if (DEBUG)         Slog.d(TAG,"String_Node_Str" + mCurrentPackage.applicationInfo.processName);
        mActivityManager.killApplicationProcess(mCurrentPackage.applicationInfo.processName,mCurrentPackage.applicationInfo.uid);
      }
    }
 catch (    RemoteException e) {
    }
  }
  mBackupHandler.removeMessages(MSG_TIMEOUT,this);
synchronized (mCurrentOpLock) {
    mCurrentOperations.clear();
  }
}

Fixed version (ground truth):
void keyValueAgentCleanup(){
  mBackupDataName.delete();
  mStageName.delete();
  try {
    if (mBackupData != null)     mBackupData.close();
  }
 catch (  IOException e) {
  }
  try {
    if (mNewState != null)     mNewState.close();
  }
 catch (  IOException e) {
  }
  mBackupData=mNewState=null;
  mNewStateName.delete();
  if (mCurrentPackage.applicationInfo != null) {
    try {
      mActivityManager.unbindBackupAgent(mCurrentPackage.applicationInfo);
      final int appFlags=mCurrentPackage.applicationInfo.flags;
      final boolean killAfterRestore=(mRestoreDescription.getDataType() == RestoreDescription.TYPE_FULL_STREAM) || ((appFlags & ApplicationInfo.FLAG_KILL_AFTER_RESTORE) != 0);
      if (mTargetPackage == null && killAfterRestore) {
        if (DEBUG)         Slog.d(TAG,"String_Node_Str" + mCurrentPackage.applicationInfo.processName);
        mActivityManager.killApplicationProcess(mCurrentPackage.applicationInfo.processName,mCurrentPackage.applicationInfo.uid);
      }
    }
 catch (    RemoteException e) {
    }
  }
  mBackupHandler.removeMessages(MSG_TIMEOUT,this);
synchronized (mCurrentOpLock) {
    mCurrentOperations.clear();
  }
}
Program: 193970
Project: 193970
Buggy source:
void keyValueAgentCleanup(){
  mBackupDataName.delete();
  mStageName.delete();
  try {
    if (mBackupData != null)     mBackupData.close();
  }
 catch (  IOException e) {
  }
  try {
    if (mNewState != null)     mNewState.close();
  }
 catch (  IOException e) {
  }
  mBackupData=mNewState=null;
  mNewStateName.delete();
  if (mCurrentPackage.applicationInfo != null) {
    try {
      mActivityManager.unbindBackupAgent(mCurrentPackage.applicationInfo);
      if (mTargetPackage == null && (mCurrentPackage.applicationInfo.flags & ApplicationInfo.FLAG_KILL_AFTER_RESTORE) != 0) {
        if (DEBUG)         Slog.d(TAG,"String_Node_Str" + mCurrentPackage.applicationInfo.processName);
        mActivityManager.killApplicationProcess(mCurrentPackage.applicationInfo.processName,mCurrentPackage.applicationInfo.uid);
      }
    }
 catch (    RemoteException e) {
    }
  }
  mBackupHandler.removeMessages(MSG_TIMEOUT,this);
synchronized (mCurrentOpLock) {
    mCurrentOperations.clear();
  }
}

Fixed version (ground truth):
void keyValueAgentCleanup(){
  mBackupDataName.delete();
  mStageName.delete();
  try {
    if (mBackupData != null)     mBackupData.close();
  }
 catch (  IOException e) {
  }
  try {
    if (mNewState != null)     mNewState.close();
  }
 catch (  IOException e) {
  }
  mBackupData=mNewState=null;
  mNewStateName.delete();
  if (mCurrentPackage.applicationInfo != null) {
    try {
      mActivityManager.unbindBackupAgent(mCurrentPackage.applicationInfo);
      final int appFlags=mCurrentPackage.applicationInfo.flags;
      final boolean killAfterRestore=(mRestoreDescription.getDataType() == RestoreDescription.TYPE_FULL_STREAM) || ((appFlags & ApplicationInfo.FLAG_KILL_AFTER_RESTORE) != 0);
      if (mTargetPackage == null && killAfterRestore) {
        if (DEBUG)         Slog.d(TAG,"String_Node_Str" + mCurrentPackage.applicationInfo.processName);
        mActivityManager.killApplicationProcess(mCurrentPackage.applicationInfo.processName,mCurrentPackage.applicationInfo.uid);
      }
    }
 catch (    RemoteException e) {
    }
  }
  mBackupHandler.removeMessages(MSG_TIMEOUT,this);
synchronized (mCurrentOpLock) {
    mCurrentOperations.clear();
  }
}
Program: 193971
Project: 193971
Buggy source:
/** 
 * Creates a new asynchronous task. This constructor must be invoked on the UI thread.
 */
public AsyncTask(){
  mWorker=new WorkerRunnable<Params,Result>(){
    public Result call() throws Exception {
      mTaskInvoked.set(true);
      Process.setThreadPriority(Process.THREAD_PRIORITY_BACKGROUND);
      return postResult(doInBackground(mParams));
    }
  }
;
  mFuture=new FutureTask<Result>(mWorker){
    @Override protected void done(){
      try {
        postResultIfNotInvoked(get());
      }
 catch (      InterruptedException e) {
        android.util.Log.w(LOG_TAG,e);
      }
catch (      ExecutionException e) {
        throw new RuntimeException("String_Node_Str",e.getCause());
      }
catch (      CancellationException e) {
        postResultIfNotInvoked(null);
      }
    }
  }
;
}

Fixed version (ground truth):
/** 
 * Creates a new asynchronous task. This constructor must be invoked on the UI thread.
 */
public AsyncTask(){
  mWorker=new WorkerRunnable<Params,Result>(){
    public Result call() throws Exception {
      mTaskInvoked.set(true);
      Process.setThreadPriority(Process.THREAD_PRIORITY_BACKGROUND);
      Result result=doInBackground(mParams);
      Binder.flushPendingCommands();
      return postResult(result);
    }
  }
;
  mFuture=new FutureTask<Result>(mWorker){
    @Override protected void done(){
      try {
        postResultIfNotInvoked(get());
      }
 catch (      InterruptedException e) {
        android.util.Log.w(LOG_TAG,e);
      }
catch (      ExecutionException e) {
        throw new RuntimeException("String_Node_Str",e.getCause());
      }
catch (      CancellationException e) {
        postResultIfNotInvoked(null);
      }
    }
  }
;
}
Program: 193972
Project: 193972
Buggy source:
public Result call() throws Exception {
  mTaskInvoked.set(true);
  Process.setThreadPriority(Process.THREAD_PRIORITY_BACKGROUND);
  return postResult(doInBackground(mParams));
}

Fixed version (ground truth):
public Result call() throws Exception {
  mTaskInvoked.set(true);
  Process.setThreadPriority(Process.THREAD_PRIORITY_BACKGROUND);
  Result result=doInBackground(mParams);
  Binder.flushPendingCommands();
  return postResult(result);
}
Program: 193973
Project: 193973
Buggy source:
/** 
 * Creates a new asynchronous task. This constructor must be invoked on the UI thread.
 */
public AsyncTask(){
  mWorker=new WorkerRunnable<Params,Result>(){
    public Result call() throws Exception {
      mTaskInvoked.set(true);
      Process.setThreadPriority(Process.THREAD_PRIORITY_BACKGROUND);
      return postResult(doInBackground(mParams));
    }
  }
;
  mFuture=new FutureTask<Result>(mWorker){
    @Override protected void done(){
      try {
        postResultIfNotInvoked(get());
      }
 catch (      InterruptedException e) {
        android.util.Log.w(LOG_TAG,e);
      }
catch (      ExecutionException e) {
        throw new RuntimeException("String_Node_Str",e.getCause());
      }
catch (      CancellationException e) {
        postResultIfNotInvoked(null);
      }
    }
  }
;
}

Fixed version (ground truth):
/** 
 * Creates a new asynchronous task. This constructor must be invoked on the UI thread.
 */
public AsyncTask(){
  mWorker=new WorkerRunnable<Params,Result>(){
    public Result call() throws Exception {
      mTaskInvoked.set(true);
      Process.setThreadPriority(Process.THREAD_PRIORITY_BACKGROUND);
      Result result=doInBackground(mParams);
      Binder.flushPendingCommands();
      return postResult(result);
    }
  }
;
  mFuture=new FutureTask<Result>(mWorker){
    @Override protected void done(){
      try {
        postResultIfNotInvoked(get());
      }
 catch (      InterruptedException e) {
        android.util.Log.w(LOG_TAG,e);
      }
catch (      ExecutionException e) {
        throw new RuntimeException("String_Node_Str",e.getCause());
      }
catch (      CancellationException e) {
        postResultIfNotInvoked(null);
      }
    }
  }
;
}
Program: 193974
Project: 193974
Buggy source:
public Result call() throws Exception {
  mTaskInvoked.set(true);
  Process.setThreadPriority(Process.THREAD_PRIORITY_BACKGROUND);
  return postResult(doInBackground(mParams));
}

Fixed version (ground truth):
public Result call() throws Exception {
  mTaskInvoked.set(true);
  Process.setThreadPriority(Process.THREAD_PRIORITY_BACKGROUND);
  Result result=doInBackground(mParams);
  Binder.flushPendingCommands();
  return postResult(result);
}
Program: 193975
Project: 193975
Buggy source:
/** 
 * Creates a new asynchronous task. This constructor must be invoked on the UI thread.
 */
public AsyncTask(){
  mWorker=new WorkerRunnable<Params,Result>(){
    public Result call() throws Exception {
      mTaskInvoked.set(true);
      Process.setThreadPriority(Process.THREAD_PRIORITY_BACKGROUND);
      return postResult(doInBackground(mParams));
    }
  }
;
  mFuture=new FutureTask<Result>(mWorker){
    @Override protected void done(){
      try {
        postResultIfNotInvoked(get());
      }
 catch (      InterruptedException e) {
        android.util.Log.w(LOG_TAG,e);
      }
catch (      ExecutionException e) {
        throw new RuntimeException("String_Node_Str",e.getCause());
      }
catch (      CancellationException e) {
        postResultIfNotInvoked(null);
      }
    }
  }
;
}

Fixed version (ground truth):
/** 
 * Creates a new asynchronous task. This constructor must be invoked on the UI thread.
 */
public AsyncTask(){
  mWorker=new WorkerRunnable<Params,Result>(){
    public Result call() throws Exception {
      mTaskInvoked.set(true);
      Process.setThreadPriority(Process.THREAD_PRIORITY_BACKGROUND);
      Result result=doInBackground(mParams);
      Binder.flushPendingCommands();
      return postResult(result);
    }
  }
;
  mFuture=new FutureTask<Result>(mWorker){
    @Override protected void done(){
      try {
        postResultIfNotInvoked(get());
      }
 catch (      InterruptedException e) {
        android.util.Log.w(LOG_TAG,e);
      }
catch (      ExecutionException e) {
        throw new RuntimeException("String_Node_Str",e.getCause());
      }
catch (      CancellationException e) {
        postResultIfNotInvoked(null);
      }
    }
  }
;
}
Program: 193976
Project: 193976
Buggy source:
public Result call() throws Exception {
  mTaskInvoked.set(true);
  Process.setThreadPriority(Process.THREAD_PRIORITY_BACKGROUND);
  return postResult(doInBackground(mParams));
}

Fixed version (ground truth):
public Result call() throws Exception {
  mTaskInvoked.set(true);
  Process.setThreadPriority(Process.THREAD_PRIORITY_BACKGROUND);
  Result result=doInBackground(mParams);
  Binder.flushPendingCommands();
  return postResult(result);
}
Program: 193977
Project: 193977
Buggy source:
void keyValueAgentCleanup(){
  mBackupDataName.delete();
  mStageName.delete();
  try {
    if (mBackupData != null)     mBackupData.close();
  }
 catch (  IOException e) {
  }
  try {
    if (mNewState != null)     mNewState.close();
  }
 catch (  IOException e) {
  }
  mBackupData=mNewState=null;
  mNewStateName.delete();
  if (mCurrentPackage.applicationInfo != null) {
    try {
      mActivityManager.unbindBackupAgent(mCurrentPackage.applicationInfo);
      if (mTargetPackage == null && (mCurrentPackage.applicationInfo.flags & ApplicationInfo.FLAG_KILL_AFTER_RESTORE) != 0) {
        if (DEBUG)         Slog.d(TAG,"String_Node_Str" + mCurrentPackage.applicationInfo.processName);
        mActivityManager.killApplicationProcess(mCurrentPackage.applicationInfo.processName,mCurrentPackage.applicationInfo.uid);
      }
    }
 catch (    RemoteException e) {
    }
  }
  mBackupHandler.removeMessages(MSG_TIMEOUT,this);
synchronized (mCurrentOpLock) {
    mCurrentOperations.clear();
  }
}

Fixed version (ground truth):
void keyValueAgentCleanup(){
  mBackupDataName.delete();
  mStageName.delete();
  try {
    if (mBackupData != null)     mBackupData.close();
  }
 catch (  IOException e) {
  }
  try {
    if (mNewState != null)     mNewState.close();
  }
 catch (  IOException e) {
  }
  mBackupData=mNewState=null;
  mNewStateName.delete();
  if (mCurrentPackage.applicationInfo != null) {
    try {
      mActivityManager.unbindBackupAgent(mCurrentPackage.applicationInfo);
      final int appFlags=mCurrentPackage.applicationInfo.flags;
      final boolean killAfterRestore=(mRestoreDescription.getDataType() == RestoreDescription.TYPE_FULL_STREAM) || ((appFlags & ApplicationInfo.FLAG_KILL_AFTER_RESTORE) != 0);
      if (mTargetPackage == null && killAfterRestore) {
        if (DEBUG)         Slog.d(TAG,"String_Node_Str" + mCurrentPackage.applicationInfo.processName);
        mActivityManager.killApplicationProcess(mCurrentPackage.applicationInfo.processName,mCurrentPackage.applicationInfo.uid);
      }
    }
 catch (    RemoteException e) {
    }
  }
  mBackupHandler.removeMessages(MSG_TIMEOUT,this);
synchronized (mCurrentOpLock) {
    mCurrentOperations.clear();
  }
}
Program: 193978
Project: 193978
Buggy source:
/** 
 * Creates a new asynchronous task. This constructor must be invoked on the UI thread.
 */
public AsyncTask(){
  mWorker=new WorkerRunnable<Params,Result>(){
    public Result call() throws Exception {
      mTaskInvoked.set(true);
      Process.setThreadPriority(Process.THREAD_PRIORITY_BACKGROUND);
      return postResult(doInBackground(mParams));
    }
  }
;
  mFuture=new FutureTask<Result>(mWorker){
    @Override protected void done(){
      try {
        postResultIfNotInvoked(get());
      }
 catch (      InterruptedException e) {
        android.util.Log.w(LOG_TAG,e);
      }
catch (      ExecutionException e) {
        throw new RuntimeException("String_Node_Str",e.getCause());
      }
catch (      CancellationException e) {
        postResultIfNotInvoked(null);
      }
    }
  }
;
}

Fixed version (ground truth):
/** 
 * Creates a new asynchronous task. This constructor must be invoked on the UI thread.
 */
public AsyncTask(){
  mWorker=new WorkerRunnable<Params,Result>(){
    public Result call() throws Exception {
      mTaskInvoked.set(true);
      Process.setThreadPriority(Process.THREAD_PRIORITY_BACKGROUND);
      Result result=doInBackground(mParams);
      Binder.flushPendingCommands();
      return postResult(result);
    }
  }
;
  mFuture=new FutureTask<Result>(mWorker){
    @Override protected void done(){
      try {
        postResultIfNotInvoked(get());
      }
 catch (      InterruptedException e) {
        android.util.Log.w(LOG_TAG,e);
      }
catch (      ExecutionException e) {
        throw new RuntimeException("String_Node_Str",e.getCause());
      }
catch (      CancellationException e) {
        postResultIfNotInvoked(null);
      }
    }
  }
;
}
Program: 193979
Project: 193979
Buggy source:
public Result call() throws Exception {
  mTaskInvoked.set(true);
  Process.setThreadPriority(Process.THREAD_PRIORITY_BACKGROUND);
  return postResult(doInBackground(mParams));
}

Fixed version (ground truth):
public Result call() throws Exception {
  mTaskInvoked.set(true);
  Process.setThreadPriority(Process.THREAD_PRIORITY_BACKGROUND);
  Result result=doInBackground(mParams);
  Binder.flushPendingCommands();
  return postResult(result);
}
Program: 193980
Project: 193980
Buggy source:
/** 
 * Creates a new asynchronous task. This constructor must be invoked on the UI thread.
 */
public AsyncTask(){
  mWorker=new WorkerRunnable<Params,Result>(){
    public Result call() throws Exception {
      mTaskInvoked.set(true);
      Process.setThreadPriority(Process.THREAD_PRIORITY_BACKGROUND);
      return postResult(doInBackground(mParams));
    }
  }
;
  mFuture=new FutureTask<Result>(mWorker){
    @Override protected void done(){
      try {
        postResultIfNotInvoked(get());
      }
 catch (      InterruptedException e) {
        android.util.Log.w(LOG_TAG,e);
      }
catch (      ExecutionException e) {
        throw new RuntimeException("String_Node_Str",e.getCause());
      }
catch (      CancellationException e) {
        postResultIfNotInvoked(null);
      }
    }
  }
;
}

Fixed version (ground truth):
/** 
 * Creates a new asynchronous task. This constructor must be invoked on the UI thread.
 */
public AsyncTask(){
  mWorker=new WorkerRunnable<Params,Result>(){
    public Result call() throws Exception {
      mTaskInvoked.set(true);
      Process.setThreadPriority(Process.THREAD_PRIORITY_BACKGROUND);
      Result result=doInBackground(mParams);
      Binder.flushPendingCommands();
      return postResult(result);
    }
  }
;
  mFuture=new FutureTask<Result>(mWorker){
    @Override protected void done(){
      try {
        postResultIfNotInvoked(get());
      }
 catch (      InterruptedException e) {
        android.util.Log.w(LOG_TAG,e);
      }
catch (      ExecutionException e) {
        throw new RuntimeException("String_Node_Str",e.getCause());
      }
catch (      CancellationException e) {
        postResultIfNotInvoked(null);
      }
    }
  }
;
}
Program: 193981
Project: 193981
Buggy source:
public Result call() throws Exception {
  mTaskInvoked.set(true);
  Process.setThreadPriority(Process.THREAD_PRIORITY_BACKGROUND);
  return postResult(doInBackground(mParams));
}

Fixed version (ground truth):
public Result call() throws Exception {
  mTaskInvoked.set(true);
  Process.setThreadPriority(Process.THREAD_PRIORITY_BACKGROUND);
  Result result=doInBackground(mParams);
  Binder.flushPendingCommands();
  return postResult(result);
}