Program: 59861
Project: 59861
Buggy source:
@Override protected void onDraw(Canvas canvas){
  super.onDraw(canvas);
  float paddingLeft=getPaddingLeft();
  float paddingRight=getPaddingRight();
  float paddingTop=getPaddingTop();
  float paddingBottom=getPaddingBottom();
  float width=getWidth() - (paddingLeft + paddingRight);
  float height=getHeight() - (paddingTop + paddingBottom);
  float radius=(width > height ? width / 2 : height / 2);
  float rectLeft=width / 2 - radius + paddingLeft;
  float rectTop=height / 2 - radius + paddingTop;
  float rectRight=width / 2 - radius + paddingLeft + width;
  float rectBottom=height / 2 - radius + paddingTop + height;
  mRect.set(rectLeft,rectTop,rectRight,rectBottom);
  mPaint.setColor(mStrokeColor);
  mPaint.setShader(null);
  canvas.drawArc(mRect,mStartAngle,mSweepAngle,false,mPaint);
  mPaint.setColor(mPointStartColor);
  mPaint.setShader(new LinearGradient(getWidth(),getHeight(),0,0,mPointEndColor,mPointStartColor,Shader.TileMode.CLAMP));
  if (mPointSize > 0) {
    if (mPoint > mStartAngle + mPointSize / 2) {
      canvas.drawArc(mRect,mPoint - mPointSize / 2,mPointSize,false,mPaint);
    }
 else {
      canvas.drawArc(mRect,mPoint,mPointSize,false,mPaint);
    }
  }
 else {
    if (mValue == mStartValue)     canvas.drawArc(mRect,mStartAngle,DEFAULT_LONG_POINTER_SIZE,false,mPaint);
 else     canvas.drawArc(mRect,mStartAngle,mPoint - mStartAngle,false,mPaint);
  }
  if (mDividerSize > 0) {
    mPaint.setColor(mDividerColor);
    mPaint.setShader(null);
    int i=mDividerDrawFirst ? 0 : 1;
    int max=mDividerDrawLast ? mDividersCount + 1 : mDividersCount;
    for (; i < max; i++) {
      canvas.drawArc(mRect,mStartAngle + i * mDividerStepAngle,mDividerSize,false,mPaint);
    }
  }
}

Fixed version (ground truth):
@Override protected void onDraw(Canvas canvas){
  super.onDraw(canvas);
  float padding=getStrokeWidth();
  float size=getWidth() < getHeight() ? getWidth() : getHeight();
  float width=size - (2 * padding);
  float height=size - (2 * padding);
  float radius=(width < height ? width / 2 : height / 2);
  float rectLeft=(getWidth() - (2 * padding)) / 2 - radius + padding;
  float rectTop=(getHeight() - (2 * padding)) / 2 - radius + padding;
  float rectRight=(getWidth() - (2 * padding)) / 2 - radius + padding + width;
  float rectBottom=(getHeight() - (2 * padding)) / 2 - radius + padding + height;
  mRect.set(rectLeft,rectTop,rectRight,rectBottom);
  mPaint.setColor(mStrokeColor);
  mPaint.setShader(null);
  canvas.drawArc(mRect,mStartAngle,mSweepAngle,false,mPaint);
  mPaint.setColor(mPointStartColor);
  mPaint.setShader(new LinearGradient(getWidth(),getHeight(),0,0,mPointEndColor,mPointStartColor,Shader.TileMode.CLAMP));
  if (mPointSize > 0) {
    if (mPoint > mStartAngle + mPointSize / 2) {
      canvas.drawArc(mRect,mPoint - mPointSize / 2,mPointSize,false,mPaint);
    }
 else {
      canvas.drawArc(mRect,mPoint,mPointSize,false,mPaint);
    }
  }
 else {
    if (mValue == mStartValue)     canvas.drawArc(mRect,mStartAngle,DEFAULT_LONG_POINTER_SIZE,false,mPaint);
 else     canvas.drawArc(mRect,mStartAngle,mPoint - mStartAngle,false,mPaint);
  }
  if (mDividerSize > 0) {
    mPaint.setColor(mDividerColor);
    mPaint.setShader(null);
    int i=mDividerDrawFirst ? 0 : 1;
    int max=mDividerDrawLast ? mDividersCount + 1 : mDividersCount;
    for (; i < max; i++) {
      canvas.drawArc(mRect,mStartAngle + i * mDividerStepAngle,mDividerSize,false,mPaint);
    }
  }
}