nus-yam/ex-repair huggingface dataset:
Program: 194261
Project: 194261
Buggy source:
private void update(boolean updateAlways){
  int user=KeyguardUpdateMonitor.getCurrentUser();
  boolean secure=mLockPatternUtils.isSecure(user);
  boolean currentlyInsecure=!secure || mKeyguardUpdateMonitor.getUserHasTrust(user);
  boolean trustManaged=mKeyguardUpdateMonitor.getUserTrustIsManaged(user);
  boolean faceUnlockRunning=mKeyguardUpdateMonitor.isFaceUnlockRunning(user) && trustManaged;
  boolean changed=secure != mSecure || currentlyInsecure != mCurrentlyInsecure || trustManaged != mTrustManaged || faceUnlockRunning != mFaceUnlockRunning;
  if (changed || updateAlways) {
    mSecure=secure;
    mCurrentlyInsecure=currentlyInsecure;
    mTrustManaged=trustManaged;
    mFaceUnlockRunning=faceUnlockRunning;
    notifyListeners();
  }
}

Fixed version (ground truth):
private void update(boolean updateAlways){
  int user=KeyguardUpdateMonitor.getCurrentUser();
  boolean secure=mLockPatternUtils.isSecure(user);
  boolean canSkipBouncer=!secure || mKeyguardUpdateMonitor.getUserCanSkipBouncer(user);
  boolean trustManaged=mKeyguardUpdateMonitor.getUserTrustIsManaged(user);
  boolean trusted=mKeyguardUpdateMonitor.getUserHasTrust(user);
  boolean faceUnlockRunning=mKeyguardUpdateMonitor.isFaceUnlockRunning(user) && trustManaged;
  boolean changed=secure != mSecure || canSkipBouncer != mCanSkipBouncer || trustManaged != mTrustManaged || faceUnlockRunning != mFaceUnlockRunning;
  if (changed || updateAlways) {
    mSecure=secure;
    mCanSkipBouncer=canSkipBouncer;
    mTrusted=trusted;
    mTrustManaged=trustManaged;
    mFaceUnlockRunning=faceUnlockRunning;
    notifyListeners();
  }
}
Program: 194262
Project: 194262
Buggy source:
public KeyguardMonitor(Context context){
  mContext=context;
  mKeyguardUpdateMonitor=KeyguardUpdateMonitor.getInstance(mContext);
  mUserTracker=new CurrentUserTracker(mContext){
    @Override public void onUserSwitched(    int newUserId){
      mCurrentUser=newUserId;
      updateTrustedState();
    }
  }
;
}

Fixed version (ground truth):
public KeyguardMonitor(Context context){
  mContext=context;
  mKeyguardUpdateMonitor=KeyguardUpdateMonitor.getInstance(mContext);
  mUserTracker=new CurrentUserTracker(mContext){
    @Override public void onUserSwitched(    int newUserId){
      mCurrentUser=newUserId;
      updateCanSkipBouncerState();
    }
  }
;
}
Program: 194263
Project: 194263
Buggy source:
@Override public void onTrustChanged(int userId){
  updateTrustedState();
  notifyKeyguardChanged();
}

Fixed version (ground truth):
@Override public void onTrustChanged(int userId){
  updateCanSkipBouncerState();
  notifyKeyguardChanged();
}
Program: 194264
Project: 194264
Buggy source:
@Override public void onUserSwitched(int newUserId){
  mCurrentUser=newUserId;
  updateTrustedState();
}

Fixed version (ground truth):
@Override public void onUserSwitched(int newUserId){
  mCurrentUser=newUserId;
  updateCanSkipBouncerState();
}
Program: 194265
Project: 194265
Buggy source:
public void addCallback(Callback callback){
  mCallbacks.add(callback);
  if (mCallbacks.size() != 0 && !mListening) {
    mListening=true;
    mCurrentUser=ActivityManager.getCurrentUser();
    updateTrustedState();
    mKeyguardUpdateMonitor.registerCallback(this);
    mUserTracker.startTracking();
  }
}

Fixed version (ground truth):
public void addCallback(Callback callback){
  mCallbacks.add(callback);
  if (mCallbacks.size() != 0 && !mListening) {
    mListening=true;
    mCurrentUser=ActivityManager.getCurrentUser();
    updateCanSkipBouncerState();
    mKeyguardUpdateMonitor.registerCallback(this);
    mUserTracker.startTracking();
  }
}
Program: 194266
Project: 194266
Buggy source:
@Override public int getCount(){
  boolean secureKeyguardShowing=mController.mKeyguardMonitor.isShowing() && mController.mKeyguardMonitor.isSecure() && !mController.mKeyguardMonitor.isTrusted();
  if (!secureKeyguardShowing) {
    return mController.mUsers.size();
  }
  final int N=mController.mUsers.size();
  int count=0;
  for (int i=0; i < N; i++) {
    if (mController.mUsers.get(i).isRestricted) {
      break;
    }
 else {
      count++;
    }
  }
  return count;
}

Fixed version (ground truth):
@Override public int getCount(){
  boolean secureKeyguardShowing=mController.mKeyguardMonitor.isShowing() && mController.mKeyguardMonitor.isSecure() && !mController.mKeyguardMonitor.canSkipBouncer();
  if (!secureKeyguardShowing) {
    return mController.mUsers.size();
  }
  final int N=mController.mUsers.size();
  int count=0;
  for (int i=0; i < N; i++) {
    if (mController.mUsers.get(i).isRestricted) {
      break;
    }
 else {
      count++;
    }
  }
  return count;
}
Program: 194267
Project: 194267
Buggy source:
/** 
 * Shows the next security screen if there is one.
 * @param authenticated true if the user entered the correct authentication
 * @return true if keyguard is done
 */
boolean showNextSecurityScreenOrFinish(boolean authenticated){
  if (DEBUG)   Log.d(TAG,"String_Node_Str" + authenticated + "String_Node_Str");
  boolean finish=false;
  if (mUpdateMonitor.getUserHasTrust(KeyguardUpdateMonitor.getCurrentUser())) {
    finish=true;
  }
 else   if (SecurityMode.None == mCurrentSecuritySelection) {
    SecurityMode securityMode=mSecurityModel.getSecurityMode();
    if (SecurityMode.None == securityMode) {
      finish=true;
    }
 else {
      showSecurityScreen(securityMode);
    }
  }
 else   if (authenticated) {
switch (mCurrentSecuritySelection) {
case Pattern:
case Password:
case PIN:
      finish=true;
    break;
case SimPin:
case SimPuk:
  SecurityMode securityMode=mSecurityModel.getSecurityMode();
if (securityMode != SecurityMode.None || !mLockPatternUtils.isLockScreenDisabled(KeyguardUpdateMonitor.getCurrentUser())) {
  showSecurityScreen(securityMode);
}
 else {
  finish=true;
}
break;
default :
Log.v(TAG,"String_Node_Str" + mCurrentSecuritySelection + "String_Node_Str");
showPrimarySecurityScreen(false);
break;
}
}
if (finish) {
mSecurityCallback.finish();
}
return finish;
}

