Program: 59051
Project: 59051
Buggy source:
private void renderHeatMap(final GL gl){
  renderStyle.updateFieldSizes();
  float fXPosition=0;
  float fYPosition=0;
  Vec2f vecFieldWidthAndHeight=null;
  int iCount=0;
  for (  Integer iContentIndex : set.getVA(iContentVAID)) {
    vecFieldWidthAndHeight=renderStyle.getFieldWidthAndHeight(iCount++);
    fYPosition=0;
    for (    Integer iStorageIndex : set.getVA(iStorageVAID)) {
      renderElement(gl,iStorageIndex,iContentIndex,fXPosition,fYPosition,vecFieldWidthAndHeight);
      fYPosition+=vecFieldWidthAndHeight.y();
    }
    float fFontScaling=0;
    float fColumnDegrees=0;
    float fLineDegrees=0;
    if (bRenderStorageHorizontally) {
      fColumnDegrees=0;
      fLineDegrees=25;
    }
 else {
      fColumnDegrees=60;
      fLineDegrees=90;
    }
    if (vecFieldWidthAndHeight.x() > 0.08f) {
      boolean bRenderShortName=false;
      if (vecFieldWidthAndHeight.x() < 0.2f) {
        fFontScaling=renderStyle.getSmallFontScalingFactor();
      }
 else {
        bRenderShortName=true;
        fFontScaling=renderStyle.getHeadingFontScalingFactor();
      }
      if (detailLevel == EDetailLevel.HIGH) {
        String sContent=getRefSeqFromStorageIndex(iContentIndex);
        renderCaption(gl,sContent,fXPosition + vecFieldWidthAndHeight.x() / 6 * 2.5f,fYPosition + 0.1f,fLineDegrees,fFontScaling);
        if (bRenderShortName) {
          sContent=getShortNameFromDavid(iContentIndex);
          renderCaption(gl,sContent,fXPosition + vecFieldWidthAndHeight.x() / 6 * 4.5f,fYPosition + 0.1f,fLineDegrees,fFontScaling);
        }
      }
    }
    renderStyle.setXDistanceAt(set.getVA(iContentVAID).indexOf(iContentIndex),fXPosition);
    fXPosition+=vecFieldWidthAndHeight.x();
    if (detailLevel == EDetailLevel.HIGH) {
      if (iCount == set.getVA(iContentVAID).size()) {
        fYPosition=0;
        for (        Integer iStorageIndex : set.getVA(iStorageVAID)) {
          renderCaption(gl,set.get(iStorageIndex).getLabel(),fXPosition + 0.1f,fYPosition + vecFieldWidthAndHeight.y() / 2,fColumnDegrees,renderStyle.getSmallFontScalingFactor());
          fYPosition+=vecFieldWidthAndHeight.y();
        }
      }
    }
  }
}

Fixed version (ground truth):
private void renderHeatMap(final GL gl){
  renderStyle.updateFieldSizes();
  float fXPosition=0;
  float fYPosition=0;
  Vec2f vecFieldWidthAndHeight=null;
  int iCount=0;
  for (  Integer iContentIndex : set.getVA(iContentVAID)) {
    vecFieldWidthAndHeight=renderStyle.getFieldWidthAndHeight(iCount++);
    fYPosition=0;
    for (    Integer iStorageIndex : set.getVA(iStorageVAID)) {
      renderElement(gl,iStorageIndex,iContentIndex,fXPosition,fYPosition,vecFieldWidthAndHeight);
      fYPosition+=vecFieldWidthAndHeight.y();
    }
    float fFontScaling=0;
    float fColumnDegrees=0;
    float fLineDegrees=0;
    if (bRenderStorageHorizontally) {
      fColumnDegrees=0;
      fLineDegrees=25;
    }
 else {
      fColumnDegrees=60;
      fLineDegrees=90;
    }
    if (vecFieldWidthAndHeight.x() > 0.08f) {
      boolean bRenderShortName=false;
      if (vecFieldWidthAndHeight.x() < 0.2f) {
        fFontScaling=renderStyle.getSmallFontScalingFactor();
      }
 else {
        bRenderShortName=true;
        fFontScaling=renderStyle.getHeadingFontScalingFactor();
      }
      if (detailLevel == EDetailLevel.HIGH) {
        String sContent=getRefSeqFromStorageIndex(iContentIndex);
        if (sContent == null)         sContent="String_Node_Str";
        renderCaption(gl,sContent,fXPosition + vecFieldWidthAndHeight.x() / 6 * 2.5f,fYPosition + 0.1f,fLineDegrees,fFontScaling);
        if (bRenderShortName) {
          sContent=getShortNameFromDavid(iContentIndex);
          if (sContent == null)           sContent="String_Node_Str";
          renderCaption(gl,sContent,fXPosition + vecFieldWidthAndHeight.x() / 6 * 4.5f,fYPosition + 0.1f,fLineDegrees,fFontScaling);
        }
      }
    }
    renderStyle.setXDistanceAt(set.getVA(iContentVAID).indexOf(iContentIndex),fXPosition);
    fXPosition+=vecFieldWidthAndHeight.x();
    if (detailLevel == EDetailLevel.HIGH) {
      if (iCount == set.getVA(iContentVAID).size()) {
        fYPosition=0;
        for (        Integer iStorageIndex : set.getVA(iStorageVAID)) {
          renderCaption(gl,set.get(iStorageIndex).getLabel(),fXPosition + 0.1f,fYPosition + vecFieldWidthAndHeight.y() / 2,fColumnDegrees,renderStyle.getSmallFontScalingFactor());
          fYPosition+=vecFieldWidthAndHeight.y();
        }
      }
    }
  }
}