nus-yam/ex-repair huggingface dataset:
Program: 58094
Project: 58094
Buggy source:
public void processMouseWheeleEvent(MouseWheelEvent e){
  if (bIsMouseWheeleUsed) {
    if (e.getWheelRotation() > 0) {
      ATreeMapNode node=treeMapModel.getNodeByNumber(mouseWheeleSelectionId);
      mouseWheeleSelectionHeight++;
      ATreeMapNode parent=node.getParentWithLevel(node.getHierarchyLevel() - mouseWheeleSelectionHeight);
      if (parent != null) {
        treeSelectionManager.clearSelection(SelectionType.SELECTION);
        treeSelectionManager.addToType(SelectionType.SELECTION,parent.getID());
      }
 else {
        mouseWheeleSelectionHeight--;
      }
    }
 else {
      ATreeMapNode node=treeMapModel.getNodeByNumber(mouseWheeleSelectionId);
      if (mouseWheeleSelectionHeight > 0) {
        mouseWheeleSelectionHeight--;
        ATreeMapNode parent;
        if (mouseWheeleSelectionHeight == 0)         parent=node;
 else         parent=node.getParentWithLevel(node.getHierarchyLevel() - mouseWheeleSelectionHeight);
        treeSelectionManager.clearSelection(SelectionType.SELECTION);
        treeSelectionManager.addToType(SelectionType.SELECTION,parent.getID());
      }
    }
    setHighLichtingListDirty();
  }
}

Fixed version (ground truth):
public void processMouseWheeleEvent(MouseWheelEvent e){
  if (bIsMouseWheeleUsed) {
    if (e.getWheelRotation() > 0) {
      ATreeMapNode node=treeMapModel.getNodeByNumber(mouseWheeleSelectionId);
      mouseWheeleSelectionHeight++;
      ATreeMapNode parent=node.getParentWithLevel(node.getHierarchyLevel() - mouseWheeleSelectionHeight);
      if (parent != null) {
        treeSelectionManager.clearSelection(SelectionType.SELECTION);
        treeSelectionManager.addToType(SelectionType.SELECTION,parent.getID());
      }
 else {
        mouseWheeleSelectionHeight--;
      }
    }
 else {
      ATreeMapNode node=treeMapModel.getNodeByNumber(mouseWheeleSelectionId);
      if (mouseWheeleSelectionHeight > 0) {
        mouseWheeleSelectionHeight--;
        ATreeMapNode parent;
        if (mouseWheeleSelectionHeight == 0)         parent=node;
 else         parent=node.getParentWithLevel(node.getHierarchyLevel() - mouseWheeleSelectionHeight);
        treeSelectionManager.clearSelection(SelectionType.SELECTION);
        treeSelectionManager.addToType(SelectionType.SELECTION,parent.getID());
      }
    }
    setHighLightingListDirty();
  }
}
Program: 58095
Project: 58095
Buggy source:
public void setHighLightingLevel(int level){
  treeSelectionManager.clearSelection(SelectionType.LEVEL_HIGHLIGHTING);
  if (level > 0) {
    ArrayList<ClusterNode> nodes, newNodes;
    nodes=tree.getRoot().getChildren();
    for (int i=0; i < level; i++) {
      newNodes=new ArrayList<ClusterNode>();
      for (      ClusterNode node : nodes) {
        ArrayList<ClusterNode> children=node.getChildren();
        if (children != null)         newNodes.addAll(children);
      }
      nodes=newNodes;
    }
    for (    ClusterNode node : nodes) {
      treeSelectionManager.addToType(SelectionType.LEVEL_HIGHLIGHTING,node.getID());
    }
  }
  setHighLichtingListDirty();
}

Fixed version (ground truth):
public void setHighLightingLevel(int level){
  treeSelectionManager.clearSelection(SelectionType.LEVEL_HIGHLIGHTING);
  if (level > 0) {
    ArrayList<ClusterNode> nodes, newNodes;
    nodes=tree.getRoot().getChildren();
    for (int i=0; i < level; i++) {
      newNodes=new ArrayList<ClusterNode>();
      for (      ClusterNode node : nodes) {
        ArrayList<ClusterNode> children=node.getChildren();
        if (children != null)         newNodes.addAll(children);
      }
      nodes=newNodes;
    }
    for (    ClusterNode node : nodes) {
      treeSelectionManager.addToType(SelectionType.LEVEL_HIGHLIGHTING,node.getID());
    }
  }
  setHighLightingListDirty();
}
Program: 58096
Project: 58096
Buggy source:
@Override public void display(GL gl){
  if (bIsDisplayListDirtyLocal) {
    renderer.initCache(gl);
    renderer.initRenderer(viewFrustum,getActivePickingManager(),getPickingViewID(),treeSelectionManager,textRenderer);
    renderer.renderTreeMap(gl,treeMapModel.getRoot());
    bIsDisplayListDirtyLocal=false;
    setHighLichtingListDirty();
  }
  if (bIsHighlightingListDirty) {
    renderer.paintHighlighting(gl,treeMapModel,treeSelectionManager);
    bIsHighlightingListDirty=false;
  }
  renderer.renderTreeMapFromCache(gl);
}

Fixed version (ground truth):
@Override public void display(GL gl){
  if (bIsDisplayListDirtyLocal) {
    renderer.initCache(gl);
    renderer.initRenderer(viewFrustum,getActivePickingManager(),getPickingViewID(),treeSelectionManager,textRenderer);
    renderer.renderTreeMap(gl,treeMapModel.getRoot());
    bIsDisplayListDirtyLocal=false;
    setHighLightingListDirty();
  }
  if (bIsHighlightingListDirty) {
    renderer.paintHighlighting(gl,treeMapModel,treeSelectionManager);
    bIsHighlightingListDirty=false;
  }
  renderer.renderTreeMapFromCache(gl);
}
Program: 58098
Project: 58098
Buggy source:
@Override public String getShortInfo(){
  return "String_Node_Str";
}

Fixed version (ground truth):
@Override public String getShortInfo(){
  return "String_Node_Str" + dataDomain.getSet().getContentData(contentVAType).getContentTree().getNumberOfNodes() + "String_Node_Str";
}
Program: 58099
Project: 58099
Buggy source:
@Override public String getDetailedInfo(){
  return "String_Node_Str";
}

