nus-yam/ex-repair huggingface dataset:
Program: 59203
Project: 59203
Buggy source:
public void drawView(){
  super.drawView();
  if (refGeneralManager.getSingelton().getPathwayManager().getCurrentPathway() != null) {
    if (iPathwayId != 0) {
      HashMap<Integer,Pathway> pathwayLUT=((IPathwayManager)refGeneralManager.getSingelton().getPathwayManager()).getPathwayLUT();
      refCurrentPathway=pathwayLUT.get(iPathwayId);
    }
 else {
      refCurrentPathway=refGeneralManager.getSingelton().getPathwayManager().getCurrentPathway();
    }
    extractVertices();
    extractEdges();
    finishGraphBuilding();
  }
 else   if (iPathwayLevel == 1) {
    refCurrentPathwayImageMap=refGeneralManager.getSingelton().getPathwayManager().getCurrentPathwayImageMap();
    loadBackgroundOverlayImage(refCurrentPathwayImageMap.getImageLink());
  }
  if (bGraphSet == false) {
    final Dimension dimOverviewMap=new Dimension(200,200);
    final Dimension dimPathway=new Dimension(iWidth,iHeight);
    JScrollPane refScrollPane=new JScrollPane(refPathwayGraph);
    refScrollPane.setMinimumSize(dimPathway);
    refScrollPane.setMaximumSize(dimPathway);
    refScrollPane.setPreferredSize(dimPathway);
    refScrollPane.setAlignmentX(0.5f);
    refScrollPane.setAlignmentY(0.5f);
    refEmbeddedFrame.add(refScrollPane);
    refOverviewPanel=new GPOverviewPanel(refPathwayGraph,refScrollPane);
    bGraphSet=true;
  }
}

Fixed version (ground truth):
public void drawView(){
  super.drawView();
  if (refGeneralManager.getSingelton().getPathwayManager().getCurrentPathway() != null) {
    if (iPathwayId != 0) {
      HashMap<Integer,Pathway> pathwayLUT=((IPathwayManager)refGeneralManager.getSingelton().getPathwayManager()).getPathwayLUT();
      refCurrentPathway=pathwayLUT.get(iPathwayId);
    }
 else     if (refCurrentPathway == null) {
      refCurrentPathway=refGeneralManager.getSingelton().getPathwayManager().getCurrentPathway();
    }
    extractVertices();
    extractEdges();
    finishGraphBuilding();
  }
 else   if (iPathwayLevel == 1) {
    refCurrentPathwayImageMap=refGeneralManager.getSingelton().getPathwayManager().getCurrentPathwayImageMap();
    loadBackgroundOverlayImage(refCurrentPathwayImageMap.getImageLink());
  }
  if (bGraphSet == false) {
    final Dimension dimOverviewMap=new Dimension(200,200);
    final Dimension dimPathway=new Dimension(iWidth,iHeight);
    JScrollPane refScrollPane=new JScrollPane(refPathwayGraph);
    refScrollPane.setMinimumSize(dimPathway);
    refScrollPane.setMaximumSize(dimPathway);
    refScrollPane.setPreferredSize(dimPathway);
    refScrollPane.setAlignmentX(0.5f);
    refScrollPane.setAlignmentY(0.5f);
    refEmbeddedFrame.add(refScrollPane);
    refOverviewPanel=new GPOverviewPanel(refPathwayGraph,refScrollPane);
    bGraphSet=true;
  }
}
Program: 59205
Project: 59205
Buggy source:
/** 
 * Constructor
 * @param refGeneralManager
 */
public GLCanvasPathway3D(final IGeneralManager refGeneralManager,int iViewId,int iParentContainerId,String sLabel){
  super(refGeneralManager,-1,iParentContainerId,"String_Node_Str");
  openGLCanvasDirector=refGeneralManager.getSingelton().getViewGLCanvasManager().getGLCanvasDirector(iParentContainerId);
  refSWTContainer=((SwtJoglGLCanvasViewRep)openGLCanvasDirector).getSWTContainer();
  refSWTContainer.setLayout(new GridLayout(1,false));
  new Pathway3DToolbar(refSWTContainer,this);
  this.canvas=openGLCanvasDirector.getGLCanvas();
  viewingFrame=new float[2][2];
  viewingFrame[X][MIN]=0.0f;
  viewingFrame[X][MAX]=1.0f;
  viewingFrame[Y][MIN]=0.0f;
  viewingFrame[Y][MAX]=1.0f;
  iArSelectionStorageVertexIDs=new ArrayList<PathwayVertex>();
  iArSelectionStorageNeighborDistance=new ArrayList<Integer>();
  iArPathwayNodeDisplayListIDs=new ArrayList<Integer>();
  iArPathwayEdgeDisplayListIDs=new ArrayList<Integer>();
  refHashPathwayToZLayerValue=new HashMap<Pathway,Float>();
  refHashPathwayToTexture=new HashMap<Pathway,Texture>();
}

Fixed version (ground truth):
/** 
 * Constructor
 * @param refGeneralManager
 */
public GLCanvasPathway3D(final IGeneralManager refGeneralManager,int iViewId,int iParentContainerId,String sLabel){
  super(refGeneralManager,iViewId,iParentContainerId,"String_Node_Str");
  openGLCanvasDirector=refGeneralManager.getSingelton().getViewGLCanvasManager().getGLCanvasDirector(iParentContainerId);
  refSWTContainer=((SwtJoglGLCanvasViewRep)openGLCanvasDirector).getSWTContainer();
  refSWTContainer.setLayout(new GridLayout(1,false));
  new Pathway3DToolbar(refSWTContainer,this);
  this.canvas=openGLCanvasDirector.getGLCanvas();
  viewingFrame=new float[2][2];
  viewingFrame[X][MIN]=0.0f;
  viewingFrame[X][MAX]=1.0f;
  viewingFrame[Y][MIN]=0.0f;
  viewingFrame[Y][MAX]=1.0f;
  iArSelectionStorageVertexIDs=new ArrayList<PathwayVertex>();
  iArSelectionStorageNeighborDistance=new ArrayList<Integer>();
  iArPathwayNodeDisplayListIDs=new ArrayList<Integer>();
  iArPathwayEdgeDisplayListIDs=new ArrayList<Integer>();
  refHashPathwayToZLayerValue=new HashMap<Pathway,Float>();
  refHashPathwayToTexture=new HashMap<Pathway,Texture>();
}
Program: 59206
Project: 59206
Buggy source:
public void createVertex(IPathwayVertexRep vertexRep,boolean bHightlighVertex,Color nodeColor){
  fCanvasXPos=viewingFrame[X][MIN] + (vertexRep.getXPosition() * fScalingFactorX);
  fCanvasYPos=viewingFrame[Y][MIN] + (vertexRep.getYPosition() * fScalingFactorY);
  String sShapeType=vertexRep.getShapeType();
  gl.glTranslatef(fCanvasXPos,fCanvasYPos,fZLayerValue);
  if (sShapeType.equals("String_Node_Str")) {
    if (bHightlighVertex == true) {
      gl.glColor4f(nodeColor.getRed(),nodeColor.getGreen(),nodeColor.getBlue(),1.0f);
    }
 else {
      gl.glColor4f(1.0f,0.0f,1.0f,1.0f);
    }
    gl.glCallList(iContainedPathwayNodeDisplayListId);
  }
 else   if (sShapeType.equals("String_Node_Str")) {
    if (bHightlighVertex == true) {
      gl.glColor4f(nodeColor.getRed(),nodeColor.getGreen(),nodeColor.getBlue(),1.0f);
      gl.glCallList(iHighlightedCompoundNodeDisplayListId);
    }
 else {
      gl.glColor4f(0.0f,1.0f,0.0f,1.0f);
      gl.glCallList(iCompoundNodeDisplayListId);
    }
    gl.glCallList(iCompoundNodeDisplayListId);
  }
 else   if (sShapeType.equals("String_Node_Str")) {
    if (bHightlighVertex == true) {
      gl.glColor4f(nodeColor.getRed(),nodeColor.getGreen(),nodeColor.getBlue(),1.0f);
      gl.glCallList(iHighlightedEnzymeNodeDisplayListId);
    }
 else {
      gl.glColor4f(0.53f,0.81f,1.0f,1.0f);
      gl.glCallList(iEnzymeNodeDisplayListId);
    }
  }
  gl.glTranslatef(-fCanvasXPos,-fCanvasYPos,-fZLayerValue);
}

