Program: 196229
Project: 196229
Buggy source:
/** 
 * Apply the properties saved in   {@link #mStateMap} to the children of the {@link #mHostView}. The properties are only applied if they effectively changed.
 */
public void apply(){
  int numChildren=mHostView.getChildCount();
  for (int i=0; i < numChildren; i++) {
    ExpandableView child=(ExpandableView)mHostView.getChildAt(i);
    ViewState state=mStateMap.get(child);
    if (state == null) {
      Log.wtf(CHILD_NOT_FOUND_TAG,"String_Node_Str" + "String_Node_Str");
      continue;
    }
    if (!state.gone) {
      float alpha=child.getAlpha();
      float yTranslation=child.getTranslationY();
      float xTranslation=child.getTranslationX();
      float zTranslation=child.getTranslationZ();
      float scale=child.getScaleX();
      int height=child.getActualHeight();
      float newAlpha=state.alpha;
      float newYTranslation=state.yTranslation;
      float newZTranslation=state.zTranslation;
      float newScale=state.scale;
      int newHeight=state.height;
      boolean becomesInvisible=newAlpha == 0.0f;
      if (alpha != newAlpha && xTranslation == 0) {
        boolean becomesFullyVisible=newAlpha == 1.0f;
        boolean newLayerTypeIsHardware=!becomesInvisible && !becomesFullyVisible;
        int layerType=child.getLayerType();
        int newLayerType=newLayerTypeIsHardware ? View.LAYER_TYPE_HARDWARE : View.LAYER_TYPE_NONE;
        if (layerType != newLayerType) {
          child.setLayerType(newLayerType,null);
        }
        if (!becomesInvisible) {
          child.setAlpha(newAlpha);
        }
      }
      int oldVisibility=child.getVisibility();
      int newVisibility=becomesInvisible ? View.INVISIBLE : View.VISIBLE;
      if (newVisibility != oldVisibility) {
        child.setVisibility(newVisibility);
      }
      if (yTranslation != newYTranslation) {
        child.setTranslationY(newYTranslation);
      }
      if (zTranslation != newZTranslation) {
        child.setTranslationZ(newZTranslation);
      }
      if (scale != newScale) {
        child.setScaleX(newScale);
        child.setScaleY(newScale);
      }
      if (height != newHeight) {
        child.setActualHeight(newHeight,false);
      }
      child.setDimmed(state.dimmed,false);
      child.setDark(state.dark,false);
      child.setHideSensitive(state.hideSensitive,false,0,0);
      child.setBelowSpeedBump(state.belowSpeedBump);
      float oldClipTopAmount=child.getClipTopAmount();
      if (oldClipTopAmount != state.clipTopAmount) {
        child.setClipTopAmount(state.clipTopAmount);
      }
      updateChildClip(child,newHeight,state.topOverLap);
      if (child instanceof SpeedBumpView) {
        performSpeedBumpAnimation(i,(SpeedBumpView)child,state,0);
      }
 else       if (child instanceof DismissView) {
        DismissView dismissView=(DismissView)child;
        boolean visible=state.topOverLap < mClearAllTopPadding;
        dismissView.performVisibilityAnimation(visible && !dismissView.willBeGone());
      }
 else       if (child instanceof EmptyShadeView) {
        EmptyShadeView emptyShadeView=(EmptyShadeView)child;
        boolean visible=state.topOverLap <= 0;
        emptyShadeView.performVisibilityAnimation(visible && !emptyShadeView.willBeGone());
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Apply the properties saved in   {@link #mStateMap} to the children of the {@link #mHostView}. The properties are only applied if they effectively changed.
 */
public void apply(){
  int numChildren=mHostView.getChildCount();
  for (int i=0; i < numChildren; i++) {
    ExpandableView child=(ExpandableView)mHostView.getChildAt(i);
    ViewState state=mStateMap.get(child);
    if (state == null) {
      Log.wtf(CHILD_NOT_FOUND_TAG,"String_Node_Str" + "String_Node_Str");
      continue;
    }
    if (!state.gone) {
      float alpha=child.getAlpha();
      float yTranslation=child.getTranslationY();
      float xTranslation=child.getTranslationX();
      float zTranslation=child.getTranslationZ();
      float scale=child.getScaleX();
      int height=child.getActualHeight();
      float newAlpha=state.alpha;
      float newYTranslation=state.yTranslation;
      float newZTranslation=state.zTranslation;
      float newScale=state.scale;
      int newHeight=state.height;
      boolean becomesInvisible=newAlpha == 0.0f;
      if (alpha != newAlpha && xTranslation == 0) {
        boolean becomesFullyVisible=newAlpha == 1.0f;
        boolean newLayerTypeIsHardware=!becomesInvisible && !becomesFullyVisible;
        int layerType=child.getLayerType();
        int newLayerType=newLayerTypeIsHardware ? View.LAYER_TYPE_HARDWARE : View.LAYER_TYPE_NONE;
        if (layerType != newLayerType) {
          child.setLayerType(newLayerType,null);
        }
        child.setAlpha(newAlpha);
      }
      int oldVisibility=child.getVisibility();
      int newVisibility=becomesInvisible ? View.INVISIBLE : View.VISIBLE;
      if (newVisibility != oldVisibility) {
        child.setVisibility(newVisibility);
      }
      if (yTranslation != newYTranslation) {
        child.setTranslationY(newYTranslation);
      }
      if (zTranslation != newZTranslation) {
        child.setTranslationZ(newZTranslation);
      }
      if (scale != newScale) {
        child.setScaleX(newScale);
        child.setScaleY(newScale);
      }
      if (height != newHeight) {
        child.setActualHeight(newHeight,false);
      }
      child.setDimmed(state.dimmed,false);
      child.setDark(state.dark,false);
      child.setHideSensitive(state.hideSensitive,false,0,0);
      child.setBelowSpeedBump(state.belowSpeedBump);
      float oldClipTopAmount=child.getClipTopAmount();
      if (oldClipTopAmount != state.clipTopAmount) {
        child.setClipTopAmount(state.clipTopAmount);
      }
      updateChildClip(child,newHeight,state.topOverLap);
      if (child instanceof SpeedBumpView) {
        performSpeedBumpAnimation(i,(SpeedBumpView)child,state,0);
      }
 else       if (child instanceof DismissView) {
        DismissView dismissView=(DismissView)child;
        boolean visible=state.topOverLap < mClearAllTopPadding;
        dismissView.performVisibilityAnimation(visible && !dismissView.willBeGone());
      }
 else       if (child instanceof EmptyShadeView) {
        EmptyShadeView emptyShadeView=(EmptyShadeView)child;
        boolean visible=state.topOverLap <= 0;
        emptyShadeView.performVisibilityAnimation(visible && !emptyShadeView.willBeGone());
      }
    }
  }
}