Program: 195685
Project: 195685
Buggy source:
/** 
 * <p>Sets the opacity of the view. This is a value from 0 to 1, where 0 means the view is completely transparent and 1 means the view is completely opaque.</p> <p> Note that setting alpha to a translucent value (0 < alpha < 1) can have significant performance implications, especially for large views. It is best to use the alpha property sparingly and transiently, as in the case of fading animations.</p> <p>For a view with a frequently changing alpha, such as during a fading animation, it is strongly recommended for performance reasons to either override  {@link #hasOverlappingRendering()} to return false if appropriate, or setting a{@link #setLayerType(int,android.graphics.Paint) layer type} on the view.</p><p>If this view overrides  {@link #onSetAlpha(int)} to return true, then this view isresponsible for applying the opacity itself.</p> <p>Note that if the view is backed by a {@link #setLayerType(int,android.graphics.Paint) layer} and is associated with a{@link #setLayerPaint(android.graphics.Paint) layer paint}, setting an alpha value less than 1.0 will supercede the alpha of the layer paint.</p>
 * @param alpha The opacity of the view.
 * @see #hasOverlappingRendering()
 * @see #setLayerType(int,android.graphics.Paint)
 * @attr ref android.R.styleable#View_alpha
 */
public void setAlpha(float alpha){
  ensureTransformationInfo();
  if (mTransformationInfo.mAlpha != alpha) {
    mTransformationInfo.mAlpha=alpha;
    if (onSetAlpha((int)(alpha * 255))) {
      mPrivateFlags|=PFLAG_ALPHA_SET;
      invalidateParentCaches();
      invalidate(true);
    }
 else {
      mPrivateFlags&=~PFLAG_ALPHA_SET;
      invalidateViewProperty(true,false);
      mRenderNode.setAlpha(getFinalAlpha());
      notifyViewAccessibilityStateChangedIfNeeded(AccessibilityEvent.CONTENT_CHANGE_TYPE_UNDEFINED);
    }
  }
}

Fixed version (ground truth):
/** 
 * <p>Sets the opacity of the view. This is a value from 0 to 1, where 0 means the view is completely transparent and 1 means the view is completely opaque.</p> <p> Note that setting alpha to a translucent value (0 < alpha < 1) can have significant performance implications, especially for large views. It is best to use the alpha property sparingly and transiently, as in the case of fading animations.</p> <p>For a view with a frequently changing alpha, such as during a fading animation, it is strongly recommended for performance reasons to either override  {@link #hasOverlappingRendering()} to return false if appropriate, or setting a{@link #setLayerType(int,android.graphics.Paint) layer type} on the view.</p><p>If this view overrides  {@link #onSetAlpha(int)} to return true, then this view isresponsible for applying the opacity itself.</p> <p>Note that if the view is backed by a {@link #setLayerType(int,android.graphics.Paint) layer} and is associated with a{@link #setLayerPaint(android.graphics.Paint) layer paint}, setting an alpha value less than 1.0 will supersede the alpha of the layer paint.</p>
 * @param alpha The opacity of the view.
 * @see #hasOverlappingRendering()
 * @see #setLayerType(int,android.graphics.Paint)
 * @attr ref android.R.styleable#View_alpha
 */
public void setAlpha(float alpha){
  ensureTransformationInfo();
  if (mTransformationInfo.mAlpha != alpha) {
    mTransformationInfo.mAlpha=alpha;
    if (onSetAlpha((int)(alpha * 255))) {
      mPrivateFlags|=PFLAG_ALPHA_SET;
      invalidateParentCaches();
      invalidate(true);
    }
 else {
      mPrivateFlags&=~PFLAG_ALPHA_SET;
      invalidateViewProperty(true,false);
      mRenderNode.setAlpha(getFinalAlpha());
      notifyViewAccessibilityStateChangedIfNeeded(AccessibilityEvent.CONTENT_CHANGE_TYPE_UNDEFINED);
    }
  }
}