nus-yam/ex-repair huggingface dataset:
Program: 58419
Project: 58419
Buggy source:
@Override public void handleDragging(GL gl,float mouseCoordinateX,float mouseCoordinateY){
switch (draggingSelection) {
case COMPARE_SELECTION_WINDOW_SELECTION:
    handleWindowDragging(gl,mouseCoordinateX,mouseCoordinateY);
  break;
case COMPARE_SELECTION_WINDOW_ARROW_LEFT_SELECTION:
handleArrowLeftDragging(gl,mouseCoordinateX,mouseCoordinateY);
break;
case COMPARE_SELECTION_WINDOW_ARROW_RIGHT_SELECTION:
handleArrowRightDragging(gl,mouseCoordinateX,mouseCoordinateY);
break;
}
if (dragged) {
renderWindow(gl,numSelectedItemsDragging,lowestItemIndexDragging,0.5f,false);
}
}

Fixed version (ground truth):
@Override public void handleDragging(GL gl,float mouseCoordinateX,float mouseCoordinateY){
switch (draggingSelection) {
case COMPARE_SELECTION_WINDOW_SELECTION:
    handleWindowDragging(gl,mouseCoordinateX,mouseCoordinateY);
  break;
case COMPARE_SELECTION_WINDOW_ARROW_LEFT_SELECTION:
handleArrowLeftDragging(gl,mouseCoordinateX,mouseCoordinateY);
break;
case COMPARE_SELECTION_WINDOW_ARROW_RIGHT_SELECTION:
handleArrowRightDragging(gl,mouseCoordinateX,mouseCoordinateY);
break;
}
if (dragged) {
renderWindow(gl,numSelectedItemsDragging,lowestItemIndexDragging,0.5f,false,-0.05f);
}
}
Program: 58420
Project: 58420
Buggy source:
public void render(GL gl){
  renderWindow(gl,numSelectedItems,lowestItemIndex,1,true);
}

Fixed version (ground truth):
public void render(GL gl){
  renderWindow(gl,numSelectedItems,lowestItemIndex,1,true,-0.1f);
}
Program: 58421
Project: 58421
Buggy source:
private void renderBody(GL gl,Vec3f lowestItemPosition,float arrowWidth,float width,float alpha){
  gl.glPushAttrib(GL.GL_LINE_BIT | GL.GL_COLOR_BUFFER_BIT);
  float[] selectionColor=SelectionType.SELECTION.getColor();
  gl.glColor4f(selectionColor[0],selectionColor[1],selectionColor[2],alpha);
  gl.glBegin(GL.GL_POLYGON);
  gl.glVertex3f(lowestItemPosition.x() + arrowWidth,positionY,lowestItemPosition.z() - 1f);
  gl.glVertex3f(lowestItemPosition.x() + arrowWidth + width,positionY,lowestItemPosition.z() - 1f);
  gl.glVertex3f(lowestItemPosition.x() + arrowWidth + width,positionY + height,lowestItemPosition.z() - 1f);
  gl.glVertex3f(lowestItemPosition.x() + arrowWidth,positionY + height,lowestItemPosition.z() - 1f);
  gl.glEnd();
  gl.glPopAttrib();
}

Fixed version (ground truth):
private void renderBody(GL gl,Vec3f lowestItemPosition,float arrowWidth,float width,float alpha,float zOffset){
  gl.glPushAttrib(GL.GL_LINE_BIT | GL.GL_COLOR_BUFFER_BIT);
  float[] selectionColor=SelectionType.SELECTION.getColor();
  gl.glColor4f(selectionColor[0],selectionColor[1],selectionColor[2],alpha);
  gl.glBegin(GL.GL_POLYGON);
  gl.glVertex3f(lowestItemPosition.x() + arrowWidth,positionY,lowestItemPosition.z() + zOffset);
  gl.glVertex3f(lowestItemPosition.x() + arrowWidth + width,positionY,lowestItemPosition.z() + zOffset);
  gl.glVertex3f(lowestItemPosition.x() + arrowWidth + width,positionY + height,lowestItemPosition.z() + zOffset);
  gl.glVertex3f(lowestItemPosition.x() + arrowWidth,positionY + height,lowestItemPosition.z() + zOffset);
  gl.glEnd();
  gl.glPopAttrib();
}
Program: 58422
Project: 58422
Buggy source:
public void handleDragging(GL gl){
  dragAndDropController.handleDragging(gl,glMouseListener);
}

Fixed version (ground truth):
/** 
 * Handles the dragging of the current state. Call this after all rendering of the state has finished.
 * @param gl GL context.
 */
public void handleDragging(GL gl){
  dragAndDropController.handleDragging(gl,glMouseListener);
}
Program: 58423
Project: 58423
Buggy source:
public void executeDrawingPreprocessing(GL gl,boolean isDisplayListDirty){
  handleDragging(gl);
  IViewFrustum viewFrustum=view.getViewFrustum();
  if (isDisplayListDirty)   setBar.setHeight(gl,SET_BAR_HEIGHT_PORTION * viewFrustum.getHeight());
  setupLayouts();
  for (  HeatMapWrapper heatMapWrapper : heatMapWrappers) {
    if (!heatMapWrapper.isInitialized()) {
      heatMapWrapper.init(gl,glMouseListener,null,dataDomain);
    }
    heatMapWrapper.processEvents();
    heatMapWrapper.calculateDrawingParameters();
    if (isDisplayListDirty) {
      heatMapWrapper.setDisplayListDirty();
    }
  }
  setsChanged=false;
}

Fixed version (ground truth):
public void executeDrawingPreprocessing(GL gl,boolean isDisplayListDirty){
  IViewFrustum viewFrustum=view.getViewFrustum();
  if (isDisplayListDirty)   setBar.setHeight(gl,SET_BAR_HEIGHT_PORTION * viewFrustum.getHeight());
  setupLayouts();
  for (  HeatMapWrapper heatMapWrapper : heatMapWrappers) {
    if (!heatMapWrapper.isInitialized()) {
      heatMapWrapper.init(gl,glMouseListener,null,dataDomain);
    }
    heatMapWrapper.processEvents();
    heatMapWrapper.calculateDrawingParameters();
    if (isDisplayListDirty) {
      heatMapWrapper.setDisplayListDirty();
    }
  }
  setsChanged=false;
}
Program: 58424
Project: 58424
Buggy source:
public OverviewState(GLCompare view,int viewID,TextRenderer textRenderer,TextureManager textureManager,PickingManager pickingManager,GLMouseListener glMouseListener,SetBar setBar,RenderCommandFactory renderCommandFactory,EDataDomain dataDomain,IUseCase useCase,DragAndDropController dragAndDropController,CompareViewStateController compareViewStateController){
  super(view,viewID,textRenderer,textureManager,pickingManager,glMouseListener,setBar,renderCommandFactory,dataDomain,useCase,dragAndDropController,compareViewStateController);
  this.setBar.setPosition(new Vec3f(0.0f,0.0f,0.0f));
  compareConnectionRenderer=new CompareConnectionBandRenderer();
  numSetsInFocus=4;
}

