nus-yam/ex-repair huggingface dataset:
Program: 193682
Project: 193682
Buggy source:
@Override public void onAppTransitionStartingLocked(IBinder openToken,IBinder closeToken,final Animation openAnimation,final Animation closeAnimation){
  mHandler.post(new Runnable(){
    @Override public void run(){
      try {
        IStatusBarService statusbar=getStatusBarService();
        if (statusbar != null) {
          long startTime=calculateStatusBarTransitionStartTime(openAnimation,closeAnimation);
          statusbar.appTransitionStarting(startTime,TRANSITION_DURATION);
        }
      }
 catch (      RemoteException e) {
        Slog.e(mTag,"String_Node_Str",e);
        mStatusBarService=null;
      }
    }
  }
);
}

Fixed version (ground truth):
@Override public void onAppTransitionStartingLocked(IBinder openToken,IBinder closeToken,final Animation openAnimation,final Animation closeAnimation){
  mHandler.post(new Runnable(){
    @Override public void run(){
      try {
        IStatusBarService statusbar=getStatusBarService();
        if (statusbar != null) {
          long startTime=calculateStatusBarTransitionStartTime(openAnimation,closeAnimation);
          long duration=closeAnimation != null || openAnimation != null ? TRANSITION_DURATION : 0;
          statusbar.appTransitionStarting(startTime,duration);
        }
      }
 catch (      RemoteException e) {
        Slog.e(mTag,"String_Node_Str",e);
        mStatusBarService=null;
      }
    }
  }
);
}
Program: 193683
Project: 193683
Buggy source:
@Override public void onFingerprintAuthenticated(int userId){
  boolean wasDeviceInteractive=mUpdateMonitor.isDeviceInteractive();
  mMode=calculateMode();
  if (!wasDeviceInteractive) {
    if (DEBUG_FP_WAKELOCK) {
      Log.i(TAG,"String_Node_Str");
    }
    mPowerManager.wakeUp(SystemClock.uptimeMillis());
  }
  releaseFingerprintWakeLock();
switch (mMode) {
case MODE_DISMISS_BOUNCER:
    mStatusBarKeyguardViewManager.notifyKeyguardAuthenticated(false);
  break;
case MODE_UNLOCK:
case MODE_SHOW_BOUNCER:
if (!wasDeviceInteractive) {
  mStatusBarKeyguardViewManager.notifyDeviceWakeUpRequested();
}
mStatusBarKeyguardViewManager.animateCollapsePanels(FINGERPRINT_COLLAPSE_SPEEDUP_FACTOR);
break;
case MODE_WAKE_AND_UNLOCK:
case MODE_WAKE_AND_UNLOCK_PULSING:
mDozeScrimController.abortPulsing();
mKeyguardViewMediator.onWakeAndUnlocking();
mScrimController.setWakeAndUnlocking();
if (mPhoneStatusBar.getNavigationBarView() != null) {
mPhoneStatusBar.getNavigationBarView().setWakeAndUnlocking(true);
}
break;
case MODE_ONLY_WAKE:
case MODE_NONE:
break;
}
if (mMode != MODE_WAKE_AND_UNLOCK_PULSING) {
mStatusBarWindowManager.setForceDozeBrightness(false);
}
mPhoneStatusBar.notifyFpAuthModeChanged();
}

Fixed version (ground truth):
@Override public void onFingerprintAuthenticated(int userId){
  boolean wasDeviceInteractive=mUpdateMonitor.isDeviceInteractive();
  mMode=calculateMode();
  if (!wasDeviceInteractive) {
    if (DEBUG_FP_WAKELOCK) {
      Log.i(TAG,"String_Node_Str");
    }
    mPowerManager.wakeUp(SystemClock.uptimeMillis());
  }
  releaseFingerprintWakeLock();
switch (mMode) {
case MODE_DISMISS_BOUNCER:
    mStatusBarKeyguardViewManager.notifyKeyguardAuthenticated(false);
  break;
case MODE_UNLOCK:
case MODE_SHOW_BOUNCER:
if (!wasDeviceInteractive) {
  mStatusBarKeyguardViewManager.notifyDeviceWakeUpRequested();
}
mStatusBarKeyguardViewManager.animateCollapsePanels(FINGERPRINT_COLLAPSE_SPEEDUP_FACTOR);
break;
case MODE_WAKE_AND_UNLOCK_PULSING:
mPhoneStatusBar.updateMediaMetaData(false);
case MODE_WAKE_AND_UNLOCK:
mStatusBarWindowManager.setStatusBarFocusable(false);
mDozeScrimController.abortPulsing();
mKeyguardViewMediator.onWakeAndUnlocking();
mScrimController.setWakeAndUnlocking();
if (mPhoneStatusBar.getNavigationBarView() != null) {
mPhoneStatusBar.getNavigationBarView().setWakeAndUnlocking(true);
}
break;
case MODE_ONLY_WAKE:
case MODE_NONE:
break;
}
if (mMode != MODE_WAKE_AND_UNLOCK_PULSING) {
mStatusBarWindowManager.setForceDozeBrightness(false);
}
mPhoneStatusBar.notifyFpAuthModeChanged();
}
Program: 193686
Project: 193686
Buggy source:
@Override public void appTransitionStarting(long startTime,long duration){
  if (!mKeyguardFadingAway) {
    mIconController.appTransitionStarting(startTime,duration);
  }
  if (mIconPolicy != null) {
    mIconPolicy.appTransitionStarting(startTime,duration);
  }
}

Fixed version (ground truth):
@Override public void appTransitionStarting(long startTime,long duration){
  if (!mKeyguardFadingAway && duration > 0) {
    mIconController.appTransitionStarting(startTime,duration);
  }
  if (mIconPolicy != null) {
    mIconPolicy.appTransitionStarting(startTime,duration);
  }
}
Program: 193687
Project: 193687
Buggy source:
public void setIconsDark(boolean dark){
  if (mTransitionPending) {
    deferIconTintChange(dark ? 1.0f : 0.0f);
  }
 else   if (mTransitionDeferring) {
    animateIconTint(dark ? 1.0f : 0.0f,Math.max(0,mTransitionDeferringStartTime - SystemClock.uptimeMillis()),mTransitionDeferringDuration);
  }
 else {
    animateIconTint(dark ? 1.0f : 0.0f,0,DEFAULT_TINT_ANIMATION_DURATION);
  }
}

