Program: 58301
Project: 58301
Buggy source:
private void renderExperimentDendrogramBackground(GL gl){
  float fHeight=viewFrustum.getHeight();
  float fWidthLevel3=renderStyle.getWidthLevel3();
  float fSizeHeatmapArrow=renderStyle.getSizeHeatmapArrow();
  float fHeightExperimentDendrogram=renderStyle.getHeightExperimentDendrogram();
  float fWidthCurveTexture=GAP_BETWEEN_LEVELS / 4;
  if (bExperimentDendrogramActive || bExperimentDendrogramRenderCut) {
    gl.glColor4f(1,1,1,1);
    gl.glBegin(GL.GL_QUADS);
    gl.glVertex3f(0,fHeight - fWidthCurveTexture,0);
    gl.glVertex3f(fWidthLevel3,fHeight - fWidthCurveTexture,0);
    gl.glVertex3f(fWidthLevel3,fHeight - fHeightExperimentDendrogram,0);
    gl.glVertex3f(0,fHeight - fHeightExperimentDendrogram,0);
    gl.glEnd();
    gl.glBegin(GL.GL_QUADS);
    gl.glVertex3f(fWidthCurveTexture,fHeight,0);
    gl.glVertex3f(fWidthLevel3 - fWidthCurveTexture,fHeight,0);
    gl.glVertex3f(fWidthLevel3 - fWidthCurveTexture,fHeight - fWidthCurveTexture,0);
    gl.glVertex3f(fWidthCurveTexture,fHeight - fWidthCurveTexture,0);
    gl.glEnd();
    gl.glLineWidth(1f);
    gl.glColor4f(1,0,0,1);
    gl.glBegin(GL.GL_LINES);
    gl.glVertex3f(0,fHeight,0);
    gl.glVertex3f(fWidthLevel3 + 0.4f,fHeight,0);
    gl.glEnd();
    gl.glColor4f(1,1,1,1);
    gl.glPushAttrib(GL.GL_CURRENT_BIT | GL.GL_LINE_BIT);
    gl.glBlendFunc(GL.GL_ONE,GL.GL_ONE_MINUS_SRC_ALPHA);
    Texture textureMaskNeg=textureManager.getIconTexture(gl,EIconTextures.NAVIGATION_MASK_CURVE_NEG_WHITE);
    textureMaskNeg.enable();
    textureMaskNeg.bind();
    TextureCoords texCoordsMaskNeg=textureMaskNeg.getImageTexCoords();
    gl.glBegin(GL.GL_POLYGON);
    gl.glTexCoord2f(texCoordsMaskNeg.left(),texCoordsMaskNeg.bottom());
    gl.glVertex3f(0,fHeight - fWidthCurveTexture,0);
    gl.glTexCoord2f(texCoordsMaskNeg.right(),texCoordsMaskNeg.bottom());
    gl.glVertex3f(fWidthCurveTexture,fHeight - fWidthCurveTexture,0);
    gl.glTexCoord2f(texCoordsMaskNeg.right(),texCoordsMaskNeg.top());
    gl.glVertex3f(fWidthCurveTexture,fHeight,0);
    gl.glTexCoord2f(texCoordsMaskNeg.left(),texCoordsMaskNeg.top());
    gl.glVertex3f(0,fHeight,0);
    gl.glEnd();
    gl.glBegin(GL.GL_POLYGON);
    gl.glTexCoord2f(texCoordsMaskNeg.right(),texCoordsMaskNeg.bottom());
    gl.glVertex3f(fWidthLevel3 - fWidthCurveTexture,fHeight - fWidthCurveTexture,0);
    gl.glTexCoord2f(texCoordsMaskNeg.left(),texCoordsMaskNeg.bottom());
    gl.glVertex3f(fWidthLevel3,fHeight - fWidthCurveTexture,0);
    gl.glTexCoord2f(texCoordsMaskNeg.left(),texCoordsMaskNeg.top());
    gl.glVertex3f(fWidthLevel3,fHeight,0);
    gl.glTexCoord2f(texCoordsMaskNeg.right(),texCoordsMaskNeg.top());
    gl.glVertex3f(fWidthLevel3 - fWidthCurveTexture,fHeight,0);
    gl.glEnd();
    textureMaskNeg.disable();
    gl.glBlendFunc(GL.GL_SRC_ALPHA,GL.GL_ONE_MINUS_SRC_ALPHA);
    gl.glPopAttrib();
  }
  if (set.getStorageTree() != null) {
    gl.glBlendFunc(GL.GL_ONE,GL.GL_ONE_MINUS_SRC_ALPHA);
    Texture tempTexture=textureManager.getIconTexture(gl,EIconTextures.HEAT_MAP_ARROW);
    tempTexture.enable();
    tempTexture.bind();
    TextureCoords texCoords=tempTexture.getImageTexCoords();
    gl.glPushName(pickingManager.getPickingID(iUniqueID,EPickingType.HIER_HEAT_MAP_ACTIVATE_STORAGE_DENDROGRAM,1));
    if (bExperimentDendrogramActive) {
      gl.glBegin(GL.GL_POLYGON);
      gl.glTexCoord2f(texCoords.left(),texCoords.top());
      gl.glVertex3f(fWidthLevel3 + 0.4f - fSizeHeatmapArrow,fHeight,BUTTON_Z);
      gl.glTexCoord2f(texCoords.left(),texCoords.bottom());
      gl.glVertex3f(fWidthLevel3 + 0.4f - fSizeHeatmapArrow,fHeight - fSizeHeatmapArrow,BUTTON_Z);
      gl.glTexCoord2f(texCoords.right(),texCoords.bottom());
      gl.glVertex3f(fWidthLevel3 + 0.4f,fHeight - fSizeHeatmapArrow,BUTTON_Z);
      gl.glTexCoord2f(texCoords.right(),texCoords.top());
      gl.glVertex3f(fWidthLevel3 + 0.4f,fHeight,BUTTON_Z);
      gl.glEnd();
    }
 else {
      gl.glBegin(GL.GL_POLYGON);
      gl.glTexCoord2f(texCoords.left(),texCoords.bottom());
      gl.glVertex3f(fWidthLevel3 + 0.4f - fSizeHeatmapArrow,fHeight,BUTTON_Z);
      gl.glTexCoord2f(texCoords.left(),texCoords.top());
      gl.glVertex3f(fWidthLevel3 + 0.4f - fSizeHeatmapArrow,fHeight - fSizeHeatmapArrow,BUTTON_Z);
      gl.glTexCoord2f(texCoords.right(),texCoords.top());
      gl.glVertex3f(fWidthLevel3 + 0.4f,fHeight - fSizeHeatmapArrow,BUTTON_Z);
      gl.glTexCoord2f(texCoords.right(),texCoords.bottom());
      gl.glVertex3f(fWidthLevel3 + 0.4f,fHeight,BUTTON_Z);
      gl.glEnd();
    }
    gl.glPopName();
    tempTexture.disable();
    gl.glBlendFunc(GL.GL_SRC_ALPHA,GL.GL_ONE_MINUS_SRC_ALPHA);
  }
}