Fixed version (ground truth):
@Override public String getDetailedInfo(){
  return "String_Node_Str" + dataDomain.getSet().getContentData(contentVAType).getContentTree().getNumberOfNodes() + "String_Node_Str"+ thumbnailTreemapViews.size()+ "String_Node_Str";
}
Program: 58100
Project: 58100
Buggy source:
@Override protected void handlePickingEvents(EPickingType pickingType,EPickingMode pickingMode,int pickingID,Pick pick){
  if (detailLevel == DetailLevel.VERY_LOW) {
    return;
  }
switch (pickingType) {
case TREEMAP_ELEMENT_SELECTED:
switch (pickingMode) {
case CLICKED:
      mouseWheeleSelectionId=pickingID;
    treeSelectionManager.clearSelection(SelectionType.SELECTION);
  treeSelectionManager.addToType(SelectionType.SELECTION,mouseWheeleSelectionId);
bIsMouseWheeleUsed=true;
mouseWheeleSelectionHeight=0;
break;
case MOUSE_OVER:
treeSelectionManager.clearSelection(SelectionType.MOUSE_OVER);
treeSelectionManager.addToType(SelectionType.MOUSE_OVER,pickingID);
break;
case RIGHT_CLICKED:
break;
case DRAGGED:
break;
default :
return;
}
SelectionUpdateEvent event=new SelectionUpdateEvent();
event.setSender(this);
event.setDataDomainType(dataDomain.getDataDomainType());
event.setSelectionDelta(treeSelectionManager.getDelta());
event.setInfo(getShortInfoLocal());
eventPublisher.triggerEvent(event);
setHighLichtingListDirty();
break;
default :
return;
}
}

Fixed version (ground truth):
@Override protected void handlePickingEvents(EPickingType pickingType,EPickingMode pickingMode,int pickingID,Pick pick){
  if (detailLevel == DetailLevel.VERY_LOW) {
    return;
  }
switch (pickingType) {
case TREEMAP_ELEMENT_SELECTED:
switch (pickingMode) {
case CLICKED:
      mouseWheeleSelectionId=pickingID;
    treeSelectionManager.clearSelection(SelectionType.SELECTION);
  treeSelectionManager.addToType(SelectionType.SELECTION,mouseWheeleSelectionId);
bIsMouseWheeleUsed=true;
mouseWheeleSelectionHeight=0;
break;
case MOUSE_OVER:
treeSelectionManager.clearSelection(SelectionType.MOUSE_OVER);
treeSelectionManager.addToType(SelectionType.MOUSE_OVER,pickingID);
break;
case RIGHT_CLICKED:
break;
case DRAGGED:
break;
default :
return;
}
publishSelectionEvent();
setHighLichtingListDirty();
break;
default :
return;
}
}
Program: 58101
Project: 58101
Buggy source:
@Override public void registerEventListeners(){
  super.registerEventListeners();
  labelListener=new ToggleLabelListener();
  labelListener.setHandler(this);
  eventPublisher.addListener(ToggleLabelEvent.class,labelListener);
  coloringModeListener=new ToggleColoringModeListener();
  coloringModeListener.setHandler(this);
  eventPublisher.addListener(ToggleColoringModeEvent.class,coloringModeListener);
  selectionUpdateListener=new SelectionUpdateListener();
  selectionUpdateListener.setDataDomainType(dataDomain.getDataDomainType());
  selectionUpdateListener.setHandler(this);
  eventPublisher.addListener(SelectionUpdateEvent.class,selectionUpdateListener);
  updateColorMappingListener=new UpdateColorMappingListener();
  updateColorMappingListener.setHandler(this);
  eventPublisher.addListener(UpdateColorMappingEvent.class,updateColorMappingListener);
  updateViewListener=new UpdateViewListener();
  updateViewListener.setHandler(this);
  eventPublisher.addListener(UpdateViewEvent.class,updateViewListener);
}

Fixed version (ground truth):
@Override public void registerEventListeners(){
  super.registerEventListeners();
  labelListener=new ToggleLabelListener();
  labelListener.setHandler(this);
  eventPublisher.addListener(ToggleLabelEvent.class,labelListener);
  coloringModeListener=new ToggleColoringModeListener();
  coloringModeListener.setHandler(this);
  eventPublisher.addListener(ToggleColoringModeEvent.class,coloringModeListener);
  levelHighlightingListener=new LevelHighlightingListener();
  levelHighlightingListener.setHandler(this);
  eventPublisher.addListener(LevelHighlightingEvent.class,levelHighlightingListener);
  selectionUpdateListener=new SelectionUpdateListener();
  selectionUpdateListener.setDataDomainType(dataDomain.getDataDomainType());
  selectionUpdateListener.setHandler(this);
  eventPublisher.addListener(SelectionUpdateEvent.class,selectionUpdateListener);
  updateColorMappingListener=new UpdateColorMappingListener();
  updateColorMappingListener.setHandler(this);
  eventPublisher.addListener(UpdateColorMappingEvent.class,updateColorMappingListener);
  updateViewListener=new UpdateViewListener();
  updateViewListener.setHandler(this);
  eventPublisher.addListener(UpdateViewEvent.class,updateViewListener);
}
Program: 58102
Project: 58102
Buggy source:
@Override public void unregisterEventListeners(){
  super.unregisterEventListeners();
  if (selectionUpdateListener != null) {
    eventPublisher.removeListener(selectionUpdateListener);
    selectionUpdateListener=null;
  }
  if (labelListener != null) {
    eventPublisher.removeListener(labelListener);
    labelListener=null;
  }
  if (coloringModeListener != null) {
    eventPublisher.removeListener(coloringModeListener);
    coloringModeListener=null;
  }
  if (updateColorMappingListener != null) {
    eventPublisher.removeListener(updateColorMappingListener);
    updateColorMappingListener=null;
  }
  if (updateViewListener != null) {
    eventPublisher.removeListener(updateViewListener);
    updateViewListener=null;
  }
}

Fixed version (ground truth):
@Override public void unregisterEventListeners(){
  super.unregisterEventListeners();
  if (selectionUpdateListener != null) {
    eventPublisher.removeListener(selectionUpdateListener);
    selectionUpdateListener=null;
  }
  if (labelListener != null) {
    eventPublisher.removeListener(labelListener);
    labelListener=null;
  }
  if (coloringModeListener != null) {
    eventPublisher.removeListener(coloringModeListener);
    coloringModeListener=null;
  }
  if (levelHighlightingListener != null) {
    eventPublisher.removeListener(levelHighlightingListener);
    levelHighlightingListener=null;
  }
  if (updateColorMappingListener != null) {
    eventPublisher.removeListener(updateColorMappingListener);
    updateColorMappingListener=null;
  }
  if (updateViewListener != null) {
    eventPublisher.removeListener(updateViewListener);
    updateViewListener=null;
  }
}
Program: 58103
Project: 58103
Buggy source:
@Override public String getDetailedInfo(){
  return null;
}

Fixed version (ground truth):
@Override public String getDetailedInfo(){
  return "String_Node_Str";
}
Program: 58104
Project: 58104
Buggy source:
/** 
 * Returns different color depending how <code>setColorData</code> is used.
 */
