nus-yam/ex-repair huggingface dataset:
Program: 190970
Project: 190970
Buggy source:
private void deleteDocuments(final Selection selected){
  Metrics.logUserAction(getContext(),Metrics.USER_ACTION_DELETE);
  assert(!selected.isEmpty());
  final DocumentInfo srcParent=getDisplayState().stack.peek();
  new GetDocumentsTask(){
    @Override void onDocumentsReady(    final List<DocumentInfo> docs){
      TextView message=(TextView)mInflater.inflate(R.layout.dialog_delete_confirmation,null);
      message.setText(generateDeleteMessage(docs));
      new AlertDialog.Builder(getActivity()).setView(message).setPositiveButton(android.R.string.yes,new DialogInterface.OnClickListener(){
        public void onClick(        DialogInterface dialog,        int id){
          if (mActionMode != null) {
            mActionMode.finish();
          }
 else {
            Log.w(TAG,"String_Node_Str");
          }
          mAdapter.hide(selected.getAll());
          FileOperations.delete(getActivity(),docs,srcParent,getDisplayState().stack);
        }
      }
).setNegativeButton(android.R.string.no,null).show();
    }
  }
.execute(selected);
}

Fixed version (ground truth):
private void deleteDocuments(final Selection selected){
  Metrics.logUserAction(getContext(),Metrics.USER_ACTION_DELETE);
  if (selected.isEmpty()) {
    return;
  }
  final DocumentInfo srcParent=getDisplayState().stack.peek();
  new GetDocumentsTask(){
    @Override void onDocumentsReady(    final List<DocumentInfo> docs){
      TextView message=(TextView)mInflater.inflate(R.layout.dialog_delete_confirmation,null);
      message.setText(generateDeleteMessage(docs));
      new AlertDialog.Builder(getActivity()).setView(message).setPositiveButton(android.R.string.yes,new DialogInterface.OnClickListener(){
        public void onClick(        DialogInterface dialog,        int id){
          if (mActionMode != null) {
            mActionMode.finish();
          }
 else {
            Log.w(TAG,"String_Node_Str");
          }
          mAdapter.hide(selected.getAll());
          FileOperations.delete(getActivity(),docs,srcParent,getDisplayState().stack);
        }
      }
).setNegativeButton(android.R.string.no,null).show();
    }
  }
.execute(selected);
}
Program: 190971
Project: 190971
Buggy source:
/** 
 * Confirm passkey for   {@link #PAIRING_VARIANT_PASSKEY_CONFIRMATION} pairing.<p>Requires  {@link android.Manifest.permission#BLUETOOTH_ADMIN}.
 * @return true confirmation has been sent outfalse for error
 */