Fixed version (ground truth):
public void setIconsDark(boolean dark,boolean animate){
  if (!animate) {
    setIconTintInternal(dark ? 1.0f : 0.0f);
  }
 else   if (mTransitionPending) {
    deferIconTintChange(dark ? 1.0f : 0.0f);
  }
 else   if (mTransitionDeferring) {
    animateIconTint(dark ? 1.0f : 0.0f,Math.max(0,mTransitionDeferringStartTime - SystemClock.uptimeMillis()),mTransitionDeferringDuration);
  }
 else {
    animateIconTint(dark ? 1.0f : 0.0f,0,DEFAULT_TINT_ANIMATION_DURATION);
  }
}
Program: 193688
Project: 193688
Buggy source:
@Override public void onAppTransitionStartingLocked(IBinder openToken,IBinder closeToken,final Animation openAnimation,final Animation closeAnimation){
  mHandler.post(new Runnable(){
    @Override public void run(){
      try {
        IStatusBarService statusbar=getStatusBarService();
        if (statusbar != null) {
          long startTime=calculateStatusBarTransitionStartTime(openAnimation,closeAnimation);
          statusbar.appTransitionStarting(startTime,TRANSITION_DURATION);
        }
      }
 catch (      RemoteException e) {
        Slog.e(mTag,"String_Node_Str",e);
        mStatusBarService=null;
      }
    }
  }
);
}

Fixed version (ground truth):
@Override public void onAppTransitionStartingLocked(IBinder openToken,IBinder closeToken,final Animation openAnimation,final Animation closeAnimation){
  mHandler.post(new Runnable(){
    @Override public void run(){
      try {
        IStatusBarService statusbar=getStatusBarService();
        if (statusbar != null) {
          long startTime=calculateStatusBarTransitionStartTime(openAnimation,closeAnimation);
          long duration=closeAnimation != null || openAnimation != null ? TRANSITION_DURATION : 0;
          statusbar.appTransitionStarting(startTime,duration);
        }
      }
 catch (      RemoteException e) {
        Slog.e(mTag,"String_Node_Str",e);
        mStatusBarService=null;
      }
    }
  }
);
}
Program: 193689
Project: 193689
Buggy source:
@Override public void onFingerprintAuthenticated(int userId){
  boolean wasDeviceInteractive=mUpdateMonitor.isDeviceInteractive();
  mMode=calculateMode();
  if (!wasDeviceInteractive) {
    if (DEBUG_FP_WAKELOCK) {
      Log.i(TAG,"String_Node_Str");
    }
    mPowerManager.wakeUp(SystemClock.uptimeMillis());
  }
  releaseFingerprintWakeLock();
switch (mMode) {
case MODE_DISMISS_BOUNCER:
    mStatusBarKeyguardViewManager.notifyKeyguardAuthenticated(false);
  break;
case MODE_UNLOCK:
case MODE_SHOW_BOUNCER:
if (!wasDeviceInteractive) {
  mStatusBarKeyguardViewManager.notifyDeviceWakeUpRequested();
}
mStatusBarKeyguardViewManager.animateCollapsePanels(FINGERPRINT_COLLAPSE_SPEEDUP_FACTOR);
break;
case MODE_WAKE_AND_UNLOCK:
case MODE_WAKE_AND_UNLOCK_PULSING:
mDozeScrimController.abortPulsing();
mKeyguardViewMediator.onWakeAndUnlocking();
mScrimController.setWakeAndUnlocking();
if (mPhoneStatusBar.getNavigationBarView() != null) {
mPhoneStatusBar.getNavigationBarView().setWakeAndUnlocking(true);
}
break;
case MODE_ONLY_WAKE:
case MODE_NONE:
break;
}
if (mMode != MODE_WAKE_AND_UNLOCK_PULSING) {
mStatusBarWindowManager.setForceDozeBrightness(false);
}
mPhoneStatusBar.notifyFpAuthModeChanged();
}

Fixed version (ground truth):
@Override public void onFingerprintAuthenticated(int userId){
  boolean wasDeviceInteractive=mUpdateMonitor.isDeviceInteractive();
  mMode=calculateMode();
  if (!wasDeviceInteractive) {
    if (DEBUG_FP_WAKELOCK) {
      Log.i(TAG,"String_Node_Str");
    }
    mPowerManager.wakeUp(SystemClock.uptimeMillis());
  }
  releaseFingerprintWakeLock();
switch (mMode) {
case MODE_DISMISS_BOUNCER:
    mStatusBarKeyguardViewManager.notifyKeyguardAuthenticated(false);
  break;
case MODE_UNLOCK:
case MODE_SHOW_BOUNCER:
if (!wasDeviceInteractive) {
  mStatusBarKeyguardViewManager.notifyDeviceWakeUpRequested();
}
mStatusBarKeyguardViewManager.animateCollapsePanels(FINGERPRINT_COLLAPSE_SPEEDUP_FACTOR);
break;
case MODE_WAKE_AND_UNLOCK_PULSING:
mPhoneStatusBar.updateMediaMetaData(false);
case MODE_WAKE_AND_UNLOCK:
mStatusBarWindowManager.setStatusBarFocusable(false);
mDozeScrimController.abortPulsing();
mKeyguardViewMediator.onWakeAndUnlocking();
mScrimController.setWakeAndUnlocking();
if (mPhoneStatusBar.getNavigationBarView() != null) {
mPhoneStatusBar.getNavigationBarView().setWakeAndUnlocking(true);
}
break;
case MODE_ONLY_WAKE:
case MODE_NONE:
break;
}
if (mMode != MODE_WAKE_AND_UNLOCK_PULSING) {
mStatusBarWindowManager.setForceDozeBrightness(false);
}
mPhoneStatusBar.notifyFpAuthModeChanged();
}
Program: 193692
Project: 193692
Buggy source:
@Override public void appTransitionStarting(long startTime,long duration){
  if (!mKeyguardFadingAway) {
    mIconController.appTransitionStarting(startTime,duration);
  }
  if (mIconPolicy != null) {
    mIconPolicy.appTransitionStarting(startTime,duration);
  }
}

Fixed version (ground truth):
@Override public void appTransitionStarting(long startTime,long duration){
  if (!mKeyguardFadingAway && duration > 0) {
    mIconController.appTransitionStarting(startTime,duration);
  }
  if (mIconPolicy != null) {
    mIconPolicy.appTransitionStarting(startTime,duration);
  }
}
Program: 193693
Project: 193693
Buggy source:
public void setIconsDark(boolean dark){
  if (mTransitionPending) {
    deferIconTintChange(dark ? 1.0f : 0.0f);
  }
 else   if (mTransitionDeferring) {
    animateIconTint(dark ? 1.0f : 0.0f,Math.max(0,mTransitionDeferringStartTime - SystemClock.uptimeMillis()),mTransitionDeferringDuration);
  }
 else {
    animateIconTint(dark ? 1.0f : 0.0f,0,DEFAULT_TINT_ANIMATION_DURATION);
  }
}

