nus-yam/ex-repair huggingface dataset:
Program: 58533
Project: 58533
Buggy source:
@Override public void displayLocal(GL gl){
  if (set == null)   return;
  if (detailLevel == EDetailLevel.HIGH) {
    GLMouseListener glMouseListener=getParentGLCanvas().getGLMouseListener();
    if (glMouseListener.wasMouseDragged()) {
      bRectangleSelection=true;
      Point pDragEndPoint=glMouseListener.getPickedPoint();
      Point pDragStartPoint=glMouseListener.getPickedPointDragStart();
      fDragStartPoint=GLCoordinateUtils.convertWindowCoordinatesToWorldCoordinates(gl,pDragStartPoint.x,pDragStartPoint.y);
      fDragEndPoint=GLCoordinateUtils.convertWindowCoordinatesToWorldCoordinates(gl,pDragEndPoint.x,pDragEndPoint.y);
      gl.glNewList(iGLDisplayListIndexBrush,GL.GL_COMPILE);
      DrawRectangularSelection(gl);
      gl.glEndList();
    }
    if (glMouseListener.wasMouseReleased() && bRectangleSelection) {
      bRectangleSelection=false;
      setDisplayListDirty();
      UpdateSelection();
      gl.glDeleteLists(iGLDisplayListIndexBrush,1);
      bUpdateSelection=true;
    }
    pickingManager.handlePicking(this,gl);
  }
  if (bIsDisplayListDirtyLocal) {
    buildDisplayList(gl,iGLDisplayListIndexLocal);
    bIsDisplayListDirtyLocal=false;
  }
  iGLDisplayListToCall=iGLDisplayListIndexLocal;
  display(gl);
  checkForHits(gl);
  if (eBusyModeState != EBusyModeState.OFF)   renderBusyMode(gl);
}

Fixed version (ground truth):
@Override public void displayLocal(GL gl){
  if (set == null)   return;
  if (detailLevel == EDetailLevel.HIGH) {
    GLMouseListener glMouseListener=getParentGLCanvas().getGLMouseListener();
    if (glMouseListener.wasMouseDragged()) {
      bRectangleSelection=true;
      Point pDragEndPoint=glMouseListener.getPickedPoint();
      Point pDragStartPoint=glMouseListener.getPickedPointDragStart();
      fRectangleDragStartPoint=GLCoordinateUtils.convertWindowCoordinatesToWorldCoordinates(gl,pDragStartPoint.x,pDragStartPoint.y);
      fRectangleDragEndPoint=GLCoordinateUtils.convertWindowCoordinatesToWorldCoordinates(gl,pDragEndPoint.x,pDragEndPoint.y);
      gl.glNewList(iGLDisplayListIndexBrush,GL.GL_COMPILE);
      DrawRectangularSelection(gl);
      gl.glEndList();
    }
    if (glMouseListener.wasMouseReleased() && bRectangleSelection) {
      bRectangleSelection=false;
      setDisplayListDirty();
      UpdateSelection();
      gl.glDeleteLists(iGLDisplayListIndexBrush,1);
      bUpdateSelection=true;
    }
    pickingManager.handlePicking(this,gl);
  }
  if (bIsDisplayListDirtyLocal) {
    buildDisplayList(gl,iGLDisplayListIndexLocal);
    bIsDisplayListDirtyLocal=false;
  }
  iGLDisplayListToCall=iGLDisplayListIndexLocal;
  display(gl);
  checkForHits(gl);
  if (eBusyModeState != EBusyModeState.OFF)   renderBusyMode(gl);
}
Program: 58534
Project: 58534
Buggy source:
@Override public AGLView createGLView(String viewID,GLCaleydoCanvas glCanvas,final String label,final IViewFrustum viewFrustum){
  GeneralManager.get().getLogger().log(new Status(IStatus.INFO,IGeneralManager.PLUGIN_ID,"String_Node_Str" + viewID + "String_Node_Str"+ label+ "String_Node_Str"));
  AGLView glView=null;
  for (  IViewCreator glViewCreator : glViewCreators) {
    if (glViewCreator instanceof AGLViewCreator && glViewCreator.getViewType().equals(viewID)) {
      glView=((AGLViewCreator)glViewCreator).createGLView(glCanvas,label,viewFrustum);
      break;
    }
  }
  if (glView == null) {
    throw new RuntimeException("String_Node_Str");
  }
  registerGLEventListenerByGLCanvas(glCanvas,glView);
  return glView;
}

Fixed version (ground truth):
@Override public AGLView createGLView(String viewID,GLCaleydoCanvas glCanvas,final String label,final IViewFrustum viewFrustum){
  GeneralManager.get().getLogger().log(new Status(IStatus.INFO,IGeneralManager.PLUGIN_ID,"String_Node_Str" + viewID + "String_Node_Str"+ label+ "String_Node_Str"));
  AGLView glView=null;
  if (Platform.getBundle(viewID).getState() != Bundle.INSTALLED) {
    try {
      Platform.getBundle(viewID).start();
    }
 catch (    BundleException e) {
      e.printStackTrace();
    }
  }
  for (  IViewCreator glViewCreator : glViewCreators) {
    if (glViewCreator instanceof AGLViewCreator && glViewCreator.getViewType().equals(viewID)) {
      glView=((AGLViewCreator)glViewCreator).createGLView(glCanvas,label,viewFrustum);
      break;
    }
  }
  if (glView == null) {
    throw new RuntimeException("String_Node_Str");
  }
  registerGLEventListenerByGLCanvas(glCanvas,glView);
  return glView;
}
Program: 58535
Project: 58535
Buggy source:
/** 
 * Parses throw the list of start-views to initialize them by creating default serialized representations of them.
 */
public static void initializeDefaultStartViews(EDataDomain dataDomain){
  if (startViews.isEmpty()) {
    addDefaultStartViews(dataDomain);
  }
 else {
    IUseCase useCase=GeneralManager.get().getUseCase(dataDomain);
    if (dataDomain == EDataDomain.GENETIC_DATA && ((GeneticUseCase)useCase).isPathwayViewerMode()) {
      applyPathwayViewerViewFilter();
    }
  }
  initializedStartViews=new ArrayList<String>();
  for (  String viewID : startViews) {
    ASerializedView view=GeneralManager.get().getViewGLCanvasManager().getViewCreator(viewID).createSerializedView();
    view.setDataDomain(dataDomain);
    initializedStartViews.add(viewID);
  }
  startViews=null;
}

Fixed version (ground truth):
/** 
 * Parses throw the list of start-views to initialize them by creating default serialized representations of them.
 */
public static void initializeDefaultStartViews(EDataDomain dataDomain){
  if (startViews.isEmpty()) {
    addDefaultStartViews(dataDomain);
  }
 else {
    IUseCase useCase=GeneralManager.get().getUseCase(dataDomain);
    if (dataDomain == EDataDomain.GENETIC_DATA && ((GeneticUseCase)useCase).isPathwayViewerMode()) {
      applyPathwayViewerViewFilter();
    }
  }
  initializedStartViews=new ArrayList<String>();
  for (  String viewID : startViews) {
    try {
      if (viewID.contains("String_Node_Str"))       Platform.getBundle(viewID.replace("String_Node_Str","String_Node_Str")).start();
 else       Platform.getBundle(viewID).start();
    }
 catch (    BundleException e) {
      e.printStackTrace();
    }
    ASerializedView view=GeneralManager.get().getViewGLCanvasManager().getViewCreator(viewID).createSerializedView();
    view.setDataDomain(dataDomain);
    initializedStartViews.add(viewID);
  }
  startViews=null;
}
Program: 58537
Project: 58537
Buggy source:
/** 
 * Returns the general method as a singleton object. When first called the general manager is created (lazy).
 * @return singleton GeneralManager instance
 */