Fixed version (ground truth):
public void createVertex(IPathwayVertexRep vertexRep,boolean bHightlighVertex,Color nodeColor){
  fCanvasXPos=viewingFrame[X][MIN] + (vertexRep.getXPosition() * fScalingFactorX);
  fCanvasYPos=viewingFrame[Y][MIN] + (vertexRep.getYPosition() * fScalingFactorY);
  String sShapeType=vertexRep.getShapeType();
  gl.glTranslatef(fCanvasXPos,fCanvasYPos,fZLayerValue);
  if (sShapeType.equals("String_Node_Str")) {
    if (bHightlighVertex == true) {
      gl.glColor4f(nodeColor.getRed(),nodeColor.getGreen(),nodeColor.getBlue(),1.0f);
    }
 else {
      gl.glColor4f(1.0f,0.0f,1.0f,1.0f);
    }
    fPathwayNodeWidth=vertexRep.getWidth() / 2.0f * fScalingFactorX;
    fPathwayNodeHeight=vertexRep.getHeight() / 2.0f * fScalingFactorY;
    fillNodeDisplayList();
  }
 else   if (sShapeType.equals("String_Node_Str")) {
    if (bHightlighVertex == true) {
      gl.glColor4f(nodeColor.getRed(),nodeColor.getGreen(),nodeColor.getBlue(),1.0f);
      gl.glCallList(iHighlightedCompoundNodeDisplayListId);
    }
 else {
      gl.glColor4f(0.0f,1.0f,0.0f,1.0f);
      gl.glCallList(iCompoundNodeDisplayListId);
    }
    gl.glCallList(iCompoundNodeDisplayListId);
  }
 else   if (sShapeType.equals("String_Node_Str")) {
    if (bHightlighVertex == true) {
      gl.glColor4f(nodeColor.getRed(),nodeColor.getGreen(),nodeColor.getBlue(),1.0f);
      gl.glCallList(iHighlightedEnzymeNodeDisplayListId);
    }
 else {
      gl.glColor4f(0.53f,0.81f,1.0f,1.0f);
      gl.glCallList(iEnzymeNodeDisplayListId);
    }
  }
  gl.glTranslatef(-fCanvasXPos,-fCanvasYPos,-fZLayerValue);
}
Program: 59207
Project: 59207
Buggy source:
public void init(GLAutoDrawable canvas){
  setInitGLDone();
  this.gl=canvas.getGL();
  gl.glEnable(GL.GL_LINE_SMOOTH);
  gl.glHint(GL.GL_LINE_SMOOTH_HINT,GL.GL_NICEST);
  gl.glHint(GL.GL_PERSPECTIVE_CORRECTION_HINT,GL.GL_NICEST);
  gl.glLineWidth(1.0f);
  float[] fMatSpecular={1.0f,1.0f,1.0f,1.0f};
  float[] fMatShininess={25.0f};
  float[] fLightPosition={-1.0f,0.0f,0.0f,1.0f};
  float[] fWhiteLight={1.0f,1.0f,1.0f,1.0f};
  float[] fModelAmbient={0.3f,0.3f,0.3f,1.0f};
  gl.glEnable(GL.GL_COLOR_MATERIAL);
  gl.glColorMaterial(GL.GL_FRONT,GL.GL_DIFFUSE);
  gl.glLightfv(GL.GL_LIGHT0,GL.GL_POSITION,fLightPosition,0);
  gl.glLightModelfv(GL.GL_LIGHT_MODEL_AMBIENT,fModelAmbient,0);
  gl.glEnable(GL.GL_LIGHTING);
  gl.glEnable(GL.GL_LIGHT0);
  gl.glClearColor(1.0f,1.0f,1.0f,1.0f);
  gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
  buildPathwayDisplayList();
}

Fixed version (ground truth):
public void init(GLAutoDrawable canvas){
  System.err.println("String_Node_Str");
  this.gl=canvas.getGL();
  gl.glEnable(GL.GL_LINE_SMOOTH);
  gl.glHint(GL.GL_LINE_SMOOTH_HINT,GL.GL_NICEST);
  gl.glHint(GL.GL_PERSPECTIVE_CORRECTION_HINT,GL.GL_NICEST);
  gl.glLineWidth(1.0f);
  float[] fMatSpecular={1.0f,1.0f,1.0f,1.0f};
  float[] fMatShininess={25.0f};
  float[] fLightPosition={-1.0f,0.0f,0.0f,1.0f};
  float[] fWhiteLight={1.0f,1.0f,1.0f,1.0f};
  float[] fModelAmbient={0.3f,0.3f,0.3f,1.0f};
  gl.glEnable(GL.GL_COLOR_MATERIAL);
  gl.glColorMaterial(GL.GL_FRONT,GL.GL_DIFFUSE);
  gl.glLightfv(GL.GL_LIGHT0,GL.GL_POSITION,fLightPosition,0);
  gl.glLightModelfv(GL.GL_LIGHT_MODEL_AMBIENT,fModelAmbient,0);
  gl.glEnable(GL.GL_LIGHTING);
  gl.glEnable(GL.GL_LIGHT0);
  gl.glClearColor(1.0f,1.0f,1.0f,1.0f);
  gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
  buildPathwayDisplayList();
  setInitGLDone();
}
Program: 59209
Project: 59209
Buggy source:
protected void buildHighlightedEnzymeNodeDisplayList(){
  iHighlightedEnzymeNodeDisplayListId=gl.glGenLists(1);
  fPathwayNodeWidth=refRenderStyle.getEnzymeNodeWidth() / 2.0f * fScalingFactorX;
  fPathwayNodeHeight=refRenderStyle.getEnzymeNodeHeight() / 2.0f * fScalingFactorY;
  gl.glNewList(iHighlightedEnzymeNodeDisplayListId,GL.GL_COMPILE);
  gl.glScaled(1.1f,1.1f,1.1f);
  fillNodeDisplayList();
  gl.glScaled(1.0f / 1.1f,1.0f / 1.1f,1.0f / 1.1f);
  gl.glEndList();
}

Fixed version (ground truth):
protected void buildHighlightedEnzymeNodeDisplayList(){
  iHighlightedEnzymeNodeDisplayListId=gl.glGenLists(1);
  fPathwayNodeWidth=refRenderStyle.getEnzymeNodeWidth() / 2.0f * fScalingFactorX;
  fPathwayNodeHeight=refRenderStyle.getEnzymeNodeHeight() / 2.0f * fScalingFactorY;
  gl.glNewList(iHighlightedEnzymeNodeDisplayListId,GL.GL_COMPILE);
  gl.glScaled(1.2f,1.2f,1.2f);
  fillNodeDisplayList();
  gl.glScaled(1.0f / 1.2f,1.0f / 1.2f,1.0f / 1.2f);
  gl.glEndList();
}
Program: 59210
Project: 59210
Buggy source:
protected void buildHighlightedCompoundNodeDisplayList(){
  iHighlightedCompoundNodeDisplayListId=gl.glGenLists(1);
  fPathwayNodeWidth=refRenderStyle.getCompoundNodeWidth() / 2.0f * fScalingFactorX;
  fPathwayNodeHeight=refRenderStyle.getCompoundNodeHeight() / 2.0f * fScalingFactorY;
  gl.glNewList(iHighlightedCompoundNodeDisplayListId,GL.GL_COMPILE);
  gl.glScaled(1.1f,1.1f,1.1f);
  fillNodeDisplayList();
  gl.glScaled(1.0f / 1.1f,1.0f / 1.1f,1.0f / 1.1f);
  gl.glEndList();
}