Fixed version (ground truth):
public void setIconsDark(boolean dark,boolean animate){
  if (!animate) {
    setIconTintInternal(dark ? 1.0f : 0.0f);
  }
 else   if (mTransitionPending) {
    deferIconTintChange(dark ? 1.0f : 0.0f);
  }
 else   if (mTransitionDeferring) {
    animateIconTint(dark ? 1.0f : 0.0f,Math.max(0,mTransitionDeferringStartTime - SystemClock.uptimeMillis()),mTransitionDeferringDuration);
  }
 else {
    animateIconTint(dark ? 1.0f : 0.0f,0,DEFAULT_TINT_ANIMATION_DURATION);
  }
}
Program: 193694
Project: 193694
Buggy source:
@Override public void onAppTransitionStartingLocked(IBinder openToken,IBinder closeToken,final Animation openAnimation,final Animation closeAnimation){
  mHandler.post(new Runnable(){
    @Override public void run(){
      try {
        IStatusBarService statusbar=getStatusBarService();
        if (statusbar != null) {
          long startTime=calculateStatusBarTransitionStartTime(openAnimation,closeAnimation);
          statusbar.appTransitionStarting(startTime,TRANSITION_DURATION);
        }
      }
 catch (      RemoteException e) {
        Slog.e(mTag,"String_Node_Str",e);
        mStatusBarService=null;
      }
    }
  }
);
}

Fixed version (ground truth):
@Override public void onAppTransitionStartingLocked(IBinder openToken,IBinder closeToken,final Animation openAnimation,final Animation closeAnimation){
  mHandler.post(new Runnable(){
    @Override public void run(){
      try {
        IStatusBarService statusbar=getStatusBarService();
        if (statusbar != null) {
          long startTime=calculateStatusBarTransitionStartTime(openAnimation,closeAnimation);
          long duration=closeAnimation != null || openAnimation != null ? TRANSITION_DURATION : 0;
          statusbar.appTransitionStarting(startTime,duration);
        }
      }
 catch (      RemoteException e) {
        Slog.e(mTag,"String_Node_Str",e);
        mStatusBarService=null;
      }
    }
  }
);
}
Program: 193695
Project: 193695
Buggy source:
@Override public void onFingerprintAuthenticated(int userId){
  boolean wasDeviceInteractive=mUpdateMonitor.isDeviceInteractive();
  mMode=calculateMode();
  if (!wasDeviceInteractive) {
    if (DEBUG_FP_WAKELOCK) {
      Log.i(TAG,"String_Node_Str");
    }
    mPowerManager.wakeUp(SystemClock.uptimeMillis());
  }
  releaseFingerprintWakeLock();
switch (mMode) {
case MODE_DISMISS_BOUNCER:
    mStatusBarKeyguardViewManager.notifyKeyguardAuthenticated(false);
  break;
case MODE_UNLOCK:
case MODE_SHOW_BOUNCER:
if (!wasDeviceInteractive) {
  mStatusBarKeyguardViewManager.notifyDeviceWakeUpRequested();
}
mStatusBarKeyguardViewManager.animateCollapsePanels(FINGERPRINT_COLLAPSE_SPEEDUP_FACTOR);
break;
case MODE_WAKE_AND_UNLOCK:
case MODE_WAKE_AND_UNLOCK_PULSING:
mDozeScrimController.abortPulsing();
mKeyguardViewMediator.onWakeAndUnlocking();
mScrimController.setWakeAndUnlocking();
if (mPhoneStatusBar.getNavigationBarView() != null) {
mPhoneStatusBar.getNavigationBarView().setWakeAndUnlocking(true);
}
break;
case MODE_ONLY_WAKE:
case MODE_NONE:
break;
}
if (mMode != MODE_WAKE_AND_UNLOCK_PULSING) {
mStatusBarWindowManager.setForceDozeBrightness(false);
}
mPhoneStatusBar.notifyFpAuthModeChanged();
}

Fixed version (ground truth):
@Override public void onFingerprintAuthenticated(int userId){
  boolean wasDeviceInteractive=mUpdateMonitor.isDeviceInteractive();
  mMode=calculateMode();
  if (!wasDeviceInteractive) {
    if (DEBUG_FP_WAKELOCK) {
      Log.i(TAG,"String_Node_Str");
    }
    mPowerManager.wakeUp(SystemClock.uptimeMillis());
  }
  releaseFingerprintWakeLock();
switch (mMode) {
case MODE_DISMISS_BOUNCER:
    mStatusBarKeyguardViewManager.notifyKeyguardAuthenticated(false);
  break;
case MODE_UNLOCK:
case MODE_SHOW_BOUNCER:
if (!wasDeviceInteractive) {
  mStatusBarKeyguardViewManager.notifyDeviceWakeUpRequested();
}
mStatusBarKeyguardViewManager.animateCollapsePanels(FINGERPRINT_COLLAPSE_SPEEDUP_FACTOR);
break;
case MODE_WAKE_AND_UNLOCK_PULSING:
mPhoneStatusBar.updateMediaMetaData(false);
case MODE_WAKE_AND_UNLOCK:
mStatusBarWindowManager.setStatusBarFocusable(false);
mDozeScrimController.abortPulsing();
mKeyguardViewMediator.onWakeAndUnlocking();
mScrimController.setWakeAndUnlocking();
if (mPhoneStatusBar.getNavigationBarView() != null) {
mPhoneStatusBar.getNavigationBarView().setWakeAndUnlocking(true);
}
break;
case MODE_ONLY_WAKE:
case MODE_NONE:
break;
}
if (mMode != MODE_WAKE_AND_UNLOCK_PULSING) {
mStatusBarWindowManager.setForceDozeBrightness(false);
}
mPhoneStatusBar.notifyFpAuthModeChanged();
}
Program: 193698
Project: 193698
Buggy source:
@Override public void appTransitionStarting(long startTime,long duration){
  if (!mKeyguardFadingAway) {
    mIconController.appTransitionStarting(startTime,duration);
  }
  if (mIconPolicy != null) {
    mIconPolicy.appTransitionStarting(startTime,duration);
  }
}

Fixed version (ground truth):
@Override public void appTransitionStarting(long startTime,long duration){
  if (!mKeyguardFadingAway && duration > 0) {
    mIconController.appTransitionStarting(startTime,duration);
  }
  if (mIconPolicy != null) {
    mIconPolicy.appTransitionStarting(startTime,duration);
  }
}
Program: 193699
Project: 193699
Buggy source:
public void setIconsDark(boolean dark){
  if (mTransitionPending) {
    deferIconTintChange(dark ? 1.0f : 0.0f);
  }
 else   if (mTransitionDeferring) {
    animateIconTint(dark ? 1.0f : 0.0f,Math.max(0,mTransitionDeferringStartTime - SystemClock.uptimeMillis()),mTransitionDeferringDuration);
  }
 else {
    animateIconTint(dark ? 1.0f : 0.0f,0,DEFAULT_TINT_ANIMATION_DURATION);
  }
}