@Override public float[] getColorAttribute(){
  if (referenzData.bUseExpressionValues) {
    StorageSelectionManager storageSelectionManager=referenzData.dataDomain.getStorageSelectionManager();
    Set<Integer> storageIDs=storageSelectionManager.getElements(SelectionType.SELECTION);
    if (storageIDs != null && storageIDs.size() > 0) {
      float expressionValue=0;
      for (      Integer storageID : storageIDs) {
        expressionValue+=referenzData.dataDomain.getSet().get(storageID).getFloat(EDataRepresentation.NORMALIZED,data.getLeafID());
      }
      expressionValue/=storageIDs.size();
      return referenzData.colorMapper.getColor(expressionValue);
    }
  }
  return referenzData.colorMapper.getColor(data.getAverageExpressionValue() / referenzData.colorReferenzSpace);
}

Fixed version (ground truth):
/** 
 * Returns different color depending how <code>setColorData</code> is used.
 */
@Override public float[] getColorAttribute(){
  if (referenzData.bUseExpressionValues && data.getLeafID() >= 0) {
    StorageSelectionManager storageSelectionManager=referenzData.dataDomain.getStorageSelectionManager();
    Set<Integer> storageIDs=storageSelectionManager.getElements(SelectionType.SELECTION);
    if (storageIDs != null && storageIDs.size() > 0) {
      float expressionValue=0;
      for (      Integer storageID : storageIDs) {
        expressionValue+=referenzData.dataDomain.getSet().get(storageID).getFloat(EDataRepresentation.NORMALIZED,data.getLeafID());
      }
      expressionValue/=storageIDs.size();
      return referenzData.colorMapper.getColor(expressionValue);
    }
  }
  return referenzData.colorMapper.getColor(data.getAverageExpressionValue() / referenzData.colorReferenzSpace);
}
Program: 58105
Project: 58105
Buggy source:
void initAnimation(GLHierarchicalTreeMap parentView,GLTreeMap beginMainView,GLTreeMap endMainView,Vector<GLTreeMap> beginThumbnails,Vector<GLTreeMap> endThumbnails,int direction){
  this.beginMainView=beginMainView;
  this.endMainView=endMainView;
  this.beginThumbnails=beginThumbnails;
  this.endThumbnails=endThumbnails;
  this.direcetion=direction;
  this.parentView=parentView;
  startTime=Calendar.getInstance().getTimeInMillis();
  parentView.thumbnailTreemapViews=beginThumbnails;
  calcData();
  System.out.println("String_Node_Str" + direction);
}

Fixed version (ground truth):
void initAnimation(GLHierarchicalTreeMap parentView,GLTreeMap beginMainView,GLTreeMap endMainView,Vector<GLTreeMap> beginThumbnails,Vector<GLTreeMap> endThumbnails,int direction){
  this.beginMainView=beginMainView;
  this.endMainView=endMainView;
  this.beginThumbnails=beginThumbnails;
  this.endThumbnails=endThumbnails;
  this.direcetion=direction;
  this.parentView=parentView;
  startTime=Calendar.getInstance().getTimeInMillis();
  parentView.thumbnailTreemapViews=beginThumbnails;
  calcData();
  zoomStage=0;
}
Program: 58106
Project: 58106
Buggy source:
void display(GL gl){
  float x, y, width, height;
  long time=Calendar.getInstance().getTimeInMillis();
  float progress=((float)(time - startTime)) / animationTime;
  if (progress >= 1) {
    endAnimation();
    return;
  }
  x=(endX - beginX) * progress + beginX;
  y=(endY - beginY) * progress + beginY;
  width=(endWidth - beginWidth) * progress + beginWidth;
  height=(endHeight - beginHeight) * progress + beginHeight;
  parentView.displayThumbnailTreemaps(gl);
  if (direcetion == ZOOM_IN_ANIMATION) {
    parentView.displayMainTreeMap(gl,true);
  }
  beginMainView.getViewFrustum().setTop(parentView.getViewFrustum().getHeight() * (y + height));
  beginMainView.getViewFrustum().setBottom(parentView.getViewFrustum().getHeight() * y);
  beginMainView.getViewFrustum().setLeft(parentView.getViewFrustum().getWidth() * x);
  beginMainView.getViewFrustum().setRight(parentView.getViewFrustum().getWidth() * (x + width));
  beginMainView.setDisplayListDirty();
  beginMainView.display(gl);
  System.out.println(progress + "String_Node_Str" + x+ "String_Node_Str"+ y+ "String_Node_Str"+ width+ "String_Node_Str"+ height+ "String_Node_Str"+ beginMainView.getViewFrustum());
}

Fixed version (ground truth):
void display(GL gl){
  float x, y, width, height;
  long time=Calendar.getInstance().getTimeInMillis();
  float progress=Math.min(((float)(time - startTime)) / animationTime,1);
  x=(endX - beginX) * progress + beginX;
  y=(endY - beginY) * progress + beginY;
  width=(endWidth - beginWidth) * progress + beginWidth;
  height=(endHeight - beginHeight) * progress + beginHeight;
  parentView.displayThumbnailTreemaps(gl);
  beginMainView.getViewFrustum().setTop(parentView.getViewFrustum().getHeight() * (y + height));
  beginMainView.getViewFrustum().setBottom(parentView.getViewFrustum().getHeight() * y);
  beginMainView.getViewFrustum().setLeft(parentView.getViewFrustum().getWidth() * x);
  beginMainView.getViewFrustum().setRight(parentView.getViewFrustum().getWidth() * (x + width));
  beginMainView.setDisplayListDirty();
  beginMainView.display(gl);
  if (direcetion == ZOOM_IN_ANIMATION && progress >= 1 && zoomStage == 0) {
    zoomStage=1;
    parentView.thumbnailTreemapViews=endThumbnails;
    for (    GLTreeMap view : endThumbnails)     view.setDisplayListDirty();
    calcSecondZoomStage();
    progress=0;
    startTime=Calendar.getInstance().getTimeInMillis();
  }
  if (progress >= 1) {
    endAnimation();
    return;
  }
}
Program: 58107
Project: 58107
Buggy source:
private void setMainTreeMapView(GLTreeMap treemap){
  mainTreeMapView=treemap;
}

Fixed version (ground truth):
private void setMainTreeMapView(GLTreeMap treemap){
  mainTreeMapView=treemap;
  mainTreeMapView.setInteractive(true);
}
Program: 58108
Project: 58108
Buggy source:
@Override public String getShortInfo(){
  return "String_Node_Str" + dataDomain.getSet().getContentData(contentVAType).getContentTree().getNumberOfNodes() + "String_Node_Str";
}