@RequiresPermission(Manifest.permission.BLUETOOTH_ADMIN) public boolean setPairingConfirmation(boolean confirm){
  if (sService == null) {
    Log.e(TAG,"String_Node_Str");
    return false;
  }
  try {
    return sService.setPairingConfirmation(this,confirm);
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Confirm passkey for   {@link #PAIRING_VARIANT_PASSKEY_CONFIRMATION} pairing.<p>Requires  {@link android.Manifest.permission#BLUETOOTH_PRIVILEGED}.
 * @return true confirmation has been sent outfalse for error
 */
@RequiresPermission(Manifest.permission.BLUETOOTH_PRIVILEGED) public boolean setPairingConfirmation(boolean confirm){
  if (sService == null) {
    Log.e(TAG,"String_Node_Str");
    return false;
  }
  try {
    return sService.setPairingConfirmation(this,confirm);
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
  return false;
}
Program: 190972
Project: 190972
Buggy source:
/** 
 * Confirm passkey for   {@link #PAIRING_VARIANT_PASSKEY_CONFIRMATION} pairing.<p>Requires  {@link android.Manifest.permission#BLUETOOTH_ADMIN}.
 * @return true confirmation has been sent outfalse for error
 */
@RequiresPermission(Manifest.permission.BLUETOOTH_ADMIN) public boolean setPairingConfirmation(boolean confirm){
  if (sService == null) {
    Log.e(TAG,"String_Node_Str");
    return false;
  }
  try {
    return sService.setPairingConfirmation(this,confirm);
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Confirm passkey for   {@link #PAIRING_VARIANT_PASSKEY_CONFIRMATION} pairing.<p>Requires  {@link android.Manifest.permission#BLUETOOTH_PRIVILEGED}.
 * @return true confirmation has been sent outfalse for error
 */
@RequiresPermission(Manifest.permission.BLUETOOTH_PRIVILEGED) public boolean setPairingConfirmation(boolean confirm){
  if (sService == null) {
    Log.e(TAG,"String_Node_Str");
    return false;
  }
  try {
    return sService.setPairingConfirmation(this,confirm);
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
  return false;
}
Program: 190973
Project: 190973
Buggy source:
/** 
 * Confirm passkey for   {@link #PAIRING_VARIANT_PASSKEY_CONFIRMATION} pairing.<p>Requires  {@link android.Manifest.permission#BLUETOOTH_ADMIN}.
 * @return true confirmation has been sent outfalse for error
 */
@RequiresPermission(Manifest.permission.BLUETOOTH_ADMIN) public boolean setPairingConfirmation(boolean confirm){
  if (sService == null) {
    Log.e(TAG,"String_Node_Str");
    return false;
  }
  try {
    return sService.setPairingConfirmation(this,confirm);
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Confirm passkey for   {@link #PAIRING_VARIANT_PASSKEY_CONFIRMATION} pairing.<p>Requires  {@link android.Manifest.permission#BLUETOOTH_PRIVILEGED}.
 * @return true confirmation has been sent outfalse for error
 */
@RequiresPermission(Manifest.permission.BLUETOOTH_PRIVILEGED) public boolean setPairingConfirmation(boolean confirm){
  if (sService == null) {
    Log.e(TAG,"String_Node_Str");
    return false;
  }
  try {
    return sService.setPairingConfirmation(this,confirm);
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
  return false;
}
Program: 190974
Project: 190974
Buggy source:
/** 
 * Confirm passkey for   {@link #PAIRING_VARIANT_PASSKEY_CONFIRMATION} pairing.<p>Requires  {@link android.Manifest.permission#BLUETOOTH_ADMIN}.
 * @return true confirmation has been sent outfalse for error
 */
public boolean setPairingConfirmation(boolean confirm){
  if (sService == null) {
    Log.e(TAG,"String_Node_Str");
    return false;
  }
  try {
    return sService.setPairingConfirmation(this,confirm);
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Confirm passkey for   {@link #PAIRING_VARIANT_PASSKEY_CONFIRMATION} pairing.<p>Requires  {@link android.Manifest.permission#BLUETOOTH_PRIVILEGED}.
 * @return true confirmation has been sent outfalse for error
 */
public boolean setPairingConfirmation(boolean confirm){
  if (sService == null) {
    Log.e(TAG,"String_Node_Str");
    return false;
  }
  try {
    return sService.setPairingConfirmation(this,confirm);
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
  return false;
}
Program: 190975
Project: 190975
Buggy source:
/** 
 * Confirm passkey for   {@link #PAIRING_VARIANT_PASSKEY_CONFIRMATION} pairing.<p>Requires  {@link android.Manifest.permission#BLUETOOTH_ADMIN}.
 * @return true confirmation has been sent outfalse for error
 */
@RequiresPermission(Manifest.permission.BLUETOOTH_ADMIN) public boolean setPairingConfirmation(boolean confirm){
  if (sService == null) {
    Log.e(TAG,"String_Node_Str");
    return false;
  }
  try {
    return sService.setPairingConfirmation(this,confirm);
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Confirm passkey for   {@link #PAIRING_VARIANT_PASSKEY_CONFIRMATION} pairing.<p>Requires  {@link android.Manifest.permission#BLUETOOTH_PRIVILEGED}.
 * @return true confirmation has been sent outfalse for error
 */
@RequiresPermission(Manifest.permission.BLUETOOTH_PRIVILEGED) public boolean setPairingConfirmation(boolean confirm){
  if (sService == null) {
    Log.e(TAG,"String_Node_Str");
    return false;
  }
  try {
    return sService.setPairingConfirmation(this,confirm);
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
  return false;
}
Program: 190976
Project: 190976
Buggy source:
/** 
 * Confirm passkey for   {@link #PAIRING_VARIANT_PASSKEY_CONFIRMATION} pairing.<p>Requires  {@link android.Manifest.permission#BLUETOOTH_ADMIN}.
 * @return true confirmation has been sent outfalse for error
 */
@RequiresPermission(Manifest.permission.BLUETOOTH_ADMIN) public boolean setPairingConfirmation(boolean confirm){
  if (sService == null) {
    Log.e(TAG,"String_Node_Str");
    return false;
  }
  try {
    return sService.setPairingConfirmation(this,confirm);
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Confirm passkey for   {@link #PAIRING_VARIANT_PASSKEY_CONFIRMATION} pairing.<p>Requires  {@link android.Manifest.permission#BLUETOOTH_PRIVILEGED}.
 * @return true confirmation has been sent outfalse for error
 */
@RequiresPermission(Manifest.permission.BLUETOOTH_PRIVILEGED) public boolean setPairingConfirmation(boolean confirm){
  if (sService == null) {
    Log.e(TAG,"String_Node_Str");
    return false;
  }
  try {
    return sService.setPairingConfirmation(this,confirm);
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
  return false;
}
Program: 190977
Project: 190977
Buggy source:
/** 
 * Confirm passkey for   {@link #PAIRING_VARIANT_PASSKEY_CONFIRMATION} pairing.<p>Requires  {@link android.Manifest.permission#BLUETOOTH_ADMIN}.
 * @return true confirmation has been sent outfalse for error
 */
public boolean setPairingConfirmation(boolean confirm){
  if (sService == null) {
    Log.e(TAG,"String_Node_Str");
    return false;
  }
  try {
    return sService.setPairingConfirmation(this,confirm);
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Confirm passkey for   {@link #PAIRING_VARIANT_PASSKEY_CONFIRMATION} pairing.<p>Requires  {@link android.Manifest.permission#BLUETOOTH_PRIVILEGED}.
 * @return true confirmation has been sent outfalse for error
 */
public boolean setPairingConfirmation(boolean confirm){
  if (sService == null) {
    Log.e(TAG,"String_Node_Str");
    return false;
  }
  try {
    return sService.setPairingConfirmation(this,confirm);
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
  return false;
}
Program: 190978
Project: 190978
Buggy source:
/** 
 * Confirm passkey for   {@link #PAIRING_VARIANT_PASSKEY_CONFIRMATION} pairing.<p>Requires  {@link android.Manifest.permission#BLUETOOTH_ADMIN}.
 * @return true confirmation has been sent outfalse for error
 */
public boolean setPairingConfirmation(boolean confirm){
  if (sService == null) {
    Log.e(TAG,"String_Node_Str");
    return false;
  }
  try {
    return sService.setPairingConfirmation(this,confirm);
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Confirm passkey for   {@link #PAIRING_VARIANT_PASSKEY_CONFIRMATION} pairing.<p>Requires  {@link android.Manifest.permission#BLUETOOTH_PRIVILEGED}.
 * @return true confirmation has been sent outfalse for error
 */
public boolean setPairingConfirmation(boolean confirm){
  if (sService == null) {
    Log.e(TAG,"String_Node_Str");
    return false;
  }
  try {
    return sService.setPairingConfirmation(this,confirm);
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
  return false;
}
Program: 190979
Project: 190979
Buggy source:
/** 
 * Confirm passkey for   {@link #PAIRING_VARIANT_PASSKEY_CONFIRMATION} pairing.<p>Requires  {@link android.Manifest.permission#BLUETOOTH_ADMIN}.
 * @return true confirmation has been sent outfalse for error
 */
@RequiresPermission(Manifest.permission.BLUETOOTH_ADMIN) public boolean setPairingConfirmation(boolean confirm){
  if (sService == null) {
    Log.e(TAG,"String_Node_Str");
    return false;
  }
  try {
    return sService.setPairingConfirmation(this,confirm);
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Confirm passkey for   {@link #PAIRING_VARIANT_PASSKEY_CONFIRMATION} pairing.<p>Requires  {@link android.Manifest.permission#BLUETOOTH_PRIVILEGED}.
 * @return true confirmation has been sent outfalse for error
 */
@RequiresPermission(Manifest.permission.BLUETOOTH_PRIVILEGED) public boolean setPairingConfirmation(boolean confirm){
  if (sService == null) {
    Log.e(TAG,"String_Node_Str");
    return false;
  }
  try {
    return sService.setPairingConfirmation(this,confirm);
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
  return false;
}
Program: 190980
Project: 190980
Buggy source:
/** 
 * Confirm passkey for   {@link #PAIRING_VARIANT_PASSKEY_CONFIRMATION} pairing.<p>Requires  {@link android.Manifest.permission#BLUETOOTH_ADMIN}.
 * @return true confirmation has been sent outfalse for error
 */
public boolean setPairingConfirmation(boolean confirm){
  if (sService == null) {
    Log.e(TAG,"String_Node_Str");
    return false;
  }
  try {
    return sService.setPairingConfirmation(this,confirm);
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Confirm passkey for   {@link #PAIRING_VARIANT_PASSKEY_CONFIRMATION} pairing.<p>Requires  {@link android.Manifest.permission#BLUETOOTH_PRIVILEGED}.
 * @return true confirmation has been sent outfalse for error
 */
public boolean setPairingConfirmation(boolean confirm){
  if (sService == null) {
    Log.e(TAG,"String_Node_Str");
    return false;
  }
  try {
    return sService.setPairingConfirmation(this,confirm);
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
  return false;
}
Program: 190981
Project: 190981
Buggy source:
/** 
 * Confirm passkey for   {@link #PAIRING_VARIANT_PASSKEY_CONFIRMATION} pairing.<p>Requires  {@link android.Manifest.permission#BLUETOOTH_ADMIN}.
 * @return true confirmation has been sent outfalse for error
 */
public boolean setPairingConfirmation(boolean confirm){
  if (sService == null) {
    Log.e(TAG,"String_Node_Str");
    return false;
  }
  try {
    return sService.setPairingConfirmation(this,confirm);
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Confirm passkey for   {@link #PAIRING_VARIANT_PASSKEY_CONFIRMATION} pairing.<p>Requires  {@link android.Manifest.permission#BLUETOOTH_PRIVILEGED}.
 * @return true confirmation has been sent outfalse for error
 */
public boolean setPairingConfirmation(boolean confirm){
  if (sService == null) {
    Log.e(TAG,"String_Node_Str");
    return false;
  }
  try {
    return sService.setPairingConfirmation(this,confirm);
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
  return false;
}
Program: 190982
Project: 190982
Buggy source:
/** 
 * Confirm passkey for   {@link #PAIRING_VARIANT_PASSKEY_CONFIRMATION} pairing.<p>Requires  {@link android.Manifest.permission#BLUETOOTH_ADMIN}.
 * @return true confirmation has been sent outfalse for error
 */
public boolean setPairingConfirmation(boolean confirm){
  if (sService == null) {
    Log.e(TAG,"String_Node_Str");
    return false;
  }
  try {
    return sService.setPairingConfirmation(this,confirm);
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Confirm passkey for   {@link #PAIRING_VARIANT_PASSKEY_CONFIRMATION} pairing.<p>Requires  {@link android.Manifest.permission#BLUETOOTH_PRIVILEGED}.
 * @return true confirmation has been sent outfalse for error
 */
public boolean setPairingConfirmation(boolean confirm){
  if (sService == null) {
    Log.e(TAG,"String_Node_Str");
    return false;
  }
  try {
    return sService.setPairingConfirmation(this,confirm);
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
  return false;
}
Program: 190983
Project: 190983
Buggy source:
/** 
 * Confirm passkey for   {@link #PAIRING_VARIANT_PASSKEY_CONFIRMATION} pairing.<p>Requires  {@link android.Manifest.permission#BLUETOOTH_ADMIN}.
 * @return true confirmation has been sent outfalse for error
 */
public boolean setPairingConfirmation(boolean confirm){
  if (sService == null) {
    Log.e(TAG,"String_Node_Str");
    return false;
  }
  try {
    return sService.setPairingConfirmation(this,confirm);
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Confirm passkey for   {@link #PAIRING_VARIANT_PASSKEY_CONFIRMATION} pairing.<p>Requires  {@link android.Manifest.permission#BLUETOOTH_PRIVILEGED}.
 * @return true confirmation has been sent outfalse for error
 */
public boolean setPairingConfirmation(boolean confirm){
  if (sService == null) {
    Log.e(TAG,"String_Node_Str");
    return false;
  }
  try {
    return sService.setPairingConfirmation(this,confirm);
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
  return false;
}
Program: 190984
Project: 190984
Buggy source:
public boolean getAccessibilityFocusClickPointInScreenNotLocked(Point outPoint){
  AccessibilityNodeInfo focus=getAccessibilityFocusNotLocked();
  if (focus == null) {
    return false;
  }
synchronized (mLock) {
    Rect boundsInScreen=mTempRect;
    focus.getBoundsInScreen(boundsInScreen);
    Rect windowBounds=mTempRect1;
    getWindowBounds(focus.getWindowId(),windowBounds);
    if (!boundsInScreen.intersect(windowBounds)) {
      return false;
    }
    MagnificationSpec spec=getCompatibleMagnificationSpecLocked(focus.getWindowId());
    if (spec != null && !spec.isNop()) {
      boundsInScreen.offset((int)-spec.offsetX,(int)-spec.offsetY);
      boundsInScreen.scale(1 / spec.scale);
    }
    Point screenSize=mTempPoint;
    mDefaultDisplay.getRealSize(screenSize);
    if (!boundsInScreen.intersect(0,0,screenSize.x,screenSize.y)) {
      return false;
    }
    outPoint.set(boundsInScreen.centerX(),boundsInScreen.centerY());
  }
  return true;
}

Fixed version (ground truth):
public boolean getAccessibilityFocusClickPointInScreenNotLocked(Point outPoint){
  AccessibilityNodeInfo focus=getAccessibilityFocusNotLocked();
  if (focus == null) {
    return false;
  }
synchronized (mLock) {
    Rect boundsInScreen=mTempRect;
    focus.getBoundsInScreen(boundsInScreen);
    MagnificationSpec spec=getCompatibleMagnificationSpecLocked(focus.getWindowId());
    if (spec != null && !spec.isNop()) {
      boundsInScreen.offset((int)-spec.offsetX,(int)-spec.offsetY);
      boundsInScreen.scale(1 / spec.scale);
    }
    Rect windowBounds=mTempRect1;
    getWindowBounds(focus.getWindowId(),windowBounds);
    if (!boundsInScreen.intersect(windowBounds)) {
      return false;
    }
    Point screenSize=mTempPoint;
    mDefaultDisplay.getRealSize(screenSize);
    if (!boundsInScreen.intersect(0,0,screenSize.x,screenSize.y)) {
      return false;
    }
    outPoint.set(boundsInScreen.centerX(),boundsInScreen.centerY());
  }
  return true;
}
Program: 190986
Project: 190986
Buggy source:
public boolean getAccessibilityFocusClickPointInScreenNotLocked(Point outPoint){
  AccessibilityNodeInfo focus=getAccessibilityFocusNotLocked();
  if (focus == null) {
    return false;
  }
synchronized (mLock) {
    Rect boundsInScreen=mTempRect;
    focus.getBoundsInScreen(boundsInScreen);
    Rect windowBounds=mTempRect1;
    getWindowBounds(focus.getWindowId(),windowBounds);
    if (!boundsInScreen.intersect(windowBounds)) {
      return false;
    }
    MagnificationSpec spec=getCompatibleMagnificationSpecLocked(focus.getWindowId());
    if (spec != null && !spec.isNop()) {
      boundsInScreen.offset((int)-spec.offsetX,(int)-spec.offsetY);
      boundsInScreen.scale(1 / spec.scale);
    }
    Point screenSize=mTempPoint;
    mDefaultDisplay.getRealSize(screenSize);
    if (!boundsInScreen.intersect(0,0,screenSize.x,screenSize.y)) {
      return false;
    }
    outPoint.set(boundsInScreen.centerX(),boundsInScreen.centerY());
  }
  return true;
}

Fixed version (ground truth):
public boolean getAccessibilityFocusClickPointInScreenNotLocked(Point outPoint){
  AccessibilityNodeInfo focus=getAccessibilityFocusNotLocked();
  if (focus == null) {
    return false;
  }
synchronized (mLock) {
    Rect boundsInScreen=mTempRect;
    focus.getBoundsInScreen(boundsInScreen);
    MagnificationSpec spec=getCompatibleMagnificationSpecLocked(focus.getWindowId());
    if (spec != null && !spec.isNop()) {
      boundsInScreen.offset((int)-spec.offsetX,(int)-spec.offsetY);
      boundsInScreen.scale(1 / spec.scale);
    }
    Rect windowBounds=mTempRect1;
    getWindowBounds(focus.getWindowId(),windowBounds);
    if (!boundsInScreen.intersect(windowBounds)) {
      return false;
    }
    Point screenSize=mTempPoint;
    mDefaultDisplay.getRealSize(screenSize);
    if (!boundsInScreen.intersect(0,0,screenSize.x,screenSize.y)) {
      return false;
    }
    outPoint.set(boundsInScreen.centerX(),boundsInScreen.centerY());
  }
  return true;
}
Program: 190989
Project: 190989
Buggy source:
private boolean shouldForceHide(WindowState win){
  final WindowState imeTarget=mService.mInputMethodTarget;
  final boolean showImeOverKeyguard=imeTarget != null && imeTarget.isVisibleNow() && ((imeTarget.getAttrs().flags & FLAG_SHOW_WHEN_LOCKED) != 0 || !mPolicy.canBeForceHidden(imeTarget,imeTarget.mAttrs));
  final WindowState winShowWhenLocked=(WindowState)mPolicy.getWinShowWhenLockedLw();
  final AppWindowToken appShowWhenLocked=winShowWhenLocked == null ? null : winShowWhenLocked.mAppToken;
  boolean allowWhenLocked=false;
  allowWhenLocked|=(win.mIsImWindow || imeTarget == win) && showImeOverKeyguard;
  allowWhenLocked|=(win.mAttrs.flags & FLAG_SHOW_WHEN_LOCKED) != 0;
  allowWhenLocked|=win.mAttachedWindow != null && (win.mAttachedWindow.mAttrs.flags & FLAG_SHOW_WHEN_LOCKED) != 0;
  if (appShowWhenLocked != null) {
    allowWhenLocked|=appShowWhenLocked == win.mAppToken || (win.mAttrs.privateFlags & PRIVATE_FLAG_SYSTEM_ERROR) != 0;
  }
  allowWhenLocked|=(win.mAttrs.flags & FLAG_DISMISS_KEYGUARD) != 0 && mPolicy.canShowDismissingWindowWhileLockedLw();
  boolean keyguardOn=mPolicy.isKeyguardShowingOrOccluded() && mForceHiding != KEYGUARD_ANIMATING_OUT;
  boolean hideDockDivider=win.mAttrs.type == TYPE_DOCK_DIVIDER && win.getDisplayContent().getDockedStackLocked() == null;
  return keyguardOn && !allowWhenLocked && (win.getDisplayId() == Display.DEFAULT_DISPLAY) || hideDockDivider;
}

Fixed version (ground truth):
private boolean shouldForceHide(WindowState win){
  final WindowState imeTarget=mService.mInputMethodTarget;
  final boolean showImeOverKeyguard=imeTarget != null && imeTarget.isVisibleNow() && ((imeTarget.getAttrs().flags & FLAG_SHOW_WHEN_LOCKED) != 0 || !mPolicy.canBeForceHidden(imeTarget,imeTarget.mAttrs));
  final WindowState winShowWhenLocked=getWinShowWhenLockedOrAnimating();
  final AppWindowToken appShowWhenLocked=winShowWhenLocked == null ? null : winShowWhenLocked.mAppToken;
  boolean allowWhenLocked=false;
  allowWhenLocked|=(win.mIsImWindow || imeTarget == win) && showImeOverKeyguard;
  allowWhenLocked|=(win.mAttrs.flags & FLAG_SHOW_WHEN_LOCKED) != 0 && win.mTurnOnScreen;
  if (appShowWhenLocked != null) {
    allowWhenLocked|=appShowWhenLocked == win.mAppToken || (win.mAttrs.flags & FLAG_SHOW_WHEN_LOCKED) != 0 || (win.mAttrs.privateFlags & PRIVATE_FLAG_SYSTEM_ERROR) != 0;
  }
  allowWhenLocked|=(win.mAttrs.flags & FLAG_DISMISS_KEYGUARD) != 0 && mPolicy.canShowDismissingWindowWhileLockedLw();
  boolean keyguardOn=mPolicy.isKeyguardShowingOrOccluded() && mForceHiding != KEYGUARD_ANIMATING_OUT;
  boolean hideDockDivider=win.mAttrs.type == TYPE_DOCK_DIVIDER && win.getDisplayContent().getDockedStackLocked() == null;
  return keyguardOn && !allowWhenLocked && (win.getDisplayId() == Display.DEFAULT_DISPLAY) || hideDockDivider;
}
Program: 190992
Project: 190992
Buggy source:
private boolean isCallerAllowedToSilentlyUninstall(int callingUid,String pkgName){
  if (callingUid == Process.SHELL_UID || callingUid == Process.ROOT_UID || callingUid == Process.SYSTEM_UID) {
    return true;
  }
  final int callingUserId=UserHandle.getUserId(callingUid);
  if (callingUid == getPackageUid(getInstallerPackageName(pkgName),0,callingUserId)) {
    return true;
  }
  if (mRequiredVerifierPackage != null && callingUid == getPackageUid(mRequiredVerifierPackage,0,callingUserId)) {
    return true;
  }
  if (mRequiredUninstallerPackage != null && callingUid == getPackageUid(mRequiredUninstallerPackage,0,callingUserId)) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
private boolean isCallerAllowedToSilentlyUninstall(int callingUid,String pkgName){
  if (callingUid == Process.SHELL_UID || callingUid == Process.ROOT_UID || callingUid == Process.SYSTEM_UID) {
    return true;
  }
  final int callingUserId=UserHandle.getUserId(callingUid);
  if (callingUid == getPackageUid(getInstallerPackageName(pkgName),0,callingUserId)) {
    return true;
  }
  if (mRequiredVerifierPackage != null && callingUid == getPackageUid(mRequiredVerifierPackage,0,callingUserId)) {
    return true;
  }
  if (mRequiredUninstallerPackage != null && callingUid == getPackageUid(mRequiredUninstallerPackage,0,callingUserId)) {
    return true;
  }
  if (mStorageManagerPackage != null && callingUid == getPackageUid(mStorageManagerPackage,0,callingUserId)) {
    return true;
  }
  return false;
}
Program: 190994
Project: 190994
Buggy source:
@Override public void dump(String prefix,FileDescriptor fd,PrintWriter writer,String[] args){
  super.dump(prefix,fd,writer,args);
  EventBus.getDefault().dump(prefix,writer);
  Recents.getTaskLoader().dump(prefix,writer);
  ContentResolver cr=getContentResolver();
  long lastPersistUptime=Settings.Secure.getLong(cr,Settings.Secure.TASK_PERSISTER_LAST_WRITE_UPTIME,0);
  long lastVisibleTaskActiveUptime=Settings.Secure.getLongForUser(cr,Settings.Secure.OVERVIEW_LAST_VISIBLE_TASK_ACTIVE_UPTIME,SystemClock.elapsedRealtime(),Recents.getSystemServices().getCurrentUser());
  String id=Integer.toHexString(System.identityHashCode(this));
  writer.print(prefix);
  writer.print(TAG);
  writer.print("String_Node_Str");
  writer.print(mIsVisible ? "String_Node_Str" : "String_Node_Str");
  writer.print("String_Node_Str");
  writer.print(lastPersistUptime);
  writer.print("String_Node_Str");
  writer.print(lastVisibleTaskActiveUptime);
  writer.print("String_Node_Str");
  writer.print(id);
  writer.print("String_Node_Str");
  writer.println();
  if (mRecentsView != null) {
    mRecentsView.dump(prefix,writer);
  }
}

Fixed version (ground truth):
@Override public void dump(String prefix,FileDescriptor fd,PrintWriter writer,String[] args){
  super.dump(prefix,fd,writer,args);
  EventBus.getDefault().dump(prefix,writer);
  Recents.getTaskLoader().dump(prefix,writer);
  String id=Integer.toHexString(System.identityHashCode(this));
  long lastStackActiveTime=Prefs.getLong(this,Prefs.Key.OVERVIEW_LAST_STACK_TASK_ACTIVE_TIME,-1);
  writer.print(prefix);
  writer.print(TAG);
  writer.print("String_Node_Str");
  writer.print(mIsVisible ? "String_Node_Str" : "String_Node_Str");
  writer.print("String_Node_Str");
  writer.print(lastStackActiveTime);
  writer.print("String_Node_Str");
  writer.print(System.currentTimeMillis());
  writer.print("String_Node_Str");
  writer.print(id);
  writer.print("String_Node_Str");
  writer.println();
  if (mRecentsView != null) {
    mRecentsView.dump(prefix,writer);
  }
}
Program: 190996
Project: 190996
Buggy source:
@Override public void onReceive(Context context,Intent intent){
  String action=intent.getAction();
  if (action.equals(Intent.ACTION_SCREEN_OFF)) {
    dismissRecentsToHomeIfVisible(false);
  }
}

Fixed version (ground truth):
@Override public void onReceive(Context context,Intent intent){
  String action=intent.getAction();
  if (action.equals(Intent.ACTION_SCREEN_OFF)) {
    dismissRecentsToHomeIfVisible(false);
  }
 else   if (action.equals(Intent.ACTION_TIME_CHANGED)) {
    Prefs.putLong(RecentsActivity.this,Prefs.Key.OVERVIEW_LAST_STACK_TASK_ACTIVE_TIME,0);
  }
}
Program: 190999
Project: 190999
Buggy source:
/** 
 * An optimization to preload the raw list of tasks. The raw tasks are saved in least-recent to most-recent order.
 */
public synchronized void preloadRawTasks(boolean includeFrontMostExcludedTask){
  int currentUserId=UserHandle.USER_CURRENT;
  updateCurrentQuietProfilesCache(currentUserId);
  mRawTasks=mSystemServicesProxy.getRecentTasks(ActivityManager.getMaxRecentTasksStatic(),currentUserId,includeFrontMostExcludedTask,mCurrentQuietProfiles);
  mLastVisibileTaskActiveTime=RecentsDebugFlags.Static.EnableMockTasks ? SystemClock.elapsedRealtime() : Settings.Secure.getLongForUser(mContext.getContentResolver(),Settings.Secure.OVERVIEW_LAST_VISIBLE_TASK_ACTIVE_UPTIME,0,currentUserId);
  Collections.reverse(mRawTasks);
}

Fixed version (ground truth):
/** 
 * An optimization to preload the raw list of tasks. The raw tasks are saved in least-recent to most-recent order.
 */
public synchronized void preloadRawTasks(boolean includeFrontMostExcludedTask){
  int currentUserId=UserHandle.USER_CURRENT;
  updateCurrentQuietProfilesCache(currentUserId);
  SystemServicesProxy ssp=Recents.getSystemServices();
  mRawTasks=ssp.getRecentTasks(ActivityManager.getMaxRecentTasksStatic(),currentUserId,includeFrontMostExcludedTask,mCurrentQuietProfiles);
  Collections.reverse(mRawTasks);
}
Program: 191000
Project: 191000
Buggy source:
@VisibleForTesting public RecentsTaskLoadPlan(Context context,SystemServicesProxy ssp){
  mContext=context;
  mSystemServicesProxy=ssp;
}

Fixed version (ground truth):
/** 
 * Package level ctor 
 */
RecentsTaskLoadPlan(Context context){
  mContext=context;
}
Program: 191002
Project: 191002
Buggy source:
@Override public void dump(String prefix,FileDescriptor fd,PrintWriter writer,String[] args){
  super.dump(prefix,fd,writer,args);
  EventBus.getDefault().dump(prefix,writer);
  Recents.getTaskLoader().dump(prefix,writer);
  ContentResolver cr=getContentResolver();
  long lastPersistUptime=Settings.Secure.getLong(cr,Settings.Secure.TASK_PERSISTER_LAST_WRITE_UPTIME,0);
  long lastVisibleTaskActiveUptime=Settings.Secure.getLongForUser(cr,Settings.Secure.OVERVIEW_LAST_VISIBLE_TASK_ACTIVE_UPTIME,SystemClock.elapsedRealtime(),Recents.getSystemServices().getCurrentUser());
  String id=Integer.toHexString(System.identityHashCode(this));
  writer.print(prefix);
  writer.print(TAG);
  writer.print("String_Node_Str");
  writer.print(mIsVisible ? "String_Node_Str" : "String_Node_Str");
  writer.print("String_Node_Str");
  writer.print(lastPersistUptime);
  writer.print("String_Node_Str");
  writer.print(lastVisibleTaskActiveUptime);
  writer.print("String_Node_Str");
  writer.print(id);
  writer.print("String_Node_Str");
  writer.println();
  if (mRecentsView != null) {
    mRecentsView.dump(prefix,writer);
  }
}

Fixed version (ground truth):
@Override public void dump(String prefix,FileDescriptor fd,PrintWriter writer,String[] args){
  super.dump(prefix,fd,writer,args);
  EventBus.getDefault().dump(prefix,writer);
  Recents.getTaskLoader().dump(prefix,writer);
  String id=Integer.toHexString(System.identityHashCode(this));
  long lastStackActiveTime=Prefs.getLong(this,Prefs.Key.OVERVIEW_LAST_STACK_TASK_ACTIVE_TIME,-1);
  writer.print(prefix);
  writer.print(TAG);
  writer.print("String_Node_Str");
  writer.print(mIsVisible ? "String_Node_Str" : "String_Node_Str");
  writer.print("String_Node_Str");
  writer.print(lastStackActiveTime);
  writer.print("String_Node_Str");
  writer.print(System.currentTimeMillis());
  writer.print("String_Node_Str");
  writer.print(id);
  writer.print("String_Node_Str");
  writer.println();
  if (mRecentsView != null) {
    mRecentsView.dump(prefix,writer);
  }
}
Program: 191004
Project: 191004
Buggy source:
@Override public void onReceive(Context context,Intent intent){
  String action=intent.getAction();
  if (action.equals(Intent.ACTION_SCREEN_OFF)) {
    dismissRecentsToHomeIfVisible(false);
  }
}

Fixed version (ground truth):
@Override public void onReceive(Context context,Intent intent){
  String action=intent.getAction();
  if (action.equals(Intent.ACTION_SCREEN_OFF)) {
    dismissRecentsToHomeIfVisible(false);
  }
 else   if (action.equals(Intent.ACTION_TIME_CHANGED)) {
    Prefs.putLong(RecentsActivity.this,Prefs.Key.OVERVIEW_LAST_STACK_TASK_ACTIVE_TIME,0);
  }
}
Program: 191007
Project: 191007
Buggy source:
/** 
 * An optimization to preload the raw list of tasks. The raw tasks are saved in least-recent to most-recent order.
 */
public synchronized void preloadRawTasks(boolean includeFrontMostExcludedTask){
  int currentUserId=UserHandle.USER_CURRENT;
  updateCurrentQuietProfilesCache(currentUserId);
  mRawTasks=mSystemServicesProxy.getRecentTasks(ActivityManager.getMaxRecentTasksStatic(),currentUserId,includeFrontMostExcludedTask,mCurrentQuietProfiles);
  mLastVisibileTaskActiveTime=RecentsDebugFlags.Static.EnableMockTasks ? SystemClock.elapsedRealtime() : Settings.Secure.getLongForUser(mContext.getContentResolver(),Settings.Secure.OVERVIEW_LAST_VISIBLE_TASK_ACTIVE_UPTIME,0,currentUserId);
  Collections.reverse(mRawTasks);
}

Fixed version (ground truth):
/** 
 * An optimization to preload the raw list of tasks. The raw tasks are saved in least-recent to most-recent order.
 */
public synchronized void preloadRawTasks(boolean includeFrontMostExcludedTask){
  int currentUserId=UserHandle.USER_CURRENT;
  updateCurrentQuietProfilesCache(currentUserId);
  SystemServicesProxy ssp=Recents.getSystemServices();
  mRawTasks=ssp.getRecentTasks(ActivityManager.getMaxRecentTasksStatic(),currentUserId,includeFrontMostExcludedTask,mCurrentQuietProfiles);
  Collections.reverse(mRawTasks);
}
Program: 191008
Project: 191008
Buggy source:
@VisibleForTesting public RecentsTaskLoadPlan(Context context,SystemServicesProxy ssp){
  mContext=context;
  mSystemServicesProxy=ssp;
}

Fixed version (ground truth):
/** 
 * Package level ctor 
 */
RecentsTaskLoadPlan(Context context){
  mContext=context;
}
Program: 191010
Project: 191010
Buggy source:
private boolean isCallerAllowedToSilentlyUninstall(int callingUid,String pkgName){
  if (callingUid == Process.SHELL_UID || callingUid == Process.ROOT_UID || callingUid == Process.SYSTEM_UID) {
    return true;
  }
  final int callingUserId=UserHandle.getUserId(callingUid);
  if (callingUid == getPackageUid(getInstallerPackageName(pkgName),0,callingUserId)) {
    return true;
  }
  if (mRequiredVerifierPackage != null && callingUid == getPackageUid(mRequiredVerifierPackage,0,callingUserId)) {
    return true;
  }
  if (mRequiredUninstallerPackage != null && callingUid == getPackageUid(mRequiredUninstallerPackage,0,callingUserId)) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
private boolean isCallerAllowedToSilentlyUninstall(int callingUid,String pkgName){
  if (callingUid == Process.SHELL_UID || callingUid == Process.ROOT_UID || callingUid == Process.SYSTEM_UID) {
    return true;
  }
  final int callingUserId=UserHandle.getUserId(callingUid);
  if (callingUid == getPackageUid(getInstallerPackageName(pkgName),0,callingUserId)) {
    return true;
  }
  if (mRequiredVerifierPackage != null && callingUid == getPackageUid(mRequiredVerifierPackage,0,callingUserId)) {
    return true;
  }
  if (mRequiredUninstallerPackage != null && callingUid == getPackageUid(mRequiredUninstallerPackage,0,callingUserId)) {
    return true;
  }
  if (mStorageManagerPackage != null && callingUid == getPackageUid(mStorageManagerPackage,0,callingUserId)) {
    return true;
  }
  return false;
}
Program: 191011
Project: 191011
Buggy source:
/** 
 * Confirm passkey for   {@link #PAIRING_VARIANT_PASSKEY_CONFIRMATION} pairing.<p>Requires  {@link android.Manifest.permission#BLUETOOTH_ADMIN}.
 * @return true confirmation has been sent outfalse for error
 */
public boolean setPairingConfirmation(boolean confirm){
  if (sService == null) {
    Log.e(TAG,"String_Node_Str");
    return false;
  }
  try {
    return sService.setPairingConfirmation(this,confirm);
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Confirm passkey for   {@link #PAIRING_VARIANT_PASSKEY_CONFIRMATION} pairing.<p>Requires  {@link android.Manifest.permission#BLUETOOTH_PRIVILEGED}.
 * @return true confirmation has been sent outfalse for error
 */
public boolean setPairingConfirmation(boolean confirm){
  if (sService == null) {
    Log.e(TAG,"String_Node_Str");
    return false;
  }
  try {
    return sService.setPairingConfirmation(this,confirm);
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
  return false;
}
Program: 191012
Project: 191012
Buggy source:
/** 
 * Confirm passkey for   {@link #PAIRING_VARIANT_PASSKEY_CONFIRMATION} pairing.<p>Requires  {@link android.Manifest.permission#BLUETOOTH_ADMIN}.
 * @return true confirmation has been sent outfalse for error
 */
@RequiresPermission(Manifest.permission.BLUETOOTH_ADMIN) public boolean setPairingConfirmation(boolean confirm){
  if (sService == null) {
    Log.e(TAG,"String_Node_Str");
    return false;
  }
  try {
    return sService.setPairingConfirmation(this,confirm);
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Confirm passkey for   {@link #PAIRING_VARIANT_PASSKEY_CONFIRMATION} pairing.<p>Requires  {@link android.Manifest.permission#BLUETOOTH_PRIVILEGED}.
 * @return true confirmation has been sent outfalse for error
 */
@RequiresPermission(Manifest.permission.BLUETOOTH_PRIVILEGED) public boolean setPairingConfirmation(boolean confirm){
  if (sService == null) {
    Log.e(TAG,"String_Node_Str");
    return false;
  }
  try {
    return sService.setPairingConfirmation(this,confirm);
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
  return false;
}
Program: 191013
Project: 191013
Buggy source:
/** 
 * Confirm passkey for   {@link #PAIRING_VARIANT_PASSKEY_CONFIRMATION} pairing.<p>Requires  {@link android.Manifest.permission#BLUETOOTH_ADMIN}.
 * @return true confirmation has been sent outfalse for error
 */
public boolean setPairingConfirmation(boolean confirm){
  if (sService == null) {
    Log.e(TAG,"String_Node_Str");
    return false;
  }
  try {
    return sService.setPairingConfirmation(this,confirm);
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Confirm passkey for   {@link #PAIRING_VARIANT_PASSKEY_CONFIRMATION} pairing.<p>Requires  {@link android.Manifest.permission#BLUETOOTH_PRIVILEGED}.
 * @return true confirmation has been sent outfalse for error
 */
public boolean setPairingConfirmation(boolean confirm){
  if (sService == null) {
    Log.e(TAG,"String_Node_Str");
    return false;
  }
  try {
    return sService.setPairingConfirmation(this,confirm);
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
  return false;
}
Program: 191014
Project: 191014
Buggy source:
private boolean shouldForceHide(WindowState win){
  final WindowState imeTarget=mService.mInputMethodTarget;
  final boolean showImeOverKeyguard=imeTarget != null && imeTarget.isVisibleNow() && ((imeTarget.getAttrs().flags & FLAG_SHOW_WHEN_LOCKED) != 0 || !mPolicy.canBeForceHidden(imeTarget,imeTarget.mAttrs));
  final WindowState winShowWhenLocked=(WindowState)mPolicy.getWinShowWhenLockedLw();
  final AppWindowToken appShowWhenLocked=winShowWhenLocked == null ? null : winShowWhenLocked.mAppToken;
  boolean allowWhenLocked=false;
  allowWhenLocked|=(win.mIsImWindow || imeTarget == win) && showImeOverKeyguard;
  allowWhenLocked|=(win.mAttrs.flags & FLAG_SHOW_WHEN_LOCKED) != 0;
  allowWhenLocked|=win.mAttachedWindow != null && (win.mAttachedWindow.mAttrs.flags & FLAG_SHOW_WHEN_LOCKED) != 0;
  if (appShowWhenLocked != null) {
    allowWhenLocked|=appShowWhenLocked == win.mAppToken || (win.mAttrs.privateFlags & PRIVATE_FLAG_SYSTEM_ERROR) != 0;
  }
  allowWhenLocked|=(win.mAttrs.flags & FLAG_DISMISS_KEYGUARD) != 0 && mPolicy.canShowDismissingWindowWhileLockedLw();
  boolean keyguardOn=mPolicy.isKeyguardShowingOrOccluded() && mForceHiding != KEYGUARD_ANIMATING_OUT;
  boolean hideDockDivider=win.mAttrs.type == TYPE_DOCK_DIVIDER && win.getDisplayContent().getDockedStackLocked() == null;
  return keyguardOn && !allowWhenLocked && (win.getDisplayId() == Display.DEFAULT_DISPLAY) || hideDockDivider;
}

Fixed version (ground truth):
private boolean shouldForceHide(WindowState win){
  final WindowState imeTarget=mService.mInputMethodTarget;
  final boolean showImeOverKeyguard=imeTarget != null && imeTarget.isVisibleNow() && ((imeTarget.getAttrs().flags & FLAG_SHOW_WHEN_LOCKED) != 0 || !mPolicy.canBeForceHidden(imeTarget,imeTarget.mAttrs));
  final WindowState winShowWhenLocked=getWinShowWhenLockedOrAnimating();
  final AppWindowToken appShowWhenLocked=winShowWhenLocked == null ? null : winShowWhenLocked.mAppToken;
  boolean allowWhenLocked=false;
  allowWhenLocked|=(win.mIsImWindow || imeTarget == win) && showImeOverKeyguard;
  allowWhenLocked|=(win.mAttrs.flags & FLAG_SHOW_WHEN_LOCKED) != 0 && win.mTurnOnScreen;
  if (appShowWhenLocked != null) {
    allowWhenLocked|=appShowWhenLocked == win.mAppToken || (win.mAttrs.flags & FLAG_SHOW_WHEN_LOCKED) != 0 || (win.mAttrs.privateFlags & PRIVATE_FLAG_SYSTEM_ERROR) != 0;
  }
  allowWhenLocked|=(win.mAttrs.flags & FLAG_DISMISS_KEYGUARD) != 0 && mPolicy.canShowDismissingWindowWhileLockedLw();
  boolean keyguardOn=mPolicy.isKeyguardShowingOrOccluded() && mForceHiding != KEYGUARD_ANIMATING_OUT;
  boolean hideDockDivider=win.mAttrs.type == TYPE_DOCK_DIVIDER && win.getDisplayContent().getDockedStackLocked() == null;
  return keyguardOn && !allowWhenLocked && (win.getDisplayId() == Display.DEFAULT_DISPLAY) || hideDockDivider;
}
Program: 191017
Project: 191017
Buggy source:
@Override public void dump(String prefix,FileDescriptor fd,PrintWriter writer,String[] args){
  super.dump(prefix,fd,writer,args);
  EventBus.getDefault().dump(prefix,writer);
  Recents.getTaskLoader().dump(prefix,writer);
  String id=Integer.toHexString(System.identityHashCode(this));
  long lastStackActiveTime=Prefs.getLong(this,Prefs.Key.OVERVIEW_LAST_STACK_TASK_ACTIVE_TIME,-1);
  writer.print(prefix);
  writer.print(TAG);
  writer.print("String_Node_Str");
  writer.print(mIsVisible ? "String_Node_Str" : "String_Node_Str");
  writer.print("String_Node_Str");
  writer.print(lastStackActiveTime);
  writer.print("String_Node_Str");
  writer.print(System.currentTimeMillis());
  writer.print("String_Node_Str");
  writer.print(id);
  writer.print("String_Node_Str");
  writer.println();
  if (mRecentsView != null) {
    mRecentsView.dump(prefix,writer);
  }
}

Fixed version (ground truth):
@Override public void dump(String prefix,FileDescriptor fd,PrintWriter writer,String[] args){
  super.dump(prefix,fd,writer,args);
  EventBus.getDefault().dump(prefix,writer);
  Recents.getTaskLoader().dump(prefix,writer);
  ContentResolver cr=getContentResolver();
  long lastPersistUptime=Settings.Secure.getLong(cr,Settings.Secure.TASK_PERSISTER_LAST_WRITE_UPTIME,0);
  long lastVisibleTaskActiveUptime=Settings.Secure.getLongForUser(cr,Settings.Secure.OVERVIEW_LAST_VISIBLE_TASK_ACTIVE_UPTIME,SystemClock.elapsedRealtime(),Recents.getSystemServices().getCurrentUser());
  String id=Integer.toHexString(System.identityHashCode(this));
  writer.print(prefix);
  writer.print(TAG);
  writer.print("String_Node_Str");
  writer.print(mIsVisible ? "String_Node_Str" : "String_Node_Str");
  writer.print("String_Node_Str");
  writer.print(lastPersistUptime);
  writer.print("String_Node_Str");
  writer.print(lastVisibleTaskActiveUptime);
  writer.print("String_Node_Str");
  writer.print(id);
  writer.print("String_Node_Str");
  writer.println();
  if (mRecentsView != null) {
    mRecentsView.dump(prefix,writer);
  }
}
Program: 191019
Project: 191019
Buggy source:
@Override public void onReceive(Context context,Intent intent){
  String action=intent.getAction();
  if (action.equals(Intent.ACTION_SCREEN_OFF)) {
    dismissRecentsToHomeIfVisible(false);
  }
 else   if (action.equals(Intent.ACTION_TIME_CHANGED)) {
    Prefs.putLong(RecentsActivity.this,Prefs.Key.OVERVIEW_LAST_STACK_TASK_ACTIVE_TIME,0);
  }
}

Fixed version (ground truth):
@Override public void onReceive(Context context,Intent intent){
  String action=intent.getAction();
  if (action.equals(Intent.ACTION_SCREEN_OFF)) {
    dismissRecentsToHomeIfVisible(false);
  }
}
Program: 191022
Project: 191022
Buggy source:
/** 
 * An optimization to preload the raw list of tasks. The raw tasks are saved in least-recent to most-recent order.
 */
public synchronized void preloadRawTasks(boolean includeFrontMostExcludedTask){
  int currentUserId=UserHandle.USER_CURRENT;
  updateCurrentQuietProfilesCache(currentUserId);
  SystemServicesProxy ssp=Recents.getSystemServices();
  mRawTasks=ssp.getRecentTasks(ActivityManager.getMaxRecentTasksStatic(),currentUserId,includeFrontMostExcludedTask,mCurrentQuietProfiles);
  Collections.reverse(mRawTasks);
}

Fixed version (ground truth):
/** 
 * An optimization to preload the raw list of tasks. The raw tasks are saved in least-recent to most-recent order.
 */
public synchronized void preloadRawTasks(boolean includeFrontMostExcludedTask){
  int currentUserId=UserHandle.USER_CURRENT;
  updateCurrentQuietProfilesCache(currentUserId);
  mRawTasks=mSystemServicesProxy.getRecentTasks(ActivityManager.getMaxRecentTasksStatic(),currentUserId,includeFrontMostExcludedTask,mCurrentQuietProfiles);
  mLastVisibileTaskActiveTime=RecentsDebugFlags.Static.EnableMockTasks ? SystemClock.elapsedRealtime() : Settings.Secure.getLongForUser(mContext.getContentResolver(),Settings.Secure.OVERVIEW_LAST_VISIBLE_TASK_ACTIVE_UPTIME,0,currentUserId);
  Collections.reverse(mRawTasks);
}
Program: 191023
Project: 191023
Buggy source:
/** 
 * Package level ctor 
 */
RecentsTaskLoadPlan(Context context){
  mContext=context;
}

Fixed version (ground truth):
@VisibleForTesting public RecentsTaskLoadPlan(Context context,SystemServicesProxy ssp){
  mContext=context;
  mSystemServicesProxy=ssp;
}
Program: 191024
Project: 191024
Buggy source:
private void maybeSwapSearchIcon(@NonNull ComponentName assistComponent,boolean isService){
  replaceDrawable(mView.getOrb().getLogo(),assistComponent,ASSIST_ICON_METADATA_NAME,isService);
}

Fixed version (ground truth):
private void maybeSwapSearchIcon(@NonNull ComponentName assistComponent,boolean isService){
  if (mView == null) {
    onConfigurationChanged();
  }
  replaceDrawable(mView.getOrb().getLogo(),assistComponent,ASSIST_ICON_METADATA_NAME,isService);
}