Fixed version (ground truth):
public void setIconsDark(boolean dark,boolean animate){
  if (!animate) {
    setIconTintInternal(dark ? 1.0f : 0.0f);
  }
 else   if (mTransitionPending) {
    deferIconTintChange(dark ? 1.0f : 0.0f);
  }
 else   if (mTransitionDeferring) {
    animateIconTint(dark ? 1.0f : 0.0f,Math.max(0,mTransitionDeferringStartTime - SystemClock.uptimeMillis()),mTransitionDeferringDuration);
  }
 else {
    animateIconTint(dark ? 1.0f : 0.0f,0,DEFAULT_TINT_ANIMATION_DURATION);
  }
}
Program: 193700
Project: 193700
Buggy source:
@Override public void onAppTransitionStartingLocked(IBinder openToken,IBinder closeToken,final Animation openAnimation,final Animation closeAnimation){
  mHandler.post(new Runnable(){
    @Override public void run(){
      try {
        IStatusBarService statusbar=getStatusBarService();
        if (statusbar != null) {
          long startTime=calculateStatusBarTransitionStartTime(openAnimation,closeAnimation);
          statusbar.appTransitionStarting(startTime,TRANSITION_DURATION);
        }
      }
 catch (      RemoteException e) {
        Slog.e(mTag,"String_Node_Str",e);
        mStatusBarService=null;
      }
    }
  }
);
}

Fixed version (ground truth):
@Override public void onAppTransitionStartingLocked(IBinder openToken,IBinder closeToken,final Animation openAnimation,final Animation closeAnimation){
  mHandler.post(new Runnable(){
    @Override public void run(){
      try {
        IStatusBarService statusbar=getStatusBarService();
        if (statusbar != null) {
          long startTime=calculateStatusBarTransitionStartTime(openAnimation,closeAnimation);
          long duration=closeAnimation != null || openAnimation != null ? TRANSITION_DURATION : 0;
          statusbar.appTransitionStarting(startTime,duration);
        }
      }
 catch (      RemoteException e) {
        Slog.e(mTag,"String_Node_Str",e);
        mStatusBarService=null;
      }
    }
  }
);
}
Program: 193701
Project: 193701
Buggy source:
@Override public void onFingerprintAuthenticated(int userId){
  boolean wasDeviceInteractive=mUpdateMonitor.isDeviceInteractive();
  mMode=calculateMode();
  if (!wasDeviceInteractive) {
    if (DEBUG_FP_WAKELOCK) {
      Log.i(TAG,"String_Node_Str");
    }
    mPowerManager.wakeUp(SystemClock.uptimeMillis());
  }
  releaseFingerprintWakeLock();
switch (mMode) {
case MODE_DISMISS_BOUNCER:
    mStatusBarKeyguardViewManager.notifyKeyguardAuthenticated(false);
  break;
case MODE_UNLOCK:
case MODE_SHOW_BOUNCER:
if (!wasDeviceInteractive) {
  mStatusBarKeyguardViewManager.notifyDeviceWakeUpRequested();
}
mStatusBarKeyguardViewManager.animateCollapsePanels(FINGERPRINT_COLLAPSE_SPEEDUP_FACTOR);
break;
case MODE_WAKE_AND_UNLOCK:
case MODE_WAKE_AND_UNLOCK_PULSING:
mDozeScrimController.abortPulsing();
mKeyguardViewMediator.onWakeAndUnlocking();
mScrimController.setWakeAndUnlocking();
if (mPhoneStatusBar.getNavigationBarView() != null) {
mPhoneStatusBar.getNavigationBarView().setWakeAndUnlocking(true);
}
break;
case MODE_ONLY_WAKE:
case MODE_NONE:
break;
}
if (mMode != MODE_WAKE_AND_UNLOCK_PULSING) {
mStatusBarWindowManager.setForceDozeBrightness(false);
}
mPhoneStatusBar.notifyFpAuthModeChanged();
}

Fixed version (ground truth):
@Override public void onFingerprintAuthenticated(int userId){
  boolean wasDeviceInteractive=mUpdateMonitor.isDeviceInteractive();
  mMode=calculateMode();
  if (!wasDeviceInteractive) {
    if (DEBUG_FP_WAKELOCK) {
      Log.i(TAG,"String_Node_Str");
    }
    mPowerManager.wakeUp(SystemClock.uptimeMillis());
  }
  releaseFingerprintWakeLock();
switch (mMode) {
case MODE_DISMISS_BOUNCER:
    mStatusBarKeyguardViewManager.notifyKeyguardAuthenticated(false);
  break;
case MODE_UNLOCK:
case MODE_SHOW_BOUNCER:
if (!wasDeviceInteractive) {
  mStatusBarKeyguardViewManager.notifyDeviceWakeUpRequested();
}
mStatusBarKeyguardViewManager.animateCollapsePanels(FINGERPRINT_COLLAPSE_SPEEDUP_FACTOR);
break;
case MODE_WAKE_AND_UNLOCK_PULSING:
mPhoneStatusBar.updateMediaMetaData(false);
case MODE_WAKE_AND_UNLOCK:
mStatusBarWindowManager.setStatusBarFocusable(false);
mDozeScrimController.abortPulsing();
mKeyguardViewMediator.onWakeAndUnlocking();
mScrimController.setWakeAndUnlocking();
if (mPhoneStatusBar.getNavigationBarView() != null) {
mPhoneStatusBar.getNavigationBarView().setWakeAndUnlocking(true);
}
break;
case MODE_ONLY_WAKE:
case MODE_NONE:
break;
}
if (mMode != MODE_WAKE_AND_UNLOCK_PULSING) {
mStatusBarWindowManager.setForceDozeBrightness(false);
}
mPhoneStatusBar.notifyFpAuthModeChanged();
}
Program: 193704
Project: 193704
Buggy source:
@Override public void appTransitionStarting(long startTime,long duration){
  if (!mKeyguardFadingAway) {
    mIconController.appTransitionStarting(startTime,duration);
  }
  if (mIconPolicy != null) {
    mIconPolicy.appTransitionStarting(startTime,duration);
  }
}

Fixed version (ground truth):
@Override public void appTransitionStarting(long startTime,long duration){
  if (!mKeyguardFadingAway && duration > 0) {
    mIconController.appTransitionStarting(startTime,duration);
  }
  if (mIconPolicy != null) {
    mIconPolicy.appTransitionStarting(startTime,duration);
  }
}
Program: 193705
Project: 193705
Buggy source:
public void setIconsDark(boolean dark){
  if (mTransitionPending) {
    deferIconTintChange(dark ? 1.0f : 0.0f);
  }
 else   if (mTransitionDeferring) {
    animateIconTint(dark ? 1.0f : 0.0f,Math.max(0,mTransitionDeferringStartTime - SystemClock.uptimeMillis()),mTransitionDeferringDuration);
  }
 else {
    animateIconTint(dark ? 1.0f : 0.0f,0,DEFAULT_TINT_ANIMATION_DURATION);
  }
}

