nus-yam/ex-repair huggingface dataset:
Program: 194974
Project: 194974
Buggy source:
void makeExpandedInvisible(){
  if (SPEW)   Log.d(TAG,"String_Node_Str" + mExpandedVisible + "String_Node_Str"+ mExpandedVisible);
  if (!mExpandedVisible || mStatusBarWindow == null) {
    return;
  }
  mStatusBarView.collapseAllPanels(false,false,1.0f);
  mNotificationPanel.closeQs();
  mExpandedVisible=false;
  if (mNavigationBarView != null)   mNavigationBarView.setSlippery(false);
  visibilityChanged(false);
  mStatusBarWindowManager.setStatusBarExpanded(false);
  mStatusBarWindowManager.setForceStatusBarVisible(false);
  mStatusBarView.setFocusable(true);
  dismissPopups();
  runPostCollapseRunnables();
  setInteracting(StatusBarManager.WINDOW_STATUS_BAR,false);
  showBouncer();
  disable(mDisabledUnmodified1,mDisabledUnmodified2,true);
  if (!mStatusBarKeyguardViewManager.isShowing()) {
    WindowManagerGlobal.getInstance().trimMemory(ComponentCallbacks2.TRIM_MEMORY_UI_HIDDEN);
  }
}

Fixed version (ground truth):
void makeExpandedInvisible(){
  if (SPEW)   Log.d(TAG,"String_Node_Str" + mExpandedVisible + "String_Node_Str"+ mExpandedVisible);
  if (!mExpandedVisible || mStatusBarWindow == null) {
    return;
  }
  mStatusBarView.collapseAllPanels(false,false,1.0f);
  mNotificationPanel.closeQs();
  mExpandedVisible=false;
  if (mNavigationBarView != null)   mNavigationBarView.setSlippery(false);
  visibilityChanged(false);
  mStatusBarWindowManager.setPanelVisible(false);
  mStatusBarWindowManager.setForceStatusBarVisible(false);
  mStatusBarView.setFocusable(true);
  dismissPopups();
  runPostCollapseRunnables();
  setInteracting(StatusBarManager.WINDOW_STATUS_BAR,false);
  showBouncer();
  disable(mDisabledUnmodified1,mDisabledUnmodified2,true);
  if (!mStatusBarKeyguardViewManager.isShowing()) {
    WindowManagerGlobal.getInstance().trimMemory(ComponentCallbacks2.TRIM_MEMORY_UI_HIDDEN);
  }
}
Program: 194975
Project: 194975
Buggy source:
private void applyHeight(State state){
  boolean expanded=!state.forceCollapsed && (state.isKeyguardShowingAndNotOccluded() || state.statusBarExpanded || state.keyguardFadingAway|| state.bouncerShowing|| state.headsUpShowing);
  if (expanded) {
    mLpChanged.height=ViewGroup.LayoutParams.MATCH_PARENT;
  }
 else {
    mLpChanged.height=mBarHeight;
  }
}

Fixed version (ground truth):
private void applyHeight(State state){
  boolean expanded=!state.forceCollapsed && (state.isKeyguardShowingAndNotOccluded() || state.panelVisible || state.keyguardFadingAway|| state.bouncerShowing|| state.headsUpShowing);
  if (expanded) {
    mLpChanged.height=ViewGroup.LayoutParams.MATCH_PARENT;
  }
 else {
    mLpChanged.height=mBarHeight;
  }
}
Program: 194976
Project: 194976
Buggy source:
private void applyFocusableFlag(State state){
  if (state.isKeyguardShowingAndNotOccluded() && state.keyguardNeedsInput && state.bouncerShowing || BaseStatusBar.ENABLE_REMOTE_INPUT && state.statusBarExpanded) {
    mLpChanged.flags&=~WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
    mLpChanged.flags&=~WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM;
  }
 else   if (state.isKeyguardShowingAndNotOccluded() || state.statusBarFocusable) {
    mLpChanged.flags&=~WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
    mLpChanged.flags|=WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM;
  }
 else {
    mLpChanged.flags|=WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
    mLpChanged.flags&=~WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM;
  }
}

Fixed version (ground truth):
private void applyFocusableFlag(State state){
  boolean panelFocusable=state.statusBarFocusable && state.panelExpanded;
  if (state.isKeyguardShowingAndNotOccluded() && state.keyguardNeedsInput && state.bouncerShowing || BaseStatusBar.ENABLE_REMOTE_INPUT && panelFocusable) {
    mLpChanged.flags&=~WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
    mLpChanged.flags&=~WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM;
  }
 else   if (state.isKeyguardShowingAndNotOccluded() || panelFocusable) {
    mLpChanged.flags&=~WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
    mLpChanged.flags|=WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM;
  }
 else {
    mLpChanged.flags|=WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
    mLpChanged.flags&=~WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM;
  }
}
Program: 194977
Project: 194977
Buggy source:
@Override protected void onHeightUpdated(float expandedHeight){
  if (!mQsExpanded || mQsExpandImmediate || mIsExpanding && mQsExpandedWhenExpandingStarted) {
    positionClockAndNotifications();
  }
  if (mQsExpandImmediate || mQsExpanded && !mQsTracking && mQsExpansionAnimator == null && !mQsExpansionFromOverscroll) {
    float t;
    if (mKeyguardShowing) {
      t=expandedHeight / getMaxPanelHeight();
    }
 else {
      float panelHeightQsCollapsed=mNotificationStackScroller.getIntrinsicPadding() + mNotificationStackScroller.getMinStackHeight();
      float panelHeightQsExpanded=calculatePanelHeightQsExpanded();
      t=(expandedHeight - panelHeightQsCollapsed) / (panelHeightQsExpanded - panelHeightQsCollapsed);
    }
    setQsExpansion(mQsMinExpansionHeight + t * (getTempQsMaxExpansion() - mQsMinExpansionHeight));
  }
  updateStackHeight(expandedHeight);
  updateHeader();
  updateUnlockIcon();
  updateNotificationTranslucency();
  mHeadsUpManager.setIsExpanded(!isFullyCollapsed());
  mNotificationStackScroller.setShadeExpanded(!isFullyCollapsed());
  if (DEBUG) {
    invalidate();
  }
}

