Program: 86597
Project: 86597
Buggy source:
public ShortBuffer setBuffers(String s,FloatBuffer vertex,FloatBuffer texture){
  ShortBuffer indexBuffer=AtlasGraphic.getDirectShortBuffer(s.length() * 6);
  indexBuffer.position(0);
  vertex.position(0);
  texture.position(0);
  int x=0;
  int y=0;
  int textureWidth=mAtlas.getWidth();
  int textureHeight=mAtlas.getHeight();
  for (int i=0; i < s.length(); i++) {
    String character=s.substring(i,i + 1);
    if ("String_Node_Str".equals(character)) {
      y+=-mPaint.ascent() + mPaint.descent();
      continue;
    }
 else     if ("String_Node_Str".equals(character)) {
      x+=mPaint.measureText("String_Node_Str");
    }
    SubTexture subTexture=mAtlas.getSubTexture(character);
    Rect r=subTexture.getBounds();
    vertex.put(x).put(y);
    vertex.put(x + r.width()).put(y);
    vertex.put(x).put(y + r.height());
    vertex.put(x + r.width()).put(y + r.height());
    texture.put((float)r.left / textureWidth).put((float)r.top / textureHeight);
    texture.put((float)(r.left + r.width()) / textureWidth).put((float)r.top / textureHeight);
    texture.put((float)r.left / textureWidth).put((float)(r.top + r.height()) / textureHeight);
    texture.put((float)(r.left + r.width()) / textureWidth).put((float)(r.top + r.height()) / textureHeight);
    indexBuffer.put((short)(i * 4));
    indexBuffer.put((short)((i * 4) + 1));
    indexBuffer.put((short)((i * 4) + 2));
    indexBuffer.put((short)((i * 4) + 1));
    indexBuffer.put((short)((i * 4) + 3));
    indexBuffer.put((short)((i * 4) + 2));
    x+=r.width();
  }
  indexBuffer.position(0);
  vertex.position(0);
  texture.position(0);
  return indexBuffer;
}

Fixed version (ground truth):
public ShortBuffer setBuffers(String s,FloatBuffer vertex,FloatBuffer texture){
  ShortBuffer indexBuffer=AtlasGraphic.getDirectShortBuffer(s.length() * 6);
  indexBuffer.position(0);
  vertex.position(0);
  texture.position(0);
  int x=0;
  int y=0;
  int textureWidth=mAtlas.getWidth();
  int textureHeight=mAtlas.getHeight();
  for (int i=0; i < s.length(); i++) {
    String character=s.substring(i,i + 1);
    if ("String_Node_Str".equals(character)) {
      character="String_Node_Str";
      y+=-mPaint.ascent() + mPaint.descent();
      x=(int)-mPaint.measureText(character);
    }
 else     if ("String_Node_Str".equals(character)) {
      character="String_Node_Str";
      x+=mPaint.measureText("String_Node_Str") - mPaint.measureText(character);
    }
    SubTexture subTexture=mAtlas.getSubTexture(character);
    Rect r=subTexture.getBounds();
    vertex.put(x).put(y);
    vertex.put(x + r.width()).put(y);
    vertex.put(x).put(y + r.height());
    vertex.put(x + r.width()).put(y + r.height());
    texture.put((float)r.left / textureWidth).put((float)r.top / textureHeight);
    texture.put((float)(r.left + r.width()) / textureWidth).put((float)r.top / textureHeight);
    texture.put((float)r.left / textureWidth).put((float)(r.top + r.height()) / textureHeight);
    texture.put((float)(r.left + r.width()) / textureWidth).put((float)(r.top + r.height()) / textureHeight);
    indexBuffer.put((short)(i * 4));
    indexBuffer.put((short)((i * 4) + 1));
    indexBuffer.put((short)((i * 4) + 2));
    indexBuffer.put((short)((i * 4) + 1));
    indexBuffer.put((short)((i * 4) + 3));
    indexBuffer.put((short)((i * 4) + 2));
    x+=r.width();
  }
  indexBuffer.position(0);
  vertex.position(0);
  texture.position(0);
  return indexBuffer;
}