nus-yam/ex-repair huggingface dataset:
Program: 41234
Project: 41234
Buggy source:
private boolean isPositionVisible(){
  if (mIsDragging) {
    return true;
  }
  final int extendedPaddingTop=getExtendedPaddingTop();
  final int extendedPaddingBottom=getExtendedPaddingBottom();
  final int compoundPaddingLeft=getCompoundPaddingLeft();
  final int compoundPaddingRight=getCompoundPaddingRight();
  final TextView hostView=TextView.this;
  final int left=0;
  final int right=hostView.getWidth();
  final int top=0;
  final int bottom=hostView.getHeight();
  if (mTempRect == null) {
    mTempRect=new Rect();
  }
  final Rect clip=mTempRect;
  clip.left=left + compoundPaddingLeft;
  clip.top=top + extendedPaddingTop;
  clip.right=right - compoundPaddingRight;
  clip.bottom=bottom - extendedPaddingBottom;
  final ViewParent parent=hostView.getParent();
  if (parent == null || !parent.getChildVisibleRect(hostView,clip,null)) {
    return false;
  }
  final int[] coords=mTempCoords;
  hostView.getLocationInWindow(coords);
  final int posX=coords[0] + mPositionX + (int)mHotspotX;
  final int posY=coords[1] + mPositionY;
  return posX >= clip.left && posX <= clip.right && posY >= clip.top && posY + mHotspotY <= clip.bottom;
}

Fixed version (ground truth):
private boolean isPositionVisible(){
  if (mIsDragging) {
    return true;
  }
  final int extendedPaddingTop=getExtendedPaddingTop();
  final int extendedPaddingBottom=getExtendedPaddingBottom();
  final int compoundPaddingLeft=getCompoundPaddingLeft();
  final int compoundPaddingRight=getCompoundPaddingRight();
  final TextView hostView=TextView.this;
  final int left=0;
  final int right=hostView.getWidth();
  final int top=0;
  final int bottom=hostView.getHeight();
  if (mTempRect == null) {
    mTempRect=new Rect();
  }
  final Rect clip=mTempRect;
  clip.left=left + compoundPaddingLeft;
  clip.top=top + extendedPaddingTop;
  clip.right=right - compoundPaddingRight;
  clip.bottom=bottom - extendedPaddingBottom;
  final ViewParent parent=hostView.getParent();
  if (parent == null || !parent.getChildVisibleRect(hostView,clip,null)) {
    return false;
  }
  final int[] coords=mTempCoords;
  hostView.getLocationInWindow(coords);
  final int posX=coords[0] + mPositionX + (int)mHotspotX;
  final int posY=coords[1] + mPositionY + (int)mHotspotY;
  return posX >= clip.left && posX <= clip.right && posY >= clip.top && posY <= clip.bottom;
}
Program: 41235
Project: 41235
Buggy source:
/** 
 * @deprecated This functionality will be removed in the future; please donot use. Control whether this activity is required to be persistent.  By default activities are not persistent; setting this to true will prevent the system from stopping this activity or its process when running low on resources. <p><em>You should avoid using this method</em>, it has severe negative consequences on how well the system can manage its resources.  A better approach is to implement an application service that you control with {@link Context#startService} and {@link Context#stopService}.
 * @param isPersistent Control whether the current activity must bepersistent, true if so, false for the normal behavior.
 */
