Program: 58984
Project: 58984
Buggy source:
/** 
 * Render cursor used for controlling hierarchical heatmap (e.g. next Texture, previous Texture, set heatmap in focus)
 * @param gl
 */
private void renderCursor(final GL gl){
  float fHeight=viewFrustum.getHeight();
  float fWidth=viewFrustum.getWidth() / 4.0f;
  Texture tempTexture=iconTextureManager.getIconTexture(gl,EIconTextures.NAVIGATION_NEXT_BIG);
  tempTexture.enable();
  tempTexture.bind();
  TextureCoords texCoords=tempTexture.getImageTexCoords();
  gl.glPushAttrib(GL.GL_CURRENT_BIT | GL.GL_LINE_BIT);
  gl.glColor4f(1f,1,1,1f);
  if (iSelectorBar != 1) {
    gl.glPushName(pickingManager.getPickingID(iUniqueID,EPickingType.HIER_HEAT_MAP_TEXTURE_CURSOR,1));
    gl.glBegin(GL.GL_POLYGON);
    gl.glTexCoord2f(texCoords.left(),texCoords.bottom());
    gl.glVertex3f(0.0f,fHeight,0);
    gl.glTexCoord2f(texCoords.right(),texCoords.bottom());
    gl.glVertex3f(fWidth,fHeight,0);
    gl.glTexCoord2f(texCoords.right(),texCoords.top());
    gl.glVertex3f(fWidth,fHeight + 0.1f,0);
    gl.glTexCoord2f(texCoords.left(),texCoords.top());
    gl.glVertex3f(0.0f,fHeight + 0.1f,0);
    gl.glEnd();
    gl.glPopName();
  }
  if (iSelectorBar != iNrSelBar) {
    gl.glPushName(pickingManager.getPickingID(iUniqueID,EPickingType.HIER_HEAT_MAP_TEXTURE_CURSOR,2));
    gl.glBegin(GL.GL_POLYGON);
    gl.glTexCoord2f(texCoords.left(),texCoords.bottom());
    gl.glVertex3f(0.0f,0.0f,0);
    gl.glTexCoord2f(texCoords.right(),texCoords.bottom());
    gl.glVertex3f(fWidth,0.0f,0);
    gl.glTexCoord2f(texCoords.right(),texCoords.top());
    gl.glVertex3f(fWidth,-0.1f,0);
    gl.glTexCoord2f(texCoords.left(),texCoords.top());
    gl.glVertex3f(0.0f,-0.1f,0);
    gl.glEnd();
    gl.glPopName();
  }
  if (set.getVA(iStorageVAID).size() > MAX_NUM_SAMPLES && bIsHeatmapInFocus == false) {
    gl.glPushName(pickingManager.getPickingID(iUniqueID,EPickingType.HIER_HEAT_MAP_INFOCUS_SELECTION,1));
    gl.glBegin(GL.GL_QUADS);
    gl.glTexCoord2f(texCoords.left(),texCoords.top());
    gl.glVertex3f(fWidth,fPosCursorFirstElement,0);
    gl.glTexCoord2f(texCoords.left(),texCoords.bottom());
    gl.glVertex3f(fWidth + 0.2f,fPosCursorFirstElement,0);
    gl.glTexCoord2f(texCoords.right(),texCoords.bottom());
    gl.glVertex3f(fWidth + 0.2f,fPosCursorLastElement,0);
    gl.glTexCoord2f(texCoords.right(),texCoords.top());
    gl.glVertex3f(fWidth,fPosCursorLastElement,0);
    gl.glEnd();
    gl.glPopName();
  }
  tempTexture=iconTextureManager.getIconTexture(gl,EIconTextures.NAVIGATION_NEXT_SMALL);
  tempTexture.enable();
  tempTexture.bind();
  texCoords=tempTexture.getImageTexCoords();
  if (bIsHeatmapInFocus == false) {
    gl.glPushName(pickingManager.getPickingID(iUniqueID,EPickingType.HIER_HEAT_MAP_CURSOR,1));
    gl.glBegin(GL.GL_POLYGON);
    gl.glTexCoord2f(texCoords.left(),texCoords.top());
    gl.glVertex3f(0.0f,fPosCursorFirstElement,0);
    gl.glTexCoord2f(texCoords.right(),texCoords.top());
    gl.glVertex3f(-GAP_LEVEL1_2 / 4,fPosCursorFirstElement,0);
    gl.glTexCoord2f(texCoords.right(),texCoords.bottom());
    gl.glVertex3f(-GAP_LEVEL1_2 / 4,fPosCursorFirstElement + 0.1f,0);
    gl.glTexCoord2f(texCoords.left(),texCoords.bottom());
    gl.glVertex3f(0.0f,fPosCursorFirstElement + 0.1f,0);
    gl.glEnd();
    gl.glPopName();
    gl.glPushName(pickingManager.getPickingID(iUniqueID,EPickingType.HIER_HEAT_MAP_CURSOR,2));
    gl.glBegin(GL.GL_POLYGON);
    gl.glTexCoord2f(texCoords.left(),texCoords.top());
    gl.glVertex3f(0.0f,fPosCursorLastElement,0);
    gl.glTexCoord2f(texCoords.right(),texCoords.top());
    gl.glVertex3f(-GAP_LEVEL1_2 / 4,fPosCursorLastElement,0);
    gl.glTexCoord2f(texCoords.right(),texCoords.bottom());
    gl.glVertex3f(-GAP_LEVEL1_2 / 4,fPosCursorLastElement - 0.1f,0);
    gl.glTexCoord2f(texCoords.left(),texCoords.bottom());
    gl.glVertex3f(0.0f,fPosCursorLastElement - 0.1f,0);
    gl.glEnd();
    gl.glPopName();
  }
  gl.glPopAttrib();
  tempTexture.disable();
}