Fixed version (ground truth):
/** 
 * Shows the next security screen if there is one.
 * @param authenticated true if the user entered the correct authentication
 * @return true if keyguard is done
 */
boolean showNextSecurityScreenOrFinish(boolean authenticated){
  if (DEBUG)   Log.d(TAG,"String_Node_Str" + authenticated + "String_Node_Str");
  boolean finish=false;
  if (mUpdateMonitor.getUserCanSkipBouncer(KeyguardUpdateMonitor.getCurrentUser())) {
    finish=true;
  }
 else   if (SecurityMode.None == mCurrentSecuritySelection) {
    SecurityMode securityMode=mSecurityModel.getSecurityMode();
    if (SecurityMode.None == securityMode) {
      finish=true;
    }
 else {
      showSecurityScreen(securityMode);
    }
  }
 else   if (authenticated) {
switch (mCurrentSecuritySelection) {
case Pattern:
case Password:
case PIN:
      finish=true;
    break;
case SimPin:
case SimPuk:
  SecurityMode securityMode=mSecurityModel.getSecurityMode();
if (securityMode != SecurityMode.None || !mLockPatternUtils.isLockScreenDisabled(KeyguardUpdateMonitor.getCurrentUser())) {
  showSecurityScreen(securityMode);
}
 else {
  finish=true;
}
break;
default :
Log.v(TAG,"String_Node_Str" + mCurrentSecuritySelection + "String_Node_Str");
showPrimarySecurityScreen(false);
break;
}
}
if (finish) {
mSecurityCallback.finish();
}
return finish;
}
Program: 194268
Project: 194268
Buggy source:
public boolean getUserHasTrust(int userId){
  return !isTrustDisabled(userId) && mUserHasTrust.get(userId) || mUserFingerprintAuthenticated.get(userId);
}

Fixed version (ground truth):
public boolean getUserHasTrust(int userId){
  return !isTrustDisabled(userId) && mUserHasTrust.get(userId);
}
Program: 194269
Project: 194269
Buggy source:
@Override protected void handleUpdateState(BooleanState state,Object arg){
  state.visible=!(mKeyguard.isSecure() && mKeyguard.isShowing() && !mKeyguard.isTrusted());
  state.label=mContext.getString(R.string.quick_settings_cast_title);
  state.value=false;
  state.autoMirrorDrawable=false;
  final Set<CastDevice> devices=mController.getCastDevices();
  boolean connecting=false;
  for (  CastDevice device : devices) {
    if (device.state == CastDevice.STATE_CONNECTED) {
      state.value=true;
      state.label=getDeviceName(device);
    }
 else     if (device.state == CastDevice.STATE_CONNECTING) {
      connecting=true;
    }
  }
  if (!state.value && connecting) {
    state.label=mContext.getString(R.string.quick_settings_connecting);
  }
  state.icon=ResourceIcon.get(state.value ? R.drawable.ic_qs_cast_on : R.drawable.ic_qs_cast_off);
  mDetailAdapter.updateItems(devices);
}

Fixed version (ground truth):
@Override protected void handleUpdateState(BooleanState state,Object arg){
  state.visible=!mKeyguard.isSecure() || !mKeyguard.isShowing() || mKeyguard.canSkipBouncer();
  state.label=mContext.getString(R.string.quick_settings_cast_title);
  state.value=false;
  state.autoMirrorDrawable=false;
  final Set<CastDevice> devices=mController.getCastDevices();
  boolean connecting=false;
  for (  CastDevice device : devices) {
    if (device.state == CastDevice.STATE_CONNECTED) {
      state.value=true;
      state.label=getDeviceName(device);
    }
 else     if (device.state == CastDevice.STATE_CONNECTING) {
      connecting=true;
    }
  }
  if (!state.value && connecting) {
    state.label=mContext.getString(R.string.quick_settings_connecting);
  }
  state.icon=ResourceIcon.get(state.value ? R.drawable.ic_qs_cast_on : R.drawable.ic_qs_cast_off);
  mDetailAdapter.updateItems(devices);
}
Program: 194270
Project: 194270
Buggy source:
private Intent getCameraIntent(){
  KeyguardUpdateMonitor updateMonitor=KeyguardUpdateMonitor.getInstance(mContext);
  boolean currentUserHasTrust=updateMonitor.getUserHasTrust(KeyguardUpdateMonitor.getCurrentUser());
  boolean secure=mLockPatternUtils.isSecure(KeyguardUpdateMonitor.getCurrentUser());
  return (secure && !currentUserHasTrust) ? SECURE_CAMERA_INTENT : INSECURE_CAMERA_INTENT;
}

Fixed version (ground truth):
private Intent getCameraIntent(){
  KeyguardUpdateMonitor updateMonitor=KeyguardUpdateMonitor.getInstance(mContext);
  boolean canSkipBouncer=updateMonitor.getUserCanSkipBouncer(KeyguardUpdateMonitor.getCurrentUser());
  boolean secure=mLockPatternUtils.isSecure(KeyguardUpdateMonitor.getCurrentUser());
  return (secure && !canSkipBouncer) ? SECURE_CAMERA_INTENT : INSECURE_CAMERA_INTENT;
}
Program: 194271
Project: 194271
Buggy source:
private int getAnimationResForTransition(int oldState,int newState,boolean oldScreenOn,boolean screenOn){
  if (oldState == STATE_FINGERPRINT && newState == STATE_FINGERPRINT_ERROR) {
    return R.drawable.lockscreen_fingerprint_fp_to_error_state_animation;
  }
 else   if (oldState == STATE_FINGERPRINT_ERROR && newState == STATE_FINGERPRINT) {
    return R.drawable.lockscreen_fingerprint_error_state_to_fp_animation;
  }
 else   if (oldState == STATE_FINGERPRINT && newState == STATE_LOCK_OPEN && !mUnlockMethodCache.isCurrentlyInsecure()) {
    return R.drawable.lockscreen_fingerprint_draw_off_animation;
  }
 else   if (newState == STATE_FINGERPRINT && !oldScreenOn && screenOn) {
    return R.drawable.lockscreen_fingerprint_draw_on_animation;
  }
 else {
    return -1;
  }
}

