Program: 195083
Project: 195083
Buggy source:
/** 
 * State is one or more of the DISABLE constants from StatusBarManager.
 */
public void disable(int state1,int state2,boolean animate){
  mDisabledUnmodified1=state1;
  mDisabledUnmodified2=state2;
  state1=adjustDisableFlags(state1);
  final int old1=mDisabled1;
  final int diff1=state1 ^ old1;
  mDisabled1=state1;
  final int old2=mDisabled2;
  final int diff2=state2 ^ old2;
  mDisabled2=state2;
  if (DEBUG) {
    Log.d(TAG,String.format("String_Node_Str",old1,state1,diff1));
    Log.d(TAG,String.format("String_Node_Str",old2,state2,diff2));
  }
  StringBuilder flagdbg=new StringBuilder();
  flagdbg.append("String_Node_Str");
  flagdbg.append(((state1 & StatusBarManager.DISABLE_EXPAND) != 0) ? "String_Node_Str" : "String_Node_Str");
  flagdbg.append(((diff1 & StatusBarManager.DISABLE_EXPAND) != 0) ? "String_Node_Str" : "String_Node_Str");
  flagdbg.append(((state1 & StatusBarManager.DISABLE_NOTIFICATION_ICONS) != 0) ? "String_Node_Str" : "String_Node_Str");
  flagdbg.append(((diff1 & StatusBarManager.DISABLE_NOTIFICATION_ICONS) != 0) ? "String_Node_Str" : "String_Node_Str");
  flagdbg.append(((state1 & StatusBarManager.DISABLE_NOTIFICATION_ALERTS) != 0) ? "String_Node_Str" : "String_Node_Str");
  flagdbg.append(((diff1 & StatusBarManager.DISABLE_NOTIFICATION_ALERTS) != 0) ? "String_Node_Str" : "String_Node_Str");
  flagdbg.append(((state1 & StatusBarManager.DISABLE_SYSTEM_INFO) != 0) ? "String_Node_Str" : "String_Node_Str");
  flagdbg.append(((diff1 & StatusBarManager.DISABLE_SYSTEM_INFO) != 0) ? "String_Node_Str" : "String_Node_Str");
  flagdbg.append(((state1 & StatusBarManager.DISABLE_BACK) != 0) ? "String_Node_Str" : "String_Node_Str");
  flagdbg.append(((diff1 & StatusBarManager.DISABLE_BACK) != 0) ? "String_Node_Str" : "String_Node_Str");
  flagdbg.append(((state1 & StatusBarManager.DISABLE_HOME) != 0) ? "String_Node_Str" : "String_Node_Str");
  flagdbg.append(((diff1 & StatusBarManager.DISABLE_HOME) != 0) ? "String_Node_Str" : "String_Node_Str");
  flagdbg.append(((state1 & StatusBarManager.DISABLE_RECENT) != 0) ? "String_Node_Str" : "String_Node_Str");
  flagdbg.append(((diff1 & StatusBarManager.DISABLE_RECENT) != 0) ? "String_Node_Str" : "String_Node_Str");
  flagdbg.append(((state1 & StatusBarManager.DISABLE_CLOCK) != 0) ? "String_Node_Str" : "String_Node_Str");
  flagdbg.append(((diff1 & StatusBarManager.DISABLE_CLOCK) != 0) ? "String_Node_Str" : "String_Node_Str");
  flagdbg.append(((state1 & StatusBarManager.DISABLE_SEARCH) != 0) ? "String_Node_Str" : "String_Node_Str");
  flagdbg.append(((diff1 & StatusBarManager.DISABLE_SEARCH) != 0) ? "String_Node_Str" : "String_Node_Str");
  flagdbg.append(((state2 & StatusBarManager.DISABLE2_QUICK_SETTINGS) != 0) ? "String_Node_Str" : "String_Node_Str");
  flagdbg.append(((diff2 & StatusBarManager.DISABLE2_QUICK_SETTINGS) != 0) ? "String_Node_Str" : "String_Node_Str");
  flagdbg.append("String_Node_Str");
  Log.d(TAG,flagdbg.toString());
  if ((diff1 & StatusBarManager.DISABLE_SYSTEM_INFO) != 0) {
    if ((state1 & StatusBarManager.DISABLE_SYSTEM_INFO) != 0) {
      mIconController.hideSystemIconArea(animate);
    }
 else {
      mIconController.showSystemIconArea(animate);
    }
  }
  if ((diff1 & StatusBarManager.DISABLE_CLOCK) != 0) {
    boolean visible=(state1 & StatusBarManager.DISABLE_CLOCK) == 0;
    mIconController.setClockVisibility(visible);
  }
  if ((diff1 & StatusBarManager.DISABLE_EXPAND) != 0) {
    if ((state1 & StatusBarManager.DISABLE_EXPAND) != 0) {
      animateCollapsePanels();
    }
  }
  if ((diff1 & (StatusBarManager.DISABLE_HOME | StatusBarManager.DISABLE_RECENT | StatusBarManager.DISABLE_BACK| StatusBarManager.DISABLE_SEARCH)) != 0) {
    if (mNavigationBarView != null)     mNavigationBarView.setDisabledFlags(state1);
    if ((state1 & StatusBarManager.DISABLE_RECENT) != 0) {
      mHandler.removeMessages(MSG_HIDE_RECENT_APPS);
      mHandler.sendEmptyMessage(MSG_HIDE_RECENT_APPS);
    }
  }
  if ((diff1 & StatusBarManager.DISABLE_NOTIFICATION_ICONS) != 0) {
    if ((state1 & StatusBarManager.DISABLE_NOTIFICATION_ICONS) != 0) {
      mIconController.hideNotificationIconArea(animate);
    }
 else {
      mIconController.showNotificationIconArea(animate);
    }
  }
  if ((diff1 & StatusBarManager.DISABLE_NOTIFICATION_ALERTS) != 0) {
    mDisableNotificationAlerts=(state1 & StatusBarManager.DISABLE_NOTIFICATION_ALERTS) != 0;
    mHeadsUpObserver.onChange(true);
  }
  if ((diff2 & StatusBarManager.DISABLE2_QUICK_SETTINGS) != 0) {
    updateQsExpansionEnabled();
  }
}

