nus-yam/ex-repair huggingface dataset:
Program: 191885
Project: 191885
Buggy source:
private boolean animateForMinimizedDockedStack(long now){
  final TaskStack stack=mDisplayContent.getDockedStackVisibleForUserLocked();
  if (!mAnimationStarted) {
    mAnimationStarted=true;
    mAnimationStartTime=now;
    final long transitionDuration=isAnimationMaximizing() ? mService.mAppTransition.getLastClipRevealTransitionDuration() : DEFAULT_APP_TRANSITION_DURATION;
    mAnimationDuration=(long)(transitionDuration * mService.getTransitionAnimationScaleLocked());
    mMaximizeMeetFraction=getClipRevealMeetFraction(stack);
    notifyDockedStackMinimizedChanged(mMinimizedDock,(long)(mAnimationDuration * mMaximizeMeetFraction));
  }
  float t=Math.min(1f,(float)(now - mAnimationStartTime) / mAnimationDuration);
  t=(isAnimationMaximizing() ? TOUCH_RESPONSE_INTERPOLATOR : mMinimizedDockInterpolator).getInterpolation(t);
  if (stack != null) {
    if (stack.setAdjustedForMinimizedDock(getMinimizeAmount(stack,t))) {
      mService.mWindowPlacerLocked.performSurfacePlacement();
    }
  }
  if (t >= 1.0f) {
    mAnimatingForMinimizedDockedStack=false;
    return false;
  }
 else {
    return true;
  }
}

Fixed version (ground truth):
private boolean animateForMinimizedDockedStack(long now){
  final TaskStack stack=mService.mStackIdToStack.get(DOCKED_STACK_ID);
  if (!mAnimationStarted) {
    mAnimationStarted=true;
    mAnimationStartTime=now;
    final long transitionDuration=isAnimationMaximizing() ? mService.mAppTransition.getLastClipRevealTransitionDuration() : DEFAULT_APP_TRANSITION_DURATION;
    mAnimationDuration=(long)(transitionDuration * mService.getTransitionAnimationScaleLocked());
    mMaximizeMeetFraction=getClipRevealMeetFraction(stack);
    notifyDockedStackMinimizedChanged(mMinimizedDock,(long)(mAnimationDuration * mMaximizeMeetFraction));
  }
  float t=Math.min(1f,(float)(now - mAnimationStartTime) / mAnimationDuration);
  t=(isAnimationMaximizing() ? TOUCH_RESPONSE_INTERPOLATOR : mMinimizedDockInterpolator).getInterpolation(t);
  if (stack != null) {
    if (stack.setAdjustedForMinimizedDock(getMinimizeAmount(stack,t))) {
      mService.mWindowPlacerLocked.performSurfacePlacement();
    }
  }
  if (t >= 1.0f) {
    mAnimatingForMinimizedDockedStack=false;
    return false;
  }
 else {
    return true;
  }
}
Program: 191886
Project: 191886
Buggy source:
/** 
 * Notifies the docked stack divider controller of a visibility change that happens without an animation.
 */
void notifyAppVisibilityChanged(AppWindowToken wtoken,boolean visible){
  final Task task=wtoken.mTask;
  if (!task.isHomeTask() || !task.isVisibleForUser()) {
    return;
  }
  if (task.getTopVisibleAppToken() == null || task.getTopVisibleAppToken() != wtoken) {
    return;
  }
  if (isWithinDisplay(task) && mDisplayContent.getDockedStackVisibleForUserLocked() != null) {
    setMinimizedDockedStack(visible,false);
  }
}

Fixed version (ground truth):
/** 
 * Notifies the docked stack divider controller of a visibility change that happens without an animation.
 */
void notifyAppVisibilityChanged(AppWindowToken wtoken,boolean visible){
  final Task task=wtoken.mTask;
  if (!task.isHomeTask() || !task.isVisibleForUser()) {
    return;
  }
  if (task.getTopAppToken() == null || task.getTopAppToken() != wtoken) {
    return;
  }
  if (isWithinDisplay(task) && mDisplayContent.getDockedStackVisibleForUserLocked() != null) {
    setMinimizedDockedStack(visible,false);
  }
}
Program: 191887
Project: 191887
Buggy source:
public void dump(String prefix,PrintWriter pw){
  pw.println(prefix + "String_Node_Str" + mStackId);
  pw.println(prefix + "String_Node_Str" + mDeferDetach);
  pw.println(prefix + "String_Node_Str" + mFullscreen);
  pw.println(prefix + "String_Node_Str" + mBounds.toShortString());
  if (!mAdjustedBounds.isEmpty()) {
    pw.println(prefix + "String_Node_Str" + mAdjustedBounds.toShortString());
  }
  for (int taskNdx=mTasks.size() - 1; taskNdx >= 0; taskNdx--) {
    mTasks.get(taskNdx).dump(prefix + "String_Node_Str",pw);
  }
  if (mAnimationBackgroundSurface.isDimming()) {
    pw.println(prefix + "String_Node_Str");
    mAnimationBackgroundSurface.printTo(prefix + "String_Node_Str",pw);
  }
  if (!mExitingAppTokens.isEmpty()) {
    pw.println();
    pw.println("String_Node_Str");
    for (int i=mExitingAppTokens.size() - 1; i >= 0; i--) {
      WindowToken token=mExitingAppTokens.get(i);
      pw.print("String_Node_Str");
      pw.print(i);
      pw.print(' ');
      pw.print(token);
      pw.println(':');
      token.dump(pw,"String_Node_Str");
    }
  }
}

Fixed version (ground truth):
public void dump(String prefix,PrintWriter pw){
  pw.println(prefix + "String_Node_Str" + mStackId);
  pw.println(prefix + "String_Node_Str" + mDeferDetach);
  pw.println(prefix + "String_Node_Str" + mFullscreen);
  pw.println(prefix + "String_Node_Str" + mBounds.toShortString());
  if (mMinimizeAmount != 0f) {
    pw.println(prefix + "String_Node_Str" + mMinimizeAmount);
  }
  if (mAdjustedForIme) {
    pw.println(prefix + "String_Node_Str");
    pw.println(prefix + "String_Node_Str" + mAdjustImeAmount);
    pw.println(prefix + "String_Node_Str" + mAdjustDividerAmount);
  }
  if (!mAdjustedBounds.isEmpty()) {
    pw.println(prefix + "String_Node_Str" + mAdjustedBounds.toShortString());
  }
  for (int taskNdx=mTasks.size() - 1; taskNdx >= 0; taskNdx--) {
    mTasks.get(taskNdx).dump(prefix + "String_Node_Str",pw);
  }
  if (mAnimationBackgroundSurface.isDimming()) {
    pw.println(prefix + "String_Node_Str");
    mAnimationBackgroundSurface.printTo(prefix + "String_Node_Str",pw);
  }
  if (!mExitingAppTokens.isEmpty()) {
    pw.println();
    pw.println("String_Node_Str");
    for (int i=mExitingAppTokens.size() - 1; i >= 0; i--) {
      WindowToken token=mExitingAppTokens.get(i);
      pw.print("String_Node_Str");
      pw.print(i);
      pw.print(' ');
      pw.print(token);
      pw.println(':');
      token.dump(pw,"String_Node_Str");
    }
  }
}
Program: 191890
Project: 191890
Buggy source:
/** 
 * Notify registered observers within the designated user(s) that a row was updated.
 * @hide
 */