Fixed version (ground truth):
private int getAnimationResForTransition(int oldState,int newState,boolean oldScreenOn,boolean screenOn){
  if (oldState == STATE_FINGERPRINT && newState == STATE_FINGERPRINT_ERROR) {
    return R.drawable.lockscreen_fingerprint_fp_to_error_state_animation;
  }
 else   if (oldState == STATE_FINGERPRINT_ERROR && newState == STATE_FINGERPRINT) {
    return R.drawable.lockscreen_fingerprint_error_state_to_fp_animation;
  }
 else   if (oldState == STATE_FINGERPRINT && newState == STATE_LOCK_OPEN && !mUnlockMethodCache.isTrusted()) {
    return R.drawable.lockscreen_fingerprint_draw_off_animation;
  }
 else   if (newState == STATE_FINGERPRINT && !oldScreenOn && screenOn) {
    return R.drawable.lockscreen_fingerprint_draw_on_animation;
  }
 else {
    return -1;
  }
}
Program: 194272
Project: 194272
Buggy source:
private int getState(){
  boolean fingerprintRunning=KeyguardUpdateMonitor.getInstance(mContext).isFingerprintDetectionRunning();
  if (mUnlockMethodCache.isCurrentlyInsecure()) {
    return STATE_LOCK_OPEN;
  }
 else   if (mTransientFpError) {
    return STATE_FINGERPRINT_ERROR;
  }
 else   if (fingerprintRunning) {
    return STATE_FINGERPRINT;
  }
 else   if (mUnlockMethodCache.isFaceUnlockRunning()) {
    return STATE_FACE_UNLOCK;
  }
 else {
    return STATE_LOCKED;
  }
}

Fixed version (ground truth):
private int getState(){
  boolean fingerprintRunning=KeyguardUpdateMonitor.getInstance(mContext).isFingerprintDetectionRunning();
  if (mUnlockMethodCache.canSkipBouncer()) {
    return STATE_LOCK_OPEN;
  }
 else   if (mTransientFpError) {
    return STATE_FINGERPRINT_ERROR;
  }
 else   if (fingerprintRunning) {
    return STATE_FINGERPRINT;
  }
 else   if (mUnlockMethodCache.isFaceUnlockRunning()) {
    return STATE_FACE_UNLOCK;
  }
 else {
    return STATE_LOCKED;
  }
}
Program: 194273
Project: 194273
Buggy source:
public void onTrackingStopped(boolean expand){
  if (mState == StatusBarState.KEYGUARD || mState == StatusBarState.SHADE_LOCKED) {
    if (!expand && !mUnlockMethodCache.isCurrentlyInsecure()) {
      showBouncer();
    }
  }
}

Fixed version (ground truth):
public void onTrackingStopped(boolean expand){
  if (mState == StatusBarState.KEYGUARD || mState == StatusBarState.SHADE_LOCKED) {
    if (!expand && !mUnlockMethodCache.canSkipBouncer()) {
      showBouncer();
    }
  }
}
Program: 194274
Project: 194274
Buggy source:
private void logStateToEventlog(){
  boolean isShowing=mStatusBarKeyguardViewManager.isShowing();
  boolean isOccluded=mStatusBarKeyguardViewManager.isOccluded();
  boolean isBouncerShowing=mStatusBarKeyguardViewManager.isBouncerShowing();
  boolean isSecure=mUnlockMethodCache.isMethodSecure();
  boolean isCurrentlyInsecure=mUnlockMethodCache.isCurrentlyInsecure();
  int stateFingerprint=getLoggingFingerprint(mState,isShowing,isOccluded,isBouncerShowing,isSecure,isCurrentlyInsecure);
  if (stateFingerprint != mLastLoggedStateFingerprint) {
    EventLogTags.writeSysuiStatusBarState(mState,isShowing ? 1 : 0,isOccluded ? 1 : 0,isBouncerShowing ? 1 : 0,isSecure ? 1 : 0,isCurrentlyInsecure ? 1 : 0);
    mLastLoggedStateFingerprint=stateFingerprint;
  }
}

Fixed version (ground truth):
private void logStateToEventlog(){
  boolean isShowing=mStatusBarKeyguardViewManager.isShowing();
  boolean isOccluded=mStatusBarKeyguardViewManager.isOccluded();
  boolean isBouncerShowing=mStatusBarKeyguardViewManager.isBouncerShowing();
  boolean isSecure=mUnlockMethodCache.isMethodSecure();
  boolean canSkipBouncer=mUnlockMethodCache.canSkipBouncer();
  int stateFingerprint=getLoggingFingerprint(mState,isShowing,isOccluded,isBouncerShowing,isSecure,canSkipBouncer);
  if (stateFingerprint != mLastLoggedStateFingerprint) {
    EventLogTags.writeSysuiStatusBarState(mState,isShowing ? 1 : 0,isOccluded ? 1 : 0,isBouncerShowing ? 1 : 0,isSecure ? 1 : 0,canSkipBouncer ? 1 : 0);
    mLastLoggedStateFingerprint=stateFingerprint;
  }
}
Program: 194275
Project: 194275
Buggy source:
public boolean isKeyguardCurrentlySecure(){
  return !mUnlockMethodCache.isCurrentlyInsecure();
}

Fixed version (ground truth):
public boolean isKeyguardCurrentlySecure(){
  return !mUnlockMethodCache.canSkipBouncer();
}
Program: 194276
Project: 194276
Buggy source:
public void onTrackingStarted(){
  mExpanding=true;
  mDarkenWhileDragging=!mUnlockMethodCache.isCurrentlyInsecure();
}

Fixed version (ground truth):
public void onTrackingStarted(){
  mExpanding=true;
  mDarkenWhileDragging=!mUnlockMethodCache.canSkipBouncer();
}
Program: 194277
Project: 194277
Buggy source:
private void update(boolean updateAlways){
  int user=KeyguardUpdateMonitor.getCurrentUser();
  boolean secure=mLockPatternUtils.isSecure(user);
  boolean currentlyInsecure=!secure || mKeyguardUpdateMonitor.getUserHasTrust(user);
  boolean trustManaged=mKeyguardUpdateMonitor.getUserTrustIsManaged(user);
  boolean faceUnlockRunning=mKeyguardUpdateMonitor.isFaceUnlockRunning(user) && trustManaged;
  boolean changed=secure != mSecure || currentlyInsecure != mCurrentlyInsecure || trustManaged != mTrustManaged || faceUnlockRunning != mFaceUnlockRunning;
  if (changed || updateAlways) {
    mSecure=secure;
    mCurrentlyInsecure=currentlyInsecure;
    mTrustManaged=trustManaged;
    mFaceUnlockRunning=faceUnlockRunning;
    notifyListeners();
  }
}

Fixed version (ground truth):
private void update(boolean updateAlways){
  int user=KeyguardUpdateMonitor.getCurrentUser();
  boolean secure=mLockPatternUtils.isSecure(user);
  boolean canSkipBouncer=!secure || mKeyguardUpdateMonitor.getUserCanSkipBouncer(user);
  boolean trustManaged=mKeyguardUpdateMonitor.getUserTrustIsManaged(user);
  boolean trusted=mKeyguardUpdateMonitor.getUserHasTrust(user);
  boolean faceUnlockRunning=mKeyguardUpdateMonitor.isFaceUnlockRunning(user) && trustManaged;
  boolean changed=secure != mSecure || canSkipBouncer != mCanSkipBouncer || trustManaged != mTrustManaged || faceUnlockRunning != mFaceUnlockRunning;
  if (changed || updateAlways) {
    mSecure=secure;
    mCanSkipBouncer=canSkipBouncer;
    mTrusted=trusted;
    mTrustManaged=trustManaged;
    mFaceUnlockRunning=faceUnlockRunning;
    notifyListeners();
  }
}
Program: 194278
Project: 194278
Buggy source:
public KeyguardMonitor(Context context){
  mContext=context;
  mKeyguardUpdateMonitor=KeyguardUpdateMonitor.getInstance(mContext);
  mUserTracker=new CurrentUserTracker(mContext){
    @Override public void onUserSwitched(    int newUserId){
      mCurrentUser=newUserId;
      updateTrustedState();
    }
  }
;
}

