Program: 196230
Project: 196230
Buggy source:
private void startAlphaAnimation(final ExpandableView child,final StackScrollState.ViewState viewState,long duration,long delay){
  Float previousStartValue=getChildTag(child,TAG_START_ALPHA);
  Float previousEndValue=getChildTag(child,TAG_END_ALPHA);
  final float newEndValue=viewState.alpha;
  if (previousEndValue != null && previousEndValue == newEndValue) {
    return;
  }
  ObjectAnimator previousAnimator=getChildTag(child,TAG_ANIMATOR_ALPHA);
  if (!mAnimationFilter.animateAlpha) {
    if (previousAnimator != null) {
      PropertyValuesHolder[] values=previousAnimator.getValues();
      float relativeDiff=newEndValue - previousEndValue;
      float newStartValue=previousStartValue + relativeDiff;
      values[0].setFloatValues(newStartValue,newEndValue);
      child.setTag(TAG_START_ALPHA,newStartValue);
      child.setTag(TAG_END_ALPHA,newEndValue);
      previousAnimator.setCurrentPlayTime(previousAnimator.getCurrentPlayTime());
      return;
    }
 else {
      child.setAlpha(newEndValue);
      if (newEndValue == 0) {
        child.setVisibility(View.INVISIBLE);
      }
    }
  }
  ObjectAnimator animator=ObjectAnimator.ofFloat(child,View.ALPHA,child.getAlpha(),newEndValue);
  animator.setInterpolator(mFastOutSlowInInterpolator);
  child.setLayerType(View.LAYER_TYPE_HARDWARE,null);
  animator.addListener(new AnimatorListenerAdapter(){
    public boolean mWasCancelled;
    @Override public void onAnimationEnd(    Animator animation){
      child.setLayerType(View.LAYER_TYPE_NONE,null);
      if (newEndValue == 0 && !mWasCancelled) {
        child.setVisibility(View.INVISIBLE);
      }
      child.setTag(TAG_ANIMATOR_ALPHA,null);
      child.setTag(TAG_START_ALPHA,null);
      child.setTag(TAG_END_ALPHA,null);
    }
    @Override public void onAnimationCancel(    Animator animation){
      mWasCancelled=true;
    }
    @Override public void onAnimationStart(    Animator animation){
      mWasCancelled=false;
    }
  }
);
  long newDuration=cancelAnimatorAndGetNewDuration(duration,previousAnimator);
  animator.setDuration(newDuration);
  if (delay > 0 && (previousAnimator == null || !previousAnimator.isRunning())) {
    animator.setStartDelay(delay);
  }
  animator.addListener(getGlobalAnimationFinishedListener());
  animator.addListener(new AnimatorListenerAdapter(){
    @Override public void onAnimationEnd(    Animator animation){
    }
  }
);
  startAnimator(animator);
  child.setTag(TAG_ANIMATOR_ALPHA,animator);
  child.setTag(TAG_START_ALPHA,child.getAlpha());
  child.setTag(TAG_END_ALPHA,newEndValue);
}

Fixed version (ground truth):
private void startAlphaAnimation(final ExpandableView child,final StackScrollState.ViewState viewState,long duration,long delay){
  Float previousStartValue=getChildTag(child,TAG_START_ALPHA);
  Float previousEndValue=getChildTag(child,TAG_END_ALPHA);
  final float newEndValue=viewState.alpha;
  if (previousEndValue != null && previousEndValue == newEndValue) {
    return;
  }
  ObjectAnimator previousAnimator=getChildTag(child,TAG_ANIMATOR_ALPHA);
  if (!mAnimationFilter.animateAlpha) {
    if (previousAnimator != null) {
      PropertyValuesHolder[] values=previousAnimator.getValues();
      float relativeDiff=newEndValue - previousEndValue;
      float newStartValue=previousStartValue + relativeDiff;
      values[0].setFloatValues(newStartValue,newEndValue);
      child.setTag(TAG_START_ALPHA,newStartValue);
      child.setTag(TAG_END_ALPHA,newEndValue);
      previousAnimator.setCurrentPlayTime(previousAnimator.getCurrentPlayTime());
      return;
    }
 else {
      child.setAlpha(newEndValue);
      if (newEndValue == 0) {
        child.setVisibility(View.INVISIBLE);
      }
    }
  }
  ObjectAnimator animator=ObjectAnimator.ofFloat(child,View.ALPHA,child.getAlpha(),newEndValue);
  animator.setInterpolator(mFastOutSlowInInterpolator);
  child.setLayerType(View.LAYER_TYPE_HARDWARE,null);
  animator.addListener(new AnimatorListenerAdapter(){
    public boolean mWasCancelled;
    @Override public void onAnimationEnd(    Animator animation){
      child.setLayerType(View.LAYER_TYPE_NONE,null);
      if (newEndValue == 0 && !mWasCancelled) {
        child.setVisibility(View.INVISIBLE);
      }
      child.setTag(TAG_ANIMATOR_ALPHA,null);
      child.setTag(TAG_START_ALPHA,null);
      child.setTag(TAG_END_ALPHA,null);
    }
    @Override public void onAnimationCancel(    Animator animation){
      mWasCancelled=true;
    }
    @Override public void onAnimationStart(    Animator animation){
      mWasCancelled=false;
    }
  }
);
  long newDuration=cancelAnimatorAndGetNewDuration(duration,previousAnimator);
  animator.setDuration(newDuration);
  if (delay > 0 && (previousAnimator == null || !previousAnimator.isRunning())) {
    animator.setStartDelay(delay);
  }
  animator.addListener(getGlobalAnimationFinishedListener());
  startAnimator(animator);
  child.setTag(TAG_ANIMATOR_ALPHA,animator);
  child.setTag(TAG_START_ALPHA,child.getAlpha());
  child.setTag(TAG_END_ALPHA,newEndValue);
}