Program: 58452
Project: 58452
Buggy source:
/** 
 * Render the coordinate system of the Scatterplot
 * @param gl the gl context
 */
private void renderCoordinateSystem(GL gl){
  textRenderer.setColor(0,0,0,1);
  float fXPosition=XYAXISDISTANCE;
  float fYPosition=XYAXISDISTANCE;
  float fMarkerSpacingY=renderStyle.getAxisHeight() / (NUMBER_AXIS_MARKERS + 1);
  float fMarkerSpacingX=renderStyle.getAxisWidth() / (NUMBER_AXIS_MARKERS + 1);
  for (int iInnerCount=1; iInnerCount <= NUMBER_AXIS_MARKERS + 1; iInnerCount++) {
    float fCurrentHeight=fMarkerSpacingY * iInnerCount;
    float fCurrentWidth=fMarkerSpacingX * iInnerCount;
    if (set.isSetHomogeneous()) {
      float fNumber=(float)set.getRawForNormalized(fCurrentHeight / renderStyle.getAxisHeight());
      Rectangle2D bounds=textRenderer.getScaledBounds(gl,Formatter.formatNumber(fNumber),renderStyle.getSmallFontScalingFactor(),ScatterPlotRenderStyle.MIN_NUMBER_TEXT_SIZE);
      float fWidth=(float)bounds.getWidth();
      float fHeight=(float)bounds.getHeight();
      float fHeightHalf=fHeight / 2.0f;
      float fWidthHalf=fWidth / 2.0f;
      float y=fCurrentHeight + XYAXISDISTANCE;
      y=transformOnYZoom(y,renderStyle.getAxisHeight(),XYAXISDISTANCE) - fHeightHalf;
      renderNumber(gl,Formatter.formatNumber(fNumber),fXPosition - fWidth - AXIS_MARKER_WIDTH,y);
      gl.glPushAttrib(GL.GL_CURRENT_BIT | GL.GL_LINE_BIT);
      float fRoationAngle=-45;
      float x=fCurrentWidth + XYAXISDISTANCE;
      x=transformOnXZoom(x,renderStyle.getAxisWidth(),XYAXISDISTANCE) - fWidthHalf;
      y=fYPosition + AXIS_MARKER_WIDTH - fHeight;
      gl.glTranslatef(x,y,0);
      gl.glRotatef(fRoationAngle,0,0,1);
      renderNumber(gl,Formatter.formatNumber(fNumber),0,0);
      gl.glRotatef(-fRoationAngle,0,0,1);
      gl.glTranslatef(-x,-y,0);
      gl.glPopAttrib();
    }
    gl.glColor4fv(X_AXIS_COLOR,0);
    float tmpx=fCurrentWidth + XYAXISDISTANCE;
    tmpx=transformOnXZoom(tmpx,renderStyle.getAxisWidth(),XYAXISDISTANCE);
    gl.glBegin(GL.GL_LINES);
    gl.glVertex3f(tmpx,fYPosition - AXIS_MARKER_WIDTH,AXIS_Z);
    gl.glVertex3f(tmpx,fYPosition + AXIS_MARKER_WIDTH,AXIS_Z);
    gl.glEnd();
    gl.glColor4fv(Y_AXIS_COLOR,0);
    float tmpy=fCurrentHeight + XYAXISDISTANCE;
    tmpy=transformOnYZoom(tmpy,renderStyle.getAxisHeight(),XYAXISDISTANCE);
    gl.glBegin(GL.GL_LINES);
    gl.glVertex3f(fXPosition - AXIS_MARKER_WIDTH,tmpy,AXIS_Z);
    gl.glVertex3f(fXPosition + AXIS_MARKER_WIDTH,tmpy,AXIS_Z);
    gl.glEnd();
  }
  gl.glColor4fv(X_AXIS_COLOR,0);
  gl.glLineWidth(X_AXIS_LINE_WIDTH);
  gl.glBegin(GL.GL_LINES);
  gl.glVertex3f(XYAXISDISTANCE,XYAXISDISTANCE,0.0f);
  gl.glVertex3f((renderStyle.getRenderWidth() - XYAXISDISTANCE),XYAXISDISTANCE,0.0f);
  gl.glEnd();
  gl.glColor4fv(Y_AXIS_COLOR,0);
  gl.glLineWidth(Y_AXIS_LINE_WIDTH);
  gl.glBegin(GL.GL_LINES);
  gl.glVertex3f(XYAXISDISTANCE,XYAXISDISTANCE,AXIS_Z);
  gl.glVertex3f(XYAXISDISTANCE,renderStyle.getRenderHeight() - XYAXISDISTANCE,AXIS_Z);
  gl.glEnd();
  gl.glTranslatef(renderStyle.getLAbelWidth(bRender2Axis),renderStyle.getAxisHeight() + 1.3f * XYAXISDISTANCE,0);
  gl.glRotatef(XLABELROTATIONNAGLE,0,0,1);
  textRenderer.begin3DRendering();
  float fScaling=renderStyle.getSmallFontScalingFactor();
  if (isRenderedRemote())   fScaling*=1.5f;
  String sAxisLabel="String_Node_Str" + set.get(storageVA.get(iSelectedAxisIndexX)).getLabel();
  if (bRender2Axis)   sAxisLabel+="String_Node_Str" + set.get(storageVA.get(iSelectedAxisIndexX2)).getLabel();
  textRenderer.draw3D(gl,sAxisLabel,0,0,0,fScaling,ScatterPlotRenderStyle.MIN_AXIS_LABEL_TEXT_SIZE);
  textRenderer.end3DRendering();
  gl.glRotatef(-XLABELROTATIONNAGLE,0,0,1);
  gl.glTranslatef(-renderStyle.getLAbelWidth(bRender2Axis),-renderStyle.getAxisHeight() - 1.3f * XYAXISDISTANCE,0);
  gl.glTranslatef(renderStyle.getAxisWidth() + 1.7f * XYAXISDISTANCE,renderStyle.getLabelHeight(bRender2Axis),0);
  gl.glRotatef(YLABELROTATIONNAGLE,0,0,1);
  textRenderer.begin3DRendering();
  fScaling=renderStyle.getSmallFontScalingFactor();
  if (isRenderedRemote())   fScaling*=1.5f;
  sAxisLabel="String_Node_Str" + set.get(storageVA.get(iSelectedAxisIndexY)).getLabel();
  if (bRender2Axis)   sAxisLabel+="String_Node_Str" + set.get(storageVA.get(iSelectedAxisIndexY2)).getLabel();
  textRenderer.draw3D(gl,sAxisLabel,0,0,0,fScaling,ScatterPlotRenderStyle.MIN_AXIS_LABEL_TEXT_SIZE);
  textRenderer.end3DRendering();
  gl.glRotatef(-YLABELROTATIONNAGLE,0,0,1);
  gl.glTranslatef(-renderStyle.getAxisWidth() - 1.7f * XYAXISDISTANCE,-renderStyle.getLabelHeight(bRender2Axis),0);
}