Fixed version (ground truth):
public OverviewState(GLCompare view,int viewID,TextRenderer textRenderer,TextureManager textureManager,PickingManager pickingManager,GLMouseListener glMouseListener,SetBar setBar,RenderCommandFactory renderCommandFactory,EDataDomain dataDomain,IUseCase useCase,DragAndDropController dragAndDropController,CompareViewStateController compareViewStateController){
  super(view,viewID,textRenderer,textureManager,pickingManager,glMouseListener,setBar,renderCommandFactory,dataDomain,useCase,dragAndDropController,compareViewStateController);
  this.setBar.setPosition(new Vec3f(0.0f,0.0f,0.5f));
  compareConnectionRenderer=new CompareConnectionBandRenderer();
  numSetsInFocus=4;
}
Program: 58426
Project: 58426
Buggy source:
protected void finish(){
  for (int i=0; i < heatMapWrappers.size(); i++) {
    HeatMapWrapper heatMapWrapper=heatMapWrappers.get(i);
    AHeatMapLayout layout=destinationLayouts.get(i);
    heatMapWrapper.setLayout(layout);
  }
  compareViewStateController.setCurrentState(ECompareViewStateType.OVERVIEW);
  view.setDisplayListDirty();
  animationStarted=false;
}

Fixed version (ground truth):
@Override protected void finish(){
  for (int i=0; i < heatMapWrappers.size(); i++) {
    HeatMapWrapper heatMapWrapper=heatMapWrappers.get(i);
    AHeatMapLayout layout=destinationLayouts.get(i);
    heatMapWrapper.setLayout(layout);
  }
  compareViewStateController.setCurrentState(ECompareViewStateType.OVERVIEW);
  view.setDisplayListDirty();
  animationStarted=false;
}
Program: 58427
Project: 58427
Buggy source:
@Override public void handleMouseWheel(GL gl,int amount,Point wheelPoint){
  if (amount > 0) {
    DetailToOverviewTransition transition=(DetailToOverviewTransition)compareViewStateController.getState(ECompareViewStateType.DETAIL_TO_OVERVIEW_TRANSITION);
    if (indexOfHeatMapWrapperWithDendrogram != -1) {
      layouts.get(indexOfHeatMapWrapperWithDendrogram).useDendrogram(false);
      indexOfHeatMapWrapperWithDendrogram=-1;
    }
    compareViewStateController.setCurrentState(ECompareViewStateType.DETAIL_TO_OVERVIEW_TRANSITION);
    transition.init(gl);
    view.setDisplayListDirty();
  }
}

Fixed version (ground truth):
@Override public void handleMouseWheel(GL gl,int amount,Point wheelPoint){
  if (amount > 0) {
    DetailToOverviewTransition transition=(DetailToOverviewTransition)compareViewStateController.getState(ECompareViewStateType.DETAIL_TO_OVERVIEW_TRANSITION);
    indexOfHeatMapWrapperWithDendrogram=-1;
    compareViewStateController.setCurrentState(ECompareViewStateType.DETAIL_TO_OVERVIEW_TRANSITION);
    transition.init(gl);
    view.setDisplayListDirty();
  }
}
Program: 58429
Project: 58429
Buggy source:
public float getDetailHeatMapGapHeight(){
  return getDetailHeight() * DETAIL_HEATMAP_GAP_PORTION;
}

Fixed version (ground truth):
protected float getDetailHeatMapGapHeight(){
  return detailHeatMapSpacing;
}
Program: 58430
Project: 58430
Buggy source:
public void executeDrawingPreprocessing(GL gl,boolean isDisplayListDirty){
  IViewFrustum viewFrustum=view.getViewFrustum();
  if (isDisplayListDirty)   setBar.setHeight(gl,SET_BAR_HEIGHT_PORTION * viewFrustum.getHeight());
  setupLayouts();
  for (  HeatMapWrapper heatMapWrapper : heatMapWrappers) {
    if (!heatMapWrapper.isInitialized()) {
      heatMapWrapper.init(gl,glMouseListener,null,dataDomain);
    }
    heatMapWrapper.processEvents();
    heatMapWrapper.calculateDrawingParameters();
    if (isDisplayListDirty) {
      heatMapWrapper.setDisplayListDirty();
    }
  }
  setsChanged=false;
}

Fixed version (ground truth):
public void executeDrawingPreprocessing(GL gl,boolean isDisplayListDirty){
  handleDragging(gl);
  IViewFrustum viewFrustum=view.getViewFrustum();
  if (isDisplayListDirty)   setBar.setHeight(gl,SET_BAR_HEIGHT_PORTION * viewFrustum.getHeight());
  setupLayouts();
  for (  HeatMapWrapper heatMapWrapper : heatMapWrappers) {
    if (!heatMapWrapper.isInitialized()) {
      heatMapWrapper.init(gl,glMouseListener,null,dataDomain);
    }
    heatMapWrapper.processEvents();
    heatMapWrapper.calculateDrawingParameters();
    if (isDisplayListDirty) {
      heatMapWrapper.setDisplayListDirty();
    }
  }
  setsChanged=false;
}
Program: 58431
Project: 58431
Buggy source:
@Override public void drawActiveElements(GL gl){
  for (  HeatMapWrapper heatMapWrapper : heatMapWrappers) {
    if (heatMapWrapper.handleDragging(gl,glMouseListener)) {
      view.setDisplayListDirty();
    }
  }
  for (  HeatMapWrapper heatMapWrapper : heatMapWrappers) {
    if (heatMapWrapper.isNewSelection()) {
      for (      HeatMapWrapper wrapper : heatMapWrappers) {
        if (wrapper != heatMapWrapper) {
          wrapper.choosePassiveHeatMaps(relations.getMapping(heatMapWrapper.getSet()),heatMapWrapper.getContentVAsOfHeatMaps());
        }
      }
      view.setDisplayListDirty();
      break;
    }
  }
  for (  HeatMapWrapper heatMapWrapper : heatMapWrappers) {
    heatMapWrapper.drawRemoteItems(gl,glMouseListener,pickingManager);
  }
  dragAndDropController.handleDragging(gl,glMouseListener);
}

Fixed version (ground truth):
@Override public void drawActiveElements(GL gl){
  for (  HeatMapWrapper heatMapWrapper : heatMapWrappers) {
    if (heatMapWrapper.handleDragging(gl,glMouseListener)) {
      view.setDisplayListDirty();
    }
  }
  for (  HeatMapWrapper heatMapWrapper : heatMapWrappers) {
    if (heatMapWrapper.isNewSelection()) {
      for (      HeatMapWrapper wrapper : heatMapWrappers) {
        if (wrapper != heatMapWrapper) {
          wrapper.choosePassiveHeatMaps(relations.getMapping(heatMapWrapper.getSet()),heatMapWrapper.getContentVAsOfHeatMaps());
        }
      }
      view.setDisplayListDirty();
      break;
    }
  }
  for (  HeatMapWrapper heatMapWrapper : heatMapWrappers) {
    heatMapWrapper.drawRemoteItems(gl,glMouseListener,pickingManager);
  }
}
Program: 58432
Project: 58432
Buggy source:
@Override public void drawActiveElements(GL gl){
  for (  HeatMapWrapper heatMapWrapper : heatMapWrappers) {
    heatMapWrapper.drawRemoteItems(gl,glMouseListener,pickingManager);
  }
  dragAndDropController.handleDragging(gl,glMouseListener);
}

Fixed version (ground truth):
@Override public void drawActiveElements(GL gl){
  for (  HeatMapWrapper heatMapWrapper : heatMapWrappers) {
    heatMapWrapper.drawRemoteItems(gl,glMouseListener,pickingManager);
  }
}
Program: 58433
Project: 58433
Buggy source:
@Override public void handleSelectionUpdate(final ISelectionDelta selectionDelta,final boolean scrollToSelection,final String info){
  parentComposite.getDisplay().asyncExec(new Runnable(){
    public void run(){
      updateContentTree();
    }
  }
);
}

