Program: 26493
Project: 26493
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 || !set.isHighlightEnabled())     continue;
    float barspaceHalf=set.getBarSpace() / 2f;
    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=set.getEntryForXIndex(index);
      if (e == null || e.getXIndex() != index)       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,barspaceHalf,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);
      }
    }
  }
}

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 || !set.isHighlightEnabled())     continue;
    float barspaceHalf=set.getBarSpace() / 2f;
    Transformer trans=mChart.getTransformer(set.getAxisDependency());
    mHighlightPaint.setColor(set.getHighLightColor());
    mHighlightPaint.setAlpha(set.getHighLightAlpha());
    if (index >= 0 && index < (mChart.getXChartMax() * mAnimator.getPhaseX()) / setCount) {
      BarEntry e=set.getEntryForXIndex(index);
      if (e == null || e.getXIndex() != index)       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,barspaceHalf,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);
      }
    }
  }
}