Fixed version (ground truth):
public KeyguardMonitor(Context context){
  mContext=context;
  mKeyguardUpdateMonitor=KeyguardUpdateMonitor.getInstance(mContext);
  mUserTracker=new CurrentUserTracker(mContext){
    @Override public void onUserSwitched(    int newUserId){
      mCurrentUser=newUserId;
      updateCanSkipBouncerState();
    }
  }
;
}
Program: 194279
Project: 194279
Buggy source:
@Override public void onTrustChanged(int userId){
  updateTrustedState();
  notifyKeyguardChanged();
}

Fixed version (ground truth):
@Override public void onTrustChanged(int userId){
  updateCanSkipBouncerState();
  notifyKeyguardChanged();
}
Program: 194280
Project: 194280
Buggy source:
@Override public void onUserSwitched(int newUserId){
  mCurrentUser=newUserId;
  updateTrustedState();
}

Fixed version (ground truth):
@Override public void onUserSwitched(int newUserId){
  mCurrentUser=newUserId;
  updateCanSkipBouncerState();
}
Program: 194281
Project: 194281
Buggy source:
public void addCallback(Callback callback){
  mCallbacks.add(callback);
  if (mCallbacks.size() != 0 && !mListening) {
    mListening=true;
    mCurrentUser=ActivityManager.getCurrentUser();
    updateTrustedState();
    mKeyguardUpdateMonitor.registerCallback(this);
    mUserTracker.startTracking();
  }
}

Fixed version (ground truth):
public void addCallback(Callback callback){
  mCallbacks.add(callback);
  if (mCallbacks.size() != 0 && !mListening) {
    mListening=true;
    mCurrentUser=ActivityManager.getCurrentUser();
    updateCanSkipBouncerState();
    mKeyguardUpdateMonitor.registerCallback(this);
    mUserTracker.startTracking();
  }
}
Program: 194282
Project: 194282
Buggy source:
@Override public int getCount(){
  boolean secureKeyguardShowing=mController.mKeyguardMonitor.isShowing() && mController.mKeyguardMonitor.isSecure() && !mController.mKeyguardMonitor.isTrusted();
  if (!secureKeyguardShowing) {
    return mController.mUsers.size();
  }
  final int N=mController.mUsers.size();
  int count=0;
  for (int i=0; i < N; i++) {
    if (mController.mUsers.get(i).isRestricted) {
      break;
    }
 else {
      count++;
    }
  }
  return count;
}

Fixed version (ground truth):
@Override public int getCount(){
  boolean secureKeyguardShowing=mController.mKeyguardMonitor.isShowing() && mController.mKeyguardMonitor.isSecure() && !mController.mKeyguardMonitor.canSkipBouncer();
  if (!secureKeyguardShowing) {
    return mController.mUsers.size();
  }
  final int N=mController.mUsers.size();
  int count=0;
  for (int i=0; i < N; i++) {
    if (mController.mUsers.get(i).isRestricted) {
      break;
    }
 else {
      count++;
    }
  }
  return count;
}
Program: 194283
Project: 194283
Buggy source:
private RemoteViews generateActionButton(Action action){
  final boolean tombstone=(action.actionIntent == null);
  RemoteViews button=new RemoteViews(mContext.getPackageName(),tombstone ? getActionTombstoneLayoutResource() : getActionLayoutResource());
  button.setTextViewCompoundDrawablesRelative(R.id.action0,action.icon,0,0,0);
  button.setTextViewText(R.id.action0,processLegacyText(action.title));
  if (!tombstone) {
    button.setOnClickPendingIntent(R.id.action0,action.actionIntent);
  }
  button.setContentDescription(R.id.action0,action.title);
  processLegacyAction(action,button);
  return button;
}

Fixed version (ground truth):
private RemoteViews generateActionButton(Action action){
  final boolean tombstone=(action.actionIntent == null);
  RemoteViews button=new BuilderRemoteViews(mContext.getApplicationInfo(),tombstone ? getActionTombstoneLayoutResource() : getActionLayoutResource());
  button.setTextViewCompoundDrawablesRelative(R.id.action0,action.icon,0,0,0);
  button.setTextViewText(R.id.action0,processLegacyText(action.title));
  if (!tombstone) {
    button.setOnClickPendingIntent(R.id.action0,action.actionIntent);
  }
  button.setContentDescription(R.id.action0,action.title);
  processLegacyAction(action,button);
  return button;
}
Program: 194284
Project: 194284
Buggy source:
private RemoteViews generateMediaActionButton(Action action){
  final boolean tombstone=(action.actionIntent == null);
  RemoteViews button=new RemoteViews(mBuilder.mContext.getPackageName(),R.layout.notification_material_media_action);
  button.setImageViewResource(R.id.action0,action.icon);
  button.setDrawableParameters(R.id.action0,false,-1,0xFFFFFFFF,PorterDuff.Mode.SRC_ATOP,-1);
  if (!tombstone) {
    button.setOnClickPendingIntent(R.id.action0,action.actionIntent);
  }
  button.setContentDescription(R.id.action0,action.title);
  return button;
}

Fixed version (ground truth):
private RemoteViews generateMediaActionButton(Action action){
  final boolean tombstone=(action.actionIntent == null);
  RemoteViews button=new BuilderRemoteViews(mBuilder.mContext.getApplicationInfo(),R.layout.notification_material_media_action);
  button.setImageViewResource(R.id.action0,action.icon);
  button.setDrawableParameters(R.id.action0,false,-1,0xFFFFFFFF,PorterDuff.Mode.SRC_ATOP,-1);
  if (!tombstone) {
    button.setOnClickPendingIntent(R.id.action0,action.actionIntent);
  }
  button.setContentDescription(R.id.action0,action.title);
  return button;
}
Program: 194285
Project: 194285
Buggy source:
/** 
 * Make a shallow copy of this package settings.
 */
public void copyFrom(PackageSettingBase base){
  mPermissionsState.copyFrom(base.mPermissionsState);
  primaryCpuAbiString=base.primaryCpuAbiString;
  secondaryCpuAbiString=base.secondaryCpuAbiString;
  cpuAbiOverrideString=base.cpuAbiOverrideString;
  timeStamp=base.timeStamp;
  firstInstallTime=base.firstInstallTime;
  lastUpdateTime=base.lastUpdateTime;
  signatures=base.signatures;
  installPermissionsFixed=base.installPermissionsFixed;
  userState.clear();
  for (int i=0; i < base.userState.size(); i++) {
    userState.put(base.userState.keyAt(i),base.userState.valueAt(i));
  }
  installStatus=base.installStatus;
  keySetData=base.keySetData;
  verificationInfo=base.verificationInfo;
}