Fixed version (ground truth):
protected void buildHighlightedCompoundNodeDisplayList(){
  iHighlightedCompoundNodeDisplayListId=gl.glGenLists(1);
  fPathwayNodeWidth=refRenderStyle.getCompoundNodeWidth() / 2.0f * fScalingFactorX;
  fPathwayNodeHeight=refRenderStyle.getCompoundNodeHeight() / 2.0f * fScalingFactorY;
  gl.glNewList(iHighlightedCompoundNodeDisplayListId,GL.GL_COMPILE);
  gl.glScaled(1.2f,1.2f,1.2f);
  fillNodeDisplayList();
  gl.glScaled(1.0f / 1.2f,1.0f / 1.2f,1.0f / 1.2f);
  gl.glEndList();
}
Program: 59211
Project: 59211
Buggy source:
/** 
 * Constructor. Initializes the pathway render style. TODO: load pathway style from XML file.
 */
public PathwayRenderStyle(){
  enzymeNodeShape=NodeShape.RECTANGULAR;
  compoundNodeShape=NodeShape.ROUND;
  pathwayNodeShape=NodeShape.ROUNDRECTANGULAR;
  enzymeNodeColor=Color.BLUE;
  compoundNodeColor=Color.GREEN;
  pathwayNodeColor=Color.MAGENTA;
  highlightedNodeColor=Color.YELLOW;
  neighborhoodNodeColor_1=Color.RED;
  neighborhoodNodeColor_2=Color.ORANGE;
  neighborhoodNodeColor_3=Color.YELLOW;
  relationEdgeLineStyle=EdgeLineStyle.NORMAL;
  reactionEdgeLineStyle=EdgeLineStyle.NORMAL;
  maplinkEdgeLineStyle=EdgeLineStyle.DASHED;
  relationEdgeArrowHeadStyle=EdgeArrowHeadStyle.FILLED;
  reactionEdgeArrowHeadStyle=EdgeArrowHeadStyle.FILLED;
  mapEdgeArrowHeadStyle=EdgeArrowHeadStyle.EMPTY;
  relationEdgeColor=Color.GREEN;
  reactionEdgeColor=Color.BLUE;
  maplinkEdgeColor=Color.MAGENTA;
  fEnzymeNodeWidth=45;
  fEnzymeNodeHeight=17;
  fCompoundNodeWidth=8;
  fCompoundNodeHeight=8;
  fPathwayNodeWidth=70;
  fPathwayNodeHeight=27;
}

Fixed version (ground truth):
/** 
 * Constructor. Initializes the pathway render style. TODO: load pathway style from XML file.
 */
public PathwayRenderStyle(){
  enzymeNodeShape=NodeShape.RECTANGULAR;
  compoundNodeShape=NodeShape.ROUND;
  pathwayNodeShape=NodeShape.ROUNDRECTANGULAR;
  enzymeNodeColor=Color.BLUE;
  compoundNodeColor=Color.GREEN;
  pathwayNodeColor=Color.MAGENTA;
  highlightedNodeColor=Color.RED;
  neighborhoodNodeColor_1=Color.RED;
  neighborhoodNodeColor_2=Color.ORANGE;
  neighborhoodNodeColor_3=Color.YELLOW;
  relationEdgeLineStyle=EdgeLineStyle.NORMAL;
  reactionEdgeLineStyle=EdgeLineStyle.NORMAL;
  maplinkEdgeLineStyle=EdgeLineStyle.DASHED;
  relationEdgeArrowHeadStyle=EdgeArrowHeadStyle.FILLED;
  reactionEdgeArrowHeadStyle=EdgeArrowHeadStyle.FILLED;
  mapEdgeArrowHeadStyle=EdgeArrowHeadStyle.EMPTY;
  relationEdgeColor=Color.GREEN;
  reactionEdgeColor=Color.BLUE;
  maplinkEdgeColor=Color.MAGENTA;
  fEnzymeNodeWidth=45;
  fEnzymeNodeHeight=17;
  fCompoundNodeWidth=8;
  fCompoundNodeHeight=8;
  fPathwayNodeWidth=70;
  fPathwayNodeHeight=27;
}
Program: 59213
Project: 59213
Buggy source:
protected void buildContainedPathwayNodeDisplayList(){
  iContainedPathwayNodeDisplayListId=gl.glGenLists(1);
  fPathwayNodeWidth=refRenderStyle.getPathwayNodeWidth() / 2.0f * fScalingFactorX;
  fPathwayNodeHeight=refRenderStyle.getPathwayNodeHeight() / 2.0f * fScalingFactorY;
  gl.glNewList(iContainedPathwayNodeDisplayListId,GL.GL_COMPILE);
  fillNodeDisplayList();
  gl.glEndList();
}

Fixed version (ground truth):
protected void buildContainedPathwayNodeDisplayList(){
  iContainedPathwayNodeDisplayListId=gl.glGenLists(1);
  fPathwayNodeWidth=refRenderStyle.getPathwayNodeWidth() / 2.0f * fScalingFactorX;
  fPathwayNodeHeight=refRenderStyle.getPathwayNodeHeight() / 2.0f * fScalingFactorY;
  gl.glNewList(iContainedPathwayNodeDisplayListId,GL.GL_COMPILE);
  fillHighlightedNodeDisplayList();
  gl.glEndList();
}
Program: 59215
Project: 59215
Buggy source:
public void createVertex(IPathwayVertexRep vertexRep,boolean bHightlighVertex,Color nodeColor){
  fCanvasXPos=viewingFrame[X][MIN] + (vertexRep.getXPosition() * fScalingFactorX);
  fCanvasYPos=viewingFrame[Y][MIN] + (vertexRep.getYPosition() * fScalingFactorY);
  String sShapeType=vertexRep.getShapeType();
  gl.glTranslatef(fCanvasXPos,fCanvasYPos,fZLayerValue);
  if (sShapeType.equals("String_Node_Str")) {
    if (bHightlighVertex == true)     gl.glColor4f(nodeColor.getRed(),nodeColor.getGreen(),nodeColor.getBlue(),1.0f);
 else     gl.glColor4f(1.0f,0.0f,1.0f,1.0f);
    gl.glCallList(iContainedPathwayNodeDisplayListId);
  }
 else   if (sShapeType.equals("String_Node_Str")) {
    if (bHightlighVertex == true)     gl.glColor4f(nodeColor.getRed(),nodeColor.getGreen(),nodeColor.getBlue(),1.0f);
 else     gl.glColor4f(0.0f,1.0f,0.0f,1.0f);
    gl.glCallList(iCompoundNodeDisplayListId);
  }
 else   if (sShapeType.equals("String_Node_Str")) {
    if (bHightlighVertex == true)     gl.glColor4f(nodeColor.getRed(),nodeColor.getGreen(),nodeColor.getBlue(),1.0f);
 else     gl.glColor4f(0.53f,0.81f,1.0f,1.0f);
    gl.glCallList(iEnzymeNodeDisplayListId);
  }
  gl.glTranslatef(-fCanvasXPos,-fCanvasYPos,-fZLayerValue);
}