Fixed version (ground truth):
/** 
 * Render the coordinate system of the Scatterplot
 * @param gl the gl context
 */
private void renderCoordinateSystem(GL gl){
  textRenderer.dispose();
  textRenderer=new CaleydoTextRenderer(new Font("String_Node_Str",Font.PLAIN,24),false);
  textRenderer.setColor(0,0,0,1);
  float fXPosition=XYAXISDISTANCE;
  float fYPosition=XYAXISDISTANCE;
  float fMarkerSpacingY=renderStyle.getAxisHeight() / (NUMBER_AXIS_MARKERS + 1);
  float fMarkerSpacingX=renderStyle.getAxisWidth() / (NUMBER_AXIS_MARKERS + 1);
  for (int iInnerCount=1; iInnerCount <= NUMBER_AXIS_MARKERS + 1; iInnerCount++) {
    float fCurrentHeight=fMarkerSpacingY * iInnerCount;
    float fCurrentWidth=fMarkerSpacingX * iInnerCount;
    if (set.isSetHomogeneous()) {
      float fNumber=(float)set.getRawForNormalized(fCurrentHeight / renderStyle.getAxisHeight());
      Rectangle2D bounds=textRenderer.getScaledBounds(gl,Formatter.formatNumber(fNumber),renderStyle.getSmallFontScalingFactor(),ScatterPlotRenderStyle.MIN_NUMBER_TEXT_SIZE);
      float fWidth=(float)bounds.getWidth();
      float fHeight=(float)bounds.getHeight();
      float fHeightHalf=fHeight / 2.0f;
      float fWidthHalf=fWidth / 2.0f;
      float y=fCurrentHeight + XYAXISDISTANCE;
      y=transformOnYZoom(y,renderStyle.getAxisHeight(),XYAXISDISTANCE) - fHeightHalf;
      renderNumber(gl,Formatter.formatNumber(fNumber),fXPosition - fWidth - AXIS_MARKER_WIDTH,y);
      gl.glPushAttrib(GL.GL_CURRENT_BIT | GL.GL_LINE_BIT);
      float fRoationAngle=-45;
      float x=fCurrentWidth + XYAXISDISTANCE;
      x=transformOnXZoom(x,renderStyle.getAxisWidth(),XYAXISDISTANCE) - fWidthHalf;
      y=fYPosition + AXIS_MARKER_WIDTH - fHeight;
      gl.glTranslatef(x,y,0);
      gl.glRotatef(fRoationAngle,0,0,1);
      renderNumber(gl,Formatter.formatNumber(fNumber),0,0);
      gl.glRotatef(-fRoationAngle,0,0,1);
      gl.glTranslatef(-x,-y,0);
      gl.glPopAttrib();
    }
    gl.glColor4fv(X_AXIS_COLOR,0);
    float tmpx=fCurrentWidth + XYAXISDISTANCE;
    tmpx=transformOnXZoom(tmpx,renderStyle.getAxisWidth(),XYAXISDISTANCE);
    gl.glBegin(GL.GL_LINES);
    gl.glVertex3f(tmpx,fYPosition - AXIS_MARKER_WIDTH,AXIS_Z);
    gl.glVertex3f(tmpx,fYPosition + AXIS_MARKER_WIDTH,AXIS_Z);
    gl.glEnd();
    gl.glColor4fv(Y_AXIS_COLOR,0);
    float tmpy=fCurrentHeight + XYAXISDISTANCE;
    tmpy=transformOnYZoom(tmpy,renderStyle.getAxisHeight(),XYAXISDISTANCE);
    gl.glBegin(GL.GL_LINES);
    gl.glVertex3f(fXPosition - AXIS_MARKER_WIDTH,tmpy,AXIS_Z);
    gl.glVertex3f(fXPosition + AXIS_MARKER_WIDTH,tmpy,AXIS_Z);
    gl.glEnd();
  }
  gl.glColor4fv(X_AXIS_COLOR,0);
  gl.glLineWidth(X_AXIS_LINE_WIDTH);
  gl.glBegin(GL.GL_LINES);
  gl.glVertex3f(XYAXISDISTANCE,XYAXISDISTANCE,0.0f);
  gl.glVertex3f((renderStyle.getRenderWidth() - XYAXISDISTANCE),XYAXISDISTANCE,0.0f);
  gl.glEnd();
  gl.glColor4fv(Y_AXIS_COLOR,0);
  gl.glLineWidth(Y_AXIS_LINE_WIDTH);
  gl.glBegin(GL.GL_LINES);
  gl.glVertex3f(XYAXISDISTANCE,XYAXISDISTANCE,AXIS_Z);
  gl.glVertex3f(XYAXISDISTANCE,renderStyle.getRenderHeight() - XYAXISDISTANCE,AXIS_Z);
  gl.glEnd();
  gl.glTranslatef(renderStyle.getLAbelWidth(bRender2Axis),renderStyle.getAxisHeight() + 1.3f * XYAXISDISTANCE,0);
  gl.glRotatef(XLABELROTATIONNAGLE,0,0,1);
  textRenderer.begin3DRendering();
  float fScaling=renderStyle.getSmallFontScalingFactor();
  if (isRenderedRemote())   fScaling*=1.5f;
  String sAxisLabel="String_Node_Str" + set.get(storageVA.get(iSelectedAxisIndexX)).getLabel();
  if (bRender2Axis)   sAxisLabel+="String_Node_Str" + set.get(storageVA.get(iSelectedAxisIndexX2)).getLabel();
  textRenderer.draw3D(gl,sAxisLabel,0,0,0,fScaling,ScatterPlotRenderStyle.MIN_AXIS_LABEL_TEXT_SIZE);
  textRenderer.end3DRendering();
  gl.glRotatef(-XLABELROTATIONNAGLE,0,0,1);
  gl.glTranslatef(-renderStyle.getLAbelWidth(bRender2Axis),-renderStyle.getAxisHeight() - 1.3f * XYAXISDISTANCE,0);
  gl.glTranslatef(renderStyle.getAxisWidth() + 1.7f * XYAXISDISTANCE,renderStyle.getLabelHeight(bRender2Axis),0);
  gl.glRotatef(YLABELROTATIONNAGLE,0,0,1);
  textRenderer.begin3DRendering();
  fScaling=renderStyle.getSmallFontScalingFactor();
  if (isRenderedRemote())   fScaling*=1.5f;
  sAxisLabel="String_Node_Str" + set.get(storageVA.get(iSelectedAxisIndexY)).getLabel();
  if (bRender2Axis)   sAxisLabel+="String_Node_Str" + set.get(storageVA.get(iSelectedAxisIndexY2)).getLabel();
  textRenderer.draw3D(gl,sAxisLabel,0,0,0,fScaling,ScatterPlotRenderStyle.MIN_AXIS_LABEL_TEXT_SIZE);
  textRenderer.end3DRendering();
  gl.glRotatef(-YLABELROTATIONNAGLE,0,0,1);
  gl.glTranslatef(-renderStyle.getAxisWidth() - 1.7f * XYAXISDISTANCE,-renderStyle.getLabelHeight(bRender2Axis),0);
}