Program: 198674
Project: 198674
Buggy source:
private void setCircleRadius(float circleRadius,boolean noAnimation){
  boolean radiusHidden=(mCircleAnimator != null && mCircleWillBeHidden) || (mCircleAnimator == null && mCircleRadius == 0.0f);
  boolean nowHidden=circleRadius == 0.0f;
  boolean radiusNeedsAnimation=(radiusHidden != nowHidden) && !noAnimation;
  if (!radiusNeedsAnimation) {
    if (mCircleAnimator == null) {
      mCircleRadius=circleRadius;
      invalidate();
      if (nowHidden) {
        if (mPreviewView != null) {
          mPreviewView.setVisibility(View.INVISIBLE);
        }
      }
    }
 else     if (!mCircleWillBeHidden) {
      float diff=circleRadius - mMinBackgroundRadius;
      PropertyValuesHolder[] values=mCircleAnimator.getValues();
      values[0].setFloatValues(mCircleStartValue + diff,circleRadius);
      mCircleAnimator.setCurrentPlayTime(mCircleAnimator.getCurrentPlayTime());
    }
  }
 else {
    cancelAnimator(mCircleAnimator);
    cancelAnimator(mPreviewClipper);
    ValueAnimator animator=getAnimatorToRadius(circleRadius);
    Interpolator interpolator=circleRadius == 0.0f ? mDisappearInterpolator : mAppearInterpolator;
    animator.setInterpolator(interpolator);
    float durationFactor=Math.abs(mCircleRadius - circleRadius) / (float)mMinBackgroundRadius;
    long duration=(long)(CIRCLE_APPEAR_DURATION * durationFactor);
    duration=Math.min(duration,CIRCLE_DISAPPEAR_MAX_DURATION);
    animator.setDuration(duration);
    animator.start();
    if (mPreviewView != null) {
      mPreviewView.setVisibility(View.VISIBLE);
      mPreviewClipper=ViewAnimationUtils.createCircularReveal(mPreviewView,getLeft() + mCenterX,getTop() + mCenterY,mCircleRadius,circleRadius);
      mPreviewClipper.setInterpolator(interpolator);
      mPreviewClipper.setDuration(duration);
      mPreviewClipper.addListener(mClipEndListener);
      mPreviewClipper.addListener(new AnimatorListenerAdapter(){
        @Override public void onAnimationEnd(        Animator animation){
          mPreviewView.setVisibility(View.INVISIBLE);
        }
      }
);
      mPreviewClipper.start();
    }
  }
}

Fixed version (ground truth):
private void setCircleRadius(float circleRadius,boolean noAnimation){
  boolean radiusHidden=(mCircleAnimator != null && mCircleWillBeHidden) || (mCircleAnimator == null && mCircleRadius == 0.0f);
  boolean nowHidden=circleRadius == 0.0f;
  boolean radiusNeedsAnimation=(radiusHidden != nowHidden) && !noAnimation;
  if (!radiusNeedsAnimation) {
    if (mCircleAnimator == null) {
      mCircleRadius=circleRadius;
      updateIconColor();
      invalidate();
      if (nowHidden) {
        if (mPreviewView != null) {
          mPreviewView.setVisibility(View.INVISIBLE);
        }
      }
    }
 else     if (!mCircleWillBeHidden) {
      float diff=circleRadius - mMinBackgroundRadius;
      PropertyValuesHolder[] values=mCircleAnimator.getValues();
      values[0].setFloatValues(mCircleStartValue + diff,circleRadius);
      mCircleAnimator.setCurrentPlayTime(mCircleAnimator.getCurrentPlayTime());
    }
  }
 else {
    cancelAnimator(mCircleAnimator);
    cancelAnimator(mPreviewClipper);
    ValueAnimator animator=getAnimatorToRadius(circleRadius);
    Interpolator interpolator=circleRadius == 0.0f ? mDisappearInterpolator : mAppearInterpolator;
    animator.setInterpolator(interpolator);
    float durationFactor=Math.abs(mCircleRadius - circleRadius) / (float)mMinBackgroundRadius;
    long duration=(long)(CIRCLE_APPEAR_DURATION * durationFactor);
    duration=Math.min(duration,CIRCLE_DISAPPEAR_MAX_DURATION);
    animator.setDuration(duration);
    animator.start();
    if (mPreviewView != null) {
      mPreviewView.setVisibility(View.VISIBLE);
      mPreviewClipper=ViewAnimationUtils.createCircularReveal(mPreviewView,getLeft() + mCenterX,getTop() + mCenterY,mCircleRadius,circleRadius);
      mPreviewClipper.setInterpolator(interpolator);
      mPreviewClipper.setDuration(duration);
      mPreviewClipper.addListener(mClipEndListener);
      mPreviewClipper.addListener(new AnimatorListenerAdapter(){
        @Override public void onAnimationEnd(        Animator animation){
          mPreviewView.setVisibility(View.INVISIBLE);
        }
      }
);
      mPreviewClipper.start();
    }
  }
}