Fixed version (ground truth):
@Override protected void onHeightUpdated(float expandedHeight){
  if (!mQsExpanded || mQsExpandImmediate || mIsExpanding && mQsExpandedWhenExpandingStarted) {
    positionClockAndNotifications();
  }
  if (mQsExpandImmediate || mQsExpanded && !mQsTracking && mQsExpansionAnimator == null && !mQsExpansionFromOverscroll) {
    float t;
    if (mKeyguardShowing) {
      t=expandedHeight / getMaxPanelHeight();
    }
 else {
      float panelHeightQsCollapsed=mNotificationStackScroller.getIntrinsicPadding() + mNotificationStackScroller.getMinStackHeight();
      float panelHeightQsExpanded=calculatePanelHeightQsExpanded();
      t=(expandedHeight - panelHeightQsCollapsed) / (panelHeightQsExpanded - panelHeightQsCollapsed);
    }
    setQsExpansion(mQsMinExpansionHeight + t * (getTempQsMaxExpansion() - mQsMinExpansionHeight));
  }
  updateStackHeight(expandedHeight);
  updateHeader();
  updateUnlockIcon();
  updateNotificationTranslucency();
  updatePanelExpanded();
  mNotificationStackScroller.setShadeExpanded(!isFullyCollapsed());
  if (DEBUG) {
    invalidate();
  }
}
Program: 194978
Project: 194978
Buggy source:
void makeExpandedVisible(boolean force){
  if (SPEW)   Log.d(TAG,"String_Node_Str" + mExpandedVisible);
  if (!force && (mExpandedVisible || !panelsEnabled())) {
    return;
  }
  mExpandedVisible=true;
  if (mNavigationBarView != null)   mNavigationBarView.setSlippery(true);
  mStatusBarWindowManager.setStatusBarExpanded(true);
  mStatusBarView.setFocusable(false);
  visibilityChanged(true);
  mWaitingForKeyguardExit=false;
  disable(mDisabledUnmodified1,mDisabledUnmodified2,!force);
  setInteracting(StatusBarManager.WINDOW_STATUS_BAR,true);
}

Fixed version (ground truth):
void makeExpandedVisible(boolean force){
  if (SPEW)   Log.d(TAG,"String_Node_Str" + mExpandedVisible);
  if (!force && (mExpandedVisible || !panelsEnabled())) {
    return;
  }
  mExpandedVisible=true;
  if (mNavigationBarView != null)   mNavigationBarView.setSlippery(true);
  mStatusBarWindowManager.setPanelVisible(true);
  mStatusBarView.setFocusable(false);
  visibilityChanged(true);
  mWaitingForKeyguardExit=false;
  disable(mDisabledUnmodified1,mDisabledUnmodified2,!force);
  setInteracting(StatusBarManager.WINDOW_STATUS_BAR,true);
}
Program: 194979
Project: 194979
Buggy source:
void makeExpandedInvisible(){
  if (SPEW)   Log.d(TAG,"String_Node_Str" + mExpandedVisible + "String_Node_Str"+ mExpandedVisible);
  if (!mExpandedVisible || mStatusBarWindow == null) {
    return;
  }
  mStatusBarView.collapseAllPanels(false,false,1.0f);
  mNotificationPanel.closeQs();
  mExpandedVisible=false;
  if (mNavigationBarView != null)   mNavigationBarView.setSlippery(false);
  visibilityChanged(false);
  mStatusBarWindowManager.setStatusBarExpanded(false);
  mStatusBarWindowManager.setForceStatusBarVisible(false);
  mStatusBarView.setFocusable(true);
  dismissPopups();
  runPostCollapseRunnables();
  setInteracting(StatusBarManager.WINDOW_STATUS_BAR,false);
  showBouncer();
  disable(mDisabledUnmodified1,mDisabledUnmodified2,true);
  if (!mStatusBarKeyguardViewManager.isShowing()) {
    WindowManagerGlobal.getInstance().trimMemory(ComponentCallbacks2.TRIM_MEMORY_UI_HIDDEN);
  }
}

Fixed version (ground truth):
void makeExpandedInvisible(){
  if (SPEW)   Log.d(TAG,"String_Node_Str" + mExpandedVisible + "String_Node_Str"+ mExpandedVisible);
  if (!mExpandedVisible || mStatusBarWindow == null) {
    return;
  }
  mStatusBarView.collapseAllPanels(false,false,1.0f);
  mNotificationPanel.closeQs();
  mExpandedVisible=false;
  if (mNavigationBarView != null)   mNavigationBarView.setSlippery(false);
  visibilityChanged(false);
  mStatusBarWindowManager.setPanelVisible(false);
  mStatusBarWindowManager.setForceStatusBarVisible(false);
  mStatusBarView.setFocusable(true);
  dismissPopups();
  runPostCollapseRunnables();
  setInteracting(StatusBarManager.WINDOW_STATUS_BAR,false);
  showBouncer();
  disable(mDisabledUnmodified1,mDisabledUnmodified2,true);
  if (!mStatusBarKeyguardViewManager.isShowing()) {
    WindowManagerGlobal.getInstance().trimMemory(ComponentCallbacks2.TRIM_MEMORY_UI_HIDDEN);
  }
}
Program: 194980
Project: 194980
Buggy source:
private void applyHeight(State state){
  boolean expanded=!state.forceCollapsed && (state.isKeyguardShowingAndNotOccluded() || state.statusBarExpanded || state.keyguardFadingAway|| state.bouncerShowing|| state.headsUpShowing);
  if (expanded) {
    mLpChanged.height=ViewGroup.LayoutParams.MATCH_PARENT;
  }
 else {
    mLpChanged.height=mBarHeight;
  }
}

Fixed version (ground truth):
private void applyHeight(State state){
  boolean expanded=!state.forceCollapsed && (state.isKeyguardShowingAndNotOccluded() || state.panelVisible || state.keyguardFadingAway|| state.bouncerShowing|| state.headsUpShowing);
  if (expanded) {
    mLpChanged.height=ViewGroup.LayoutParams.MATCH_PARENT;
  }
 else {
    mLpChanged.height=mBarHeight;
  }
}
Program: 194981
Project: 194981
Buggy source:
private void applyFocusableFlag(State state){
  if (state.isKeyguardShowingAndNotOccluded() && state.keyguardNeedsInput && state.bouncerShowing || BaseStatusBar.ENABLE_REMOTE_INPUT && state.statusBarExpanded) {
    mLpChanged.flags&=~WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
    mLpChanged.flags&=~WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM;
  }
 else   if (state.isKeyguardShowingAndNotOccluded() || state.statusBarFocusable) {
    mLpChanged.flags&=~WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
    mLpChanged.flags|=WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM;
  }
 else {
    mLpChanged.flags|=WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
    mLpChanged.flags&=~WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM;
  }
}

Fixed version (ground truth):
private void applyFocusableFlag(State state){
  boolean panelFocusable=state.statusBarFocusable && state.panelExpanded;
  if (state.isKeyguardShowingAndNotOccluded() && state.keyguardNeedsInput && state.bouncerShowing || BaseStatusBar.ENABLE_REMOTE_INPUT && panelFocusable) {
    mLpChanged.flags&=~WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
    mLpChanged.flags&=~WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM;
  }
 else   if (state.isKeyguardShowingAndNotOccluded() || panelFocusable) {
    mLpChanged.flags&=~WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
    mLpChanged.flags|=WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM;
  }
 else {
    mLpChanged.flags|=WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
    mLpChanged.flags&=~WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM;
  }
}
Program: 194982
Project: 194982
Buggy source:
@Override protected void onHeightUpdated(float expandedHeight){
  if (!mQsExpanded || mQsExpandImmediate || mIsExpanding && mQsExpandedWhenExpandingStarted) {
    positionClockAndNotifications();
  }
  if (mQsExpandImmediate || mQsExpanded && !mQsTracking && mQsExpansionAnimator == null && !mQsExpansionFromOverscroll) {
    float t;
    if (mKeyguardShowing) {
      t=expandedHeight / getMaxPanelHeight();
    }
 else {
      float panelHeightQsCollapsed=mNotificationStackScroller.getIntrinsicPadding() + mNotificationStackScroller.getMinStackHeight();
      float panelHeightQsExpanded=calculatePanelHeightQsExpanded();
      t=(expandedHeight - panelHeightQsCollapsed) / (panelHeightQsExpanded - panelHeightQsCollapsed);
    }
    setQsExpansion(mQsMinExpansionHeight + t * (getTempQsMaxExpansion() - mQsMinExpansionHeight));
  }
  updateStackHeight(expandedHeight);
  updateHeader();
  updateUnlockIcon();
  updateNotificationTranslucency();
  mHeadsUpManager.setIsExpanded(!isFullyCollapsed());
  mNotificationStackScroller.setShadeExpanded(!isFullyCollapsed());
  if (DEBUG) {
    invalidate();
  }
}