@Deprecated public void setPersistent(boolean isPersistent){
  if (mParent == null) {
    try {
      ActivityManagerNative.getDefault().setPersistent(mToken,isPersistent);
    }
 catch (    RemoteException e) {
    }
  }
 else {
    throw new RuntimeException("String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * @deprecated As of {@link android.os.Build.VERSION_CODES#GINGERBREAD}this is a no-op.
 */
@Deprecated public void setPersistent(boolean isPersistent){
}
Program: 41244
Project: 41244
Buggy source:
ProcessRecord(BatteryStatsImpl.Uid.Proc _batteryStats,IApplicationThread _thread,ApplicationInfo _info,String _processName){
  batteryStats=_batteryStats;
  info=_info;
  processName=_processName;
  pkgList.add(_info.packageName);
  thread=_thread;
  maxAdj=ActivityManagerService.EMPTY_APP_ADJ;
  hiddenAdj=ActivityManagerService.HIDDEN_APP_MIN_ADJ;
  curRawAdj=setRawAdj=-100;
  curAdj=setAdj=-100;
  persistent=false;
  removed=false;
  persistentActivities=0;
}

Fixed version (ground truth):
ProcessRecord(BatteryStatsImpl.Uid.Proc _batteryStats,IApplicationThread _thread,ApplicationInfo _info,String _processName){
  batteryStats=_batteryStats;
  info=_info;
  processName=_processName;
  pkgList.add(_info.packageName);
  thread=_thread;
  maxAdj=ActivityManagerService.EMPTY_APP_ADJ;
  hiddenAdj=ActivityManagerService.HIDDEN_APP_MIN_ADJ;
  curRawAdj=setRawAdj=-100;
  curAdj=setAdj=-100;
  persistent=false;
  removed=false;
}
Program: 41245
Project: 41245
Buggy source:
/** 
 * @deprecated This functionality will be removed in the future; please donot use. Control whether this activity is required to be persistent.  By default activities are not persistent; setting this to true will prevent the system from stopping this activity or its process when running low on resources. <p><em>You should avoid using this method</em>, it has severe negative consequences on how well the system can manage its resources.  A better approach is to implement an application service that you control with {@link Context#startService} and {@link Context#stopService}.
 * @param isPersistent Control whether the current activity must bepersistent, true if so, false for the normal behavior.
 */
@Deprecated public void setPersistent(boolean isPersistent){
  if (mParent == null) {
    try {
      ActivityManagerNative.getDefault().setPersistent(mToken,isPersistent);
    }
 catch (    RemoteException e) {
    }
  }
 else {
    throw new RuntimeException("String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * @deprecated As of {@link android.os.Build.VERSION_CODES#GINGERBREAD}this is a no-op.
 */
@Deprecated public void setPersistent(boolean isPersistent){
}
Program: 41254
Project: 41254
Buggy source:
ProcessRecord(BatteryStatsImpl.Uid.Proc _batteryStats,IApplicationThread _thread,ApplicationInfo _info,String _processName){
  batteryStats=_batteryStats;
  info=_info;
  processName=_processName;
  pkgList.add(_info.packageName);
  thread=_thread;
  maxAdj=ActivityManagerService.EMPTY_APP_ADJ;
  hiddenAdj=ActivityManagerService.HIDDEN_APP_MIN_ADJ;
  curRawAdj=setRawAdj=-100;
  curAdj=setAdj=-100;
  persistent=false;
  removed=false;
  persistentActivities=0;
}

Fixed version (ground truth):
ProcessRecord(BatteryStatsImpl.Uid.Proc _batteryStats,IApplicationThread _thread,ApplicationInfo _info,String _processName){
  batteryStats=_batteryStats;
  info=_info;
  processName=_processName;
  pkgList.add(_info.packageName);
  thread=_thread;
  maxAdj=ActivityManagerService.EMPTY_APP_ADJ;
  hiddenAdj=ActivityManagerService.HIDDEN_APP_MIN_ADJ;
  curRawAdj=setRawAdj=-100;
  curAdj=setAdj=-100;
  persistent=false;
  removed=false;
}
Program: 41255
Project: 41255
Buggy source:
void onInputQueueCreated(InputQueue queue);

Fixed version (ground truth):
/** 
 * Called when the given InputQueue is now associated with the thread making this call, so it can start receiving events from it.
 */
void onInputQueueCreated(InputQueue queue);
Program: 41256
Project: 41256
Buggy source:
void onInputQueueDestroyed(InputQueue queue);

Fixed version (ground truth):
/** 
 * Called when the given InputQueue is no longer associated with the thread and thus not dispatching events.
 */
void onInputQueueDestroyed(InputQueue queue);
Program: 41257
Project: 41257
Buggy source:
public void dump(Printer pw,String prefix){
  super.dumpFront(pw,prefix);
  if (className != null) {
    pw.println(prefix + "String_Node_Str" + className);
  }
  if (permission != null) {
    pw.println(prefix + "String_Node_Str" + permission);
  }
  pw.println(prefix + "String_Node_Str" + processName);
  pw.println(prefix + "String_Node_Str" + taskAffinity);
  pw.println(prefix + "String_Node_Str" + uid+ "String_Node_Str"+ Integer.toHexString(flags)+ "String_Node_Str"+ Integer.toHexString(theme));
  pw.println(prefix + "String_Node_Str" + sourceDir);
  if (!sourceDir.equals(publicSourceDir)) {
    pw.println(prefix + "String_Node_Str" + publicSourceDir);
  }
  if (resourceDirs != null) {
    pw.println(prefix + "String_Node_Str" + resourceDirs);
  }
  pw.println(prefix + "String_Node_Str" + dataDir);
  if (sharedLibraryFiles != null) {
    pw.println(prefix + "String_Node_Str" + sharedLibraryFiles);
  }
  pw.println(prefix + "String_Node_Str" + enabled+ "String_Node_Str"+ targetSdkVersion);
  if (manageSpaceActivityName != null) {
    pw.println(prefix + "String_Node_Str" + manageSpaceActivityName);
  }
  if (descriptionRes != 0) {
    pw.println(prefix + "String_Node_Str" + Integer.toHexString(descriptionRes));
  }
  super.dumpBack(pw,prefix);
}

Fixed version (ground truth):
public void dump(Printer pw,String prefix){
  super.dumpFront(pw,prefix);
  if (className != null) {
    pw.println(prefix + "String_Node_Str" + className);
  }
  if (permission != null) {
    pw.println(prefix + "String_Node_Str" + permission);
  }
  pw.println(prefix + "String_Node_Str" + processName);
  pw.println(prefix + "String_Node_Str" + taskAffinity);
  pw.println(prefix + "String_Node_Str" + uid+ "String_Node_Str"+ Integer.toHexString(flags)+ "String_Node_Str"+ Integer.toHexString(theme));
  pw.println(prefix + "String_Node_Str" + sourceDir);
  if (sourceDir == null) {
    if (publicSourceDir != null) {
      pw.println(prefix + "String_Node_Str" + publicSourceDir);
    }
  }
 else   if (!sourceDir.equals(publicSourceDir)) {
    pw.println(prefix + "String_Node_Str" + publicSourceDir);
  }
  if (resourceDirs != null) {
    pw.println(prefix + "String_Node_Str" + resourceDirs);
  }
  pw.println(prefix + "String_Node_Str" + dataDir);
  if (sharedLibraryFiles != null) {
    pw.println(prefix + "String_Node_Str" + sharedLibraryFiles);
  }
  pw.println(prefix + "String_Node_Str" + enabled+ "String_Node_Str"+ targetSdkVersion);
  if (manageSpaceActivityName != null) {
    pw.println(prefix + "String_Node_Str" + manageSpaceActivityName);
  }
  if (descriptionRes != 0) {
    pw.println(prefix + "String_Node_Str" + Integer.toHexString(descriptionRes));
  }
  super.dumpBack(pw,prefix);
}
Program: 41258
Project: 41258
Buggy source:
public void dump(Printer pw,String prefix){
  super.dumpFront(pw,prefix);
  if (className != null) {
    pw.println(prefix + "String_Node_Str" + className);
  }
  if (permission != null) {
    pw.println(prefix + "String_Node_Str" + permission);
  }
  pw.println(prefix + "String_Node_Str" + processName);
  pw.println(prefix + "String_Node_Str" + taskAffinity);
  pw.println(prefix + "String_Node_Str" + uid+ "String_Node_Str"+ Integer.toHexString(flags)+ "String_Node_Str"+ Integer.toHexString(theme));
  pw.println(prefix + "String_Node_Str" + sourceDir);
  if (!sourceDir.equals(publicSourceDir)) {
    pw.println(prefix + "String_Node_Str" + publicSourceDir);
  }
  if (resourceDirs != null) {
    pw.println(prefix + "String_Node_Str" + resourceDirs);
  }
  pw.println(prefix + "String_Node_Str" + dataDir);
  if (sharedLibraryFiles != null) {
    pw.println(prefix + "String_Node_Str" + sharedLibraryFiles);
  }
  pw.println(prefix + "String_Node_Str" + enabled+ "String_Node_Str"+ targetSdkVersion);
  if (manageSpaceActivityName != null) {
    pw.println(prefix + "String_Node_Str" + manageSpaceActivityName);
  }
  if (descriptionRes != 0) {
    pw.println(prefix + "String_Node_Str" + Integer.toHexString(descriptionRes));
  }
  super.dumpBack(pw,prefix);
}

Fixed version (ground truth):
public void dump(Printer pw,String prefix){
  super.dumpFront(pw,prefix);
  if (className != null) {
    pw.println(prefix + "String_Node_Str" + className);
  }
  if (permission != null) {
    pw.println(prefix + "String_Node_Str" + permission);
  }
  pw.println(prefix + "String_Node_Str" + processName);
  pw.println(prefix + "String_Node_Str" + taskAffinity);
  pw.println(prefix + "String_Node_Str" + uid+ "String_Node_Str"+ Integer.toHexString(flags)+ "String_Node_Str"+ Integer.toHexString(theme));
  pw.println(prefix + "String_Node_Str" + sourceDir);
  if (sourceDir == null) {
    if (publicSourceDir != null) {
      pw.println(prefix + "String_Node_Str" + publicSourceDir);
    }
  }
 else   if (!sourceDir.equals(publicSourceDir)) {
    pw.println(prefix + "String_Node_Str" + publicSourceDir);
  }
  if (resourceDirs != null) {
    pw.println(prefix + "String_Node_Str" + resourceDirs);
  }
  pw.println(prefix + "String_Node_Str" + dataDir);
  if (sharedLibraryFiles != null) {
    pw.println(prefix + "String_Node_Str" + sharedLibraryFiles);
  }
  pw.println(prefix + "String_Node_Str" + enabled+ "String_Node_Str"+ targetSdkVersion);
  if (manageSpaceActivityName != null) {
    pw.println(prefix + "String_Node_Str" + manageSpaceActivityName);
  }
  if (descriptionRes != 0) {
    pw.println(prefix + "String_Node_Str" + Integer.toHexString(descriptionRes));
  }
  super.dumpBack(pw,prefix);
}
Program: 41259
Project: 41259
Buggy source:
public HandleView(CursorController controller,Drawable handle){
  super(TextView.this.mContext);
  mController=controller;
  mDrawable=handle;
  mContainer=new PopupWindow(TextView.this.mContext,null,com.android.internal.R.attr.textSelectHandleWindowStyle);
  mContainer.setSplitTouchEnabled(true);
  mContainer.setClippingEnabled(false);
  mHotspotX=mDrawable.getIntrinsicWidth() * 0.5f;
  mHotspotY=-mDrawable.getIntrinsicHeight() * 0.2f;
}

Fixed version (ground truth):
public HandleView(CursorController controller,Drawable handle){
  super(TextView.this.mContext);
  mController=controller;
  mDrawable=handle;
  mContainer=new PopupWindow(TextView.this.mContext,null,com.android.internal.R.attr.textSelectHandleWindowStyle);
  mContainer.setSplitTouchEnabled(true);
  mContainer.setClippingEnabled(false);
  final int handleWidth=mDrawable.getIntrinsicWidth();
  final int handleHeight=mDrawable.getIntrinsicHeight();
  mHotspotX=handleWidth * 0.5f;
  mHotspotY=-handleHeight * 0.2f;
}
Program: 41260
Project: 41260
Buggy source:
private void moveTo(int x,int y){
  mPositionX=x - TextView.this.mScrollX;
  mPositionY=y - TextView.this.mScrollY;
  if (isPositionInBounds()) {
    if (mContainer.isShowing()) {
      final int[] coords=mTempCoords;
      TextView.this.getLocationInWindow(coords);
      coords[0]+=mPositionX;
      coords[1]+=mPositionY;
      mContainer.update(coords[0],coords[1],mRight - mLeft,mBottom - mTop);
    }
 else {
      show();
    }
  }
 else {
    hide();
  }
}

Fixed version (ground truth):
private void moveTo(int x,int y){
  mPositionX=x - TextView.this.mScrollX;
  mPositionY=y - TextView.this.mScrollY;
  if (isPositionVisible()) {
    int[] coords=null;
    if (mContainer.isShowing()) {
      coords=mTempCoords;
      TextView.this.getLocationInWindow(coords);
      mContainer.update(coords[0] + mPositionX,coords[1] + mPositionY,mRight - mLeft,mBottom - mTop);
    }
 else {
      show();
    }
    if (mIsDragging) {
      if (coords == null) {
        coords=mTempCoords;
        TextView.this.getLocationInWindow(coords);
      }
      if (coords[0] != mLastParentX || coords[1] != mLastParentY) {
        mOffsetX+=coords[0] - mLastParentX;
        mOffsetY+=coords[1] - mLastParentY;
        mLastParentX=coords[0];
        mLastParentY=coords[1];
      }
    }
  }
 else {
    hide();
  }
}
Program: 41261
Project: 41261
Buggy source:
private int getScrollRange(){
  int scrollRange=0;
  if (getChildCount() > 0) {
    View child=getChildAt(0);
    scrollRange=Math.max(0,child.getWidth() - getWidth() - mPaddingLeft- mPaddingRight);
  }
  return scrollRange;
}

Fixed version (ground truth):
private int getScrollRange(){
  int scrollRange=0;
  if (getChildCount() > 0) {
    View child=getChildAt(0);
    scrollRange=Math.max(0,child.getWidth() - (getWidth() - mPaddingLeft - mPaddingRight));
  }
  return scrollRange;
}
Program: 41263
Project: 41263
Buggy source:
private int getScrollRange(){
  int scrollRange=0;
  if (getChildCount() > 0) {
    View child=getChildAt(0);
    scrollRange=Math.max(0,child.getHeight() - getHeight() - mPaddingBottom- mPaddingTop);
  }
  return scrollRange;
}

Fixed version (ground truth):
private int getScrollRange(){
  int scrollRange=0;
  if (getChildCount() > 0) {
    View child=getChildAt(0);
    scrollRange=Math.max(0,child.getHeight() - (getHeight() - mPaddingBottom - mPaddingTop));
  }
  return scrollRange;
}
Program: 41266
Project: 41266
Buggy source:
@Override public boolean onKeyShortcut(int keyCode,KeyEvent event){
switch (keyCode) {
case KeyEvent.KEYCODE_A:
    if (canSelectAll()) {
      return onTextContextMenuItem(ID_SELECT_ALL);
    }
  break;
case KeyEvent.KEYCODE_X:
if (canCut()) {
  return onTextContextMenuItem(ID_CUT);
}
break;
case KeyEvent.KEYCODE_C:
if (canCopy()) {
return onTextContextMenuItem(ID_COPY);
}
break;
case KeyEvent.KEYCODE_V:
if (canPaste()) {
return onTextContextMenuItem(ID_PASTE);
}
break;
}
return super.onKeyShortcut(keyCode,event);
}

Fixed version (ground truth):
@Override public boolean onKeyShortcut(int keyCode,KeyEvent event){
switch (keyCode) {
case KeyEvent.KEYCODE_A:
    if (canSelectText()) {
      return onTextContextMenuItem(ID_SELECT_ALL);
    }
  break;
case KeyEvent.KEYCODE_X:
if (canCut()) {
  return onTextContextMenuItem(ID_CUT);
}
break;
case KeyEvent.KEYCODE_C:
if (canCopy()) {
return onTextContextMenuItem(ID_COPY);
}
break;
case KeyEvent.KEYCODE_V:
if (canPaste()) {
return onTextContextMenuItem(ID_PASTE);
}
break;
}
return super.onKeyShortcut(keyCode,event);
}
Program: 41267
Project: 41267
Buggy source:
private void prepareCursorControllers(){
  if (mCursorVisible && mLayout != null) {
    if (mInsertionPointCursorController == null) {
      mInsertionPointCursorController=new InsertionPointCursorController();
    }
  }
 else {
    mInsertionPointCursorController=null;
  }
  if (canSelectText() && mLayout != null) {
    if (mSelectionModifierCursorController == null) {
      mSelectionModifierCursorController=new SelectionModifierCursorController();
    }
  }
 else {
    stopTextSelectionMode();
    mSelectionModifierCursorController=null;
  }
}

Fixed version (ground truth):
private void prepareCursorControllers(){
  if (mCursorVisible && mLayout != null) {
    if (mInsertionPointCursorController == null) {
      mInsertionPointCursorController=new InsertionPointCursorController();
    }
  }
 else {
    mInsertionPointCursorController=null;
  }
  if (textCanBeSelected() && mLayout != null) {
    if (mSelectionModifierCursorController == null) {
      mSelectionModifierCursorController=new SelectionModifierCursorController();
    }
  }
 else {
    stopTextSelectionMode();
    mSelectionModifierCursorController=null;
  }
}
Program: 41268
Project: 41268
Buggy source:
private boolean canSelectText(){
  return (mText instanceof Spannable && mMovement != null && mMovement.canSelectArbitrarily());
}

Fixed version (ground truth):
private boolean canSelectText(){
  return textCanBeSelected() && mText.length() != 0;
}
Program: 41270
Project: 41270
Buggy source:
private int getScrollRange(){
  int scrollRange=0;
  if (getChildCount() > 0) {
    View child=getChildAt(0);
    scrollRange=Math.max(0,child.getWidth() - getWidth() - mPaddingLeft- mPaddingRight);
  }
  return scrollRange;
}

Fixed version (ground truth):
private int getScrollRange(){
  int scrollRange=0;
  if (getChildCount() > 0) {
    View child=getChildAt(0);
    scrollRange=Math.max(0,child.getWidth() - (getWidth() - mPaddingLeft - mPaddingRight));
  }
  return scrollRange;
}
Program: 41272
Project: 41272
Buggy source:
private int getScrollRange(){
  int scrollRange=0;
  if (getChildCount() > 0) {
    View child=getChildAt(0);
    scrollRange=Math.max(0,child.getHeight() - getHeight() - mPaddingBottom- mPaddingTop);
  }
  return scrollRange;
}

Fixed version (ground truth):
private int getScrollRange(){
  int scrollRange=0;
  if (getChildCount() > 0) {
    View child=getChildAt(0);
    scrollRange=Math.max(0,child.getHeight() - (getHeight() - mPaddingBottom - mPaddingTop));
  }
  return scrollRange;
}
Program: 41275
Project: 41275
Buggy source:
@Override public boolean onKeyShortcut(int keyCode,KeyEvent event){
switch (keyCode) {
case KeyEvent.KEYCODE_A:
    if (canSelectAll()) {
      return onTextContextMenuItem(ID_SELECT_ALL);
    }
  break;
case KeyEvent.KEYCODE_X:
if (canCut()) {
  return onTextContextMenuItem(ID_CUT);
}
break;
case KeyEvent.KEYCODE_C:
if (canCopy()) {
return onTextContextMenuItem(ID_COPY);
}
break;
case KeyEvent.KEYCODE_V:
if (canPaste()) {
return onTextContextMenuItem(ID_PASTE);
}
break;
}
return super.onKeyShortcut(keyCode,event);
}

Fixed version (ground truth):
@Override public boolean onKeyShortcut(int keyCode,KeyEvent event){
switch (keyCode) {
case KeyEvent.KEYCODE_A:
    if (canSelectText()) {
      return onTextContextMenuItem(ID_SELECT_ALL);
    }
  break;
case KeyEvent.KEYCODE_X:
if (canCut()) {
  return onTextContextMenuItem(ID_CUT);
}
break;
case KeyEvent.KEYCODE_C:
if (canCopy()) {
return onTextContextMenuItem(ID_COPY);
}
break;
case KeyEvent.KEYCODE_V:
if (canPaste()) {
return onTextContextMenuItem(ID_PASTE);
}
break;
}
return super.onKeyShortcut(keyCode,event);
}
Program: 41276
Project: 41276
Buggy source:
private void prepareCursorControllers(){
  if (mCursorVisible && mLayout != null) {
    if (mInsertionPointCursorController == null) {
      mInsertionPointCursorController=new InsertionPointCursorController();
    }
  }
 else {
    mInsertionPointCursorController=null;
  }
  if (canSelectText() && mLayout != null) {
    if (mSelectionModifierCursorController == null) {
      mSelectionModifierCursorController=new SelectionModifierCursorController();
    }
  }
 else {
    stopTextSelectionMode();
    mSelectionModifierCursorController=null;
  }
}

Fixed version (ground truth):
private void prepareCursorControllers(){
  if (mCursorVisible && mLayout != null) {
    if (mInsertionPointCursorController == null) {
      mInsertionPointCursorController=new InsertionPointCursorController();
    }
  }
 else {
    mInsertionPointCursorController=null;
  }
  if (textCanBeSelected() && mLayout != null) {
    if (mSelectionModifierCursorController == null) {
      mSelectionModifierCursorController=new SelectionModifierCursorController();
    }
  }
 else {
    stopTextSelectionMode();
    mSelectionModifierCursorController=null;
  }
}
Program: 41277
Project: 41277
Buggy source:
private boolean canSelectText(){
  return (mText instanceof Spannable && mMovement != null && mMovement.canSelectArbitrarily());
}

Fixed version (ground truth):
private boolean canSelectText(){
  return textCanBeSelected() && mText.length() != 0;
}
Program: 41279
Project: 41279
Buggy source:
@Override protected void onAttachedToWindow(){
  super.onAttachedToWindow();
  mTemporaryDetach=false;
  if (mShowErrorAfterAttach) {
    showError();
    mShowErrorAfterAttach=false;
  }
}

Fixed version (ground truth):
@Override protected void onAttachedToWindow(){
  super.onAttachedToWindow();
  mTemporaryDetach=false;
  if (mShowErrorAfterAttach) {
    showError();
    mShowErrorAfterAttach=false;
  }
  final ViewTreeObserver observer=getViewTreeObserver();
  if (observer != null) {
    if (mInsertionPointCursorController != null) {
      observer.addOnTouchModeChangeListener(mInsertionPointCursorController);
    }
    if (mSelectionModifierCursorController != null) {
      observer.addOnTouchModeChangeListener(mSelectionModifierCursorController);
    }
  }
}
Program: 41280
Project: 41280
Buggy source:
@Override protected void onVisibilityChanged(View changedView,int visibility){
  super.onVisibilityChanged(changedView,visibility);
  if (visibility != VISIBLE) {
    hideControllers();
  }
}

Fixed version (ground truth):
@Override protected void onVisibilityChanged(View changedView,int visibility){
  super.onVisibilityChanged(changedView,visibility);
  if (visibility != VISIBLE) {
    hideInsertionPointCursorController();
    if (mSelectionModifierCursorController != null) {
      mSelectionModifierCursorController.hide();
    }
  }
}
Program: 41281
Project: 41281
Buggy source:
private void onTapUpEvent(int prevStart,int prevEnd){
  final int start=getSelectionStart();
  final int end=getSelectionEnd();
  if (start == end) {
    if (start >= prevStart && start < prevEnd) {
      Selection.setSelection((Spannable)mText,prevStart,prevEnd);
      showContextMenu();
      return;
    }
 else {
      stopTextSelectionMode();
      if (mInsertionPointCursorController != null) {
        mInsertionPointCursorController.show();
      }
    }
  }
}

Fixed version (ground truth):
private void onTapUpEvent(int prevStart,int prevEnd){
  final int start=getSelectionStart();
  final int end=getSelectionEnd();
  if (start == end) {
    if (start >= prevStart && start < prevEnd) {
      Selection.setSelection((Spannable)mText,prevStart,prevEnd);
      if (mSelectionModifierCursorController != null && !mSelectionModifierCursorController.isShowing()) {
        mSelectionModifierCursorController.show();
      }
 else {
        showContextMenu();
      }
      return;
    }
 else {
      stopTextSelectionMode();
      if (mInsertionPointCursorController != null) {
        mInsertionPointCursorController.show();
      }
    }
  }
 else   if (hasSelection() && mSelectionModifierCursorController != null) {
    mSelectionModifierCursorController.show();
  }
}
Program: 41282
Project: 41282
Buggy source:
public void show(){
  mIsShowing=true;
  updatePosition();
  mStartHandle.show();
  mEndHandle.show();
  hideInsertionPointCursorController();
}

Fixed version (ground truth):
public void show(){
  mIsShowing=true;
  updatePosition();
  mStartHandle.show();
  mEndHandle.show();
  hideInsertionPointCursorController();
  hideDelayed(DELAY_BEFORE_FADE_OUT);
}
Program: 41283
Project: 41283
Buggy source:
private void hideDelayed(int msec){
  TextView.this.removeCallbacks(mHider);
  TextView.this.postDelayed(mHider,msec);
}

Fixed version (ground truth):
private void hideDelayed(int delay){
  removeCallbacks(mHider);
  postDelayed(mHider,delay);
}
Program: 41284
Project: 41284
Buggy source:
public void updatePosition(){
  final int selectionStart=getSelectionStart();
  final int selectionEnd=getSelectionEnd();
  if ((selectionStart < 0) || (selectionEnd < 0)) {
    Log.w(LOG_TAG,"String_Node_Str");
    hide();
    return;
  }
  boolean oneLineSelection=mLayout.getLineForOffset(selectionStart) == mLayout.getLineForOffset(selectionEnd);
  mStartHandle.positionAtCursor(selectionStart,oneLineSelection);
  mEndHandle.positionAtCursor(selectionEnd,true);
}

Fixed version (ground truth):
public void updatePosition(){
  final int selectionStart=getSelectionStart();
  final int selectionEnd=getSelectionEnd();
  if ((selectionStart < 0) || (selectionEnd < 0)) {
    Log.w(LOG_TAG,"String_Node_Str");
    hide();
    return;
  }
  boolean oneLineSelection=mLayout.getLineForOffset(selectionStart) == mLayout.getLineForOffset(selectionEnd);
  mStartHandle.positionAtCursor(selectionStart,oneLineSelection);
  mEndHandle.positionAtCursor(selectionEnd,true);
  hideDelayed(DELAY_BEFORE_FADE_OUT);
}
Program: 41285
Project: 41285
Buggy source:
public void hide(){
  mStartHandle.hide();
  mEndHandle.hide();
  mIsShowing=false;
}

Fixed version (ground truth):
public void hide(){
  mStartHandle.hide();
  mEndHandle.hide();
  mIsShowing=false;
  removeCallbacks(mHider);
}
Program: 41286
Project: 41286
Buggy source:
@Override public void onWindowFocusChanged(boolean hasWindowFocus){
  super.onWindowFocusChanged(hasWindowFocus);
  if (hasWindowFocus) {
    if (mBlink != null) {
      mBlink.uncancel();
      if (isFocused()) {
        mShowCursor=SystemClock.uptimeMillis();
        makeBlink();
      }
    }
  }
 else {
    if (mBlink != null) {
      mBlink.cancel();
    }
    onEndBatchEdit();
    if (mInputContentType != null) {
      mInputContentType.enterDown=false;
    }
    hideControllers();
  }
  startStopMarquee(hasWindowFocus);
}

Fixed version (ground truth):
@Override public void onWindowFocusChanged(boolean hasWindowFocus){
  super.onWindowFocusChanged(hasWindowFocus);
  if (hasWindowFocus) {
    if (mBlink != null) {
      mBlink.uncancel();
      if (isFocused()) {
        mShowCursor=SystemClock.uptimeMillis();
        makeBlink();
      }
    }
  }
 else {
    if (mBlink != null) {
      mBlink.cancel();
    }
    onEndBatchEdit();
    if (mInputContentType != null) {
      mInputContentType.enterDown=false;
    }
    hideInsertionPointCursorController();
    if (mSelectionModifierCursorController != null) {
      mSelectionModifierCursorController.hide();
    }
  }
  startStopMarquee(hasWindowFocus);
}
Program: 41287
Project: 41287
Buggy source:
@Override protected void onDetachedFromWindow(){
  super.onDetachedFromWindow();
  if (mPreDrawState != PREDRAW_NOT_REGISTERED) {
    final ViewTreeObserver observer=getViewTreeObserver();
    if (observer != null) {
      observer.removeOnPreDrawListener(this);
      mPreDrawState=PREDRAW_NOT_REGISTERED;
    }
  }
  if (mError != null) {
    hideError();
  }
  hideControllers();
}

Fixed version (ground truth):
@Override protected void onDetachedFromWindow(){
  super.onDetachedFromWindow();
  final ViewTreeObserver observer=getViewTreeObserver();
  if (observer != null) {
    if (mPreDrawState != PREDRAW_NOT_REGISTERED) {
      observer.removeOnPreDrawListener(this);
      mPreDrawState=PREDRAW_NOT_REGISTERED;
    }
    if (mInsertionPointCursorController != null) {
      observer.removeOnTouchModeChangeListener(mInsertionPointCursorController);
    }
    if (mSelectionModifierCursorController != null) {
      observer.removeOnTouchModeChangeListener(mSelectionModifierCursorController);
    }
  }
  if (mError != null) {
    hideError();
  }
  hideControllers();
}
Program: 41288
Project: 41288
Buggy source:
/** 
 * {@inheritDoc} 
 */
public void animatingWindowLw(WindowState win,WindowManager.LayoutParams attrs){
  if (mTopFullscreenOpaqueWindowState == null && win.isVisibleOrBehindKeyguardLw()) {
    if ((attrs.flags & FLAG_FORCE_NOT_FULLSCREEN) != 0) {
      mForceStatusBar=true;
    }
    if (attrs.type >= FIRST_APPLICATION_WINDOW && attrs.type <= LAST_APPLICATION_WINDOW && win.fillsScreenLw(mW,mH,false,false)) {
      if (DEBUG_LAYOUT)       Log.v(TAG,"String_Node_Str" + win);
      mTopFullscreenOpaqueWindowState=win;
      if ((attrs.flags & FLAG_SHOW_WHEN_LOCKED) != 0) {
        if (localLOGV)         Log.v(TAG,"String_Node_Str" + win);
        mHideLockScreen=true;
      }
      if ((attrs.flags & FLAG_DISMISS_KEYGUARD) != 0) {
        if (localLOGV)         Log.v(TAG,"String_Node_Str" + win);
        mDismissKeyguard=true;
      }
      if ((attrs.flags & FLAG_ALLOW_LOCK_WHILE_SCREEN_ON) != 0) {
        mAllowLockscreenWhenOn=true;
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
public void animatingWindowLw(WindowState win,WindowManager.LayoutParams attrs){
  if (mTopFullscreenOpaqueWindowState == null && win.isVisibleOrBehindKeyguardLw()) {
    if ((attrs.flags & FLAG_FORCE_NOT_FULLSCREEN) != 0) {
      mForceStatusBar=true;
    }
    if (attrs.type >= FIRST_APPLICATION_WINDOW && attrs.type <= LAST_APPLICATION_WINDOW && attrs.x == 0 && attrs.y == 0 && attrs.width == WindowManager.LayoutParams.MATCH_PARENT && attrs.height == WindowManager.LayoutParams.MATCH_PARENT) {
      if (DEBUG_LAYOUT)       Log.v(TAG,"String_Node_Str" + win);
      mTopFullscreenOpaqueWindowState=win;
      if ((attrs.flags & FLAG_SHOW_WHEN_LOCKED) != 0) {
        if (localLOGV)         Log.v(TAG,"String_Node_Str" + win);
        mHideLockScreen=true;
      }
      if ((attrs.flags & FLAG_DISMISS_KEYGUARD) != 0) {
        if (localLOGV)         Log.v(TAG,"String_Node_Str" + win);
        mDismissKeyguard=true;
      }
      if ((attrs.flags & FLAG_ALLOW_LOCK_WHILE_SCREEN_ON) != 0) {
        mAllowLockscreenWhenOn=true;
      }
    }
  }
}
Program: 41290
Project: 41290
Buggy source:
/** 
 * Set the range of numbers allowed for the number picker. The current value will be automatically set to the start. Also provide a mapping for values used to display to the user.
 * @param start the start of the range (inclusive)
 * @param end the end of the range (inclusive)
 * @param displayedValues the values displayed to the user.
 */
public void setRange(int start,int end,String[] displayedValues){
  mDisplayedValues=displayedValues;
  mStart=start;
  mEnd=end;
  mCurrent=start;
  updateView();
}

Fixed version (ground truth):
/** 
 * Set the range of numbers allowed for the number picker. The current value will be automatically set to the start. Also provide a mapping for values used to display to the user.
 * @param start the start of the range (inclusive)
 * @param end the end of the range (inclusive)
 * @param displayedValues the values displayed to the user.
 */
public void setRange(int start,int end,String[] displayedValues){
  mDisplayedValues=displayedValues;
  mStart=start;
  mEnd=end;
  mCurrent=start;
  updateView();
  if (displayedValues != null) {
    mText.setRawInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS);
  }
}
Program: 41291
Project: 41291
Buggy source:
public HandleView(CursorController controller,Drawable handle){
  super(TextView.this.mContext);
  mController=controller;
  mDrawable=handle;
  mContainer=new PopupWindow(TextView.this.mContext,null,com.android.internal.R.attr.textSelectHandleWindowStyle);
  mContainer.setSplitTouchEnabled(true);
  mContainer.setClippingEnabled(false);
  mContainer.setLayoutInScreenEnabled(true);
}

Fixed version (ground truth):
public HandleView(CursorController controller,Drawable handle){
  super(TextView.this.mContext);
  mController=controller;
  mDrawable=handle;
  mContainer=new PopupWindow(TextView.this.mContext,null,com.android.internal.R.attr.textSelectHandleWindowStyle);
  mContainer.setSplitTouchEnabled(true);
  mContainer.setClippingEnabled(false);
  mHotspotX=mDrawable.getIntrinsicWidth() * 0.5f;
  mHotspotY=-mDrawable.getIntrinsicHeight() * 0.2f;
}
Program: 41292
Project: 41292
Buggy source:
private void moveTo(int x,int y){
  mPositionX=x - TextView.this.mScrollX;
  mPositionY=y - TextView.this.mScrollY;
  if (isPositionInBounds()) {
    if (mContainer.isShowing()) {
      final int[] coords=mTempCoords;
      TextView.this.getLocationOnScreen(coords);
      coords[0]+=mPositionX;
      coords[1]+=mPositionY;
      mContainer.update(coords[0],coords[1],mRight - mLeft,mBottom - mTop);
    }
 else {
      show();
    }
  }
 else {
    hide();
  }
}

Fixed version (ground truth):
private void moveTo(int x,int y){
  mPositionX=x - TextView.this.mScrollX;
  mPositionY=y - TextView.this.mScrollY;
  if (isPositionInBounds()) {
    if (mContainer.isShowing()) {
      final int[] coords=mTempCoords;
      TextView.this.getLocationInWindow(coords);
      coords[0]+=mPositionX;
      coords[1]+=mPositionY;
      mContainer.update(coords[0],coords[1],mRight - mLeft,mBottom - mTop);
    }
 else {
      show();
    }
  }
 else {
    hide();
  }
}
Program: 41293
Project: 41293
Buggy source:
/** 
 * {@inheritDoc} 
 */
public void animatingWindowLw(WindowState win,WindowManager.LayoutParams attrs){
  if (mTopFullscreenOpaqueWindowState == null && win.isVisibleOrBehindKeyguardLw()) {
    if ((attrs.flags & FLAG_FORCE_NOT_FULLSCREEN) != 0) {
      mForceStatusBar=true;
    }
    if (attrs.type >= FIRST_APPLICATION_WINDOW && attrs.type <= LAST_APPLICATION_WINDOW && win.fillsScreenLw(mW,mH,false,false)) {
      if (DEBUG_LAYOUT)       Log.v(TAG,"String_Node_Str" + win);
      mTopFullscreenOpaqueWindowState=win;
      if ((attrs.flags & FLAG_SHOW_WHEN_LOCKED) != 0) {
        if (localLOGV)         Log.v(TAG,"String_Node_Str" + win);
        mHideLockScreen=true;
      }
      if ((attrs.flags & FLAG_DISMISS_KEYGUARD) != 0) {
        if (localLOGV)         Log.v(TAG,"String_Node_Str" + win);
        mDismissKeyguard=true;
      }
      if ((attrs.flags & FLAG_ALLOW_LOCK_WHILE_SCREEN_ON) != 0) {
        mAllowLockscreenWhenOn=true;
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
public void animatingWindowLw(WindowState win,WindowManager.LayoutParams attrs){
  if (mTopFullscreenOpaqueWindowState == null && win.isVisibleOrBehindKeyguardLw()) {
    if ((attrs.flags & FLAG_FORCE_NOT_FULLSCREEN) != 0) {
      mForceStatusBar=true;
    }
    if (attrs.type >= FIRST_APPLICATION_WINDOW && attrs.type <= LAST_APPLICATION_WINDOW && attrs.x == 0 && attrs.y == 0 && attrs.width == WindowManager.LayoutParams.MATCH_PARENT && attrs.height == WindowManager.LayoutParams.MATCH_PARENT) {
      if (DEBUG_LAYOUT)       Log.v(TAG,"String_Node_Str" + win);
      mTopFullscreenOpaqueWindowState=win;
      if ((attrs.flags & FLAG_SHOW_WHEN_LOCKED) != 0) {
        if (localLOGV)         Log.v(TAG,"String_Node_Str" + win);
        mHideLockScreen=true;
      }
      if ((attrs.flags & FLAG_DISMISS_KEYGUARD) != 0) {
        if (localLOGV)         Log.v(TAG,"String_Node_Str" + win);
        mDismissKeyguard=true;
      }
      if ((attrs.flags & FLAG_ALLOW_LOCK_WHILE_SCREEN_ON) != 0) {
        mAllowLockscreenWhenOn=true;
      }
    }
  }
}
Program: 41294
Project: 41294
Buggy source:
private void printRestoreSets(RestoreSet[] sets){
  for (  RestoreSet s : sets) {
    System.out.println("String_Node_Str" + Long.toHexString(s.token) + "String_Node_Str"+ s.name);
  }
}

Fixed version (ground truth):
private void printRestoreSets(RestoreSet[] sets){
  if (sets == null || sets.length == 0) {
    System.out.println("String_Node_Str");
    return;
  }
  for (  RestoreSet s : sets) {
    System.out.println("String_Node_Str" + Long.toHexString(s.token) + "String_Node_Str"+ s.name);
  }
}
Program: 41295
Project: 41295
Buggy source:
private void printRestoreSets(RestoreSet[] sets){
  for (  RestoreSet s : sets) {
    System.out.println("String_Node_Str" + Long.toHexString(s.token) + "String_Node_Str"+ s.name);
  }
}

Fixed version (ground truth):
private void printRestoreSets(RestoreSet[] sets){
  if (sets == null || sets.length == 0) {
    System.out.println("String_Node_Str");
    return;
  }
  for (  RestoreSet s : sets) {
    System.out.println("String_Node_Str" + Long.toHexString(s.token) + "String_Node_Str"+ s.name);
  }
}
Program: 41296
Project: 41296
Buggy source:
@Override public void onChanged(SipAudioCall call){
synchronized (SipPhone.class) {
    Call.State newState=getCallStateFrom(call);
    if (mState == newState)     return;
    if (newState == Call.State.INCOMING) {
      setState(mOwner.getState());
    }
 else {
      if (mOwner == ringingCall) {
        if (ringingCall.getState() == Call.State.WAITING) {
          try {
            switchHoldingAndActive();
          }
 catch (          CallStateException e) {
            onCallEnded(DisconnectCause.LOCAL);
            return;
          }
        }
        foregroundCall.switchWith(ringingCall);
      }
      if (newState == Call.State.ACTIVE)       call.startAudio();
      setState(newState);
    }
    mOwner.onConnectionStateChanged(SipConnection.this);
    Log.v(LOG_TAG,"String_Node_Str" + mPeer.getUriString() + "String_Node_Str"+ mState+ "String_Node_Str"+ getPhone());
  }
}

Fixed version (ground truth):
@Override public void onChanged(SipAudioCall call){
synchronized (SipPhone.class) {
    Call.State newState=getCallStateFrom(call);
    if (mState == newState)     return;
    if (newState == Call.State.INCOMING) {
      setState(mOwner.getState());
    }
 else {
      if (mOwner == ringingCall) {
        if (ringingCall.getState() == Call.State.WAITING) {
          try {
            switchHoldingAndActive();
          }
 catch (          CallStateException e) {
            onCallEnded(DisconnectCause.LOCAL);
            return;
          }
        }
        foregroundCall.switchWith(ringingCall);
      }
      setState(newState);
    }
    mOwner.onConnectionStateChanged(SipConnection.this);
    Log.v(LOG_TAG,"String_Node_Str" + mPeer.getUriString() + "String_Node_Str"+ mState+ "String_Node_Str"+ getPhone());
  }
}
Program: 41298
Project: 41298
Buggy source:
@SmallTest public void testRecurrenceSet2() throws Exception {
  String recurrence="String_Node_Str" + "String_Node_Str";
  verifyPopulateContentValues(recurrence,"String_Node_Str",null,null,null,1250812800000L,null,"String_Node_Str",1);
}

Fixed version (ground truth):
@SmallTest public void testRecurrenceSet2() throws Exception {
  String recurrence="String_Node_Str" + "String_Node_Str";
  verifyPopulateContentValues(recurrence,"String_Node_Str",null,null,null,1250812800000L,"String_Node_Str","String_Node_Str",1);
}
Program: 41299
Project: 41299
Buggy source:
@SmallTest public void testRecurrenceSet1() throws Exception {
  String recurrence="String_Node_Str" + "String_Node_Str";
  verifyPopulateContentValues(recurrence,"String_Node_Str",null,null,null,1250812800000L,null,"String_Node_Str",1);
}

Fixed version (ground truth):
@SmallTest public void testRecurrenceSet1() throws Exception {
  String recurrence="String_Node_Str" + "String_Node_Str";
  verifyPopulateContentValues(recurrence,"String_Node_Str",null,null,null,1250812800000L,"String_Node_Str","String_Node_Str",1);
}
Program: 41301
Project: 41301
Buggy source:
@SmallTest public void testRecurrenceSet2() throws Exception {
  String recurrence="String_Node_Str" + "String_Node_Str";
  verifyPopulateContentValues(recurrence,"String_Node_Str",null,null,null,1250812800000L,null,"String_Node_Str",1);
}

Fixed version (ground truth):
@SmallTest public void testRecurrenceSet2() throws Exception {
  String recurrence="String_Node_Str" + "String_Node_Str";
  verifyPopulateContentValues(recurrence,"String_Node_Str",null,null,null,1250812800000L,"String_Node_Str","String_Node_Str",1);
}
Program: 41302
Project: 41302
Buggy source:
@SmallTest public void testRecurrenceSet1() throws Exception {
  String recurrence="String_Node_Str" + "String_Node_Str";
  verifyPopulateContentValues(recurrence,"String_Node_Str",null,null,null,1250812800000L,null,"String_Node_Str",1);
}

Fixed version (ground truth):
@SmallTest public void testRecurrenceSet1() throws Exception {
  String recurrence="String_Node_Str" + "String_Node_Str";
  verifyPopulateContentValues(recurrence,"String_Node_Str",null,null,null,1250812800000L,"String_Node_Str","String_Node_Str",1);
}
Program: 41305
Project: 41305
Buggy source:
void skipCurrentReceiverLocked(ProcessRecord app){
  boolean reschedule=false;
  BroadcastRecord r=app.curReceiver;
  if (r != null) {
    logBroadcastReceiverDiscard(r);
    finishReceiverLocked(r.receiver,r.resultCode,r.resultData,r.resultExtras,r.resultAbort,true);
    reschedule=true;
  }
  r=mPendingBroadcast;
  if (r != null && r.curApp == app) {
    if (DEBUG_BROADCAST)     Slog.v(TAG,"String_Node_Str" + r);
    logBroadcastReceiverDiscard(r);
    finishReceiverLocked(r.receiver,r.resultCode,r.resultData,r.resultExtras,r.resultAbort,true);
    reschedule=true;
  }
  if (reschedule) {
    scheduleBroadcastsLocked();
  }
}

Fixed version (ground truth):
void skipCurrentReceiverLocked(ProcessRecord app){
  boolean reschedule=false;
  BroadcastRecord r=app.curReceiver;
  if (r != null) {
    logBroadcastReceiverDiscardLocked(r);
    finishReceiverLocked(r.receiver,r.resultCode,r.resultData,r.resultExtras,r.resultAbort,true);
    reschedule=true;
  }
  r=mPendingBroadcast;
  if (r != null && r.curApp == app) {
    if (DEBUG_BROADCAST)     Slog.v(TAG,"String_Node_Str" + r);
    logBroadcastReceiverDiscardLocked(r);
    finishReceiverLocked(r.receiver,r.resultCode,r.resultData,r.resultExtras,r.resultAbort,true);
    reschedule=true;
  }
  if (reschedule) {
    scheduleBroadcastsLocked();
  }
}
Program: 41306
Project: 41306
Buggy source:
static void performReceive(ProcessRecord app,IIntentReceiver receiver,Intent intent,int resultCode,String data,Bundle extras,boolean ordered,boolean sticky) throws RemoteException {
  if (app != null && app.thread != null) {
    app.thread.scheduleRegisteredReceiver(receiver,intent,resultCode,data,extras,ordered,sticky);
  }
 else {
    receiver.performReceive(intent,resultCode,data,extras,ordered,sticky);
  }
}

Fixed version (ground truth):
public void performReceive(Intent intent,int resultCode,String data,Bundle extras,boolean ordered,boolean sticky){
  mHandler.post(new Runnable(){
    public void run(){
synchronized (ActivityManagerService.this) {
        mDidUpdate=true;
      }
      systemReady(goingCallback);
    }
  }
);
}
Program: 41308
Project: 41308
Buggy source:
private static void showUsage(){
  System.err.println("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
}

Fixed version (ground truth):
private static void showUsage(){
  System.err.println("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
}