Fixed version (ground truth):
@Override public String getShortInfo(){
  return "String_Node_Str" + dataDomain.getSet().getBaseStorageVA().size() + "String_Node_Str";
}
Program: 58109
Project: 58109
Buggy source:
public void zoomIn(){
  Set<Integer> elements=mainTreeMapView.getSelectionManager().getElements(SelectionType.SELECTION);
  if (elements.size() == 1) {
    ClusterNode dataRoot=dataDomain.getSet().getContentData(contentVAType).getContentTree().getNodeByNumber(elements.iterator().next());
    mainTreeMapView.setRemotePickingManager(null,0);
    mainTreeMapView.clearAllSelections();
    mainTreeMapView.getSelectionManager().addToType(SelectionType.SELECTION,dataRoot.getID());
    mainTreeMapView.setDrawLabel(false);
    Vector<GLTreeMap> beginThumbnails=(Vector<GLTreeMap>)thumbnailTreemapViews.clone();
    thumbnailTreemapViews.add(mainTreeMapView);
    GLTreeMap beginMainView=mainTreeMapView;
    setMainTreeMapView(createEmbeddedTreeMap());
    mainTreeMapView.setDrawLabel(true);
    mainTreeMapView.setRootClusterID(dataRoot.getID());
    mainTreeMapView.setZoomActive(true);
    mainTreeMapView.initData();
    animationControle.initAnimation(this,beginMainView,mainTreeMapView,beginThumbnails,thumbnailTreemapViews,AnimationControle.ZOOM_IN_ANIMATION);
    animationControle.setActive(true);
    setDisplayListDirty();
  }
}

Fixed version (ground truth):
public void zoomIn(){
  Set<Integer> elements=mainTreeMapView.getSelectionManager().getElements(SelectionType.SELECTION);
  if (elements.size() == 1) {
    ClusterNode dataRoot=dataDomain.getSet().getContentData(contentVAType).getContentTree().getNodeByNumber(elements.iterator().next());
    mainTreeMapView.setRemotePickingManager(null,0);
    mainTreeMapView.clearAllSelections();
    mainTreeMapView.getSelectionManager().addToType(SelectionType.SELECTION,dataRoot.getID());
    mainTreeMapView.setDrawLabel(false);
    @SuppressWarnings("String_Node_Str") Vector<GLTreeMap> beginThumbnails=(Vector<GLTreeMap>)thumbnailTreemapViews.clone();
    mainTreeMapView.setInteractive(false);
    thumbnailTreemapViews.add(mainTreeMapView);
    GLTreeMap beginMainView=mainTreeMapView;
    setMainTreeMapView(createEmbeddedTreeMap());
    mainTreeMapView.setDrawLabel(true);
    mainTreeMapView.setRootClusterID(dataRoot.getID());
    mainTreeMapView.setZoomActive(true);
    mainTreeMapView.initData();
    animationControle.initAnimation(this,beginMainView,mainTreeMapView,beginThumbnails,thumbnailTreemapViews,AnimationControle.ZOOM_IN_ANIMATION);
    animationControle.setActive(true);
    setDisplayListDirty();
  }
}
Program: 58110
Project: 58110
Buggy source:
@Override public String getDetailedInfo(){
  return "String_Node_Str" + dataDomain.getSet().getContentData(contentVAType).getContentTree().getNumberOfNodes() + "String_Node_Str"+ thumbnailTreemapViews.size()+ "String_Node_Str";
}

Fixed version (ground truth):
@Override public String getDetailedInfo(){
  return getShortInfo();
}
Program: 58111
Project: 58111
Buggy source:
@Override public void doCommand(){
  GLCapabilities glCapabilities=new GLCapabilities(GLProfile.getDefault());
  glCapabilities.setStencilBits(1);
  createdObject=new GLCaleydoCanvas(glCapabilities);
  ViewManager viewManager=generalManager.getViewGLCanvasManager();
  viewManager.registerGLCanvas(createdObject);
  if (externalID != -1) {
    generalManager.getIDManager().mapInternalToExternalID(createdObject.getID(),externalID);
  }
  createdObject.setNavigationModes(bEnablePan,bEnableRotate,bEnableZoom);
}

Fixed version (ground truth):
@Override public void doCommand(){
  GLCapabilities glCapabilities=new GLCapabilities(GLProfile.get(GLProfile.GL2));
  glCapabilities.setStencilBits(1);
  createdObject=new GLCaleydoCanvas(glCapabilities);
  ViewManager viewManager=generalManager.getViewGLCanvasManager();
  viewManager.registerGLCanvas(createdObject);
  if (externalID != -1) {
    generalManager.getIDManager().mapInternalToExternalID(createdObject.getID(),externalID);
  }
  createdObject.setNavigationModes(bEnablePan,bEnableRotate,bEnableZoom);
}
Program: 58113
Project: 58113
Buggy source:
public void init(){
  fpsAnimator=new FPSAnimator(60);
  displayLoopExecution=DisplayLoopExecution.get();
  fpsAnimator.add(displayLoopExecution.getDisplayLoopCanvas());
  displayLoopExecution.executeMultiple(connectedElementRepManager);
}

Fixed version (ground truth):
public void init(){
  fpsAnimator=new FPSAnimator(60);
}
Program: 58114
Project: 58114
Buggy source:
/** 
 * Constructor.
 */
protected AGLView(GLCaleydoCanvas glCanvas,final ViewFrustum viewFrustum,final boolean bRegisterToParentCanvasNow){
  super(GeneralManager.get().getIDManager().createID(EManagedObjectType.GL_VIEW));
  GeneralManager.get().getViewGLCanvasManager().registerGLView(this);
  parentGLCanvas=glCanvas;
  textRenderer=new CaleydoTextRenderer(new Font("String_Node_Str",Font.PLAIN,24),true,true);
  if (bRegisterToParentCanvasNow && parentGLCanvas != null) {
    glMouseListener=parentGLCanvas.getGLMouseListener();
  }
  this.viewFrustum=viewFrustum;
  viewCamera=new ViewCameraBase(iUniqueID);
  pickingManager=generalManager.getViewGLCanvasManager().getPickingManager();
  idMappingManager=generalManager.getIDMappingManager();
  textureManager=new TextureManager();
  contextMenu=ContextMenu.get();
  queue=new LinkedBlockingQueue<Pair<AEventListener<? extends IListenerOwner>,AEvent>>();
  bShowMagnifyingGlass=false;
}

Fixed version (ground truth):
/** 
 * Constructor.
 */
