Program: 162358
Project: 162358
Buggy source:
private void init(AttributeSet attrs,int defStyleAttr,int defStyleRes){
  if (attrs == null)   return;
  final Context context=getContext();
  final Resources resources=getResources();
  final TypedArray a=context.obtainStyledAttributes(attrs,R.styleable.Button,defStyleAttr,defStyleRes);
  String fontFile=a.getString(R.styleable.Button_gFont);
  int touchEffect=a.getInt(R.styleable.Button_gTouchEffect,TOUCH_EFFECT_NONE);
  int touchColor=a.getColor(R.styleable.Button_gTouchColor,Ui.TOUCH_PRESS_COLOR);
  int touchRadius=a.getDimensionPixelOffset(R.styleable.Button_gTouchCornerRadius,resources.getDimensionPixelOffset(R.dimen.g_button_touch_corners_radius));
  int touchRadiusTL=a.getDimensionPixelOffset(R.styleable.Button_gTouchCornerRadiusTL,touchRadius);
  int touchRadiusTR=a.getDimensionPixelOffset(R.styleable.Button_gTouchCornerRadiusTR,touchRadius);
  int touchRadiusBL=a.getDimensionPixelOffset(R.styleable.Button_gTouchCornerRadiusBL,touchRadius);
  int touchRadiusBR=a.getDimensionPixelOffset(R.styleable.Button_gTouchCornerRadiusBR,touchRadius);
  float[] radius=new float[]{touchRadiusTL,touchRadiusTL,touchRadiusTR,touchRadiusTR,touchRadiusBR,touchRadiusBR,touchRadiusBL,touchRadiusBL};
  ClipFilletFactory touchFactory=new ClipFilletFactory(radius);
  float touchDurationRate=a.getFloat(R.styleable.Button_gTouchDurationRate,1.0f);
  a.recycle();
  if (attrs.getAttributeValue(Ui.androidStyleNameSpace,"String_Node_Str") == null || getBackground() == null) {
    if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) {
      Drawable drawable=getResources().getDrawable(R.drawable.g_button_background);
      setBackgroundDrawable(drawable);
    }
 else     setBackgroundResource(R.drawable.g_button_background);
  }
  setTouchEffect(touchEffect);
  setTouchColor(touchColor);
  setTouchDuration(touchDurationRate);
  if (!this.isInEditMode()) {
    setTouchClipFactory(touchFactory);
    if (fontFile != null && fontFile.length() > 0) {
      Typeface typeface=Ui.getFont(getContext(),fontFile);
      if (typeface != null)       setTypeface(typeface);
    }
  }
}

Fixed version (ground truth):
private void init(AttributeSet attrs,int defStyleAttr,int defStyleRes){
  if (attrs == null)   return;
  final Context context=getContext();
  final Resources resources=getResources();
  final TypedArray a=context.obtainStyledAttributes(attrs,R.styleable.Button,defStyleAttr,defStyleRes);
  String fontFile=a.getString(R.styleable.Button_gFont);
  int touchEffect=a.getInt(R.styleable.Button_gTouchEffect,TOUCH_EFFECT_NONE);
  int touchColor=a.getColor(R.styleable.Button_gTouchColor,Ui.TOUCH_PRESS_COLOR);
  int touchRadius=a.getDimensionPixelOffset(R.styleable.Button_gTouchCornerRadius,resources.getDimensionPixelOffset(R.dimen.g_button_touch_corners_radius));
  int touchRadiusTL=a.getDimensionPixelOffset(R.styleable.Button_gTouchCornerRadiusTL,touchRadius);
  int touchRadiusTR=a.getDimensionPixelOffset(R.styleable.Button_gTouchCornerRadiusTR,touchRadius);
  int touchRadiusBL=a.getDimensionPixelOffset(R.styleable.Button_gTouchCornerRadiusBL,touchRadius);
  int touchRadiusBR=a.getDimensionPixelOffset(R.styleable.Button_gTouchCornerRadiusBR,touchRadius);
  float[] radius=new float[]{touchRadiusTL,touchRadiusTL,touchRadiusTR,touchRadiusTR,touchRadiusBR,touchRadiusBR,touchRadiusBL,touchRadiusBL};
  ClipFilletFactory touchFactory=new ClipFilletFactory(radius);
  float touchDurationRate=a.getFloat(R.styleable.Button_gTouchDurationRate,1.0f);
  a.recycle();
  if (attrs.getAttributeValue(Ui.androidStyleNameSpace,"String_Node_Str") == null || getBackground() == null) {
    if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) {
      Drawable drawable=getResources().getDrawable(R.drawable.g_button_background);
      setBackgroundDrawable(drawable);
    }
 else     setBackgroundResource(R.drawable.g_button_background);
  }
  setTouchEffect(touchEffect);
  setTouchColor(touchColor);
  setTouchDuration(touchDurationRate);
  if (!this.isInEditMode()) {
    setTouchClipFactory(touchFactory);
    if (fontFile != null && fontFile.length() > 0) {
      Typeface typeface=Ui.getFont(getContext(),fontFile);
      if (typeface != null)       setTypeface(typeface);
    }
  }
  if (getLayerType() != View.LAYER_TYPE_SOFTWARE)   setLayerType(View.LAYER_TYPE_SOFTWARE,null);
}