public void notifyChange(Uri uri,ContentObserver observer,@NotifyFlags int flags,@UserIdInt int userHandle){
  try {
    getContentService().notifyChange(uri,observer == null ? null : observer.getContentObserver(),observer != null && observer.deliverSelfNotifications(),flags,userHandle);
  }
 catch (  RemoteException e) {
  }
}

Fixed version (ground truth):
/** 
 * Notify registered observers within the designated user(s) that a row was updated.
 * @hide
 */
public void notifyChange(@NonNull Uri uri,ContentObserver observer,@NotifyFlags int flags,@UserIdInt int userHandle){
  try {
    getContentService().notifyChange(uri,observer == null ? null : observer.getContentObserver(),observer != null && observer.deliverSelfNotifications(),flags,userHandle);
  }
 catch (  RemoteException e) {
  }
}
Program: 191891
Project: 191891
Buggy source:
/** 
 * Notify registered observers within the designated user(s) that a row was updated.
 * @hide
 */
public void notifyChange(Uri uri,ContentObserver observer,@NotifyFlags int flags,@UserIdInt int userHandle){
  try {
    getContentService().notifyChange(uri,observer == null ? null : observer.getContentObserver(),observer != null && observer.deliverSelfNotifications(),flags,userHandle);
  }
 catch (  RemoteException e) {
  }
}

Fixed version (ground truth):
/** 
 * Notify registered observers within the designated user(s) that a row was updated.
 * @hide
 */
public void notifyChange(@NonNull Uri uri,ContentObserver observer,@NotifyFlags int flags,@UserIdInt int userHandle){
  try {
    getContentService().notifyChange(uri,observer == null ? null : observer.getContentObserver(),observer != null && observer.deliverSelfNotifications(),flags,userHandle);
  }
 catch (  RemoteException e) {
  }
}
Program: 191893
Project: 191893
Buggy source:
/** 
 * Notify registered observers within the designated user(s) that a row was updated.
 * @hide
 */
public void notifyChange(Uri uri,ContentObserver observer,@NotifyFlags int flags,@UserIdInt int userHandle){
  try {
    getContentService().notifyChange(uri,observer == null ? null : observer.getContentObserver(),observer != null && observer.deliverSelfNotifications(),flags,userHandle);
  }
 catch (  RemoteException e) {
  }
}

Fixed version (ground truth):
/** 
 * Notify registered observers within the designated user(s) that a row was updated.
 * @hide
 */
public void notifyChange(@NonNull Uri uri,ContentObserver observer,@NotifyFlags int flags,@UserIdInt int userHandle){
  try {
    getContentService().notifyChange(uri,observer == null ? null : observer.getContentObserver(),observer != null && observer.deliverSelfNotifications(),flags,userHandle);
  }
 catch (  RemoteException e) {
  }
}
Program: 191894
Project: 191894
Buggy source:
@Override protected void updateTransformedTypes(){
  super.updateTransformedTypes();
  if (mActions != null) {
    mTransformationHelper.addTransformedView(TransformableView.TRANSFORMING_VIEW_TEXT,mActions);
  }
}

Fixed version (ground truth):
@Override protected void updateTransformedTypes(){
  super.updateTransformedTypes();
  if (mActions != null) {
    mTransformationHelper.addTransformedView(TransformableView.TRANSFORMING_VIEW_ACTIONS,mActions);
  }
}
Program: 191895
Project: 191895
Buggy source:
@Override protected void updateTransformedTypes(){
  super.updateTransformedTypes();
  if (mActions != null) {
    mTransformationHelper.addTransformedView(TransformableView.TRANSFORMING_VIEW_TEXT,mActions);
  }
}

Fixed version (ground truth):
@Override protected void updateTransformedTypes(){
  super.updateTransformedTypes();
  if (mActions != null) {
    mTransformationHelper.addTransformedView(TransformableView.TRANSFORMING_VIEW_ACTIONS,mActions);
  }
}
Program: 191896
Project: 191896
Buggy source:
private int runQueryIntentReceivers(){
  Intent intent;
  try {
    intent=parseIntentAndUser();
  }
 catch (  URISyntaxException e) {
    throw new RuntimeException(e.getMessage(),e);
  }
  try {
    List<ResolveInfo> result=mInterface.queryIntentReceivers(intent,null,0,mTargetUser).getList();
    PrintWriter pw=getOutPrintWriter();
    if (result == null || result.size() <= 0) {
      pw.println("String_Node_Str");
    }
 else {
      pw.print(result.size());
      pw.println("String_Node_Str");
      PrintWriterPrinter pr=new PrintWriterPrinter(pw);
      for (int i=0; i < result.size(); i++) {
        pw.print("String_Node_Str");
        pw.print(i);
        pw.println("String_Node_Str");
        result.get(i).dump(pr,"String_Node_Str");
      }
    }
  }
 catch (  RemoteException e) {
    throw new RuntimeException("String_Node_Str",e);
  }
  return 0;
}

Fixed version (ground truth):
private int runQueryIntentReceivers(){
  Intent intent;
  try {
    intent=parseIntentAndUser();
  }
 catch (  URISyntaxException e) {
    throw new RuntimeException(e.getMessage(),e);
  }
  try {
    List<ResolveInfo> result=mInterface.queryIntentReceivers(intent,null,0,mTargetUser).getList();
    PrintWriter pw=getOutPrintWriter();
    if (result == null || result.size() <= 0) {
      pw.println("String_Node_Str");
    }
 else {
      if (!mComponents) {
        pw.print(result.size());
        pw.println("String_Node_Str");
        PrintWriterPrinter pr=new PrintWriterPrinter(pw);
        for (int i=0; i < result.size(); i++) {
          pw.print("String_Node_Str");
          pw.print(i);
          pw.println("String_Node_Str");
          printResolveInfo(pr,"String_Node_Str",result.get(i),mBrief,mComponents);
        }
      }
 else {
        PrintWriterPrinter pr=new PrintWriterPrinter(pw);
        for (int i=0; i < result.size(); i++) {
          printResolveInfo(pr,"String_Node_Str",result.get(i),mBrief,mComponents);
        }
      }
    }
  }
 catch (  RemoteException e) {
    throw new RuntimeException("String_Node_Str",e);
  }
  return 0;
}
Program: 191897
Project: 191897
Buggy source:
private Intent parseIntentAndUser() throws URISyntaxException {
  mTargetUser=UserHandle.USER_CURRENT;
  Intent intent=Intent.parseCommandArgs(this,new Intent.CommandOptionHandler(){
    @Override public boolean handleOption(    String opt,    ShellCommand cmd){
      if ("String_Node_Str".equals(opt)) {
        mTargetUser=UserHandle.parseUserArg(cmd.getNextArgRequired());
        return true;
      }
      return false;
    }
  }
);
  mTargetUser=ActivityManager.handleIncomingUser(Binder.getCallingPid(),Binder.getCallingUid(),mTargetUser,false,false,null,null);
  return intent;
}

