Program: 58487
Project: 58487
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;
      renderNumber(gl,Formatter.formatNumber(fNumber),fXPosition - fWidth - AXIS_MARKER_WIDTH,fCurrentHeight - fHeightHalf + XYAXISDISTANCE);
      gl.glPushAttrib(GL.GL_CURRENT_BIT | GL.GL_LINE_BIT);
      float fRoationAngle=-45;
      float x=fCurrentWidth + XYAXISDISTANCE;
      x=transformOnZoom(x,renderStyle.getAxisWidth(),XYAXISDISTANCE) - fWidthHalf;
      float 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);
    gl.glBegin(GL.GL_LINES);
    float tmpx=fCurrentWidth + XYAXISDISTANCE;
    tmpx=transformOnZoom(tmpx,renderStyle.getAxisWidth(),XYAXISDISTANCE);
    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);
    gl.glBegin(GL.GL_LINES);
    gl.glVertex3f(fXPosition - AXIS_MARKER_WIDTH,fCurrentHeight + XYAXISDISTANCE,AXIS_Z);
    gl.glVertex3f(fXPosition + AXIS_MARKER_WIDTH,fCurrentHeight + XYAXISDISTANCE,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(SELECTED_X_AXIS).getLabel();
  if (bRender2Axis)   sAxisLabel+="String_Node_Str" + set.get(SELECTED_X_AXIS_2).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(SELECTED_Y_AXIS).getLabel();
  if (bRender2Axis)   sAxisLabel+="String_Node_Str" + set.get(SELECTED_Y_AXIS_2).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.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;
      renderNumber(gl,Formatter.formatNumber(fNumber),fXPosition - fWidth - AXIS_MARKER_WIDTH,fCurrentHeight - fHeightHalf + XYAXISDISTANCE);
      gl.glPushAttrib(GL.GL_CURRENT_BIT | GL.GL_LINE_BIT);
      float fRoationAngle=-45;
      float x=fCurrentWidth + XYAXISDISTANCE;
      x=transformOnZoom(x,renderStyle.getAxisWidth(),XYAXISDISTANCE) - fWidthHalf;
      float 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);
    gl.glBegin(GL.GL_LINES);
    float tmpx=fCurrentWidth + XYAXISDISTANCE;
    tmpx=transformOnZoom(tmpx,renderStyle.getAxisWidth(),XYAXISDISTANCE);
    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);
    gl.glBegin(GL.GL_LINES);
    gl.glVertex3f(fXPosition - AXIS_MARKER_WIDTH,fCurrentHeight + XYAXISDISTANCE,AXIS_Z);
    gl.glVertex3f(fXPosition + AXIS_MARKER_WIDTH,fCurrentHeight + XYAXISDISTANCE,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(SELECTED_X_AXIS)).getLabel();
  if (bRender2Axis)   sAxisLabel+="String_Node_Str" + set.get(storageVA.get(SELECTED_X_AXIS_2)).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(SELECTED_Y_AXIS)).getLabel();
  if (bRender2Axis)   sAxisLabel+="String_Node_Str" + set.get(storageVA.get(SELECTED_Y_AXIS_2)).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);
}