Fixed version (ground truth):
public void setIconsDark(boolean dark,boolean animate){
  if (!animate) {
    setIconTintInternal(dark ? 1.0f : 0.0f);
  }
 else   if (mTransitionPending) {
    deferIconTintChange(dark ? 1.0f : 0.0f);
  }
 else   if (mTransitionDeferring) {
    animateIconTint(dark ? 1.0f : 0.0f,Math.max(0,mTransitionDeferringStartTime - SystemClock.uptimeMillis()),mTransitionDeferringDuration);
  }
 else {
    animateIconTint(dark ? 1.0f : 0.0f,0,DEFAULT_TINT_ANIMATION_DURATION);
  }
}
Program: 193706
Project: 193706
Buggy source:
@Override public void onAppTransitionStartingLocked(IBinder openToken,IBinder closeToken,final Animation openAnimation,final Animation closeAnimation){
  mHandler.post(new Runnable(){
    @Override public void run(){
      try {
        IStatusBarService statusbar=getStatusBarService();
        if (statusbar != null) {
          long startTime=calculateStatusBarTransitionStartTime(openAnimation,closeAnimation);
          statusbar.appTransitionStarting(startTime,TRANSITION_DURATION);
        }
      }
 catch (      RemoteException e) {
        Slog.e(mTag,"String_Node_Str",e);
        mStatusBarService=null;
      }
    }
  }
);
}

Fixed version (ground truth):
@Override public void onAppTransitionStartingLocked(IBinder openToken,IBinder closeToken,final Animation openAnimation,final Animation closeAnimation){
  mHandler.post(new Runnable(){
    @Override public void run(){
      try {
        IStatusBarService statusbar=getStatusBarService();
        if (statusbar != null) {
          long startTime=calculateStatusBarTransitionStartTime(openAnimation,closeAnimation);
          long duration=closeAnimation != null || openAnimation != null ? TRANSITION_DURATION : 0;
          statusbar.appTransitionStarting(startTime,duration);
        }
      }
 catch (      RemoteException e) {
        Slog.e(mTag,"String_Node_Str",e);
        mStatusBarService=null;
      }
    }
  }
);
}
Program: 193707
Project: 193707
Buggy source:
@Override public Bundle getAssistContextExtras(int requestType){
  PendingAssistExtras pae=enqueueAssistContext(requestType,null,null,null,null,UserHandle.getCallingUserId(),null,PENDING_ASSIST_EXTRAS_TIMEOUT);
  if (pae == null) {
    return null;
  }
synchronized (pae) {
    while (!pae.haveResult) {
      try {
        pae.wait();
      }
 catch (      InterruptedException e) {
      }
    }
  }
synchronized (this) {
    buildAssistBundleLocked(pae,pae.result);
    mPendingAssistExtras.remove(pae);
    mHandler.removeCallbacks(pae);
  }
  return pae.extras;
}

Fixed version (ground truth):
@Override public Bundle getAssistContextExtras(int requestType){
  PendingAssistExtras pae=enqueueAssistContext(requestType,null,null,null,null,UserHandle.getCallingUserId(),null,PENDING_ASSIST_EXTRAS_TIMEOUT);
  if (pae == null) {
    return null;
  }
synchronized (pae) {
    while (!pae.haveResult) {
      try {
        pae.wait();
      }
 catch (      InterruptedException e) {
      }
    }
  }
synchronized (this) {
    buildAssistBundleLocked(pae,pae.result);
    mPendingAssistExtras.remove(pae);
    mUiHandler.removeCallbacks(pae);
  }
  return pae.extras;
}
Program: 193709
Project: 193709
Buggy source:
private PendingAssistExtras enqueueAssistContext(int requestType,Intent intent,String hint,IResultReceiver receiver,IBinder activityToken,int userHandle,Bundle args,long timeout){
  enforceCallingPermission(android.Manifest.permission.GET_TOP_ACTIVITY_INFO,"String_Node_Str");
synchronized (this) {
    ActivityRecord activity=getFocusedStack().topActivity();
    if (activity == null) {
      Slog.w(TAG,"String_Node_Str");
      return null;
    }
    if (activity.app == null || activity.app.thread == null) {
      Slog.w(TAG,"String_Node_Str" + activity);
      return null;
    }
    if (activityToken != null) {
      ActivityRecord caller=ActivityRecord.forTokenLocked(activityToken);
      if (activity != caller) {
        Slog.w(TAG,"String_Node_Str" + caller + "String_Node_Str"+ activity);
        return null;
      }
    }
    PendingAssistExtras pae;
    Bundle extras=new Bundle();
    if (args != null) {
      extras.putAll(args);
    }
    extras.putString(Intent.EXTRA_ASSIST_PACKAGE,activity.packageName);
    extras.putInt(Intent.EXTRA_ASSIST_UID,activity.app.uid);
    pae=new PendingAssistExtras(activity,extras,intent,hint,receiver,userHandle);
    try {
      activity.app.thread.requestAssistContextExtras(activity.appToken,pae,requestType);
      mPendingAssistExtras.add(pae);
      mHandler.postDelayed(pae,timeout);
    }
 catch (    RemoteException e) {
      Slog.w(TAG,"String_Node_Str" + activity);
      return null;
    }
    return pae;
  }
}

Fixed version (ground truth):
private PendingAssistExtras enqueueAssistContext(int requestType,Intent intent,String hint,IResultReceiver receiver,IBinder activityToken,int userHandle,Bundle args,long timeout){
  enforceCallingPermission(android.Manifest.permission.GET_TOP_ACTIVITY_INFO,"String_Node_Str");
synchronized (this) {
    ActivityRecord activity=getFocusedStack().topActivity();
    if (activity == null) {
      Slog.w(TAG,"String_Node_Str");
      return null;
    }
    if (activity.app == null || activity.app.thread == null) {
      Slog.w(TAG,"String_Node_Str" + activity);
      return null;
    }
    if (activityToken != null) {
      ActivityRecord caller=ActivityRecord.forTokenLocked(activityToken);
      if (activity != caller) {
        Slog.w(TAG,"String_Node_Str" + caller + "String_Node_Str"+ activity);
        return null;
      }
    }
    PendingAssistExtras pae;
    Bundle extras=new Bundle();
    if (args != null) {
      extras.putAll(args);
    }
    extras.putString(Intent.EXTRA_ASSIST_PACKAGE,activity.packageName);
    extras.putInt(Intent.EXTRA_ASSIST_UID,activity.app.uid);
    pae=new PendingAssistExtras(activity,extras,intent,hint,receiver,userHandle);
    try {
      activity.app.thread.requestAssistContextExtras(activity.appToken,pae,requestType);
      mPendingAssistExtras.add(pae);
      mUiHandler.postDelayed(pae,timeout);
    }
 catch (    RemoteException e) {
      Slog.w(TAG,"String_Node_Str" + activity);
      return null;
    }
    return pae;
  }
}
Program: 193710
Project: 193710
Buggy source:
@Override public Bundle getAssistContextExtras(int requestType){
  PendingAssistExtras pae=enqueueAssistContext(requestType,null,null,null,null,UserHandle.getCallingUserId(),null,PENDING_ASSIST_EXTRAS_TIMEOUT);
  if (pae == null) {
    return null;
  }
synchronized (pae) {
    while (!pae.haveResult) {
      try {
        pae.wait();
      }
 catch (      InterruptedException e) {
      }
    }
  }
synchronized (this) {
    buildAssistBundleLocked(pae,pae.result);
    mPendingAssistExtras.remove(pae);
    mHandler.removeCallbacks(pae);
  }
  return pae.extras;
}