public static IGeneralManager get(){
  if (generalManager == null) {
    generalManager=new GeneralManager();
  }
  return generalManager;
}

Fixed version (ground truth):
/** 
 * Returns the general method as a singleton object. When first called the general manager is created (lazy).
 * @return singleton GeneralManager instance
 */
public static IGeneralManager get(){
  if (generalManager == null) {
    generalManager=new GeneralManager();
    generalManager.init();
  }
  return generalManager;
}
Program: 58538
Project: 58538
Buggy source:
/** 
 * Constructor.
 */
public ViewManager(){
  pickingManager=new PickingManager();
  selectionManager=new ConnectedElementRepresentationManager();
  infoAreaManager=new GLInfoAreaManager();
  hashGLCanvasID2GLCanvas=new HashMap<Integer,GLCaleydoCanvas>();
  hashGLCanvas2GLEventListeners=new HashMap<GLCaleydoCanvas,ArrayList<AGLView>>();
  hashGLEventListenerID2GLEventListener=new HashMap<Integer,AGLView>();
  fpsAnimator=new FPSAnimator(null,60);
  busyRequests=new HashSet<Object>();
  registerEventListeners();
  displayLoopExecution=DisplayLoopExecution.get();
  fpsAnimator.add(displayLoopExecution.getDisplayLoopCanvas());
  displayLoopExecution.executeMultiple(selectionManager);
  glViewCreators=new ArrayList<IViewCreator>();
}

Fixed version (ground truth):
/** 
 * Constructor.
 */
public ViewManager(){
  pickingManager=new PickingManager();
  selectionManager=new ConnectedElementRepresentationManager();
  infoAreaManager=new GLInfoAreaManager();
  hashGLCanvasID2GLCanvas=new HashMap<Integer,GLCaleydoCanvas>();
  hashGLCanvas2GLEventListeners=new HashMap<GLCaleydoCanvas,ArrayList<AGLView>>();
  hashGLEventListenerID2GLEventListener=new HashMap<Integer,AGLView>();
  busyRequests=new HashSet<Object>();
  registerEventListeners();
  glViewCreators=new ArrayList<IViewCreator>();
}
Program: 58539
Project: 58539
Buggy source:
private void RenderScatterPoints(GL gl){
  float XScale=renderStyle.getRenderWidth() - XYAXISDISTANCE * 2.0f;
  float YScale=renderStyle.getRenderHeight() - XYAXISDISTANCE * 2.0f;
  float x=0.0f;
  float y=0.0f;
  for (  Integer iContentIndex : contentVA) {
    if (iContentIndex == -1) {
      continue;
    }
    float xnormalized=set.get(SELECTED_X_AXIS).getFloat(EDataRepresentation.NORMALIZED,iContentIndex);
    float ynormalized=set.get(SELECTED_Y_AXIS).getFloat(EDataRepresentation.NORMALIZED,iContentIndex);
    x=xnormalized * XScale;
    y=ynormalized * YScale;
    float[] fArMappingColor=colorMapper.getColor(Math.max(xnormalized,ynormalized));
    DrawPointPrimitive(gl,x,y,0.0f,fArMappingColor,1.0f,iContentIndex,1.0f);
  }
}

Fixed version (ground truth):
private void RenderScatterPoints(GL gl){
  float XScale=renderStyle.getRenderWidth() - XYAXISDISTANCE * 2.0f;
  float YScale=renderStyle.getRenderHeight() - XYAXISDISTANCE * 2.0f;
  float x=0.0f;
  float y=0.0f;
  float xnormalized=0.0f;
  float ynormalized=0.0f;
  float x_2=0.0f;
  float y_2=0.0f;
  for (  Integer iContentIndex : contentVA) {
    if (iContentIndex == -1) {
      continue;
    }
    xnormalized=set.get(SELECTED_X_AXIS).getFloat(EDataRepresentation.NORMALIZED,iContentIndex);
    ynormalized=set.get(SELECTED_Y_AXIS).getFloat(EDataRepresentation.NORMALIZED,iContentIndex);
    x=xnormalized * XScale;
    y=ynormalized * YScale;
    float[] fArMappingColor=colorMapper.getColor(Math.max(xnormalized,ynormalized));
    if (bRender2Axis)     fArMappingColor=new float[]{1.0f,0.0f,0.0f};
    DrawPointPrimitive(gl,x,y,0.0f,fArMappingColor,1.0f,iContentIndex,1.0f);
    if (bRender2Axis) {
      xnormalized=set.get(SELECTED_X_AXIS_2).getFloat(EDataRepresentation.NORMALIZED,iContentIndex);
      ynormalized=set.get(SELECTED_Y_AXIS_2).getFloat(EDataRepresentation.NORMALIZED,iContentIndex);
      x_2=xnormalized * XScale;
      y_2=ynormalized * YScale;
      fArMappingColor=new float[]{0.0f,1.0f,0.0f};
      EScatterPointType tmpPoint=POINTSTYLE;
      POINTSTYLE=POINTSTYLE.CIRCLE;
      DrawPointPrimitive(gl,x_2,y_2,0.0f,fArMappingColor,1.0f,iContentIndex,1.0f);
      POINTSTYLE=tmpPoint;
      gl.glColor3f(0.0f,0.0f,1.0f);
      gl.glLineWidth(0.5f);
      gl.glBegin(GL.GL_LINES);
      gl.glVertex3f(x,y,1.0f);
      gl.glVertex3f(x_2,y_2,1.0f);
      gl.glEnd();
    }
  }
}
Program: 58540
Project: 58540
Buggy source:
private void buildDisplayList(final GL gl,int iGLDisplayListIndex){
  if (bHasFrustumChanged) {
    bHasFrustumChanged=false;
    gl.glNewList(iGLDisplayListIndexCoord,GL.GL_COMPILE);
    renderCoordinateSystem(gl);
    gl.glEndList();
    gl.glNewList(iGLDisplayListIndex,GL.GL_COMPILE);
    gl.glTranslatef(XYAXISDISTANCE,XYAXISDISTANCE,0);
    RenderScatterPoints(gl);
    gl.glTranslatef(-XYAXISDISTANCE,-XYAXISDISTANCE,0);
    gl.glEndList();
  }
 else {
    gl.glNewList(iGLDisplayListIndexMouseOver,GL.GL_COMPILE);
    gl.glTranslatef(XYAXISDISTANCE,XYAXISDISTANCE,0);
    RenderMouseOver(gl);
    gl.glTranslatef(-XYAXISDISTANCE,-XYAXISDISTANCE,0);
    gl.glEndList();
  }
}

Fixed version (ground truth):
private void buildDisplayList(final GL gl,int iGLDisplayListIndex){
  if (bHasFrustumChanged) {
    bHasFrustumChanged=false;
    gl.glNewList(iGLDisplayListIndexCoord,GL.GL_COMPILE);
    renderCoordinateSystem(gl);
    gl.glEndList();
    bRender2Axis=true;
    SELECTED_X_AXIS=0;
    SELECTED_Y_AXIS=1;
    SELECTED_X_AXIS_2=0;
    SELECTED_Y_AXIS_2=2;
    gl.glNewList(iGLDisplayListIndex,GL.GL_COMPILE);
    gl.glTranslatef(XYAXISDISTANCE,XYAXISDISTANCE,0);
    RenderScatterPoints(gl);
    gl.glTranslatef(-XYAXISDISTANCE,-XYAXISDISTANCE,0);
    gl.glEndList();
  }
 else {
    gl.glNewList(iGLDisplayListIndexMouseOver,GL.GL_COMPILE);
    gl.glTranslatef(XYAXISDISTANCE,XYAXISDISTANCE,0);
    RenderMouseOver(gl);
    gl.glTranslatef(-XYAXISDISTANCE,-XYAXISDISTANCE,0);
    gl.glEndList();
  }
}
Program: 58543
Project: 58543
Buggy source:
@Override public ASerializedView createSerializedView(){
  return new SerializedHeatMapView();
}