Fixed version (ground truth):
/** 
 * Make a shallow copy of this package settings.
 */
public void copyFrom(PackageSettingBase base){
  mPermissionsState.copyFrom(base.mPermissionsState);
  primaryCpuAbiString=base.primaryCpuAbiString;
  secondaryCpuAbiString=base.secondaryCpuAbiString;
  cpuAbiOverrideString=base.cpuAbiOverrideString;
  timeStamp=base.timeStamp;
  firstInstallTime=base.firstInstallTime;
  lastUpdateTime=base.lastUpdateTime;
  signatures=base.signatures;
  installPermissionsFixed=base.installPermissionsFixed;
  userState.clear();
  for (int i=0; i < base.userState.size(); i++) {
    userState.put(base.userState.keyAt(i),base.userState.valueAt(i));
  }
  installStatus=base.installStatus;
  keySetData=base.keySetData;
  verificationInfo=base.verificationInfo;
  installerPackageName=base.installerPackageName;
}
Program: 194286
Project: 194286
Buggy source:
/** 
 * Make a shallow copy of this package settings.
 */
public void copyFrom(PackageSettingBase base){
  mPermissionsState.copyFrom(base.mPermissionsState);
  primaryCpuAbiString=base.primaryCpuAbiString;
  secondaryCpuAbiString=base.secondaryCpuAbiString;
  cpuAbiOverrideString=base.cpuAbiOverrideString;
  timeStamp=base.timeStamp;
  firstInstallTime=base.firstInstallTime;
  lastUpdateTime=base.lastUpdateTime;
  signatures=base.signatures;
  installPermissionsFixed=base.installPermissionsFixed;
  userState.clear();
  for (int i=0; i < base.userState.size(); i++) {
    userState.put(base.userState.keyAt(i),base.userState.valueAt(i));
  }
  installStatus=base.installStatus;
  keySetData=base.keySetData;
  verificationInfo=base.verificationInfo;
}

Fixed version (ground truth):
/** 
 * Make a shallow copy of this package settings.
 */
public void copyFrom(PackageSettingBase base){
  mPermissionsState.copyFrom(base.mPermissionsState);
  primaryCpuAbiString=base.primaryCpuAbiString;
  secondaryCpuAbiString=base.secondaryCpuAbiString;
  cpuAbiOverrideString=base.cpuAbiOverrideString;
  timeStamp=base.timeStamp;
  firstInstallTime=base.firstInstallTime;
  lastUpdateTime=base.lastUpdateTime;
  signatures=base.signatures;
  installPermissionsFixed=base.installPermissionsFixed;
  userState.clear();
  for (int i=0; i < base.userState.size(); i++) {
    userState.put(base.userState.keyAt(i),base.userState.valueAt(i));
  }
  installStatus=base.installStatus;
  keySetData=base.keySetData;
  verificationInfo=base.verificationInfo;
  installerPackageName=base.installerPackageName;
}
Program: 194287
Project: 194287
Buggy source:
/** 
 * Make a shallow copy of this package settings.
 */
public void copyFrom(PackageSettingBase base){
  mPermissionsState.copyFrom(base.mPermissionsState);
  primaryCpuAbiString=base.primaryCpuAbiString;
  secondaryCpuAbiString=base.secondaryCpuAbiString;
  cpuAbiOverrideString=base.cpuAbiOverrideString;
  timeStamp=base.timeStamp;
  firstInstallTime=base.firstInstallTime;
  lastUpdateTime=base.lastUpdateTime;
  signatures=base.signatures;
  installPermissionsFixed=base.installPermissionsFixed;
  userState.clear();
  for (int i=0; i < base.userState.size(); i++) {
    userState.put(base.userState.keyAt(i),base.userState.valueAt(i));
  }
  installStatus=base.installStatus;
  keySetData=base.keySetData;
  verificationInfo=base.verificationInfo;
}

Fixed version (ground truth):
/** 
 * Make a shallow copy of this package settings.
 */
public void copyFrom(PackageSettingBase base){
  mPermissionsState.copyFrom(base.mPermissionsState);
  primaryCpuAbiString=base.primaryCpuAbiString;
  secondaryCpuAbiString=base.secondaryCpuAbiString;
  cpuAbiOverrideString=base.cpuAbiOverrideString;
  timeStamp=base.timeStamp;
  firstInstallTime=base.firstInstallTime;
  lastUpdateTime=base.lastUpdateTime;
  signatures=base.signatures;
  installPermissionsFixed=base.installPermissionsFixed;
  userState.clear();
  for (int i=0; i < base.userState.size(); i++) {
    userState.put(base.userState.keyAt(i),base.userState.valueAt(i));
  }
  installStatus=base.installStatus;
  keySetData=base.keySetData;
  verificationInfo=base.verificationInfo;
  installerPackageName=base.installerPackageName;
}
Program: 194288
Project: 194288
Buggy source:
/** 
 * Make a shallow copy of this package settings.
 */
public void copyFrom(PackageSettingBase base){
  mPermissionsState.copyFrom(base.mPermissionsState);
  primaryCpuAbiString=base.primaryCpuAbiString;
  secondaryCpuAbiString=base.secondaryCpuAbiString;
  cpuAbiOverrideString=base.cpuAbiOverrideString;
  timeStamp=base.timeStamp;
  firstInstallTime=base.firstInstallTime;
  lastUpdateTime=base.lastUpdateTime;
  signatures=base.signatures;
  installPermissionsFixed=base.installPermissionsFixed;
  userState.clear();
  for (int i=0; i < base.userState.size(); i++) {
    userState.put(base.userState.keyAt(i),base.userState.valueAt(i));
  }
  installStatus=base.installStatus;
  keySetData=base.keySetData;
  verificationInfo=base.verificationInfo;
}

Fixed version (ground truth):
/** 
 * Make a shallow copy of this package settings.
 */
public void copyFrom(PackageSettingBase base){
  mPermissionsState.copyFrom(base.mPermissionsState);
  primaryCpuAbiString=base.primaryCpuAbiString;
  secondaryCpuAbiString=base.secondaryCpuAbiString;
  cpuAbiOverrideString=base.cpuAbiOverrideString;
  timeStamp=base.timeStamp;
  firstInstallTime=base.firstInstallTime;
  lastUpdateTime=base.lastUpdateTime;
  signatures=base.signatures;
  installPermissionsFixed=base.installPermissionsFixed;
  userState.clear();
  for (int i=0; i < base.userState.size(); i++) {
    userState.put(base.userState.keyAt(i),base.userState.valueAt(i));
  }
  installStatus=base.installStatus;
  keySetData=base.keySetData;
  verificationInfo=base.verificationInfo;
  installerPackageName=base.installerPackageName;
}
Program: 194289
Project: 194289
Buggy source:
/** 
 * Make a shallow copy of this package settings.
 */