Fixed version (ground truth):
public void createVertex(IPathwayVertexRep vertexRep,boolean bHightlighVertex,Color nodeColor){
  fCanvasXPos=viewingFrame[X][MIN] + (vertexRep.getXPosition() * fScalingFactorX);
  fCanvasYPos=viewingFrame[Y][MIN] + (vertexRep.getYPosition() * fScalingFactorY);
  String sShapeType=vertexRep.getShapeType();
  gl.glTranslatef(fCanvasXPos,fCanvasYPos,fZLayerValue);
  if (sShapeType.equals("String_Node_Str")) {
    if (bHightlighVertex == true) {
      gl.glColor4f(nodeColor.getRed(),nodeColor.getGreen(),nodeColor.getBlue(),1.0f);
    }
 else {
      gl.glColor4f(1.0f,0.0f,1.0f,1.0f);
    }
    gl.glCallList(iContainedPathwayNodeDisplayListId);
  }
 else   if (sShapeType.equals("String_Node_Str")) {
    if (bHightlighVertex == true) {
      gl.glColor4f(nodeColor.getRed(),nodeColor.getGreen(),nodeColor.getBlue(),1.0f);
      gl.glCallList(iHighlightedCompoundNodeDisplayListId);
    }
 else {
      gl.glColor4f(0.0f,1.0f,0.0f,1.0f);
      gl.glCallList(iCompoundNodeDisplayListId);
    }
    gl.glCallList(iCompoundNodeDisplayListId);
  }
 else   if (sShapeType.equals("String_Node_Str")) {
    if (bHightlighVertex == true) {
      gl.glColor4f(nodeColor.getRed(),nodeColor.getGreen(),nodeColor.getBlue(),1.0f);
      gl.glCallList(iHighlightedEnzymeNodeDisplayListId);
    }
 else {
      gl.glColor4f(0.53f,0.81f,1.0f,1.0f);
      gl.glCallList(iEnzymeNodeDisplayListId);
    }
  }
  gl.glTranslatef(-fCanvasXPos,-fCanvasYPos,-fZLayerValue);
}
Program: 59216
Project: 59216
Buggy source:
public void init(GLAutoDrawable canvas){
  bInitGLcanvawsWasCalled=true;
  this.gl=canvas.getGL();
  gl.glEnable(GL.GL_LINE_SMOOTH);
  gl.glHint(GL.GL_LINE_SMOOTH_HINT,GL.GL_NICEST);
  gl.glHint(GL.GL_PERSPECTIVE_CORRECTION_HINT,GL.GL_NICEST);
  gl.glLineWidth(1.0f);
  float[] fMatSpecular={1.0f,1.0f,1.0f,1.0f};
  float[] fMatShininess={25.0f};
  float[] fLightPosition={-1.0f,0.0f,0.0f,1.0f};
  float[] fWhiteLight={1.0f,1.0f,1.0f,1.0f};
  float[] fModelAmbient={0.2f,0.2f,0.2f,1.0f};
  gl.glEnable(GL.GL_COLOR_MATERIAL);
  gl.glColorMaterial(GL.GL_FRONT,GL.GL_DIFFUSE);
  gl.glLightfv(GL.GL_LIGHT0,GL.GL_POSITION,fLightPosition,0);
  gl.glLightModelfv(GL.GL_LIGHT_MODEL_AMBIENT,fModelAmbient,0);
  gl.glEnable(GL.GL_LIGHTING);
  gl.glEnable(GL.GL_LIGHT0);
  gl.glClearColor(1.0f,1.0f,1.0f,1.0f);
  gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
  buildPathwayDisplayList();
}

Fixed version (ground truth):
public void init(GLAutoDrawable canvas){
  setInitGLDone();
  this.gl=canvas.getGL();
  gl.glEnable(GL.GL_LINE_SMOOTH);
  gl.glHint(GL.GL_LINE_SMOOTH_HINT,GL.GL_NICEST);
  gl.glHint(GL.GL_PERSPECTIVE_CORRECTION_HINT,GL.GL_NICEST);
  gl.glLineWidth(1.0f);
  float[] fMatSpecular={1.0f,1.0f,1.0f,1.0f};
  float[] fMatShininess={25.0f};
  float[] fLightPosition={-1.0f,0.0f,0.0f,1.0f};
  float[] fWhiteLight={1.0f,1.0f,1.0f,1.0f};
  float[] fModelAmbient={0.2f,0.2f,0.2f,1.0f};
  gl.glEnable(GL.GL_COLOR_MATERIAL);
  gl.glColorMaterial(GL.GL_FRONT,GL.GL_DIFFUSE);
  gl.glLightfv(GL.GL_LIGHT0,GL.GL_POSITION,fLightPosition,0);
  gl.glLightModelfv(GL.GL_LIGHT_MODEL_AMBIENT,fModelAmbient,0);
  gl.glEnable(GL.GL_LIGHTING);
  gl.glEnable(GL.GL_LIGHT0);
  gl.glClearColor(1.0f,1.0f,1.0f,1.0f);
  gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
  buildPathwayDisplayList();
}
Program: 59218
Project: 59218
Buggy source:
protected void connectVertices(IPathwayVertexRep refVertexRep1,IPathwayVertexRep refVertexRep2){
  float fZLayerValue1=0.0f;
  float fZLayerValue2=0.0f;
  Pathway refTmpPathway=null;
  Iterator<Pathway> iterDrawnPathways=null;
  iterDrawnPathways=refHashPathwayToZLayerValue.keySet().iterator();
  while (iterDrawnPathways.hasNext()) {
    refTmpPathway=iterDrawnPathways.next();
    if (refTmpPathway.isVertexInPathway(refVertexRep1.getVertex()) == true) {
      fZLayerValue1=refHashPathwayToZLayerValue.get(refTmpPathway);
    }
    if (refTmpPathway.isVertexInPathway(refVertexRep2.getVertex()) == true) {
      fZLayerValue2=refHashPathwayToZLayerValue.get(refTmpPathway);
    }
  }
  float fCanvasXPos1=viewingFrame[X][MIN] + refVertexRep1.getXPosition() * fScalingFactorX;
  float fCanvasYPos1=viewingFrame[Y][MIN] + refVertexRep1.getYPosition() * fScalingFactorY;
  float fCanvasXPos2=viewingFrame[X][MIN] + refVertexRep2.getXPosition() * fScalingFactorX;
  float fCanvasYPos2=viewingFrame[Y][MIN] + refVertexRep2.getYPosition() * fScalingFactorY;
  gl.glColor4f(1.0f,1.0f,0.0f,1.0f);
  gl.glBegin(GL.GL_LINES);
  gl.glVertex3f(fCanvasXPos1,fCanvasYPos1,fZLayerValue1);
  gl.glVertex3f(fCanvasXPos2,fCanvasYPos2,fZLayerValue2);
  gl.glEnd();
}