Fixed version (ground truth):
@Override public ASerializedView createSerializedView(){
  return new SerializedDendogramHorizontalView();
}
Program: 58544
Project: 58544
Buggy source:
@Override public AGLView createGLView(GLCaleydoCanvas glCanvas,String label,IViewFrustum viewFrustum){
  return new GLHeatMap(glCanvas,label,viewFrustum);
}

Fixed version (ground truth):
@Override public AGLView createGLView(GLCaleydoCanvas glCanvas,String label,IViewFrustum viewFrustum){
  return new GLDendrogram(glCanvas,label,viewFrustum,true);
}
Program: 58545
Project: 58545
Buggy source:
public void setYAxis(int iAxisIndex){
  if (SELECTED_Y_AXIS != iAxisIndex) {
    SELECTED_Y_AXIS=iAxisIndex;
    setDisplayListDirty();
  }
}

Fixed version (ground truth):
public void setYAxis(int iAxisIndex){
  if (SELECTED_Y_AXIS != iAxisIndex) {
    SELECTED_Y_AXIS=iAxisIndex;
    bUpdateAll=true;
    setDisplayListDirty();
  }
}
Program: 58546
Project: 58546
Buggy source:
public void setXAxis(int iAxisIndex){
  if (SELECTED_X_AXIS != iAxisIndex) {
    SELECTED_X_AXIS=iAxisIndex;
    setDisplayListDirty();
  }
}

Fixed version (ground truth):
public void setXAxis(int iAxisIndex){
  if (SELECTED_X_AXIS != iAxisIndex) {
    SELECTED_X_AXIS=iAxisIndex;
    bUpdateAll=true;
    setDisplayListDirty();
  }
}
Program: 58548
Project: 58548
Buggy source:
public void togglePointType(){
switch (POINTSTYLE) {
case POINT:
    POINTSTYLE=EScatterPointType.BOX;
  break;
case BOX:
POINTSTYLE=EScatterPointType.CIRCLE;
break;
case CIRCLE:
POINTSTYLE=EScatterPointType.DISK;
break;
case DISK:
POINTSTYLE=EScatterPointType.CROSS;
break;
case CROSS:
POINTSTYLE=EScatterPointType.POINT;
break;
default :
}
setDisplayListDirty();
}

Fixed version (ground truth):
public void togglePointType(){
switch (POINTSTYLE) {
case POINT:
    POINTSTYLE=EScatterPointType.BOX;
  break;
case BOX:
POINTSTYLE=EScatterPointType.CIRCLE;
break;
case CIRCLE:
POINTSTYLE=EScatterPointType.DISK;
break;
case DISK:
POINTSTYLE=EScatterPointType.CROSS;
break;
case CROSS:
POINTSTYLE=EScatterPointType.POINT;
break;
default :
}
bUpdateAll=true;
setDisplayListDirty();
}
Program: 58549
Project: 58549
Buggy source:
@Override public void init(GL gl){
  renderStyle=new ScatterPlotRenderStyle(this,viewFrustum);
  super.renderStyle=renderStyle;
  InitAxisComboEvent initAxisComboEvent=new InitAxisComboEvent();
  initAxisComboEvent.setSender(this);
  initAxisComboEvent.setAxisNames(this.getAxisString());
  GeneralManager.get().getEventPublisher().triggerEvent(initAxisComboEvent);
  POINTSIZE=POINTSIZE / 1.0f;
  POINTSTYLE=EScatterPointType.CROSS;
}

Fixed version (ground truth):
@Override public void init(GL gl){
  renderStyle=new ScatterPlotRenderStyle(this,viewFrustum);
  super.renderStyle=renderStyle;
  InitAxisComboEvent initAxisComboEvent=new InitAxisComboEvent();
  initAxisComboEvent.setSender(this);
  initAxisComboEvent.setAxisNames(this.getAxisString());
  GeneralManager.get().getEventPublisher().triggerEvent(initAxisComboEvent);
}
Program: 58550
Project: 58550
Buggy source:
public void ResetSelection(){
  elementSelectionManager.clearSelections();
  fDragStartPoint=new float[3];
  fDragEndPoint=new float[3];
  setDisplayListDirty();
}

Fixed version (ground truth):
public void ResetSelection(){
  elementSelectionManager.clearSelections();
  fDragStartPoint=new float[3];
  fDragEndPoint=new float[3];
  bUpdateAll=true;
  setDisplayListDirty();
}
Program: 58551
Project: 58551
Buggy source:
@Override public void initLocal(GL gl){
  bRenderStorageHorizontally=false;
  iGLDisplayListIndexLocal=gl.glGenLists(5);
  iGLDisplayListIndexBrush=2;
  iGLDisplayListIndexCoord=3;
  iGLDisplayListIndexMouseOver=4;
  iGLDisplayListIndexSelection=5;
  iGLDisplayListToCall=iGLDisplayListIndexLocal;
  init(gl);
}

Fixed version (ground truth):
@Override public void initLocal(GL gl){
  bRenderStorageHorizontally=false;
  iGLDisplayListIndexLocal=gl.glGenLists(5);
  iGLDisplayListIndexBrush=2;
  iGLDisplayListIndexCoord=3;
  iGLDisplayListIndexMouseOver=4;
  iGLDisplayListIndexSelection=5;
  GeneralManager.get().getGUIBridge().getDisplay().asyncExec(new Runnable(){
    public void run(){
      parentGLCanvas.getParentComposite().addKeyListener(glKeyListener);
    }
  }
);
  iGLDisplayListToCall=iGLDisplayListIndexLocal;
  init(gl);
}
Program: 58552
Project: 58552
Buggy source:
/** 
 * Constructor.
 * @param glCanvas
 * @param sLabel
 * @param viewFrustum
 */
public GLScatterplot(GLCaleydoCanvas glCanvas,final String sLabel,final IViewFrustum viewFrustum){
  super(glCanvas,sLabel,viewFrustum);
  viewType=EManagedObjectType.GL_HEAT_MAP;
  viewID=GLScatterplot.VIEW_ID;
  colorMapper=ColorMappingManager.get().getColorMapping(EColorMappingType.GENE_EXPRESSION);
  fAlXDistances=new ArrayList<Float>();
}

Fixed version (ground truth):
/** 
 * Constructor.
 * @param glCanvas
 * @param sLabel
 * @param viewFrustum
 */
public GLScatterplot(GLCaleydoCanvas glCanvas,final String sLabel,final IViewFrustum viewFrustum){
  super(glCanvas,sLabel,viewFrustum);
  viewType=EManagedObjectType.GL_HEAT_MAP;
  viewID=GLScatterplot.VIEW_ID;
  colorMapper=ColorMappingManager.get().getColorMapping(EColorMappingType.GENE_EXPRESSION);
  fAlXDistances=new ArrayList<Float>();
  glKeyListener=new GLScatterPlotKeyListener(this);
}
Program: 58553
Project: 58553
Buggy source:
public void upDownSelect(boolean bUpIsTrue){
  if (bUpIsTrue)   SELECTED_X_AXIS++;
 else   SELECTED_X_AXIS--;
  if (SELECTED_X_AXIS < 0)   SELECTED_X_AXIS=0;
}

Fixed version (ground truth):
public void upDownSelect(boolean bDownIsTrue){
  int tmpAxis=SELECTED_Y_AXIS;
  if (bDownIsTrue)   tmpAxis++;
 else   tmpAxis--;
  if (tmpAxis < 0)   tmpAxis=0;
  if ((tmpAxis + 1) >= storageVA.size())   tmpAxis=SELECTED_Y_AXIS;
  SELECTED_Y_AXIS=tmpAxis;
  bUpdateAll=true;
  setDisplayListDirty();
}
Program: 58554
Project: 58554
Buggy source:
@Override protected void reactOnExternalSelection(boolean scrollToSelection){
  bUpdateSelection=true;
}