Fixed version (ground truth):
@Override public Bundle getAssistContextExtras(int requestType){
  PendingAssistExtras pae=enqueueAssistContext(requestType,null,null,null,null,UserHandle.getCallingUserId(),null,PENDING_ASSIST_EXTRAS_TIMEOUT);
  if (pae == null) {
    return null;
  }
synchronized (pae) {
    while (!pae.haveResult) {
      try {
        pae.wait();
      }
 catch (      InterruptedException e) {
      }
    }
  }
synchronized (this) {
    buildAssistBundleLocked(pae,pae.result);
    mPendingAssistExtras.remove(pae);
    mUiHandler.removeCallbacks(pae);
  }
  return pae.extras;
}
Program: 193712
Project: 193712
Buggy source:
private PendingAssistExtras enqueueAssistContext(int requestType,Intent intent,String hint,IResultReceiver receiver,IBinder activityToken,int userHandle,Bundle args,long timeout){
  enforceCallingPermission(android.Manifest.permission.GET_TOP_ACTIVITY_INFO,"String_Node_Str");
synchronized (this) {
    ActivityRecord activity=getFocusedStack().topActivity();
    if (activity == null) {
      Slog.w(TAG,"String_Node_Str");
      return null;
    }
    if (activity.app == null || activity.app.thread == null) {
      Slog.w(TAG,"String_Node_Str" + activity);
      return null;
    }
    if (activityToken != null) {
      ActivityRecord caller=ActivityRecord.forTokenLocked(activityToken);
      if (activity != caller) {
        Slog.w(TAG,"String_Node_Str" + caller + "String_Node_Str"+ activity);
        return null;
      }
    }
    PendingAssistExtras pae;
    Bundle extras=new Bundle();
    if (args != null) {
      extras.putAll(args);
    }
    extras.putString(Intent.EXTRA_ASSIST_PACKAGE,activity.packageName);
    extras.putInt(Intent.EXTRA_ASSIST_UID,activity.app.uid);
    pae=new PendingAssistExtras(activity,extras,intent,hint,receiver,userHandle);
    try {
      activity.app.thread.requestAssistContextExtras(activity.appToken,pae,requestType);
      mPendingAssistExtras.add(pae);
      mHandler.postDelayed(pae,timeout);
    }
 catch (    RemoteException e) {
      Slog.w(TAG,"String_Node_Str" + activity);
      return null;
    }
    return pae;
  }
}

Fixed version (ground truth):
private PendingAssistExtras enqueueAssistContext(int requestType,Intent intent,String hint,IResultReceiver receiver,IBinder activityToken,int userHandle,Bundle args,long timeout){
  enforceCallingPermission(android.Manifest.permission.GET_TOP_ACTIVITY_INFO,"String_Node_Str");
synchronized (this) {
    ActivityRecord activity=getFocusedStack().topActivity();
    if (activity == null) {
      Slog.w(TAG,"String_Node_Str");
      return null;
    }
    if (activity.app == null || activity.app.thread == null) {
      Slog.w(TAG,"String_Node_Str" + activity);
      return null;
    }
    if (activityToken != null) {
      ActivityRecord caller=ActivityRecord.forTokenLocked(activityToken);
      if (activity != caller) {
        Slog.w(TAG,"String_Node_Str" + caller + "String_Node_Str"+ activity);
        return null;
      }
    }
    PendingAssistExtras pae;
    Bundle extras=new Bundle();
    if (args != null) {
      extras.putAll(args);
    }
    extras.putString(Intent.EXTRA_ASSIST_PACKAGE,activity.packageName);
    extras.putInt(Intent.EXTRA_ASSIST_UID,activity.app.uid);
    pae=new PendingAssistExtras(activity,extras,intent,hint,receiver,userHandle);
    try {
      activity.app.thread.requestAssistContextExtras(activity.appToken,pae,requestType);
      mPendingAssistExtras.add(pae);
      mUiHandler.postDelayed(pae,timeout);
    }
 catch (    RemoteException e) {
      Slog.w(TAG,"String_Node_Str" + activity);
      return null;
    }
    return pae;
  }
}
Program: 193713
Project: 193713
Buggy source:
@Override public Bundle getAssistContextExtras(int requestType){
  PendingAssistExtras pae=enqueueAssistContext(requestType,null,null,null,null,UserHandle.getCallingUserId(),null,PENDING_ASSIST_EXTRAS_TIMEOUT);
  if (pae == null) {
    return null;
  }
synchronized (pae) {
    while (!pae.haveResult) {
      try {
        pae.wait();
      }
 catch (      InterruptedException e) {
      }
    }
  }
synchronized (this) {
    buildAssistBundleLocked(pae,pae.result);
    mPendingAssistExtras.remove(pae);
    mHandler.removeCallbacks(pae);
  }
  return pae.extras;
}

Fixed version (ground truth):
@Override public Bundle getAssistContextExtras(int requestType){
  PendingAssistExtras pae=enqueueAssistContext(requestType,null,null,null,null,UserHandle.getCallingUserId(),null,PENDING_ASSIST_EXTRAS_TIMEOUT);
  if (pae == null) {
    return null;
  }
synchronized (pae) {
    while (!pae.haveResult) {
      try {
        pae.wait();
      }
 catch (      InterruptedException e) {
      }
    }
  }
synchronized (this) {
    buildAssistBundleLocked(pae,pae.result);
    mPendingAssistExtras.remove(pae);
    mUiHandler.removeCallbacks(pae);
  }
  return pae.extras;
}
Program: 193715
Project: 193715
Buggy source:
private PendingAssistExtras enqueueAssistContext(int requestType,Intent intent,String hint,IResultReceiver receiver,IBinder activityToken,int userHandle,Bundle args,long timeout){
  enforceCallingPermission(android.Manifest.permission.GET_TOP_ACTIVITY_INFO,"String_Node_Str");
synchronized (this) {
    ActivityRecord activity=getFocusedStack().topActivity();
    if (activity == null) {
      Slog.w(TAG,"String_Node_Str");
      return null;
    }
    if (activity.app == null || activity.app.thread == null) {
      Slog.w(TAG,"String_Node_Str" + activity);
      return null;
    }
    if (activityToken != null) {
      ActivityRecord caller=ActivityRecord.forTokenLocked(activityToken);
      if (activity != caller) {
        Slog.w(TAG,"String_Node_Str" + caller + "String_Node_Str"+ activity);
        return null;
      }
    }
    PendingAssistExtras pae;
    Bundle extras=new Bundle();
    if (args != null) {
      extras.putAll(args);
    }
    extras.putString(Intent.EXTRA_ASSIST_PACKAGE,activity.packageName);
    extras.putInt(Intent.EXTRA_ASSIST_UID,activity.app.uid);
    pae=new PendingAssistExtras(activity,extras,intent,hint,receiver,userHandle);
    try {
      activity.app.thread.requestAssistContextExtras(activity.appToken,pae,requestType);
      mPendingAssistExtras.add(pae);
      mHandler.postDelayed(pae,timeout);
    }
 catch (    RemoteException e) {
      Slog.w(TAG,"String_Node_Str" + activity);
      return null;
    }
    return pae;
  }
}