public void copyFrom(PackageSettingBase base){
  mPermissionsState.copyFrom(base.mPermissionsState);
  primaryCpuAbiString=base.primaryCpuAbiString;
  secondaryCpuAbiString=base.secondaryCpuAbiString;
  cpuAbiOverrideString=base.cpuAbiOverrideString;
  timeStamp=base.timeStamp;
  firstInstallTime=base.firstInstallTime;
  lastUpdateTime=base.lastUpdateTime;
  signatures=base.signatures;
  installPermissionsFixed=base.installPermissionsFixed;
  userState.clear();
  for (int i=0; i < base.userState.size(); i++) {
    userState.put(base.userState.keyAt(i),base.userState.valueAt(i));
  }
  installStatus=base.installStatus;
  keySetData=base.keySetData;
  verificationInfo=base.verificationInfo;
}

Fixed version (ground truth):
/** 
 * Make a shallow copy of this package settings.
 */
public void copyFrom(PackageSettingBase base){
  mPermissionsState.copyFrom(base.mPermissionsState);
  primaryCpuAbiString=base.primaryCpuAbiString;
  secondaryCpuAbiString=base.secondaryCpuAbiString;
  cpuAbiOverrideString=base.cpuAbiOverrideString;
  timeStamp=base.timeStamp;
  firstInstallTime=base.firstInstallTime;
  lastUpdateTime=base.lastUpdateTime;
  signatures=base.signatures;
  installPermissionsFixed=base.installPermissionsFixed;
  userState.clear();
  for (int i=0; i < base.userState.size(); i++) {
    userState.put(base.userState.keyAt(i),base.userState.valueAt(i));
  }
  installStatus=base.installStatus;
  keySetData=base.keySetData;
  verificationInfo=base.verificationInfo;
  installerPackageName=base.installerPackageName;
}
Program: 194290
Project: 194290
Buggy source:
/** 
 * Make a shallow copy of this package settings.
 */
public void copyFrom(PackageSettingBase base){
  mPermissionsState.copyFrom(base.mPermissionsState);
  primaryCpuAbiString=base.primaryCpuAbiString;
  secondaryCpuAbiString=base.secondaryCpuAbiString;
  cpuAbiOverrideString=base.cpuAbiOverrideString;
  timeStamp=base.timeStamp;
  firstInstallTime=base.firstInstallTime;
  lastUpdateTime=base.lastUpdateTime;
  signatures=base.signatures;
  installPermissionsFixed=base.installPermissionsFixed;
  userState.clear();
  for (int i=0; i < base.userState.size(); i++) {
    userState.put(base.userState.keyAt(i),base.userState.valueAt(i));
  }
  installStatus=base.installStatus;
  keySetData=base.keySetData;
  verificationInfo=base.verificationInfo;
}

Fixed version (ground truth):
/** 
 * Make a shallow copy of this package settings.
 */
public void copyFrom(PackageSettingBase base){
  mPermissionsState.copyFrom(base.mPermissionsState);
  primaryCpuAbiString=base.primaryCpuAbiString;
  secondaryCpuAbiString=base.secondaryCpuAbiString;
  cpuAbiOverrideString=base.cpuAbiOverrideString;
  timeStamp=base.timeStamp;
  firstInstallTime=base.firstInstallTime;
  lastUpdateTime=base.lastUpdateTime;
  signatures=base.signatures;
  installPermissionsFixed=base.installPermissionsFixed;
  userState.clear();
  for (int i=0; i < base.userState.size(); i++) {
    userState.put(base.userState.keyAt(i),base.userState.valueAt(i));
  }
  installStatus=base.installStatus;
  keySetData=base.keySetData;
  verificationInfo=base.verificationInfo;
  installerPackageName=base.installerPackageName;
}
Program: 194291
Project: 194291
Buggy source:
/** 
 * Make a shallow copy of this package settings.
 */
public void copyFrom(PackageSettingBase base){
  mPermissionsState.copyFrom(base.mPermissionsState);
  primaryCpuAbiString=base.primaryCpuAbiString;
  secondaryCpuAbiString=base.secondaryCpuAbiString;
  cpuAbiOverrideString=base.cpuAbiOverrideString;
  timeStamp=base.timeStamp;
  firstInstallTime=base.firstInstallTime;
  lastUpdateTime=base.lastUpdateTime;
  signatures=base.signatures;
  installPermissionsFixed=base.installPermissionsFixed;
  userState.clear();
  for (int i=0; i < base.userState.size(); i++) {
    userState.put(base.userState.keyAt(i),base.userState.valueAt(i));
  }
  installStatus=base.installStatus;
  keySetData=base.keySetData;
  verificationInfo=base.verificationInfo;
}

Fixed version (ground truth):
/** 
 * Make a shallow copy of this package settings.
 */
public void copyFrom(PackageSettingBase base){
  mPermissionsState.copyFrom(base.mPermissionsState);
  primaryCpuAbiString=base.primaryCpuAbiString;
  secondaryCpuAbiString=base.secondaryCpuAbiString;
  cpuAbiOverrideString=base.cpuAbiOverrideString;
  timeStamp=base.timeStamp;
  firstInstallTime=base.firstInstallTime;
  lastUpdateTime=base.lastUpdateTime;
  signatures=base.signatures;
  installPermissionsFixed=base.installPermissionsFixed;
  userState.clear();
  for (int i=0; i < base.userState.size(); i++) {
    userState.put(base.userState.keyAt(i),base.userState.valueAt(i));
  }
  installStatus=base.installStatus;
  keySetData=base.keySetData;
  verificationInfo=base.verificationInfo;
  installerPackageName=base.installerPackageName;
}
Program: 194292
Project: 194292
Buggy source:
/** 
 * Make a shallow copy of this package settings.
 */
public void copyFrom(PackageSettingBase base){
  mPermissionsState.copyFrom(base.mPermissionsState);
  primaryCpuAbiString=base.primaryCpuAbiString;
  secondaryCpuAbiString=base.secondaryCpuAbiString;
  cpuAbiOverrideString=base.cpuAbiOverrideString;
  timeStamp=base.timeStamp;
  firstInstallTime=base.firstInstallTime;
  lastUpdateTime=base.lastUpdateTime;
  signatures=base.signatures;
  installPermissionsFixed=base.installPermissionsFixed;
  userState.clear();
  for (int i=0; i < base.userState.size(); i++) {
    userState.put(base.userState.keyAt(i),base.userState.valueAt(i));
  }
  installStatus=base.installStatus;
  keySetData=base.keySetData;
  verificationInfo=base.verificationInfo;
}

Fixed version (ground truth):
/** 
 * Make a shallow copy of this package settings.
 */