Fixed version (ground truth):
@Override protected void reactOnExternalSelection(boolean scrollToSelection){
  bUpdateSelection=true;
  setDisplayListDirty();
}
Program: 58555
Project: 58555
Buggy source:
private void buildDisplayList(final GL gl,int iGLDisplayListIndex){
  if (bHasFrustumChanged) {
    bHasFrustumChanged=false;
    gl.glNewList(iGLDisplayListIndexCoord,GL.GL_COMPILE);
    renderCoordinateSystem(gl);
    gl.glEndList();
    bRender2Axis=false;
    SELECTED_X_AXIS=0;
    SELECTED_Y_AXIS=1;
    SELECTED_X_AXIS_2=0;
    SELECTED_Y_AXIS_2=2;
    gl.glNewList(iGLDisplayListIndex,GL.GL_COMPILE);
    gl.glTranslatef(XYAXISDISTANCE,XYAXISDISTANCE,0);
    RenderScatterPoints(gl);
    gl.glTranslatef(-XYAXISDISTANCE,-XYAXISDISTANCE,0);
    gl.glEndList();
  }
 else {
    gl.glNewList(iGLDisplayListIndexMouseOver,GL.GL_COMPILE);
    gl.glTranslatef(XYAXISDISTANCE,XYAXISDISTANCE,0);
    RenderMouseOver(gl);
    gl.glTranslatef(-XYAXISDISTANCE,-XYAXISDISTANCE,0);
    gl.glEndList();
  }
}

Fixed version (ground truth):
private void buildDisplayList(final GL gl,int iGLDisplayListIndex){
  if (bHasFrustumChanged) {
    bHasFrustumChanged=false;
    bUpdateAll=true;
  }
  if (bUpdateSelection || bUpdateAll) {
    bUpdateSelection=false;
    buildDisplayListSelection(gl,iGLDisplayListIndexSelection);
  }
  if (bUpdateAll) {
    gl.glNewList(iGLDisplayListIndexCoord,GL.GL_COMPILE);
    renderCoordinateSystem(gl);
    gl.glEndList();
    gl.glNewList(iGLDisplayListIndex,GL.GL_COMPILE);
    gl.glTranslatef(XYAXISDISTANCE,XYAXISDISTANCE,0);
    RenderScatterPoints(gl);
    gl.glTranslatef(-XYAXISDISTANCE,-XYAXISDISTANCE,0);
    gl.glEndList();
    bUpdateAll=false;
  }
  gl.glNewList(iGLDisplayListIndexMouseOver,GL.GL_COMPILE);
  gl.glTranslatef(XYAXISDISTANCE,XYAXISDISTANCE,0);
  RenderMouseOver(gl);
  gl.glTranslatef(-XYAXISDISTANCE,-XYAXISDISTANCE,0);
  gl.glEndList();
}
Program: 58556
Project: 58556
Buggy source:
public void setPointSize(int pointSize){
  if (renderStyle.getPointSize() != pointSize) {
    renderStyle.setPointSize(pointSize);
    setDisplayListDirty();
  }
}

Fixed version (ground truth):
public void setPointSize(int pointSize){
  if (renderStyle.getPointSize() != pointSize) {
    renderStyle.setPointSize(pointSize);
    bUpdateAll=true;
    setDisplayListDirty();
  }
}
Program: 58557
Project: 58557
Buggy source:
public void leftRightSelect(boolean bLeftIsTrue){
  if (bLeftIsTrue)   SELECTED_Y_AXIS++;
 else   SELECTED_Y_AXIS--;
  if (SELECTED_Y_AXIS < 0)   SELECTED_Y_AXIS=0;
}

Fixed version (ground truth):
public void leftRightSelect(boolean bRightIsTrue){
  int tmpAxis=SELECTED_X_AXIS;
  if (bRightIsTrue)   tmpAxis++;
 else   tmpAxis--;
  if (tmpAxis < 0)   tmpAxis=0;
  if ((tmpAxis + 1) >= storageVA.size())   tmpAxis=SELECTED_X_AXIS;
  SELECTED_X_AXIS=tmpAxis;
  bUpdateAll=true;
  setDisplayListDirty();
}
Program: 58558
Project: 58558
Buggy source:
@Override public void displayLocal(GL gl){
  GLMouseListener glMouseListener=getParentGLCanvas().getGLMouseListener();
  if (glMouseListener.wasMouseDragged()) {
    bRectangleSelection=true;
    Point pDragEndPoint=glMouseListener.getPickedPoint();
    Point pDragStartPoint=glMouseListener.getPickedPointDragStart();
    fDragStartPoint=GLCoordinateUtils.convertWindowCoordinatesToWorldCoordinates(gl,pDragStartPoint.x,pDragStartPoint.y);
    fDragEndPoint=GLCoordinateUtils.convertWindowCoordinatesToWorldCoordinates(gl,pDragEndPoint.x,pDragEndPoint.y);
    gl.glNewList(iGLDisplayListIndexBrush,GL.GL_COMPILE);
    DrawRectangularSelection(gl);
    gl.glEndList();
  }
  if (glMouseListener.wasMouseReleased() && bRectangleSelection) {
    bRectangleSelection=false;
    setDisplayListDirty();
    UpdateSelection();
    gl.glDeleteLists(iGLDisplayListIndexBrush,1);
    bUpdateSelection=true;
  }
  pickingManager.handlePicking(this,gl);
  if (bIsDisplayListDirtyLocal) {
    buildDisplayList(gl,iGLDisplayListIndexLocal);
    bIsDisplayListDirtyLocal=false;
  }
  iGLDisplayListToCall=iGLDisplayListIndexLocal;
  if (bUpdateSelection) {
    bUpdateSelection=false;
    buildDisplayListSelection(gl,iGLDisplayListIndexSelection);
  }
  display(gl);
  checkForHits(gl);
  if (eBusyModeState != EBusyModeState.OFF)   renderBusyMode(gl);
}

Fixed version (ground truth):
@Override public void displayLocal(GL gl){
  GLMouseListener glMouseListener=getParentGLCanvas().getGLMouseListener();
  if (glMouseListener.wasMouseDragged()) {
    bRectangleSelection=true;
    Point pDragEndPoint=glMouseListener.getPickedPoint();
    Point pDragStartPoint=glMouseListener.getPickedPointDragStart();
    fDragStartPoint=GLCoordinateUtils.convertWindowCoordinatesToWorldCoordinates(gl,pDragStartPoint.x,pDragStartPoint.y);
    fDragEndPoint=GLCoordinateUtils.convertWindowCoordinatesToWorldCoordinates(gl,pDragEndPoint.x,pDragEndPoint.y);
    gl.glNewList(iGLDisplayListIndexBrush,GL.GL_COMPILE);
    DrawRectangularSelection(gl);
    gl.glEndList();
  }
  if (glMouseListener.wasMouseReleased() && bRectangleSelection) {
    bRectangleSelection=false;
    setDisplayListDirty();
    UpdateSelection();
    gl.glDeleteLists(iGLDisplayListIndexBrush,1);
    bUpdateSelection=true;
  }
  pickingManager.handlePicking(this,gl);
  if (bIsDisplayListDirtyLocal) {
    buildDisplayList(gl,iGLDisplayListIndexLocal);
    bIsDisplayListDirtyLocal=false;
  }
  iGLDisplayListToCall=iGLDisplayListIndexLocal;
  display(gl);
  checkForHits(gl);
  if (eBusyModeState != EBusyModeState.OFF)   renderBusyMode(gl);
}
Program: 58559
Project: 58559
Buggy source:
public void toggleSpecialAxisMode(){
  if (bRender2Axis)   bRender2Axis=false;
 else   bRender2Axis=true;
}