Fixed version (ground truth):
protected void connectVertices(IPathwayVertexRep refVertexRep1,IPathwayVertexRep refVertexRep2){
  float fZLayerValue1=0.0f;
  float fZLayerValue2=0.0f;
  Pathway refTmpPathway=null;
  Iterator<Pathway> iterDrawnPathways=null;
  Texture refPathwayTexture=null;
  float fCanvasXPos1=0.0f;
  float fCanvasYPos1=0.0f;
  float fCanvasXPos2=0.0f;
  float fCanvasYPos2=0.0f;
  iterDrawnPathways=refHashPathwayToZLayerValue.keySet().iterator();
  while (iterDrawnPathways.hasNext()) {
    refTmpPathway=iterDrawnPathways.next();
    refPathwayTexture=refHashPathwayToTexture.get(refTmpPathway);
    fPathwayTextureAspectRatio=(float)refPathwayTexture.getImageWidth() / (float)refPathwayTexture.getImageHeight();
    fScalingFactorX=fPathwayTextureAspectRatio / (float)refPathwayTexture.getImageWidth();
    fScalingFactorY=1.0f / (float)refPathwayTexture.getImageHeight();
    if (refTmpPathway.isVertexInPathway(refVertexRep1.getVertex()) == true) {
      fZLayerValue1=refHashPathwayToZLayerValue.get(refTmpPathway);
      fCanvasXPos1=viewingFrame[X][MIN] + refVertexRep1.getXPosition() * fScalingFactorX;
      fCanvasYPos1=viewingFrame[Y][MIN] + refVertexRep1.getYPosition() * fScalingFactorY;
    }
    if (refTmpPathway.isVertexInPathway(refVertexRep2.getVertex()) == true) {
      fZLayerValue2=refHashPathwayToZLayerValue.get(refTmpPathway);
      fCanvasXPos2=viewingFrame[X][MIN] + refVertexRep2.getXPosition() * fScalingFactorX;
      fCanvasYPos2=viewingFrame[Y][MIN] + refVertexRep2.getYPosition() * fScalingFactorY;
    }
  }
  gl.glColor4f(1.0f,1.0f,0.0f,1.0f);
  gl.glBegin(GL.GL_LINES);
  gl.glVertex3f(fCanvasXPos1,fCanvasYPos1,fZLayerValue1);
  gl.glVertex3f(fCanvasXPos2,fCanvasYPos2,fZLayerValue2);
  gl.glEnd();
}
Program: 59219
Project: 59219
Buggy source:
public boolean registerGLCanvasUser(final IGLCanvasUser canvas,final int iCanvasId){
  if (hashGLCanvasUser.containsKey(iCanvasId)) {
    refGeneralManager.getSingelton().logMsg("String_Node_Str" + iCanvasId + "String_Node_Str");
    return false;
  }
  if (hashGLCanvasUser.containsValue(canvas)) {
    refGeneralManager.getSingelton().logMsg("String_Node_Str" + iCanvasId + "String_Node_Str");
    return false;
  }
  hashGLCanvasUser.put(iCanvasId,canvas);
  hashGLCanvasUser_revert.put(canvas,iCanvasId);
synchronized (getClass()) {
    hashGLCanvasId_2_vecGLEventListener.put(iCanvasId,new Vector<GLEventListener>());
  }
  return true;
}

Fixed version (ground truth):
public boolean registerGLCanvasUser(final IGLCanvasUser canvas,final int iCanvasId){
  if (hashGLCanvasUser.containsKey(iCanvasId)) {
    refGeneralManager.getSingelton().logMsg("String_Node_Str" + iCanvasId + "String_Node_Str",LoggerType.MINOR_ERROR);
    return false;
  }
  if (hashGLCanvasUser.containsValue(canvas)) {
    refGeneralManager.getSingelton().logMsg("String_Node_Str" + iCanvasId + "String_Node_Str",LoggerType.MINOR_ERROR);
    return false;
  }
  hashGLCanvasUser.put(iCanvasId,canvas);
  hashGLCanvasUser_revert.put(canvas,iCanvasId);
synchronized (getClass()) {
    hashGLCanvasId_2_vecGLEventListener.put(iCanvasId,new Vector<GLEventListener>());
  }
  return true;
}
Program: 59220
Project: 59220
Buggy source:
public void init(GLAutoDrawable drawable){
  GL gl=drawable.getGL();
  System.out.println("String_Node_Str" + gl.getClass().getName());
  gl.glShadeModel(GL.GL_SMOOTH);
  gl.glClearColor(0.0f,0.0f,0.0f,0.0f);
  gl.glClearDepth(1.0f);
  gl.glEnable(GL.GL_DEPTH_TEST);
  gl.glDepthFunc(GL.GL_LEQUAL);
  gl.glHint(GL.GL_PERSPECTIVE_CORRECTION_HINT,GL.GL_NICEST);
  drawable.addMouseListener(this.refMouseHandler);
  drawable.addMouseMotionListener(this.refMouseHandler);
  if (refGLCanvasDirector != null) {
    refGLCanvasDirector.initGLCanvasUser(drawable);
  }
}

Fixed version (ground truth):
public void init(GLAutoDrawable drawable){
  GL gl=drawable.getGL();
  System.out.println("String_Node_Str" + gl.getClass().getName() + "String_Node_Str"+ this.getClass().toString());
  gl.glShadeModel(GL.GL_SMOOTH);
  gl.glClearColor(0.0f,0.0f,0.0f,0.0f);
  gl.glClearDepth(1.0f);
  gl.glEnable(GL.GL_DEPTH_TEST);
  gl.glDepthFunc(GL.GL_LEQUAL);
  gl.glHint(GL.GL_PERSPECTIVE_CORRECTION_HINT,GL.GL_NICEST);
  drawable.addMouseListener(this.refMouseHandler);
  drawable.addMouseMotionListener(this.refMouseHandler);
  if (refGLCanvasDirector != null) {
    refGLCanvasDirector.initGLCanvasUser(drawable);
  }
}
Program: 59221
Project: 59221
Buggy source:
/** 
 * @param setGeneralManager
 */
protected AGLCanvasUser(final IGeneralManager setGeneralManager,int iViewId,int iParentContainerId,String sLabel){
  super(iViewId,setGeneralManager);
  openGLCanvasDirector=setGeneralManager.getSingelton().getViewGLCanvasManager().getGLCanvasDirector(iParentContainerId);
  this.canvas=openGLCanvasDirector.getGLCanvas();
}

Fixed version (ground truth):
/** 
 * @param setGeneralManager
 */
protected AGLCanvasUser(final IGeneralManager setGeneralManager,int iViewId,int iParentContainerId,String sLabel){
}
Program: 59222
Project: 59222
Buggy source:
protected final void setInitGLDone(){
  bInitGLcanvawsWasCalled=true;
}

Fixed version (ground truth):
protected final void setInitGLDone(){
  if (bInitGLcanvawsWasCalled) {
    System.err.println("String_Node_Str" + this.getClass().getSimpleName() + "String_Node_Str"+ this.getId());
  }
 else {
    System.out.println("String_Node_Str" + this.getClass().getSimpleName() + "String_Node_Str"+ this.getId());
  }
  bInitGLcanvawsWasCalled=true;
}
Program: 59223
Project: 59223
Buggy source:
public Composite getSWTContainer(){
  return refSWTContainer;
}

Fixed version (ground truth):
/** 
 * Work around, fix as soon as possible! FIXME: Work around, fix as soon as possible
 * @deprecated work around, fix as soon as possible
 * @return
 */
public Composite getSWTContainer(){
  return refSWTContainer;
}
Program: 59224
Project: 59224
Buggy source:
public void initGLCanvasUser(GLAutoDrawable drawable){
  if (abEnableRendering.get()) {
    Iterator<IGLCanvasUser> iter=vecGLCanvasUser.iterator();
    while (iter.hasNext()) {
      IGLCanvasUser currentGLCanvasUser=iter.next();
      currentGLCanvasUser.init(drawable);
    }
  }
}

Fixed version (ground truth):
public void initGLCanvasUser(GLAutoDrawable drawable){
  if (abEnableRendering.get()) {
    Iterator<IGLCanvasUser> iter=vecGLCanvasUser.iterator();
    while (iter.hasNext()) {
      IGLCanvasUser glCanvas=iter.next();
      if (!glCanvas.isInitGLDone()) {
        glCanvas.init(drawable);
      }
    }
  }
}
Program: 59225
Project: 59225
Buggy source:
public boolean registerGLCanvasUser(final IGLCanvasUser canvas,final int iCanvasId){
  if (hashGLCanvasUser.containsKey(iCanvasId)) {
    refGeneralManager.getSingelton().logMsg("String_Node_Str" + iCanvasId + "String_Node_Str",LoggerType.MINOR_ERROR);
    return false;
  }
  if (hashGLCanvasUser.containsValue(canvas)) {
    refGeneralManager.getSingelton().logMsg("String_Node_Str" + iCanvasId + "String_Node_Str",LoggerType.MINOR_ERROR);
    return false;
  }
  hashGLCanvasUser.put(iCanvasId,canvas);
  hashGLCanvasUser_revert.put(canvas,iCanvasId);
synchronized (getClass()) {
    hashGLCanvasId_2_vecGLEventListener.put(iCanvasId,new Vector<GLEventListener>());
  }
  return true;
}