Fixed version (ground truth):
@Override protected void onHeightUpdated(float expandedHeight){
  if (!mQsExpanded || mQsExpandImmediate || mIsExpanding && mQsExpandedWhenExpandingStarted) {
    positionClockAndNotifications();
  }
  if (mQsExpandImmediate || mQsExpanded && !mQsTracking && mQsExpansionAnimator == null && !mQsExpansionFromOverscroll) {
    float t;
    if (mKeyguardShowing) {
      t=expandedHeight / getMaxPanelHeight();
    }
 else {
      float panelHeightQsCollapsed=mNotificationStackScroller.getIntrinsicPadding() + mNotificationStackScroller.getMinStackHeight();
      float panelHeightQsExpanded=calculatePanelHeightQsExpanded();
      t=(expandedHeight - panelHeightQsCollapsed) / (panelHeightQsExpanded - panelHeightQsCollapsed);
    }
    setQsExpansion(mQsMinExpansionHeight + t * (getTempQsMaxExpansion() - mQsMinExpansionHeight));
  }
  updateStackHeight(expandedHeight);
  updateHeader();
  updateUnlockIcon();
  updateNotificationTranslucency();
  updatePanelExpanded();
  mNotificationStackScroller.setShadeExpanded(!isFullyCollapsed());
  if (DEBUG) {
    invalidate();
  }
}
Program: 194983
Project: 194983
Buggy source:
void makeExpandedVisible(boolean force){
  if (SPEW)   Log.d(TAG,"String_Node_Str" + mExpandedVisible);
  if (!force && (mExpandedVisible || !panelsEnabled())) {
    return;
  }
  mExpandedVisible=true;
  if (mNavigationBarView != null)   mNavigationBarView.setSlippery(true);
  mStatusBarWindowManager.setStatusBarExpanded(true);
  mStatusBarView.setFocusable(false);
  visibilityChanged(true);
  mWaitingForKeyguardExit=false;
  disable(mDisabledUnmodified1,mDisabledUnmodified2,!force);
  setInteracting(StatusBarManager.WINDOW_STATUS_BAR,true);
}

Fixed version (ground truth):
void makeExpandedVisible(boolean force){
  if (SPEW)   Log.d(TAG,"String_Node_Str" + mExpandedVisible);
  if (!force && (mExpandedVisible || !panelsEnabled())) {
    return;
  }
  mExpandedVisible=true;
  if (mNavigationBarView != null)   mNavigationBarView.setSlippery(true);
  mStatusBarWindowManager.setPanelVisible(true);
  mStatusBarView.setFocusable(false);
  visibilityChanged(true);
  mWaitingForKeyguardExit=false;
  disable(mDisabledUnmodified1,mDisabledUnmodified2,!force);
  setInteracting(StatusBarManager.WINDOW_STATUS_BAR,true);
}
Program: 194984
Project: 194984
Buggy source:
void makeExpandedInvisible(){
  if (SPEW)   Log.d(TAG,"String_Node_Str" + mExpandedVisible + "String_Node_Str"+ mExpandedVisible);
  if (!mExpandedVisible || mStatusBarWindow == null) {
    return;
  }
  mStatusBarView.collapseAllPanels(false,false,1.0f);
  mNotificationPanel.closeQs();
  mExpandedVisible=false;
  if (mNavigationBarView != null)   mNavigationBarView.setSlippery(false);
  visibilityChanged(false);
  mStatusBarWindowManager.setStatusBarExpanded(false);
  mStatusBarWindowManager.setForceStatusBarVisible(false);
  mStatusBarView.setFocusable(true);
  dismissPopups();
  runPostCollapseRunnables();
  setInteracting(StatusBarManager.WINDOW_STATUS_BAR,false);
  showBouncer();
  disable(mDisabledUnmodified1,mDisabledUnmodified2,true);
  if (!mStatusBarKeyguardViewManager.isShowing()) {
    WindowManagerGlobal.getInstance().trimMemory(ComponentCallbacks2.TRIM_MEMORY_UI_HIDDEN);
  }
}

Fixed version (ground truth):
void makeExpandedInvisible(){
  if (SPEW)   Log.d(TAG,"String_Node_Str" + mExpandedVisible + "String_Node_Str"+ mExpandedVisible);
  if (!mExpandedVisible || mStatusBarWindow == null) {
    return;
  }
  mStatusBarView.collapseAllPanels(false,false,1.0f);
  mNotificationPanel.closeQs();
  mExpandedVisible=false;
  if (mNavigationBarView != null)   mNavigationBarView.setSlippery(false);
  visibilityChanged(false);
  mStatusBarWindowManager.setPanelVisible(false);
  mStatusBarWindowManager.setForceStatusBarVisible(false);
  mStatusBarView.setFocusable(true);
  dismissPopups();
  runPostCollapseRunnables();
  setInteracting(StatusBarManager.WINDOW_STATUS_BAR,false);
  showBouncer();
  disable(mDisabledUnmodified1,mDisabledUnmodified2,true);
  if (!mStatusBarKeyguardViewManager.isShowing()) {
    WindowManagerGlobal.getInstance().trimMemory(ComponentCallbacks2.TRIM_MEMORY_UI_HIDDEN);
  }
}
Program: 194985
Project: 194985
Buggy source:
private void applyHeight(State state){
  boolean expanded=!state.forceCollapsed && (state.isKeyguardShowingAndNotOccluded() || state.statusBarExpanded || state.keyguardFadingAway|| state.bouncerShowing|| state.headsUpShowing);
  if (expanded) {
    mLpChanged.height=ViewGroup.LayoutParams.MATCH_PARENT;
  }
 else {
    mLpChanged.height=mBarHeight;
  }
}