Fixed version (ground truth):
/** 
 * Render cursor used for controlling hierarchical heatmap (e.g. next Texture, previous Texture, set heatmap in focus)
 * @param gl
 */
private void renderCursor(final GL gl){
  float fHeight=viewFrustum.getHeight();
  float fWidth=viewFrustum.getWidth() / 4.0f;
  Texture tempTexture=iconTextureManager.getIconTexture(gl,EIconTextures.NAVIGATION_NEXT_BIG_SIDE);
  tempTexture.enable();
  tempTexture.bind();
  TextureCoords texCoords=tempTexture.getImageTexCoords();
  gl.glPushAttrib(GL.GL_CURRENT_BIT | GL.GL_LINE_BIT);
  gl.glColor4f(1f,1,1,1f);
  if (iSelectorBar != 1) {
    gl.glPushName(pickingManager.getPickingID(iUniqueID,EPickingType.HIER_HEAT_MAP_TEXTURE_CURSOR,1));
    gl.glBegin(GL.GL_POLYGON);
    gl.glTexCoord2f(texCoords.left(),texCoords.bottom());
    gl.glVertex3f(0.0f,fHeight,0);
    gl.glTexCoord2f(texCoords.right(),texCoords.bottom());
    gl.glVertex3f(0.1f,fHeight,0);
    gl.glTexCoord2f(texCoords.right(),texCoords.top());
    gl.glVertex3f(0.1f,fHeight + 0.1f,0);
    gl.glTexCoord2f(texCoords.left(),texCoords.top());
    gl.glVertex3f(0.0f,fHeight + 0.1f,0);
    gl.glEnd();
    if (bIsHeatmapInFocus) {
      gl.glBegin(GL.GL_POLYGON);
      gl.glTexCoord2f(texCoords.right(),texCoords.bottom());
      gl.glVertex3f(fWidth / 5 - 0.1f,fHeight,0);
      gl.glTexCoord2f(texCoords.left(),texCoords.bottom());
      gl.glVertex3f(fWidth / 5,fHeight,0);
      gl.glTexCoord2f(texCoords.left(),texCoords.top());
      gl.glVertex3f(fWidth / 5,fHeight + 0.1f,0);
      gl.glTexCoord2f(texCoords.right(),texCoords.top());
      gl.glVertex3f(fWidth / 5 - 0.1f,fHeight + 0.1f,0);
      gl.glEnd();
    }
 else {
      gl.glBegin(GL.GL_POLYGON);
      gl.glTexCoord2f(texCoords.right(),texCoords.bottom());
      gl.glVertex3f(fWidth - 0.1f,fHeight,0);
      gl.glTexCoord2f(texCoords.left(),texCoords.bottom());
      gl.glVertex3f(fWidth,fHeight,0);
      gl.glTexCoord2f(texCoords.left(),texCoords.top());
      gl.glVertex3f(fWidth,fHeight + 0.1f,0);
      gl.glTexCoord2f(texCoords.right(),texCoords.top());
      gl.glVertex3f(fWidth - 0.1f,fHeight + 0.1f,0);
      gl.glEnd();
    }
    gl.glPopName();
  }
  if (iSelectorBar != iNrSelBar) {
    gl.glPushName(pickingManager.getPickingID(iUniqueID,EPickingType.HIER_HEAT_MAP_TEXTURE_CURSOR,2));
    gl.glBegin(GL.GL_POLYGON);
    gl.glTexCoord2f(texCoords.left(),texCoords.bottom());
    gl.glVertex3f(0.0f,0.0f,0);
    gl.glTexCoord2f(texCoords.right(),texCoords.bottom());
    gl.glVertex3f(fWidth,0.0f,0);
    gl.glTexCoord2f(texCoords.right(),texCoords.top());
    gl.glVertex3f(fWidth,-0.1f,0);
    gl.glTexCoord2f(texCoords.left(),texCoords.top());
    gl.glVertex3f(0.0f,-0.1f,0);
    gl.glEnd();
    gl.glPopName();
  }
  tempTexture=iconTextureManager.getIconTexture(gl,EIconTextures.NAVIGATION_NEXT_SMALL);
  tempTexture.enable();
  tempTexture.bind();
  texCoords=tempTexture.getImageTexCoords();
  if (bIsHeatmapInFocus == false) {
    gl.glColor4f(0f,0f,0f,0.7f);
    gl.glPushName(pickingManager.getPickingID(iUniqueID,EPickingType.HIER_HEAT_MAP_CURSOR,1));
    gl.glBegin(GL.GL_POLYGON);
    gl.glTexCoord2f(texCoords.right(),texCoords.top());
    gl.glVertex3f(0.0f,fPosCursorFirstElement,0);
    gl.glTexCoord2f(texCoords.left(),texCoords.top());
    gl.glVertex3f(-GAP_LEVEL1_2 / 4,fPosCursorFirstElement,0);
    gl.glTexCoord2f(texCoords.left(),texCoords.bottom());
    gl.glVertex3f(-GAP_LEVEL1_2 / 4,fPosCursorFirstElement + 0.1f,0);
    gl.glTexCoord2f(texCoords.right(),texCoords.bottom());
    gl.glVertex3f(0.0f,fPosCursorFirstElement + 0.1f,0);
    gl.glEnd();
    gl.glPopName();
    gl.glBegin(GL.GL_QUADS);
    gl.glVertex3f(-GAP_LEVEL1_2 / 4,fPosCursorLastElement,0);
    gl.glVertex3f(0.0f,fPosCursorLastElement,0);
    gl.glVertex3f(0.0f,fPosCursorFirstElement,0);
    gl.glVertex3f(-GAP_LEVEL1_2 / 4,fPosCursorFirstElement,0);
    gl.glEnd();
    gl.glPushName(pickingManager.getPickingID(iUniqueID,EPickingType.HIER_HEAT_MAP_CURSOR,2));
    gl.glBegin(GL.GL_POLYGON);
    gl.glTexCoord2f(texCoords.right(),texCoords.top());
    gl.glVertex3f(0.0f,fPosCursorLastElement,0);
    gl.glTexCoord2f(texCoords.left(),texCoords.top());
    gl.glVertex3f(-GAP_LEVEL1_2 / 4,fPosCursorLastElement,0);
    gl.glTexCoord2f(texCoords.left(),texCoords.bottom());
    gl.glVertex3f(-GAP_LEVEL1_2 / 4,fPosCursorLastElement - 0.1f,0);
    gl.glTexCoord2f(texCoords.right(),texCoords.bottom());
    gl.glVertex3f(0.0f,fPosCursorLastElement - 0.1f,0);
    gl.glEnd();
    gl.glPopName();
  }
  gl.glPopAttrib();
  tempTexture.disable();
}