Fixed version (ground truth):
@Override public void handleSelectionUpdate(final ISelectionDelta selectionDelta,final boolean scrollToSelection,final String info){
  contentSelectionManager.setDelta(selectionDelta);
  parentComposite.getDisplay().asyncExec(new Runnable(){
    public void run(){
      updateContentTree();
    }
  }
);
}
Program: 58435
Project: 58435
Buggy source:
@Override public int getNumberOfElements(SelectionType selectionType){
  int size=0;
  Set<Integer> elements=super.getElements(selectionType);
  for (  Integer element : elements) {
    if (virtualArray.containsElement(element) != 0)     size++;
  }
  return size;
}

Fixed version (ground truth):
@Override public int getNumberOfElements(SelectionType selectionType){
  int size=0;
  Set<Integer> elements=super.getElements(selectionType);
  if (elements == null)   return 0;
  for (  Integer element : elements) {
    if (virtualArray.containsElement(element) != 0)     size++;
  }
  return size;
}
Program: 58437
Project: 58437
Buggy source:
public void render(GL gl){
  float yPosition=y;
  float xPosition=0;
  float fieldHeight=0;
  gl.glColor3f(0.6f,0.6f,0.6f);
  gl.glLineWidth(2);
  if (!heatMap.isCaptionsImpossible()) {
    ContentVirtualArray contentVA=heatMap.getContentVA();
    for (    Integer iContentIndex : contentVA) {
      if (heatMap.getContentSelectionManager().checkStatus(SelectionType.SELECTION,iContentIndex) || heatMap.getContentSelectionManager().checkStatus(SelectionType.MOUSE_OVER,iContentIndex)) {
        fieldHeight=selectedFieldHeight;
      }
 else       if (heatMap.isHideElements() && heatMap.getContentSelectionManager().checkStatus(GLHeatMap.SELECTION_HIDDEN,iContentIndex)) {
        continue;
      }
 else {
        fieldHeight=normalFieldHeight;
      }
      gl.glBegin(GL.GL_LINE_STRIP);
      gl.glVertex3f(xPosition,yPosition,0);
      gl.glVertex3f(xPosition + x,yPosition,0);
      gl.glEnd();
      yPosition-=fieldHeight;
    }
  }
  gl.glBegin(GL.GL_LINE_STRIP);
  gl.glVertex3f(0,0,0);
  gl.glVertex3f(x,0,0);
  gl.glVertex3f(x,y,0);
  gl.glVertex3f(0,y,0);
  gl.glEnd();
}

Fixed version (ground truth):
public void render(GL gl){
  float yPosition=y;
  float xPosition=0;
  float fieldHeight=0;
  gl.glColor3f(0.6f,0.6f,0.6f);
  gl.glLineWidth(2);
  if (!heatMap.isCaptionsImpossible()) {
    ContentVirtualArray contentVA=heatMap.getContentVA();
    for (    Integer iContentIndex : contentVA) {
      if (heatMap.isHideElements() && heatMap.getContentSelectionManager().checkStatus(GLHeatMap.SELECTION_HIDDEN,iContentIndex)) {
        continue;
      }
 else       if (heatMap.getContentSelectionManager().checkStatus(SelectionType.SELECTION,iContentIndex) || heatMap.getContentSelectionManager().checkStatus(SelectionType.MOUSE_OVER,iContentIndex)) {
        fieldHeight=selectedFieldHeight;
      }
 else {
        fieldHeight=normalFieldHeight;
      }
      gl.glBegin(GL.GL_LINE_STRIP);
      gl.glVertex3f(xPosition,yPosition,0);
      gl.glVertex3f(xPosition + x,yPosition,0);
      gl.glEnd();
      yPosition-=fieldHeight;
    }
  }
  gl.glBegin(GL.GL_LINE_STRIP);
  gl.glVertex3f(0,0,0);
  gl.glVertex3f(x,0,0);
  gl.glVertex3f(x,y,0);
  gl.glVertex3f(0,y,0);
  gl.glEnd();
}
Program: 58438
Project: 58438
Buggy source:
public void render(GL gl){
  float yPosition=y;
  float xPosition=0;
  float fieldHeight=0;
  SelectionType currentType;
  float fColumnDegrees=0;
  float fLineDegrees=0;
  fColumnDegrees=90;
  fLineDegrees=0;
  boolean bRenderRefSeq=false;
  String sContent=null;
  String refSeq=null;
  ContentVirtualArray contentVA=heatMap.getContentVA();
  for (  Integer iContentIndex : contentVA) {
    boolean isSelected;
    if (heatMap.getContentSelectionManager().checkStatus(SelectionType.SELECTION,iContentIndex) || heatMap.getContentSelectionManager().checkStatus(SelectionType.MOUSE_OVER,iContentIndex)) {
      fieldHeight=selectedFieldHeight;
      currentType=SelectionType.SELECTION;
      isSelected=true;
    }
 else     if (heatMap.isHideElements() && heatMap.getContentSelectionManager().checkStatus(GLHeatMap.SELECTION_HIDDEN,iContentIndex)) {
      continue;
    }
 else {
      fieldHeight=normalFieldHeight;
      currentType=SelectionType.NORMAL;
      isSelected=false;
      if (heatMap.isCaptionsImpossible()) {
        yPosition-=fieldHeight;
        continue;
      }
    }
    yPosition-=fieldHeight;
    sContent=getID(iContentIndex,false);
    if (sContent == null)     sContent="String_Node_Str";
    textRenderer.setColor(0,0,0,1);
    renderCaption(gl,sContent,0,yPosition,0,fFontScaling);
  }
}

Fixed version (ground truth):
public void render(GL gl){
  float yPosition=y;
  float xPosition=0;
  float fieldHeight=0;
  SelectionType currentType;
  float fColumnDegrees=0;
  float fLineDegrees=0;
  fColumnDegrees=90;
  fLineDegrees=0;
  boolean bRenderRefSeq=false;
  String sContent=null;
  String refSeq=null;
  ContentVirtualArray contentVA=heatMap.getContentVA();
  for (  Integer iContentIndex : contentVA) {
    boolean isSelected;
    if (heatMap.isHideElements() && heatMap.getContentSelectionManager().checkStatus(GLHeatMap.SELECTION_HIDDEN,iContentIndex)) {
      continue;
    }
 else     if (heatMap.getContentSelectionManager().checkStatus(SelectionType.SELECTION,iContentIndex) || heatMap.getContentSelectionManager().checkStatus(SelectionType.MOUSE_OVER,iContentIndex)) {
      fieldHeight=selectedFieldHeight;
      currentType=SelectionType.SELECTION;
      isSelected=true;
    }
 else {
      fieldHeight=normalFieldHeight;
      currentType=SelectionType.NORMAL;
      isSelected=false;
      if (heatMap.isCaptionsImpossible()) {
        yPosition-=fieldHeight;
        continue;
      }
    }
    yPosition-=fieldHeight;
    sContent=getID(iContentIndex,false);
    if (sContent == null)     sContent="String_Node_Str";
    textRenderer.setColor(0,0,0,1);
    renderCaption(gl,sContent,0,yPosition,0,fFontScaling);
  }
}
Program: 58439
Project: 58439
Buggy source:
public void renderSelection(final GL gl,SelectionType selectionType){
  Set<Integer> selectedSet=heatMap.getContentSelectionManager().getElements(selectionType);
  float width=x;
  float yPosition=y;
  float xPosition=0;
  if (selectionType == SelectionType.SELECTION) {
    gl.glColor4fv(SELECTED_COLOR,0);
    gl.glLineWidth(SELECTED_LINE_WIDTH);
  }
 else   if (selectionType == SelectionType.MOUSE_OVER) {
    gl.glColor4fv(MOUSE_OVER_COLOR,0);
    gl.glLineWidth(MOUSE_OVER_LINE_WIDTH);
  }
  int lineIndex=0;
  for (  int tempLine : heatMap.getContentVA()) {
    for (    Integer currentLine : selectedSet) {
      if (currentLine == tempLine) {
        yPosition=contentSpacing.yDistances.get(lineIndex);
        xPosition=0;
        gl.glPushName(heatMap.getPickingManager().getPickingID(heatMap.getID(),EPickingType.HEAT_MAP_LINE_SELECTION,currentLine));
        gl.glBegin(GL.GL_LINE_LOOP);
        gl.glVertex3f(xPosition,yPosition,SELECTION_Z);
        gl.glVertex3f(xPosition,yPosition + selectedFieldHeight,SELECTION_Z);
        gl.glVertex3f(xPosition + width,yPosition + selectedFieldHeight,SELECTION_Z);
        gl.glVertex3f(xPosition + width,yPosition,SELECTION_Z);
        gl.glEnd();
        gl.glPopName();
      }
    }
    lineIndex++;
  }
}

