Program: 58977
Project: 58977
Buggy source:
private void createVertex(final GL gl,final IUniqueObject containingView,PathwayVertexGraphItemRep vertexRep,PathwayGraph containingPathway){
  float[] tmpNodeColor=null;
  gl.glPushName(generalManager.getViewGLCanvasManager().getPickingManager().getPickingID(containingView.getID(),EPickingType.PATHWAY_ELEMENT_SELECTION,vertexRep.getId()));
  EPathwayVertexShape shape=vertexRep.getShapeType();
  if (vertexRep.getAllItemsByProp(EGraphItemProperty.ALIAS_PARENT).toArray().length == 0) {
    generalManager.getLogger().log(Level.WARNING,"String_Node_Str" + vertexRep.getName() + "String_Node_Str");
    return;
  }
  EPathwayVertexType vertexType=vertexRep.getType();
  if (vertexType.equals(EPathwayVertexType.map)) {
    if (vertexRep.getName().contains("String_Node_Str"))     return;
    float fCanvasXPos=(vertexRep.getXOrigin() * PathwayRenderStyle.SCALING_FACTOR_X);
    float fCanvasYPos=(vertexRep.getYOrigin() * PathwayRenderStyle.SCALING_FACTOR_Y);
    float fNodeWidth=vertexRep.getWidth() / 2.0f * PathwayRenderStyle.SCALING_FACTOR_X;
    float fNodeHeight=vertexRep.getHeight() / 2.0f * PathwayRenderStyle.SCALING_FACTOR_Y;
    gl.glTranslatef(fCanvasXPos,-fCanvasYPos,0);
    tmpNodeColor=new float[]{0,0,0,0};
    gl.glColor4fv(tmpNodeColor,0);
    fillNodeDisplayList(gl,fNodeWidth,fNodeHeight);
    if (internalSelectionManager.checkStatus(ESelectionType.MOUSE_OVER,vertexRep.getId())) {
      tmpNodeColor=PathwayRenderStyle.MOUSE_OVER_COLOR;
      gl.glColor4fv(tmpNodeColor,0);
      fillNodeDisplayListFrame(gl,fNodeWidth,fNodeHeight);
    }
 else     if (internalSelectionManager.checkStatus(ESelectionType.SELECTION,vertexRep.getId())) {
      tmpNodeColor=PathwayRenderStyle.SELECTED_COLOR;
      gl.glColor4fv(tmpNodeColor,0);
      fillNodeDisplayListFrame(gl,fNodeWidth,fNodeHeight);
    }
    gl.glTranslatef(-fCanvasXPos,fCanvasYPos,0);
  }
 else   if (vertexType.equals(EPathwayVertexType.compound)) {
    float fCanvasXPos=(vertexRep.getXOrigin() * PathwayRenderStyle.SCALING_FACTOR_X);
    float fCanvasYPos=(vertexRep.getYOrigin() * PathwayRenderStyle.SCALING_FACTOR_Y);
    gl.glTranslatef(fCanvasXPos,-fCanvasYPos,0);
    if (internalSelectionManager.checkStatus(ESelectionType.MOUSE_OVER,vertexRep.getId())) {
      tmpNodeColor=PathwayRenderStyle.MOUSE_OVER_COLOR;
      gl.glColor4fv(tmpNodeColor,0);
      gl.glCallList(iHighlightedCompoundNodeDisplayListId);
    }
 else     if (internalSelectionManager.checkStatus(ESelectionType.SELECTION,vertexRep.getId())) {
      tmpNodeColor=PathwayRenderStyle.SELECTED_COLOR;
      gl.glColor4fv(tmpNodeColor,0);
      gl.glCallList(iHighlightedCompoundNodeDisplayListId);
    }
    tmpNodeColor=PathwayRenderStyle.COMPOUND_NODE_COLOR;
    gl.glColor4fv(tmpNodeColor,0);
    gl.glCallList(iCompoundNodeDisplayListId);
    gl.glTranslatef(-fCanvasXPos,fCanvasYPos,0);
  }
 else   if (shape.equals(EPathwayVertexShape.poly)) {
    gl.glColor4f(0,0,0,0);
    short[][] shArCoords=vertexRep.getCoords();
    gl.glBegin(GL.GL_POLYGON);
    for (int iPointIndex=0; iPointIndex < shArCoords.length; iPointIndex++) {
      gl.glVertex3f(shArCoords[iPointIndex][0] * PathwayRenderStyle.SCALING_FACTOR_X,-shArCoords[iPointIndex][1] * PathwayRenderStyle.SCALING_FACTOR_Y,Z_OFFSET);
    }
    gl.glEnd();
    tmpNodeColor=PathwayRenderStyle.ENZYME_NODE_COLOR;
    gl.glColor4fv(tmpNodeColor,0);
    gl.glLineWidth(3);
    if (internalSelectionManager.checkStatus(ESelectionType.MOUSE_OVER,vertexRep.getId())) {
      tmpNodeColor=PathwayRenderStyle.MOUSE_OVER_COLOR;
      gl.glColor4fv(tmpNodeColor,0);
      gl.glLineWidth(5);
    }
 else     if (internalSelectionManager.checkStatus(ESelectionType.SELECTION,vertexRep.getId())) {
      tmpNodeColor=PathwayRenderStyle.SELECTED_COLOR;
      gl.glColor4fv(tmpNodeColor,0);
      gl.glLineWidth(5);
    }
    gl.glBegin(GL.GL_LINE_STRIP);
    for (int iPointIndex=0; iPointIndex < shArCoords.length; iPointIndex++) {
      gl.glVertex3f(shArCoords[iPointIndex][0] * PathwayRenderStyle.SCALING_FACTOR_X,-shArCoords[iPointIndex][1] * PathwayRenderStyle.SCALING_FACTOR_Y,Z_OFFSET);
    }
    gl.glEnd();
  }
 else   if (vertexType.equals(EPathwayVertexType.gene) || vertexType.equals(EPathwayVertexType.enzyme) || vertexType.equals(EPathwayVertexType.other)) {
    float fCanvasXPos=(vertexRep.getXOrigin() * PathwayRenderStyle.SCALING_FACTOR_X);
    float fCanvasYPos=(vertexRep.getYOrigin() * PathwayRenderStyle.SCALING_FACTOR_Y);
    gl.glTranslatef(fCanvasXPos,-fCanvasYPos,0);
    int iVertexRepID=vertexRep.getId();
    gl.glColor4f(0,0,0,0);
    gl.glCallList(iEnzymeNodeDisplayListId);
    if (internalSelectionManager.checkStatus(ESelectionType.MOUSE_OVER,iVertexRepID) || internalSelectionManager.checkStatus(ESelectionType.NEIGHBORHOOD_1,iVertexRepID) || internalSelectionManager.checkStatus(ESelectionType.NEIGHBORHOOD_2,iVertexRepID)|| internalSelectionManager.checkStatus(ESelectionType.NEIGHBORHOOD_3,iVertexRepID)|| internalSelectionManager.checkStatus(ESelectionType.SELECTION,iVertexRepID)) {
      if (internalSelectionManager.checkStatus(ESelectionType.MOUSE_OVER,iVertexRepID)) {
        tmpNodeColor=PathwayRenderStyle.MOUSE_OVER_COLOR;
      }
 else       if (internalSelectionManager.checkStatus(ESelectionType.SELECTION,iVertexRepID)) {
        tmpNodeColor=PathwayRenderStyle.SELECTED_COLOR;
      }
 else       if (internalSelectionManager.checkStatus(ESelectionType.NEIGHBORHOOD_1,iVertexRepID)) {
        gl.glEnable(GL.GL_LINE_STIPPLE);
        gl.glLineStipple(4,(short)0xAAAA);
        tmpNodeColor=renderStyle.getNeighborhoodNodeColorByDepth(1);
      }
 else       if (internalSelectionManager.checkStatus(ESelectionType.NEIGHBORHOOD_2,iVertexRepID)) {
        gl.glEnable(GL.GL_LINE_STIPPLE);
        gl.glLineStipple(2,(short)0xAAAA);
        tmpNodeColor=renderStyle.getNeighborhoodNodeColorByDepth(2);
      }
 else       if (internalSelectionManager.checkStatus(ESelectionType.NEIGHBORHOOD_3,iVertexRepID)) {
        gl.glEnable(GL.GL_LINE_STIPPLE);
        gl.glLineStipple(1,(short)0xAAAA);
        tmpNodeColor=renderStyle.getNeighborhoodNodeColorByDepth(3);
      }
      gl.glColor4fv(tmpNodeColor,0);
      gl.glCallList(iHighlightedEnzymeNodeDisplayListId);
      gl.glDisable(GL.GL_LINE_STIPPLE);
    }
    gl.glTranslatef(-fCanvasXPos,fCanvasYPos,0);
  }
  gl.glPopName();
}