Fixed version (ground truth):
private Intent parseIntentAndUser() throws URISyntaxException {
  mTargetUser=UserHandle.USER_CURRENT;
  mBrief=false;
  mComponents=false;
  Intent intent=Intent.parseCommandArgs(this,new Intent.CommandOptionHandler(){
    @Override public boolean handleOption(    String opt,    ShellCommand cmd){
      if ("String_Node_Str".equals(opt)) {
        mTargetUser=UserHandle.parseUserArg(cmd.getNextArgRequired());
        return true;
      }
 else       if ("String_Node_Str".equals(opt)) {
        mBrief=true;
        return true;
      }
 else       if ("String_Node_Str".equals(opt)) {
        mComponents=true;
        return true;
      }
      return false;
    }
  }
);
  mTargetUser=ActivityManager.handleIncomingUser(Binder.getCallingPid(),Binder.getCallingUid(),mTargetUser,false,false,null,null);
  return intent;
}
Program: 191898
Project: 191898
Buggy source:
private int runQueryIntentActivities(){
  Intent intent;
  try {
    intent=parseIntentAndUser();
  }
 catch (  URISyntaxException e) {
    throw new RuntimeException(e.getMessage(),e);
  }
  try {
    List<ResolveInfo> result=mInterface.queryIntentActivities(intent,null,0,mTargetUser).getList();
    PrintWriter pw=getOutPrintWriter();
    if (result == null || result.size() <= 0) {
      pw.println("String_Node_Str");
    }
 else {
      pw.print(result.size());
      pw.println("String_Node_Str");
      PrintWriterPrinter pr=new PrintWriterPrinter(pw);
      for (int i=0; i < result.size(); i++) {
        pw.print("String_Node_Str");
        pw.print(i);
        pw.println("String_Node_Str");
        result.get(i).dump(pr,"String_Node_Str");
      }
    }
  }
 catch (  RemoteException e) {
    throw new RuntimeException("String_Node_Str",e);
  }
  return 0;
}