protected AGLView(GLCaleydoCanvas glCanvas,final ViewFrustum viewFrustum,final boolean bRegisterToParentCanvasNow){
  super(GeneralManager.get().getIDManager().createID(EManagedObjectType.GL_VIEW));
  GeneralManager.get().getViewGLCanvasManager().registerGLView(this);
  parentGLCanvas=glCanvas;
  if (bRegisterToParentCanvasNow && parentGLCanvas != null) {
    glMouseListener=parentGLCanvas.getGLMouseListener();
  }
  this.viewFrustum=viewFrustum;
  viewCamera=new ViewCameraBase(iUniqueID);
  pickingManager=generalManager.getViewGLCanvasManager().getPickingManager();
  idMappingManager=generalManager.getIDMappingManager();
  textureManager=new TextureManager();
  contextMenu=ContextMenu.get();
  queue=new LinkedBlockingQueue<Pair<AEventListener<? extends IListenerOwner>,AEvent>>();
  bShowMagnifyingGlass=false;
}
Program: 58115
Project: 58115
Buggy source:
void display(GL gl){
  float x, y, width, height;
  long time=Calendar.getInstance().getTimeInMillis();
  float progress=Math.min(((float)(time - startTime)) / animationTime,1);
  x=(endX - beginX) * progress + beginX;
  y=(endY - beginY) * progress + beginY;
  width=(endWidth - beginWidth) * progress + beginWidth;
  height=(endHeight - beginHeight) * progress + beginHeight;
  parentView.displayThumbnailTreemaps(gl);
  beginMainView.getViewFrustum().setTop(parentView.getViewFrustum().getHeight() * (y + height));
  beginMainView.getViewFrustum().setBottom(parentView.getViewFrustum().getHeight() * y);
  beginMainView.getViewFrustum().setLeft(parentView.getViewFrustum().getWidth() * x);
  beginMainView.getViewFrustum().setRight(parentView.getViewFrustum().getWidth() * (x + width));
  beginMainView.setDisplayListDirty();
  beginMainView.display(gl);
  if (direcetion == ZOOM_IN_ANIMATION && progress >= 1 && zoomStage == 0) {
    zoomStage=1;
    parentView.thumbnailTreemapViews=endThumbnails;
    for (    GLTreeMap view : endThumbnails)     view.setDisplayListDirty();
    calcSecondZoomStage();
    progress=0;
    startTime=Calendar.getInstance().getTimeInMillis();
  }
  if (progress >= 1) {
    endAnimation();
    return;
  }
}

Fixed version (ground truth):
void display(GL gl){
  float x, y, width, height;
  long time=Calendar.getInstance().getTimeInMillis();
  float progress=Math.min(((float)(time - startTime)) / animationTime,1);
  x=(endX - beginX) * progress + beginX;
  y=(endY - beginY) * progress + beginY;
  width=(endWidth - beginWidth) * progress + beginWidth;
  height=(endHeight - beginHeight) * progress + beginHeight;
  parentView.displayThumbnailTreemaps(gl);
  if (direcetion == ZOOM_IN_ANIMATION && zoomStage == 1) {
    endMainView.getViewFrustum().setTop(parentView.getViewFrustum().getHeight() * (y + height));
    endMainView.getViewFrustum().setBottom(parentView.getViewFrustum().getHeight() * y);
    endMainView.getViewFrustum().setLeft(parentView.getViewFrustum().getWidth() * x);
    endMainView.getViewFrustum().setRight(parentView.getViewFrustum().getWidth() * (x + width));
    endMainView.setDisplayListDirty();
    endMainView.display(gl);
  }
 else {
    beginMainView.getViewFrustum().setTop(parentView.getViewFrustum().getHeight() * (y + height));
    beginMainView.getViewFrustum().setBottom(parentView.getViewFrustum().getHeight() * y);
    beginMainView.getViewFrustum().setLeft(parentView.getViewFrustum().getWidth() * x);
    beginMainView.getViewFrustum().setRight(parentView.getViewFrustum().getWidth() * (x + width));
    beginMainView.setDisplayListDirty();
    beginMainView.display(gl);
  }
  if (direcetion == ZOOM_IN_ANIMATION && progress >= 1 && zoomStage == 0) {
    zoomStage=1;
    parentView.thumbnailTreemapViews=endThumbnails;
    for (    GLTreeMap view : endThumbnails)     view.setDisplayListDirty();
    calcSecondZoomStage();
    progress=0;
    startTime=Calendar.getInstance().getTimeInMillis();
  }
  if (progress >= 1) {
    endAnimation();
    return;
  }
}
Program: 58116
Project: 58116
Buggy source:
private void zoomOut(int index){
  if (thumbnailTreemapViews.size() > 0) {
    GLTreeMap beginMainView=mainTreeMapView;
    setMainTreeMapView(thumbnailTreemapViews.get(index));
    for (int i=thumbnailTreemapViews.size() - 1; i > index; i--) {
      thumbnailTreemapViews.get(i).unregisterEventListeners();
      thumbnailTreemapViews.remove(i);
    }
    Vector<GLTreeMap> beginThumbnails=(Vector<GLTreeMap>)thumbnailTreemapViews.clone();
    thumbnailTreemapViews.remove(index);
    mainTreeMapView.setDrawLabel(true);
    mainTreeMapView.setRemotePickingManager(pickingManager,getID());
    animationControle.initAnimation(this,beginMainView,mainTreeMapView,beginThumbnails,thumbnailTreemapViews,AnimationControle.ZOOM_OUT_ANIMATION);
    animationControle.setActive(true);
    setDisplayListDirty();
  }
}

Fixed version (ground truth):
private void zoomOut(int index){
  if (thumbnailTreemapViews.size() > 0) {
    GLTreeMap beginMainView=mainTreeMapView;
    setMainTreeMapView(thumbnailTreemapViews.get(index));
    for (int i=thumbnailTreemapViews.size() - 1; i > index; i--) {
      thumbnailTreemapViews.get(i).unregisterEventListeners();
      thumbnailTreemapViews.remove(i);
    }
    Vector<GLTreeMap> beginThumbnails=(Vector<GLTreeMap>)thumbnailTreemapViews.clone();
    thumbnailTreemapViews.remove(index);
    mainTreeMapView.setDrawLabel(true);
    mainTreeMapView.setRemotePickingManager(pickingManager,getID());
    animationControle.initAnimation(this,beginMainView,mainTreeMapView,beginThumbnails,thumbnailTreemapViews,AnimationControle.ZOOM_OUT_ANIMATION);
    animationControle.setActive(true);
    setDisplayListDirty();
    System.out.println("String_Node_Str" + thumbnailTreemapViews.size());
  }
}
Program: 58117
Project: 58117
Buggy source:
@Override public void initData(){
  set=dataDomain.getSet();
  super.initData();
  bRenderOnlyContext=(glRemoteRenderingView != null && glRemoteRenderingView.getViewType().equals("String_Node_Str"));
  initLists();
}