Fixed version (ground truth):
private void applyHeight(State state){
  boolean expanded=!state.forceCollapsed && (state.isKeyguardShowingAndNotOccluded() || state.panelVisible || state.keyguardFadingAway|| state.bouncerShowing|| state.headsUpShowing);
  if (expanded) {
    mLpChanged.height=ViewGroup.LayoutParams.MATCH_PARENT;
  }
 else {
    mLpChanged.height=mBarHeight;
  }
}
Program: 194986
Project: 194986
Buggy source:
private void applyFocusableFlag(State state){
  if (state.isKeyguardShowingAndNotOccluded() && state.keyguardNeedsInput && state.bouncerShowing || BaseStatusBar.ENABLE_REMOTE_INPUT && state.statusBarExpanded) {
    mLpChanged.flags&=~WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
    mLpChanged.flags&=~WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM;
  }
 else   if (state.isKeyguardShowingAndNotOccluded() || state.statusBarFocusable) {
    mLpChanged.flags&=~WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
    mLpChanged.flags|=WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM;
  }
 else {
    mLpChanged.flags|=WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
    mLpChanged.flags&=~WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM;
  }
}

Fixed version (ground truth):
private void applyFocusableFlag(State state){
  boolean panelFocusable=state.statusBarFocusable && state.panelExpanded;
  if (state.isKeyguardShowingAndNotOccluded() && state.keyguardNeedsInput && state.bouncerShowing || BaseStatusBar.ENABLE_REMOTE_INPUT && panelFocusable) {
    mLpChanged.flags&=~WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
    mLpChanged.flags&=~WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM;
  }
 else   if (state.isKeyguardShowingAndNotOccluded() || panelFocusable) {
    mLpChanged.flags&=~WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
    mLpChanged.flags|=WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM;
  }
 else {
    mLpChanged.flags|=WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
    mLpChanged.flags&=~WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM;
  }
}
Program: 194987
Project: 194987
Buggy source:
@Override protected void onHeightUpdated(float expandedHeight){
  if (!mQsExpanded || mQsExpandImmediate || mIsExpanding && mQsExpandedWhenExpandingStarted) {
    positionClockAndNotifications();
  }
  if (mQsExpandImmediate || mQsExpanded && !mQsTracking && mQsExpansionAnimator == null && !mQsExpansionFromOverscroll) {
    float t;
    if (mKeyguardShowing) {
      t=expandedHeight / getMaxPanelHeight();
    }
 else {
      float panelHeightQsCollapsed=mNotificationStackScroller.getIntrinsicPadding() + mNotificationStackScroller.getMinStackHeight();
      float panelHeightQsExpanded=calculatePanelHeightQsExpanded();
      t=(expandedHeight - panelHeightQsCollapsed) / (panelHeightQsExpanded - panelHeightQsCollapsed);
    }
    setQsExpansion(mQsMinExpansionHeight + t * (getTempQsMaxExpansion() - mQsMinExpansionHeight));
  }
  updateStackHeight(expandedHeight);
  updateHeader();
  updateUnlockIcon();
  updateNotificationTranslucency();
  mHeadsUpManager.setIsExpanded(!isFullyCollapsed());
  mNotificationStackScroller.setShadeExpanded(!isFullyCollapsed());
  if (DEBUG) {
    invalidate();
  }
}

Fixed version (ground truth):
@Override protected void onHeightUpdated(float expandedHeight){
  if (!mQsExpanded || mQsExpandImmediate || mIsExpanding && mQsExpandedWhenExpandingStarted) {
    positionClockAndNotifications();
  }
  if (mQsExpandImmediate || mQsExpanded && !mQsTracking && mQsExpansionAnimator == null && !mQsExpansionFromOverscroll) {
    float t;
    if (mKeyguardShowing) {
      t=expandedHeight / getMaxPanelHeight();
    }
 else {
      float panelHeightQsCollapsed=mNotificationStackScroller.getIntrinsicPadding() + mNotificationStackScroller.getMinStackHeight();
      float panelHeightQsExpanded=calculatePanelHeightQsExpanded();
      t=(expandedHeight - panelHeightQsCollapsed) / (panelHeightQsExpanded - panelHeightQsCollapsed);
    }
    setQsExpansion(mQsMinExpansionHeight + t * (getTempQsMaxExpansion() - mQsMinExpansionHeight));
  }
  updateStackHeight(expandedHeight);
  updateHeader();
  updateUnlockIcon();
  updateNotificationTranslucency();
  updatePanelExpanded();
  mNotificationStackScroller.setShadeExpanded(!isFullyCollapsed());
  if (DEBUG) {
    invalidate();
  }
}
Program: 194988
Project: 194988
Buggy source:
void makeExpandedVisible(boolean force){
  if (SPEW)   Log.d(TAG,"String_Node_Str" + mExpandedVisible);
  if (!force && (mExpandedVisible || !panelsEnabled())) {
    return;
  }
  mExpandedVisible=true;
  if (mNavigationBarView != null)   mNavigationBarView.setSlippery(true);
  mStatusBarWindowManager.setStatusBarExpanded(true);
  mStatusBarView.setFocusable(false);
  visibilityChanged(true);
  mWaitingForKeyguardExit=false;
  disable(mDisabledUnmodified1,mDisabledUnmodified2,!force);
  setInteracting(StatusBarManager.WINDOW_STATUS_BAR,true);
}

Fixed version (ground truth):
void makeExpandedVisible(boolean force){
  if (SPEW)   Log.d(TAG,"String_Node_Str" + mExpandedVisible);
  if (!force && (mExpandedVisible || !panelsEnabled())) {
    return;
  }
  mExpandedVisible=true;
  if (mNavigationBarView != null)   mNavigationBarView.setSlippery(true);
  mStatusBarWindowManager.setPanelVisible(true);
  mStatusBarView.setFocusable(false);
  visibilityChanged(true);
  mWaitingForKeyguardExit=false;
  disable(mDisabledUnmodified1,mDisabledUnmodified2,!force);
  setInteracting(StatusBarManager.WINDOW_STATUS_BAR,true);
}
Program: 194989
Project: 194989
Buggy source:
void makeExpandedInvisible(){
  if (SPEW)   Log.d(TAG,"String_Node_Str" + mExpandedVisible + "String_Node_Str"+ mExpandedVisible);
  if (!mExpandedVisible || mStatusBarWindow == null) {
    return;
  }
  mStatusBarView.collapseAllPanels(false,false,1.0f);
  mNotificationPanel.closeQs();
  mExpandedVisible=false;
  if (mNavigationBarView != null)   mNavigationBarView.setSlippery(false);
  visibilityChanged(false);
  mStatusBarWindowManager.setStatusBarExpanded(false);
  mStatusBarWindowManager.setForceStatusBarVisible(false);
  mStatusBarView.setFocusable(true);
  dismissPopups();
  runPostCollapseRunnables();
  setInteracting(StatusBarManager.WINDOW_STATUS_BAR,false);
  showBouncer();
  disable(mDisabledUnmodified1,mDisabledUnmodified2,true);
  if (!mStatusBarKeyguardViewManager.isShowing()) {
    WindowManagerGlobal.getInstance().trimMemory(ComponentCallbacks2.TRIM_MEMORY_UI_HIDDEN);
  }
}