Fixed version (ground truth):
private void createVertex(final GL gl,final IUniqueObject containingView,PathwayVertexGraphItemRep vertexRep,PathwayGraph containingPathway){
  float[] tmpNodeColor=null;
  gl.glPushName(generalManager.getViewGLCanvasManager().getPickingManager().getPickingID(containingView.getID(),EPickingType.PATHWAY_ELEMENT_SELECTION,vertexRep.getId()));
  EPathwayVertexShape shape=vertexRep.getShapeType();
  if (vertexRep.getAllItemsByProp(EGraphItemProperty.ALIAS_PARENT).toArray().length == 0) {
    generalManager.getLogger().log(Level.WARNING,"String_Node_Str" + vertexRep.getName() + "String_Node_Str");
    return;
  }
  EPathwayVertexType vertexType=vertexRep.getType();
  if (vertexType.equals(EPathwayVertexType.map)) {
    if (vertexRep.getName().contains("String_Node_Str")) {
      gl.glPopName();
      return;
    }
    float fCanvasXPos=(vertexRep.getXOrigin() * PathwayRenderStyle.SCALING_FACTOR_X);
    float fCanvasYPos=(vertexRep.getYOrigin() * PathwayRenderStyle.SCALING_FACTOR_Y);
    float fNodeWidth=vertexRep.getWidth() / 2.0f * PathwayRenderStyle.SCALING_FACTOR_X;
    float fNodeHeight=vertexRep.getHeight() / 2.0f * PathwayRenderStyle.SCALING_FACTOR_Y;
    gl.glTranslatef(fCanvasXPos,-fCanvasYPos,0);
    tmpNodeColor=new float[]{0,0,0,0};
    gl.glColor4fv(tmpNodeColor,0);
    fillNodeDisplayList(gl,fNodeWidth,fNodeHeight);
    if (internalSelectionManager.checkStatus(ESelectionType.MOUSE_OVER,vertexRep.getId())) {
      tmpNodeColor=PathwayRenderStyle.MOUSE_OVER_COLOR;
      gl.glColor4fv(tmpNodeColor,0);
      fillNodeDisplayListFrame(gl,fNodeWidth,fNodeHeight);
    }
 else     if (internalSelectionManager.checkStatus(ESelectionType.SELECTION,vertexRep.getId())) {
      tmpNodeColor=PathwayRenderStyle.SELECTED_COLOR;
      gl.glColor4fv(tmpNodeColor,0);
      fillNodeDisplayListFrame(gl,fNodeWidth,fNodeHeight);
    }
    gl.glTranslatef(-fCanvasXPos,fCanvasYPos,0);
  }
 else   if (vertexType.equals(EPathwayVertexType.compound)) {
    float fCanvasXPos=(vertexRep.getXOrigin() * PathwayRenderStyle.SCALING_FACTOR_X);
    float fCanvasYPos=(vertexRep.getYOrigin() * PathwayRenderStyle.SCALING_FACTOR_Y);
    gl.glTranslatef(fCanvasXPos,-fCanvasYPos,0);
    if (internalSelectionManager.checkStatus(ESelectionType.MOUSE_OVER,vertexRep.getId())) {
      tmpNodeColor=PathwayRenderStyle.MOUSE_OVER_COLOR;
      gl.glColor4fv(tmpNodeColor,0);
      gl.glCallList(iHighlightedCompoundNodeDisplayListId);
    }
 else     if (internalSelectionManager.checkStatus(ESelectionType.SELECTION,vertexRep.getId())) {
      tmpNodeColor=PathwayRenderStyle.SELECTED_COLOR;
      gl.glColor4fv(tmpNodeColor,0);
      gl.glCallList(iHighlightedCompoundNodeDisplayListId);
    }
    tmpNodeColor=PathwayRenderStyle.COMPOUND_NODE_COLOR;
    gl.glColor4fv(tmpNodeColor,0);
    gl.glCallList(iCompoundNodeDisplayListId);
    gl.glTranslatef(-fCanvasXPos,fCanvasYPos,0);
  }
 else   if (shape.equals(EPathwayVertexShape.poly)) {
    gl.glColor4f(0,0,0,0);
    short[][] shArCoords=vertexRep.getCoords();
    gl.glBegin(GL.GL_POLYGON);
    for (int iPointIndex=0; iPointIndex < shArCoords.length; iPointIndex++) {
      gl.glVertex3f(shArCoords[iPointIndex][0] * PathwayRenderStyle.SCALING_FACTOR_X,-shArCoords[iPointIndex][1] * PathwayRenderStyle.SCALING_FACTOR_Y,Z_OFFSET);
    }
    gl.glEnd();
    tmpNodeColor=PathwayRenderStyle.ENZYME_NODE_COLOR;
    gl.glColor4fv(tmpNodeColor,0);
    gl.glLineWidth(3);
    if (internalSelectionManager.checkStatus(ESelectionType.MOUSE_OVER,vertexRep.getId())) {
      tmpNodeColor=PathwayRenderStyle.MOUSE_OVER_COLOR;
      gl.glColor4fv(tmpNodeColor,0);
      gl.glLineWidth(5);
    }
 else     if (internalSelectionManager.checkStatus(ESelectionType.SELECTION,vertexRep.getId())) {
      tmpNodeColor=PathwayRenderStyle.SELECTED_COLOR;
      gl.glColor4fv(tmpNodeColor,0);
      gl.glLineWidth(5);
    }
    gl.glBegin(GL.GL_LINE_STRIP);
    for (int iPointIndex=0; iPointIndex < shArCoords.length; iPointIndex++) {
      gl.glVertex3f(shArCoords[iPointIndex][0] * PathwayRenderStyle.SCALING_FACTOR_X,-shArCoords[iPointIndex][1] * PathwayRenderStyle.SCALING_FACTOR_Y,Z_OFFSET);
    }
    gl.glEnd();
  }
 else   if (vertexType.equals(EPathwayVertexType.gene) || vertexType.equals(EPathwayVertexType.enzyme) || vertexType.equals(EPathwayVertexType.other)) {
    float fCanvasXPos=(vertexRep.getXOrigin() * PathwayRenderStyle.SCALING_FACTOR_X);
    float fCanvasYPos=(vertexRep.getYOrigin() * PathwayRenderStyle.SCALING_FACTOR_Y);
    gl.glTranslatef(fCanvasXPos,-fCanvasYPos,0);
    int iVertexRepID=vertexRep.getId();
    gl.glColor4f(0,0,0,0);
    gl.glCallList(iEnzymeNodeDisplayListId);
    if (internalSelectionManager.checkStatus(ESelectionType.MOUSE_OVER,iVertexRepID) || internalSelectionManager.checkStatus(ESelectionType.NEIGHBORHOOD_1,iVertexRepID) || internalSelectionManager.checkStatus(ESelectionType.NEIGHBORHOOD_2,iVertexRepID)|| internalSelectionManager.checkStatus(ESelectionType.NEIGHBORHOOD_3,iVertexRepID)|| internalSelectionManager.checkStatus(ESelectionType.SELECTION,iVertexRepID)) {
      if (internalSelectionManager.checkStatus(ESelectionType.MOUSE_OVER,iVertexRepID)) {
        tmpNodeColor=PathwayRenderStyle.MOUSE_OVER_COLOR;
      }
 else       if (internalSelectionManager.checkStatus(ESelectionType.SELECTION,iVertexRepID)) {
        tmpNodeColor=PathwayRenderStyle.SELECTED_COLOR;
      }
 else       if (internalSelectionManager.checkStatus(ESelectionType.NEIGHBORHOOD_1,iVertexRepID)) {
        gl.glEnable(GL.GL_LINE_STIPPLE);
        gl.glLineStipple(4,(short)0xAAAA);
        tmpNodeColor=renderStyle.getNeighborhoodNodeColorByDepth(1);
      }
 else       if (internalSelectionManager.checkStatus(ESelectionType.NEIGHBORHOOD_2,iVertexRepID)) {
        gl.glEnable(GL.GL_LINE_STIPPLE);
        gl.glLineStipple(2,(short)0xAAAA);
        tmpNodeColor=renderStyle.getNeighborhoodNodeColorByDepth(2);
      }
 else       if (internalSelectionManager.checkStatus(ESelectionType.NEIGHBORHOOD_3,iVertexRepID)) {
        gl.glEnable(GL.GL_LINE_STIPPLE);
        gl.glLineStipple(1,(short)0xAAAA);
        tmpNodeColor=renderStyle.getNeighborhoodNodeColorByDepth(3);
      }
      gl.glColor4fv(tmpNodeColor,0);
      gl.glCallList(iHighlightedEnzymeNodeDisplayListId);
      gl.glDisable(GL.GL_LINE_STIPPLE);
    }
    gl.glTranslatef(-fCanvasXPos,fCanvasYPos,0);
  }
  gl.glPopName();
}