Fixed version (ground truth):
@Override public void initData(){
  if (set == null)   set=dataDomain.getSet();
  super.initData();
  bRenderOnlyContext=(glRemoteRenderingView != null && glRemoteRenderingView.getViewType().equals("String_Node_Str"));
  initLists();
}
Program: 58118
Project: 58118
Buggy source:
private GLHeatMap createHeatMap(GL gl,GLMouseListener glMouseListener){
  ViewFrustum viewFrustum=new ViewFrustum(CameraProjectionMode.ORTHOGRAPHIC,0,50,0,50,-20,20);
  GLHeatMap heatMap=new GLHeatMap(parentView.getParentGLCanvas(),viewFrustum);
  heatMap.setRemoteRenderingGLView(parentView);
  heatMap.setDataDomain(dataDomain);
  heatMap.setContentVAType(GLHeatMap.CONTENT_EMBEDDED_VA);
  if (layout instanceof HeatMapLayoutDetailViewRight)   heatMap.setRenderTemplate(new ComparerDetailTemplate(false));
 else   heatMap.setRenderTemplate(new ComparerDetailTemplate(true));
  heatMap.initData();
  heatMap.setDetailLevel(DetailLevel.MEDIUM);
  heatMap.initRemote(gl,glParentView,glMouseListener,infoAreaManager);
  heatMap.setSendClearSelectionsEvent(true);
  heatMap.useFishEye(false);
  return heatMap;
}

Fixed version (ground truth):
private GLHeatMap createHeatMap(GL gl,GLMouseListener glMouseListener){
  ViewFrustum viewFrustum=new ViewFrustum(CameraProjectionMode.ORTHOGRAPHIC,0,50,0,50,-20,20);
  GLHeatMap heatMap=new GLHeatMap(parentView.getParentGLCanvas(),viewFrustum);
  heatMap.setRemoteRenderingGLView(parentView);
  heatMap.setDataDomain(dataDomain);
  heatMap.setContentVAType(GLHeatMap.CONTENT_EMBEDDED_VA);
  if (layout instanceof HeatMapLayoutDetailViewRight)   heatMap.setRenderTemplate(new ComparerDetailTemplate(false));
 else   heatMap.setRenderTemplate(new ComparerDetailTemplate(true));
  heatMap.setSet(set);
  heatMap.initData();
  heatMap.setDetailLevel(DetailLevel.MEDIUM);
  heatMap.initRemote(gl,glParentView,glMouseListener,infoAreaManager);
  heatMap.setSendClearSelectionsEvent(true);
  heatMap.useFishEye(false);
  return heatMap;
}
Program: 58120
Project: 58120
Buggy source:
public void selectGeneSystemWide(IDType contentIDType,int davidID){
  ClearSelectionsEvent clearSelectionsEvent=new ClearSelectionsEvent();
  clearSelectionsEvent.setSender(this);
  eventPublisher.triggerEvent(clearSelectionsEvent);
  SelectionUpdateEvent selectionUpdateEvent=new SelectionUpdateEvent();
  selectionUpdateEvent.setSender(this);
  ISelectionDelta delta=new SelectionDelta(contentIDType);
  Set<Integer> setExpIndex=GeneralManager.get().getIDMappingManager().getIDAsSet(IDType.getIDType("String_Node_Str"),contentIDType,davidID);
  for (  Integer expressionIndex : setExpIndex) {
    delta.addSelection(expressionIndex,SelectionType.SELECTION);
  }
  selectionUpdateEvent.setSelectionDelta((SelectionDelta)delta);
  eventPublisher.triggerEvent(selectionUpdateEvent);
}

Fixed version (ground truth):
public void selectGeneSystemWide(IDType contentIDType,int davidID){
  ClearSelectionsEvent clearSelectionsEvent=new ClearSelectionsEvent();
  clearSelectionsEvent.setSender(this);
  eventPublisher.triggerEvent(clearSelectionsEvent);
  SelectionUpdateEvent selectionUpdateEvent=new SelectionUpdateEvent();
  selectionUpdateEvent.setSender(this);
  ISelectionDelta delta=new SelectionDelta(contentIDType);
  delta.addSelection(davidID,SelectionType.SELECTION);
  selectionUpdateEvent.setSelectionDelta((SelectionDelta)delta);
  eventPublisher.triggerEvent(selectionUpdateEvent);
}
Program: 58121
Project: 58121
Buggy source:
/** 
 * Loads the project from a specified zip-archive.
 * @param fileName name of the file to load the project from
 * @return initialization data for the application from which it can restore itself
 */
public DataInitializationData load(String fileName){
  ZipUtils zipUtils=new ZipUtils();
  zipUtils.unzipToDirectory(fileName,TEMP_PROJECT_DIR_NAME);
  DataInitializationData initData=loadDirectory(TEMP_PROJECT_DIR_NAME);
  return initData;
}

Fixed version (ground truth):
/** 
 * Loads the project from a specified zip-archive.
 * @param fileName name of the file to load the project from
 * @return initialization data for the application from which it can restore itself
 */
public DataInitializationData load(String fileName){
  FileOperations.deleteDirectory(TEMP_PROJECT_DIR_NAME);
  ZipUtils zipUtils=new ZipUtils();
  zipUtils.unzipToDirectory(fileName,TEMP_PROJECT_DIR_NAME);
  DataInitializationData initData=loadDirectory(TEMP_PROJECT_DIR_NAME);
  return initData;
}
Program: 58122
Project: 58122
Buggy source:
/** 
 * Retrieves the singleton reference of this class. If no singleton exists yet, it will be created.
 * @return
 */
public static DisplayLoopExecution get(){
  if (displayLoopExecution == null) {
    displayLoopExecution=new DisplayLoopExecution();
    GLCapabilities glCapabilities=new GLCapabilities();
    glCapabilities.setStencilBits(1);
    displayLoopExecution.displayLoopCanvas=new GLCanvas(new GLCapabilities());
    displayLoopExecution.displayLoopCanvas.addGLEventListener(displayLoopExecution);
    displayLoopExecution.displayLoopShell=new Shell(Display.getDefault(),SWT.EMBEDDED | SWT.NO_TRIM | SWT.ON_TOP);
    Region region=new Region();
    displayLoopExecution.displayLoopShell.setRegion(region);
    Frame frame=SWT_AWT.new_Frame(displayLoopExecution.displayLoopShell);
    frame.add(displayLoopExecution.displayLoopCanvas);
  }
  return displayLoopExecution;
}

Fixed version (ground truth):
/** 
 * Retrieves the singleton reference of this class. If no singleton exists yet, it will be created.
 * @return
 */
public static DisplayLoopExecution get(){
  if (displayLoopExecution == null) {
    displayLoopExecution=new DisplayLoopExecution();
    GLCapabilities glCapabilities=new GLCapabilities();
    glCapabilities.setStencilBits(1);
    displayLoopExecution.displayLoopCanvas=new GLCanvas(new GLCapabilities());
    displayLoopExecution.displayLoopCanvas.addGLEventListener(displayLoopExecution);
    displayLoopExecution.displayLoopShell=new Shell(Display.getDefault(),SWT.EMBEDDED | SWT.NO_TRIM | SWT.ON_TOP);
    displayLoopExecution.displayLoopShell.setSize(1,1);
    displayLoopExecution.displayLoopShell.open();
    Region region=new Region();
    displayLoopExecution.displayLoopShell.setRegion(region);
    Frame frame=SWT_AWT.new_Frame(displayLoopExecution.displayLoopShell);
    frame.add(displayLoopExecution.displayLoopCanvas);
  }
  return displayLoopExecution;
}
Program: 58123
Project: 58123
Buggy source:
@Override public void setContentVA(String vaType,ContentVirtualArray virtualArray){
  ContentData contentData=hashContentData.get(vaType);
  if (contentData == null)   contentData=createContentData(vaType);
 else   contentData.reset();
  contentData.setContentVA(virtualArray);
  if (vaType == CONTENT)   defaultContentData=contentData;
  hashContentData.put(vaType,contentData);
}

