Program: 18192
Project: 18192
Buggy source:
protected void drawCircles(Canvas c){
  mRenderPaint.setStyle(Paint.Style.FILL);
  float phaseY=mAnimator.getPhaseY();
  float[] circlesBuffer=mCirclesBuffer;
  circlesBuffer[0]=0;
  circlesBuffer[1]=0;
  List<ILineDataSet> dataSets=mChart.getLineData().getDataSets();
  final int dataSetCount=dataSets.size();
  for (int i=0; i < dataSetCount; i++) {
    ILineDataSet dataSet=dataSets.get(i);
    DataSetImageCache imageCache;
    if (mImageCaches.containsKey(dataSet)) {
      imageCache=mImageCaches.get(dataSet);
    }
 else {
      imageCache=new DataSetImageCache();
      mImageCaches.put(dataSet,imageCache);
    }
    imageCache.ensureCircleCache(dataSet.getCircleColorCount());
    if (!dataSet.isVisible() || !dataSet.isDrawCirclesEnabled() || dataSet.getEntryCount() == 0)     continue;
    mCirclePaintInner.setColor(dataSet.getCircleHoleColor());
    Transformer trans=mChart.getTransformer(dataSet.getAxisDependency());
    if (mXBoundsBuffer == null) {
      mXBoundsBuffer=getXBounds(mChart,dataSet);
    }
 else {
      mXBoundsBuffer.set(mChart,dataSet);
    }
    XBounds bounds=mXBoundsBuffer;
    float circleRadius=dataSet.getCircleRadius();
    float circleHoleRadius=dataSet.getCircleHoleRadius();
    boolean drawCircleHole=dataSet.isDrawCircleHoleEnabled() && circleHoleRadius < circleRadius && circleHoleRadius > 0.f;
    boolean drawTransparentCircleHole=drawCircleHole && dataSet.getCircleHoleColor() == ColorTemplate.COLOR_NONE;
    int boundsRangeCount=bounds.range + bounds.min;
    for (int j=bounds.min; j <= boundsRangeCount; j++) {
      Entry e=dataSet.getEntryForIndex(j);
      if (e == null)       break;
      circlesBuffer[0]=e.getX();
      circlesBuffer[1]=e.getY() * phaseY;
      trans.pointValuesToPixel(circlesBuffer);
      if (!mViewPortHandler.isInBoundsRight(circlesBuffer[0]))       break;
      if (!mViewPortHandler.isInBoundsLeft(circlesBuffer[0]) || !mViewPortHandler.isInBoundsY(circlesBuffer[1]))       continue;
      final int circleColor=dataSet.getCircleColor(j);
      mRenderPaint.setColor(circleColor);
      Bitmap circleBitmap=null;
      final int dataSetColorCount=imageCache.circleColors.length;
      int colorIndex;
      for (colorIndex=0; colorIndex < dataSetColorCount; colorIndex++) {
        int tempColor=imageCache.circleColors[colorIndex];
        Bitmap tempBitmap=imageCache.circleBitmaps[colorIndex];
        if (tempColor == circleColor) {
          circleBitmap=tempBitmap;
          break;
        }
 else         if (tempBitmap == null) {
          break;
        }
      }
      if (circleBitmap == null) {
        Bitmap.Config conf=Bitmap.Config.ARGB_8888;
        circleBitmap=Bitmap.createBitmap((int)circleRadius * 2,(int)circleRadius * 2,conf);
        Canvas canvas=new Canvas(circleBitmap);
        imageCache.circleBitmaps[colorIndex]=circleBitmap;
        imageCache.circleColors[colorIndex]=circleColor;
        if (drawTransparentCircleHole) {
          mCirclePathBuffer.reset();
          mCirclePathBuffer.addCircle(circleRadius,circleRadius,circleRadius,Path.Direction.CW);
          mCirclePathBuffer.addCircle(circleHoleRadius,circleHoleRadius,circleHoleRadius,Path.Direction.CCW);
          canvas.drawPath(mCirclePathBuffer,mRenderPaint);
        }
 else {
          canvas.drawCircle(circleRadius,circleRadius,circleRadius,mRenderPaint);
          if (drawCircleHole) {
            canvas.drawCircle(circleRadius,circleRadius,circleHoleRadius,mCirclePaintInner);
          }
        }
      }
      if (circleBitmap != null) {
        c.drawBitmap(circleBitmap,circlesBuffer[0] - circleRadius,circlesBuffer[1] - circleRadius,mRenderPaint);
      }
    }
  }
}