Fixed version (ground truth):
public boolean registerGLCanvasUser(final IGLCanvasUser canvas,final int iCanvasId){
  if (hashGLCanvasUser.containsKey(iCanvasId)) {
    refGeneralManager.getSingelton().logMsg("String_Node_Str" + iCanvasId + "String_Node_Str",LoggerType.MINOR_ERROR);
    return false;
  }
  if (hashGLCanvasUser.containsValue(canvas)) {
    refGeneralManager.getSingelton().logMsg("String_Node_Str" + iCanvasId + "String_Node_Str",LoggerType.MINOR_ERROR);
    return false;
  }
  hashGLCanvasUser.put(iCanvasId,canvas);
  hashGLCanvasUser_revert.put(canvas,iCanvasId);
synchronized (getClass()) {
    hashGLCanvasId_2_vecGLEventListener.put(iCanvasId,new Vector<GLEventListener>());
  }
  refGeneralManager.getSingelton().logMsg("String_Node_Str" + iCanvasId + "String_Node_Str"+ this.iUniqueId_current+ "String_Node_Str"+ this.getClass().toString(),LoggerType.FULL);
  return true;
}
Program: 59226
Project: 59226
Buggy source:
public void init(GLAutoDrawable drawable){
  GL gl=drawable.getGL();
  System.out.println("String_Node_Str" + gl.getClass().getName() + "String_Node_Str"+ this.getClass().toString());
  gl.glShadeModel(GL.GL_SMOOTH);
  gl.glClearColor(0.0f,0.0f,0.0f,0.0f);
  gl.glClearDepth(1.0f);
  gl.glEnable(GL.GL_DEPTH_TEST);
  gl.glDepthFunc(GL.GL_LEQUAL);
  gl.glHint(GL.GL_PERSPECTIVE_CORRECTION_HINT,GL.GL_NICEST);
  drawable.addMouseListener(this.refMouseHandler);
  drawable.addMouseMotionListener(this.refMouseHandler);
  if (refGLCanvasDirector != null) {
    refGLCanvasDirector.initGLCanvasUser(drawable);
  }
}

Fixed version (ground truth):
public void init(GLAutoDrawable drawable){
  GL gl=drawable.getGL();
  System.out.println("String_Node_Str" + gl.getClass().getName() + "String_Node_Str"+ this.getClass().toString());
  gl.glShadeModel(GL.GL_SMOOTH);
  gl.glClearColor(0.0f,0.0f,0.0f,0.0f);
  gl.glClearDepth(1.0f);
  gl.glEnable(GL.GL_DEPTH_TEST);
  gl.glDepthFunc(GL.GL_LEQUAL);
  gl.glHint(GL.GL_PERSPECTIVE_CORRECTION_HINT,GL.GL_NICEST);
  drawable.addMouseListener(this.refMouseHandler);
  drawable.addMouseMotionListener(this.refMouseHandler);
  if (refGLCanvasDirector != null) {
    refGLCanvasDirector.initGLCanvasUser(drawable);
  }
 else {
    System.err.println("String_Node_Str");
  }
}
Program: 59227
Project: 59227
Buggy source:
public void reshape(GLAutoDrawable drawable,final int x,final int y,final int width,final int height){
  GL gl=canvas.getGL();
  System.err.println("String_Node_Str");
  this.renderPart(gl);
}

Fixed version (ground truth):
public void reshape(GLAutoDrawable drawable,final int x,final int y,final int width,final int height){
  GL gl=canvas.getGL();
  System.out.println("String_Node_Str");
  this.renderPart(gl);
}
Program: 59228
Project: 59228
Buggy source:
public void reshapeGLCanvasUser(GLAutoDrawable drawable,final int x,final int y,final int width,final int height){
  if (abEnableRendering.get()) {
    Iterator<IGLCanvasUser> iter=vecGLCanvasUser.iterator();
    while (iter.hasNext()) {
      IGLCanvasUser glCanvas=iter.next();
      if (glCanvas.isInitGLDone()) {
        glCanvas.render(drawable);
      }
    }
  }
}

Fixed version (ground truth):
public void reshapeGLCanvasUser(GLAutoDrawable drawable,final int x,final int y,final int width,final int height){
  if (abEnableRendering.get()) {
    Iterator<IGLCanvasUser> iter=vecGLCanvasUser.iterator();
    while (iter.hasNext()) {
      IGLCanvasUser glCanvas=iter.next();
      if (glCanvas.isInitGLDone()) {
        glCanvas.reshape(drawable,x,y,width,height);
      }
    }
  }
}
Program: 59229
Project: 59229
Buggy source:
public void initGLCanvasUser(GLAutoDrawable drawable){
  if (abEnableRendering.get()) {
    Iterator<IGLCanvasUser> iter=vecGLCanvasUser.iterator();
    while (iter.hasNext()) {
      IGLCanvasUser glCanvas=iter.next();
      if (!glCanvas.isInitGLDone()) {
        glCanvas.init(drawable);
      }
    }
  }
}

Fixed version (ground truth):
public void initGLCanvasUser(GLAutoDrawable drawable){
  if (abEnableRendering.get()) {
    System.out.println("String_Node_Str" + this.getClass().toString());
    Iterator<IGLCanvasUser> iter=vecGLCanvasUser.iterator();
    while (iter.hasNext()) {
      IGLCanvasUser glCanvas=iter.next();
      if (!glCanvas.isInitGLDone()) {
        glCanvas.init(drawable);
      }
    }
  }
}
Program: 59232
Project: 59232
Buggy source:
public void loadPathwayFromFile(String sFilePath){
  refGraphModel=new DefaultGraphModel();
  refPathwayGraph.setModel(refGraphModel);
  refGraphLayoutCache.setModel(refGraphModel);
  refGraphModel.addUndoableEditListener(refUndoManager);
  refGeneralManager.getSingelton().getXmlParserManager().parseXmlFileByName(sFilePath);
  drawView();
}

Fixed version (ground truth):
public void loadPathwayFromFile(String sFilePath){
  refGraphModel=new DefaultGraphModel();
  refPathwayGraph.setModel(refGraphModel);
  refGraphLayoutCache.setModel(refGraphModel);
  refGraphModel.addUndoableEditListener(refUndoManager);
  vecVertices.removeAllElements();
  vecRelationEdges.removeAllElements();
  vecReactionEdges.removeAllElements();
  iNeighbourhoodUndoCount=0;
  bNeighbourhoodShown=false;
  refGeneralManager.getSingelton().getXmlParserManager().parseXmlFileByName(sFilePath);
  drawView();
  refGraphLayoutCache.reload();
}
Program: 59235
Project: 59235
Buggy source:
public void handleEvent(Event event){
  ToolItem clickedToolItem=(ToolItem)event.widget;
  String sToolItemIdentifier=((String)clickedToolItem.getToolTipText());
  if (sToolItemIdentifier.equals("String_Node_Str")) {
    refPathwayGraphViewRep.zoomOrig();
  }
 else   if (sToolItemIdentifier.equals("String_Node_Str")) {
    refPathwayGraphViewRep.zoomIn();
  }
 else   if (sToolItemIdentifier.equals("String_Node_Str")) {
    refPathwayGraphViewRep.zoomOut();
  }
 else   if (sToolItemIdentifier.equals("String_Node_Str")) {
  }
 else   if (sToolItemIdentifier.equals("String_Node_Str")) {
    refPathwayGraphViewRep.showOverviewMapInNewWindow(new Dimension(250,250));
  }
}

