Program: 18379
Project: 18379
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 left=x - barWidth + barSpaceHalf;
      float right=x + barWidth - barSpaceHalf;
      float bottom, top;
      if (mInverted) {
        bottom=y >= 0 ? y : 0;
        top=y <= 0 ? y : 0;
      }
 else {
        top=y >= 0 ? y : 0;
        bottom=y <= 0 ? y : 0;
      }
      if (top > 0)       top*=phaseY;
 else       bottom*=phaseY;
      addBar(left,top,right,bottom);
    }
 else {
      float allPos=e.getPositiveSum();
      float allNeg=e.getNegativeSum();
      for (int k=0; k < vals.length; k++) {
        float value=vals[k];
        if (value >= 0f) {
          allPos-=value;
          y=value + allPos;
        }
 else {
          allNeg-=Math.abs(value);
          y=value + allNeg;
        }
        float left=x - barWidth + barSpaceHalf;
        float right=x + barWidth - barSpaceHalf;
        float bottom, top;
        if (mInverted) {
          bottom=y >= 0 ? y : 0;
          top=y <= 0 ? y : 0;
        }
 else {
          top=y >= 0 ? y : 0;
          bottom=y <= 0 ? y : 0;
        }
        if (top > 0)         top*=phaseY;
 else         bottom*=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() + i * dataSetOffset + mDataSetIndex + mGroupSpace * i + groupSpaceHalf;
    float y=e.getVal();
    float[] vals=e.getVals();
    if (!mContainsStacks || vals == null) {
      float left=x - barWidth + barSpaceHalf;
      float right=x + barWidth - barSpaceHalf;
      float bottom, top;
      if (mInverted) {
        bottom=y >= 0 ? y : 0;
        top=y <= 0 ? y : 0;
      }
 else {
        top=y >= 0 ? y : 0;
        bottom=y <= 0 ? y : 0;
      }
      if (top > 0)       top*=phaseY;
 else       bottom*=phaseY;
      addBar(left,top,right,bottom);
    }
 else {
      float posY=0f;
      float negY=0f;
      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 + value;
          negY=yStart;
        }
        float left=x - barWidth + barSpaceHalf;
        float right=x + barWidth - barSpaceHalf;
        float bottom, top;
        if (mInverted) {
          bottom=y >= yStart ? y : yStart;
          top=y <= yStart ? y : yStart;
        }
 else {
          top=y >= yStart ? y : yStart;
          bottom=y <= yStart ? y : yStart;
        }
        top*=phaseY;
        bottom*=phaseY;
        addBar(left,top,right,bottom);
      }
    }
  }
  reset();
}