Fixed version (ground truth):
private void renderExperimentDendrogramBackground(GL gl){
  float fHeight=viewFrustum.getHeight();
  float fWidthLevel3=renderStyle.getWidthLevel3();
  float fSizeHeatmapArrow=renderStyle.getSizeHeatmapArrow();
  float fHeightExperimentDendrogram=renderStyle.getHeightExperimentDendrogram();
  float fWidthCurveTexture=GAP_BETWEEN_LEVELS / 4;
  if (bExperimentDendrogramActive || bExperimentDendrogramRenderCut) {
    gl.glColor4f(1,1,1,1);
    gl.glBegin(GL.GL_QUADS);
    gl.glVertex3f(0,fHeight - fWidthCurveTexture,0);
    gl.glVertex3f(fWidthLevel3,fHeight - fWidthCurveTexture,0);
    gl.glVertex3f(fWidthLevel3,fHeight - fHeightExperimentDendrogram,0);
    gl.glVertex3f(0,fHeight - fHeightExperimentDendrogram,0);
    gl.glEnd();
    gl.glBegin(GL.GL_QUADS);
    gl.glVertex3f(fWidthCurveTexture,fHeight,0);
    gl.glVertex3f(fWidthLevel3 - fWidthCurveTexture,fHeight,0);
    gl.glVertex3f(fWidthLevel3 - fWidthCurveTexture,fHeight - fWidthCurveTexture,0);
    gl.glVertex3f(fWidthCurveTexture,fHeight - fWidthCurveTexture,0);
    gl.glEnd();
    gl.glLineWidth(1f);
    gl.glColor4f(1,0,0,1);
    gl.glBegin(GL.GL_LINES);
    gl.glVertex3f(0,fHeight,0);
    gl.glVertex3f(fWidthLevel3 + 0.4f,fHeight,0);
    gl.glEnd();
    gl.glColor4f(1,1,1,1);
    gl.glPushAttrib(GL.GL_CURRENT_BIT | GL.GL_LINE_BIT);
    gl.glBlendFunc(GL.GL_ONE,GL.GL_ONE_MINUS_SRC_ALPHA);
    Texture textureMaskNeg=textureManager.getIconTexture(gl,EIconTextures.NAVIGATION_MASK_CURVE_NEG_WHITE);
    textureMaskNeg.enable();
    textureMaskNeg.bind();
    TextureCoords texCoordsMaskNeg=textureMaskNeg.getImageTexCoords();
    gl.glBegin(GL.GL_POLYGON);
    gl.glTexCoord2f(texCoordsMaskNeg.left(),texCoordsMaskNeg.bottom());
    gl.glVertex3f(0,fHeight - fWidthCurveTexture,0);
    gl.glTexCoord2f(texCoordsMaskNeg.right(),texCoordsMaskNeg.bottom());
    gl.glVertex3f(fWidthCurveTexture,fHeight - fWidthCurveTexture,0);
    gl.glTexCoord2f(texCoordsMaskNeg.right(),texCoordsMaskNeg.top());
    gl.glVertex3f(fWidthCurveTexture,fHeight,0);
    gl.glTexCoord2f(texCoordsMaskNeg.left(),texCoordsMaskNeg.top());
    gl.glVertex3f(0,fHeight,0);
    gl.glEnd();
    gl.glBegin(GL.GL_POLYGON);
    gl.glTexCoord2f(texCoordsMaskNeg.right(),texCoordsMaskNeg.bottom());
    gl.glVertex3f(fWidthLevel3 - fWidthCurveTexture,fHeight - fWidthCurveTexture,0);
    gl.glTexCoord2f(texCoordsMaskNeg.left(),texCoordsMaskNeg.bottom());
    gl.glVertex3f(fWidthLevel3,fHeight - fWidthCurveTexture,0);
    gl.glTexCoord2f(texCoordsMaskNeg.left(),texCoordsMaskNeg.top());
    gl.glVertex3f(fWidthLevel3,fHeight,0);
    gl.glTexCoord2f(texCoordsMaskNeg.right(),texCoordsMaskNeg.top());
    gl.glVertex3f(fWidthLevel3 - fWidthCurveTexture,fHeight,0);
    gl.glEnd();
    textureMaskNeg.disable();
    gl.glBlendFunc(GL.GL_SRC_ALPHA,GL.GL_ONE_MINUS_SRC_ALPHA);
    gl.glPopAttrib();
  }
  if (!set.getStorageData(StorageVAType.STORAGE).isDefaultTree()) {
    gl.glBlendFunc(GL.GL_ONE,GL.GL_ONE_MINUS_SRC_ALPHA);
    Texture tempTexture=textureManager.getIconTexture(gl,EIconTextures.HEAT_MAP_ARROW);
    tempTexture.enable();
    tempTexture.bind();
    TextureCoords texCoords=tempTexture.getImageTexCoords();
    gl.glPushName(pickingManager.getPickingID(iUniqueID,EPickingType.HIER_HEAT_MAP_ACTIVATE_STORAGE_DENDROGRAM,1));
    if (bExperimentDendrogramActive) {
      gl.glBegin(GL.GL_POLYGON);
      gl.glTexCoord2f(texCoords.left(),texCoords.top());
      gl.glVertex3f(fWidthLevel3 + 0.4f - fSizeHeatmapArrow,fHeight,BUTTON_Z);
      gl.glTexCoord2f(texCoords.left(),texCoords.bottom());
      gl.glVertex3f(fWidthLevel3 + 0.4f - fSizeHeatmapArrow,fHeight - fSizeHeatmapArrow,BUTTON_Z);
      gl.glTexCoord2f(texCoords.right(),texCoords.bottom());
      gl.glVertex3f(fWidthLevel3 + 0.4f,fHeight - fSizeHeatmapArrow,BUTTON_Z);
      gl.glTexCoord2f(texCoords.right(),texCoords.top());
      gl.glVertex3f(fWidthLevel3 + 0.4f,fHeight,BUTTON_Z);
      gl.glEnd();
    }
 else {
      gl.glBegin(GL.GL_POLYGON);
      gl.glTexCoord2f(texCoords.left(),texCoords.bottom());
      gl.glVertex3f(fWidthLevel3 + 0.4f - fSizeHeatmapArrow,fHeight,BUTTON_Z);
      gl.glTexCoord2f(texCoords.left(),texCoords.top());
      gl.glVertex3f(fWidthLevel3 + 0.4f - fSizeHeatmapArrow,fHeight - fSizeHeatmapArrow,BUTTON_Z);
      gl.glTexCoord2f(texCoords.right(),texCoords.top());
      gl.glVertex3f(fWidthLevel3 + 0.4f,fHeight - fSizeHeatmapArrow,BUTTON_Z);
      gl.glTexCoord2f(texCoords.right(),texCoords.bottom());
      gl.glVertex3f(fWidthLevel3 + 0.4f,fHeight,BUTTON_Z);
      gl.glEnd();
    }
    gl.glPopName();
    tempTexture.disable();
    gl.glBlendFunc(GL.GL_SRC_ALPHA,GL.GL_ONE_MINUS_SRC_ALPHA);
  }
}