Fixed version (ground truth):
private PendingAssistExtras enqueueAssistContext(int requestType,Intent intent,String hint,IResultReceiver receiver,IBinder activityToken,int userHandle,Bundle args,long timeout){
  enforceCallingPermission(android.Manifest.permission.GET_TOP_ACTIVITY_INFO,"String_Node_Str");
synchronized (this) {
    ActivityRecord activity=getFocusedStack().topActivity();
    if (activity == null) {
      Slog.w(TAG,"String_Node_Str");
      return null;
    }
    if (activity.app == null || activity.app.thread == null) {
      Slog.w(TAG,"String_Node_Str" + activity);
      return null;
    }
    if (activityToken != null) {
      ActivityRecord caller=ActivityRecord.forTokenLocked(activityToken);
      if (activity != caller) {
        Slog.w(TAG,"String_Node_Str" + caller + "String_Node_Str"+ activity);
        return null;
      }
    }
    PendingAssistExtras pae;
    Bundle extras=new Bundle();
    if (args != null) {
      extras.putAll(args);
    }
    extras.putString(Intent.EXTRA_ASSIST_PACKAGE,activity.packageName);
    extras.putInt(Intent.EXTRA_ASSIST_UID,activity.app.uid);
    pae=new PendingAssistExtras(activity,extras,intent,hint,receiver,userHandle);
    try {
      activity.app.thread.requestAssistContextExtras(activity.appToken,pae,requestType);
      mPendingAssistExtras.add(pae);
      mUiHandler.postDelayed(pae,timeout);
    }
 catch (    RemoteException e) {
      Slog.w(TAG,"String_Node_Str" + activity);
      return null;
    }
    return pae;
  }
}
Program: 193716
Project: 193716
Buggy source:
@Override public Bundle getAssistContextExtras(int requestType){
  PendingAssistExtras pae=enqueueAssistContext(requestType,null,null,null,null,UserHandle.getCallingUserId(),null,PENDING_ASSIST_EXTRAS_TIMEOUT);
  if (pae == null) {
    return null;
  }
synchronized (pae) {
    while (!pae.haveResult) {
      try {
        pae.wait();
      }
 catch (      InterruptedException e) {
      }
    }
  }
synchronized (this) {
    buildAssistBundleLocked(pae,pae.result);
    mPendingAssistExtras.remove(pae);
    mHandler.removeCallbacks(pae);
  }
  return pae.extras;
}

Fixed version (ground truth):
@Override public Bundle getAssistContextExtras(int requestType){
  PendingAssistExtras pae=enqueueAssistContext(requestType,null,null,null,null,UserHandle.getCallingUserId(),null,PENDING_ASSIST_EXTRAS_TIMEOUT);
  if (pae == null) {
    return null;
  }
synchronized (pae) {
    while (!pae.haveResult) {
      try {
        pae.wait();
      }
 catch (      InterruptedException e) {
      }
    }
  }
synchronized (this) {
    buildAssistBundleLocked(pae,pae.result);
    mPendingAssistExtras.remove(pae);
    mUiHandler.removeCallbacks(pae);
  }
  return pae.extras;
}
Program: 193718
Project: 193718
Buggy source:
private PendingAssistExtras enqueueAssistContext(int requestType,Intent intent,String hint,IResultReceiver receiver,IBinder activityToken,int userHandle,Bundle args,long timeout){
  enforceCallingPermission(android.Manifest.permission.GET_TOP_ACTIVITY_INFO,"String_Node_Str");
synchronized (this) {
    ActivityRecord activity=getFocusedStack().topActivity();
    if (activity == null) {
      Slog.w(TAG,"String_Node_Str");
      return null;
    }
    if (activity.app == null || activity.app.thread == null) {
      Slog.w(TAG,"String_Node_Str" + activity);
      return null;
    }
    if (activityToken != null) {
      ActivityRecord caller=ActivityRecord.forTokenLocked(activityToken);
      if (activity != caller) {
        Slog.w(TAG,"String_Node_Str" + caller + "String_Node_Str"+ activity);
        return null;
      }
    }
    PendingAssistExtras pae;
    Bundle extras=new Bundle();
    if (args != null) {
      extras.putAll(args);
    }
    extras.putString(Intent.EXTRA_ASSIST_PACKAGE,activity.packageName);
    extras.putInt(Intent.EXTRA_ASSIST_UID,activity.app.uid);
    pae=new PendingAssistExtras(activity,extras,intent,hint,receiver,userHandle);
    try {
      activity.app.thread.requestAssistContextExtras(activity.appToken,pae,requestType);
      mPendingAssistExtras.add(pae);
      mHandler.postDelayed(pae,timeout);
    }
 catch (    RemoteException e) {
      Slog.w(TAG,"String_Node_Str" + activity);
      return null;
    }
    return pae;
  }
}

