Program: 57951
Project: 57951
Buggy source:
private void renderSingleLine(GL2 gl,Integer contentID,SelectionType selectionType,PolyLineState renderState,boolean renderCaption){
  gl.glColor4fv(renderState.color,0);
  gl.glLineWidth(renderState.lineWidth);
  if (!(detailLevel == DetailLevel.HIGH || detailLevel == DetailLevel.MEDIUM))   renderCaption=false;
  AStorage currentStorage=null;
  float previousX=0;
  float previousY=0;
  float currentX=0;
  float currentY=0;
  if (selectionType != SelectionType.DESELECTED) {
    gl.glPushName(pickingManager.getPickingID(uniqueID,PickingType.POLYLINE_SELECTION,contentID));
  }
  if (!renderCaption) {
    gl.glBegin(GL2.GL_LINE_STRIP);
  }
  for (int storageCount=0; storageCount < storageVA.size(); storageCount++) {
    currentStorage=table.get(storageVA.get(storageCount));
    currentX=axisSpacings.get(storageCount);
    currentY=currentStorage.getFloat(EDataRepresentation.NORMALIZED,contentID);
    if (Float.isNaN(currentY)) {
      currentY=NAN_Y_OFFSET / renderStyle.getAxisHeight();
    }
    if (storageCount != 0) {
      if (renderCaption) {
        gl.glBegin(GL2.GL_LINES);
      }
      gl.glVertex3f(previousX,previousY * renderStyle.getAxisHeight(),renderState.zDepth);
      gl.glVertex3f(currentX,currentY * renderStyle.getAxisHeight(),renderState.zDepth);
      if (renderCaption) {
        gl.glEnd();
      }
    }
    if (renderCaption) {
      String sRawValue;
      if (currentStorage instanceof NumericalStorage) {
        sRawValue=Formatter.formatNumber(currentStorage.getFloat(EDataRepresentation.FOLD_CHANGE_RAW,contentID));
      }
 else       if (currentStorage instanceof NominalStorage) {
        sRawValue=((NominalStorage<String>)currentStorage).getRaw(contentID);
      }
 else       throw new IllegalStateException("String_Node_Str");
      renderBoxedYValues(gl,currentX,currentY * renderStyle.getAxisHeight(),sRawValue,selectionType);
    }
    previousX=currentX;
    previousY=currentY;
  }
  if (!renderCaption) {
    gl.glEnd();
  }
  if (selectionType != SelectionType.DESELECTED) {
    gl.glPopName();
  }
}

Fixed version (ground truth):
private void renderSingleLine(GL2 gl,Integer contentID,SelectionType selectionType,PolyLineState renderState,boolean renderCaption){
  gl.glColor4fv(renderState.color,0);
  gl.glLineWidth(renderState.lineWidth);
  if (!(detailLevel == DetailLevel.HIGH || detailLevel == DetailLevel.MEDIUM))   renderCaption=false;
  AStorage currentStorage=null;
  float previousX=0;
  float previousY=0;
  float currentX=0;
  float currentY=0;
  if (selectionType != SelectionType.DESELECTED) {
    gl.glPushName(pickingManager.getPickingID(uniqueID,PickingType.POLYLINE_SELECTION,contentID));
  }
  if (!renderCaption) {
    gl.glBegin(GL2.GL_LINE_STRIP);
  }
  for (int storageCount=0; storageCount < storageVA.size(); storageCount++) {
    currentStorage=table.get(storageVA.get(storageCount));
    currentX=axisSpacings.get(storageCount);
    currentY=currentStorage.getFloat(EDataRepresentation.NORMALIZED,contentID);
    if (Float.isNaN(currentY)) {
      currentY=NAN_Y_OFFSET / renderStyle.getAxisHeight();
    }
    if (storageCount != 0) {
      if (renderCaption) {
        gl.glBegin(GL2.GL_LINES);
      }
      gl.glVertex3f(previousX,previousY * renderStyle.getAxisHeight(),renderState.zDepth);
      gl.glVertex3f(currentX,currentY * renderStyle.getAxisHeight(),renderState.zDepth);
      if (renderCaption) {
        gl.glEnd();
      }
    }
    if (renderCaption) {
      String sRawValue;
      if (currentStorage instanceof NumericalStorage) {
        sRawValue=Formatter.formatNumber(currentStorage.getFloat(EDataRepresentation.RAW,contentID));
      }
 else       if (currentStorage instanceof NominalStorage) {
        sRawValue=((NominalStorage<String>)currentStorage).getRaw(contentID);
      }
 else       throw new IllegalStateException("String_Node_Str");
      renderBoxedYValues(gl,currentX,currentY * renderStyle.getAxisHeight(),sRawValue,selectionType);
    }
    previousX=currentX;
    previousY=currentY;
  }
  if (!renderCaption) {
    gl.glEnd();
  }
  if (selectionType != SelectionType.DESELECTED) {
    gl.glPopName();
  }
}