Fixed version (ground truth):
private int runQueryIntentActivities(){
  Intent intent;
  try {
    intent=parseIntentAndUser();
  }
 catch (  URISyntaxException e) {
    throw new RuntimeException(e.getMessage(),e);
  }
  try {
    List<ResolveInfo> result=mInterface.queryIntentActivities(intent,null,0,mTargetUser).getList();
    PrintWriter pw=getOutPrintWriter();
    if (result == null || result.size() <= 0) {
      pw.println("String_Node_Str");
    }
 else {
      if (!mComponents) {
        pw.print(result.size());
        pw.println("String_Node_Str");
        PrintWriterPrinter pr=new PrintWriterPrinter(pw);
        for (int i=0; i < result.size(); i++) {
          pw.print("String_Node_Str");
          pw.print(i);
          pw.println("String_Node_Str");
          printResolveInfo(pr,"String_Node_Str",result.get(i),mBrief,mComponents);
        }
      }
 else {
        PrintWriterPrinter pr=new PrintWriterPrinter(pw);
        for (int i=0; i < result.size(); i++) {
          printResolveInfo(pr,"String_Node_Str",result.get(i),mBrief,mComponents);
        }
      }
    }
  }
 catch (  RemoteException e) {
    throw new RuntimeException("String_Node_Str",e);
  }
  return 0;
}
Program: 191899
Project: 191899
Buggy source:
@Override public boolean handleOption(String opt,ShellCommand cmd){
  if ("String_Node_Str".equals(opt)) {
    mTargetUser=UserHandle.parseUserArg(cmd.getNextArgRequired());
    return true;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean handleOption(String opt,ShellCommand cmd){
  if ("String_Node_Str".equals(opt)) {
    mTargetUser=UserHandle.parseUserArg(cmd.getNextArgRequired());
    return true;
  }
 else   if ("String_Node_Str".equals(opt)) {
    mBrief=true;
    return true;
  }
 else   if ("String_Node_Str".equals(opt)) {
    mComponents=true;
    return true;
  }
  return false;
}
Program: 191900
Project: 191900
Buggy source:
private int runQueryIntentServices(){
  Intent intent;
  try {
    intent=parseIntentAndUser();
  }
 catch (  URISyntaxException e) {
    throw new RuntimeException(e.getMessage(),e);
  }
  try {
    List<ResolveInfo> result=mInterface.queryIntentServices(intent,null,0,mTargetUser).getList();
    PrintWriter pw=getOutPrintWriter();
    if (result == null || result.size() <= 0) {
      pw.println("String_Node_Str");
    }
 else {
      pw.print(result.size());
      pw.println("String_Node_Str");
      PrintWriterPrinter pr=new PrintWriterPrinter(pw);
      for (int i=0; i < result.size(); i++) {
        pw.print("String_Node_Str");
        pw.print(i);
        pw.println("String_Node_Str");
        result.get(i).dump(pr,"String_Node_Str");
      }
    }
  }
 catch (  RemoteException e) {
    throw new RuntimeException("String_Node_Str",e);
  }
  return 0;
}

Fixed version (ground truth):
private int runQueryIntentServices(){
  Intent intent;
  try {
    intent=parseIntentAndUser();
  }
 catch (  URISyntaxException e) {
    throw new RuntimeException(e.getMessage(),e);
  }
  try {
    List<ResolveInfo> result=mInterface.queryIntentServices(intent,null,0,mTargetUser).getList();
    PrintWriter pw=getOutPrintWriter();
    if (result == null || result.size() <= 0) {
      pw.println("String_Node_Str");
    }
 else {
      if (!mComponents) {
        pw.print(result.size());
        pw.println("String_Node_Str");
        PrintWriterPrinter pr=new PrintWriterPrinter(pw);
        for (int i=0; i < result.size(); i++) {
          pw.print("String_Node_Str");
          pw.print(i);
          pw.println("String_Node_Str");
          printResolveInfo(pr,"String_Node_Str",result.get(i),mBrief,mComponents);
        }
      }
 else {
        PrintWriterPrinter pr=new PrintWriterPrinter(pw);
        for (int i=0; i < result.size(); i++) {
          printResolveInfo(pr,"String_Node_Str",result.get(i),mBrief,mComponents);
        }
      }
    }
  }
 catch (  RemoteException e) {
    throw new RuntimeException("String_Node_Str",e);
  }
  return 0;
}
Program: 191901
Project: 191901
Buggy source:
private int runResolveActivity(){
  Intent intent;
  try {
    intent=parseIntentAndUser();
  }
 catch (  URISyntaxException e) {
    throw new RuntimeException(e.getMessage(),e);
  }
  try {
    ResolveInfo ri=mInterface.resolveIntent(intent,null,0,mTargetUser);
    PrintWriter pw=getOutPrintWriter();
    if (ri == null) {
      pw.println("String_Node_Str");
    }
 else {
      PrintWriterPrinter pr=new PrintWriterPrinter(pw);
      ri.dump(pr,"String_Node_Str");
    }
  }
 catch (  RemoteException e) {
    throw new RuntimeException("String_Node_Str",e);
  }
  return 0;
}

Fixed version (ground truth):
private int runResolveActivity(){
  Intent intent;
  try {
    intent=parseIntentAndUser();
  }
 catch (  URISyntaxException e) {
    throw new RuntimeException(e.getMessage(),e);
  }
  try {
    ResolveInfo ri=mInterface.resolveIntent(intent,null,0,mTargetUser);
    PrintWriter pw=getOutPrintWriter();
    if (ri == null) {
      pw.println("String_Node_Str");
    }
 else {
      PrintWriterPrinter pr=new PrintWriterPrinter(pw);
      printResolveInfo(pr,"String_Node_Str",ri,mBrief,mComponents);
    }
  }
 catch (  RemoteException e) {
    throw new RuntimeException("String_Node_Str",e);
  }
  return 0;
}
Program: 191902
Project: 191902
Buggy source:
@Override protected void updateTransformedTypes(){
  super.updateTransformedTypes();
  if (mActions != null) {
    mTransformationHelper.addTransformedView(TransformableView.TRANSFORMING_VIEW_TEXT,mActions);
  }
}

Fixed version (ground truth):
@Override protected void updateTransformedTypes(){
  super.updateTransformedTypes();
  if (mActions != null) {
    mTransformationHelper.addTransformedView(TransformableView.TRANSFORMING_VIEW_ACTIONS,mActions);
  }
}
Program: 191903
Project: 191903
Buggy source:
private int runQueryIntentReceivers(){
  Intent intent;
  try {
    intent=parseIntentAndUser();
  }
 catch (  URISyntaxException e) {
    throw new RuntimeException(e.getMessage(),e);
  }
  try {
    List<ResolveInfo> result=mInterface.queryIntentReceivers(intent,null,0,mTargetUser).getList();
    PrintWriter pw=getOutPrintWriter();
    if (result == null || result.size() <= 0) {
      pw.println("String_Node_Str");
    }
 else {
      pw.print(result.size());
      pw.println("String_Node_Str");
      PrintWriterPrinter pr=new PrintWriterPrinter(pw);
      for (int i=0; i < result.size(); i++) {
        pw.print("String_Node_Str");
        pw.print(i);
        pw.println("String_Node_Str");
        result.get(i).dump(pr,"String_Node_Str");
      }
    }
  }
 catch (  RemoteException e) {
    throw new RuntimeException("String_Node_Str",e);
  }
  return 0;
}

Fixed version (ground truth):
private int runQueryIntentReceivers(){
  Intent intent;
  try {
    intent=parseIntentAndUser();
  }
 catch (  URISyntaxException e) {
    throw new RuntimeException(e.getMessage(),e);
  }
  try {
    List<ResolveInfo> result=mInterface.queryIntentReceivers(intent,null,0,mTargetUser).getList();
    PrintWriter pw=getOutPrintWriter();
    if (result == null || result.size() <= 0) {
      pw.println("String_Node_Str");
    }
 else {
      if (!mComponents) {
        pw.print(result.size());
        pw.println("String_Node_Str");
        PrintWriterPrinter pr=new PrintWriterPrinter(pw);
        for (int i=0; i < result.size(); i++) {
          pw.print("String_Node_Str");
          pw.print(i);
          pw.println("String_Node_Str");
          printResolveInfo(pr,"String_Node_Str",result.get(i),mBrief,mComponents);
        }
      }
 else {
        PrintWriterPrinter pr=new PrintWriterPrinter(pw);
        for (int i=0; i < result.size(); i++) {
          printResolveInfo(pr,"String_Node_Str",result.get(i),mBrief,mComponents);
        }
      }
    }
  }
 catch (  RemoteException e) {
    throw new RuntimeException("String_Node_Str",e);
  }
  return 0;
}
Program: 191904
Project: 191904
Buggy source:
private Intent parseIntentAndUser() throws URISyntaxException {
  mTargetUser=UserHandle.USER_CURRENT;
  Intent intent=Intent.parseCommandArgs(this,new Intent.CommandOptionHandler(){
    @Override public boolean handleOption(    String opt,    ShellCommand cmd){
      if ("String_Node_Str".equals(opt)) {
        mTargetUser=UserHandle.parseUserArg(cmd.getNextArgRequired());
        return true;
      }
      return false;
    }
  }
);
  mTargetUser=ActivityManager.handleIncomingUser(Binder.getCallingPid(),Binder.getCallingUid(),mTargetUser,false,false,null,null);
  return intent;
}

Fixed version (ground truth):
private Intent parseIntentAndUser() throws URISyntaxException {
  mTargetUser=UserHandle.USER_CURRENT;
  mBrief=false;
  mComponents=false;
  Intent intent=Intent.parseCommandArgs(this,new Intent.CommandOptionHandler(){
    @Override public boolean handleOption(    String opt,    ShellCommand cmd){
      if ("String_Node_Str".equals(opt)) {
        mTargetUser=UserHandle.parseUserArg(cmd.getNextArgRequired());
        return true;
      }
 else       if ("String_Node_Str".equals(opt)) {
        mBrief=true;
        return true;
      }
 else       if ("String_Node_Str".equals(opt)) {
        mComponents=true;
        return true;
      }
      return false;
    }
  }
);
  mTargetUser=ActivityManager.handleIncomingUser(Binder.getCallingPid(),Binder.getCallingUid(),mTargetUser,false,false,null,null);
  return intent;
}
Program: 191905
Project: 191905
Buggy source:
private int runQueryIntentActivities(){
  Intent intent;
  try {
    intent=parseIntentAndUser();
  }
 catch (  URISyntaxException e) {
    throw new RuntimeException(e.getMessage(),e);
  }
  try {
    List<ResolveInfo> result=mInterface.queryIntentActivities(intent,null,0,mTargetUser).getList();
    PrintWriter pw=getOutPrintWriter();
    if (result == null || result.size() <= 0) {
      pw.println("String_Node_Str");
    }
 else {
      pw.print(result.size());
      pw.println("String_Node_Str");
      PrintWriterPrinter pr=new PrintWriterPrinter(pw);
      for (int i=0; i < result.size(); i++) {
        pw.print("String_Node_Str");
        pw.print(i);
        pw.println("String_Node_Str");
        result.get(i).dump(pr,"String_Node_Str");
      }
    }
  }
 catch (  RemoteException e) {
    throw new RuntimeException("String_Node_Str",e);
  }
  return 0;
}

Fixed version (ground truth):
private int runQueryIntentActivities(){
  Intent intent;
  try {
    intent=parseIntentAndUser();
  }
 catch (  URISyntaxException e) {
    throw new RuntimeException(e.getMessage(),e);
  }
  try {
    List<ResolveInfo> result=mInterface.queryIntentActivities(intent,null,0,mTargetUser).getList();
    PrintWriter pw=getOutPrintWriter();
    if (result == null || result.size() <= 0) {
      pw.println("String_Node_Str");
    }
 else {
      if (!mComponents) {
        pw.print(result.size());
        pw.println("String_Node_Str");
        PrintWriterPrinter pr=new PrintWriterPrinter(pw);
        for (int i=0; i < result.size(); i++) {
          pw.print("String_Node_Str");
          pw.print(i);
          pw.println("String_Node_Str");
          printResolveInfo(pr,"String_Node_Str",result.get(i),mBrief,mComponents);
        }
      }
 else {
        PrintWriterPrinter pr=new PrintWriterPrinter(pw);
        for (int i=0; i < result.size(); i++) {
          printResolveInfo(pr,"String_Node_Str",result.get(i),mBrief,mComponents);
        }
      }
    }
  }
 catch (  RemoteException e) {
    throw new RuntimeException("String_Node_Str",e);
  }
  return 0;
}
Program: 191906
Project: 191906
Buggy source:
@Override public boolean handleOption(String opt,ShellCommand cmd){
  if ("String_Node_Str".equals(opt)) {
    mTargetUser=UserHandle.parseUserArg(cmd.getNextArgRequired());
    return true;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean handleOption(String opt,ShellCommand cmd){
  if ("String_Node_Str".equals(opt)) {
    mTargetUser=UserHandle.parseUserArg(cmd.getNextArgRequired());
    return true;
  }
 else   if ("String_Node_Str".equals(opt)) {
    mBrief=true;
    return true;
  }
 else   if ("String_Node_Str".equals(opt)) {
    mComponents=true;
    return true;
  }
  return false;
}
Program: 191907
Project: 191907
Buggy source:
private int runQueryIntentServices(){
  Intent intent;
  try {
    intent=parseIntentAndUser();
  }
 catch (  URISyntaxException e) {
    throw new RuntimeException(e.getMessage(),e);
  }
  try {
    List<ResolveInfo> result=mInterface.queryIntentServices(intent,null,0,mTargetUser).getList();
    PrintWriter pw=getOutPrintWriter();
    if (result == null || result.size() <= 0) {
      pw.println("String_Node_Str");
    }
 else {
      pw.print(result.size());
      pw.println("String_Node_Str");
      PrintWriterPrinter pr=new PrintWriterPrinter(pw);
      for (int i=0; i < result.size(); i++) {
        pw.print("String_Node_Str");
        pw.print(i);
        pw.println("String_Node_Str");
        result.get(i).dump(pr,"String_Node_Str");
      }
    }
  }
 catch (  RemoteException e) {
    throw new RuntimeException("String_Node_Str",e);
  }
  return 0;
}

Fixed version (ground truth):
private int runQueryIntentServices(){
  Intent intent;
  try {
    intent=parseIntentAndUser();
  }
 catch (  URISyntaxException e) {
    throw new RuntimeException(e.getMessage(),e);
  }
  try {
    List<ResolveInfo> result=mInterface.queryIntentServices(intent,null,0,mTargetUser).getList();
    PrintWriter pw=getOutPrintWriter();
    if (result == null || result.size() <= 0) {
      pw.println("String_Node_Str");
    }
 else {
      if (!mComponents) {
        pw.print(result.size());
        pw.println("String_Node_Str");
        PrintWriterPrinter pr=new PrintWriterPrinter(pw);
        for (int i=0; i < result.size(); i++) {
          pw.print("String_Node_Str");
          pw.print(i);
          pw.println("String_Node_Str");
          printResolveInfo(pr,"String_Node_Str",result.get(i),mBrief,mComponents);
        }
      }
 else {
        PrintWriterPrinter pr=new PrintWriterPrinter(pw);
        for (int i=0; i < result.size(); i++) {
          printResolveInfo(pr,"String_Node_Str",result.get(i),mBrief,mComponents);
        }
      }
    }
  }
 catch (  RemoteException e) {
    throw new RuntimeException("String_Node_Str",e);
  }
  return 0;
}
Program: 191908
Project: 191908
Buggy source:
private int runResolveActivity(){
  Intent intent;
  try {
    intent=parseIntentAndUser();
  }
 catch (  URISyntaxException e) {
    throw new RuntimeException(e.getMessage(),e);
  }
  try {
    ResolveInfo ri=mInterface.resolveIntent(intent,null,0,mTargetUser);
    PrintWriter pw=getOutPrintWriter();
    if (ri == null) {
      pw.println("String_Node_Str");
    }
 else {
      PrintWriterPrinter pr=new PrintWriterPrinter(pw);
      ri.dump(pr,"String_Node_Str");
    }
  }
 catch (  RemoteException e) {
    throw new RuntimeException("String_Node_Str",e);
  }
  return 0;
}

Fixed version (ground truth):
private int runResolveActivity(){
  Intent intent;
  try {
    intent=parseIntentAndUser();
  }
 catch (  URISyntaxException e) {
    throw new RuntimeException(e.getMessage(),e);
  }
  try {
    ResolveInfo ri=mInterface.resolveIntent(intent,null,0,mTargetUser);
    PrintWriter pw=getOutPrintWriter();
    if (ri == null) {
      pw.println("String_Node_Str");
    }
 else {
      PrintWriterPrinter pr=new PrintWriterPrinter(pw);
      printResolveInfo(pr,"String_Node_Str",ri,mBrief,mComponents);
    }
  }
 catch (  RemoteException e) {
    throw new RuntimeException("String_Node_Str",e);
  }
  return 0;
}
Program: 191909
Project: 191909
Buggy source:
void cancel(){
  if (DEBUG)   Log.v(TAG,"String_Node_Str" + this);
  if (mStarted && mLoader != null && mListenerRegistered) {
    if (!mLoader.cancelLoad()) {
      onLoadCanceled(mLoader);
    }
  }
}

Fixed version (ground truth):
boolean cancel(){
  if (DEBUG)   Log.v(TAG,"String_Node_Str" + this);
  if (mStarted && mLoader != null && mListenerRegistered) {
    final boolean cancelLoadResult=mLoader.cancelLoad();
    if (!cancelLoadResult) {
      onLoadCanceled(mLoader);
    }
    return cancelLoadResult;
  }
  return false;
}
Program: 191911
Project: 191911
Buggy source:
void cancel(){
  if (DEBUG)   Log.v(TAG,"String_Node_Str" + this);
  if (mStarted && mLoader != null && mListenerRegistered) {
    if (!mLoader.cancelLoad()) {
      onLoadCanceled(mLoader);
    }
  }
}

Fixed version (ground truth):
boolean cancel(){
  if (DEBUG)   Log.v(TAG,"String_Node_Str" + this);
  if (mStarted && mLoader != null && mListenerRegistered) {
    final boolean cancelLoadResult=mLoader.cancelLoad();
    if (!cancelLoadResult) {
      onLoadCanceled(mLoader);
    }
    return cancelLoadResult;
  }
  return false;
}
Program: 191913
Project: 191913
Buggy source:
void cancel(){
  if (DEBUG)   Log.v(TAG,"String_Node_Str" + this);
  if (mStarted && mLoader != null && mListenerRegistered) {
    if (!mLoader.cancelLoad()) {
      onLoadCanceled(mLoader);
    }
  }
}

Fixed version (ground truth):
boolean cancel(){
  if (DEBUG)   Log.v(TAG,"String_Node_Str" + this);
  if (mStarted && mLoader != null && mListenerRegistered) {
    final boolean cancelLoadResult=mLoader.cancelLoad();
    if (!cancelLoadResult) {
      onLoadCanceled(mLoader);
    }
    return cancelLoadResult;
  }
  return false;
}
Program: 191916
Project: 191916
Buggy source:
@Override public int movePackage(final String packageName,final String volumeUuid){
  mContext.enforceCallingOrSelfPermission(android.Manifest.permission.MOVE_PACKAGE,null);
  final int moveId=mNextMoveId.getAndIncrement();
  mHandler.post(new Runnable(){
    @Override public void run(){
      try {
        movePackageInternal(packageName,volumeUuid,moveId);
      }
 catch (      PackageManagerException e) {
        Slog.w(TAG,"String_Node_Str" + packageName,e);
        mMoveCallbacks.notifyStatusChanged(moveId,PackageManager.MOVE_FAILED_INTERNAL_ERROR);
      }
    }
  }
);
  return moveId;
}

Fixed version (ground truth):
@Override public int movePackage(final String packageName,final String volumeUuid){
  mContext.enforceCallingOrSelfPermission(android.Manifest.permission.MOVE_PACKAGE,null);
  final UserHandle user=new UserHandle(UserHandle.getCallingUserId());
  final int moveId=mNextMoveId.getAndIncrement();
  mHandler.post(new Runnable(){
    @Override public void run(){
      try {
        movePackageInternal(packageName,volumeUuid,moveId,user);
      }
 catch (      PackageManagerException e) {
        Slog.w(TAG,"String_Node_Str" + packageName,e);
        mMoveCallbacks.notifyStatusChanged(moveId,PackageManager.MOVE_FAILED_INTERNAL_ERROR);
      }
    }
  }
);
  return moveId;
}
Program: 191919
Project: 191919
Buggy source:
@Override public int movePackage(final String packageName,final String volumeUuid){
  mContext.enforceCallingOrSelfPermission(android.Manifest.permission.MOVE_PACKAGE,null);
  final int moveId=mNextMoveId.getAndIncrement();
  mHandler.post(new Runnable(){
    @Override public void run(){
      try {
        movePackageInternal(packageName,volumeUuid,moveId);
      }
 catch (      PackageManagerException e) {
        Slog.w(TAG,"String_Node_Str" + packageName,e);
        mMoveCallbacks.notifyStatusChanged(moveId,PackageManager.MOVE_FAILED_INTERNAL_ERROR);
      }
    }
  }
);
  return moveId;
}

Fixed version (ground truth):
@Override public int movePackage(final String packageName,final String volumeUuid){
  mContext.enforceCallingOrSelfPermission(android.Manifest.permission.MOVE_PACKAGE,null);
  final UserHandle user=new UserHandle(UserHandle.getCallingUserId());
  final int moveId=mNextMoveId.getAndIncrement();
  mHandler.post(new Runnable(){
    @Override public void run(){
      try {
        movePackageInternal(packageName,volumeUuid,moveId,user);
      }
 catch (      PackageManagerException e) {
        Slog.w(TAG,"String_Node_Str" + packageName,e);
        mMoveCallbacks.notifyStatusChanged(moveId,PackageManager.MOVE_FAILED_INTERNAL_ERROR);
      }
    }
  }
);
  return moveId;
}
Program: 191926
Project: 191926
Buggy source:
@Override public int movePackage(final String packageName,final String volumeUuid){
  mContext.enforceCallingOrSelfPermission(android.Manifest.permission.MOVE_PACKAGE,null);
  final int moveId=mNextMoveId.getAndIncrement();
  mHandler.post(new Runnable(){
    @Override public void run(){
      try {
        movePackageInternal(packageName,volumeUuid,moveId);
      }
 catch (      PackageManagerException e) {
        Slog.w(TAG,"String_Node_Str" + packageName,e);
        mMoveCallbacks.notifyStatusChanged(moveId,PackageManager.MOVE_FAILED_INTERNAL_ERROR);
      }
    }
  }
);
  return moveId;
}

Fixed version (ground truth):
@Override public int movePackage(final String packageName,final String volumeUuid){
  mContext.enforceCallingOrSelfPermission(android.Manifest.permission.MOVE_PACKAGE,null);
  final UserHandle user=new UserHandle(UserHandle.getCallingUserId());
  final int moveId=mNextMoveId.getAndIncrement();
  mHandler.post(new Runnable(){
    @Override public void run(){
      try {
        movePackageInternal(packageName,volumeUuid,moveId,user);
      }
 catch (      PackageManagerException e) {
        Slog.w(TAG,"String_Node_Str" + packageName,e);
        mMoveCallbacks.notifyStatusChanged(moveId,PackageManager.MOVE_FAILED_INTERNAL_ERROR);
      }
    }
  }
);
  return moveId;
}
Program: 191931
Project: 191931
Buggy source:
private int runQueryIntentReceivers(){
  Intent intent;
  try {
    intent=parseIntentAndUser();
  }
 catch (  URISyntaxException e) {
    throw new RuntimeException(e.getMessage(),e);
  }
  try {
    List<ResolveInfo> result=mInterface.queryIntentReceivers(intent,null,0,mTargetUser).getList();
    PrintWriter pw=getOutPrintWriter();
    if (result == null || result.size() <= 0) {
      pw.println("String_Node_Str");
    }
 else {
      pw.print(result.size());
      pw.println("String_Node_Str");
      PrintWriterPrinter pr=new PrintWriterPrinter(pw);
      for (int i=0; i < result.size(); i++) {
        pw.print("String_Node_Str");
        pw.print(i);
        pw.println("String_Node_Str");
        result.get(i).dump(pr,"String_Node_Str");
      }
    }
  }
 catch (  RemoteException e) {
    throw new RuntimeException("String_Node_Str",e);
  }
  return 0;
}

Fixed version (ground truth):
private int runQueryIntentReceivers(){
  Intent intent;
  try {
    intent=parseIntentAndUser();
  }
 catch (  URISyntaxException e) {
    throw new RuntimeException(e.getMessage(),e);
  }
  try {
    List<ResolveInfo> result=mInterface.queryIntentReceivers(intent,null,0,mTargetUser).getList();
    PrintWriter pw=getOutPrintWriter();
    if (result == null || result.size() <= 0) {
      pw.println("String_Node_Str");
    }
 else {
      if (!mComponents) {
        pw.print(result.size());
        pw.println("String_Node_Str");
        PrintWriterPrinter pr=new PrintWriterPrinter(pw);
        for (int i=0; i < result.size(); i++) {
          pw.print("String_Node_Str");
          pw.print(i);
          pw.println("String_Node_Str");
          printResolveInfo(pr,"String_Node_Str",result.get(i),mBrief,mComponents);
        }
      }
 else {
        PrintWriterPrinter pr=new PrintWriterPrinter(pw);
        for (int i=0; i < result.size(); i++) {
          printResolveInfo(pr,"String_Node_Str",result.get(i),mBrief,mComponents);
        }
      }
    }
  }
 catch (  RemoteException e) {
    throw new RuntimeException("String_Node_Str",e);
  }
  return 0;
}
Program: 191932
Project: 191932
Buggy source:
private Intent parseIntentAndUser() throws URISyntaxException {
  mTargetUser=UserHandle.USER_CURRENT;
  Intent intent=Intent.parseCommandArgs(this,new Intent.CommandOptionHandler(){
    @Override public boolean handleOption(    String opt,    ShellCommand cmd){
      if ("String_Node_Str".equals(opt)) {
        mTargetUser=UserHandle.parseUserArg(cmd.getNextArgRequired());
        return true;
      }
      return false;
    }
  }
);
  mTargetUser=ActivityManager.handleIncomingUser(Binder.getCallingPid(),Binder.getCallingUid(),mTargetUser,false,false,null,null);
  return intent;
}

Fixed version (ground truth):
private Intent parseIntentAndUser() throws URISyntaxException {
  mTargetUser=UserHandle.USER_CURRENT;
  mBrief=false;
  mComponents=false;
  Intent intent=Intent.parseCommandArgs(this,new Intent.CommandOptionHandler(){
    @Override public boolean handleOption(    String opt,    ShellCommand cmd){
      if ("String_Node_Str".equals(opt)) {
        mTargetUser=UserHandle.parseUserArg(cmd.getNextArgRequired());
        return true;
      }
 else       if ("String_Node_Str".equals(opt)) {
        mBrief=true;
        return true;
      }
 else       if ("String_Node_Str".equals(opt)) {
        mComponents=true;
        return true;
      }
      return false;
    }
  }
);
  mTargetUser=ActivityManager.handleIncomingUser(Binder.getCallingPid(),Binder.getCallingUid(),mTargetUser,false,false,null,null);
  return intent;
}
Program: 191933
Project: 191933
Buggy source:
private int runQueryIntentActivities(){
  Intent intent;
  try {
    intent=parseIntentAndUser();
  }
 catch (  URISyntaxException e) {
    throw new RuntimeException(e.getMessage(),e);
  }
  try {
    List<ResolveInfo> result=mInterface.queryIntentActivities(intent,null,0,mTargetUser).getList();
    PrintWriter pw=getOutPrintWriter();
    if (result == null || result.size() <= 0) {
      pw.println("String_Node_Str");
    }
 else {
      pw.print(result.size());
      pw.println("String_Node_Str");
      PrintWriterPrinter pr=new PrintWriterPrinter(pw);
      for (int i=0; i < result.size(); i++) {
        pw.print("String_Node_Str");
        pw.print(i);
        pw.println("String_Node_Str");
        result.get(i).dump(pr,"String_Node_Str");
      }
    }
  }
 catch (  RemoteException e) {
    throw new RuntimeException("String_Node_Str",e);
  }
  return 0;
}

Fixed version (ground truth):
private int runQueryIntentActivities(){
  Intent intent;
  try {
    intent=parseIntentAndUser();
  }
 catch (  URISyntaxException e) {
    throw new RuntimeException(e.getMessage(),e);
  }
  try {
    List<ResolveInfo> result=mInterface.queryIntentActivities(intent,null,0,mTargetUser).getList();
    PrintWriter pw=getOutPrintWriter();
    if (result == null || result.size() <= 0) {
      pw.println("String_Node_Str");
    }
 else {
      if (!mComponents) {
        pw.print(result.size());
        pw.println("String_Node_Str");
        PrintWriterPrinter pr=new PrintWriterPrinter(pw);
        for (int i=0; i < result.size(); i++) {
          pw.print("String_Node_Str");
          pw.print(i);
          pw.println("String_Node_Str");
          printResolveInfo(pr,"String_Node_Str",result.get(i),mBrief,mComponents);
        }
      }
 else {
        PrintWriterPrinter pr=new PrintWriterPrinter(pw);
        for (int i=0; i < result.size(); i++) {
          printResolveInfo(pr,"String_Node_Str",result.get(i),mBrief,mComponents);
        }
      }
    }
  }
 catch (  RemoteException e) {
    throw new RuntimeException("String_Node_Str",e);
  }
  return 0;
}
Program: 191934
Project: 191934
Buggy source:
@Override public boolean handleOption(String opt,ShellCommand cmd){
  if ("String_Node_Str".equals(opt)) {
    mTargetUser=UserHandle.parseUserArg(cmd.getNextArgRequired());
    return true;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean handleOption(String opt,ShellCommand cmd){
  if ("String_Node_Str".equals(opt)) {
    mTargetUser=UserHandle.parseUserArg(cmd.getNextArgRequired());
    return true;
  }
 else   if ("String_Node_Str".equals(opt)) {
    mBrief=true;
    return true;
  }
 else   if ("String_Node_Str".equals(opt)) {
    mComponents=true;
    return true;
  }
  return false;
}
Program: 191935
Project: 191935
Buggy source:
private int runQueryIntentServices(){
  Intent intent;
  try {
    intent=parseIntentAndUser();
  }
 catch (  URISyntaxException e) {
    throw new RuntimeException(e.getMessage(),e);
  }
  try {
    List<ResolveInfo> result=mInterface.queryIntentServices(intent,null,0,mTargetUser).getList();
    PrintWriter pw=getOutPrintWriter();
    if (result == null || result.size() <= 0) {
      pw.println("String_Node_Str");
    }
 else {
      pw.print(result.size());
      pw.println("String_Node_Str");
      PrintWriterPrinter pr=new PrintWriterPrinter(pw);
      for (int i=0; i < result.size(); i++) {
        pw.print("String_Node_Str");
        pw.print(i);
        pw.println("String_Node_Str");
        result.get(i).dump(pr,"String_Node_Str");
      }
    }
  }
 catch (  RemoteException e) {
    throw new RuntimeException("String_Node_Str",e);
  }
  return 0;
}

Fixed version (ground truth):
private int runQueryIntentServices(){
  Intent intent;
  try {
    intent=parseIntentAndUser();
  }
 catch (  URISyntaxException e) {
    throw new RuntimeException(e.getMessage(),e);
  }
  try {
    List<ResolveInfo> result=mInterface.queryIntentServices(intent,null,0,mTargetUser).getList();
    PrintWriter pw=getOutPrintWriter();
    if (result == null || result.size() <= 0) {
      pw.println("String_Node_Str");
    }
 else {
      if (!mComponents) {
        pw.print(result.size());
        pw.println("String_Node_Str");
        PrintWriterPrinter pr=new PrintWriterPrinter(pw);
        for (int i=0; i < result.size(); i++) {
          pw.print("String_Node_Str");
          pw.print(i);
          pw.println("String_Node_Str");
          printResolveInfo(pr,"String_Node_Str",result.get(i),mBrief,mComponents);
        }
      }
 else {
        PrintWriterPrinter pr=new PrintWriterPrinter(pw);
        for (int i=0; i < result.size(); i++) {
          printResolveInfo(pr,"String_Node_Str",result.get(i),mBrief,mComponents);
        }
      }
    }
  }
 catch (  RemoteException e) {
    throw new RuntimeException("String_Node_Str",e);
  }
  return 0;
}
Program: 191936
Project: 191936
Buggy source:
private int runResolveActivity(){
  Intent intent;
  try {
    intent=parseIntentAndUser();
  }
 catch (  URISyntaxException e) {
    throw new RuntimeException(e.getMessage(),e);
  }
  try {
    ResolveInfo ri=mInterface.resolveIntent(intent,null,0,mTargetUser);
    PrintWriter pw=getOutPrintWriter();
    if (ri == null) {
      pw.println("String_Node_Str");
    }
 else {
      PrintWriterPrinter pr=new PrintWriterPrinter(pw);
      ri.dump(pr,"String_Node_Str");
    }
  }
 catch (  RemoteException e) {
    throw new RuntimeException("String_Node_Str",e);
  }
  return 0;
}

Fixed version (ground truth):
private int runResolveActivity(){
  Intent intent;
  try {
    intent=parseIntentAndUser();
  }
 catch (  URISyntaxException e) {
    throw new RuntimeException(e.getMessage(),e);
  }
  try {
    ResolveInfo ri=mInterface.resolveIntent(intent,null,0,mTargetUser);
    PrintWriter pw=getOutPrintWriter();
    if (ri == null) {
      pw.println("String_Node_Str");
    }
 else {
      PrintWriterPrinter pr=new PrintWriterPrinter(pw);
      printResolveInfo(pr,"String_Node_Str",ri,mBrief,mComponents);
    }
  }
 catch (  RemoteException e) {
    throw new RuntimeException("String_Node_Str",e);
  }
  return 0;
}
Program: 191937
Project: 191937
Buggy source:
public void instantCollapse(){
  abortAnimations();
  setExpandedFraction(0f);
  if (mExpanding) {
    notifyExpandingFinished();
  }
}

Fixed version (ground truth):
public void instantCollapse(){
  abortAnimations();
  setExpandedFraction(0f);
  if (mExpanding) {
    notifyExpandingFinished();
  }
  if (mInstantExpanding) {
    mInstantExpanding=false;
    notifyBarPanelExpansionChanged();
  }
}
Program: 191938
Project: 191938
Buggy source:
public void expand(final boolean animate){
  if (!isFullyCollapsed() && !isCollapsing()) {
    return;
  }
  mInstantExpanding=true;
  mUpdateFlingOnLayout=false;
  abortAnimations();
  cancelPeek();
  if (mTracking) {
    onTrackingStopped(true);
  }
  if (mExpanding) {
    notifyExpandingFinished();
  }
  notifyBarPanelExpansionChanged();
  getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener(){
    @Override public void onGlobalLayout(){
      if (mStatusBar.getStatusBarWindow().getHeight() != mStatusBar.getStatusBarHeight()) {
        getViewTreeObserver().removeOnGlobalLayoutListener(this);
        if (animate) {
          notifyExpandingStarted();
          fling(0,true);
        }
 else {
          setExpandedFraction(1f);
        }
        mInstantExpanding=false;
      }
    }
  }
);
  requestLayout();
}

Fixed version (ground truth):
public void expand(final boolean animate){
  if (!isFullyCollapsed() && !isCollapsing()) {
    return;
  }
  mInstantExpanding=true;
  mUpdateFlingOnLayout=false;
  abortAnimations();
  cancelPeek();
  if (mTracking) {
    onTrackingStopped(true);
  }
  if (mExpanding) {
    notifyExpandingFinished();
  }
  notifyBarPanelExpansionChanged();
  getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener(){
    @Override public void onGlobalLayout(){
      if (!mInstantExpanding) {
        getViewTreeObserver().removeOnGlobalLayoutListener(this);
        return;
      }
      if (mStatusBar.getStatusBarWindow().getHeight() != mStatusBar.getStatusBarHeight()) {
        getViewTreeObserver().removeOnGlobalLayoutListener(this);
        if (animate) {
          notifyExpandingStarted();
          fling(0,true);
        }
 else {
          setExpandedFraction(1f);
        }
        mInstantExpanding=false;
      }
    }
  }
);
  requestLayout();
}
Program: 191939
Project: 191939
Buggy source:
@Override public void onGlobalLayout(){
  if (mStatusBar.getStatusBarWindow().getHeight() != mStatusBar.getStatusBarHeight()) {
    getViewTreeObserver().removeOnGlobalLayoutListener(this);
    if (animate) {
      notifyExpandingStarted();
      fling(0,true);
    }
 else {
      setExpandedFraction(1f);
    }
    mInstantExpanding=false;
  }
}

Fixed version (ground truth):
@Override public void onGlobalLayout(){
  if (!mInstantExpanding) {
    getViewTreeObserver().removeOnGlobalLayoutListener(this);
    return;
  }
  if (mStatusBar.getStatusBarWindow().getHeight() != mStatusBar.getStatusBarHeight()) {
    getViewTreeObserver().removeOnGlobalLayoutListener(this);
    if (animate) {
      notifyExpandingStarted();
      fling(0,true);
    }
 else {
      setExpandedFraction(1f);
    }
    mInstantExpanding=false;
  }
}