Fixed version (ground truth):
void makeExpandedInvisible(){
  if (SPEW)   Log.d(TAG,"String_Node_Str" + mExpandedVisible + "String_Node_Str"+ mExpandedVisible);
  if (!mExpandedVisible || mStatusBarWindow == null) {
    return;
  }
  mStatusBarView.collapseAllPanels(false,false,1.0f);
  mNotificationPanel.closeQs();
  mExpandedVisible=false;
  if (mNavigationBarView != null)   mNavigationBarView.setSlippery(false);
  visibilityChanged(false);
  mStatusBarWindowManager.setPanelVisible(false);
  mStatusBarWindowManager.setForceStatusBarVisible(false);
  mStatusBarView.setFocusable(true);
  dismissPopups();
  runPostCollapseRunnables();
  setInteracting(StatusBarManager.WINDOW_STATUS_BAR,false);
  showBouncer();
  disable(mDisabledUnmodified1,mDisabledUnmodified2,true);
  if (!mStatusBarKeyguardViewManager.isShowing()) {
    WindowManagerGlobal.getInstance().trimMemory(ComponentCallbacks2.TRIM_MEMORY_UI_HIDDEN);
  }
}
Program: 194990
Project: 194990
Buggy source:
private void applyHeight(State state){
  boolean expanded=!state.forceCollapsed && (state.isKeyguardShowingAndNotOccluded() || state.statusBarExpanded || state.keyguardFadingAway|| state.bouncerShowing|| state.headsUpShowing);
  if (expanded) {
    mLpChanged.height=ViewGroup.LayoutParams.MATCH_PARENT;
  }
 else {
    mLpChanged.height=mBarHeight;
  }
}

Fixed version (ground truth):
private void applyHeight(State state){
  boolean expanded=!state.forceCollapsed && (state.isKeyguardShowingAndNotOccluded() || state.panelVisible || state.keyguardFadingAway|| state.bouncerShowing|| state.headsUpShowing);
  if (expanded) {
    mLpChanged.height=ViewGroup.LayoutParams.MATCH_PARENT;
  }
 else {
    mLpChanged.height=mBarHeight;
  }
}
Program: 194991
Project: 194991
Buggy source:
private void applyFocusableFlag(State state){
  if (state.isKeyguardShowingAndNotOccluded() && state.keyguardNeedsInput && state.bouncerShowing || BaseStatusBar.ENABLE_REMOTE_INPUT && state.statusBarExpanded) {
    mLpChanged.flags&=~WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
    mLpChanged.flags&=~WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM;
  }
 else   if (state.isKeyguardShowingAndNotOccluded() || state.statusBarFocusable) {
    mLpChanged.flags&=~WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
    mLpChanged.flags|=WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM;
  }
 else {
    mLpChanged.flags|=WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
    mLpChanged.flags&=~WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM;
  }
}

Fixed version (ground truth):
private void applyFocusableFlag(State state){
  boolean panelFocusable=state.statusBarFocusable && state.panelExpanded;
  if (state.isKeyguardShowingAndNotOccluded() && state.keyguardNeedsInput && state.bouncerShowing || BaseStatusBar.ENABLE_REMOTE_INPUT && panelFocusable) {
    mLpChanged.flags&=~WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
    mLpChanged.flags&=~WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM;
  }
 else   if (state.isKeyguardShowingAndNotOccluded() || panelFocusable) {
    mLpChanged.flags&=~WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
    mLpChanged.flags|=WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM;
  }
 else {
    mLpChanged.flags|=WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
    mLpChanged.flags&=~WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM;
  }
}
Program: 194992
Project: 194992
Buggy source:
@Override protected void onHeightUpdated(float expandedHeight){
  if (!mQsExpanded || mQsExpandImmediate || mIsExpanding && mQsExpandedWhenExpandingStarted) {
    positionClockAndNotifications();
  }
  if (mQsExpandImmediate || mQsExpanded && !mQsTracking && mQsExpansionAnimator == null && !mQsExpansionFromOverscroll) {
    float t;
    if (mKeyguardShowing) {
      t=expandedHeight / getMaxPanelHeight();
    }
 else {
      float panelHeightQsCollapsed=mNotificationStackScroller.getIntrinsicPadding() + mNotificationStackScroller.getMinStackHeight();
      float panelHeightQsExpanded=calculatePanelHeightQsExpanded();
      t=(expandedHeight - panelHeightQsCollapsed) / (panelHeightQsExpanded - panelHeightQsCollapsed);
    }
    setQsExpansion(mQsMinExpansionHeight + t * (getTempQsMaxExpansion() - mQsMinExpansionHeight));
  }
  updateStackHeight(expandedHeight);
  updateHeader();
  updateUnlockIcon();
  updateNotificationTranslucency();
  mHeadsUpManager.setIsExpanded(!isFullyCollapsed());
  mNotificationStackScroller.setShadeExpanded(!isFullyCollapsed());
  if (DEBUG) {
    invalidate();
  }
}

Fixed version (ground truth):
@Override protected void onHeightUpdated(float expandedHeight){
  if (!mQsExpanded || mQsExpandImmediate || mIsExpanding && mQsExpandedWhenExpandingStarted) {
    positionClockAndNotifications();
  }
  if (mQsExpandImmediate || mQsExpanded && !mQsTracking && mQsExpansionAnimator == null && !mQsExpansionFromOverscroll) {
    float t;
    if (mKeyguardShowing) {
      t=expandedHeight / getMaxPanelHeight();
    }
 else {
      float panelHeightQsCollapsed=mNotificationStackScroller.getIntrinsicPadding() + mNotificationStackScroller.getMinStackHeight();
      float panelHeightQsExpanded=calculatePanelHeightQsExpanded();
      t=(expandedHeight - panelHeightQsCollapsed) / (panelHeightQsExpanded - panelHeightQsCollapsed);
    }
    setQsExpansion(mQsMinExpansionHeight + t * (getTempQsMaxExpansion() - mQsMinExpansionHeight));
  }
  updateStackHeight(expandedHeight);
  updateHeader();
  updateUnlockIcon();
  updateNotificationTranslucency();
  updatePanelExpanded();
  mNotificationStackScroller.setShadeExpanded(!isFullyCollapsed());
  if (DEBUG) {
    invalidate();
  }
}
Program: 194993
Project: 194993
Buggy source:
void makeExpandedVisible(boolean force){
  if (SPEW)   Log.d(TAG,"String_Node_Str" + mExpandedVisible);
  if (!force && (mExpandedVisible || !panelsEnabled())) {
    return;
  }
  mExpandedVisible=true;
  if (mNavigationBarView != null)   mNavigationBarView.setSlippery(true);
  mStatusBarWindowManager.setStatusBarExpanded(true);
  mStatusBarView.setFocusable(false);
  visibilityChanged(true);
  mWaitingForKeyguardExit=false;
  disable(mDisabledUnmodified1,mDisabledUnmodified2,!force);
  setInteracting(StatusBarManager.WINDOW_STATUS_BAR,true);
}

