Program: 195690
Project: 195690
Buggy source:
/** 
 * <p>Specifies the type of layer backing this view. The layer can be  {@link #LAYER_TYPE_NONE},   {@link #LAYER_TYPE_SOFTWARE} or{@link #LAYER_TYPE_HARDWARE}.</p> <p>A layer is associated with an optional   {@link android.graphics.Paint}instance that controls how the layer is composed on screen. The following properties of the paint are taken into account when composing the layer:</p> <ul> <li>  {@link android.graphics.Paint#getAlpha() Translucency (alpha)}</li> <li>  {@link android.graphics.Paint#getXfermode() Blending mode}</li> <li>  {@link android.graphics.Paint#getColorFilter() Color filter}</li> </ul> <p>If this view has an alpha value set to < 1.0 by calling  {@link #setAlpha(float)}, the alpha value of the layer's paint is superceded by this view's alpha value.</p> <p>Refer to the documentation of   {@link #LAYER_TYPE_NONE},  {@link #LAYER_TYPE_SOFTWARE} and {@link #LAYER_TYPE_HARDWARE}for more information on when and how to use layers.</p>
 * @param layerType The type of layer to use with this view, must be one of{@link #LAYER_TYPE_NONE},   {@link #LAYER_TYPE_SOFTWARE} or{@link #LAYER_TYPE_HARDWARE}
 * @param paint The paint used to compose the layer. This argument is optionaland can be null. It is ignored when the layer type is {@link #LAYER_TYPE_NONE}
 * @see #getLayerType()
 * @see #LAYER_TYPE_NONE
 * @see #LAYER_TYPE_SOFTWARE
 * @see #LAYER_TYPE_HARDWARE
 * @see #setAlpha(float)
 * @attr ref android.R.styleable#View_layerType
 */
public void setLayerType(int layerType,Paint paint){
  if (layerType < LAYER_TYPE_NONE || layerType > LAYER_TYPE_HARDWARE) {
    throw new IllegalArgumentException("String_Node_Str" + "String_Node_Str");
  }
  boolean typeChanged=mRenderNode.setLayerType(layerType);
  if (!typeChanged) {
    setLayerPaint(paint);
    return;
  }
  if (mLayerType == LAYER_TYPE_SOFTWARE) {
    destroyDrawingCache();
  }
  mLayerType=layerType;
  final boolean layerDisabled=(mLayerType == LAYER_TYPE_NONE);
  mLayerPaint=layerDisabled ? null : (paint == null ? new Paint() : paint);
  mRenderNode.setLayerPaint(mLayerPaint);
  invalidateParentCaches();
  invalidate(true);
}

Fixed version (ground truth):
/** 
 * <p>Specifies the type of layer backing this view. The layer can be  {@link #LAYER_TYPE_NONE},   {@link #LAYER_TYPE_SOFTWARE} or{@link #LAYER_TYPE_HARDWARE}.</p> <p>A layer is associated with an optional   {@link android.graphics.Paint}instance that controls how the layer is composed on screen. The following properties of the paint are taken into account when composing the layer:</p> <ul> <li>  {@link android.graphics.Paint#getAlpha() Translucency (alpha)}</li> <li>  {@link android.graphics.Paint#getXfermode() Blending mode}</li> <li>  {@link android.graphics.Paint#getColorFilter() Color filter}</li> </ul> <p>If this view has an alpha value set to < 1.0 by calling  {@link #setAlpha(float)}, the alpha value of the layer's paint is superseded by this view's alpha value.</p> <p>Refer to the documentation of   {@link #LAYER_TYPE_NONE},  {@link #LAYER_TYPE_SOFTWARE} and {@link #LAYER_TYPE_HARDWARE}for more information on when and how to use layers.</p>
 * @param layerType The type of layer to use with this view, must be one of{@link #LAYER_TYPE_NONE},   {@link #LAYER_TYPE_SOFTWARE} or{@link #LAYER_TYPE_HARDWARE}
 * @param paint The paint used to compose the layer. This argument is optionaland can be null. It is ignored when the layer type is {@link #LAYER_TYPE_NONE}
 * @see #getLayerType()
 * @see #LAYER_TYPE_NONE
 * @see #LAYER_TYPE_SOFTWARE
 * @see #LAYER_TYPE_HARDWARE
 * @see #setAlpha(float)
 * @attr ref android.R.styleable#View_layerType
 */
public void setLayerType(int layerType,Paint paint){
  if (layerType < LAYER_TYPE_NONE || layerType > LAYER_TYPE_HARDWARE) {
    throw new IllegalArgumentException("String_Node_Str" + "String_Node_Str");
  }
  boolean typeChanged=mRenderNode.setLayerType(layerType);
  if (!typeChanged) {
    setLayerPaint(paint);
    return;
  }
  if (mLayerType == LAYER_TYPE_SOFTWARE) {
    destroyDrawingCache();
  }
  mLayerType=layerType;
  final boolean layerDisabled=(mLayerType == LAYER_TYPE_NONE);
  mLayerPaint=layerDisabled ? null : (paint == null ? new Paint() : paint);
  mRenderNode.setLayerPaint(mLayerPaint);
  invalidateParentCaches();
  invalidate(true);
}