nus-yam/ex-repair huggingface dataset:
Program: 42835
Project: 42835
Buggy source:
public void screenOnStoppedLw(){
  if (!mKeyguardMediator.isShowing() && mPowerManager.isScreenOn()) {
    long curTime=SystemClock.uptimeMillis();
    mPowerManager.userActivity(curTime,false,LocalPowerManager.OTHER_EVENT);
  }
}

Fixed version (ground truth):
public void screenOnStoppedLw(){
  if (!mKeyguardMediator.isShowingAndNotHidden() && mPowerManager.isScreenOn()) {
    long curTime=SystemClock.uptimeMillis();
    mPowerManager.userActivity(curTime,false,LocalPowerManager.OTHER_EVENT);
  }
}
Program: 42836
Project: 42836
Buggy source:
/** 
 * {@inheritDoc} 
 */
public boolean keyguardIsShowingTq(){
  return mKeyguardMediator.isShowing();
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
public boolean keyguardIsShowingTq(){
  return mKeyguardMediator.isShowingAndNotHidden();
}
Program: 42837
Project: 42837
Buggy source:
void showGlobalActionsDialog(){
  if (mGlobalActions == null) {
    mGlobalActions=new GlobalActions(mContext);
  }
  final boolean keyguardShowing=mKeyguardMediator.isShowing();
  mGlobalActions.showDialog(keyguardShowing,isDeviceProvisioned());
  if (keyguardShowing) {
    mKeyguardMediator.pokeWakelock();
  }
}

Fixed version (ground truth):
void showGlobalActionsDialog(){
  if (mGlobalActions == null) {
    mGlobalActions=new GlobalActions(mContext);
  }
  final boolean keyguardShowing=mKeyguardMediator.isShowingAndNotHidden();
  mGlobalActions.showDialog(keyguardShowing,isDeviceProvisioned());
  if (keyguardShowing) {
    mKeyguardMediator.pokeWakelock();
  }
}
Program: 42838
Project: 42838
Buggy source:
public boolean performHapticFeedbackLw(WindowState win,int effectId,boolean always){
  final boolean hapticsDisabled=Settings.System.getInt(mContext.getContentResolver(),Settings.System.HAPTIC_FEEDBACK_ENABLED,0) == 0;
  if (!always && (hapticsDisabled || mKeyguardMediator.isShowing())) {
    return false;
  }
switch (effectId) {
case HapticFeedbackConstants.LONG_PRESS:
    mVibrator.vibrate(mLongPressVibePattern,-1);
  return true;
case HapticFeedbackConstants.VIRTUAL_KEY:
mVibrator.vibrate(mVirtualKeyVibePattern,-1);
return true;
case HapticFeedbackConstants.SAFE_MODE_DISABLED:
mVibrator.vibrate(mSafeModeDisabledVibePattern,-1);
return true;
case HapticFeedbackConstants.SAFE_MODE_ENABLED:
mVibrator.vibrate(mSafeModeEnabledVibePattern,-1);
return true;
}
return false;
}

Fixed version (ground truth):
public boolean performHapticFeedbackLw(WindowState win,int effectId,boolean always){
  final boolean hapticsDisabled=Settings.System.getInt(mContext.getContentResolver(),Settings.System.HAPTIC_FEEDBACK_ENABLED,0) == 0;
  if (!always && (hapticsDisabled || mKeyguardMediator.isShowingAndNotHidden())) {
    return false;
  }
switch (effectId) {
case HapticFeedbackConstants.LONG_PRESS:
    mVibrator.vibrate(mLongPressVibePattern,-1);
  return true;
case HapticFeedbackConstants.VIRTUAL_KEY:
mVibrator.vibrate(mVirtualKeyVibePattern,-1);
return true;
case HapticFeedbackConstants.SAFE_MODE_DISABLED:
mVibrator.vibrate(mSafeModeDisabledVibePattern,-1);
return true;
case HapticFeedbackConstants.SAFE_MODE_ENABLED:
mVibrator.vibrate(mSafeModeEnabledVibePattern,-1);
return true;
}
return false;
}
Program: 42839
Project: 42839
Buggy source:
/** 
 * A home key -> launch home action was detected.  Take the appropriate action given the situation with the keyguard.
 */
void launchHomeFromHotKey(){
  if (!mHideLockScreen && mKeyguardMediator.isShowing()) {
  }
 else   if (!mHideLockScreen && mKeyguardMediator.isInputRestricted()) {
    mKeyguardMediator.verifyUnlock(new OnKeyguardExitResult(){
      public void onKeyguardExitResult(      boolean success){
        if (success) {
          try {
            ActivityManagerNative.getDefault().stopAppSwitches();
          }
 catch (          RemoteException e) {
          }
          sendCloseSystemWindows();
          startDockOrHome();
        }
      }
    }
);
  }
 else {
    try {
      ActivityManagerNative.getDefault().stopAppSwitches();
    }
 catch (    RemoteException e) {
    }
    sendCloseSystemWindows();
    startDockOrHome();
  }
}

Fixed version (ground truth):
/** 
 * A home key -> launch home action was detected.  Take the appropriate action given the situation with the keyguard.
 */
void launchHomeFromHotKey(){
  if (mKeyguardMediator.isShowingAndNotHidden()) {
  }
 else   if (!mHideLockScreen && mKeyguardMediator.isInputRestricted()) {
    mKeyguardMediator.verifyUnlock(new OnKeyguardExitResult(){
      public void onKeyguardExitResult(      boolean success){
        if (success) {
          try {
            ActivityManagerNative.getDefault().stopAppSwitches();
          }
 catch (          RemoteException e) {
          }
          sendCloseSystemWindows();
          startDockOrHome();
        }
      }
    }
);
  }
 else {
    try {
      ActivityManagerNative.getDefault().stopAppSwitches();
    }
 catch (    RemoteException e) {
    }
    sendCloseSystemWindows();
    startDockOrHome();
  }
}
Program: 42840
Project: 42840
Buggy source:
public boolean detectSafeMode(){
  try {
    int menuState=mWindowManager.getKeycodeState(KeyEvent.KEYCODE_MENU);
    int sState=mWindowManager.getKeycodeState(KeyEvent.KEYCODE_S);
    int dpadState=mWindowManager.getKeycodeState(KeyEvent.KEYCODE_DPAD_CENTER);
    int trackballState=mWindowManager.getScancodeState(RawInputEvent.BTN_MOUSE);
    mSafeMode=menuState > 0 || sState > 0 || dpadState > 0 || trackballState > 0;
    performHapticFeedbackLw(null,mSafeMode ? HapticFeedbackConstants.SAFE_MODE_ENABLED : HapticFeedbackConstants.SAFE_MODE_DISABLED,true);
    if (mSafeMode) {
      Log.i(TAG,"String_Node_Str" + menuState + "String_Node_Str"+ sState+ "String_Node_Str"+ dpadState+ "String_Node_Str"+ trackballState+ "String_Node_Str");
    }
 else {
      Log.i(TAG,"String_Node_Str");
    }
    return mSafeMode;
  }
 catch (  RemoteException e) {
    throw new RuntimeException("String_Node_Str");
  }
}

Fixed version (ground truth):
public boolean detectSafeMode(){
  try {
    int menuState=mWindowManager.getKeycodeState(KeyEvent.KEYCODE_MENU);
    int sState=mWindowManager.getKeycodeState(KeyEvent.KEYCODE_S);
    int dpadState=mWindowManager.getDPadKeycodeState(KeyEvent.KEYCODE_DPAD_CENTER);
    int trackballState=mWindowManager.getTrackballScancodeState(RawInputEvent.BTN_MOUSE);
    mSafeMode=menuState > 0 || sState > 0 || dpadState > 0 || trackballState > 0;
    performHapticFeedbackLw(null,mSafeMode ? HapticFeedbackConstants.SAFE_MODE_ENABLED : HapticFeedbackConstants.SAFE_MODE_DISABLED,true);
    if (mSafeMode) {
      Log.i(TAG,"String_Node_Str" + menuState + "String_Node_Str"+ sState+ "String_Node_Str"+ dpadState+ "String_Node_Str"+ trackballState+ "String_Node_Str");
    }
 else {
      Log.i(TAG,"String_Node_Str");
    }
    return mSafeMode;
  }
 catch (  RemoteException e) {
    throw new RuntimeException("String_Node_Str");
  }
}
Program: 42841
Project: 42841
Buggy source:
public boolean detectSafeMode(){
  try {
    int menuState=mWindowManager.getKeycodeState(KeyEvent.KEYCODE_MENU);
    int sState=mWindowManager.getKeycodeState(KeyEvent.KEYCODE_S);
    int dpadState=mWindowManager.getKeycodeState(KeyEvent.KEYCODE_DPAD_CENTER);
    int trackballState=mWindowManager.getScancodeState(RawInputEvent.BTN_MOUSE);
    mSafeMode=menuState > 0 || sState > 0 || dpadState > 0 || trackballState > 0;
    performHapticFeedbackLw(null,mSafeMode ? HapticFeedbackConstants.SAFE_MODE_ENABLED : HapticFeedbackConstants.SAFE_MODE_DISABLED,true);
    if (mSafeMode) {
      Log.i(TAG,"String_Node_Str" + menuState + "String_Node_Str"+ sState+ "String_Node_Str"+ dpadState+ "String_Node_Str"+ trackballState+ "String_Node_Str");
    }
 else {
      Log.i(TAG,"String_Node_Str");
    }
    return mSafeMode;
  }
 catch (  RemoteException e) {
    throw new RuntimeException("String_Node_Str");
  }
}

Fixed version (ground truth):
public boolean detectSafeMode(){
  try {
    int menuState=mWindowManager.getKeycodeState(KeyEvent.KEYCODE_MENU);
    int sState=mWindowManager.getKeycodeState(KeyEvent.KEYCODE_S);
    int dpadState=mWindowManager.getDPadKeycodeState(KeyEvent.KEYCODE_DPAD_CENTER);
    int trackballState=mWindowManager.getTrackballScancodeState(RawInputEvent.BTN_MOUSE);
    mSafeMode=menuState > 0 || sState > 0 || dpadState > 0 || trackballState > 0;
    performHapticFeedbackLw(null,mSafeMode ? HapticFeedbackConstants.SAFE_MODE_ENABLED : HapticFeedbackConstants.SAFE_MODE_DISABLED,true);
    if (mSafeMode) {
      Log.i(TAG,"String_Node_Str" + menuState + "String_Node_Str"+ sState+ "String_Node_Str"+ dpadState+ "String_Node_Str"+ trackballState+ "String_Node_Str");
    }
 else {
      Log.i(TAG,"String_Node_Str");
    }
    return mSafeMode;
  }
 catch (  RemoteException e) {
    throw new RuntimeException("String_Node_Str");
  }
}
Program: 42842
Project: 42842
Buggy source:
public void screenOnStoppedLw(){
  if (!mKeyguardMediator.isShowing() && mPowerManager.isScreenOn()) {
    long curTime=SystemClock.uptimeMillis();
    mPowerManager.userActivity(curTime,false,LocalPowerManager.OTHER_EVENT);
  }
}

Fixed version (ground truth):
public void screenOnStoppedLw(){
  if (!mKeyguardMediator.isShowingAndNotHidden() && mPowerManager.isScreenOn()) {
    long curTime=SystemClock.uptimeMillis();
    mPowerManager.userActivity(curTime,false,LocalPowerManager.OTHER_EVENT);
  }
}
Program: 42843
Project: 42843
Buggy source:
/** 
 * {@inheritDoc} 
 */
public boolean keyguardIsShowingTq(){
  return mKeyguardMediator.isShowing();
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
public boolean keyguardIsShowingTq(){
  return mKeyguardMediator.isShowingAndNotHidden();
}
Program: 42844
Project: 42844
Buggy source:
void showGlobalActionsDialog(){
  if (mGlobalActions == null) {
    mGlobalActions=new GlobalActions(mContext);
  }
  final boolean keyguardShowing=mKeyguardMediator.isShowing();
  mGlobalActions.showDialog(keyguardShowing,isDeviceProvisioned());
  if (keyguardShowing) {
    mKeyguardMediator.pokeWakelock();
  }
}

Fixed version (ground truth):
void showGlobalActionsDialog(){
  if (mGlobalActions == null) {
    mGlobalActions=new GlobalActions(mContext);
  }
  final boolean keyguardShowing=mKeyguardMediator.isShowingAndNotHidden();
  mGlobalActions.showDialog(keyguardShowing,isDeviceProvisioned());
  if (keyguardShowing) {
    mKeyguardMediator.pokeWakelock();
  }
}
Program: 42845
Project: 42845
Buggy source:
public boolean performHapticFeedbackLw(WindowState win,int effectId,boolean always){
  final boolean hapticsDisabled=Settings.System.getInt(mContext.getContentResolver(),Settings.System.HAPTIC_FEEDBACK_ENABLED,0) == 0;
  if (!always && (hapticsDisabled || mKeyguardMediator.isShowing())) {
    return false;
  }
switch (effectId) {
case HapticFeedbackConstants.LONG_PRESS:
    mVibrator.vibrate(mLongPressVibePattern,-1);
  return true;
case HapticFeedbackConstants.VIRTUAL_KEY:
mVibrator.vibrate(mVirtualKeyVibePattern,-1);
return true;
case HapticFeedbackConstants.SAFE_MODE_DISABLED:
mVibrator.vibrate(mSafeModeDisabledVibePattern,-1);
return true;
case HapticFeedbackConstants.SAFE_MODE_ENABLED:
mVibrator.vibrate(mSafeModeEnabledVibePattern,-1);
return true;
}
return false;
}

Fixed version (ground truth):
public boolean performHapticFeedbackLw(WindowState win,int effectId,boolean always){
  final boolean hapticsDisabled=Settings.System.getInt(mContext.getContentResolver(),Settings.System.HAPTIC_FEEDBACK_ENABLED,0) == 0;
  if (!always && (hapticsDisabled || mKeyguardMediator.isShowingAndNotHidden())) {
    return false;
  }
switch (effectId) {
case HapticFeedbackConstants.LONG_PRESS:
    mVibrator.vibrate(mLongPressVibePattern,-1);
  return true;
case HapticFeedbackConstants.VIRTUAL_KEY:
mVibrator.vibrate(mVirtualKeyVibePattern,-1);
return true;
case HapticFeedbackConstants.SAFE_MODE_DISABLED:
mVibrator.vibrate(mSafeModeDisabledVibePattern,-1);
return true;
case HapticFeedbackConstants.SAFE_MODE_ENABLED:
mVibrator.vibrate(mSafeModeEnabledVibePattern,-1);
return true;
}
return false;
}
Program: 42846
Project: 42846
Buggy source:
/** 
 * A home key -> launch home action was detected.  Take the appropriate action given the situation with the keyguard.
 */
void launchHomeFromHotKey(){
  if (!mHideLockScreen && mKeyguardMediator.isShowing()) {
  }
 else   if (!mHideLockScreen && mKeyguardMediator.isInputRestricted()) {
    mKeyguardMediator.verifyUnlock(new OnKeyguardExitResult(){
      public void onKeyguardExitResult(      boolean success){
        if (success) {
          try {
            ActivityManagerNative.getDefault().stopAppSwitches();
          }
 catch (          RemoteException e) {
          }
          sendCloseSystemWindows();
          startDockOrHome();
        }
      }
    }
);
  }
 else {
    try {
      ActivityManagerNative.getDefault().stopAppSwitches();
    }
 catch (    RemoteException e) {
    }
    sendCloseSystemWindows();
    startDockOrHome();
  }
}

Fixed version (ground truth):
/** 
 * A home key -> launch home action was detected.  Take the appropriate action given the situation with the keyguard.
 */
void launchHomeFromHotKey(){
  if (mKeyguardMediator.isShowingAndNotHidden()) {
  }
 else   if (!mHideLockScreen && mKeyguardMediator.isInputRestricted()) {
    mKeyguardMediator.verifyUnlock(new OnKeyguardExitResult(){
      public void onKeyguardExitResult(      boolean success){
        if (success) {
          try {
            ActivityManagerNative.getDefault().stopAppSwitches();
          }
 catch (          RemoteException e) {
          }
          sendCloseSystemWindows();
          startDockOrHome();
        }
      }
    }
);
  }
 else {
    try {
      ActivityManagerNative.getDefault().stopAppSwitches();
    }
 catch (    RemoteException e) {
    }
    sendCloseSystemWindows();
    startDockOrHome();
  }
}
Program: 42847
Project: 42847
Buggy source:
public void screenOnStoppedLw(){
  if (!mKeyguardMediator.isShowing() && mPowerManager.isScreenOn()) {
    long curTime=SystemClock.uptimeMillis();
    mPowerManager.userActivity(curTime,false,LocalPowerManager.OTHER_EVENT);
  }
}

Fixed version (ground truth):
public void screenOnStoppedLw(){
  if (!mKeyguardMediator.isShowingAndNotHidden() && mPowerManager.isScreenOn()) {
    long curTime=SystemClock.uptimeMillis();
    mPowerManager.userActivity(curTime,false,LocalPowerManager.OTHER_EVENT);
  }
}
Program: 42848
Project: 42848
Buggy source:
/** 
 * {@inheritDoc} 
 */
public boolean keyguardIsShowingTq(){
  return mKeyguardMediator.isShowing();
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
public boolean keyguardIsShowingTq(){
  return mKeyguardMediator.isShowingAndNotHidden();
}
Program: 42849
Project: 42849
Buggy source:
void showGlobalActionsDialog(){
  if (mGlobalActions == null) {
    mGlobalActions=new GlobalActions(mContext);
  }
  final boolean keyguardShowing=mKeyguardMediator.isShowing();
  mGlobalActions.showDialog(keyguardShowing,isDeviceProvisioned());
  if (keyguardShowing) {
    mKeyguardMediator.pokeWakelock();
  }
}

Fixed version (ground truth):
void showGlobalActionsDialog(){
  if (mGlobalActions == null) {
    mGlobalActions=new GlobalActions(mContext);
  }
  final boolean keyguardShowing=mKeyguardMediator.isShowingAndNotHidden();
  mGlobalActions.showDialog(keyguardShowing,isDeviceProvisioned());
  if (keyguardShowing) {
    mKeyguardMediator.pokeWakelock();
  }
}
Program: 42850
Project: 42850
Buggy source:
public boolean performHapticFeedbackLw(WindowState win,int effectId,boolean always){
  final boolean hapticsDisabled=Settings.System.getInt(mContext.getContentResolver(),Settings.System.HAPTIC_FEEDBACK_ENABLED,0) == 0;
  if (!always && (hapticsDisabled || mKeyguardMediator.isShowing())) {
    return false;
  }
switch (effectId) {
case HapticFeedbackConstants.LONG_PRESS:
    mVibrator.vibrate(mLongPressVibePattern,-1);
  return true;
case HapticFeedbackConstants.VIRTUAL_KEY:
mVibrator.vibrate(mVirtualKeyVibePattern,-1);
return true;
case HapticFeedbackConstants.SAFE_MODE_DISABLED:
mVibrator.vibrate(mSafeModeDisabledVibePattern,-1);
return true;
case HapticFeedbackConstants.SAFE_MODE_ENABLED:
mVibrator.vibrate(mSafeModeEnabledVibePattern,-1);
return true;
}
return false;
}

Fixed version (ground truth):
public boolean performHapticFeedbackLw(WindowState win,int effectId,boolean always){
  final boolean hapticsDisabled=Settings.System.getInt(mContext.getContentResolver(),Settings.System.HAPTIC_FEEDBACK_ENABLED,0) == 0;
  if (!always && (hapticsDisabled || mKeyguardMediator.isShowingAndNotHidden())) {
    return false;
  }
switch (effectId) {
case HapticFeedbackConstants.LONG_PRESS:
    mVibrator.vibrate(mLongPressVibePattern,-1);
  return true;
case HapticFeedbackConstants.VIRTUAL_KEY:
mVibrator.vibrate(mVirtualKeyVibePattern,-1);
return true;
case HapticFeedbackConstants.SAFE_MODE_DISABLED:
mVibrator.vibrate(mSafeModeDisabledVibePattern,-1);
return true;
case HapticFeedbackConstants.SAFE_MODE_ENABLED:
mVibrator.vibrate(mSafeModeEnabledVibePattern,-1);
return true;
}
return false;
}
Program: 42851
Project: 42851
Buggy source:
/** 
 * A home key -> launch home action was detected.  Take the appropriate action given the situation with the keyguard.
 */
void launchHomeFromHotKey(){
  if (!mHideLockScreen && mKeyguardMediator.isShowing()) {
  }
 else   if (!mHideLockScreen && mKeyguardMediator.isInputRestricted()) {
    mKeyguardMediator.verifyUnlock(new OnKeyguardExitResult(){
      public void onKeyguardExitResult(      boolean success){
        if (success) {
          try {
            ActivityManagerNative.getDefault().stopAppSwitches();
          }
 catch (          RemoteException e) {
          }
          sendCloseSystemWindows();
          startDockOrHome();
        }
      }
    }
);
  }
 else {
    try {
      ActivityManagerNative.getDefault().stopAppSwitches();
    }
 catch (    RemoteException e) {
    }
    sendCloseSystemWindows();
    startDockOrHome();
  }
}

Fixed version (ground truth):
/** 
 * A home key -> launch home action was detected.  Take the appropriate action given the situation with the keyguard.
 */
void launchHomeFromHotKey(){
  if (mKeyguardMediator.isShowingAndNotHidden()) {
  }
 else   if (!mHideLockScreen && mKeyguardMediator.isInputRestricted()) {
    mKeyguardMediator.verifyUnlock(new OnKeyguardExitResult(){
      public void onKeyguardExitResult(      boolean success){
        if (success) {
          try {
            ActivityManagerNative.getDefault().stopAppSwitches();
          }
 catch (          RemoteException e) {
          }
          sendCloseSystemWindows();
          startDockOrHome();
        }
      }
    }
);
  }
 else {
    try {
      ActivityManagerNative.getDefault().stopAppSwitches();
    }
 catch (    RemoteException e) {
    }
    sendCloseSystemWindows();
    startDockOrHome();
  }
}
Program: 42852
Project: 42852
Buggy source:
public boolean detectSafeMode(){
  try {
    int menuState=mWindowManager.getKeycodeState(KeyEvent.KEYCODE_MENU);
    int sState=mWindowManager.getKeycodeState(KeyEvent.KEYCODE_S);
    int dpadState=mWindowManager.getKeycodeState(KeyEvent.KEYCODE_DPAD_CENTER);
    int trackballState=mWindowManager.getScancodeState(RawInputEvent.BTN_MOUSE);
    mSafeMode=menuState > 0 || sState > 0 || dpadState > 0 || trackballState > 0;
    performHapticFeedbackLw(null,mSafeMode ? HapticFeedbackConstants.SAFE_MODE_ENABLED : HapticFeedbackConstants.SAFE_MODE_DISABLED,true);
    if (mSafeMode) {
      Log.i(TAG,"String_Node_Str" + menuState + "String_Node_Str"+ sState+ "String_Node_Str"+ dpadState+ "String_Node_Str"+ trackballState+ "String_Node_Str");
    }
 else {
      Log.i(TAG,"String_Node_Str");
    }
    return mSafeMode;
  }
 catch (  RemoteException e) {
    throw new RuntimeException("String_Node_Str");
  }
}

Fixed version (ground truth):
public boolean detectSafeMode(){
  try {
    int menuState=mWindowManager.getKeycodeState(KeyEvent.KEYCODE_MENU);
    int sState=mWindowManager.getKeycodeState(KeyEvent.KEYCODE_S);
    int dpadState=mWindowManager.getDPadKeycodeState(KeyEvent.KEYCODE_DPAD_CENTER);
    int trackballState=mWindowManager.getTrackballScancodeState(RawInputEvent.BTN_MOUSE);
    mSafeMode=menuState > 0 || sState > 0 || dpadState > 0 || trackballState > 0;
    performHapticFeedbackLw(null,mSafeMode ? HapticFeedbackConstants.SAFE_MODE_ENABLED : HapticFeedbackConstants.SAFE_MODE_DISABLED,true);
    if (mSafeMode) {
      Log.i(TAG,"String_Node_Str" + menuState + "String_Node_Str"+ sState+ "String_Node_Str"+ dpadState+ "String_Node_Str"+ trackballState+ "String_Node_Str");
    }
 else {
      Log.i(TAG,"String_Node_Str");
    }
    return mSafeMode;
  }
 catch (  RemoteException e) {
    throw new RuntimeException("String_Node_Str");
  }
}
Program: 42853
Project: 42853
Buggy source:
public boolean detectSafeMode(){
  try {
    int menuState=mWindowManager.getKeycodeState(KeyEvent.KEYCODE_MENU);
    int sState=mWindowManager.getKeycodeState(KeyEvent.KEYCODE_S);
    int dpadState=mWindowManager.getKeycodeState(KeyEvent.KEYCODE_DPAD_CENTER);
    int trackballState=mWindowManager.getScancodeState(RawInputEvent.BTN_MOUSE);
    mSafeMode=menuState > 0 || sState > 0 || dpadState > 0 || trackballState > 0;
    performHapticFeedbackLw(null,mSafeMode ? HapticFeedbackConstants.SAFE_MODE_ENABLED : HapticFeedbackConstants.SAFE_MODE_DISABLED,true);
    if (mSafeMode) {
      Log.i(TAG,"String_Node_Str" + menuState + "String_Node_Str"+ sState+ "String_Node_Str"+ dpadState+ "String_Node_Str"+ trackballState+ "String_Node_Str");
    }
 else {
      Log.i(TAG,"String_Node_Str");
    }
    return mSafeMode;
  }
 catch (  RemoteException e) {
    throw new RuntimeException("String_Node_Str");
  }
}

Fixed version (ground truth):
public boolean detectSafeMode(){
  try {
    int menuState=mWindowManager.getKeycodeState(KeyEvent.KEYCODE_MENU);
    int sState=mWindowManager.getKeycodeState(KeyEvent.KEYCODE_S);
    int dpadState=mWindowManager.getDPadKeycodeState(KeyEvent.KEYCODE_DPAD_CENTER);
    int trackballState=mWindowManager.getTrackballScancodeState(RawInputEvent.BTN_MOUSE);
    mSafeMode=menuState > 0 || sState > 0 || dpadState > 0 || trackballState > 0;
    performHapticFeedbackLw(null,mSafeMode ? HapticFeedbackConstants.SAFE_MODE_ENABLED : HapticFeedbackConstants.SAFE_MODE_DISABLED,true);
    if (mSafeMode) {
      Log.i(TAG,"String_Node_Str" + menuState + "String_Node_Str"+ sState+ "String_Node_Str"+ dpadState+ "String_Node_Str"+ trackballState+ "String_Node_Str");
    }
 else {
      Log.i(TAG,"String_Node_Str");
    }
    return mSafeMode;
  }
 catch (  RemoteException e) {
    throw new RuntimeException("String_Node_Str");
  }
}
Program: 42854
Project: 42854
Buggy source:
public boolean detectSafeMode(){
  try {
    int menuState=mWindowManager.getKeycodeState(KeyEvent.KEYCODE_MENU);
    int sState=mWindowManager.getKeycodeState(KeyEvent.KEYCODE_S);
    int dpadState=mWindowManager.getKeycodeState(KeyEvent.KEYCODE_DPAD_CENTER);
    int trackballState=mWindowManager.getScancodeState(RawInputEvent.BTN_MOUSE);
    mSafeMode=menuState > 0 || sState > 0 || dpadState > 0 || trackballState > 0;
    performHapticFeedbackLw(null,mSafeMode ? HapticFeedbackConstants.SAFE_MODE_ENABLED : HapticFeedbackConstants.SAFE_MODE_DISABLED,true);
    if (mSafeMode) {
      Log.i(TAG,"String_Node_Str" + menuState + "String_Node_Str"+ sState+ "String_Node_Str"+ dpadState+ "String_Node_Str"+ trackballState+ "String_Node_Str");
    }
 else {
      Log.i(TAG,"String_Node_Str");
    }
    return mSafeMode;
  }
 catch (  RemoteException e) {
    throw new RuntimeException("String_Node_Str");
  }
}

Fixed version (ground truth):
public boolean detectSafeMode(){
  try {
    int menuState=mWindowManager.getKeycodeState(KeyEvent.KEYCODE_MENU);
    int sState=mWindowManager.getKeycodeState(KeyEvent.KEYCODE_S);
    int dpadState=mWindowManager.getDPadKeycodeState(KeyEvent.KEYCODE_DPAD_CENTER);
    int trackballState=mWindowManager.getTrackballScancodeState(RawInputEvent.BTN_MOUSE);
    mSafeMode=menuState > 0 || sState > 0 || dpadState > 0 || trackballState > 0;
    performHapticFeedbackLw(null,mSafeMode ? HapticFeedbackConstants.SAFE_MODE_ENABLED : HapticFeedbackConstants.SAFE_MODE_DISABLED,true);
    if (mSafeMode) {
      Log.i(TAG,"String_Node_Str" + menuState + "String_Node_Str"+ sState+ "String_Node_Str"+ dpadState+ "String_Node_Str"+ trackballState+ "String_Node_Str");
    }
 else {
      Log.i(TAG,"String_Node_Str");
    }
    return mSafeMode;
  }
 catch (  RemoteException e) {
    throw new RuntimeException("String_Node_Str");
  }
}
Program: 42855
Project: 42855
Buggy source:
void performDisableActions(int net){
  int old=mDisabled;
  int diff=net ^ old;
  mDisabled=net;
  if ((diff & StatusBarManager.DISABLE_EXPAND) != 0) {
    if ((net & StatusBarManager.DISABLE_EXPAND) != 0) {
      performCollapse();
    }
  }
  if ((diff & StatusBarManager.DISABLE_NOTIFICATION_ICONS) != 0) {
    if ((net & StatusBarManager.DISABLE_NOTIFICATION_ICONS) != 0) {
      Log.d(TAG,"String_Node_Str");
      if (mTicking) {
        mNotificationIcons.setVisibility(View.INVISIBLE);
        mTicker.halt();
      }
 else {
        setNotificationIconVisibility(false,com.android.internal.R.anim.fade_out);
      }
    }
 else {
      Log.d(TAG,"String_Node_Str");
      if (!mExpandedVisible) {
        setNotificationIconVisibility(true,com.android.internal.R.anim.fade_in);
      }
    }
  }
}

Fixed version (ground truth):
void performDisableActions(int net){
  int old=mDisabled;
  int diff=net ^ old;
  mDisabled=net;
  if ((diff & StatusBarManager.DISABLE_EXPAND) != 0) {
    if ((net & StatusBarManager.DISABLE_EXPAND) != 0) {
      animateCollapse();
    }
  }
  if ((diff & StatusBarManager.DISABLE_NOTIFICATION_ICONS) != 0) {
    if ((net & StatusBarManager.DISABLE_NOTIFICATION_ICONS) != 0) {
      Log.d(TAG,"String_Node_Str");
      if (mTicking) {
        mNotificationIcons.setVisibility(View.INVISIBLE);
        mTicker.halt();
      }
 else {
        setNotificationIconVisibility(false,com.android.internal.R.anim.fade_out);
      }
    }
 else {
      Log.d(TAG,"String_Node_Str");
      if (!mExpandedVisible) {
        setNotificationIconVisibility(true,com.android.internal.R.anim.fade_in);
      }
    }
  }
}
Program: 42857
Project: 42857
Buggy source:
void performSetIconVisibility(IBinder key,boolean visible){
synchronized (mIconMap) {
    if (DBG) {
      Log.d(TAG,"String_Node_Str" + key + "String_Node_Str"+ visible);
    }
    StatusBarIcon icon=mIconMap.get(key);
    icon.view.setVisibility(visible ? View.VISIBLE : View.GONE);
  }
}

Fixed version (ground truth):
void performSetIconVisibility(IBinder key,boolean visible){
synchronized (mIconMap) {
    if (SPEW) {
      Log.d(TAG,"String_Node_Str" + key + "String_Node_Str"+ visible);
    }
    StatusBarIcon icon=mIconMap.get(key);
    icon.view.setVisibility(visible ? View.VISIBLE : View.GONE);
  }
}
Program: 42858
Project: 42858
Buggy source:
void performRemoveIcon(IBinder key){
synchronized (this) {
    if (DBG) {
      Log.d(TAG,"String_Node_Str" + key);
    }
    StatusBarIcon icon=mIconMap.remove(key);
    mIconList.remove(icon);
    if (icon != null) {
      ViewGroup parent=(ViewGroup)icon.view.getParent();
      parent.removeView(icon.view);
      int slotIndex=getRightIconIndex(icon.mData.slot);
      if (slotIndex >= 0) {
        mRightIcons[slotIndex]=null;
      }
    }
    StatusBarNotification notification=getNotification(key);
    if (notification != null) {
      removeNotificationView(notification);
synchronized (mNotificationData) {
        mNotificationData.remove(notification);
      }
      setAreThereNotifications();
    }
  }
}

Fixed version (ground truth):
void performRemoveIcon(IBinder key){
synchronized (this) {
    if (SPEW) {
      Log.d(TAG,"String_Node_Str" + key);
    }
    StatusBarIcon icon=mIconMap.remove(key);
    mIconList.remove(icon);
    if (icon != null) {
      ViewGroup parent=(ViewGroup)icon.view.getParent();
      parent.removeView(icon.view);
      int slotIndex=getRightIconIndex(icon.mData.slot);
      if (slotIndex >= 0) {
        mRightIcons[slotIndex]=null;
      }
    }
    StatusBarNotification notification=getNotification(key);
    if (notification != null) {
      removeNotificationView(notification);
synchronized (mNotificationData) {
        mNotificationData.remove(notification);
      }
      setAreThereNotifications();
    }
  }
}
Program: 42859
Project: 42859
Buggy source:
void performDisableActions(int net){
  int old=mDisabled;
  int diff=net ^ old;
  mDisabled=net;
  if ((diff & StatusBarManager.DISABLE_EXPAND) != 0) {
    if ((net & StatusBarManager.DISABLE_EXPAND) != 0) {
      performCollapse();
    }
  }
  if ((diff & StatusBarManager.DISABLE_NOTIFICATION_ICONS) != 0) {
    if ((net & StatusBarManager.DISABLE_NOTIFICATION_ICONS) != 0) {
      Log.d(TAG,"String_Node_Str");
      if (mTicking) {
        mNotificationIcons.setVisibility(View.INVISIBLE);
        mTicker.halt();
      }
 else {
        setNotificationIconVisibility(false,com.android.internal.R.anim.fade_out);
      }
    }
 else {
      Log.d(TAG,"String_Node_Str");
      if (!mExpandedVisible) {
        setNotificationIconVisibility(true,com.android.internal.R.anim.fade_in);
      }
    }
  }
}

Fixed version (ground truth):
void performDisableActions(int net){
  int old=mDisabled;
  int diff=net ^ old;
  mDisabled=net;
  if ((diff & StatusBarManager.DISABLE_EXPAND) != 0) {
    if ((net & StatusBarManager.DISABLE_EXPAND) != 0) {
      animateCollapse();
    }
  }
  if ((diff & StatusBarManager.DISABLE_NOTIFICATION_ICONS) != 0) {
    if ((net & StatusBarManager.DISABLE_NOTIFICATION_ICONS) != 0) {
      Log.d(TAG,"String_Node_Str");
      if (mTicking) {
        mNotificationIcons.setVisibility(View.INVISIBLE);
        mTicker.halt();
      }
 else {
        setNotificationIconVisibility(false,com.android.internal.R.anim.fade_out);
      }
    }
 else {
      Log.d(TAG,"String_Node_Str");
      if (!mExpandedVisible) {
        setNotificationIconVisibility(true,com.android.internal.R.anim.fade_in);
      }
    }
  }
}
Program: 42861
Project: 42861
Buggy source:
void performSetIconVisibility(IBinder key,boolean visible){
synchronized (mIconMap) {
    if (DBG) {
      Log.d(TAG,"String_Node_Str" + key + "String_Node_Str"+ visible);
    }
    StatusBarIcon icon=mIconMap.get(key);
    icon.view.setVisibility(visible ? View.VISIBLE : View.GONE);
  }
}

Fixed version (ground truth):
void performSetIconVisibility(IBinder key,boolean visible){
synchronized (mIconMap) {
    if (SPEW) {
      Log.d(TAG,"String_Node_Str" + key + "String_Node_Str"+ visible);
    }
    StatusBarIcon icon=mIconMap.get(key);
    icon.view.setVisibility(visible ? View.VISIBLE : View.GONE);
  }
}
Program: 42862
Project: 42862
Buggy source:
void performRemoveIcon(IBinder key){
synchronized (this) {
    if (DBG) {
      Log.d(TAG,"String_Node_Str" + key);
    }
    StatusBarIcon icon=mIconMap.remove(key);
    mIconList.remove(icon);
    if (icon != null) {
      ViewGroup parent=(ViewGroup)icon.view.getParent();
      parent.removeView(icon.view);
      int slotIndex=getRightIconIndex(icon.mData.slot);
      if (slotIndex >= 0) {
        mRightIcons[slotIndex]=null;
      }
    }
    StatusBarNotification notification=getNotification(key);
    if (notification != null) {
      removeNotificationView(notification);
synchronized (mNotificationData) {
        mNotificationData.remove(notification);
      }
      setAreThereNotifications();
    }
  }
}

Fixed version (ground truth):
void performRemoveIcon(IBinder key){
synchronized (this) {
    if (SPEW) {
      Log.d(TAG,"String_Node_Str" + key);
    }
    StatusBarIcon icon=mIconMap.remove(key);
    mIconList.remove(icon);
    if (icon != null) {
      ViewGroup parent=(ViewGroup)icon.view.getParent();
      parent.removeView(icon.view);
      int slotIndex=getRightIconIndex(icon.mData.slot);
      if (slotIndex >= 0) {
        mRightIcons[slotIndex]=null;
      }
    }
    StatusBarNotification notification=getNotification(key);
    if (notification != null) {
      removeNotificationView(notification);
synchronized (mNotificationData) {
        mNotificationData.remove(notification);
      }
      setAreThereNotifications();
    }
  }
}
Program: 42863
Project: 42863
Buggy source:
void performDisableActions(int net){
  int old=mDisabled;
  int diff=net ^ old;
  mDisabled=net;
  if ((diff & StatusBarManager.DISABLE_EXPAND) != 0) {
    if ((net & StatusBarManager.DISABLE_EXPAND) != 0) {
      performCollapse();
    }
  }
  if ((diff & StatusBarManager.DISABLE_NOTIFICATION_ICONS) != 0) {
    if ((net & StatusBarManager.DISABLE_NOTIFICATION_ICONS) != 0) {
      Log.d(TAG,"String_Node_Str");
      if (mTicking) {
        mNotificationIcons.setVisibility(View.INVISIBLE);
        mTicker.halt();
      }
 else {
        setNotificationIconVisibility(false,com.android.internal.R.anim.fade_out);
      }
    }
 else {
      Log.d(TAG,"String_Node_Str");
      if (!mExpandedVisible) {
        setNotificationIconVisibility(true,com.android.internal.R.anim.fade_in);
      }
    }
  }
}

Fixed version (ground truth):
void performDisableActions(int net){
  int old=mDisabled;
  int diff=net ^ old;
  mDisabled=net;
  if ((diff & StatusBarManager.DISABLE_EXPAND) != 0) {
    if ((net & StatusBarManager.DISABLE_EXPAND) != 0) {
      animateCollapse();
    }
  }
  if ((diff & StatusBarManager.DISABLE_NOTIFICATION_ICONS) != 0) {
    if ((net & StatusBarManager.DISABLE_NOTIFICATION_ICONS) != 0) {
      Log.d(TAG,"String_Node_Str");
      if (mTicking) {
        mNotificationIcons.setVisibility(View.INVISIBLE);
        mTicker.halt();
      }
 else {
        setNotificationIconVisibility(false,com.android.internal.R.anim.fade_out);
      }
    }
 else {
      Log.d(TAG,"String_Node_Str");
      if (!mExpandedVisible) {
        setNotificationIconVisibility(true,com.android.internal.R.anim.fade_in);
      }
    }
  }
}
Program: 42865
Project: 42865
Buggy source:
void performSetIconVisibility(IBinder key,boolean visible){
synchronized (mIconMap) {
    if (DBG) {
      Log.d(TAG,"String_Node_Str" + key + "String_Node_Str"+ visible);
    }
    StatusBarIcon icon=mIconMap.get(key);
    icon.view.setVisibility(visible ? View.VISIBLE : View.GONE);
  }
}

Fixed version (ground truth):
void performSetIconVisibility(IBinder key,boolean visible){
synchronized (mIconMap) {
    if (SPEW) {
      Log.d(TAG,"String_Node_Str" + key + "String_Node_Str"+ visible);
    }
    StatusBarIcon icon=mIconMap.get(key);
    icon.view.setVisibility(visible ? View.VISIBLE : View.GONE);
  }
}
Program: 42866
Project: 42866
Buggy source:
void performRemoveIcon(IBinder key){
synchronized (this) {
    if (DBG) {
      Log.d(TAG,"String_Node_Str" + key);
    }
    StatusBarIcon icon=mIconMap.remove(key);
    mIconList.remove(icon);
    if (icon != null) {
      ViewGroup parent=(ViewGroup)icon.view.getParent();
      parent.removeView(icon.view);
      int slotIndex=getRightIconIndex(icon.mData.slot);
      if (slotIndex >= 0) {
        mRightIcons[slotIndex]=null;
      }
    }
    StatusBarNotification notification=getNotification(key);
    if (notification != null) {
      removeNotificationView(notification);
synchronized (mNotificationData) {
        mNotificationData.remove(notification);
      }
      setAreThereNotifications();
    }
  }
}

Fixed version (ground truth):
void performRemoveIcon(IBinder key){
synchronized (this) {
    if (SPEW) {
      Log.d(TAG,"String_Node_Str" + key);
    }
    StatusBarIcon icon=mIconMap.remove(key);
    mIconList.remove(icon);
    if (icon != null) {
      ViewGroup parent=(ViewGroup)icon.view.getParent();
      parent.removeView(icon.view);
      int slotIndex=getRightIconIndex(icon.mData.slot);
      if (slotIndex >= 0) {
        mRightIcons[slotIndex]=null;
      }
    }
    StatusBarNotification notification=getNotification(key);
    if (notification != null) {
      removeNotificationView(notification);
synchronized (mNotificationData) {
        mNotificationData.remove(notification);
      }
      setAreThereNotifications();
    }
  }
}
Program: 42867
Project: 42867
Buggy source:
void performDisableActions(int net){
  int old=mDisabled;
  int diff=net ^ old;
  mDisabled=net;
  if ((diff & StatusBarManager.DISABLE_EXPAND) != 0) {
    if ((net & StatusBarManager.DISABLE_EXPAND) != 0) {
      performCollapse();
    }
  }
  if ((diff & StatusBarManager.DISABLE_NOTIFICATION_ICONS) != 0) {
    if ((net & StatusBarManager.DISABLE_NOTIFICATION_ICONS) != 0) {
      Log.d(TAG,"String_Node_Str");
      if (mTicking) {
        mNotificationIcons.setVisibility(View.INVISIBLE);
        mTicker.halt();
      }
 else {
        setNotificationIconVisibility(false,com.android.internal.R.anim.fade_out);
      }
    }
 else {
      Log.d(TAG,"String_Node_Str");
      if (!mExpandedVisible) {
        setNotificationIconVisibility(true,com.android.internal.R.anim.fade_in);
      }
    }
  }
}

Fixed version (ground truth):
void performDisableActions(int net){
  int old=mDisabled;
  int diff=net ^ old;
  mDisabled=net;
  if ((diff & StatusBarManager.DISABLE_EXPAND) != 0) {
    if ((net & StatusBarManager.DISABLE_EXPAND) != 0) {
      animateCollapse();
    }
  }
  if ((diff & StatusBarManager.DISABLE_NOTIFICATION_ICONS) != 0) {
    if ((net & StatusBarManager.DISABLE_NOTIFICATION_ICONS) != 0) {
      Log.d(TAG,"String_Node_Str");
      if (mTicking) {
        mNotificationIcons.setVisibility(View.INVISIBLE);
        mTicker.halt();
      }
 else {
        setNotificationIconVisibility(false,com.android.internal.R.anim.fade_out);
      }
    }
 else {
      Log.d(TAG,"String_Node_Str");
      if (!mExpandedVisible) {
        setNotificationIconVisibility(true,com.android.internal.R.anim.fade_in);
      }
    }
  }
}
Program: 42869
Project: 42869
Buggy source:
void performSetIconVisibility(IBinder key,boolean visible){
synchronized (mIconMap) {
    if (DBG) {
      Log.d(TAG,"String_Node_Str" + key + "String_Node_Str"+ visible);
    }
    StatusBarIcon icon=mIconMap.get(key);
    icon.view.setVisibility(visible ? View.VISIBLE : View.GONE);
  }
}

Fixed version (ground truth):
void performSetIconVisibility(IBinder key,boolean visible){
synchronized (mIconMap) {
    if (SPEW) {
      Log.d(TAG,"String_Node_Str" + key + "String_Node_Str"+ visible);
    }
    StatusBarIcon icon=mIconMap.get(key);
    icon.view.setVisibility(visible ? View.VISIBLE : View.GONE);
  }
}
Program: 42870
Project: 42870
Buggy source:
void performRemoveIcon(IBinder key){
synchronized (this) {
    if (DBG) {
      Log.d(TAG,"String_Node_Str" + key);
    }
    StatusBarIcon icon=mIconMap.remove(key);
    mIconList.remove(icon);
    if (icon != null) {
      ViewGroup parent=(ViewGroup)icon.view.getParent();
      parent.removeView(icon.view);
      int slotIndex=getRightIconIndex(icon.mData.slot);
      if (slotIndex >= 0) {
        mRightIcons[slotIndex]=null;
      }
    }
    StatusBarNotification notification=getNotification(key);
    if (notification != null) {
      removeNotificationView(notification);
synchronized (mNotificationData) {
        mNotificationData.remove(notification);
      }
      setAreThereNotifications();
    }
  }
}

Fixed version (ground truth):
void performRemoveIcon(IBinder key){
synchronized (this) {
    if (SPEW) {
      Log.d(TAG,"String_Node_Str" + key);
    }
    StatusBarIcon icon=mIconMap.remove(key);
    mIconList.remove(icon);
    if (icon != null) {
      ViewGroup parent=(ViewGroup)icon.view.getParent();
      parent.removeView(icon.view);
      int slotIndex=getRightIconIndex(icon.mData.slot);
      if (slotIndex >= 0) {
        mRightIcons[slotIndex]=null;
      }
    }
    StatusBarNotification notification=getNotification(key);
    if (notification != null) {
      removeNotificationView(notification);
synchronized (mNotificationData) {
        mNotificationData.remove(notification);
      }
      setAreThereNotifications();
    }
  }
}
Program: 42871
Project: 42871
Buggy source:
void performDisableActions(int net){
  int old=mDisabled;
  int diff=net ^ old;
  mDisabled=net;
  if ((diff & StatusBarManager.DISABLE_EXPAND) != 0) {
    if ((net & StatusBarManager.DISABLE_EXPAND) != 0) {
      performCollapse();
    }
  }
  if ((diff & StatusBarManager.DISABLE_NOTIFICATION_ICONS) != 0) {
    if ((net & StatusBarManager.DISABLE_NOTIFICATION_ICONS) != 0) {
      Log.d(TAG,"String_Node_Str");
      if (mTicking) {
        mNotificationIcons.setVisibility(View.INVISIBLE);
        mTicker.halt();
      }
 else {
        setNotificationIconVisibility(false,com.android.internal.R.anim.fade_out);
      }
    }
 else {
      Log.d(TAG,"String_Node_Str");
      if (!mExpandedVisible) {
        setNotificationIconVisibility(true,com.android.internal.R.anim.fade_in);
      }
    }
  }
}

Fixed version (ground truth):
void performDisableActions(int net){
  int old=mDisabled;
  int diff=net ^ old;
  mDisabled=net;
  if ((diff & StatusBarManager.DISABLE_EXPAND) != 0) {
    if ((net & StatusBarManager.DISABLE_EXPAND) != 0) {
      animateCollapse();
    }
  }
  if ((diff & StatusBarManager.DISABLE_NOTIFICATION_ICONS) != 0) {
    if ((net & StatusBarManager.DISABLE_NOTIFICATION_ICONS) != 0) {
      Log.d(TAG,"String_Node_Str");
      if (mTicking) {
        mNotificationIcons.setVisibility(View.INVISIBLE);
        mTicker.halt();
      }
 else {
        setNotificationIconVisibility(false,com.android.internal.R.anim.fade_out);
      }
    }
 else {
      Log.d(TAG,"String_Node_Str");
      if (!mExpandedVisible) {
        setNotificationIconVisibility(true,com.android.internal.R.anim.fade_in);
      }
    }
  }
}
Program: 42873
Project: 42873
Buggy source:
void performSetIconVisibility(IBinder key,boolean visible){
synchronized (mIconMap) {
    if (DBG) {
      Log.d(TAG,"String_Node_Str" + key + "String_Node_Str"+ visible);
    }
    StatusBarIcon icon=mIconMap.get(key);
    icon.view.setVisibility(visible ? View.VISIBLE : View.GONE);
  }
}

Fixed version (ground truth):
void performSetIconVisibility(IBinder key,boolean visible){
synchronized (mIconMap) {
    if (SPEW) {
      Log.d(TAG,"String_Node_Str" + key + "String_Node_Str"+ visible);
    }
    StatusBarIcon icon=mIconMap.get(key);
    icon.view.setVisibility(visible ? View.VISIBLE : View.GONE);
  }
}
Program: 42874
Project: 42874
Buggy source:
void performRemoveIcon(IBinder key){
synchronized (this) {
    if (DBG) {
      Log.d(TAG,"String_Node_Str" + key);
    }
    StatusBarIcon icon=mIconMap.remove(key);
    mIconList.remove(icon);
    if (icon != null) {
      ViewGroup parent=(ViewGroup)icon.view.getParent();
      parent.removeView(icon.view);
      int slotIndex=getRightIconIndex(icon.mData.slot);
      if (slotIndex >= 0) {
        mRightIcons[slotIndex]=null;
      }
    }
    StatusBarNotification notification=getNotification(key);
    if (notification != null) {
      removeNotificationView(notification);
synchronized (mNotificationData) {
        mNotificationData.remove(notification);
      }
      setAreThereNotifications();
    }
  }
}

Fixed version (ground truth):
void performRemoveIcon(IBinder key){
synchronized (this) {
    if (SPEW) {
      Log.d(TAG,"String_Node_Str" + key);
    }
    StatusBarIcon icon=mIconMap.remove(key);
    mIconList.remove(icon);
    if (icon != null) {
      ViewGroup parent=(ViewGroup)icon.view.getParent();
      parent.removeView(icon.view);
      int slotIndex=getRightIconIndex(icon.mData.slot);
      if (slotIndex >= 0) {
        mRightIcons[slotIndex]=null;
      }
    }
    StatusBarNotification notification=getNotification(key);
    if (notification != null) {
      removeNotificationView(notification);
synchronized (mNotificationData) {
        mNotificationData.remove(notification);
      }
      setAreThereNotifications();
    }
  }
}
Program: 42875
Project: 42875
Buggy source:
/** 
 * Formats the data into a values array suitable for use with the Media Content Provider.
 * @return a map of values
 */
private ContentValues toValues(){
  ContentValues map=new ContentValues();
  map.put(MediaStore.MediaColumns.DATA,mPath);
  map.put(MediaStore.MediaColumns.TITLE,mTitle);
  map.put(MediaStore.MediaColumns.DATE_MODIFIED,mLastModified);
  map.put(MediaStore.MediaColumns.SIZE,mFileSize);
  map.put(MediaStore.MediaColumns.MIME_TYPE,mMimeType);
  if (MediaFile.isVideoFileType(mFileType)) {
    map.put(Video.Media.ARTIST,(mArtist != null && mArtist.length() > 0 ? mArtist : MediaFile.UNKNOWN_STRING));
    map.put(Video.Media.ALBUM,(mAlbum != null && mAlbum.length() > 0 ? mAlbum : MediaFile.UNKNOWN_STRING));
    map.put(Video.Media.DURATION,mDuration);
  }
 else   if (MediaFile.isImageFileType(mFileType)) {
  }
 else   if (MediaFile.isAudioFileType(mFileType)) {
    map.put(Audio.Media.ARTIST,(mArtist != null && mArtist.length() > 0 ? mArtist : MediaFile.UNKNOWN_STRING));
    map.put(Audio.Media.ALBUM,(mAlbum != null && mAlbum.length() > 0 ? mAlbum : MediaFile.UNKNOWN_STRING));
    map.put(Audio.Media.COMPOSER,mComposer);
    if (mYear != 0) {
      map.put(Audio.Media.YEAR,mYear);
    }
    map.put(Audio.Media.TRACK,mTrack);
    map.put(Audio.Media.DURATION,mDuration);
  }
  return map;
}

Fixed version (ground truth):
/** 
 * Formats the data into a values array suitable for use with the Media Content Provider.
 * @return a map of values
 */
private ContentValues toValues(){
  ContentValues map=new ContentValues();
  map.put(MediaStore.MediaColumns.DATA,mPath);
  map.put(MediaStore.MediaColumns.TITLE,mTitle);
  map.put(MediaStore.MediaColumns.DATE_MODIFIED,mLastModified);
  map.put(MediaStore.MediaColumns.SIZE,mFileSize);
  map.put(MediaStore.MediaColumns.MIME_TYPE,mMimeType);
  if (MediaFile.isVideoFileType(mFileType)) {
    map.put(Video.Media.ARTIST,(mArtist != null && mArtist.length() > 0 ? mArtist : MediaFile.UNKNOWN_STRING));
    map.put(Video.Media.ALBUM,(mAlbum != null && mAlbum.length() > 0 ? mAlbum : MediaFile.UNKNOWN_STRING));
    map.put(Video.Media.DURATION,mDuration);
    map.put(Video.Media.DATE_TAKEN,mLastModified);
  }
 else   if (MediaFile.isImageFileType(mFileType)) {
    map.put(Images.Media.DATE_TAKEN,mLastModified);
  }
 else   if (MediaFile.isAudioFileType(mFileType)) {
    map.put(Audio.Media.ARTIST,(mArtist != null && mArtist.length() > 0 ? mArtist : MediaFile.UNKNOWN_STRING));
    map.put(Audio.Media.ALBUM,(mAlbum != null && mAlbum.length() > 0 ? mAlbum : MediaFile.UNKNOWN_STRING));
    map.put(Audio.Media.COMPOSER,mComposer);
    if (mYear != 0) {
      map.put(Audio.Media.YEAR,mYear);
    }
    map.put(Audio.Media.TRACK,mTrack);
    map.put(Audio.Media.DURATION,mDuration);
  }
  return map;
}
Program: 42876
Project: 42876
Buggy source:
/** 
 * Some Japanese mobile phones use this field for phonetic name, since vCard 2.1 does not have "SORT-STRING" type. Also, in some cases, the field has some ';'s in it. Assume the ';' means the same meaning in N property
 */
@SuppressWarnings("String_Node_Str") private void handlePhoneticNameFromSound(List<String> elems){
  int size;
  if (elems == null || (size=elems.size()) < 1) {
    return;
  }
  if (size > 3) {
    size=3;
  }
switch (size) {
case 3:
    mPhoneticMiddleName=elems.get(2);
case 2:
  mPhoneticGivenName=elems.get(1);
default :
mPhoneticFamilyName=elems.get(0);
}
}

Fixed version (ground truth):
/** 
 * Some Japanese mobile phones use this field for phonetic name, since vCard 2.1 does not have "SORT-STRING" type. Also, in some cases, the field has some ';'s in it. Assume the ';' means the same meaning in N property
 */
@SuppressWarnings("String_Node_Str") private void handlePhoneticNameFromSound(List<String> elems){
  if (!(TextUtils.isEmpty(mPhoneticFamilyName) && TextUtils.isEmpty(mPhoneticMiddleName) && TextUtils.isEmpty(mPhoneticGivenName))) {
    return;
  }
  int size;
  if (elems == null || (size=elems.size()) < 1) {
    return;
  }
  if (size > 3) {
    size=3;
  }
  if (elems.get(0).length() > 0) {
    boolean onlyFirstElemIsNonEmpty=true;
    for (int i=1; i < size; i++) {
      if (elems.get(i).length() > 0) {
        onlyFirstElemIsNonEmpty=false;
        break;
      }
    }
    if (onlyFirstElemIsNonEmpty) {
      final String[] namesArray=elems.get(0).split("String_Node_Str");
      final int nameArrayLength=namesArray.length;
      if (nameArrayLength == 3) {
        mPhoneticFamilyName=namesArray[0];
        mPhoneticMiddleName=namesArray[1];
        mPhoneticGivenName=namesArray[2];
      }
 else       if (nameArrayLength == 2) {
        mPhoneticFamilyName=namesArray[0];
        mPhoneticGivenName=namesArray[1];
      }
 else {
        mPhoneticFullName=elems.get(0);
      }
      return;
    }
  }
switch (size) {
case 3:
    mPhoneticMiddleName=elems.get(2);
case 2:
  mPhoneticGivenName=elems.get(1);
default :
mPhoneticFamilyName=elems.get(0);
}
}