nus-yam/ex-repair huggingface dataset:
Program: 182882
Project: 182882
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: 182883
Project: 182883
Buggy source:
/** 
 * {@inheritDoc} 
 */
public boolean keyguardIsShowingTq(){
  return mKeyguardMediator.isShowing();
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
public boolean keyguardIsShowingTq(){
  return mKeyguardMediator.isShowingAndNotHidden();
}
Program: 182884
Project: 182884
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: 182885
Project: 182885
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: 182886
Project: 182886
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: 182887
Project: 182887
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: 182888
Project: 182888
Buggy source:
/** 
 * {@inheritDoc} 
 */
public boolean keyguardIsShowingTq(){
  return mKeyguardMediator.isShowing();
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
public boolean keyguardIsShowingTq(){
  return mKeyguardMediator.isShowingAndNotHidden();
}
Program: 182889
Project: 182889
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: 182890
Project: 182890
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: 182891
Project: 182891
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: 182892
Project: 182892
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: 182893
Project: 182893
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: 182894
Project: 182894
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: 182895
Project: 182895
Buggy source:
/** 
 * {@inheritDoc} 
 */
public boolean keyguardIsShowingTq(){
  return mKeyguardMediator.isShowing();
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
public boolean keyguardIsShowingTq(){
  return mKeyguardMediator.isShowingAndNotHidden();
}
Program: 182896
Project: 182896
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: 182897
Project: 182897
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: 182898
Project: 182898
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: 182899
Project: 182899
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: 182900
Project: 182900
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: 182901
Project: 182901
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: 182902
Project: 182902
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: 182904
Project: 182904
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: 182905
Project: 182905
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: 182906
Project: 182906
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: 182908
Project: 182908
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: 182909
Project: 182909
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: 182910
Project: 182910
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: 182912
Project: 182912
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: 182913
Project: 182913
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: 182914
Project: 182914
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: 182916
Project: 182916
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: 182917
Project: 182917
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: 182918
Project: 182918
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: 182920
Project: 182920
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: 182921
Project: 182921
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: 182922
Project: 182922
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: 182923
Project: 182923
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);
}
}