Fixed version (ground truth):
public void handleEvent(Event event){
  ToolItem clickedToolItem=(ToolItem)event.widget;
  String sToolItemIdentifier=((String)clickedToolItem.getToolTipText());
  if (sToolItemIdentifier.equals("String_Node_Str")) {
    refPathwayGraphViewRep.zoomOrig();
  }
 else   if (sToolItemIdentifier.equals("String_Node_Str")) {
    refPathwayGraphViewRep.zoomIn();
  }
 else   if (sToolItemIdentifier.equals("String_Node_Str")) {
    refPathwayGraphViewRep.zoomOut();
  }
 else   if (sToolItemIdentifier.equals("String_Node_Str")) {
    NumberInputDialog neighbourhoodInputDialog=new NumberInputDialog(refSWTContainer.getShell());
    refPathwayGraphViewRep.setNeighbourhoodDistance(neighbourhoodInputDialog.open());
  }
 else   if (sToolItemIdentifier.equals("String_Node_Str")) {
    refPathwayGraphViewRep.showOverviewMapInNewWindow(new Dimension(250,250));
  }
}
Program: 59236
Project: 59236
Buggy source:
protected void showNeighbourhood(DefaultGraphCell cell,int iDistance){
  refUndoManager.undo(refGraphLayoutCache);
  List<DefaultGraphCell> neighbourCells=refGraphLayoutCache.getNeighbours(cell,null,false,false);
  Iterator<DefaultGraphCell> cellIter=neighbourCells.iterator();
  Map<DefaultGraphCell,Map> nested=new Hashtable<DefaultGraphCell,Map>();
  Map attributeMap=new Hashtable();
  GraphConstants.setGradientColor(attributeMap,Color.red);
  DefaultGraphCell tmpCell;
  while (cellIter.hasNext()) {
    tmpCell=cellIter.next();
    nested.put(tmpCell,attributeMap);
  }
  refGraphLayoutCache.edit(nested,null,null,null);
}

Fixed version (ground truth):
protected void showNeighbourhood(DefaultGraphCell cell,int iDistance){
  List<DefaultGraphCell> neighbourCells=refGraphLayoutCache.getNeighbours(cell,null,false,false);
  Iterator<DefaultGraphCell> cellIter=neighbourCells.iterator();
  Map<DefaultGraphCell,Map> nested=new Hashtable<DefaultGraphCell,Map>();
  Map attributeMap=new Hashtable();
  GraphConstants.setGradientColor(attributeMap,new Color(1.0f,0.0f,0.0f));
  DefaultGraphCell tmpCell;
  while (cellIter.hasNext()) {
    tmpCell=cellIter.next();
    nested.put(tmpCell,attributeMap);
    for (int iDistanceCount=1; iDistanceCount < iDistance; iDistanceCount++) {
      showNeighbourhood(tmpCell,iDistance - 1);
    }
  }
  refGraphLayoutCache.edit(nested,null,null,null);
  iNeighbourhoodUndoCount++;
}
Program: 59239
Project: 59239
Buggy source:
@Override public void doCommandPart() throws CerberusRuntimeException {
  GLCanvasHistogram2D canvas=(GLCanvasHistogram2D)openGLCanvasUser;
  canvas.setOriginRotation(vec3fOrigin,vec4fRotation);
  canvas.setResolution(fResolution);
  canvas.setHistogramLength((int)fResolution[10]);
  canvas.setTargetSetId(iTargetCollectionSetId);
  canvas.setHistogramLength(200);
}

Fixed version (ground truth):
@Override public void doCommandPart() throws CerberusRuntimeException {
  GLCanvasHistogram2D canvas=(GLCanvasHistogram2D)openGLCanvasUser;
  canvas.setOriginRotation(vec3fOrigin,vec4fRotation);
  canvas.setResolution(fResolution);
  canvas.setTargetSetId(iTargetCollectionSetId);
  canvas.setHistogramLength((int)fResolution[10]);
  canvas.setHistogramLength(200);
}
Program: 59240
Project: 59240
Buggy source:
public void createHistogram(final int iHistogramLevels){
  if (targetSet == null) {
    refGeneralManager.getSingelton().getLoggerManager().logMsg("String_Node_Str",LoggerType.STATUS);
    return;
  }
  IStorage refBufferStorage=targetSet.getStorageByDimAndIndex(0,0);
  ISelection refBufferSelection=targetSet.getSelectionByDimAndIndex(0,0);
  System.out.println("String_Node_Str" + refBufferSelection.getLabel() + "String_Node_Str");
  if (refBufferStorage == null) {
    return;
  }
  HistogramStatisticsSet histogramCreatorSet=new HistogramStatisticsSet();
  histogramCreatorSet.addData(targetSet);
  histogramCreatorSet.setIntervalEqualSpacedInt(iHistogramLevels,enumCurrentHistogramMode,true,0,0);
  HistogramData refResultBuffer=histogramCreatorSet.getUpdatedHistogramData();
  listHistogramData.clear();
  if (refResultBuffer != null) {
    listHistogramData.add(refResultBuffer);
  }
}

Fixed version (ground truth):
public void createHistogram(final int iHistogramLevels){
  if (targetSet == null) {
    refGeneralManager.getSingelton().getLoggerManager().logMsg("String_Node_Str",LoggerType.STATUS);
    return;
  }
  if (iHistogramLevels < 1) {
    refGeneralManager.getSingelton().getLoggerManager().logMsg("String_Node_Str",LoggerType.FULL);
    return;
  }
  IStorage refBufferStorage=targetSet.getStorageByDimAndIndex(0,0);
  ISelection refBufferSelection=targetSet.getSelectionByDimAndIndex(0,0);
  refGeneralManager.getSingelton().getLoggerManager().logMsg("String_Node_Str" + refBufferSelection.getLabel() + "String_Node_Str",LoggerType.FULL);
  if (refBufferStorage == null) {
    return;
  }
  HistogramStatisticsSet histogramCreatorSet=new HistogramStatisticsSet();
  histogramCreatorSet.addData(targetSet);
  histogramCreatorSet.setIntervalEqualSpacedInt(iHistogramLevels,enumCurrentHistogramMode,true,0,0);
  HistogramData refResultBuffer=histogramCreatorSet.getUpdatedHistogramData();
  listHistogramData.clear();
  if (refResultBuffer != null) {
    listHistogramData.add(refResultBuffer);
  }
}
Program: 59241
Project: 59241
Buggy source:
public void createSelectionTable(int iRequestedSelectionId){
  TableItem item;
  reinitializeTable();
  iCurrentlyRequestedCollectionId=iRequestedSelectionId;
  final TableColumn offsetColumn=new TableColumn(refTable,SWT.NONE);
  offsetColumn.setText("String_Node_Str");
  final TableColumn lengthColumn=new TableColumn(refTable,SWT.NONE);
  lengthColumn.setText("String_Node_Str");
  final TableColumn multiOffsetColumn=new TableColumn(refTable,SWT.NONE);
  multiOffsetColumn.setText("String_Node_Str");
  final TableColumn multiRepeatColumn=new TableColumn(refTable,SWT.NONE);
  multiRepeatColumn.setText("String_Node_Str");
  refCurrentSelection=refSelectionManager.getItemSelection(iRequestedSelectionId);
  item=new TableItem(refTable,SWT.NONE);
  item.setText(new String[]{Integer.toString(refCurrentSelection.getOffset()),Integer.toString(refCurrentSelection.length()),Integer.toString(refCurrentSelection.getMultiOffset()),Integer.toString(refCurrentSelection.getMultiRepeat())});
  offsetColumn.pack();
  lengthColumn.pack();
  multiOffsetColumn.pack();
  multiRepeatColumn.pack();
}