public void copyFrom(PackageSettingBase base){
  mPermissionsState.copyFrom(base.mPermissionsState);
  primaryCpuAbiString=base.primaryCpuAbiString;
  secondaryCpuAbiString=base.secondaryCpuAbiString;
  cpuAbiOverrideString=base.cpuAbiOverrideString;
  timeStamp=base.timeStamp;
  firstInstallTime=base.firstInstallTime;
  lastUpdateTime=base.lastUpdateTime;
  signatures=base.signatures;
  installPermissionsFixed=base.installPermissionsFixed;
  userState.clear();
  for (int i=0; i < base.userState.size(); i++) {
    userState.put(base.userState.keyAt(i),base.userState.valueAt(i));
  }
  installStatus=base.installStatus;
  keySetData=base.keySetData;
  verificationInfo=base.verificationInfo;
  installerPackageName=base.installerPackageName;
}
Program: 194293
Project: 194293
Buggy source:
/** 
 * Returns true if assist data has been blocked starting at this node in the hierarchy.
 */
public boolean isAssistBlocked(){
  return (mFlags & ViewNode.FLAGS_ASSIST_BLOCKED) == 0;
}

Fixed version (ground truth):
/** 
 * Returns true if assist data has been blocked starting at this node in the hierarchy.
 */
public boolean isAssistBlocked(){
  return (mFlags & ViewNode.FLAGS_ASSIST_BLOCKED) != 0;
}
Program: 194299
Project: 194299
Buggy source:
/** 
 * Returns true if assist data has been blocked starting at this node in the hierarchy.
 */
public boolean isAssistBlocked(){
  return (mFlags & ViewNode.FLAGS_ASSIST_BLOCKED) == 0;
}

Fixed version (ground truth):
/** 
 * Returns true if assist data has been blocked starting at this node in the hierarchy.
 */
public boolean isAssistBlocked(){
  return (mFlags & ViewNode.FLAGS_ASSIST_BLOCKED) != 0;
}
Program: 194300
Project: 194300
Buggy source:
/** 
 * Make a shallow copy of this package settings.
 */
public void copyFrom(PackageSettingBase base){
  grantedPermissions=base.grantedPermissions;
  gids=base.gids;
  primaryCpuAbiString=base.primaryCpuAbiString;
  secondaryCpuAbiString=base.secondaryCpuAbiString;
  cpuAbiOverrideString=base.cpuAbiOverrideString;
  timeStamp=base.timeStamp;
  firstInstallTime=base.firstInstallTime;
  lastUpdateTime=base.lastUpdateTime;
  signatures=base.signatures;
  permissionsFixed=base.permissionsFixed;
  haveGids=base.haveGids;
  userState.clear();
  for (int i=0; i < base.userState.size(); i++) {
    userState.put(base.userState.keyAt(i),base.userState.valueAt(i));
  }
  installStatus=base.installStatus;
  keySetData=base.keySetData;
}

Fixed version (ground truth):
/** 
 * Make a shallow copy of this package settings.
 */
public void copyFrom(PackageSettingBase base){
  grantedPermissions=base.grantedPermissions;
  gids=base.gids;
  primaryCpuAbiString=base.primaryCpuAbiString;
  secondaryCpuAbiString=base.secondaryCpuAbiString;
  cpuAbiOverrideString=base.cpuAbiOverrideString;
  timeStamp=base.timeStamp;
  firstInstallTime=base.firstInstallTime;
  lastUpdateTime=base.lastUpdateTime;
  signatures=base.signatures;
  permissionsFixed=base.permissionsFixed;
  haveGids=base.haveGids;
  userState.clear();
  for (int i=0; i < base.userState.size(); i++) {
    userState.put(base.userState.keyAt(i),base.userState.valueAt(i));
  }
  installStatus=base.installStatus;
  keySetData=base.keySetData;
  installerPackageName=base.installerPackageName;
}
Program: 194302
Project: 194302
Buggy source:
/** 
 * Make a shallow copy of this package settings.
 */
public void copyFrom(PackageSettingBase base){
  grantedPermissions=base.grantedPermissions;
  gids=base.gids;
  primaryCpuAbiString=base.primaryCpuAbiString;
  secondaryCpuAbiString=base.secondaryCpuAbiString;
  cpuAbiOverrideString=base.cpuAbiOverrideString;
  timeStamp=base.timeStamp;
  firstInstallTime=base.firstInstallTime;
  lastUpdateTime=base.lastUpdateTime;
  signatures=base.signatures;
  permissionsFixed=base.permissionsFixed;
  haveGids=base.haveGids;
  userState.clear();
  for (int i=0; i < base.userState.size(); i++) {
    userState.put(base.userState.keyAt(i),base.userState.valueAt(i));
  }
  installStatus=base.installStatus;
  keySetData=base.keySetData;
}

Fixed version (ground truth):
/** 
 * Make a shallow copy of this package settings.
 */
public void copyFrom(PackageSettingBase base){
  grantedPermissions=base.grantedPermissions;
  gids=base.gids;
  primaryCpuAbiString=base.primaryCpuAbiString;
  secondaryCpuAbiString=base.secondaryCpuAbiString;
  cpuAbiOverrideString=base.cpuAbiOverrideString;
  timeStamp=base.timeStamp;
  firstInstallTime=base.firstInstallTime;
  lastUpdateTime=base.lastUpdateTime;
  signatures=base.signatures;
  permissionsFixed=base.permissionsFixed;
  haveGids=base.haveGids;
  userState.clear();
  for (int i=0; i < base.userState.size(); i++) {
    userState.put(base.userState.keyAt(i),base.userState.valueAt(i));
  }
  installStatus=base.installStatus;
  keySetData=base.keySetData;
  installerPackageName=base.installerPackageName;
}
Program: 194303
Project: 194303
Buggy source:
/** 
 * Returns true if assist data has been blocked starting at this node in the hierarchy.
 */
public boolean isAssistBlocked(){
  return (mFlags & ViewNode.FLAGS_ASSIST_BLOCKED) == 0;
}

Fixed version (ground truth):
/** 
 * Returns true if assist data has been blocked starting at this node in the hierarchy.
 */
public boolean isAssistBlocked(){
  return (mFlags & ViewNode.FLAGS_ASSIST_BLOCKED) != 0;
}
Program: 194305
Project: 194305
Buggy source:
/** 
 * Returns true if assist data has been blocked starting at this node in the hierarchy.
 */
public boolean isAssistBlocked(){
  return (mFlags & ViewNode.FLAGS_ASSIST_BLOCKED) == 0;
}

Fixed version (ground truth):
/** 
 * Returns true if assist data has been blocked starting at this node in the hierarchy.
 */
public boolean isAssistBlocked(){
  return (mFlags & ViewNode.FLAGS_ASSIST_BLOCKED) != 0;
}
Program: 194313
Project: 194313
Buggy source:
/** 
 * Returns true if assist data has been blocked starting at this node in the hierarchy.
 */
public boolean isAssistBlocked(){
  return (mFlags & ViewNode.FLAGS_ASSIST_BLOCKED) == 0;
}

