Program: 171180
Project: 171180
Buggy source:
@SuppressLint("String_Node_Str") private void setupBackground(){
  GradientDrawable defaultDrawable=new GradientDrawable();
  defaultDrawable.setCornerRadius(mRadius);
  defaultDrawable.setCornerRadii(new float[]{mRadiusTopLeft,mRadiusTopLeft,mRadiusTopRight,mRadiusTopRight,mRadiusBottomRight,mRadiusBottomRight,mRadiusBottomLeft,mRadiusBottomLeft});
  if (mGhost) {
    if (android.os.Build.VERSION.SDK_INT <= Build.VERSION_CODES.LOLLIPOP) {
      defaultDrawable.setColor(getResources().getColor(android.R.color.transparent));
    }
 else {
      defaultDrawable.setColor(getResources().getColor(android.R.color.transparent,getContext().getTheme()));
    }
  }
 else {
    defaultDrawable.setColor(mDefaultBackgroundColor);
  }
  GradientDrawable focusDrawable=new GradientDrawable();
  focusDrawable.setCornerRadius(mRadius);
  focusDrawable.setCornerRadii(new float[]{mRadiusTopLeft,mRadiusTopLeft,mRadiusTopRight,mRadiusTopRight,mRadiusBottomRight,mRadiusBottomRight,mRadiusBottomLeft,mRadiusBottomLeft});
  focusDrawable.setColor(mFocusBackgroundColor);
  GradientDrawable disabledDrawable=new GradientDrawable();
  disabledDrawable.setCornerRadius(mRadius);
  focusDrawable.setCornerRadii(new float[]{mRadiusTopLeft,mRadiusTopLeft,mRadiusTopRight,mRadiusTopRight,mRadiusBottomRight,mRadiusBottomRight,mRadiusBottomLeft,mRadiusBottomLeft});
  disabledDrawable.setColor(mDisabledBackgroundColor);
  disabledDrawable.setStroke(mBorderWidth,mDisabledBorderColor);
  if (mBorderColor != 0) {
    defaultDrawable.setStroke(mBorderWidth,mBorderColor);
  }
  if (!mEnabled) {
    defaultDrawable.setStroke(mBorderWidth,mDisabledBorderColor);
    if (mGhost) {
      if (android.os.Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
        disabledDrawable.setColor(getResources().getColor(android.R.color.transparent));
      }
 else {
        disabledDrawable.setColor(getResources().getColor(android.R.color.transparent,getContext().getTheme()));
      }
    }
  }
  if (mUseRippleEffect && Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
    this.setBackground(getRippleDrawable(defaultDrawable,focusDrawable,disabledDrawable));
  }
 else {
    StateListDrawable states=new StateListDrawable();
    GradientDrawable drawable2=new GradientDrawable();
    drawable2.setCornerRadius(mRadius);
    focusDrawable.setCornerRadii(new float[]{mRadiusTopLeft,mRadiusTopLeft,mRadiusTopRight,mRadiusTopRight,mRadiusBottomRight,mRadiusBottomRight,mRadiusBottomLeft,mRadiusBottomLeft});
    if (mGhost) {
      drawable2.setColor(getResources().getColor(android.R.color.transparent));
    }
 else {
      drawable2.setColor(mFocusBackgroundColor);
    }
    if (mBorderColor != 0) {
      if (mGhost) {
        drawable2.setStroke(mBorderWidth,mFocusBackgroundColor);
      }
 else {
        drawable2.setStroke(mBorderWidth,mBorderColor);
      }
    }
    if (!mEnabled) {
      if (mGhost) {
        drawable2.setStroke(mBorderWidth,mDisabledBorderColor);
      }
 else {
        drawable2.setStroke(mBorderWidth,mDisabledBorderColor);
      }
    }
    if (mFocusBackgroundColor != 0) {
      states.addState(new int[]{android.R.attr.state_pressed},drawable2);
      states.addState(new int[]{android.R.attr.state_focused},drawable2);
      states.addState(new int[]{-android.R.attr.state_enabled},disabledDrawable);
    }
    states.addState(new int[]{},defaultDrawable);
    if (android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.JELLY_BEAN) {
      this.setBackgroundDrawable(states);
    }
 else {
      this.setBackground(states);
    }
  }
}