Fixed version (ground truth):
@Override public void setContentVA(String vaType,ContentVirtualArray virtualArray){
  ContentData contentData=hashContentData.get(vaType);
  if (contentData == null)   contentData=createContentData(vaType);
 else   contentData.reset();
  contentData.setContentVA(virtualArray);
  hashContentData.put(vaType,contentData);
}
Program: 58124
Project: 58124
Buggy source:
@Override public void widgetSelected(SelectionEvent e){
  applyFilter();
}

Fixed version (ground truth):
@Override public void widgetSelected(SelectionEvent e){
  isDirty=true;
}
Program: 58127
Project: 58127
Buggy source:
/** 
 * Removes a element form a particular selection type and puts it into the normal type. Can not be called on the normal type. Nothing happens if the element is not contained in the type
 * @param selectionType
 * @param elementID
 * @throws IllegalArgumentException if called with the normal type, REMOVE or ADD
 */
public void removeFromType(SelectionType selectionType,int elementID){
  if (selectionType == SelectionType.NORMAL)   throw new IllegalArgumentException("String_Node_Str");
  if (hashSelectionTypes.get(selectionType).containsKey(elementID)) {
    if (!deltaBlackList.containsKey(selectionType))     selectionDelta.removeSelection(elementID,selectionType);
  }
}

Fixed version (ground truth):
/** 
 * Removes a element form a particular selection type and puts it into the normal type. Can not be called on the normal type. Nothing happens if the element is not contained in the type
 * @param selectionType
 * @param elementID
 * @throws IllegalArgumentException if called with the normal type, REMOVE or ADD
 */
public void removeFromType(SelectionType selectionType,int elementID){
  if (selectionType == SelectionType.NORMAL)   throw new IllegalArgumentException("String_Node_Str");
  if (hashSelectionTypes.get(selectionType).containsKey(elementID)) {
    hashSelectionTypes.get(selectionType).remove(elementID);
    if (!deltaBlackList.containsKey(selectionType))     selectionDelta.removeSelection(elementID,selectionType);
  }
}
Program: 58129
Project: 58129
Buggy source:
@Override public void handleSelectionUpdate(ISelectionDelta selectionDelta,boolean scrollToSelection,String info){
  if (selectionDelta.getIDType() == dataDomain.getStorageIDType()) {
    Collection<SelectionDeltaItem> deltaItems=selectionDelta.getAllItems();
    Tree<ClusterNode> experimentTree=set.getStorageData(storageVAType).getStorageTree();
    if (experimentTree != null) {
      selectionManager.clearSelections();
      dragAndDropController.clearDraggables();
      for (      SelectionDeltaItem item : deltaItems) {
        ArrayList<Integer> alNodeIDs=experimentTree.getNodeIDsFromLeafID(item.getPrimaryID());
        for (        Integer nodeID : alNodeIDs) {
          GroupRepresentation groupRep=hashGroups.get(nodeID);
          if (item.getSelectionType() == SelectionType.SELECTION) {
            groupRep.addAsDraggable(dragAndDropController);
          }
          groupRep.setSelectionTypeRec(item.getSelectionType(),selectionManager);
        }
        rootGroup.updateSelections(selectionManager,drawingStrategyManager);
      }
      setDisplayListDirty();
    }
  }
}

Fixed version (ground truth):
@Override public void handleSelectionUpdate(ISelectionDelta selectionDelta,boolean scrollToSelection,String info){
  if (selectionDelta.getIDType() == selectionManager.getIDType() || selectionDelta.getIDType() == dataDomain.getStorageIDType()) {
    Collection<SelectionDeltaItem> deltaItems=selectionDelta.getAllItems();
    Tree<ClusterNode> experimentTree=set.getStorageData(storageVAType).getStorageTree();
    if (experimentTree != null) {
      dragAndDropController.clearDraggables();
      for (      SelectionDeltaItem item : deltaItems) {
        ArrayList<Integer> alNodeIDs=experimentTree.getNodeIDsFromLeafID(item.getPrimaryID());
        for (        Integer nodeID : alNodeIDs) {
          GroupRepresentation groupRep=hashGroups.get(nodeID);
          if (item.isRemove()) {
            groupRep.setSelectionTypeRec(SelectionType.NORMAL,selectionManager);
            selectionManager.remove(nodeID,false);
          }
 else {
            if (item.getSelectionType() == SelectionType.SELECTION) {
              groupRep.addAsDraggable(dragAndDropController);
            }
            groupRep.setSelectionTypeRec(item.getSelectionType(),selectionManager);
          }
        }
        rootGroup.updateSelections(selectionManager,drawingStrategyManager);
      }
      setDisplayListDirty();
    }
  }
}
Program: 58130
Project: 58130
Buggy source:
/** 
 * Triggers events for currently selected elements.
 */
private void triggerSelectionEvents(){
  SelectionDelta clusterIDDelta=selectionManager.getDelta();
  ClusterNodeSelectionEvent event=new ClusterNodeSelectionEvent();
  event.setSender(this);
  event.setSelectionDelta(clusterIDDelta);
  eventPublisher.triggerEvent(event);
}

Fixed version (ground truth):
/** 
 * Triggers events for currently selected elements.
 */
private void triggerSelectionEvents(){
  SelectionDelta clusterIDDelta=selectionManager.getDelta();
  ClusterNodeSelectionEvent event=new ClusterNodeSelectionEvent();
  event.setSender(this);
  event.setSelectionDelta(clusterIDDelta);
  eventPublisher.triggerEvent(event);
  SelectionDelta delta=new SelectionDelta(dataDomain.getStorageIDType());
  for (  SelectionDeltaItem item : clusterIDDelta.getAllItems()) {
    GroupRepresentation groupRep=hashGroups.get(item.getPrimaryID());
    if (groupRep != null && groupRep.isLeaf()) {
      ClusterNode clusterNode=groupRep.getClusterNode();
      if (item.isRemove())       delta.removeSelection(clusterNode.getLeafID(),item.getSelectionType());
 else       delta.addSelection(clusterNode.getLeafID(),item.getSelectionType());
    }
  }
  SelectionUpdateEvent selectionUpdateEvent=new SelectionUpdateEvent();
  selectionUpdateEvent.setSender(this);
  selectionUpdateEvent.setDataDomainType(dataDomain.getDataDomainType());
  selectionUpdateEvent.setSelectionDelta(delta);
  eventPublisher.triggerEvent(selectionUpdateEvent);
}
Program: 58131
Project: 58131
Buggy source:
@Override public void setSelectionTypeRec(SelectionType selectionType,SelectionManager selectionManager){
  selectionManager.addToType(selectionType,getID());
  clusterNode.setSelectionType(selectionType);
  for (  ICompositeGraphic child : alChildren) {
    child.setSelectionTypeRec(selectionType,selectionManager);
  }
}