Fixed version (ground truth):
public void createSelectionTable(int iRequestedSelectionId){
  TableItem item;
  reinitializeTable();
  refPreviousPageButton.setEnabled(false);
  refNextPageButton.setEnabled(false);
  iCurrentlyRequestedCollectionId=iRequestedSelectionId;
  final TableColumn offsetColumn=new TableColumn(refTable,SWT.NONE);
  offsetColumn.setText("String_Node_Str");
  final TableColumn lengthColumn=new TableColumn(refTable,SWT.NONE);
  lengthColumn.setText("String_Node_Str");
  final TableColumn multiOffsetColumn=new TableColumn(refTable,SWT.NONE);
  multiOffsetColumn.setText("String_Node_Str");
  final TableColumn multiRepeatColumn=new TableColumn(refTable,SWT.NONE);
  multiRepeatColumn.setText("String_Node_Str");
  refCurrentSelection=refSelectionManager.getItemSelection(iRequestedSelectionId);
  item=new TableItem(refTable,SWT.NONE);
  item.setText(new String[]{Integer.toString(refCurrentSelection.getOffset()),Integer.toString(refCurrentSelection.length()),Integer.toString(refCurrentSelection.getMultiOffset()),Integer.toString(refCurrentSelection.getMultiRepeat())});
  offsetColumn.pack();
  lengthColumn.pack();
  multiOffsetColumn.pack();
  multiRepeatColumn.pack();
}
Program: 59243
Project: 59243
Buggy source:
public static void main(String[] args){
  String sRawDataFileName="String_Node_Str";
  OneForAllManager oneForAllManager=new OneForAllManager(null);
  oneForAllManager.setStateSWT(true);
  oneForAllManager.initAll();
  GeneralManager generalManager=oneForAllManager.getGeneralManager();
  CmdSystemLoadFileViaImporter commandFileImporter=new CmdSystemLoadFileViaImporter(generalManager,sRawDataFileName,"String_Node_Str","String_Node_Str");
  commandFileImporter.doCommand();
  SWTGUIManagerSimple swtGuiManager=(SWTGUIManagerSimple)generalManager.getManagerByBaseType(ManagerObjectType.GUI_SWT);
  ViewManagerSimple viewManager=(ViewManagerSimple)generalManager.getManagerByBaseType(ManagerObjectType.VIEW);
  viewManager.createView(ManagerObjectType.VIEW_DATA_EXPLORER);
  swtGuiManager.runApplication();
}

Fixed version (ground truth):
public static void main(String[] args){
  String sRawDataFileName="String_Node_Str";
  OneForAllManager oneForAllManager=new OneForAllManager(null);
  oneForAllManager.setStateSWT(true);
  oneForAllManager.initAll();
  GeneralManager generalManager=oneForAllManager.getGeneralManager();
  CmdSystemLoadFileViaImporter commandFileImporter=new CmdSystemLoadFileViaImporter(generalManager,sRawDataFileName,"String_Node_Str",15101);
  commandFileImporter.doCommand();
  SWTGUIManagerSimple swtGuiManager=(SWTGUIManagerSimple)generalManager.getManagerByBaseType(ManagerObjectType.GUI_SWT);
  ViewManagerSimple viewManager=(ViewManagerSimple)generalManager.getManagerByBaseType(ManagerObjectType.VIEW);
  viewManager.createView(ManagerObjectType.VIEW_DATA_EXPLORER);
  swtGuiManager.runApplication();
}
Program: 59244
Project: 59244
Buggy source:
public static final byte[] sha1(String input) throws Exception {
  MessageDigest md=MessageDigest.getInstance("String_Node_Str");
  md.update(input.getBytes());
  return md.digest();
}

Fixed version (ground truth):
public static final byte[] sha1(String... inputs) throws Exception {
  MessageDigest md=MessageDigest.getInstance("String_Node_Str");
  for (  String input : inputs) {
    md.update(input.getBytes());
  }
  return md.digest();
}
Program: 59246
Project: 59246
Buggy source:
@Override public void set(int x,int y,A val){
  base.set(x,y,val);
  if (x < lowX && x >= base.lowX()) {
    lowX=x;
  }
  if (y < lowY && y >= base.lowY()) {
    lowY=y;
  }
  if (x > highX && x <= base.highX()) {
    highX=x + 1;
  }
  if (y > highY && y <= base.highY()) {
    highY=y + 1;
  }
}

Fixed version (ground truth):
@Override public void set(int x,int y,A val){
  base.set(x,y,val);
  if (x < lowX && x >= base.lowX()) {
    lowX=x;
  }
  if (y < lowY && y >= base.lowY()) {
    lowY=y;
  }
  if (x >= highX && x + 1 <= base.highX()) {
    highX=x + 1;
  }
  if (y >= highY && y + 1 <= base.highY()) {
    highY=y + 1;
  }
}
Program: 59247
Project: 59247
Buggy source:
@Override public void set(int x,int y,A val){
  base.set(x,y,val);
  if (x < lowX && x >= base.lowX()) {
    lowX=x;
  }
  if (y < lowY && y >= base.lowY()) {
    lowY=y;
  }
  if (x >= highX && x < base.highX()) {
    highX=x + 1;
  }
  if (y >= highY && y < base.highY()) {
    highY=y + 1;
  }
}

Fixed version (ground truth):
@Override public void set(int x,int y,A val){
  base.set(x,y,val);
  if (x < lowX && x >= base.lowX()) {
    lowX=x;
  }
  if (y < lowY && y >= base.lowY()) {
    lowY=y;
  }
  if (x > highX && x <= base.highX()) {
    highX=x + 1;
  }
  if (y > highY && y <= base.highY()) {
    highY=y + 1;
  }
}
Program: 59248
Project: 59248
Buggy source:
/** 
 * Common aggregates serialization code. Note: Values must be either a collection or a reference-type array (sorry, no primitive arrays)
 */
private static void serializeContainer(Aggregates<?> aggs,OutputStream out,Schema schema,FORMAT format,GenericRecord defaultVal,List<GenericRecord> values){
  GenericRecord aggregates=new GenericData.Record(schema);
  aggregates.put("String_Node_Str",aggs.lowX());
  aggregates.put("String_Node_Str",aggs.lowY());
  aggregates.put("String_Node_Str",aggs.highX() - aggs.lowX());
  aggregates.put("String_Node_Str",aggs.highY() - aggs.lowX());
  aggregates.put("String_Node_Str",values);
  aggregates.put("String_Node_Str",defaultVal);
  aggregates.put("String_Node_Str",0);
  aggregates.put("String_Node_Str",META);
  try {
switch (format) {
case BINARY:
      emitBinary(aggregates,schema,out);
    break;
case JSON:
  emitJSON(aggregates,schema,out);
break;
}
}
 catch (IOException e) {
throw new RuntimeException("String_Node_Str",e);
}
}

Fixed version (ground truth):
/** 
 * Common aggregates serialization code. Note: Values must be either a collection or a reference-type array (sorry, no primitive arrays)
 */
private static void serializeContainer(Aggregates<?> aggs,OutputStream out,Schema schema,FORMAT format,GenericRecord defaultVal,List<GenericRecord> values){
  GenericRecord aggregates=new GenericData.Record(schema);
  aggregates.put("String_Node_Str",aggs.lowX());
  aggregates.put("String_Node_Str",aggs.lowY());
  aggregates.put("String_Node_Str",aggs.highX() - aggs.lowX());
  aggregates.put("String_Node_Str",aggs.highY() - aggs.lowY());
  aggregates.put("String_Node_Str",values);
  aggregates.put("String_Node_Str",defaultVal);
  aggregates.put("String_Node_Str",0);
  aggregates.put("String_Node_Str",META);
  try {
switch (format) {
case BINARY:
      emitBinary(aggregates,schema,out);
    break;
case JSON:
  emitJSON(aggregates,schema,out);
break;
}
}
 catch (IOException e) {
throw new RuntimeException("String_Node_Str",e);
}
}