Fixed version (ground truth):
public void toggleSpecialAxisMode(){
  if (bRender2Axis)   bRender2Axis=false;
 else   bRender2Axis=true;
  bUpdateAll=true;
  setDisplayListDirty();
}
Program: 58560
Project: 58560
Buggy source:
@Override protected void handleKeyPressedEvent(KeyEvent event){
  if (event.character == 'b') {
    glScatterplot.toggleSpecialAxisMode();
    return;
  }
switch (event.keyCode) {
case SWT.ARROW_UP:
    glScatterplot.upDownSelect(true);
  break;
case SWT.ARROW_DOWN:
glScatterplot.upDownSelect(false);
break;
case SWT.ARROW_LEFT:
glScatterplot.leftRightSelect(true);
break;
case SWT.ARROW_RIGHT:
glScatterplot.leftRightSelect(false);
break;
case SWT.HOME:
glScatterplot.clearAllSelections();
break;
case SWT.ABORT:
glScatterplot.clearAllSelections();
break;
}
}

Fixed version (ground truth):
@Override protected void handleKeyPressedEvent(KeyEvent event){
  if (event.character == 'b') {
    glScatterplot.toggleSpecialAxisMode();
    return;
  }
  if (event.character == 'p') {
    glScatterplot.togglePointType();
    return;
  }
switch (event.keyCode) {
case SWT.ARROW_UP:
    glScatterplot.upDownSelect(false);
  break;
case SWT.ARROW_DOWN:
glScatterplot.upDownSelect(true);
break;
case SWT.ARROW_LEFT:
glScatterplot.leftRightSelect(false);
break;
case SWT.ARROW_RIGHT:
glScatterplot.leftRightSelect(true);
break;
case SWT.HOME:
glScatterplot.ResetSelection();
break;
}
}
Program: 58562
Project: 58562
Buggy source:
@Override protected void handlePickingEvents(EPickingType ePickingType,EPickingMode pickingMode,int iExternalID,Pick pick){
  if (detailLevel == EDetailLevel.VERY_LOW) {
    return;
  }
  if (bRectangleSelection)   return;
  ESelectionType eSelectionType;
switch (ePickingType) {
case SCATTER_POINT_SELECTION:
    iCurrentMouseOverElement=iExternalID;
switch (pickingMode) {
case CLICKED:
    eSelectionType=ESelectionType.SELECTION;
  break;
case MOUSE_OVER:
eSelectionType=ESelectionType.MOUSE_OVER;
elementSelectionManager.clearSelection(eSelectionType);
break;
case RIGHT_CLICKED:
eSelectionType=ESelectionType.DESELECTED;
break;
case DRAGGED:
eSelectionType=ESelectionType.SELECTION;
default :
return;
}
createContentSelection(eSelectionType,iExternalID);
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;
  ESelectionType eSelectionType;
switch (ePickingType) {
case SCATTER_POINT_SELECTION:
    iCurrentMouseOverElement=iExternalID;
switch (pickingMode) {
case CLICKED:
    eSelectionType=ESelectionType.SELECTION;
  break;
case MOUSE_OVER:
eSelectionType=ESelectionType.MOUSE_OVER;
break;
case RIGHT_CLICKED:
eSelectionType=ESelectionType.DESELECTED;
break;
case DRAGGED:
eSelectionType=ESelectionType.SELECTION;
default :
return;
}
createContentSelection(eSelectionType,iExternalID);
break;
}
}
Program: 58563
Project: 58563
Buggy source:
private void createContentSelection(ESelectionType selectionType,int contentID){
  if (elementSelectionManager.checkStatus(selectionType,contentID))   return;
  if (elementSelectionManager.checkStatus(ESelectionType.SELECTION,contentID) && selectionType == ESelectionType.DESELECTED) {
    elementSelectionManager.removeFromType(ESelectionType.SELECTION,contentID);
    setDisplayListDirty();
    bUpdateSelection=true;
    return;
  }
  if (elementSelectionManager.checkStatus(ESelectionType.SELECTION,contentID)) {
    bUpdateSelection=true;
  }
  if (!elementSelectionManager.checkStatus(contentID))   elementSelectionManager.add(contentID);
  elementSelectionManager.addToType(selectionType,contentID);
  setDisplayListDirty();
}

Fixed version (ground truth):
private void createContentSelection(ESelectionType selectionType,int contentID){
  if (elementSelectionManager.checkStatus(ESelectionType.SELECTION,contentID)) {
    if (selectionType == ESelectionType.DESELECTED) {
      elementSelectionManager.removeFromType(ESelectionType.SELECTION,contentID);
      setDisplayListDirty();
      bUpdateSelection=true;
      return;
    }
  }
  if (selectionType == ESelectionType.SELECTION) {
    if (!elementSelectionManager.checkStatus(contentID))     elementSelectionManager.add(contentID);
    elementSelectionManager.addToType(selectionType,contentID);
    bUpdateSelection=true;
  }
  if ((selectionType == ESelectionType.MOUSE_OVER)) {
    mouseoverSelectionManager.resetSelectionManager();
    mouseoverSelectionManager.add(contentID);
    mouseoverSelectionManager.addToType(selectionType,contentID);
  }
  setDisplayListDirty();
}
Program: 58565
Project: 58565
Buggy source:
@Override public void init(GL gl){
  renderStyle=new ScatterPlotRenderStyle(this,viewFrustum);
  super.renderStyle=renderStyle;
  InitAxisComboEvent initAxisComboEvent=new InitAxisComboEvent();
  initAxisComboEvent.setSender(this);
  initAxisComboEvent.setAxisNames(this.getAxisString());
  GeneralManager.get().getEventPublisher().triggerEvent(initAxisComboEvent);
}

Fixed version (ground truth):
@Override public void init(GL gl){
  renderStyle=new ScatterPlotRenderStyle(this,viewFrustum);
  super.renderStyle=renderStyle;
  InitAxisComboEvent initAxisComboEvent=new InitAxisComboEvent();
  initAxisComboEvent.setSender(this);
  initAxisComboEvent.setAxisNames(this.getAxisString());
  GeneralManager.get().getEventPublisher().triggerEvent(initAxisComboEvent);
  POINTSIZE=POINTSIZE / 1.0f;
  POINTSTYLE=EScatterPointType.CROSS;
}
Program: 58566
Project: 58566
Buggy source:
private void DrawMouseOverLabel(GL gl,float x,float y,float z,float[] fArMappingColor,float fOpacity,int iContentIndex){
  textRenderer.setColor(0,0,0,1);
  z=z + 3.0f;
  x=x + 0.1f;
  gl.glTranslatef(x,y,z);
  String sLabel="String_Node_Str" + set.get(SELECTED_X_AXIS).getFloat(EDataRepresentation.RAW,iContentIndex) + "String_Node_Str"+ set.get(SELECTED_Y_AXIS).getFloat(EDataRepresentation.RAW,iContentIndex);
  float fScaling=renderStyle.getSmallFontScalingFactor();
  if (isRenderedRemote())   fScaling*=1.5f;
  Rectangle2D bounds=textRenderer.getScaledBounds(gl,sLabel,fScaling,ScatterPlotRenderStyle.MIN_NUMBER_TEXT_SIZE);
  float boxLengh=(float)bounds.getWidth() + 0.2f;
  float boxHight=(float)bounds.getHeight();
  gl.glColor3f(1.0f,1.0f,0.0f);
  gl.glBegin(GL.GL_POLYGON);
  gl.glVertex3f(0.0f,-0.02f,-0.1f);
  gl.glVertex3f(0.0f,boxHight,-0.1f);
  gl.glVertex3f(boxLengh,boxHight,-0.1f);
  gl.glVertex3f(boxLengh,-0.02f,-0.1f);
  gl.glEnd();
  gl.glPushAttrib(GL.GL_CURRENT_BIT | GL.GL_LINE_BIT);
  textRenderer.begin3DRendering();
  textRenderer.draw3D(gl,sLabel,0,0,ScatterPlotRenderStyle.TEXT_ON_LABEL_Z,fScaling,ScatterPlotRenderStyle.MIN_AXIS_LABEL_TEXT_SIZE);
  textRenderer.end3DRendering();
  gl.glPopAttrib();
  gl.glTranslatef(-x,-y,-z);
}

Fixed version (ground truth):
private void DrawMouseOverLabel(GL gl,float x,float y,float z,float[] fArMappingColor,float fOpacity,int iContentIndex){
  textRenderer.setColor(0,0,0,1);
  z=z + 3.0f;
  x=x + 0.1f;
  gl.glTranslatef(x,y,z);
  String sLabel="String_Node_Str";
  if (elementSelectionManager.checkStatus(ESelectionType.SELECTION,iContentIndex))   sLabel="String_Node_Str" + set.get(SELECTED_X_AXIS).getFloat(EDataRepresentation.RAW,iContentIndex) + "String_Node_Str"+ set.get(SELECTED_Y_AXIS).getFloat(EDataRepresentation.RAW,iContentIndex);
 else   sLabel="String_Node_Str" + set.get(SELECTED_X_AXIS).getFloat(EDataRepresentation.RAW,iContentIndex) + "String_Node_Str"+ set.get(SELECTED_Y_AXIS).getFloat(EDataRepresentation.RAW,iContentIndex);
  float fScaling=renderStyle.getSmallFontScalingFactor();
  if (isRenderedRemote())   fScaling*=1.5f;
  Rectangle2D bounds=textRenderer.getScaledBounds(gl,sLabel,fScaling,ScatterPlotRenderStyle.MIN_NUMBER_TEXT_SIZE);
  float boxLengh=(float)bounds.getWidth() + 0.2f;
  float boxHight=(float)bounds.getHeight();
  gl.glColor3f(1.0f,1.0f,0.0f);
  gl.glBegin(GL.GL_POLYGON);
  gl.glVertex3f(0.0f,-0.02f,-0.1f);
  gl.glVertex3f(0.0f,boxHight,-0.1f);
  gl.glVertex3f(boxLengh,boxHight,-0.1f);
  gl.glVertex3f(boxLengh,-0.02f,-0.1f);
  gl.glEnd();
  gl.glPushAttrib(GL.GL_CURRENT_BIT | GL.GL_LINE_BIT);
  textRenderer.begin3DRendering();
  textRenderer.draw3D(gl,sLabel,0,0,ScatterPlotRenderStyle.TEXT_ON_LABEL_Z,fScaling,ScatterPlotRenderStyle.MIN_AXIS_LABEL_TEXT_SIZE);
  textRenderer.end3DRendering();
  gl.glPopAttrib();
  gl.glTranslatef(-x,-y,-z);
}
Program: 58568
Project: 58568
Buggy source:
@Override protected void initLists(){
  if (contentVAType != EVAType.CONTENT_EMBEDDED_HM) {
    if (bRenderOnlyContext)     contentVAType=EVAType.CONTENT_CONTEXT;
 else     contentVAType=EVAType.CONTENT;
  }
  contentVA=useCase.getVA(contentVAType);
  storageVA=useCase.getVA(storageVAType);
  elementSelectionManager=storageSelectionManager;
}

Fixed version (ground truth):
@Override protected void initLists(){
  if (contentVAType != EVAType.CONTENT_EMBEDDED_HM) {
    if (bRenderOnlyContext)     contentVAType=EVAType.CONTENT_CONTEXT;
 else     contentVAType=EVAType.CONTENT;
  }
  contentVA=useCase.getVA(contentVAType);
  storageVA=useCase.getVA(storageVAType);
  mouseoverSelectionManager=new SelectionManager.Builder(EIDType.UNSPECIFIED).build();
  elementSelectionManager=contentSelectionManager;
}
Program: 58570
Project: 58570
Buggy source:
@Override protected void handlePickingEvents(EPickingType ePickingType,EPickingMode pickingMode,int iExternalID,Pick pick){
  if (detailLevel == EDetailLevel.VERY_LOW) {
    return;
  }
  ESelectionType eSelectionType;
switch (ePickingType) {
case SCATTER_POINT_SELECTION:
    iCurrentMouseOverElement=iExternalID;
switch (pickingMode) {
case CLICKED:
    eSelectionType=ESelectionType.SELECTION;
  break;
case MOUSE_OVER:
eSelectionType=ESelectionType.MOUSE_OVER;
elementSelectionManager.clearSelection(eSelectionType);
break;
case RIGHT_CLICKED:
eSelectionType=ESelectionType.SELECTION;
default :
return;
}
createContentSelection(eSelectionType,iExternalID);
break;
}
}

Fixed version (ground truth):
@Override protected void handlePickingEvents(EPickingType ePickingType,EPickingMode pickingMode,int iExternalID,Pick pick){
  if (detailLevel == EDetailLevel.VERY_LOW) {
    return;
  }
  ESelectionType eSelectionType;
switch (ePickingType) {
case SCATTER_POINT_SELECTION:
    iCurrentMouseOverElement=iExternalID;
switch (pickingMode) {
case CLICKED:
    eSelectionType=ESelectionType.SELECTION;
  break;
case MOUSE_OVER:
eSelectionType=ESelectionType.MOUSE_OVER;
elementSelectionManager.clearSelection(eSelectionType);
break;
case RIGHT_CLICKED:
eSelectionType=ESelectionType.DESELECTED;
break;
default :
return;
}
createContentSelection(eSelectionType,iExternalID);
break;
}
}
Program: 58571
Project: 58571
Buggy source:
private void createContentSelection(ESelectionType selectionType,int contentID){
  if (elementSelectionManager.checkStatus(selectionType,contentID))   return;
  if (selectionType == ESelectionType.MOUSE_OVER && elementSelectionManager.checkStatus(ESelectionType.SELECTION,contentID) && elementSelectionManager.getElements(ESelectionType.MOUSE_OVER).size() == 0)   return;
  connectedElementRepresentationManager.clear(EIDType.EXPRESSION_INDEX);
  if (elementSelectionManager.checkStatus(ESelectionType.SELECTION,contentID) && selectionType == ESelectionType.SELECTION)   elementSelectionManager.removeFromType(selectionType,contentID);
  int test=elementSelectionManager.getNumberOfElements();
  elementSelectionManager.add(contentID);
  elementSelectionManager.addToType(selectionType,contentID);
  test=elementSelectionManager.getNumberOfElements();
  setDisplayListDirty();
}

Fixed version (ground truth):
private void createContentSelection(ESelectionType selectionType,int contentID){
  if (elementSelectionManager.checkStatus(selectionType,contentID))   return;
  if (elementSelectionManager.checkStatus(ESelectionType.SELECTION,contentID) && selectionType == ESelectionType.DESELECTED) {
    elementSelectionManager.removeFromType(ESelectionType.SELECTION,contentID);
    setDisplayListDirty();
    return;
  }
  if (!elementSelectionManager.checkStatus(contentID))   elementSelectionManager.add(contentID);
  elementSelectionManager.addToType(selectionType,contentID);
  setDisplayListDirty();
}
Program: 58572
Project: 58572
Buggy source:
private void DrawLabel(GL gl,float x,float y,float z,float[] fArMappingColor,float fOpacity,int iContentIndex){
  z=z + 2.1f;
  gl.glTranslatef(x,y,z);
  textRenderer.begin3DRendering();
  float fScaling=renderStyle.getSmallFontScalingFactor();
  if (isRenderedRemote())   fScaling*=1.5f;
  String sLabel="String_Node_Str" + set.get(SELECTED_X_AXIS).getFloat(EDataRepresentation.RAW,iContentIndex) + "String_Node_Str"+ set.get(SELECTED_Y_AXIS).getFloat(EDataRepresentation.RAW,iContentIndex);
  textRenderer.draw3D(gl,sLabel,0,0,0,fScaling,ScatterPlotRenderStyle.MIN_AXIS_LABEL_TEXT_SIZE);
  textRenderer.end3DRendering();
  gl.glTranslatef(-x,-y,-z);
}

Fixed version (ground truth):
private void DrawLabel(GL gl,float x,float y,float z,float[] fArMappingColor,float fOpacity,int iContentIndex){
  z=z + 3.0f;
  x=x + 0.1f;
  gl.glTranslatef(x,y,z);
  float boxLengh=0.8f;
  float boxHight=0.1f;
  gl.glColor3f(1.0f,1.0f,1.0f);
  gl.glBegin(GL.GL_POLYGON);
  gl.glVertex3f(0.0f,-0.02f,-0.1f);
  gl.glVertex3f(0.0f,boxHight,-0.1f);
  gl.glVertex3f(boxLengh,boxHight,-0.1f);
  gl.glVertex3f(boxLengh,-0.02f,-0.1f);
  gl.glEnd();
  textRenderer.begin3DRendering();
  float fScaling=renderStyle.getSmallFontScalingFactor();
  if (isRenderedRemote())   fScaling*=1.5f;
  String sLabel="String_Node_Str" + set.get(SELECTED_X_AXIS).getFloat(EDataRepresentation.RAW,iContentIndex) + "String_Node_Str"+ set.get(SELECTED_Y_AXIS).getFloat(EDataRepresentation.RAW,iContentIndex);
  textRenderer.draw3D(gl,sLabel,0,0,0,fScaling,ScatterPlotRenderStyle.MIN_AXIS_LABEL_TEXT_SIZE);
  textRenderer.end3DRendering();
  gl.glTranslatef(-x,-y,-z);
}
Program: 58575
Project: 58575
Buggy source:
public void setPointSize(int value){
  POINTSIZE=value / 200.0f;
  iPointSize=value;
}

Fixed version (ground truth):
public void setPointSize(int value){
  POINTSIZE=value / 100.0f;
  iPointSize=value;
}
Program: 58576
Project: 58576
Buggy source:
@Override protected Control createControl(Composite parent){
  Composite composite=new Composite(parent,SWT.NULL);
  GridLayout layout=new GridLayout(1,false);
  layout.marginHeight=layout.marginWidth=layout.horizontalSpacing=0;
  composite.setLayout(layout);
  slider=new Slider(composite,SWT.HORIZONTAL);
  slider.setValues(iSelection,2,20,1,1,1);
  slider.setLayoutData(new GridData(130,20));
  listener=new Listener(){
    public void handleEvent(    Event event){
      SetPointSizeEvent setPointSizeEvent=new SetPointSizeEvent();
      setPointSizeEvent.setSender(this);
      setPointSizeEvent.setPointSize(slider.getSelection());
      GeneralManager.get().getEventPublisher().triggerEvent(setPointSizeEvent);
    }
  }
;
  iSelection=slider.getSelection();
  slider.addListener(SWT.Selection,listener);
  return composite;
}

Fixed version (ground truth):
@Override protected Control createControl(Composite parent){
  Composite composite=new Composite(parent,SWT.NULL);
  GridLayout layout=new GridLayout(1,false);
  layout.marginHeight=layout.marginWidth=layout.horizontalSpacing=0;
  composite.setLayout(layout);
  iSelection=5;
  slider=new Slider(composite,SWT.HORIZONTAL);
  slider.setValues(iSelection,1,10,1,1,1);
  slider.setLayoutData(new GridData(130,20));
  listener=new Listener(){
    public void handleEvent(    Event event){
      SetPointSizeEvent setPointSizeEvent=new SetPointSizeEvent();
      setPointSizeEvent.setSender(this);
      setPointSizeEvent.setPointSize(slider.getSelection());
      GeneralManager.get().getEventPublisher().triggerEvent(setPointSizeEvent);
    }
  }
;
  iSelection=slider.getSelection();
  slider.addListener(SWT.Selection,listener);
  return composite;
}
Program: 58577
Project: 58577
Buggy source:
public void setPointSize(int pointSize){
  if (renderStyle.getPointSize() == pointSize) {
    renderStyle.setPointSize(pointSize);
    setDisplayListDirty();
  }
}

Fixed version (ground truth):
public void setPointSize(int pointSize){
  if (renderStyle.getPointSize() != pointSize) {
    renderStyle.setPointSize(pointSize);
    setDisplayListDirty();
  }
}
Program: 58578
Project: 58578
Buggy source:
private void DrawPointPrimitive(GL gl,float x,float y,float z,float[] fArMappingColor,float fOpacity){
switch (POINTSTYLE) {
case BOX:
{
      gl.glBegin(GL.GL_POLYGON);
      gl.glColor4f(fArMappingColor[0],fArMappingColor[1],fArMappingColor[2],fOpacity);
      gl.glVertex3f(x,y,z);
      gl.glVertex3f(x,y + POINTSIZE,z);
      gl.glVertex3f(x + POINTSIZE,y + POINTSIZE,z);
      gl.glVertex3f(x + POINTSIZE,y,z);
      gl.glEnd();
      break;
    }
case POINT:
{
    gl.glPointSize(POINTSIZE * 10.0f);
    gl.glColor4f(fArMappingColor[0],fArMappingColor[1],fArMappingColor[2],fOpacity);
    gl.glBegin(GL.GL_POINTS);
    gl.glVertex3f(x,y,z);
    gl.glEnd();
    break;
  }
case CROSS:
{
  gl.glLineWidth(1.0f);
  gl.glBegin(GL.GL_LINES);
  gl.glColor4f(fArMappingColor[0],fArMappingColor[1],fArMappingColor[2],fOpacity);
  gl.glVertex3f(x,y,z);
  gl.glVertex3f(x + POINTSIZE,y + POINTSIZE,z);
  gl.glVertex3f(x,y + POINTSIZE,z);
  gl.glVertex3f(x + POINTSIZE,y,z);
  gl.glEnd();
}
break;
case CIRCLE:
{
float angle;
float PI=(float)Math.PI;
gl.glLineWidth(1.0f);
gl.glBegin(GL.GL_LINE_LOOP);
gl.glColor4f(fArMappingColor[0],fArMappingColor[1],fArMappingColor[2],fOpacity);
for (int i=0; i < 10; i++) {
angle=(i * 2 * PI) / 10;
gl.glVertex3f(x + (float)(Math.cos(angle) * POINTSIZE),y + (float)(Math.sin(angle) * POINTSIZE),z);
}
gl.glEnd();
}
break;
default :
}
}

Fixed version (ground truth):
private void DrawPointPrimitive(GL gl,float x,float y,float z,float[] fArMappingColor,float fOpacity){
  float halfPoint=POINTSIZE / 2.0f;
switch (POINTSTYLE) {
case BOX:
{
      gl.glBegin(GL.GL_POLYGON);
      gl.glColor4f(fArMappingColor[0],fArMappingColor[1],fArMappingColor[2],fOpacity);
      gl.glVertex3f(x - halfPoint,y - halfPoint,z);
      gl.glVertex3f(x - halfPoint,y + halfPoint,z);
      gl.glVertex3f(x + halfPoint,y + halfPoint,z);
      gl.glVertex3f(x + halfPoint,y - halfPoint,z);
      gl.glEnd();
      break;
    }
case POINT:
{
    gl.glPointSize(POINTSIZE * 10.0f);
    gl.glColor4f(fArMappingColor[0],fArMappingColor[1],fArMappingColor[2],fOpacity);
    gl.glBegin(GL.GL_POINTS);
    gl.glVertex3f(x,y,z);
    gl.glEnd();
    break;
  }
case CROSS:
{
  gl.glLineWidth(1.0f);
  gl.glBegin(GL.GL_LINES);
  gl.glColor4f(fArMappingColor[0],fArMappingColor[1],fArMappingColor[2],fOpacity);
  gl.glVertex3f(x - halfPoint,y - halfPoint,z);
  gl.glVertex3f(x + halfPoint,y + halfPoint,z);
  gl.glVertex3f(x - halfPoint,y + halfPoint,z);
  gl.glVertex3f(x + halfPoint,y - halfPoint,z);
  gl.glEnd();
}
break;
case CIRCLE:
{
float angle;
float PI=(float)Math.PI;
gl.glLineWidth(1.0f);
gl.glBegin(GL.GL_LINE_LOOP);
gl.glColor4f(fArMappingColor[0],fArMappingColor[1],fArMappingColor[2],fOpacity);
for (int i=0; i < 10; i++) {
angle=(i * 2 * PI) / 10;
gl.glVertex3f(x + (float)(Math.cos(angle) * POINTSIZE),y + (float)(Math.sin(angle) * POINTSIZE),z);
}
gl.glEnd();
}
break;
default :
}
}
Program: 58579
Project: 58579
Buggy source:
public void setPointSize(int value){
  POINTSIZE=value / 50;
  iPointSize=value;
}

Fixed version (ground truth):
public void setPointSize(int value){
  POINTSIZE=value / 50.0f;
  iPointSize=value;
}
Program: 58580
Project: 58580
Buggy source:
@Override protected List<ToolBarContainer> getToolBarContent(){
  ActionToolBarContainer container=new ActionToolBarContainer();
  container.setImagePath(IMAGE_PATH);
  container.setTitle(VIEW_TITLE);
  List<IToolBarItem> actionList=new ArrayList<IToolBarItem>();
  container.setToolBarItems(actionList);
  int targetViewID=getTargetViewData().getViewID();
  IToolBarItem testAction=new ScatterplotTestAction(targetViewID);
  actionList.add(testAction);
  if (testSlider == null) {
    testSlider=new DepthSlider("String_Node_Str",0);
  }
  actionList.add(testSlider);
  ArrayList<ToolBarContainer> list=new ArrayList<ToolBarContainer>();
  list.add(container);
  return list;
}

Fixed version (ground truth):
@Override protected List<ToolBarContainer> getToolBarContent(){
  ActionToolBarContainer container=new ActionToolBarContainer();
  container.setImagePath(IMAGE_PATH);
  container.setTitle(VIEW_TITLE);
  List<IToolBarItem> actionList=new ArrayList<IToolBarItem>();
  container.setToolBarItems(actionList);
  int targetViewID=getTargetViewData().getViewID();
  IToolBarItem testAction=new ScatterplotTestAction(targetViewID);
  actionList.add(testAction);
  if (testSlider == null) {
    testSlider=new PointSizeSlider("String_Node_Str",0);
  }
  actionList.add(testSlider);
  ArrayList<ToolBarContainer> list=new ArrayList<ToolBarContainer>();
  list.add(container);
  return list;
}
Program: 58582
Project: 58582
Buggy source:
@Override public void handleSelectionUpdate(ISelectionDelta selectionDelta,boolean scrollToSelection,String info){
  if (selectionDelta.getIDType().getCategory() == EIDCategory.GENE) {
    contentSelectionManager.setDelta(selectionDelta);
    ISelectionDelta internalDelta=contentSelectionManager.getCompleteDelta();
    initForAddedElements();
    handleConnectedElementRep(internalDelta);
    reactOnExternalSelection(scrollToSelection);
    setDisplayListDirty();
  }
 else   if (selectionDelta.getIDType() == EIDType.EXPERIMENT_INDEX) {
    storageSelectionManager.setDelta(selectionDelta);
    handleConnectedElementRep(storageSelectionManager.getCompleteDelta());
    reactOnExternalSelection(scrollToSelection);
    setDisplayListDirty();
  }
}

Fixed version (ground truth):
@Override public void handleSelectionUpdate(ISelectionDelta selectionDelta,boolean scrollToSelection,String info){
  if (selectionDelta.getIDType().getCategory() == EIDCategory.GENE && dataDomain == EDataDomain.GENETIC_DATA) {
    contentSelectionManager.setDelta(selectionDelta);
    ISelectionDelta internalDelta=contentSelectionManager.getCompleteDelta();
    initForAddedElements();
    handleConnectedElementRep(internalDelta);
    reactOnExternalSelection(scrollToSelection);
    setDisplayListDirty();
  }
 else   if (selectionDelta.getIDType() == EIDType.EXPERIMENT_INDEX && (dataDomain == EDataDomain.GENETIC_DATA)) {
    storageSelectionManager.setDelta(selectionDelta);
    handleConnectedElementRep(storageSelectionManager.getCompleteDelta());
    reactOnExternalSelection(scrollToSelection);
    setDisplayListDirty();
  }
 else   if (selectionDelta.getIDType() == EIDType.EXPERIMENT_INDEX && dataDomain == EDataDomain.CLINICAL_DATA) {
    contentSelectionManager.setDelta(selectionDelta);
    handleConnectedElementRep(storageSelectionManager.getCompleteDelta());
    reactOnExternalSelection(scrollToSelection);
    setDisplayListDirty();
  }
}
Program: 58584
Project: 58584
Buggy source:
@Override public void initData(){
  super.initData();
  if (glSelectionHeatMap != null)   glSelectionHeatMap.setSet(set);
  initGates();
  resetAxisSpacing();
}

Fixed version (ground truth):
@Override public void initData(){
  super.initData();
  if (glBookmarks != null)   glBookmarks.setSet(set);
  initGates();
  resetAxisSpacing();
}
Program: 58585
Project: 58585
Buggy source:
private void createSelectionHeatMap(GL gl){
  CmdCreateGLEventListener cmdCreateGLView=(CmdCreateGLEventListener)generalManager.getCommandManager().createCommandByType(ECommandType.CREATE_GL_PROPAGATION_HEAT_MAP_3D);
  cmdCreateGLView.setAttributes(dataDomain,EProjectionMode.ORTHOGRAPHIC,0,0.8f,viewFrustum.getBottom(),viewFrustum.getTop(),-20,20,-1);
  cmdCreateGLView.doCommand();
  glSelectionHeatMap=(GLBookmarkManager)cmdCreateGLView.getCreatedObject();
  glSelectionHeatMap.setRemoteRenderingGLView(this);
  glSelectionHeatMap.setUseCase(useCase);
  glSelectionHeatMap.setSet(set);
  glSelectionHeatMap.initData();
  glSelectionHeatMap.initRemote(gl,this,glMouseListener,null);
}

Fixed version (ground truth):
private void createSelectionHeatMap(GL gl){
  CmdCreateGLEventListener cmdCreateGLView=(CmdCreateGLEventListener)generalManager.getCommandManager().createCommandByType(ECommandType.CREATE_GL_PROPAGATION_HEAT_MAP_3D);
  cmdCreateGLView.setAttributes(dataDomain,EProjectionMode.ORTHOGRAPHIC,0,0.8f,viewFrustum.getBottom(),viewFrustum.getTop(),-20,20,-1);
  cmdCreateGLView.doCommand();
  glBookmarks=(GLBookmarkManager)cmdCreateGLView.getCreatedObject();
  glBookmarks.setRemoteRenderingGLView(this);
  glBookmarks.setUseCase(useCase);
  glBookmarks.setSet(set);
  glBookmarks.initData();
  glBookmarks.initRemote(gl,this,glMouseListener,null);
}