Fixed version (ground truth):
public void renderSelection(final GL gl,SelectionType selectionType){
  Set<Integer> selectedSet=heatMap.getContentSelectionManager().getElements(selectionType);
  float width=x;
  float yPosition=y;
  float xPosition=0;
  if (selectionType == SelectionType.SELECTION) {
    gl.glColor4fv(SELECTED_COLOR,0);
    gl.glLineWidth(SELECTED_LINE_WIDTH);
  }
 else   if (selectionType == SelectionType.MOUSE_OVER) {
    gl.glColor4fv(MOUSE_OVER_COLOR,0);
    gl.glLineWidth(MOUSE_OVER_LINE_WIDTH);
  }
  int lineIndex=0;
  for (  int tempLine : heatMap.getContentVA()) {
    if (heatMap.getContentSelectionManager().checkStatus(GLHeatMap.SELECTION_HIDDEN,tempLine))     continue;
    for (    Integer currentLine : selectedSet) {
      if (currentLine == tempLine) {
        yPosition=contentSpacing.yDistances.get(lineIndex);
        xPosition=0;
        gl.glPushName(heatMap.getPickingManager().getPickingID(heatMap.getID(),EPickingType.HEAT_MAP_LINE_SELECTION,currentLine));
        gl.glBegin(GL.GL_LINE_LOOP);
        gl.glVertex3f(xPosition,yPosition,SELECTION_Z);
        gl.glVertex3f(xPosition,yPosition + selectedFieldHeight,SELECTION_Z);
        gl.glVertex3f(xPosition + width,yPosition + selectedFieldHeight,SELECTION_Z);
        gl.glVertex3f(xPosition + width,yPosition,SELECTION_Z);
        gl.glEnd();
        gl.glPopName();
      }
    }
    lineIndex++;
  }
}
Program: 58440
Project: 58440
Buggy source:
public void render(final GL gl){
  contentSpacing.yDistances.clear();
  float yPosition=y;
  float xPosition=0;
  float fieldHeight=0;
  int iCount=0;
  for (  Integer iContentIndex : heatMap.getContentVA()) {
    iCount++;
    if (heatMap.getContentSelectionManager().checkStatus(SelectionType.SELECTION,iContentIndex) || heatMap.getContentSelectionManager().checkStatus(SelectionType.MOUSE_OVER,iContentIndex)) {
      fieldHeight=selectedFieldHeight;
    }
 else     if (heatMap.isHideElements() && heatMap.getContentSelectionManager().checkStatus(GLHeatMap.SELECTION_HIDDEN,iContentIndex)) {
      contentSpacing.yDistances.add(yPosition);
      continue;
    }
 else {
      fieldHeight=normalFieldHeight;
    }
    yPosition-=fieldHeight;
    xPosition=0;
    for (    Integer iStorageIndex : heatMap.getStorageVA()) {
      renderElement(gl,iStorageIndex,iContentIndex,yPosition,xPosition,fieldHeight,fieldWidth);
      xPosition+=fieldWidth;
    }
    contentSpacing.yDistances.add(yPosition);
  }
}

Fixed version (ground truth):
public void render(final GL gl){
  contentSpacing.yDistances.clear();
  float yPosition=y;
  float xPosition=0;
  float fieldHeight=0;
  int iCount=0;
  for (  Integer iContentIndex : heatMap.getContentVA()) {
    iCount++;
    if (heatMap.isHideElements() && heatMap.getContentSelectionManager().checkStatus(GLHeatMap.SELECTION_HIDDEN,iContentIndex)) {
      contentSpacing.yDistances.add(yPosition);
      continue;
    }
 else     if (heatMap.getContentSelectionManager().checkStatus(SelectionType.SELECTION,iContentIndex) || heatMap.getContentSelectionManager().checkStatus(SelectionType.MOUSE_OVER,iContentIndex)) {
      fieldHeight=selectedFieldHeight;
    }
 else {
      fieldHeight=normalFieldHeight;
    }
    yPosition-=fieldHeight;
    xPosition=0;
    for (    Integer iStorageIndex : heatMap.getStorageVA()) {
      renderElement(gl,iStorageIndex,iContentIndex,yPosition,xPosition,fieldHeight,fieldWidth);
      xPosition+=fieldWidth;
    }
    contentSpacing.yDistances.add(yPosition);
  }
}
Program: 58441
Project: 58441
Buggy source:
@Override public void display(GL gl){
  compareViewStateController.drawActiveElements(gl);
  gl.glCallList(iGLDisplayListToCall);
  if (!isRenderedRemote())   contextMenu.render(gl,this);
}

Fixed version (ground truth):
@Override public void display(GL gl){
  compareViewStateController.drawActiveElements(gl);
  if (bIsDisplayListDirtyLocal) {
    bIsDisplayListDirtyLocal=false;
    buildDisplayList(gl,iGLDisplayListIndexLocal);
    iGLDisplayListToCall=iGLDisplayListIndexLocal;
  }
  gl.glCallList(iGLDisplayListToCall);
  if (!isRenderedRemote())   contextMenu.render(gl,this);
  checkForHits(gl);
}
Program: 58442
Project: 58442
Buggy source:
@Override public void displayLocal(GL gl){
  processEvents();
  if (wasMouseWheeled) {
    wasMouseWheeled=false;
    compareViewStateController.handleMouseWheel(gl,wheelAmount,wheelPoint);
  }
  if (!isVisible())   return;
  pickingManager.handlePicking(this,gl);
  compareViewStateController.executeDrawingPreprocessing(gl,bIsDisplayListDirtyLocal);
  if (bIsDisplayListDirtyLocal) {
    bIsDisplayListDirtyLocal=false;
    buildDisplayList(gl,iGLDisplayListIndexLocal);
  }
  iGLDisplayListToCall=iGLDisplayListIndexLocal;
  display(gl);
  checkForHits(gl);
}