Fixed version (ground truth):
@Override public void setSelectionTypeRec(SelectionType selectionType,SelectionManager selectionManager){
  if (selectionType != SelectionType.NORMAL)   selectionManager.addToType(selectionType,getID());
  clusterNode.setSelectionType(selectionType);
  for (  ICompositeGraphic child : alChildren) {
    child.setSelectionTypeRec(selectionType,selectionManager);
  }
}
Program: 58133
Project: 58133
Buggy source:
/** 
 * A dataDomain may contribute to the context menu. This function returns the contentItemContainer of the context menue if one was specified. This should be overridden by subclasses if needed.
 * @return a context menu item container related to content items
 */
public AItemContainer getContentItemContainer(IDType idType,int id){
  return null;
}

Fixed version (ground truth):
/** 
 * A dataDomain may contribute to the context menu. This function returns the contentItemContainer of the context menu if one was specified. This should be overridden by subclasses if needed.
 * @return a context menu item container related to content items
 */
public AItemContainer getContentItemContainer(IDType idType,int id){
  return null;
}
Program: 58134
Project: 58134
Buggy source:
@Override public void unregisterEventListeners(){
  if (selectionUpdateListener != null) {
    eventPublisher.removeListener(selectionUpdateListener);
    selectionUpdateListener=null;
  }
  if (selectionCommandListener != null) {
    eventPublisher.removeListener(selectionCommandListener);
    selectionCommandListener=null;
  }
  if (startClusteringListener != null) {
    eventPublisher.removeListener(startClusteringListener);
    startClusteringListener=null;
  }
  if (replaceContentVirtualArrayInUseCaseListener != null) {
    eventPublisher.removeListener(replaceContentVirtualArrayInUseCaseListener);
    replaceContentVirtualArrayInUseCaseListener=null;
  }
  if (replaceStorageVirtualArrayInUseCaseListener != null) {
    eventPublisher.removeListener(replaceStorageVirtualArrayInUseCaseListener);
    replaceStorageVirtualArrayInUseCaseListener=null;
  }
  if (virtualArrayUpdateListener != null) {
    eventPublisher.removeListener(virtualArrayUpdateListener);
    virtualArrayUpdateListener=null;
  }
}

Fixed version (ground truth):
@Override public void unregisterEventListeners(){
  if (selectionUpdateListener != null) {
    eventPublisher.removeListener(selectionUpdateListener);
    selectionUpdateListener=null;
  }
  if (selectionCommandListener != null) {
    eventPublisher.removeListener(selectionCommandListener);
    selectionCommandListener=null;
  }
  if (startClusteringListener != null) {
    eventPublisher.removeListener(startClusteringListener);
    startClusteringListener=null;
  }
  if (replaceContentVirtualArrayInUseCaseListener != null) {
    eventPublisher.removeListener(replaceContentVirtualArrayInUseCaseListener);
    replaceContentVirtualArrayInUseCaseListener=null;
  }
  if (replaceStorageVirtualArrayInUseCaseListener != null) {
    eventPublisher.removeListener(replaceStorageVirtualArrayInUseCaseListener);
    replaceStorageVirtualArrayInUseCaseListener=null;
  }
  if (contentVAUpdateListener != null) {
    eventPublisher.removeListener(contentVAUpdateListener);
    contentVAUpdateListener=null;
  }
  if (storageVAUpdateListener != null) {
    eventPublisher.removeListener(storageVAUpdateListener);
    storageVAUpdateListener=null;
  }
}
Program: 58135
Project: 58135
Buggy source:
@Override public void handleVAUpdate(StorageVADelta delta,String info){
  super.handleVAUpdate(delta,info);
  bRedrawTextures=true;
}

Fixed version (ground truth):
@Override public void handleVAUpdate(ContentVADelta delta,String info){
  super.handleVAUpdate(delta,info);
  bRedrawTextures=true;
  hasDataWindowChanged=true;
  iPickedSampleLevel1=0;
  setDisplayListDirty();
  initData();
}
Program: 58137
Project: 58137
Buggy source:
/** 
 * TODO: revise this, not very performance friendly, especially the clearing of the DESELECTED
 */
private void handleUnselection(){
  if (!hasFilterChanged)   return;
  handleGateUnselection();
  handleNANUnselection();
  if (set.isSetHomogeneous())   handleMasterGateUnselection();
  contentSelectionManager.clearSelection(SelectionType.DESELECTED);
  for (  ArrayList<Integer> alCurrent : hashIsGateBlocking.values()) {
    contentSelectionManager.addToType(SelectionType.DESELECTED,alCurrent);
  }
  for (  ArrayList<Integer> alCurrent : alIsAngleBlocking) {
    contentSelectionManager.addToType(SelectionType.DESELECTED,alCurrent);
  }
  for (  ArrayList<Integer> alCurrent : hashIsNANBlocking.values()) {
    contentSelectionManager.addToType(SelectionType.DESELECTED,alCurrent);
  }
  if (bIsDraggingActive || bIsAngularBrushingActive) {
  }
}

Fixed version (ground truth):
/** 
 * TODO: revise this, not very performance friendly, especially the clearing of the DESELECTED
 */
private void handleUnselection(){
  if (!hasFilterChanged)   return;
  hasFilterChanged=false;
  handleGateUnselection();
  handleNANUnselection();
  if (set.isSetHomogeneous())   handleMasterGateUnselection();
  contentSelectionManager.clearSelection(SelectionType.DESELECTED);
  for (  ArrayList<Integer> alCurrent : hashIsGateBlocking.values()) {
    contentSelectionManager.addToType(SelectionType.DESELECTED,alCurrent);
  }
  for (  ArrayList<Integer> alCurrent : alIsAngleBlocking) {
    contentSelectionManager.addToType(SelectionType.DESELECTED,alCurrent);
  }
  for (  ArrayList<Integer> alCurrent : hashIsNANBlocking.values()) {
    contentSelectionManager.addToType(SelectionType.DESELECTED,alCurrent);
  }
  if (bIsDraggingActive || bIsAngularBrushingActive) {
    triggerSelectionUpdate();
  }
  System.out.println("String_Node_Str");
}