Fixed version (ground truth):
/** 
 * Returns true if assist data has been blocked starting at this node in the hierarchy.
 */
public boolean isAssistBlocked(){
  return (mFlags & ViewNode.FLAGS_ASSIST_BLOCKED) != 0;
}
Program: 194314
Project: 194314
Buggy source:
/** 
 * Returns true if assist data has been blocked starting at this node in the hierarchy.
 */
public boolean isAssistBlocked(){
  return (mFlags & ViewNode.FLAGS_ASSIST_BLOCKED) == 0;
}

Fixed version (ground truth):
/** 
 * Returns true if assist data has been blocked starting at this node in the hierarchy.
 */
public boolean isAssistBlocked(){
  return (mFlags & ViewNode.FLAGS_ASSIST_BLOCKED) != 0;
}
Program: 194322
Project: 194322
Buggy source:
/** 
 * Returns true if assist data has been blocked starting at this node in the hierarchy.
 */
public boolean isAssistBlocked(){
  return (mFlags & ViewNode.FLAGS_ASSIST_BLOCKED) == 0;
}

Fixed version (ground truth):
/** 
 * Returns true if assist data has been blocked starting at this node in the hierarchy.
 */
public boolean isAssistBlocked(){
  return (mFlags & ViewNode.FLAGS_ASSIST_BLOCKED) != 0;
}
Program: 194323
Project: 194323
Buggy source:
/** 
 * Returns true if assist data has been blocked starting at this node in the hierarchy.
 */
public boolean isAssistBlocked(){
  return (mFlags & ViewNode.FLAGS_ASSIST_BLOCKED) == 0;
}

Fixed version (ground truth):
/** 
 * Returns true if assist data has been blocked starting at this node in the hierarchy.
 */
public boolean isAssistBlocked(){
  return (mFlags & ViewNode.FLAGS_ASSIST_BLOCKED) != 0;
}
Program: 194327
Project: 194327
Buggy source:
@Override public void sendOrderedBroadcastAsUser(Intent intent,UserHandle user,String receiverPermission,int appOp,BroadcastReceiver resultReceiver,Handler scheduler,int initialCode,String initialData,Bundle initialExtras){
  IIntentReceiver rd=null;
  if (resultReceiver != null) {
    if (mPackageInfo != null) {
      if (scheduler == null) {
        scheduler=mMainThread.getHandler();
      }
      rd=mPackageInfo.getReceiverDispatcher(resultReceiver,getOuterContext(),scheduler,mMainThread.getInstrumentation(),false);
    }
 else {
      if (scheduler == null) {
        scheduler=mMainThread.getHandler();
      }
      rd=new LoadedApk.ReceiverDispatcher(resultReceiver,getOuterContext(),scheduler,null,false).getIIntentReceiver();
    }
  }
  String resolvedType=intent.resolveTypeIfNeeded(getContentResolver());
  String[] receiverPermissions=receiverPermission == null ? null : new String[]{receiverPermission};
  try {
    intent.prepareToLeaveProcess();
    ActivityManagerNative.getDefault().broadcastIntent(mMainThread.getApplicationThread(),intent,resolvedType,rd,initialCode,initialData,initialExtras,receiverPermissions,appOp,null,true,false,user.getIdentifier());
  }
 catch (  RemoteException e) {
    throw new RuntimeException("String_Node_Str",e);
  }
}

Fixed version (ground truth):
@Override public void sendOrderedBroadcastAsUser(Intent intent,UserHandle user,String receiverPermission,int appOp,Bundle options,BroadcastReceiver resultReceiver,Handler scheduler,int initialCode,String initialData,Bundle initialExtras){
  IIntentReceiver rd=null;
  if (resultReceiver != null) {
    if (mPackageInfo != null) {
      if (scheduler == null) {
        scheduler=mMainThread.getHandler();
      }
      rd=mPackageInfo.getReceiverDispatcher(resultReceiver,getOuterContext(),scheduler,mMainThread.getInstrumentation(),false);
    }
 else {
      if (scheduler == null) {
        scheduler=mMainThread.getHandler();
      }
      rd=new LoadedApk.ReceiverDispatcher(resultReceiver,getOuterContext(),scheduler,null,false).getIIntentReceiver();
    }
  }
  String resolvedType=intent.resolveTypeIfNeeded(getContentResolver());
  String[] receiverPermissions=receiverPermission == null ? null : new String[]{receiverPermission};
  try {
    intent.prepareToLeaveProcess();
    ActivityManagerNative.getDefault().broadcastIntent(mMainThread.getApplicationThread(),intent,resolvedType,rd,initialCode,initialData,initialExtras,receiverPermissions,appOp,options,true,false,user.getIdentifier());
  }
 catch (  RemoteException e) {
    throw new RuntimeException("String_Node_Str",e);
  }
}
Program: 194328
Project: 194328
Buggy source:
/** 
 * Similar to above but takes an appOp as well, to enforce restrictions.
 * @see #sendOrderedBroadcastAsUser(Intent,UserHandle,String,BroadcastReceiver,Handler,int,String,Bundle)
 * @hide
 */
public abstract void sendOrderedBroadcastAsUser(Intent intent,UserHandle user,@Nullable String receiverPermission,int appOp,BroadcastReceiver resultReceiver,@Nullable Handler scheduler,int initialCode,@Nullable String initialData,@Nullable Bundle initialExtras);

Fixed version (ground truth):
/** 
 * Similar to above but takes an appOp as well, to enforce restrictions, and an options Bundle.
 * @see #sendOrderedBroadcastAsUser(Intent,UserHandle,String,BroadcastReceiver,Handler,int,String,Bundle)
 * @hide
 */
public abstract void sendOrderedBroadcastAsUser(Intent intent,UserHandle user,@Nullable String receiverPermission,int appOp,@Nullable Bundle options,BroadcastReceiver resultReceiver,@Nullable Handler scheduler,int initialCode,@Nullable String initialData,@Nullable Bundle initialExtras);
Program: 194329
Project: 194329
Buggy source:
/** 
 * @hide 
 */
@Override public void sendOrderedBroadcastAsUser(Intent intent,UserHandle user,String receiverPermission,int appOp,BroadcastReceiver resultReceiver,Handler scheduler,int initialCode,String initialData,Bundle initialExtras){
  mBase.sendOrderedBroadcastAsUser(intent,user,receiverPermission,appOp,resultReceiver,scheduler,initialCode,initialData,initialExtras);
}

Fixed version (ground truth):
/** 
 * @hide 
 */
@Override public void sendOrderedBroadcastAsUser(Intent intent,UserHandle user,String receiverPermission,int appOp,Bundle options,BroadcastReceiver resultReceiver,Handler scheduler,int initialCode,String initialData,Bundle initialExtras){
  mBase.sendOrderedBroadcastAsUser(intent,user,receiverPermission,appOp,options,resultReceiver,scheduler,initialCode,initialData,initialExtras);
}