Program: 18620
Project: 18620
Buggy source:
@Override public void drawHighlighted(Canvas c,Highlight[] indices){
  int setCount=mChart.getBarData().getDataSetCount();
  for (int i=0; i < indices.length; i++) {
    Highlight h=indices[i];
    int index=h.getXIndex();
    int dataSetIndex=h.getDataSetIndex();
    BarDataSet set=mChart.getBarData().getDataSetByIndex(dataSetIndex);
    if (set == null)     continue;
    Transformer trans=mChart.getTransformer(set.getAxisDependency());
    mHighlightPaint.setColor(set.getHighLightColor());
    mHighlightPaint.setAlpha(set.getHighLightAlpha());
    if (index < mChart.getBarData().getYValCount() && index >= 0 && index < (mChart.getXChartMax() * mAnimator.getPhaseX()) / setCount) {
      BarEntry e=mChart.getBarData().getDataSetByIndex(dataSetIndex).getEntryForXIndex(index);
      if (e == null)       continue;
      float groupspace=mChart.getBarData().getGroupSpace();
      float x=index * setCount + dataSetIndex + groupspace / 2f + groupspace * index;
      float y=h.getStackIndex() < 0 ? e.getVal() : e.getVals()[h.getStackIndex()] + e.getBelowSum(h.getStackIndex());
      prepareBar(x,y,set.getBarSpace(),trans);
      c.drawRect(mBarRect,mHighlightPaint);
      if (mChart.isDrawHighlightArrowEnabled()) {
        mHighlightPaint.setAlpha(255);
        float offsetY=mAnimator.getPhaseY() * 0.07f;
        Path arrow=new Path();
        arrow.moveTo(x + 0.5f,y + offsetY * 0.3f);
        arrow.lineTo(x + 0.2f,y + offsetY);
        arrow.lineTo(x + 0.8f,y + offsetY);
        trans.pathValueToPixel(arrow);
        c.drawPath(arrow,mHighlightPaint);
      }
    }
  }
}

Fixed version (ground truth):
@Override public void drawHighlighted(Canvas c,Highlight[] indices){
  int setCount=mChart.getBarData().getDataSetCount();
  for (int i=0; i < indices.length; i++) {
    Highlight h=indices[i];
    int index=h.getXIndex();
    int dataSetIndex=h.getDataSetIndex();
    BarDataSet set=mChart.getBarData().getDataSetByIndex(dataSetIndex);
    if (set == null)     continue;
    Transformer trans=mChart.getTransformer(set.getAxisDependency());
    mHighlightPaint.setColor(set.getHighLightColor());
    mHighlightPaint.setAlpha(set.getHighLightAlpha());
    if (index < mChart.getBarData().getYValCount() && index >= 0 && index < (mChart.getXChartMax() * mAnimator.getPhaseX()) / setCount) {
      BarEntry e=mChart.getBarData().getDataSetByIndex(dataSetIndex).getEntryForXIndex(index);
      if (e == null)       continue;
      float groupspace=mChart.getBarData().getGroupSpace();
      boolean isStack=h.getStackIndex() < 0 ? false : true;
      float x=index * setCount + dataSetIndex + groupspace / 2f + groupspace * index;
      float y=isStack ? e.getVals()[h.getStackIndex()] + e.getBelowSum(h.getStackIndex()) : e.getVal();
      float from=isStack ? e.getBelowSum(h.getStackIndex()) : 0f;
      prepareBarHighlight(x,y,set.getBarSpace(),from,trans);
      c.drawRect(mBarRect,mHighlightPaint);
      if (mChart.isDrawHighlightArrowEnabled()) {
        mHighlightPaint.setAlpha(255);
        float offsetY=mAnimator.getPhaseY() * 0.07f;
        Path arrow=new Path();
        arrow.moveTo(x + 0.5f,y + offsetY * 0.3f);
        arrow.lineTo(x + 0.2f,y + offsetY);
        arrow.lineTo(x + 0.8f,y + offsetY);
        trans.pathValueToPixel(arrow);
        c.drawPath(arrow,mHighlightPaint);
      }
    }
  }
}