Fixed version (ground truth):
void makeExpandedVisible(boolean force){
  if (SPEW)   Log.d(TAG,"String_Node_Str" + mExpandedVisible);
  if (!force && (mExpandedVisible || !panelsEnabled())) {
    return;
  }
  mExpandedVisible=true;
  if (mNavigationBarView != null)   mNavigationBarView.setSlippery(true);
  mStatusBarWindowManager.setPanelVisible(true);
  mStatusBarView.setFocusable(false);
  visibilityChanged(true);
  mWaitingForKeyguardExit=false;
  disable(mDisabledUnmodified1,mDisabledUnmodified2,!force);
  setInteracting(StatusBarManager.WINDOW_STATUS_BAR,true);
}
Program: 194994
Project: 194994
Buggy source:
void makeExpandedInvisible(){
  if (SPEW)   Log.d(TAG,"String_Node_Str" + mExpandedVisible + "String_Node_Str"+ mExpandedVisible);
  if (!mExpandedVisible || mStatusBarWindow == null) {
    return;
  }
  mStatusBarView.collapseAllPanels(false,false,1.0f);
  mNotificationPanel.closeQs();
  mExpandedVisible=false;
  if (mNavigationBarView != null)   mNavigationBarView.setSlippery(false);
  visibilityChanged(false);
  mStatusBarWindowManager.setStatusBarExpanded(false);
  mStatusBarWindowManager.setForceStatusBarVisible(false);
  mStatusBarView.setFocusable(true);
  dismissPopups();
  runPostCollapseRunnables();
  setInteracting(StatusBarManager.WINDOW_STATUS_BAR,false);
  showBouncer();
  disable(mDisabledUnmodified1,mDisabledUnmodified2,true);
  if (!mStatusBarKeyguardViewManager.isShowing()) {
    WindowManagerGlobal.getInstance().trimMemory(ComponentCallbacks2.TRIM_MEMORY_UI_HIDDEN);
  }
}

Fixed version (ground truth):
void makeExpandedInvisible(){
  if (SPEW)   Log.d(TAG,"String_Node_Str" + mExpandedVisible + "String_Node_Str"+ mExpandedVisible);
  if (!mExpandedVisible || mStatusBarWindow == null) {
    return;
  }
  mStatusBarView.collapseAllPanels(false,false,1.0f);
  mNotificationPanel.closeQs();
  mExpandedVisible=false;
  if (mNavigationBarView != null)   mNavigationBarView.setSlippery(false);
  visibilityChanged(false);
  mStatusBarWindowManager.setPanelVisible(false);
  mStatusBarWindowManager.setForceStatusBarVisible(false);
  mStatusBarView.setFocusable(true);
  dismissPopups();
  runPostCollapseRunnables();
  setInteracting(StatusBarManager.WINDOW_STATUS_BAR,false);
  showBouncer();
  disable(mDisabledUnmodified1,mDisabledUnmodified2,true);
  if (!mStatusBarKeyguardViewManager.isShowing()) {
    WindowManagerGlobal.getInstance().trimMemory(ComponentCallbacks2.TRIM_MEMORY_UI_HIDDEN);
  }
}
Program: 194995
Project: 194995
Buggy source:
private void applyHeight(State state){
  boolean expanded=!state.forceCollapsed && (state.isKeyguardShowingAndNotOccluded() || state.statusBarExpanded || state.keyguardFadingAway|| state.bouncerShowing|| state.headsUpShowing);
  if (expanded) {
    mLpChanged.height=ViewGroup.LayoutParams.MATCH_PARENT;
  }
 else {
    mLpChanged.height=mBarHeight;
  }
}

Fixed version (ground truth):
private void applyHeight(State state){
  boolean expanded=!state.forceCollapsed && (state.isKeyguardShowingAndNotOccluded() || state.panelVisible || state.keyguardFadingAway|| state.bouncerShowing|| state.headsUpShowing);
  if (expanded) {
    mLpChanged.height=ViewGroup.LayoutParams.MATCH_PARENT;
  }
 else {
    mLpChanged.height=mBarHeight;
  }
}
Program: 194996
Project: 194996
Buggy source:
private void applyFocusableFlag(State state){
  if (state.isKeyguardShowingAndNotOccluded() && state.keyguardNeedsInput && state.bouncerShowing || BaseStatusBar.ENABLE_REMOTE_INPUT && state.statusBarExpanded) {
    mLpChanged.flags&=~WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
    mLpChanged.flags&=~WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM;
  }
 else   if (state.isKeyguardShowingAndNotOccluded() || state.statusBarFocusable) {
    mLpChanged.flags&=~WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
    mLpChanged.flags|=WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM;
  }
 else {
    mLpChanged.flags|=WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
    mLpChanged.flags&=~WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM;
  }
}

Fixed version (ground truth):
private void applyFocusableFlag(State state){
  boolean panelFocusable=state.statusBarFocusable && state.panelExpanded;
  if (state.isKeyguardShowingAndNotOccluded() && state.keyguardNeedsInput && state.bouncerShowing || BaseStatusBar.ENABLE_REMOTE_INPUT && panelFocusable) {
    mLpChanged.flags&=~WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
    mLpChanged.flags&=~WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM;
  }
 else   if (state.isKeyguardShowingAndNotOccluded() || panelFocusable) {
    mLpChanged.flags&=~WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
    mLpChanged.flags|=WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM;
  }
 else {
    mLpChanged.flags|=WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
    mLpChanged.flags&=~WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM;
  }
}
Program: 195001
Project: 195001
Buggy source:
private void updateActiveGroup(int userId){
  File path=Environment.getUserSystemDirectory(userId);
  nativeSetActiveGroup(userId,path.getAbsolutePath().getBytes());
}

Fixed version (ground truth):
private void updateActiveGroup(int userId){
  if (mHalDeviceId != 0) {
    File path=Environment.getUserSystemDirectory(userId);
    nativeSetActiveGroup(userId,path.getAbsolutePath().getBytes());
  }
}
Program: 195002
Project: 195002
Buggy source:
@Override public void onStart(){
  publishBinderService(Context.FINGERPRINT_SERVICE,new FingerprintServiceWrapper());
  mHalDeviceId=nativeOpenHal();
  if (mHalDeviceId != 0) {
    updateActiveGroup(ActivityManager.getCurrentUser());
  }
  if (DEBUG)   Slog.v(TAG,"String_Node_Str" + mHalDeviceId);
  listenForUserSwitches();
}

Fixed version (ground truth):
@Override public void onStart(){
  publishBinderService(Context.FINGERPRINT_SERVICE,new FingerprintServiceWrapper());
  mHalDeviceId=nativeOpenHal();
  updateActiveGroup(ActivityManager.getCurrentUser());
  if (DEBUG)   Slog.v(TAG,"String_Node_Str" + mHalDeviceId);
  listenForUserSwitches();
}
Program: 195004
Project: 195004
Buggy source:
private void updateActiveGroup(int userId){
  File path=Environment.getUserSystemDirectory(userId);
  nativeSetActiveGroup(userId,path.getAbsolutePath().getBytes());
}

Fixed version (ground truth):
private void updateActiveGroup(int userId){
  if (mHalDeviceId != 0) {
    File path=Environment.getUserSystemDirectory(userId);
    nativeSetActiveGroup(userId,path.getAbsolutePath().getBytes());
  }
}
Program: 195005
Project: 195005
Buggy source:
@Override public void onStart(){
  publishBinderService(Context.FINGERPRINT_SERVICE,new FingerprintServiceWrapper());
  mHalDeviceId=nativeOpenHal();
  if (mHalDeviceId != 0) {
    updateActiveGroup(ActivityManager.getCurrentUser());
  }
  if (DEBUG)   Slog.v(TAG,"String_Node_Str" + mHalDeviceId);
  listenForUserSwitches();
}

