Program: 56792
Project: 56792
Buggy source:
private void renderGeneNode(GL2 gl,PathwayVertexRep vertexRep){
  float[] nodeColor;
  float width=pixelGLConverter.getGLWidthForPixelWidth(vertexRep.getWidth());
  float height=pixelGLConverter.getGLHeightForPixelHeight(vertexRep.getHeight());
  gl.glLineWidth(1);
  gl.glEnable(GL.GL_STENCIL_TEST);
  gl.glColorMask(false,false,false,false);
  gl.glDisable(GL.GL_DEPTH_TEST);
  gl.glDisable(GL.GL_BLEND);
  gl.glStencilFunc(GL.GL_GREATER,1,0xff);
  gl.glStencilOp(GL.GL_KEEP,GL.GL_REPLACE,GL.GL_REPLACE);
  renderQuad(gl,width,height);
  gl.glDisable(GL.GL_STENCIL_TEST);
  gl.glColorMask(true,true,true,true);
  gl.glEnable(GL.GL_DEPTH_TEST);
  gl.glEnable(GL.GL_BLEND);
  if (mappingPerspective != null) {
    Average average=getExpressionAverage(mappingPerspective,vertexRep);
    if (average != null) {
      nodeColor=mappingPerspective.getDataDomain().getTable().getColorMapper().getColor((float)average.getArithmeticMean());
    }
 else {
      nodeColor=null;
    }
    if (average != null && nodeColor != null) {
      gl.glColor4f(nodeColor[0],nodeColor[1],nodeColor[2],0.8f);
      if (glPathwayView.getDetailLevel() == EDetailLevel.HIGH) {
        gl.glEnable(GL.GL_STENCIL_TEST);
        gl.glDisable(GL.GL_DEPTH_TEST);
        gl.glDisable(GL.GL_BLEND);
        gl.glStencilFunc(GL.GL_GREATER,2,0xff);
        gl.glStencilOp(GL.GL_KEEP,GL.GL_KEEP,GL.GL_KEEP);
        renderQuad(gl,width,height);
        gl.glEnable(GL.GL_DEPTH_TEST);
        gl.glDisable(GL.GL_STENCIL_TEST);
        Float stdDev=pixelGLConverter.getGLWidthForPixelWidth(PathwayRenderStyle.ENZYME_NODE_PIXEL_WIDTH) * (float)average.getStandardDeviation() * 2.0f;
        if (!stdDev.isNaN() && this.glPathwayView.isShowStdDevBars()) {
          renderStdDevBar(gl,width,height,stdDev);
        }
        gl.glPushMatrix();
        gl.glTranslatef(0,-(2f * thirdOfstdDevBarHeight - onePxlHeight),0);
        if (vertexSelectionManager.checkStatus(SelectionType.SELECTION,vertexRep.getID())) {
          nodeColor=SelectionType.SELECTION.getColor().getRGBA();
          gl.glColor4fv(nodeColor,0);
          renderFrame(gl,width + onePxlWidth,height + (2f * thirdOfstdDevBarHeight) - onePxlHeight);
          gl.glEnable(GL.GL_STENCIL_TEST);
          gl.glColorMask(false,false,false,false);
          gl.glDisable(GL.GL_DEPTH_TEST);
          gl.glDisable(GL.GL_BLEND);
          gl.glStencilFunc(GL.GL_GREATER,2,0xff);
          gl.glStencilOp(GL.GL_KEEP,GL.GL_REPLACE,GL.GL_REPLACE);
          renderFrame(gl,width + onePxlWidth,height + (2f * thirdOfstdDevBarHeight) - onePxlHeight);
          gl.glDisable(GL.GL_STENCIL_TEST);
          gl.glColorMask(true,true,true,true);
          gl.glEnable(GL.GL_DEPTH_TEST);
          gl.glEnable(GL.GL_BLEND);
        }
 else         if (vertexSelectionManager.checkStatus(SelectionType.MOUSE_OVER,vertexRep.getID())) {
          nodeColor=SelectionType.MOUSE_OVER.getColor().getRGBA();
          gl.glColor4fv(nodeColor,0);
          renderFrame(gl,width + onePxlWidth,height + (2f * thirdOfstdDevBarHeight) - onePxlHeight);
          gl.glEnable(GL.GL_STENCIL_TEST);
          gl.glColorMask(false,false,false,false);
          gl.glDisable(GL.GL_DEPTH_TEST);
          gl.glDisable(GL.GL_BLEND);
          gl.glStencilFunc(GL.GL_GREATER,2,0xff);
          gl.glStencilOp(GL.GL_KEEP,GL.GL_REPLACE,GL.GL_REPLACE);
          renderFrame(gl,width + onePxlWidth,height + (2f * thirdOfstdDevBarHeight) - onePxlHeight);
          gl.glDisable(GL.GL_STENCIL_TEST);
          gl.glColorMask(true,true,true,true);
          gl.glEnable(GL.GL_DEPTH_TEST);
          gl.glEnable(GL.GL_BLEND);
        }
        gl.glPopMatrix();
      }
 else {
        float dsMean=0.5f;
        float scaleConstant=20;
        if (mappingPerspective.getDataDomain().getTable() instanceof NumericalTable) {
          NumericalTable table=(NumericalTable)mappingPerspective.getDataDomain().getTable();
          dsMean=(float)table.getDatasetStatistics().getMean();
          dsMean=(float)table.getNormalizedForRaw(table.getDefaultDataTransformation(),dsMean);
        }
        float deviation=1 + Math.abs(dsMean - (float)average.getArithmeticMean()) * scaleConstant;
        if (deviation > 4)         deviation=4;
        renderQuad(gl,width * deviation,height * deviation);
        gl.glEnable(GL.GL_STENCIL_TEST);
        gl.glColorMask(false,false,false,false);
        gl.glDisable(GL.GL_DEPTH_TEST);
        gl.glDisable(GL.GL_BLEND);
        gl.glStencilFunc(GL.GL_ALWAYS,2,0xff);
        gl.glStencilOp(GL.GL_KEEP,GL.GL_KEEP,GL.GL_REPLACE);
        renderQuad(gl,width * deviation,height * deviation);
        gl.glDisable(GL.GL_STENCIL_TEST);
        gl.glColorMask(true,true,true,true);
        gl.glEnable(GL.GL_DEPTH_TEST);
        gl.glEnable(GL.GL_BLEND);
        if (vertexSelectionManager.checkStatus(SelectionType.SELECTION,vertexRep.getID())) {
          nodeColor=SelectionType.SELECTION.getColor().getRGBA();
          gl.glColor4fv(nodeColor,0);
          renderQuad(gl,width * deviation,height * deviation);
          gl.glEnable(GL.GL_STENCIL_TEST);
          gl.glColorMask(false,false,false,false);
          gl.glDisable(GL.GL_DEPTH_TEST);
          gl.glDisable(GL.GL_BLEND);
          gl.glStencilOp(GL.GL_KEEP,GL.GL_KEEP,GL.GL_REPLACE);
          gl.glStencilFunc(GL.GL_ALWAYS,2,0xff);
          renderQuad(gl,width * deviation,height * deviation);
          gl.glDisable(GL.GL_STENCIL_TEST);
          gl.glColorMask(true,true,true,true);
          gl.glEnable(GL.GL_DEPTH_TEST);
          gl.glEnable(GL.GL_BLEND);
        }
 else         if (vertexSelectionManager.checkStatus(SelectionType.MOUSE_OVER,vertexRep.getID())) {
          nodeColor=SelectionType.MOUSE_OVER.getColor().getRGBA();
          gl.glColor4fv(nodeColor,0);
          renderQuad(gl,width * deviation,height * deviation);
          gl.glEnable(GL.GL_STENCIL_TEST);
          gl.glColorMask(false,false,false,false);
          gl.glDisable(GL.GL_DEPTH_TEST);
          gl.glDisable(GL.GL_BLEND);
          gl.glStencilOp(GL.GL_KEEP,GL.GL_KEEP,GL.GL_REPLACE);
          gl.glStencilFunc(GL.GL_ALWAYS,2,0xff);
          renderQuad(gl,width * deviation,height * deviation);
          gl.glDisable(GL.GL_STENCIL_TEST);
          gl.glColorMask(true,true,true,true);
          gl.glEnable(GL.GL_DEPTH_TEST);
          gl.glEnable(GL.GL_BLEND);
        }
      }
    }
 else {
      renderNonMappingGlyph(gl,width,height);
      if (vertexSelectionManager.checkStatus(SelectionType.SELECTION,vertexRep.getID())) {
        nodeColor=SelectionType.SELECTION.getColor().getRGBA();
        gl.glColor4fv(nodeColor,0);
        renderFrame(gl,width + onePxlWidth,height + thirdOfstdDevBarHeight);
        maskFramedEnzymeNode(gl,width,height);
      }
 else       if (vertexSelectionManager.checkStatus(SelectionType.MOUSE_OVER,vertexRep.getID())) {
        nodeColor=SelectionType.MOUSE_OVER.getColor().getRGBA();
        gl.glColor4fv(nodeColor,0);
        renderFrame(gl,width + onePxlWidth,height + thirdOfstdDevBarHeight);
        maskFramedEnzymeNode(gl,width,height);
      }
    }
  }
 else {
    nodeColor=null;
    if (vertexSelectionManager.checkStatus(SelectionType.SELECTION,vertexRep.getID())) {
      nodeColor=SelectionType.SELECTION.getColor().getRGBA();
      maskFramedEnzymeNode(gl,width,height);
    }
 else     if (vertexSelectionManager.checkStatus(SelectionType.MOUSE_OVER,vertexRep.getID())) {
      nodeColor=SelectionType.MOUSE_OVER.getColor().getRGBA();
      maskFramedEnzymeNode(gl,width,height);
    }
 else     if (vertexSelectionManager.checkStatus(SelectionType.NORMAL,vertexRep.getID())) {
      nodeColor=PathwayRenderStyle.ENZYME_NODE_COLOR.getRGBA();
    }
    if (nodeColor != null) {
      gl.glColor4fv(nodeColor,0);
      renderFrame(gl,width + onePxlWidth,height + thirdOfstdDevBarHeight);
      gl.glCallList(framedEnzymeNodeDisplayListId);
    }
    if (!vertexSelectionManager.checkStatus(SelectionType.DESELECTED,vertexRep.getID())) {
      gl.glColor4f(0,0,0,0);
      renderQuad(gl,width,height);
    }
  }
  if (glPathwayView.getDetailLevel() == EDetailLevel.HIGH) {
    renderExclamationMark(gl,vertexRep,width,height);
    renderMultiMappingGlyph(gl,width,height,vertexRep);
  }
}

