Program: 61954
Project: 61954
Buggy source:
@Override public void addCharacter(List<Tag> tags,char character,String fontName){
  for (int i=0; i < tags.size(); i++) {
    Tag t=tags.get(i);
    if (t instanceof DefineFontAlignZonesTag) {
      DefineFontAlignZonesTag fa=(DefineFontAlignZonesTag)t;
      if (fa.fontID == fontId) {
        tags.remove(i);
        i--;
      }
    }
  }
  int fontStyle=getFontStyle();
  SHAPE shp=SHAPERECORD.systemFontCharacterToSHAPE(fontName,fontStyle,getDivider() * 1024,character);
  int code=(int)character;
  int pos=-1;
  boolean exists=false;
  for (int i=0; i < codeTable.size(); i++) {
    if (codeTable.get(i) >= code) {
      if (codeTable.get(i) == code) {
        exists=true;
      }
      pos=i;
      break;
    }
  }
  if (pos == -1) {
    pos=codeTable.size();
  }
  if (!exists) {
    FontTag.shiftGlyphIndices(fontId,pos,tags);
    glyphShapeTable.add(pos,shp);
    codeTable.add(pos,(int)character);
  }
 else {
    glyphShapeTable.set(pos,shp);
  }
  if (fontFlagsHasLayout) {
    Font fnt=new Font(fontName,fontStyle,getDivider() * 1024);
    if (!exists) {
      fontBoundsTable.add(pos,shp.getBounds());
      fontAdvanceTable.add(pos,(int)Math.round(fnt.createGlyphVector((new JPanel()).getFontMetrics(fnt).getFontRenderContext(),"String_Node_Str" + character).getGlyphMetrics(0).getAdvanceX()));
    }
 else {
      fontBoundsTable.set(pos,shp.getBounds());
      fontAdvanceTable.set(pos,(int)Math.round(fnt.createGlyphVector((new JPanel()).getFontMetrics(fnt).getFontRenderContext(),"String_Node_Str" + character).getGlyphMetrics(0).getAdvanceX()));
    }
  }
  if (!exists) {
    numGlyphs++;
  }
}

Fixed version (ground truth):
@Override public void addCharacter(List<Tag> tags,char character,String fontName){
  for (int i=0; i < tags.size(); i++) {
    Tag t=tags.get(i);
    if (t instanceof DefineFontAlignZonesTag) {
      DefineFontAlignZonesTag fa=(DefineFontAlignZonesTag)t;
      if (fa.fontID == fontId) {
        tags.remove(i);
        i--;
      }
    }
  }
  int fontStyle=getFontStyle();
  SHAPE shp=SHAPERECORD.systemFontCharacterToSHAPE(fontName,fontStyle,getDivider() * 1024,character);
  int code=(int)character;
  int pos=-1;
  boolean exists=false;
  for (int i=0; i < codeTable.size(); i++) {
    if (codeTable.get(i) >= code) {
      if (codeTable.get(i) == code) {
        exists=true;
      }
      pos=i;
      break;
    }
  }
  if (pos == -1) {
    pos=codeTable.size();
  }
  if (!exists) {
    FontTag.shiftGlyphIndices(fontId,pos,tags);
    glyphShapeTable.add(pos,shp);
    codeTable.add(pos,(int)character);
  }
 else {
    glyphShapeTable.set(pos,shp);
  }
  if (fontFlagsHasLayout) {
    Font fnt=new Font(fontName,fontStyle,1024);
    if (!exists) {
      fontBoundsTable.add(pos,shp.getBounds());
      fontAdvanceTable.add(pos,(int)getDivider() * Math.round(fnt.createGlyphVector((new JPanel()).getFontMetrics(fnt).getFontRenderContext(),"String_Node_Str" + character).getGlyphMetrics(0).getAdvanceX()));
    }
 else {
      fontBoundsTable.set(pos,shp.getBounds());
      fontAdvanceTable.set(pos,(int)getDivider() * Math.round(fnt.createGlyphVector((new JPanel()).getFontMetrics(fnt).getFontRenderContext(),"String_Node_Str" + character).getGlyphMetrics(0).getAdvanceX()));
    }
  }
  if (!exists) {
    numGlyphs++;
  }
}