Fixed version (ground truth):
@Override public void displayLocal(GL gl){
  processEvents();
  if (wasMouseWheeled) {
    wasMouseWheeled=false;
    compareViewStateController.handleMouseWheel(gl,wheelAmount,wheelPoint);
  }
  if (!isVisible())   return;
  pickingManager.handlePicking(this,gl);
  compareViewStateController.executeDrawingPreprocessing(gl,bIsDisplayListDirtyLocal);
  display(gl);
}
Program: 58443
Project: 58443
Buggy source:
@Override public void displayRemote(GL gl){
  if (bIsDisplayListDirtyRemote) {
    bIsDisplayListDirtyRemote=false;
    buildDisplayList(gl,iGLDisplayListIndexRemote);
  }
  iGLDisplayListToCall=iGLDisplayListIndexRemote;
  display(gl);
  checkForHits(gl);
}

Fixed version (ground truth):
@Override public void displayRemote(GL gl){
  throw new IllegalStateException("String_Node_Str");
}
Program: 58444
Project: 58444
Buggy source:
private Float getDetailYCoordinateByContentID(int contentID){
  Group group=getGroupFromContentIndex(contentVA.indexOf(contentID));
  if (group == null)   return null;
  int groupIndex=group.getGroupIndex();
  GLHeatMap heatMap=hashHeatMaps.get(groupIndex);
  if (heatMap == null)   return null;
  int contentIndex=heatMap.getContentVA().indexOf(contentID);
  if (contentIndex == -1)   return null;
  Vec3f heatMapPosition=hashHeatMapPositions.get(groupIndex);
  int numTotalSamples=0;
  float totalHeatMapOverheadSpacing=0;
  for (  Group tempGroup : selectedGroups.keySet()) {
    GLHeatMap tempHeatMap=hashHeatMaps.get(tempGroup.getGroupIndex());
    numTotalSamples+=tempHeatMap.getNumberOfVisibleElements();
    totalHeatMapOverheadSpacing+=tempHeatMap.getRequiredOverheadSpacing();
  }
  float heatMapHeight=layout.getDetailHeatMapHeight(heatMap.getNumberOfVisibleElements(),numTotalSamples,selectedGroups.size(),heatMap.getRequiredOverheadSpacing(),totalHeatMapOverheadSpacing);
  Float elementInHMPosition=heatMap.getYCoordinateByContentIndex(contentIndex);
  if (elementInHMPosition == null)   return null;
 else   return heatMapPosition.y() + (heatMapHeight - elementInHMPosition);
}

Fixed version (ground truth):
private Float getDetailYCoordinateByContentID(int contentID){
  Group group=getGroupFromContentIndex(contentVA.indexOf(contentID));
  if (group == null)   return null;
  int groupIndex=group.getGroupIndex();
  GLHeatMap heatMap=hashHeatMaps.get(groupIndex);
  if (heatMap == null)   return null;
  int contentIndex=heatMap.getContentVA().indexOf(contentID);
  if (contentIndex == -1)   return null;
  Vec3f heatMapPosition=hashHeatMapPositions.get(groupIndex);
  int numTotalSamples=0;
  float totalHeatMapOverheadSpacing=0;
  for (  Group tempGroup : selectedGroups.keySet()) {
    GLHeatMap tempHeatMap=hashHeatMaps.get(tempGroup.getGroupIndex());
    numTotalSamples+=tempHeatMap.getNumberOfVisibleElements();
    totalHeatMapOverheadSpacing+=tempHeatMap.getRequiredOverheadSpacing();
  }
  float heatMapHeight=layout.getDetailHeatMapHeight(heatMap.getNumberOfVisibleElements(),numTotalSamples,selectedGroups.size(),heatMap.getRequiredOverheadSpacing(),totalHeatMapOverheadSpacing);
  Float elementInHMPosition=heatMap.getYCoordinateByContentIndex(contentIndex);
  if (elementInHMPosition == null)   return null;
 else {
    heatMap.getYCoordinateByContentIndex(contentIndex);
    return heatMapPosition.y() + (heatMapHeight - elementInHMPosition);
  }
}
Program: 58445
Project: 58445
Buggy source:
@Override public void drawActiveElements(GL gl){
  for (  HeatMapWrapper heatMapWrapper : heatMapWrappers) {
    if (heatMapWrapper.handleDragging(gl,glMouseListener)) {
      view.setDisplayListDirty();
    }
  }
  for (  HeatMapWrapper heatMapWrapper : heatMapWrappers) {
    if (heatMapWrapper.isNewSelection()) {
      for (      HeatMapWrapper wrapper : heatMapWrappers) {
        if (wrapper != heatMapWrapper) {
          wrapper.selectGroupsFromContentVAList(relations.getMapping(heatMapWrapper.getSet()),heatMapWrapper.getContentVAsOfHeatMaps());
        }
      }
      view.setDisplayListDirty();
      break;
    }
  }
  for (  HeatMapWrapper heatMapWrapper : heatMapWrappers) {
    heatMapWrapper.drawRemoteItems(gl,glMouseListener,pickingManager);
  }
  dragAndDropController.handleDragging(gl,glMouseListener);
}

Fixed version (ground truth):
@Override public void drawActiveElements(GL gl){
  for (  HeatMapWrapper heatMapWrapper : heatMapWrappers) {
    if (heatMapWrapper.handleDragging(gl,glMouseListener)) {
      view.setDisplayListDirty();
    }
  }
  for (  HeatMapWrapper heatMapWrapper : heatMapWrappers) {
    if (heatMapWrapper.isNewSelection()) {
      for (      HeatMapWrapper wrapper : heatMapWrappers) {
        if (wrapper != heatMapWrapper) {
          wrapper.choosePassiveHeatMaps(relations.getMapping(heatMapWrapper.getSet()),heatMapWrapper.getContentVAsOfHeatMaps());
        }
      }
      view.setDisplayListDirty();
      break;
    }
  }
  for (  HeatMapWrapper heatMapWrapper : heatMapWrappers) {
    heatMapWrapper.drawRemoteItems(gl,glMouseListener,pickingManager);
  }
  dragAndDropController.handleDragging(gl,glMouseListener);
}
Program: 58446
Project: 58446
Buggy source:
@Override protected void handlePickingEvents(EPickingType ePickingType,EPickingMode pickingMode,int iExternalID,Pick pick){
  if (detailLevel == EDetailLevel.VERY_LOW) {
    return;
  }
  if (bRectangleSelection)   return;
  SelectionType selectionType;
switch (ePickingType) {
case SCATTER_POINT_SELECTION:
    if (bMainViewZoomDragged)     return;
  iCurrentMouseOverElement=iExternalID;
switch (pickingMode) {
case CLICKED:
  selectionType=SelectionType.SELECTION;
break;
case MOUSE_OVER:
selectionType=SelectionType.MOUSE_OVER;
break;
case RIGHT_CLICKED:
selectionType=SelectionType.DESELECTED;
break;
case DRAGGED:
selectionType=SelectionType.SELECTION;
break;
default :
return;
}
createContentSelection(selectionType,iExternalID);
break;
case SCATTER_MATRIX_SELECTION:
iCurrentMouseOverElement=iExternalID;
switch (pickingMode) {
case CLICKED:
selectionType=SelectionType.SELECTION;
break;
case RIGHT_CLICKED:
selectionType=SelectionType.DESELECTED;
break;
case MOUSE_OVER:
selectionType=SelectionType.MOUSE_OVER;
break;
default :
return;
}
createStorageSelection(selectionType,iExternalID);
break;
case SCATTER_MAIN_ZOOM:
switch (pickingMode) {
case CLICKED:
if (!bMainViewZoomDragged) {
bMainViewZoomDragged=true;
iCurrentDragZoom=iExternalID;
opengl.glNewList(iGLDisplayListIndexCoord,GL.GL_COMPILE);
opengl.glEndList();
opengl.glNewList(iGLDisplayListIndexLocal,GL.GL_COMPILE);
opengl.glEndList();
opengl.glNewList(iGLDisplayListIndexSelection,GL.GL_COMPILE);
opengl.glEndList();
opengl.glNewList(iGLDisplayListIndexMouseOver,GL.GL_COMPILE);
opengl.glEndList();
}
break;
default :
return;
}
break;
}
}