Fixed version (ground truth):
protected void drawCircles(Canvas c){
  mRenderPaint.setStyle(Paint.Style.FILL);
  float phaseY=mAnimator.getPhaseY();
  float[] circlesBuffer=mCirclesBuffer;
  circlesBuffer[0]=0;
  circlesBuffer[1]=0;
  List<ILineDataSet> dataSets=mChart.getLineData().getDataSets();
  final int dataSetCount=dataSets.size();
  for (int i=0; i < dataSetCount; i++) {
    ILineDataSet dataSet=dataSets.get(i);
    DataSetImageCache imageCache;
    if (mImageCaches.containsKey(dataSet)) {
      imageCache=mImageCaches.get(dataSet);
    }
 else {
      imageCache=new DataSetImageCache();
      mImageCaches.put(dataSet,imageCache);
    }
    imageCache.ensureCircleCache(dataSet.getCircleColorCount());
    if (!dataSet.isVisible() || !dataSet.isDrawCirclesEnabled() || dataSet.getEntryCount() == 0)     continue;
    mCirclePaintInner.setColor(dataSet.getCircleHoleColor());
    Transformer trans=mChart.getTransformer(dataSet.getAxisDependency());
    if (mXBoundsBuffer == null) {
      mXBoundsBuffer=getXBounds(mChart,dataSet);
    }
 else {
      mXBoundsBuffer.set(mChart,dataSet);
    }
    XBounds bounds=mXBoundsBuffer;
    float circleRadius=dataSet.getCircleRadius();
    float circleHoleRadius=dataSet.getCircleHoleRadius();
    boolean drawCircleHole=dataSet.isDrawCircleHoleEnabled() && circleHoleRadius < circleRadius && circleHoleRadius > 0.f;
    boolean drawTransparentCircleHole=drawCircleHole && dataSet.getCircleHoleColor() == ColorTemplate.COLOR_NONE;
    int boundsRangeCount=bounds.range + bounds.min;
    for (int j=bounds.min; j <= boundsRangeCount; j++) {
      Entry e=dataSet.getEntryForIndex(j);
      if (e == null)       break;
      circlesBuffer[0]=e.getX();
      circlesBuffer[1]=e.getY() * phaseY;
      trans.pointValuesToPixel(circlesBuffer);
      if (!mViewPortHandler.isInBoundsRight(circlesBuffer[0]))       break;
      if (!mViewPortHandler.isInBoundsLeft(circlesBuffer[0]) || !mViewPortHandler.isInBoundsY(circlesBuffer[1]))       continue;
      final int circleColor=dataSet.getCircleColor(j);
      mRenderPaint.setColor(circleColor);
      Bitmap circleBitmap=null;
      final int dataSetColorCount=imageCache.circleColors.length;
      int colorIndex;
      for (colorIndex=0; colorIndex < dataSetColorCount; colorIndex++) {
        int tempColor=imageCache.circleColors[colorIndex];
        Bitmap tempBitmap=imageCache.circleBitmaps[colorIndex];
        if (tempColor == circleColor) {
          circleBitmap=tempBitmap;
          break;
        }
 else         if (tempBitmap == null) {
          break;
        }
      }
      if (circleBitmap == null) {
        Bitmap.Config conf=Bitmap.Config.ARGB_8888;
        circleBitmap=Bitmap.createBitmap((int)(circleRadius * 2.1),(int)(circleRadius * 2.1),conf);
        Canvas canvas=new Canvas(circleBitmap);
        imageCache.circleBitmaps[colorIndex]=circleBitmap;
        imageCache.circleColors[colorIndex]=circleColor;
        if (drawTransparentCircleHole) {
          mCirclePathBuffer.reset();
          mCirclePathBuffer.addCircle(circleRadius,circleRadius,circleRadius,Path.Direction.CW);
          mCirclePathBuffer.addCircle(circleRadius,circleRadius,circleHoleRadius,Path.Direction.CCW);
          canvas.drawPath(mCirclePathBuffer,mRenderPaint);
        }
 else {
          canvas.drawCircle(circleRadius,circleRadius,circleRadius,mRenderPaint);
          if (drawCircleHole) {
            canvas.drawCircle(circleRadius,circleRadius,circleHoleRadius,mCirclePaintInner);
          }
        }
      }
      if (circleBitmap != null) {
        c.drawBitmap(circleBitmap,circlesBuffer[0] - circleRadius,circlesBuffer[1] - circleRadius,mRenderPaint);
      }
    }
  }
}