Program: 198883
Project: 198883
Buggy source:
private void drawPath(VGroup vGroup,VPath vPath,float stackedAlpha,Canvas canvas,int w,int h){
  final float scale=Math.min(h / mViewportHeight,w / mViewportWidth);
  mFinalPathMatrix.set(vGroup.mStackedMatrix);
  mFinalPathMatrix.postScale(scale,scale,mViewportWidth / 2f,mViewportHeight / 2f);
  mFinalPathMatrix.postTranslate(w / 2f - mViewportWidth / 2f,h / 2f - mViewportHeight / 2f);
  vPath.toPath(mPath);
  final Path path=mPath;
  if (vPath.mTrimPathStart != 0.0f || vPath.mTrimPathEnd != 1.0f) {
    float start=(vPath.mTrimPathStart + vPath.mTrimPathOffset) % 1.0f;
    float end=(vPath.mTrimPathEnd + vPath.mTrimPathOffset) % 1.0f;
    if (mPathMeasure == null) {
      mPathMeasure=new PathMeasure();
    }
    mPathMeasure.setPath(mPath,false);
    float len=mPathMeasure.getLength();
    start=start * len;
    end=end * len;
    path.reset();
    if (start > end) {
      mPathMeasure.getSegment(start,len,path,true);
      mPathMeasure.getSegment(0f,end,path,true);
    }
 else {
      mPathMeasure.getSegment(start,end,path,true);
    }
    path.rLineTo(0,0);
  }
  mRenderPath.reset();
  mRenderPath.addPath(path,mFinalPathMatrix);
  if (vPath.mClip) {
    canvas.clipPath(mRenderPath,Region.Op.REPLACE);
  }
 else {
    if (vPath.mFillColor != 0) {
      if (mFillPaint == null) {
        mFillPaint=new Paint();
        mFillPaint.setColorFilter(mColorFilter);
        mFillPaint.setStyle(Paint.Style.FILL);
        mFillPaint.setAntiAlias(true);
      }
      mFillPaint.setColor(applyAlpha(vPath.mFillColor,stackedAlpha));
      canvas.drawPath(mRenderPath,mFillPaint);
    }
    if (vPath.mStrokeColor != 0) {
      if (mStrokePaint == null) {
        mStrokePaint=new Paint();
        mStrokePaint.setColorFilter(mColorFilter);
        mStrokePaint.setStyle(Paint.Style.STROKE);
        mStrokePaint.setAntiAlias(true);
      }
      final Paint strokePaint=mStrokePaint;
      if (vPath.mStrokeLineJoin != null) {
        strokePaint.setStrokeJoin(vPath.mStrokeLineJoin);
      }
      if (vPath.mStrokeLineCap != null) {
        strokePaint.setStrokeCap(vPath.mStrokeLineCap);
      }
      strokePaint.setStrokeMiter(vPath.mStrokeMiterlimit * scale);
      strokePaint.setColor(applyAlpha(vPath.mStrokeColor,stackedAlpha));
      strokePaint.setStrokeWidth(vPath.mStrokeWidth * scale);
      canvas.drawPath(mRenderPath,strokePaint);
    }
  }
}

Fixed version (ground truth):
private void drawPath(VGroup vGroup,VPath vPath,float stackedAlpha,Canvas canvas,int w,int h){
  final float scaleX=w / mViewportWidth;
  final float scaleY=h / mViewportHeight;
  final float minScale=Math.min(scaleX,scaleY);
  mFinalPathMatrix.set(vGroup.mStackedMatrix);
  mFinalPathMatrix.postScale(scaleX,scaleY,mViewportWidth / 2f,mViewportHeight / 2f);
  mFinalPathMatrix.postTranslate(w / 2f - mViewportWidth / 2f,h / 2f - mViewportHeight / 2f);
  vPath.toPath(mPath);
  final Path path=mPath;
  if (vPath.mTrimPathStart != 0.0f || vPath.mTrimPathEnd != 1.0f) {
    float start=(vPath.mTrimPathStart + vPath.mTrimPathOffset) % 1.0f;
    float end=(vPath.mTrimPathEnd + vPath.mTrimPathOffset) % 1.0f;
    if (mPathMeasure == null) {
      mPathMeasure=new PathMeasure();
    }
    mPathMeasure.setPath(mPath,false);
    float len=mPathMeasure.getLength();
    start=start * len;
    end=end * len;
    path.reset();
    if (start > end) {
      mPathMeasure.getSegment(start,len,path,true);
      mPathMeasure.getSegment(0f,end,path,true);
    }
 else {
      mPathMeasure.getSegment(start,end,path,true);
    }
    path.rLineTo(0,0);
  }
  mRenderPath.reset();
  mRenderPath.addPath(path,mFinalPathMatrix);
  if (vPath.mClip) {
    canvas.clipPath(mRenderPath,Region.Op.REPLACE);
  }
 else {
    if (vPath.mFillColor != 0) {
      if (mFillPaint == null) {
        mFillPaint=new Paint();
        mFillPaint.setColorFilter(mColorFilter);
        mFillPaint.setStyle(Paint.Style.FILL);
        mFillPaint.setAntiAlias(true);
      }
      mFillPaint.setColor(applyAlpha(vPath.mFillColor,stackedAlpha));
      canvas.drawPath(mRenderPath,mFillPaint);
    }
    if (vPath.mStrokeColor != 0) {
      if (mStrokePaint == null) {
        mStrokePaint=new Paint();
        mStrokePaint.setColorFilter(mColorFilter);
        mStrokePaint.setStyle(Paint.Style.STROKE);
        mStrokePaint.setAntiAlias(true);
      }
      final Paint strokePaint=mStrokePaint;
      if (vPath.mStrokeLineJoin != null) {
        strokePaint.setStrokeJoin(vPath.mStrokeLineJoin);
      }
      if (vPath.mStrokeLineCap != null) {
        strokePaint.setStrokeCap(vPath.mStrokeLineCap);
      }
      strokePaint.setStrokeMiter(vPath.mStrokeMiterlimit * minScale);
      strokePaint.setColor(applyAlpha(vPath.mStrokeColor,stackedAlpha));
      strokePaint.setStrokeWidth(vPath.mStrokeWidth * minScale);
      canvas.drawPath(mRenderPath,strokePaint);
    }
  }
}