Fixed version (ground truth):
@Override protected void handlePickingEvents(EPickingType ePickingType,EPickingMode pickingMode,int iExternalID,Pick pick){
  if (detailLevel == EDetailLevel.VERY_LOW) {
    return;
  }
  if (bRectangleSelection)   return;
  SelectionType selectionType;
switch (ePickingType) {
case SCATTER_POINT_SELECTION:
    if (bMainViewZoomDragged)     return;
switch (pickingMode) {
case CLICKED:
    selectionType=SelectionType.SELECTION;
  break;
case MOUSE_OVER:
selectionType=SelectionType.MOUSE_OVER;
break;
case RIGHT_CLICKED:
selectionType=SelectionType.DESELECTED;
break;
case DRAGGED:
selectionType=SelectionType.SELECTION;
break;
default :
return;
}
createContentSelection(selectionType,iExternalID);
break;
case SCATTER_MATRIX_SELECTION:
switch (pickingMode) {
case CLICKED:
selectionType=SelectionType.SELECTION;
break;
case RIGHT_CLICKED:
selectionType=SelectionType.DESELECTED;
break;
case MOUSE_OVER:
selectionType=SelectionType.MOUSE_OVER;
break;
default :
return;
}
createStorageSelection(selectionType,iExternalID);
break;
case SCATTER_MAIN_ZOOM:
switch (pickingMode) {
case CLICKED:
if (!bMainViewZoomDragged) {
bMainViewZoomDragged=true;
iCurrentDragZoom=iExternalID;
bClearSomeDisplayLists=true;
}
break;
default :
return;
}
break;
}
}
Program: 58447
Project: 58447
Buggy source:
@Override public void init(GL gl){
  renderStyle=new ScatterPlotRenderStyle(this,viewFrustum);
  super.renderStyle=renderStyle;
  detailLevel=EDetailLevel.HIGH;
  updateMaxAxis();
  renderStyle.setTextureNr(MAX_AXES,MAX_AXES);
  resetFullTextures();
  resetSelectionTextures();
  initTextures();
  initSelectionTextures();
  selectAxesfromExternal();
  clearAllSelections();
  opengl=gl;
}

Fixed version (ground truth):
@Override public void init(GL gl){
  renderStyle=new ScatterPlotRenderStyle(this,viewFrustum);
  super.renderStyle=renderStyle;
  detailLevel=EDetailLevel.HIGH;
  updateMaxAxis();
  renderStyle.setTextureNr(MAX_AXES,MAX_AXES);
  resetFullTextures();
  resetSelectionTextures();
  initTextures();
  initSelectionTextures();
  selectAxesfromExternal();
  clearAllSelections();
}
Program: 58448
Project: 58448
Buggy source:
@Override public void initLocal(GL gl){
  iGLDisplayListIndexLocal=gl.glGenLists(6);
  iGLDisplayListIndexCoord=iGLDisplayListIndexLocal + 1;
  iGLDisplayListIndexMouseOver=iGLDisplayListIndexLocal + 2;
  iGLDisplayListIndexSelection=iGLDisplayListIndexLocal + 3;
  iGLDisplayListIndexMatrixFull=iGLDisplayListIndexLocal + 4;
  iGLDisplayListIndexMatrixSelection=iGLDisplayListIndexLocal + 5;
  GeneralManager.get().getGUIBridge().getDisplay().asyncExec(new Runnable(){
    public void run(){
      parentGLCanvas.getParentComposite().addKeyListener(glKeyListener);
    }
  }
);
  iGLDisplayListToCall=iGLDisplayListIndexLocal;
  init(gl);
  bRenderMatrix=true;
  bOnlyRenderHalfMatrix=true;
  renderStyle.setIsEmbedded(true);
}

Fixed version (ground truth):
@Override public void initLocal(GL gl){
  GeneralManager.get().getGUIBridge().getDisplay().asyncExec(new Runnable(){
    public void run(){
      parentGLCanvas.getParentComposite().addKeyListener(glKeyListener);
    }
  }
);
  init(gl);
  iGLDisplayListIndexLocal=gl.glGenLists(7);
  iGLDisplayListToCall=iGLDisplayListIndexLocal;
  iGLDisplayListIndexCoord=iGLDisplayListIndexLocal + 1;
  iGLDisplayListIndexMouseOver=iGLDisplayListIndexLocal + 2;
  iGLDisplayListIndexSelection=iGLDisplayListIndexLocal + 3;
  iGLDisplayListIndexMatrixFull=iGLDisplayListIndexLocal + 4;
  iGLDisplayListIndexMatrixSelection=iGLDisplayListIndexLocal + 5;
  gl.glNewList(iGLDisplayListIndexLocal,GL.GL_COMPILE);
  gl.glEndList();
  gl.glNewList(iGLDisplayListIndexCoord,GL.GL_COMPILE);
  gl.glEndList();
  gl.glNewList(iGLDisplayListIndexMouseOver,GL.GL_COMPILE);
  gl.glEndList();
  gl.glNewList(iGLDisplayListIndexSelection,GL.GL_COMPILE);
  gl.glEndList();
  gl.glNewList(iGLDisplayListIndexMatrixFull,GL.GL_COMPILE);
  gl.glEndList();
  gl.glNewList(iGLDisplayListIndexMatrixSelection,GL.GL_COMPILE);
  gl.glEndList();
  bRenderMatrix=true;
  bOnlyRenderHalfMatrix=true;
  renderStyle.setIsEmbedded(true);
}
Program: 58450
Project: 58450
Buggy source:
@Override public void initLocal(GL gl){
  GeneralManager.get().getGUIBridge().getDisplay().asyncExec(new Runnable(){
    public void run(){
      parentGLCanvas.getParentComposite().addKeyListener(glKeyListener);
    }
  }
);
  init(gl);
  iGLDisplayListIndexLocal=gl.glGenLists(7);
  iGLDisplayListToCall=iGLDisplayListIndexLocal;
  iGLDisplayListIndexCoord=iGLDisplayListIndexLocal + 1;
  iGLDisplayListIndexMouseOver=iGLDisplayListIndexLocal + 2;
  iGLDisplayListIndexSelection=iGLDisplayListIndexLocal + 3;
  iGLDisplayListIndexMatrixFull=iGLDisplayListIndexLocal + 4;
  iGLDisplayListIndexMatrixSelection=iGLDisplayListIndexLocal + 5;
  gl.glNewList(iGLDisplayListIndexLocal,GL.GL_COMPILE);
  gl.glEndList();
  gl.glNewList(iGLDisplayListIndexCoord,GL.GL_COMPILE);
  gl.glEndList();
  gl.glNewList(iGLDisplayListIndexMouseOver,GL.GL_COMPILE);
  gl.glEndList();
  gl.glNewList(iGLDisplayListIndexSelection,GL.GL_COMPILE);
  gl.glEndList();
  gl.glNewList(iGLDisplayListIndexMatrixFull,GL.GL_COMPILE);
  gl.glEndList();
  gl.glNewList(iGLDisplayListIndexMatrixSelection,GL.GL_COMPILE);
  gl.glEndList();
  bRenderMatrix=true;
  bOnlyRenderHalfMatrix=true;
  renderStyle.setIsEmbedded(true);
}