Fixed version (ground truth):
@Override public void onStart(){
  publishBinderService(Context.FINGERPRINT_SERVICE,new FingerprintServiceWrapper());
  mHalDeviceId=nativeOpenHal();
  updateActiveGroup(ActivityManager.getCurrentUser());
  if (DEBUG)   Slog.v(TAG,"String_Node_Str" + mHalDeviceId);
  listenForUserSwitches();
}
Program: 195006
Project: 195006
Buggy source:
private void updateActiveGroup(int userId){
  File path=Environment.getUserSystemDirectory(userId);
  nativeSetActiveGroup(userId,path.getAbsolutePath().getBytes());
}

Fixed version (ground truth):
private void updateActiveGroup(int userId){
  if (mHalDeviceId != 0) {
    File path=Environment.getUserSystemDirectory(userId);
    nativeSetActiveGroup(userId,path.getAbsolutePath().getBytes());
  }
}
Program: 195007
Project: 195007
Buggy source:
@Override public void onStart(){
  publishBinderService(Context.FINGERPRINT_SERVICE,new FingerprintServiceWrapper());
  mHalDeviceId=nativeOpenHal();
  if (mHalDeviceId != 0) {
    updateActiveGroup(ActivityManager.getCurrentUser());
  }
  if (DEBUG)   Slog.v(TAG,"String_Node_Str" + mHalDeviceId);
  listenForUserSwitches();
}

Fixed version (ground truth):
@Override public void onStart(){
  publishBinderService(Context.FINGERPRINT_SERVICE,new FingerprintServiceWrapper());
  mHalDeviceId=nativeOpenHal();
  updateActiveGroup(ActivityManager.getCurrentUser());
  if (DEBUG)   Slog.v(TAG,"String_Node_Str" + mHalDeviceId);
  listenForUserSwitches();
}
Program: 195008
Project: 195008
Buggy source:
private void updateActiveGroup(int userId){
  File path=Environment.getUserSystemDirectory(userId);
  nativeSetActiveGroup(userId,path.getAbsolutePath().getBytes());
}

Fixed version (ground truth):
private void updateActiveGroup(int userId){
  if (mHalDeviceId != 0) {
    File path=Environment.getUserSystemDirectory(userId);
    nativeSetActiveGroup(userId,path.getAbsolutePath().getBytes());
  }
}
Program: 195009
Project: 195009
Buggy source:
@Override public void onStart(){
  publishBinderService(Context.FINGERPRINT_SERVICE,new FingerprintServiceWrapper());
  mHalDeviceId=nativeOpenHal();
  if (mHalDeviceId != 0) {
    updateActiveGroup(ActivityManager.getCurrentUser());
  }
  if (DEBUG)   Slog.v(TAG,"String_Node_Str" + mHalDeviceId);
  listenForUserSwitches();
}

Fixed version (ground truth):
@Override public void onStart(){
  publishBinderService(Context.FINGERPRINT_SERVICE,new FingerprintServiceWrapper());
  mHalDeviceId=nativeOpenHal();
  updateActiveGroup(ActivityManager.getCurrentUser());
  if (DEBUG)   Slog.v(TAG,"String_Node_Str" + mHalDeviceId);
  listenForUserSwitches();
}
Program: 195010
Project: 195010
Buggy source:
private void updateActiveGroup(int userId){
  File path=Environment.getUserSystemDirectory(userId);
  nativeSetActiveGroup(userId,path.getAbsolutePath().getBytes());
}

Fixed version (ground truth):
private void updateActiveGroup(int userId){
  if (mHalDeviceId != 0) {
    File path=Environment.getUserSystemDirectory(userId);
    nativeSetActiveGroup(userId,path.getAbsolutePath().getBytes());
  }
}
Program: 195011
Project: 195011
Buggy source:
@Override public void onStart(){
  publishBinderService(Context.FINGERPRINT_SERVICE,new FingerprintServiceWrapper());
  mHalDeviceId=nativeOpenHal();
  if (mHalDeviceId != 0) {
    updateActiveGroup(ActivityManager.getCurrentUser());
  }
  if (DEBUG)   Slog.v(TAG,"String_Node_Str" + mHalDeviceId);
  listenForUserSwitches();
}

Fixed version (ground truth):
@Override public void onStart(){
  publishBinderService(Context.FINGERPRINT_SERVICE,new FingerprintServiceWrapper());
  mHalDeviceId=nativeOpenHal();
  updateActiveGroup(ActivityManager.getCurrentUser());
  if (DEBUG)   Slog.v(TAG,"String_Node_Str" + mHalDeviceId);
  listenForUserSwitches();
}
Program: 195012
Project: 195012
Buggy source:
private void updateActiveGroup(int userId){
  File path=Environment.getUserSystemDirectory(userId);
  nativeSetActiveGroup(userId,path.getAbsolutePath().getBytes());
}

Fixed version (ground truth):
private void updateActiveGroup(int userId){
  if (mHalDeviceId != 0) {
    File path=Environment.getUserSystemDirectory(userId);
    nativeSetActiveGroup(userId,path.getAbsolutePath().getBytes());
  }
}
Program: 195013
Project: 195013
Buggy source:
@Override public void onStart(){
  publishBinderService(Context.FINGERPRINT_SERVICE,new FingerprintServiceWrapper());
  mHalDeviceId=nativeOpenHal();
  if (mHalDeviceId != 0) {
    updateActiveGroup(ActivityManager.getCurrentUser());
  }
  if (DEBUG)   Slog.v(TAG,"String_Node_Str" + mHalDeviceId);
  listenForUserSwitches();
}

Fixed version (ground truth):
@Override public void onStart(){
  publishBinderService(Context.FINGERPRINT_SERVICE,new FingerprintServiceWrapper());
  mHalDeviceId=nativeOpenHal();
  updateActiveGroup(ActivityManager.getCurrentUser());
  if (DEBUG)   Slog.v(TAG,"String_Node_Str" + mHalDeviceId);
  listenForUserSwitches();
}
Program: 195014
Project: 195014
Buggy source:
/** 
 * Give a job to this context for execution. Callers must first check   {@link #isAvailable()}to make sure this is a valid context.
 * @param job The status of the job that we are going to run.
 * @return True if the job is valid and is running. False if the job cannot be executed.
 */
