Program: 63771
Project: 63771
Buggy source:
@Override protected void onDraw(Canvas canvas){
  super.onDraw(canvas);
  final int length=mTextArray.length;
  mPaint.setTextSize(mTextSize);
  for (int i=0; i < length; i++) {
    if ((i > mLeftCursorIndex && i < mRightCursorIndex) || (i == mLeftCursorIndex || i == mRightCursorIndex)) {
      mPaint.setColor(mTextColorSelected);
    }
 else {
      mPaint.setColor(mTextColorNormal);
    }
    final String text2draw=mTextArray[i].toString();
    final float textWidth=mTextWidthArray[i];
    float textDrawLeft=mSeekbarRect.left + i * mPartLength - textWidth / 2;
    canvas.drawText(text2draw,textDrawLeft,mPaddingRect.top + mTextSize,mPaint);
  }
  final float radius=(float)mSeekbarHeight / 2;
  mSeekbarRectSelected.left=mSeekbarRect.left + mPartLength * mLeftCursorIndex;
  mSeekbarRectSelected.right=mSeekbarRect.left + mPartLength * mRightCursorIndex;
  if (mLeftCursorIndex == 0 && mRightCursorIndex == length - 1) {
    mPaint.setColor(mSeekbarColorSelected);
    canvas.drawRoundRect(mSeekbarRect,radius,radius,mPaint);
  }
 else {
    mPaint.setColor(mSeekbarColorNormal);
    canvas.drawRoundRect(mSeekbarRect,radius,radius,mPaint);
    mPaint.setColor(mSeekbarColorSelected);
    canvas.drawRect(mSeekbarRectSelected,mPaint);
  }
  final int leftWidth=mLeftCursorBG.getIntrinsicWidth();
  final int leftHieght=mLeftCursorBG.getIntrinsicHeight();
  final int leftLeft=(int)(mSeekbarRectSelected.left - (float)leftWidth / 2);
  final int leftTop=(int)((mSeekbarRect.top + mSeekbarHeight / 2) - (leftHieght / 2));
  mLeftCursorRect.left=leftLeft;
  mLeftCursorRect.top=leftTop;
  mLeftCursorRect.right=leftLeft + leftWidth;
  mLeftCursorRect.bottom=leftTop + leftHieght;
  mLeftCursorBG.setBounds(mLeftCursorRect);
  mLeftCursorBG.draw(canvas);
  final int rightWidth=mRightCursorBG.getIntrinsicWidth();
  final int rightHeight=mRightCursorBG.getIntrinsicHeight();
  final int rightLeft=(int)(mSeekbarRectSelected.right - (float)rightWidth / 2);
  final int rightTop=(int)((mSeekbarRectSelected.top + mSeekbarHeight / 2) - (rightHeight / 2));
  mRightCursorRect.left=rightLeft;
  mRightCursorRect.top=rightTop;
  mRightCursorRect.right=rightLeft + rightWidth;
  mRightCursorRect.bottom=rightTop + rightHeight;
  mRightCursorBG.setBounds(mRightCursorRect);
  mRightCursorBG.draw(canvas);
}

Fixed version (ground truth):
@Override protected void onDraw(Canvas canvas){
  super.onDraw(canvas);
  final int length=mTextArray.length;
  mPaint.setTextSize(mTextSize);
  for (int i=0; i < length; i++) {
    if ((i > mLeftCursorIndex && i < mRightCursorIndex) || (i == mLeftCursorIndex || i == mRightCursorIndex)) {
      mPaint.setColor(mTextColorSelected);
    }
 else {
      mPaint.setColor(mTextColorNormal);
    }
    final String text2draw=mTextArray[i].toString();
    final float textWidth=mTextWidthArray[i];
    float textDrawLeft=0;
    if (i == length - 1) {
      textDrawLeft=mSeekbarRect.right + (mRightCursorBG.getIntrinsicWidth() / 2) - textWidth;
    }
 else {
      textDrawLeft=mSeekbarRect.left + i * mPartLength - textWidth / 2;
    }
    canvas.drawText(text2draw,textDrawLeft,mPaddingRect.top + mTextSize,mPaint);
  }
  final float radius=(float)mSeekbarHeight / 2;
  mSeekbarRectSelected.left=mSeekbarRect.left + mPartLength * mLeftCursorIndex;
  mSeekbarRectSelected.right=mSeekbarRect.left + mPartLength * mRightCursorIndex;
  if (mLeftCursorIndex == 0 && mRightCursorIndex == length - 1) {
    mPaint.setColor(mSeekbarColorSelected);
    canvas.drawRoundRect(mSeekbarRect,radius,radius,mPaint);
  }
 else {
    mPaint.setColor(mSeekbarColorNormal);
    canvas.drawRoundRect(mSeekbarRect,radius,radius,mPaint);
    mPaint.setColor(mSeekbarColorSelected);
    canvas.drawRect(mSeekbarRectSelected,mPaint);
  }
  final int leftWidth=mLeftCursorBG.getIntrinsicWidth();
  final int leftHieght=mLeftCursorBG.getIntrinsicHeight();
  final int leftLeft=(int)(mSeekbarRectSelected.left - (float)leftWidth / 2);
  final int leftTop=(int)((mSeekbarRect.top + mSeekbarHeight / 2) - (leftHieght / 2));
  mLeftCursorRect.left=leftLeft;
  mLeftCursorRect.top=leftTop;
  mLeftCursorRect.right=leftLeft + leftWidth;
  mLeftCursorRect.bottom=leftTop + leftHieght;
  mLeftCursorBG.setBounds(mLeftCursorRect);
  mLeftCursorBG.draw(canvas);
  final int rightWidth=mRightCursorBG.getIntrinsicWidth();
  final int rightHeight=mRightCursorBG.getIntrinsicHeight();
  final int rightLeft=(int)(mSeekbarRectSelected.right - (float)rightWidth / 2);
  final int rightTop=(int)((mSeekbarRectSelected.top + mSeekbarHeight / 2) - (rightHeight / 2));
  mRightCursorRect.left=rightLeft;
  mRightCursorRect.top=rightTop;
  mRightCursorRect.right=rightLeft + rightWidth;
  mRightCursorRect.bottom=rightTop + rightHeight;
  mRightCursorBG.setBounds(mRightCursorRect);
  mRightCursorBG.draw(canvas);
}