Fixed version (ground truth):
@Override public void initLocal(GL gl){
  GeneralManager.get().getGUIBridge().getDisplay().asyncExec(new Runnable(){
    public void run(){
      parentGLCanvas.getParentComposite().addKeyListener(glKeyListener);
    }
  }
);
  iGLDisplayListIndexLocal=gl.glGenLists(1);
  iGLDisplayListIndexCoord=gl.glGenLists(1);
  iGLDisplayListIndexMouseOver=gl.glGenLists(1);
  iGLDisplayListIndexSelection=gl.glGenLists(1);
  iGLDisplayListIndexMatrixFull=gl.glGenLists(1);
  iGLDisplayListIndexMatrixSelection=gl.glGenLists(1);
  init(gl);
  gl.glNewList(iGLDisplayListIndexLocal,GL.GL_COMPILE);
  gl.glEndList();
  gl.glNewList(iGLDisplayListIndexCoord,GL.GL_COMPILE);
  gl.glEndList();
  gl.glNewList(iGLDisplayListIndexMouseOver,GL.GL_COMPILE);
  gl.glEndList();
  gl.glNewList(iGLDisplayListIndexSelection,GL.GL_COMPILE);
  gl.glEndList();
  gl.glNewList(iGLDisplayListIndexMatrixFull,GL.GL_COMPILE);
  gl.glEndList();
  gl.glNewList(iGLDisplayListIndexMatrixSelection,GL.GL_COMPILE);
  gl.glEndList();
  bRenderMatrix=true;
  bOnlyRenderHalfMatrix=true;
  renderStyle.setIsEmbedded(true);
}
Program: 58455
Project: 58455
Buggy source:
@Override public void clearAllSelections(){
  contentSelectionManager.clearSelections();
  AlSelectionTypes.clear();
  AlSelectionTypes.add(SelectionType.SELECTION);
  addSelectionType();
  fRectangleDragStartPoint=new float[3];
  fRectangleDragEndPoint=new float[3];
  bUpdateSelection=true;
  bUpdateSelectionTexures=true;
  setDisplayListDirty();
}

Fixed version (ground truth):
@Override public void clearAllSelections(){
  contentSelectionManager.clearSelections();
  storageSelectionManager.clearSelections();
  AlSelectionTypes.clear();
  AlSelectionTypes.add(SelectionType.SELECTION);
  addSelectionType();
  fRectangleDragStartPoint=new float[3];
  fRectangleDragEndPoint=new float[3];
  bUpdateSelection=true;
  bUpdateSelectionTexures=true;
  setDisplayListDirty();
}
Program: 58456
Project: 58456
Buggy source:
public DataWindowsDisk(){
  super();
  this.levelOfDetailLimits=new double[3];
  levelOfDetailLimits[0]=0.8;
  levelOfDetailLimits[1]=0.96;
  levelOfDetailLimits[2]=1;
  eyeTrackerBorder=0.8;
  eyeTrackerPrecision=0.1;
}

Fixed version (ground truth):
public DataWindowsDisk(){
  super();
  this.levelOfDetailLimits=new double[3];
  levelOfDetailLimits[0]=0.8;
  levelOfDetailLimits[1]=0.96;
  levelOfDetailLimits[2]=1;
  eyeTrackerBorder=0.8;
  eyeTrackerPrecision=0.1;
  lineFactor=40;
}
Program: 58457
Project: 58457
Buggy source:
public void drawLine(PoincareNode node1,PoincareNode node2,int numberOfDetails,int mode){
  Point2D.Double startingPoint=node1.getPosition();
  double width=this.getMetric(startingPoint,lineWidth);
  gl.glLineWidth((float)width);
  gl.glBegin(GL.GL_LINE);
  gl.glColor3i(0,0,0);
  gl.glVertex3d(node1.getPosition().getX() * displayScaleFactor + (canvasWidth / 2),node1.getPosition().getY() * displayScaleFactor + canvasHeight / 2,0);
  gl.glVertex3d(node2.getPosition().getX() * displayScaleFactor + (canvasWidth / 2),node2.getPosition().getY() * displayScaleFactor + canvasHeight / 2,0);
  gl.glEnd();
}

Fixed version (ground truth):
public void drawLine(PoincareNode node1,PoincareNode node2,int numberOfDetails,int mode){
  Point2D.Double startingPoint=node1.getPosition();
  double width=this.getMetric(startingPoint,lineWidth) * lineFactor;
  gl.glLineWidth((float)width);
  gl.glBegin(GL.GL_LINE_STRIP);
  gl.glColor3i(0,0,0);
  gl.glVertex3d(node1.getPosition().getX() * displayScaleFactor + (canvasWidth / 2),node1.getPosition().getY() * displayScaleFactor + canvasHeight / 2,0);
  gl.glVertex3d(node2.getPosition().getX() * displayScaleFactor + (canvasWidth / 2),node2.getPosition().getY() * displayScaleFactor + canvasHeight / 2,0);
  gl.glEnd();
}
Program: 58458
Project: 58458
Buggy source:
/** 
 * Render the symbol of the view instead of the view
 * @param gl
 */
public void selectAxesfromExternal(){
  int iMouseOverSelections=storageSelectionManager.getNumberOfElements(SelectionType.MOUSE_OVER);
  int iSelectionSelections=storageSelectionManager.getNumberOfElements(SelectionType.SELECTION);
  if (iSelectionSelections > 0) {
    Set<Integer> axis=storageSelectionManager.getElements(SelectionType.SELECTION);
    int itmpAxis=SELECTED_X_AXIS;
    int index=0;
    for (    int i : axis) {
      SELECTED_X_AXIS=storageVA.indexOf(i);
      if (iSelectionSelections > 0)       SELECTED_X_AXIS=storageVA.indexOf(i);
      if (SELECTED_X_AXIS > SELECTED_Y_AXIS) {
        SELECTED_X_AXIS=itmpAxis;
        SELECTED_X_AXIS=SELECTED_Y_AXIS;
        SELECTED_Y_AXIS=itmpAxis;
      }
      if (SELECTED_X_AXIS == SELECTED_Y_AXIS)       SELECTED_X_AXIS=itmpAxis;
      bUpdateMainView=true;
      break;
    }
  }
  if (iMouseOverSelections == 0)   return;
  Set<Integer> axis=storageSelectionManager.getElements(SelectionType.MOUSE_OVER);
  for (  int i : axis) {
    MOUSEOVER_X_AXIS=storageVA.indexOf(i);
    bUpdateMainView=true;
    break;
  }
}

Fixed version (ground truth):
/** 
 * Render the symbol of the view instead of the view
 * @param gl
 */