Fixed version (ground truth):
@SuppressLint("String_Node_Str") private void setupBackground(){
  GradientDrawable defaultDrawable=new GradientDrawable();
  defaultDrawable.setCornerRadius(mRadius);
  defaultDrawable.setCornerRadii(new float[]{mRadiusTopLeft,mRadiusTopLeft,mRadiusTopRight,mRadiusTopRight,mRadiusBottomRight,mRadiusBottomRight,mRadiusBottomLeft,mRadiusBottomLeft});
  if (mGhost) {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
      defaultDrawable.setColor(getContext().getColor(android.R.color.transparent));
    }
 else {
      defaultDrawable.setColor(getResources().getColor(android.R.color.transparent));
    }
  }
 else {
    defaultDrawable.setColor(mDefaultBackgroundColor);
  }
  GradientDrawable focusDrawable=new GradientDrawable();
  focusDrawable.setCornerRadius(mRadius);
  focusDrawable.setCornerRadii(new float[]{mRadiusTopLeft,mRadiusTopLeft,mRadiusTopRight,mRadiusTopRight,mRadiusBottomRight,mRadiusBottomRight,mRadiusBottomLeft,mRadiusBottomLeft});
  focusDrawable.setColor(mFocusBackgroundColor);
  GradientDrawable disabledDrawable=new GradientDrawable();
  disabledDrawable.setCornerRadius(mRadius);
  focusDrawable.setCornerRadii(new float[]{mRadiusTopLeft,mRadiusTopLeft,mRadiusTopRight,mRadiusTopRight,mRadiusBottomRight,mRadiusBottomRight,mRadiusBottomLeft,mRadiusBottomLeft});
  disabledDrawable.setColor(mDisabledBackgroundColor);
  disabledDrawable.setStroke(mBorderWidth,mDisabledBorderColor);
  if (mBorderColor != 0) {
    defaultDrawable.setStroke(mBorderWidth,mBorderColor);
  }
  if (!mEnabled) {
    defaultDrawable.setStroke(mBorderWidth,mDisabledBorderColor);
    if (mGhost) {
      if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
        disabledDrawable.setColor(getContext().getColor(android.R.color.transparent));
      }
 else {
        disabledDrawable.setColor(getResources().getColor(android.R.color.transparent));
      }
    }
  }
  if (mUseRippleEffect && Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
    this.setBackground(getRippleDrawable(defaultDrawable,focusDrawable,disabledDrawable));
  }
 else {
    StateListDrawable states=new StateListDrawable();
    GradientDrawable drawable2=new GradientDrawable();
    drawable2.setCornerRadius(mRadius);
    focusDrawable.setCornerRadii(new float[]{mRadiusTopLeft,mRadiusTopLeft,mRadiusTopRight,mRadiusTopRight,mRadiusBottomRight,mRadiusBottomRight,mRadiusBottomLeft,mRadiusBottomLeft});
    if (mGhost) {
      drawable2.setColor(getResources().getColor(android.R.color.transparent));
    }
 else {
      drawable2.setColor(mFocusBackgroundColor);
    }
    if (mBorderColor != 0) {
      if (mGhost) {
        drawable2.setStroke(mBorderWidth,mFocusBackgroundColor);
      }
 else {
        drawable2.setStroke(mBorderWidth,mBorderColor);
      }
    }
    if (!mEnabled) {
      if (mGhost) {
        drawable2.setStroke(mBorderWidth,mDisabledBorderColor);
      }
 else {
        drawable2.setStroke(mBorderWidth,mDisabledBorderColor);
      }
    }
    if (mFocusBackgroundColor != 0) {
      states.addState(new int[]{android.R.attr.state_pressed},drawable2);
      states.addState(new int[]{android.R.attr.state_focused},drawable2);
      states.addState(new int[]{-android.R.attr.state_enabled},disabledDrawable);
    }
    states.addState(new int[]{},defaultDrawable);
    if (android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.JELLY_BEAN) {
      this.setBackgroundDrawable(states);
    }
 else {
      this.setBackground(states);
    }
  }
}