boolean executeRunnableJob(JobStatus job){
synchronized (mLock) {
    if (!mAvailable) {
      Slog.e(TAG,"String_Node_Str");
      return false;
    }
    mRunningJob=job;
    final boolean isDeadlineExpired=job.getLatestRunTimeElapsed() >= SystemClock.elapsedRealtime();
    mParams=new JobParameters(this,job.getJobId(),job.getExtras(),isDeadlineExpired);
    mExecutionStartTimeElapsed=SystemClock.elapsedRealtime();
    mVerb=VERB_BINDING;
    scheduleOpTimeOut();
    final Intent intent=new Intent().setComponent(job.getServiceComponent());
    boolean binding=mContext.bindServiceAsUser(intent,this,Context.BIND_AUTO_CREATE | Context.BIND_NOT_FOREGROUND,new UserHandle(job.getUserId()));
    if (!binding) {
      if (DEBUG) {
        Slog.d(TAG,job.getServiceComponent().getShortClassName() + "String_Node_Str");
      }
      mRunningJob=null;
      mParams=null;
      mExecutionStartTimeElapsed=0L;
      removeOpTimeOut();
      return false;
    }
    try {
      mBatteryStats.noteJobStart(job.getName(),job.getUid());
    }
 catch (    RemoteException e) {
    }
    mAvailable=false;
    return true;
  }
}

Fixed version (ground truth):
/** 
 * Give a job to this context for execution. Callers must first check   {@link #isAvailable()}to make sure this is a valid context.
 * @param job The status of the job that we are going to run.
 * @return True if the job is valid and is running. False if the job cannot be executed.
 */
boolean executeRunnableJob(JobStatus job){
synchronized (mLock) {
    if (!mAvailable) {
      Slog.e(TAG,"String_Node_Str");
      return false;
    }
    mRunningJob=job;
    final boolean isDeadlineExpired=job.hasDeadlineConstraint() && (job.getLatestRunTimeElapsed() < SystemClock.elapsedRealtime());
    mParams=new JobParameters(this,job.getJobId(),job.getExtras(),isDeadlineExpired);
    mExecutionStartTimeElapsed=SystemClock.elapsedRealtime();
    mVerb=VERB_BINDING;
    scheduleOpTimeOut();
    final Intent intent=new Intent().setComponent(job.getServiceComponent());
    boolean binding=mContext.bindServiceAsUser(intent,this,Context.BIND_AUTO_CREATE | Context.BIND_NOT_FOREGROUND,new UserHandle(job.getUserId()));
    if (!binding) {
      if (DEBUG) {
        Slog.d(TAG,job.getServiceComponent().getShortClassName() + "String_Node_Str");
      }
      mRunningJob=null;
      mParams=null;
      mExecutionStartTimeElapsed=0L;
      removeOpTimeOut();
      return false;
    }
    try {
      mBatteryStats.noteJobStart(job.getName(),job.getUid());
    }
 catch (    RemoteException e) {
    }
    mAvailable=false;
    return true;
  }
}
Program: 195015
Project: 195015
Buggy source:
private GeofenceHardwareImpl getGeofenceHardwareSink(){
  if (mGeofenceHardwareSink == null) {
    mGeofenceHardwareSink=GeofenceHardwareImpl.getInstance(mContext);
  }
  return mGeofenceHardwareSink;
}

Fixed version (ground truth):
private GeofenceHardwareImpl getGeofenceHardwareSink(){
  if (mGeofenceHardwareSink == null) {
    mGeofenceHardwareSink=GeofenceHardwareImpl.getInstance(mContext);
    mGeofenceHardwareSink.setVersion(mVersion);
  }
  return mGeofenceHardwareSink;
}
Program: 195016
Project: 195016
Buggy source:
private void setVersion(int version){
  mVersion=version;
  getGeofenceHardwareSink().setVersion(version);
}

Fixed version (ground truth):
private void setVersion(int version){
  mVersion=version;
  if (mGeofenceHardwareSink != null) {
    mGeofenceHardwareSink.setVersion(version);
  }
}
Program: 195017
Project: 195017
Buggy source:
private GeofenceHardwareImpl getGeofenceHardwareSink(){
  if (mGeofenceHardwareSink == null) {
    mGeofenceHardwareSink=GeofenceHardwareImpl.getInstance(mContext);
  }
  return mGeofenceHardwareSink;
}

Fixed version (ground truth):
private GeofenceHardwareImpl getGeofenceHardwareSink(){
  if (mGeofenceHardwareSink == null) {
    mGeofenceHardwareSink=GeofenceHardwareImpl.getInstance(mContext);
    mGeofenceHardwareSink.setVersion(mVersion);
  }
  return mGeofenceHardwareSink;
}
Program: 195018
Project: 195018
Buggy source:
private void setVersion(int version){
  mVersion=version;
  getGeofenceHardwareSink().setVersion(version);
}

Fixed version (ground truth):
private void setVersion(int version){
  mVersion=version;
  if (mGeofenceHardwareSink != null) {
    mGeofenceHardwareSink.setVersion(version);
  }
}
Program: 195019
Project: 195019
Buggy source:
private GeofenceHardwareImpl getGeofenceHardwareSink(){
  if (mGeofenceHardwareSink == null) {
    mGeofenceHardwareSink=GeofenceHardwareImpl.getInstance(mContext);
  }
  return mGeofenceHardwareSink;
}

Fixed version (ground truth):
private GeofenceHardwareImpl getGeofenceHardwareSink(){
  if (mGeofenceHardwareSink == null) {
    mGeofenceHardwareSink=GeofenceHardwareImpl.getInstance(mContext);
    mGeofenceHardwareSink.setVersion(mVersion);
  }
  return mGeofenceHardwareSink;
}
Program: 195020
Project: 195020
Buggy source:
private void setVersion(int version){
  mVersion=version;
  getGeofenceHardwareSink().setVersion(version);
}

Fixed version (ground truth):
private void setVersion(int version){
  mVersion=version;
  if (mGeofenceHardwareSink != null) {
    mGeofenceHardwareSink.setVersion(version);
  }
}
Program: 195021
Project: 195021
Buggy source:
private GeofenceHardwareImpl getGeofenceHardwareSink(){
  if (mGeofenceHardwareSink == null) {
    mGeofenceHardwareSink=GeofenceHardwareImpl.getInstance(mContext);
  }
  return mGeofenceHardwareSink;
}

Fixed version (ground truth):
private GeofenceHardwareImpl getGeofenceHardwareSink(){
  if (mGeofenceHardwareSink == null) {
    mGeofenceHardwareSink=GeofenceHardwareImpl.getInstance(mContext);
    mGeofenceHardwareSink.setVersion(mVersion);
  }
  return mGeofenceHardwareSink;
}
Program: 195022
Project: 195022
Buggy source:
private void setVersion(int version){
  mVersion=version;
  getGeofenceHardwareSink().setVersion(version);
}

Fixed version (ground truth):
private void setVersion(int version){
  mVersion=version;
  if (mGeofenceHardwareSink != null) {
    mGeofenceHardwareSink.setVersion(version);
  }
}
Program: 195023
Project: 195023
Buggy source:
private GeofenceHardwareImpl getGeofenceHardwareSink(){
  if (mGeofenceHardwareSink == null) {
    mGeofenceHardwareSink=GeofenceHardwareImpl.getInstance(mContext);
  }
  return mGeofenceHardwareSink;
}

Fixed version (ground truth):
private GeofenceHardwareImpl getGeofenceHardwareSink(){
  if (mGeofenceHardwareSink == null) {
    mGeofenceHardwareSink=GeofenceHardwareImpl.getInstance(mContext);
    mGeofenceHardwareSink.setVersion(mVersion);
  }
  return mGeofenceHardwareSink;
}