Fixed version (ground truth):
private void renderGeneNode(GL2 gl,PathwayVertexRep vertexRep){
  float[] nodeColor;
  float width=pixelGLConverter.getGLWidthForPixelWidth(vertexRep.getWidth());
  float height=pixelGLConverter.getGLHeightForPixelHeight(vertexRep.getHeight());
  gl.glLineWidth(1);
  gl.glEnable(GL.GL_STENCIL_TEST);
  gl.glColorMask(false,false,false,false);
  gl.glDisable(GL.GL_DEPTH_TEST);
  gl.glDisable(GL.GL_BLEND);
  gl.glStencilFunc(GL.GL_GREATER,1,0xff);
  gl.glStencilOp(GL.GL_KEEP,GL.GL_REPLACE,GL.GL_REPLACE);
  renderQuad(gl,width,height);
  gl.glDisable(GL.GL_STENCIL_TEST);
  gl.glColorMask(true,true,true,true);
  gl.glEnable(GL.GL_DEPTH_TEST);
  gl.glEnable(GL.GL_BLEND);
  if (mappingPerspective != null) {
    Average average=getExpressionAverage(mappingPerspective,vertexRep);
    if (average != null) {
      nodeColor=mappingPerspective.getDataDomain().getTable().getColorMapper().getColor((float)average.getArithmeticMean());
    }
 else {
      nodeColor=null;
    }
    if (average != null && nodeColor != null) {
      gl.glColor4f(nodeColor[0],nodeColor[1],nodeColor[2],0.8f);
      if (glPathwayView.getDetailLevel() == EDetailLevel.HIGH) {
        gl.glEnable(GL.GL_STENCIL_TEST);
        gl.glDisable(GL.GL_DEPTH_TEST);
        gl.glDisable(GL.GL_BLEND);
        gl.glStencilFunc(GL.GL_GREATER,2,0xff);
        gl.glStencilOp(GL.GL_KEEP,GL.GL_KEEP,GL.GL_KEEP);
        renderQuad(gl,width,height);
        gl.glEnable(GL.GL_DEPTH_TEST);
        gl.glDisable(GL.GL_STENCIL_TEST);
        Float stdDev=pixelGLConverter.getGLWidthForPixelWidth(PathwayRenderStyle.ENZYME_NODE_PIXEL_WIDTH) * (float)average.getStandardDeviation() * 2.0f;
        if (!stdDev.isNaN() && this.glPathwayView.isShowStdDevBars()) {
          renderStdDevBar(gl,width,height,stdDev);
        }
 else {
          int i=0;
        }
        gl.glPushMatrix();
        gl.glTranslatef(0,-(2f * thirdOfstdDevBarHeight - onePxlHeight),0);
        if (vertexSelectionManager.checkStatus(SelectionType.SELECTION,vertexRep.getID())) {
          nodeColor=SelectionType.SELECTION.getColor().getRGBA();
          gl.glColor4fv(nodeColor,0);
          renderFrame(gl,width + onePxlWidth,height + (2f * thirdOfstdDevBarHeight) - onePxlHeight);
          gl.glEnable(GL.GL_STENCIL_TEST);
          gl.glColorMask(false,false,false,false);
          gl.glDisable(GL.GL_DEPTH_TEST);
          gl.glDisable(GL.GL_BLEND);
          gl.glStencilFunc(GL.GL_GREATER,2,0xff);
          gl.glStencilOp(GL.GL_KEEP,GL.GL_REPLACE,GL.GL_REPLACE);
          renderFrame(gl,width + onePxlWidth,height + (2f * thirdOfstdDevBarHeight) - onePxlHeight);
          gl.glDisable(GL.GL_STENCIL_TEST);
          gl.glColorMask(true,true,true,true);
          gl.glEnable(GL.GL_DEPTH_TEST);
          gl.glEnable(GL.GL_BLEND);
        }
 else         if (vertexSelectionManager.checkStatus(SelectionType.MOUSE_OVER,vertexRep.getID())) {
          nodeColor=SelectionType.MOUSE_OVER.getColor().getRGBA();
          gl.glColor4fv(nodeColor,0);
          renderFrame(gl,width + onePxlWidth,height + (2f * thirdOfstdDevBarHeight) - onePxlHeight);
          gl.glEnable(GL.GL_STENCIL_TEST);
          gl.glColorMask(false,false,false,false);
          gl.glDisable(GL.GL_DEPTH_TEST);
          gl.glDisable(GL.GL_BLEND);
          gl.glStencilFunc(GL.GL_GREATER,2,0xff);
          gl.glStencilOp(GL.GL_KEEP,GL.GL_REPLACE,GL.GL_REPLACE);
          renderFrame(gl,width + onePxlWidth,height + (2f * thirdOfstdDevBarHeight) - onePxlHeight);
          gl.glDisable(GL.GL_STENCIL_TEST);
          gl.glColorMask(true,true,true,true);
          gl.glEnable(GL.GL_DEPTH_TEST);
          gl.glEnable(GL.GL_BLEND);
        }
        gl.glPopMatrix();
      }
 else {
        float dsMean=0.5f;
        float scaleConstant=20;
        if (mappingPerspective.getDataDomain().getTable() instanceof NumericalTable) {
          NumericalTable table=(NumericalTable)mappingPerspective.getDataDomain().getTable();
          dsMean=(float)table.getDatasetStatistics().getMean();
          dsMean=(float)table.getNormalizedForRaw(table.getDefaultDataTransformation(),dsMean);
        }
        float deviation=1 + Math.abs(dsMean - (float)average.getArithmeticMean()) * scaleConstant;
        if (deviation > 4)         deviation=4;
        renderQuad(gl,width * deviation,height * deviation);
        gl.glEnable(GL.GL_STENCIL_TEST);
        gl.glColorMask(false,false,false,false);
        gl.glDisable(GL.GL_DEPTH_TEST);
        gl.glDisable(GL.GL_BLEND);
        gl.glStencilFunc(GL.GL_ALWAYS,2,0xff);
        gl.glStencilOp(GL.GL_KEEP,GL.GL_KEEP,GL.GL_REPLACE);
        renderQuad(gl,width * deviation,height * deviation);
        gl.glDisable(GL.GL_STENCIL_TEST);
        gl.glColorMask(true,true,true,true);
        gl.glEnable(GL.GL_DEPTH_TEST);
        gl.glEnable(GL.GL_BLEND);
        if (vertexSelectionManager.checkStatus(SelectionType.SELECTION,vertexRep.getID())) {
          nodeColor=SelectionType.SELECTION.getColor().getRGBA();
          gl.glColor4fv(nodeColor,0);
          renderQuad(gl,width * deviation,height * deviation);
          gl.glEnable(GL.GL_STENCIL_TEST);
          gl.glColorMask(false,false,false,false);
          gl.glDisable(GL.GL_DEPTH_TEST);
          gl.glDisable(GL.GL_BLEND);
          gl.glStencilOp(GL.GL_KEEP,GL.GL_KEEP,GL.GL_REPLACE);
          gl.glStencilFunc(GL.GL_ALWAYS,2,0xff);
          renderQuad(gl,width * deviation,height * deviation);
          gl.glDisable(GL.GL_STENCIL_TEST);
          gl.glColorMask(true,true,true,true);
          gl.glEnable(GL.GL_DEPTH_TEST);
          gl.glEnable(GL.GL_BLEND);
        }
 else         if (vertexSelectionManager.checkStatus(SelectionType.MOUSE_OVER,vertexRep.getID())) {
          nodeColor=SelectionType.MOUSE_OVER.getColor().getRGBA();
          gl.glColor4fv(nodeColor,0);
          renderQuad(gl,width * deviation,height * deviation);
          gl.glEnable(GL.GL_STENCIL_TEST);
          gl.glColorMask(false,false,false,false);
          gl.glDisable(GL.GL_DEPTH_TEST);
          gl.glDisable(GL.GL_BLEND);
          gl.glStencilOp(GL.GL_KEEP,GL.GL_KEEP,GL.GL_REPLACE);
          gl.glStencilFunc(GL.GL_ALWAYS,2,0xff);
          renderQuad(gl,width * deviation,height * deviation);
          gl.glDisable(GL.GL_STENCIL_TEST);
          gl.glColorMask(true,true,true,true);
          gl.glEnable(GL.GL_DEPTH_TEST);
          gl.glEnable(GL.GL_BLEND);
        }
      }
    }
 else {
      renderNonMappingGlyph(gl,width,height);
      if (vertexSelectionManager.checkStatus(SelectionType.SELECTION,vertexRep.getID())) {
        nodeColor=SelectionType.SELECTION.getColor().getRGBA();
        gl.glColor4fv(nodeColor,0);
        renderFrame(gl,width + onePxlWidth,height + thirdOfstdDevBarHeight);
        maskFramedEnzymeNode(gl,width,height);
      }
 else       if (vertexSelectionManager.checkStatus(SelectionType.MOUSE_OVER,vertexRep.getID())) {
        nodeColor=SelectionType.MOUSE_OVER.getColor().getRGBA();
        gl.glColor4fv(nodeColor,0);
        renderFrame(gl,width + onePxlWidth,height + thirdOfstdDevBarHeight);
        maskFramedEnzymeNode(gl,width,height);
      }
    }
  }
 else {
    nodeColor=null;
    if (vertexSelectionManager.checkStatus(SelectionType.SELECTION,vertexRep.getID())) {
      nodeColor=SelectionType.SELECTION.getColor().getRGBA();
      maskFramedEnzymeNode(gl,width,height);
    }
 else     if (vertexSelectionManager.checkStatus(SelectionType.MOUSE_OVER,vertexRep.getID())) {
      nodeColor=SelectionType.MOUSE_OVER.getColor().getRGBA();
      maskFramedEnzymeNode(gl,width,height);
    }
 else     if (vertexSelectionManager.checkStatus(SelectionType.NORMAL,vertexRep.getID())) {
      nodeColor=PathwayRenderStyle.ENZYME_NODE_COLOR.getRGBA();
    }
    if (nodeColor != null) {
      gl.glColor4fv(nodeColor,0);
      renderFrame(gl,width + onePxlWidth,height + thirdOfstdDevBarHeight);
      gl.glCallList(framedEnzymeNodeDisplayListId);
    }
    if (!vertexSelectionManager.checkStatus(SelectionType.DESELECTED,vertexRep.getID())) {
      gl.glColor4f(0,0,0,0);
      renderQuad(gl,width,height);
    }
  }
  if (glPathwayView.getDetailLevel() == EDetailLevel.HIGH) {
    renderExclamationMark(gl,vertexRep,width,height);
    renderMultiMappingGlyph(gl,width,height,vertexRep);
  }
}