Program: 26455
Project: 26455
Buggy source:
@Override public void feed(List<BarEntry> entries){
  float size=entries.size() * phaseX;
  int dataSetOffset=(mDataSetCount - 1);
  float barSpaceHalf=mBarSpace / 2f;
  float groupSpaceHalf=mGroupSpace / 2f;
  float barWidth=0.5f;
  for (int i=0; i < size; i++) {
    BarEntry e=entries.get(i);
    float x=e.getXIndex() + i * dataSetOffset + mDataSetIndex + mGroupSpace * i + groupSpaceHalf;
    float y=e.getVal();
    float[] vals=e.getVals();
    if (!mContainsStacks || vals == null) {
      float bottom=x - barWidth + barSpaceHalf;
      float top=x + barWidth - barSpaceHalf;
      float left, right;
      if (mInverted) {
        left=y >= 0 ? y : 0;
        right=y <= 0 ? y : 0;
      }
 else {
        right=y >= 0 ? y : 0;
        left=y <= 0 ? y : 0;
      }
      if (right > 0)       right*=phaseY;
 else       left*=phaseY;
      addBar(left,top,right,bottom);
    }
 else {
      float posY=0f;
      float negY=-e.getNegativeSum();
      float yStart=0f;
      for (int k=0; k < vals.length; k++) {
        float value=vals[k];
        if (value >= 0f) {
          y=posY;
          yStart=posY + value;
          posY=yStart;
        }
 else {
          y=negY;
          yStart=negY + Math.abs(value);
          negY+=Math.abs(value);
        }
        float bottom=x - barWidth + barSpaceHalf;
        float top=x + barWidth - barSpaceHalf;
        float left, right;
        if (mInverted) {
          left=y >= yStart ? y : yStart;
          right=y <= yStart ? y : yStart;
        }
 else {
          right=y >= yStart ? y : yStart;
          left=y <= yStart ? y : yStart;
        }
        right*=phaseY;
        left*=phaseY;
        addBar(left,top,right,bottom);
      }
    }
  }
  reset();
}

Fixed version (ground truth):
@Override public void feed(List<BarEntry> entries){
  float size=entries.size() * phaseX;
  int dataSetOffset=(mDataSetCount - 1);
  float barSpaceHalf=mBarSpace / 2f;
  float groupSpaceHalf=mGroupSpace / 2f;
  float barWidth=0.5f;
  for (int i=0; i < size; i++) {
    BarEntry e=entries.get(i);
    float x=e.getXIndex() + e.getXIndex() * dataSetOffset + mDataSetIndex + mGroupSpace * e.getXIndex() + groupSpaceHalf;
    float y=e.getVal();
    float[] vals=e.getVals();
    if (!mContainsStacks || vals == null) {
      float bottom=x - barWidth + barSpaceHalf;
      float top=x + barWidth - barSpaceHalf;
      float left, right;
      if (mInverted) {
        left=y >= 0 ? y : 0;
        right=y <= 0 ? y : 0;
      }
 else {
        right=y >= 0 ? y : 0;
        left=y <= 0 ? y : 0;
      }
      if (right > 0)       right*=phaseY;
 else       left*=phaseY;
      addBar(left,top,right,bottom);
    }
 else {
      float posY=0f;
      float negY=-e.getNegativeSum();
      float yStart=0f;
      for (int k=0; k < vals.length; k++) {
        float value=vals[k];
        if (value >= 0f) {
          y=posY;
          yStart=posY + value;
          posY=yStart;
        }
 else {
          y=negY;
          yStart=negY + Math.abs(value);
          negY+=Math.abs(value);
        }
        float bottom=x - barWidth + barSpaceHalf;
        float top=x + barWidth - barSpaceHalf;
        float left, right;
        if (mInverted) {
          left=y >= yStart ? y : yStart;
          right=y <= yStart ? y : yStart;
        }
 else {
          right=y >= yStart ? y : yStart;
          left=y <= yStart ? y : yStart;
        }
        right*=phaseY;
        left*=phaseY;
        addBar(left,top,right,bottom);
      }
    }
  }
  reset();
}