Fixed version (ground truth):
/** 
 * State is one or more of the DISABLE constants from StatusBarManager.
 */
public void disable(int state1,int state2,boolean animate){
  animate&=mStatusBarWindowState != WINDOW_STATE_HIDDEN;
  mDisabledUnmodified1=state1;
  mDisabledUnmodified2=state2;
  state1=adjustDisableFlags(state1);
  final int old1=mDisabled1;
  final int diff1=state1 ^ old1;
  mDisabled1=state1;
  final int old2=mDisabled2;
  final int diff2=state2 ^ old2;
  mDisabled2=state2;
  if (DEBUG) {
    Log.d(TAG,String.format("String_Node_Str",old1,state1,diff1));
    Log.d(TAG,String.format("String_Node_Str",old2,state2,diff2));
  }
  StringBuilder flagdbg=new StringBuilder();
  flagdbg.append("String_Node_Str");
  flagdbg.append(((state1 & StatusBarManager.DISABLE_EXPAND) != 0) ? "String_Node_Str" : "String_Node_Str");
  flagdbg.append(((diff1 & StatusBarManager.DISABLE_EXPAND) != 0) ? "String_Node_Str" : "String_Node_Str");
  flagdbg.append(((state1 & StatusBarManager.DISABLE_NOTIFICATION_ICONS) != 0) ? "String_Node_Str" : "String_Node_Str");
  flagdbg.append(((diff1 & StatusBarManager.DISABLE_NOTIFICATION_ICONS) != 0) ? "String_Node_Str" : "String_Node_Str");
  flagdbg.append(((state1 & StatusBarManager.DISABLE_NOTIFICATION_ALERTS) != 0) ? "String_Node_Str" : "String_Node_Str");
  flagdbg.append(((diff1 & StatusBarManager.DISABLE_NOTIFICATION_ALERTS) != 0) ? "String_Node_Str" : "String_Node_Str");
  flagdbg.append(((state1 & StatusBarManager.DISABLE_SYSTEM_INFO) != 0) ? "String_Node_Str" : "String_Node_Str");
  flagdbg.append(((diff1 & StatusBarManager.DISABLE_SYSTEM_INFO) != 0) ? "String_Node_Str" : "String_Node_Str");
  flagdbg.append(((state1 & StatusBarManager.DISABLE_BACK) != 0) ? "String_Node_Str" : "String_Node_Str");
  flagdbg.append(((diff1 & StatusBarManager.DISABLE_BACK) != 0) ? "String_Node_Str" : "String_Node_Str");
  flagdbg.append(((state1 & StatusBarManager.DISABLE_HOME) != 0) ? "String_Node_Str" : "String_Node_Str");
  flagdbg.append(((diff1 & StatusBarManager.DISABLE_HOME) != 0) ? "String_Node_Str" : "String_Node_Str");
  flagdbg.append(((state1 & StatusBarManager.DISABLE_RECENT) != 0) ? "String_Node_Str" : "String_Node_Str");
  flagdbg.append(((diff1 & StatusBarManager.DISABLE_RECENT) != 0) ? "String_Node_Str" : "String_Node_Str");
  flagdbg.append(((state1 & StatusBarManager.DISABLE_CLOCK) != 0) ? "String_Node_Str" : "String_Node_Str");
  flagdbg.append(((diff1 & StatusBarManager.DISABLE_CLOCK) != 0) ? "String_Node_Str" : "String_Node_Str");
  flagdbg.append(((state1 & StatusBarManager.DISABLE_SEARCH) != 0) ? "String_Node_Str" : "String_Node_Str");
  flagdbg.append(((diff1 & StatusBarManager.DISABLE_SEARCH) != 0) ? "String_Node_Str" : "String_Node_Str");
  flagdbg.append(((state2 & StatusBarManager.DISABLE2_QUICK_SETTINGS) != 0) ? "String_Node_Str" : "String_Node_Str");
  flagdbg.append(((diff2 & StatusBarManager.DISABLE2_QUICK_SETTINGS) != 0) ? "String_Node_Str" : "String_Node_Str");
  flagdbg.append("String_Node_Str");
  Log.d(TAG,flagdbg.toString());
  if ((diff1 & StatusBarManager.DISABLE_SYSTEM_INFO) != 0) {
    if ((state1 & StatusBarManager.DISABLE_SYSTEM_INFO) != 0) {
      mIconController.hideSystemIconArea(animate);
    }
 else {
      mIconController.showSystemIconArea(animate);
    }
  }
  if ((diff1 & StatusBarManager.DISABLE_CLOCK) != 0) {
    boolean visible=(state1 & StatusBarManager.DISABLE_CLOCK) == 0;
    mIconController.setClockVisibility(visible);
  }
  if ((diff1 & StatusBarManager.DISABLE_EXPAND) != 0) {
    if ((state1 & StatusBarManager.DISABLE_EXPAND) != 0) {
      animateCollapsePanels();
    }
  }
  if ((diff1 & (StatusBarManager.DISABLE_HOME | StatusBarManager.DISABLE_RECENT | StatusBarManager.DISABLE_BACK| StatusBarManager.DISABLE_SEARCH)) != 0) {
    if (mNavigationBarView != null)     mNavigationBarView.setDisabledFlags(state1);
    if ((state1 & StatusBarManager.DISABLE_RECENT) != 0) {
      mHandler.removeMessages(MSG_HIDE_RECENT_APPS);
      mHandler.sendEmptyMessage(MSG_HIDE_RECENT_APPS);
    }
  }
  if ((diff1 & StatusBarManager.DISABLE_NOTIFICATION_ICONS) != 0) {
    if ((state1 & StatusBarManager.DISABLE_NOTIFICATION_ICONS) != 0) {
      mIconController.hideNotificationIconArea(animate);
    }
 else {
      mIconController.showNotificationIconArea(animate);
    }
  }
  if ((diff1 & StatusBarManager.DISABLE_NOTIFICATION_ALERTS) != 0) {
    mDisableNotificationAlerts=(state1 & StatusBarManager.DISABLE_NOTIFICATION_ALERTS) != 0;
    mHeadsUpObserver.onChange(true);
  }
  if ((diff2 & StatusBarManager.DISABLE2_QUICK_SETTINGS) != 0) {
    updateQsExpansionEnabled();
  }
}