public void selectAxesfromExternal(){
  int iMouseOverSelections=storageSelectionManager.getNumberOfElements(SelectionType.MOUSE_OVER);
  int iSelectionSelections=storageSelectionManager.getNumberOfElements(SelectionType.SELECTION);
  if (iSelectionSelections > 0) {
    Set<Integer> axisSet=storageSelectionManager.getElements(SelectionType.SELECTION);
    Iterator<Integer> axisIT=axisSet.iterator();
    int itmpAxis=SELECTED_X_AXIS;
    int i=axisIT.next();
    SELECTED_X_AXIS=storageVA.indexOf(i);
    if (axisIT.hasNext()) {
      i=axisIT.next();
      SELECTED_Y_AXIS=storageVA.indexOf(i);
    }
    if (SELECTED_X_AXIS > SELECTED_Y_AXIS) {
      itmpAxis=SELECTED_X_AXIS;
      SELECTED_X_AXIS=SELECTED_Y_AXIS;
      SELECTED_Y_AXIS=itmpAxis;
    }
    if (SELECTED_X_AXIS == SELECTED_Y_AXIS)     SELECTED_X_AXIS=itmpAxis;
    bUpdateMainView=true;
  }
  if (iMouseOverSelections == 0)   return;
  Set<Integer> axisSet=storageSelectionManager.getElements(SelectionType.MOUSE_OVER);
  Iterator<Integer> axisIT=axisSet.iterator();
  int itmpAxis=MOUSEOVER_X_AXIS;
  int i=axisIT.next();
  MOUSEOVER_X_AXIS=storageVA.indexOf(i);
  if (axisIT.hasNext()) {
    i=axisIT.next();
    MOUSEOVER_Y_AXIS=storageVA.indexOf(i);
  }
  if (MOUSEOVER_X_AXIS > MOUSEOVER_Y_AXIS) {
    itmpAxis=MOUSEOVER_X_AXIS;
    MOUSEOVER_X_AXIS=MOUSEOVER_Y_AXIS;
    MOUSEOVER_Y_AXIS=itmpAxis;
  }
  if (MOUSEOVER_X_AXIS == MOUSEOVER_Y_AXIS)   MOUSEOVER_X_AXIS=itmpAxis;
}
Program: 58459
Project: 58459
Buggy source:
public CompareGroupsItem(ArrayList<ISet> setsToCompare){
  super();
  setText("String_Node_Str");
  OpenViewEvent openViewEvent=new OpenViewEvent();
  openViewEvent.setViewType("String_Node_Str");
  openViewEvent.setSender(this);
  registerEvent(openViewEvent);
  CompareGroupsEvent event=new CompareGroupsEvent(setsToCompare);
  event.setSender(this);
  registerEvent(event);
}

Fixed version (ground truth):
public CompareGroupsItem(ArrayList<ISet> setsToCompare){
  super();
  setText("String_Node_Str");
  OpenCompareViewEvent openViewEvent=new OpenCompareViewEvent();
  openViewEvent.setViewType("String_Node_Str");
  openViewEvent.setSender(this);
  openViewEvent.setSetsToCompare(setsToCompare);
  registerEvent(openViewEvent);
}
Program: 58460
Project: 58460
Buggy source:
/** 
 * Registers the listeners for this view to the event system. To release the allocated resources unregisterEventListeners() has to be called.
 */
private void registerEventListeners(){
  activateViewListener=new ActivateViewListener();
  activateViewListener.setHandler(this);
  GeneralManager.get().getEventPublisher().addListener(LoadPathwayEvent.class,activateViewListener);
  GeneralManager.get().getEventPublisher().addListener(LoadPathwaysByGeneEvent.class,activateViewListener);
  GeneralManager.get().getEventPublisher().addListener(OpenViewEvent.class,activateViewListener);
}

Fixed version (ground truth):
/** 
 * Registers the listeners for this view to the event system. To release the allocated resources unregisterEventListeners() has to be called.
 */
private void registerEventListeners(){
  activateViewListener=new ActivateViewListener();
  activateViewListener.setHandler(this);
  GeneralManager.get().getEventPublisher().addListener(LoadPathwayEvent.class,activateViewListener);
  GeneralManager.get().getEventPublisher().addListener(LoadPathwaysByGeneEvent.class,activateViewListener);
  GeneralManager.get().getEventPublisher().addListener(OpenViewEvent.class,activateViewListener);
  GeneralManager.get().getEventPublisher().addListener(OpenCompareViewEvent.class,activateViewListener);
}
Program: 58461
Project: 58461
Buggy source:
@Override public void handleEvent(AEvent event){
  try {
    if (event instanceof LoadPathwayEvent || event instanceof LoadPathwaysByGeneEvent) {
      PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView("String_Node_Str");
    }
 else     if (event instanceof OpenViewEvent)     PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView(((OpenViewEvent)event).getViewType());
  }
 catch (  PartInitException e) {
    e.printStackTrace();
    GeneralManager.get().getLogger().log(new Status(Status.INFO,GeneralManager.PLUGIN_ID,"String_Node_Str",e));
  }
}

Fixed version (ground truth):
@Override public void handleEvent(AEvent event){
  try {
    if (event instanceof LoadPathwayEvent || event instanceof LoadPathwaysByGeneEvent) {
      PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView("String_Node_Str");
    }
 else     if (event instanceof OpenCompareViewEvent) {
      PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView(((OpenViewEvent)event).getViewType());
      CompareGroupsEvent compareGroupsEvent=new CompareGroupsEvent(((OpenCompareViewEvent)event).getSetsToCompare());
      compareGroupsEvent.setSender(this);
      GeneralManager.get().getEventPublisher().triggerEvent(compareGroupsEvent);
    }
 else     if (event instanceof OpenViewEvent)     PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView(((OpenViewEvent)event).getViewType());
  }
 catch (  PartInitException e) {
    e.printStackTrace();
    GeneralManager.get().getLogger().log(new Status(Status.INFO,GeneralManager.PLUGIN_ID,"String_Node_Str",e));
  }
}
Program: 58464
Project: 58464
Buggy source:
private void renderOverviewToDetailRelations(GL gl){
  sortedClustersXOffsetUp=new ArrayList<Pair<Float,Integer>>();
  sortedClustersXOffsetDown=new ArrayList<Pair<Float,Integer>>();
  gl.glLineWidth(1);
  calculateClusterXOffset(leftHeatMapWrapper);
  for (  ContentVirtualArray va : leftHeatMapWrapper.getContentVAsOfHeatMaps()) {
    xOffset=0;
    renderSplineRelation(gl,va,leftHeatMapWrapper);
  }
  calculateClusterXOffset(leftHeatMapWrapper);
  for (  ContentVirtualArray va : rightHeatMapWrapper.getContentVAsOfHeatMaps()) {
    xOffset=0;
    renderSplineRelation(gl,va,rightHeatMapWrapper);
  }
}

Fixed version (ground truth):
private void renderOverviewToDetailRelations(GL gl){
  sortedClustersXOffsetUp=new ArrayList<Pair<Float,Integer>>();
  sortedClustersXOffsetDown=new ArrayList<Pair<Float,Integer>>();
  calculateClusterXOffset(leftHeatMapWrapper);
  for (  ContentVirtualArray va : leftHeatMapWrapper.getContentVAsOfHeatMaps()) {
    xOffset=0;
    renderSplineRelation(gl,va,leftHeatMapWrapper);
  }
  calculateClusterXOffset(rightHeatMapWrapper);
  for (  ContentVirtualArray va : rightHeatMapWrapper.getContentVAsOfHeatMaps()) {
    xOffset=0;
    renderSplineRelation(gl,va,rightHeatMapWrapper);
  }
}