Fixed version (ground truth):
private PendingAssistExtras enqueueAssistContext(int requestType,Intent intent,String hint,IResultReceiver receiver,IBinder activityToken,int userHandle,Bundle args,long timeout){
  enforceCallingPermission(android.Manifest.permission.GET_TOP_ACTIVITY_INFO,"String_Node_Str");
synchronized (this) {
    ActivityRecord activity=getFocusedStack().topActivity();
    if (activity == null) {
      Slog.w(TAG,"String_Node_Str");
      return null;
    }
    if (activity.app == null || activity.app.thread == null) {
      Slog.w(TAG,"String_Node_Str" + activity);
      return null;
    }
    if (activityToken != null) {
      ActivityRecord caller=ActivityRecord.forTokenLocked(activityToken);
      if (activity != caller) {
        Slog.w(TAG,"String_Node_Str" + caller + "String_Node_Str"+ activity);
        return null;
      }
    }
    PendingAssistExtras pae;
    Bundle extras=new Bundle();
    if (args != null) {
      extras.putAll(args);
    }
    extras.putString(Intent.EXTRA_ASSIST_PACKAGE,activity.packageName);
    extras.putInt(Intent.EXTRA_ASSIST_UID,activity.app.uid);
    pae=new PendingAssistExtras(activity,extras,intent,hint,receiver,userHandle);
    try {
      activity.app.thread.requestAssistContextExtras(activity.appToken,pae,requestType);
      mPendingAssistExtras.add(pae);
      mUiHandler.postDelayed(pae,timeout);
    }
 catch (    RemoteException e) {
      Slog.w(TAG,"String_Node_Str" + activity);
      return null;
    }
    return pae;
  }
}
Program: 193719
Project: 193719
Buggy source:
@Override public Bundle getAssistContextExtras(int requestType){
  PendingAssistExtras pae=enqueueAssistContext(requestType,null,null,null,null,UserHandle.getCallingUserId(),null,PENDING_ASSIST_EXTRAS_TIMEOUT);
  if (pae == null) {
    return null;
  }
synchronized (pae) {
    while (!pae.haveResult) {
      try {
        pae.wait();
      }
 catch (      InterruptedException e) {
      }
    }
  }
synchronized (this) {
    buildAssistBundleLocked(pae,pae.result);
    mPendingAssistExtras.remove(pae);
    mHandler.removeCallbacks(pae);
  }
  return pae.extras;
}

Fixed version (ground truth):
@Override public Bundle getAssistContextExtras(int requestType){
  PendingAssistExtras pae=enqueueAssistContext(requestType,null,null,null,null,UserHandle.getCallingUserId(),null,PENDING_ASSIST_EXTRAS_TIMEOUT);
  if (pae == null) {
    return null;
  }
synchronized (pae) {
    while (!pae.haveResult) {
      try {
        pae.wait();
      }
 catch (      InterruptedException e) {
      }
    }
  }
synchronized (this) {
    buildAssistBundleLocked(pae,pae.result);
    mPendingAssistExtras.remove(pae);
    mUiHandler.removeCallbacks(pae);
  }
  return pae.extras;
}
Program: 193721
Project: 193721
Buggy source:
private PendingAssistExtras enqueueAssistContext(int requestType,Intent intent,String hint,IResultReceiver receiver,IBinder activityToken,int userHandle,Bundle args,long timeout){
  enforceCallingPermission(android.Manifest.permission.GET_TOP_ACTIVITY_INFO,"String_Node_Str");
synchronized (this) {
    ActivityRecord activity=getFocusedStack().topActivity();
    if (activity == null) {
      Slog.w(TAG,"String_Node_Str");
      return null;
    }
    if (activity.app == null || activity.app.thread == null) {
      Slog.w(TAG,"String_Node_Str" + activity);
      return null;
    }
    if (activityToken != null) {
      ActivityRecord caller=ActivityRecord.forTokenLocked(activityToken);
      if (activity != caller) {
        Slog.w(TAG,"String_Node_Str" + caller + "String_Node_Str"+ activity);
        return null;
      }
    }
    PendingAssistExtras pae;
    Bundle extras=new Bundle();
    if (args != null) {
      extras.putAll(args);
    }
    extras.putString(Intent.EXTRA_ASSIST_PACKAGE,activity.packageName);
    extras.putInt(Intent.EXTRA_ASSIST_UID,activity.app.uid);
    pae=new PendingAssistExtras(activity,extras,intent,hint,receiver,userHandle);
    try {
      activity.app.thread.requestAssistContextExtras(activity.appToken,pae,requestType);
      mPendingAssistExtras.add(pae);
      mHandler.postDelayed(pae,timeout);
    }
 catch (    RemoteException e) {
      Slog.w(TAG,"String_Node_Str" + activity);
      return null;
    }
    return pae;
  }
}

Fixed version (ground truth):
private PendingAssistExtras enqueueAssistContext(int requestType,Intent intent,String hint,IResultReceiver receiver,IBinder activityToken,int userHandle,Bundle args,long timeout){
  enforceCallingPermission(android.Manifest.permission.GET_TOP_ACTIVITY_INFO,"String_Node_Str");
synchronized (this) {
    ActivityRecord activity=getFocusedStack().topActivity();
    if (activity == null) {
      Slog.w(TAG,"String_Node_Str");
      return null;
    }
    if (activity.app == null || activity.app.thread == null) {
      Slog.w(TAG,"String_Node_Str" + activity);
      return null;
    }
    if (activityToken != null) {
      ActivityRecord caller=ActivityRecord.forTokenLocked(activityToken);
      if (activity != caller) {
        Slog.w(TAG,"String_Node_Str" + caller + "String_Node_Str"+ activity);
        return null;
      }
    }
    PendingAssistExtras pae;
    Bundle extras=new Bundle();
    if (args != null) {
      extras.putAll(args);
    }
    extras.putString(Intent.EXTRA_ASSIST_PACKAGE,activity.packageName);
    extras.putInt(Intent.EXTRA_ASSIST_UID,activity.app.uid);
    pae=new PendingAssistExtras(activity,extras,intent,hint,receiver,userHandle);
    try {
      activity.app.thread.requestAssistContextExtras(activity.appToken,pae,requestType);
      mPendingAssistExtras.add(pae);
      mUiHandler.postDelayed(pae,timeout);
    }
 catch (    RemoteException e) {
      Slog.w(TAG,"String_Node_Str" + activity);
      return null;
    }
    return pae;
  }
}
Program: 193722
Project: 193722
Buggy source:
@Override public Bundle getAssistContextExtras(int requestType){
  PendingAssistExtras pae=enqueueAssistContext(requestType,null,null,null,null,UserHandle.getCallingUserId(),null,PENDING_ASSIST_EXTRAS_TIMEOUT);
  if (pae == null) {
    return null;
  }
synchronized (pae) {
    while (!pae.haveResult) {
      try {
        pae.wait();
      }
 catch (      InterruptedException e) {
      }
    }
  }
synchronized (this) {
    buildAssistBundleLocked(pae,pae.result);
    mPendingAssistExtras.remove(pae);
    mHandler.removeCallbacks(pae);
  }
  return pae.extras;
}

Fixed version (ground truth):
@Override public Bundle getAssistContextExtras(int requestType){
  PendingAssistExtras pae=enqueueAssistContext(requestType,null,null,null,null,UserHandle.getCallingUserId(),null,PENDING_ASSIST_EXTRAS_TIMEOUT);
  if (pae == null) {
    return null;
  }
synchronized (pae) {
    while (!pae.haveResult) {
      try {
        pae.wait();
      }
 catch (      InterruptedException e) {
      }
    }
  }
synchronized (this) {
    buildAssistBundleLocked(pae,pae.result);
    mPendingAssistExtras.remove(pae);
    mUiHandler.removeCallbacks(pae);
  }
  return pae.extras;
}