nus-yam/ex-repair huggingface dataset:
Program: 57302
Project: 57302
Buggy source:
@Override public void registerPickingListeners(){
  for (  Integer nodeId : nodeIds) {
    showButtonPickingListener=new ATimedMouseOutPickingListener(){
      @Override protected void timedMouseOut(      Pick pick){
        showRemoveButton=false;
        pathwayPathRenderer.setDisplayListDirty();
      }
      @Override public void mouseOver(      Pick pick){
        if (pathwayPathRenderer.isFirstNode((ALinearizableNode)node) || pathwayPathRenderer.isLastNode((ALinearizableNode)node)) {
          super.mouseOver(pick);
          showRemoveButton=true;
          pathwayPathRenderer.setDisplayListDirty();
        }
      }
    }
;
    view.addIDPickingListener(showButtonPickingListener,EPickingType.LINEARIZABLE_NODE.name(),nodeId);
    view.addIDPickingListener(showButtonPickingListener,EPickingType.REMOVABLE_NODE.name(),nodeId);
    buttonPickingListener=new APickingListener(){
      @Override public void clicked(      Pick pick){
        RemoveEnRouteNodeEvent event=new RemoveEnRouteNodeEvent((ALinearizableNode)node);
        event.setSender(this);
        GeneralManager.get().getEventPublisher().triggerEvent(event);
        pathwayPathRenderer.removeNodeFromPath((ALinearizableNode)node);
      }
    }
;
    view.addIDPickingListener(buttonPickingListener,EPickingType.REMOVE_NODE_BUTTON.name(),nodeId);
  }
}

Fixed version (ground truth):
@Override public void registerPickingListeners(){
  for (  Integer nodeId : nodeIds) {
    showButtonPickingListener=new ATimedMouseOutPickingListener(){
      @Override protected void timedMouseOut(      Pick pick){
        showRemoveButton=false;
        pathwayPathRenderer.setDisplayListDirty();
      }
      @Override public void mouseOver(      Pick pick){
        if (!node.isPickable())         return;
        if (pathwayPathRenderer.isFirstNode((ALinearizableNode)node) || pathwayPathRenderer.isLastNode((ALinearizableNode)node)) {
          super.mouseOver(pick);
          showRemoveButton=true;
          pathwayPathRenderer.setDisplayListDirty();
        }
      }
    }
;
    view.addIDPickingListener(showButtonPickingListener,EPickingType.LINEARIZABLE_NODE.name(),nodeId);
    view.addIDPickingListener(showButtonPickingListener,EPickingType.REMOVABLE_NODE.name(),nodeId);
    buttonPickingListener=new APickingListener(){
      @Override public void clicked(      Pick pick){
        if (!node.isPickable())         return;
        RemoveEnRouteNodeEvent event=new RemoveEnRouteNodeEvent((ALinearizableNode)node);
        event.setSender(this);
        GeneralManager.get().getEventPublisher().triggerEvent(event);
        pathwayPathRenderer.removeNodeFromPath((ALinearizableNode)node);
      }
    }
;
    view.addIDPickingListener(buttonPickingListener,EPickingType.REMOVE_NODE_BUTTON.name(),nodeId);
  }
}
Program: 57303
Project: 57303
Buggy source:
@Override public void mouseOver(Pick pick){
  if (pathwayPathRenderer.isFirstNode((ALinearizableNode)node) || pathwayPathRenderer.isLastNode((ALinearizableNode)node)) {
    super.mouseOver(pick);
    showRemoveButton=true;
    pathwayPathRenderer.setDisplayListDirty();
  }
}

Fixed version (ground truth):
@Override public void mouseOver(Pick pick){
  if (!node.isPickable())   return;
  if (pathwayPathRenderer.isFirstNode((ALinearizableNode)node) || pathwayPathRenderer.isLastNode((ALinearizableNode)node)) {
    super.mouseOver(pick);
    showRemoveButton=true;
    pathwayPathRenderer.setDisplayListDirty();
  }
}
Program: 57304
Project: 57304
Buggy source:
@Override public void clicked(Pick pick){
  RemoveEnRouteNodeEvent event=new RemoveEnRouteNodeEvent((ALinearizableNode)node);
  event.setSender(this);
  GeneralManager.get().getEventPublisher().triggerEvent(event);
  pathwayPathRenderer.removeNodeFromPath((ALinearizableNode)node);
}

Fixed version (ground truth):
@Override public void clicked(Pick pick){
  if (!node.isPickable())   return;
  RemoveEnRouteNodeEvent event=new RemoveEnRouteNodeEvent((ALinearizableNode)node);
  event.setSender(this);
  GeneralManager.get().getEventPublisher().triggerEvent(event);
  pathwayPathRenderer.removeNodeFromPath((ALinearizableNode)node);
}
Program: 57305
Project: 57305
Buggy source:
@Override protected void determineBackgroundColor(EventBasedSelectionManager selectionManager){
  List<SelectionType> selectionTypes=selectionManager.getSelectionTypes(node.getPrimaryPathwayVertexRep().getName().hashCode());
  Collections.sort(selectionTypes);
  Collections.reverse(selectionTypes);
  colorCalculator.calculateColors(selectionTypes);
  backgroundColor=colorCalculator.getPrimaryColor().getRGBA();
}

Fixed version (ground truth):
@Override protected void determineBackgroundColor(EventBasedSelectionManager selectionManager){
  List<SelectionType> selectionTypes=selectionManager.getSelectionTypes(node.getPrimaryPathwayVertexRep().getName().hashCode());
  Collections.sort(selectionTypes);
  Collections.reverse(selectionTypes);
  colorCalculator.calculateColors(selectionTypes);
  backgroundColor=colorCalculator.getPrimaryColor().getRGB();
}
Program: 57306
Project: 57306
Buggy source:
protected void renderCircle(GL2 gl,GLU glu,Vec3f position,float radius){
  gl.glPushName(pickingManager.getPickingID(view.getID(),EPickingType.LINEARIZABLE_NODE.name(),node.hashCode()));
  gl.glPushMatrix();
  gl.glTranslatef(position.x(),position.y(),position.z());
  gl.glColor4fv(backgroundColor,0);
  GLPrimitives.renderCircle(glu,radius / 2.0f,16);
  gl.glColor4f(0,0,0,1);
  GLPrimitives.renderCircleBorder(gl,glu,radius / 2.0f,16,0.1f);
  gl.glPopMatrix();
  gl.glPopName();
}

Fixed version (ground truth):
protected void renderCircle(GL2 gl,GLU glu,Vec3f position,float radius){
  gl.glPushName(pickingManager.getPickingID(view.getID(),EPickingType.LINEARIZABLE_NODE.name(),node.hashCode()));
  gl.glPushMatrix();
  gl.glTranslatef(position.x(),position.y(),position.z());
  gl.glColor4f(backgroundColor[0],backgroundColor[1],backgroundColor[2],pathwayPathRenderer.getNodeAlpha());
  gl.glColor4fv(backgroundColor,0);
  GLPrimitives.renderCircle(glu,radius / 2.0f,16);
  gl.glColor4f(0,0,0,1);
  GLPrimitives.renderCircleBorder(gl,glu,radius / 2.0f,16,0.1f);
  gl.glPopMatrix();
  gl.glPopName();
}
Program: 57307
Project: 57307
Buggy source:
@Override protected void init(){
  pickingListener=new APickingListener(){
    @Override public void clicked(    Pick pick){
      ALinearizableNode branchNode=node;
      while (branchNode.getParentNode() != null) {
        branchNode=branchNode.getParentNode();
      }
      pathwayPathRenderer.selectBranch(branchNode);
    }
  }
;
  view.addIDPickingListener(pickingListener,EPickingType.LINEARIZABLE_NODE.name(),node.hashCode());
}

Fixed version (ground truth):
@Override protected void init(){
  pickingListener=new APickingListener(){
    @Override public void clicked(    Pick pick){
      if (!node.isPickable())       return;
      ALinearizableNode branchNode=node;
      while (branchNode.getParentNode() != null) {
        branchNode=branchNode.getParentNode();
      }
      pathwayPathRenderer.selectBranch(branchNode);
    }
  }
;
  view.addIDPickingListener(pickingListener,EPickingType.LINEARIZABLE_NODE.name(),node.hashCode());
}
Program: 57308
Project: 57308
Buggy source:
@Override public void clicked(Pick pick){
  ALinearizableNode branchNode=node;
  while (branchNode.getParentNode() != null) {
    branchNode=branchNode.getParentNode();
  }
  pathwayPathRenderer.selectBranch(branchNode);
}

Fixed version (ground truth):
@Override public void clicked(Pick pick){
  if (!node.isPickable())   return;
  ALinearizableNode branchNode=node;
  while (branchNode.getParentNode() != null) {
    branchNode=branchNode.getParentNode();
  }
  pathwayPathRenderer.selectBranch(branchNode);
}
Program: 57310
Project: 57310
Buggy source:
@Override public void mouseOut(Pick pick){
  EventBasedSelectionManager selectionManager=pathwayPathRenderer.getMetaboliteSelectionManager();
  selectionManager.removeFromType(SelectionType.MOUSE_OVER,node.getPrimaryPathwayVertexRep().getName().hashCode());
  selectionManager.triggerSelectionUpdateEvent();
  node.setSelectionType(SelectionType.NORMAL);
  pathwayPathRenderer.setDisplayListDirty();
}

Fixed version (ground truth):
@Override public void mouseOut(Pick pick){
  if (!node.isPickable())   return;
  EventBasedSelectionManager selectionManager=pathwayPathRenderer.getMetaboliteSelectionManager();
  selectionManager.removeFromType(SelectionType.MOUSE_OVER,node.getPrimaryPathwayVertexRep().getName().hashCode());
  selectionManager.triggerSelectionUpdateEvent();
  node.setSelectionType(SelectionType.NORMAL);
  pathwayPathRenderer.setDisplayListDirty();
}
Program: 57311
Project: 57311
Buggy source:
@Override public void mouseOver(Pick pick){
  EventBasedSelectionManager selectionManager=pathwayPathRenderer.getMetaboliteSelectionManager();
  EventBasedSelectionManager geneSelectionManager=pathwayPathRenderer.getGeneSelectionManager();
  geneSelectionManager.clearSelection(SelectionType.MOUSE_OVER);
  selectionManager.clearSelection(SelectionType.MOUSE_OVER);
  selectionManager.addToType(SelectionType.MOUSE_OVER,node.getPrimaryPathwayVertexRep().getName().hashCode());
  selectionManager.triggerSelectionUpdateEvent();
  node.setSelectionType(SelectionType.MOUSE_OVER);
  pathwayPathRenderer.setDisplayListDirty();
}

Fixed version (ground truth):
@Override public void mouseOver(Pick pick){
  if (!node.isPickable())   return;
  EventBasedSelectionManager selectionManager=pathwayPathRenderer.getMetaboliteSelectionManager();
  EventBasedSelectionManager geneSelectionManager=pathwayPathRenderer.getGeneSelectionManager();
  geneSelectionManager.clearSelection(SelectionType.MOUSE_OVER);
  selectionManager.clearSelection(SelectionType.MOUSE_OVER);
  selectionManager.addToType(SelectionType.MOUSE_OVER,node.getPrimaryPathwayVertexRep().getName().hashCode());
  selectionManager.triggerSelectionUpdateEvent();
  node.setSelectionType(SelectionType.MOUSE_OVER);
  pathwayPathRenderer.setDisplayListDirty();
}
Program: 57312
Project: 57312
Buggy source:
@Override public void clicked(Pick pick){
  EventBasedSelectionManager selectionManager=pathwayPathRenderer.getMetaboliteSelectionManager();
  EventBasedSelectionManager geneSelectionManager=pathwayPathRenderer.getGeneSelectionManager();
  geneSelectionManager.clearSelection(SelectionType.SELECTION);
  selectionManager.clearSelection(SelectionType.SELECTION);
  selectionManager.addToType(SelectionType.SELECTION,node.getPrimaryPathwayVertexRep().getName().hashCode());
  selectionManager.triggerSelectionUpdateEvent();
  node.setSelectionType(SelectionType.SELECTION);
  pathwayPathRenderer.setDisplayListDirty();
}

Fixed version (ground truth):
@Override public void clicked(Pick pick){
  if (!node.isPickable())   return;
  EventBasedSelectionManager selectionManager=pathwayPathRenderer.getMetaboliteSelectionManager();
  EventBasedSelectionManager geneSelectionManager=pathwayPathRenderer.getGeneSelectionManager();
  geneSelectionManager.clearSelection(SelectionType.SELECTION);
  selectionManager.clearSelection(SelectionType.SELECTION);
  selectionManager.addToType(SelectionType.SELECTION,node.getPrimaryPathwayVertexRep().getName().hashCode());
  selectionManager.triggerSelectionUpdateEvent();
  node.setSelectionType(SelectionType.SELECTION);
  pathwayPathRenderer.setDisplayListDirty();
}
Program: 57314
Project: 57314
Buggy source:
@Override public void mouseOut(Pick pick){
  EventBasedSelectionManager selectionManager=pathwayPathRenderer.getMetaboliteSelectionManager();
  selectionManager.removeFromType(SelectionType.MOUSE_OVER,node.getPrimaryPathwayVertexRep().getName().hashCode());
  selectionManager.triggerSelectionUpdateEvent();
  node.setSelectionType(SelectionType.NORMAL);
  pathwayPathRenderer.setDisplayListDirty();
}

Fixed version (ground truth):
@Override public void mouseOut(Pick pick){
  if (!node.isPickable())   return;
  EventBasedSelectionManager selectionManager=pathwayPathRenderer.getMetaboliteSelectionManager();
  selectionManager.removeFromType(SelectionType.MOUSE_OVER,node.getPrimaryPathwayVertexRep().getName().hashCode());
  selectionManager.triggerSelectionUpdateEvent();
  node.setSelectionType(SelectionType.NORMAL);
  pathwayPathRenderer.setDisplayListDirty();
}
Program: 57315
Project: 57315
Buggy source:
@Override public void mouseOver(Pick pick){
  EventBasedSelectionManager selectionManager=pathwayPathRenderer.getMetaboliteSelectionManager();
  selectionManager.clearSelection(SelectionType.MOUSE_OVER);
  selectionManager.addToType(SelectionType.MOUSE_OVER,node.getPrimaryPathwayVertexRep().getName().hashCode());
  selectionManager.triggerSelectionUpdateEvent();
  node.setSelectionType(SelectionType.MOUSE_OVER);
  pathwayPathRenderer.setDisplayListDirty();
}

Fixed version (ground truth):
@Override public void mouseOver(Pick pick){
  if (!node.isPickable())   return;
  EventBasedSelectionManager selectionManager=pathwayPathRenderer.getMetaboliteSelectionManager();
  selectionManager.clearSelection(SelectionType.MOUSE_OVER);
  selectionManager.addToType(SelectionType.MOUSE_OVER,node.getPrimaryPathwayVertexRep().getName().hashCode());
  selectionManager.triggerSelectionUpdateEvent();
  node.setSelectionType(SelectionType.MOUSE_OVER);
  pathwayPathRenderer.setDisplayListDirty();
}
Program: 57316
Project: 57316
Buggy source:
@Override public void clicked(Pick pick){
  ALinearizableNode branchNode=node;
  while (branchNode.getParentNode() != null) {
    branchNode=branchNode.getParentNode();
  }
  EventBasedSelectionManager selectionManager=pathwayPathRenderer.getMetaboliteSelectionManager();
  EventBasedSelectionManager geneSelectionManager=pathwayPathRenderer.getGeneSelectionManager();
  geneSelectionManager.clearSelection(SelectionType.MOUSE_OVER);
  selectionManager.clearSelection(SelectionType.MOUSE_OVER);
  pathwayPathRenderer.selectBranch(branchNode);
}

Fixed version (ground truth):
@Override public void clicked(Pick pick){
  if (!node.isPickable())   return;
  ALinearizableNode branchNode=node;
  while (branchNode.getParentNode() != null) {
    branchNode=branchNode.getParentNode();
  }
  EventBasedSelectionManager selectionManager=pathwayPathRenderer.getMetaboliteSelectionManager();
  EventBasedSelectionManager geneSelectionManager=pathwayPathRenderer.getGeneSelectionManager();
  geneSelectionManager.clearSelection(SelectionType.MOUSE_OVER);
  selectionManager.clearSelection(SelectionType.MOUSE_OVER);
  pathwayPathRenderer.selectBranch(branchNode);
}
Program: 57318
Project: 57318
Buggy source:
@Override public void mouseOut(Pick pick){
  EventBasedSelectionManager selectionManager=pathwayPathRenderer.getGeneSelectionManager();
  for (  Integer davidId : node.getPrimaryPathwayVertexRep().getDavidIDs()) {
    selectionManager.removeFromType(SelectionType.MOUSE_OVER,davidId);
  }
  selectionManager.triggerSelectionUpdateEvent();
  pathwayPathRenderer.setDisplayListDirty();
}

Fixed version (ground truth):
@Override public void mouseOut(Pick pick){
  if (!node.isPickable())   return;
  EventBasedSelectionManager selectionManager=pathwayPathRenderer.getGeneSelectionManager();
  for (  Integer davidId : node.getPrimaryPathwayVertexRep().getDavidIDs()) {
    selectionManager.removeFromType(SelectionType.MOUSE_OVER,davidId);
  }
  selectionManager.triggerSelectionUpdateEvent();
  pathwayPathRenderer.setDisplayListDirty();
}
Program: 57319
Project: 57319
Buggy source:
@Override public void mouseOver(Pick pick){
  EventBasedSelectionManager selectionManager=pathwayPathRenderer.getGeneSelectionManager();
  EventBasedSelectionManager metaboliteSelectionManager=pathwayPathRenderer.getMetaboliteSelectionManager();
  metaboliteSelectionManager.clearSelection(SelectionType.MOUSE_OVER);
  selectionManager.clearSelection(SelectionType.MOUSE_OVER);
  for (  Integer davidId : node.getPrimaryPathwayVertexRep().getDavidIDs()) {
    selectionManager.addToType(SelectionType.MOUSE_OVER,davidId);
  }
  selectionManager.triggerSelectionUpdateEvent();
  node.setSelectionType(SelectionType.MOUSE_OVER);
  pathwayPathRenderer.setDisplayListDirty();
}

Fixed version (ground truth):
@Override public void mouseOver(Pick pick){
  if (!node.isPickable())   return;
  EventBasedSelectionManager selectionManager=pathwayPathRenderer.getGeneSelectionManager();
  EventBasedSelectionManager metaboliteSelectionManager=pathwayPathRenderer.getMetaboliteSelectionManager();
  metaboliteSelectionManager.clearSelection(SelectionType.MOUSE_OVER);
  selectionManager.clearSelection(SelectionType.MOUSE_OVER);
  for (  Integer davidId : node.getPrimaryPathwayVertexRep().getDavidIDs()) {
    selectionManager.addToType(SelectionType.MOUSE_OVER,davidId);
  }
  selectionManager.triggerSelectionUpdateEvent();
  node.setSelectionType(SelectionType.MOUSE_OVER);
  pathwayPathRenderer.setDisplayListDirty();
}
Program: 57320
Project: 57320
Buggy source:
@Override public void clicked(Pick pick){
  EventBasedSelectionManager selectionManager=pathwayPathRenderer.getGeneSelectionManager();
  EventBasedSelectionManager metaboliteSelectionManager=pathwayPathRenderer.getMetaboliteSelectionManager();
  metaboliteSelectionManager.clearSelection(SelectionType.SELECTION);
  selectionManager.clearSelection(SelectionType.SELECTION);
  for (  Integer davidId : node.getPrimaryPathwayVertexRep().getDavidIDs()) {
    selectionManager.addToType(SelectionType.SELECTION,davidId);
  }
  selectionManager.triggerSelectionUpdateEvent();
  node.setSelectionType(SelectionType.SELECTION);
  pathwayPathRenderer.setDisplayListDirty();
}

Fixed version (ground truth):
@Override public void clicked(Pick pick){
  if (!node.isPickable())   return;
  EventBasedSelectionManager selectionManager=pathwayPathRenderer.getGeneSelectionManager();
  EventBasedSelectionManager metaboliteSelectionManager=pathwayPathRenderer.getMetaboliteSelectionManager();
  metaboliteSelectionManager.clearSelection(SelectionType.SELECTION);
  selectionManager.clearSelection(SelectionType.SELECTION);
  for (  Integer davidId : node.getPrimaryPathwayVertexRep().getDavidIDs()) {
    selectionManager.addToType(SelectionType.SELECTION,davidId);
  }
  selectionManager.triggerSelectionUpdateEvent();
  node.setSelectionType(SelectionType.SELECTION);
  pathwayPathRenderer.setDisplayListDirty();
}
Program: 57322
Project: 57322
Buggy source:
@Override public void mouseOut(Pick pick){
  EventBasedSelectionManager selectionManager=pathwayPathRenderer.getGeneSelectionManager();
  for (  Integer davidId : node.getPrimaryPathwayVertexRep().getDavidIDs()) {
    selectionManager.removeFromType(SelectionType.MOUSE_OVER,davidId);
  }
  selectionManager.triggerSelectionUpdateEvent();
  pathwayPathRenderer.setDisplayListDirty();
}

Fixed version (ground truth):
@Override public void mouseOut(Pick pick){
  if (!node.isPickable())   return;
  EventBasedSelectionManager selectionManager=pathwayPathRenderer.getGeneSelectionManager();
  for (  Integer davidId : node.getPrimaryPathwayVertexRep().getDavidIDs()) {
    selectionManager.removeFromType(SelectionType.MOUSE_OVER,davidId);
  }
  selectionManager.triggerSelectionUpdateEvent();
  pathwayPathRenderer.setDisplayListDirty();
}
Program: 57323
Project: 57323
Buggy source:
@Override public void mouseOver(Pick pick){
  EventBasedSelectionManager selectionManager=pathwayPathRenderer.getGeneSelectionManager();
  EventBasedSelectionManager metaboliteSelectionManager=pathwayPathRenderer.getMetaboliteSelectionManager();
  metaboliteSelectionManager.clearSelection(SelectionType.MOUSE_OVER);
  selectionManager.clearSelection(SelectionType.MOUSE_OVER);
  for (  Integer davidId : node.getPrimaryPathwayVertexRep().getDavidIDs()) {
    selectionManager.addToType(SelectionType.MOUSE_OVER,davidId);
  }
  selectionManager.triggerSelectionUpdateEvent();
  pathwayPathRenderer.setDisplayListDirty();
}

Fixed version (ground truth):
@Override public void mouseOver(Pick pick){
  if (!node.isPickable())   return;
  EventBasedSelectionManager selectionManager=pathwayPathRenderer.getGeneSelectionManager();
  EventBasedSelectionManager metaboliteSelectionManager=pathwayPathRenderer.getMetaboliteSelectionManager();
  metaboliteSelectionManager.clearSelection(SelectionType.MOUSE_OVER);
  selectionManager.clearSelection(SelectionType.MOUSE_OVER);
  for (  Integer davidId : node.getPrimaryPathwayVertexRep().getDavidIDs()) {
    selectionManager.addToType(SelectionType.MOUSE_OVER,davidId);
  }
  selectionManager.triggerSelectionUpdateEvent();
  pathwayPathRenderer.setDisplayListDirty();
}
Program: 57324
Project: 57324
Buggy source:
@Override public void clicked(Pick pick){
  ALinearizableNode branchNode=node;
  while (branchNode.getParentNode() != null) {
    branchNode=branchNode.getParentNode();
  }
  EventBasedSelectionManager selectionManager=pathwayPathRenderer.getGeneSelectionManager();
  for (  Integer davidId : node.getPrimaryPathwayVertexRep().getDavidIDs()) {
    selectionManager.removeFromType(SelectionType.MOUSE_OVER,davidId);
  }
  selectionManager.triggerSelectionUpdateEvent();
  pathwayPathRenderer.selectBranch(branchNode);
}

Fixed version (ground truth):
@Override public void clicked(Pick pick){
  if (!node.isPickable())   return;
  ALinearizableNode branchNode=node;
  while (branchNode.getParentNode() != null) {
    branchNode=branchNode.getParentNode();
  }
  EventBasedSelectionManager selectionManager=pathwayPathRenderer.getGeneSelectionManager();
  for (  Integer davidId : node.getPrimaryPathwayVertexRep().getDavidIDs()) {
    selectionManager.removeFromType(SelectionType.MOUSE_OVER,davidId);
  }
  selectionManager.triggerSelectionUpdateEvent();
  pathwayPathRenderer.selectBranch(branchNode);
}
Program: 57325
Project: 57325
Buggy source:
@Override public void rightClicked(Pick pick){
  if (detailLevel == EDetailLevel.VERY_LOW) {
    return;
  }
  PathwayVertexRep vertexRep=pathwayItemManager.getPathwayVertexRep(pick.getObjectID());
  if (vertexRep.getType() == EPathwayVertexType.map) {
    LoadPathwaysByPathwayItem menuItem=new LoadPathwaysByPathwayItem(PathwayManager.get().getPathwayByTitle(vertexRep.getName(),EPathwayDatabaseType.KEGG),dataDomain.getDataDomainID());
    contextMenuCreator.addContextMenuItem(menuItem);
  }
 else   if (vertexRep.getType() == EPathwayVertexType.gene) {
    for (    PathwayVertex pathwayVertex : vertexRep.getPathwayVertices()) {
      for (      Integer davidID : pathwayItemManager.getDavidIdByPathwayVertex(pathwayVertex)) {
        GeneMenuItemContainer contexMenuItemContainer=new GeneMenuItemContainer();
        contexMenuItemContainer.setDataDomain(dataDomain);
        contexMenuItemContainer.setData(pathwayDataDomain.getDavidIDType(),davidID);
        contextMenuCreator.addContextMenuItemContainer(contexMenuItemContainer);
      }
    }
    for (    VertexRepBasedContextMenuItem item : addedContextMenuItems) {
      item.setVertexRep(vertexRep);
      contextMenuCreator.addContextMenuItem(item);
    }
  }
}

Fixed version (ground truth):
@Override public void rightClicked(Pick pick){
  if (detailLevel == EDetailLevel.VERY_LOW) {
    return;
  }
  PathwayVertexRep vertexRep=pathwayItemManager.getPathwayVertexRep(pick.getObjectID());
  if (vertexRep.getType() == EPathwayVertexType.map) {
    LoadPathwaysByPathwayItem menuItem=new LoadPathwaysByPathwayItem(PathwayManager.get().getPathwayByTitle(vertexRep.getName(),EPathwayDatabaseType.KEGG),dataDomain.getDataDomainID());
    contextMenuCreator.addContextMenuItem(menuItem);
  }
 else   if (vertexRep.getType() == EPathwayVertexType.gene) {
    if (!isRenderedRemote()) {
      for (      PathwayVertex pathwayVertex : vertexRep.getPathwayVertices()) {
        for (        Integer davidID : pathwayItemManager.getDavidIdByPathwayVertex(pathwayVertex)) {
          GeneMenuItemContainer contexMenuItemContainer=new GeneMenuItemContainer();
          contexMenuItemContainer.setDataDomain(dataDomain);
          contexMenuItemContainer.setData(pathwayDataDomain.getDavidIDType(),davidID);
          contextMenuCreator.addContextMenuItemContainer(contexMenuItemContainer);
        }
      }
    }
    for (    VertexRepBasedContextMenuItem item : addedContextMenuItems) {
      item.setVertexRep(vertexRep);
      contextMenuCreator.addContextMenuItem(item);
    }
  }
}
Program: 57328
Project: 57328
Buggy source:
@Override protected void renderContent(GL2 gl){
  if (!ensureValidRenderer())   return;
  super.renderContent(gl);
}

Fixed version (ground truth):
@Override protected void renderContent(GL2 gl){
  if (!isLazyViewCreation) {
    for (    ARendererInfo info : rendererInfos.values()) {
      if (info instanceof ViewInfo) {
        ViewInfo viewInfo=(ViewInfo)info;
        if (!viewInfo.isInitialized) {
          viewInfo.init();
        }
      }
    }
  }
  if (!ensureValidRenderer())   return;
  super.renderContent(gl);
}
Program: 57329
Project: 57329
Buggy source:
protected void onMainPick(Pick pick){
  IMouseLayer m=context.getMouseLayer();
switch (pick.getPickingMode()) {
case MOUSE_OVER:
    if (!pick.isDoDragging() && m.hasDraggable(ARankColumnModel.class)) {
      Pair<GLElement,ARankColumnModel> pair=m.getFirstDraggable(ARankColumnModel.class);
      if (model.isCombineAble(pair.getSecond())) {
        m.setDropable(ARankColumnModel.class,true);
        this.armDropColum=true;
        armDropHint=model.getTable().getConfig().getCombineStringHint(model,pair.getSecond());
        repaint();
      }
    }
 else     if (!pick.isAnyDragging()) {
      this.canDrag=true;
      this.relayout();
    }
  break;
case MOUSE_OUT:
if (armDropColum) {
  this.armDropColum=false;
  m.setDropable(ARankColumnModel.class,false);
  repaint();
}
if (this.canDrag) {
this.canDrag=false;
this.relayout();
}
break;
case MOUSE_RELEASED:
if (this.armDropColum) {
Pair<GLElement,ARankColumnModel> info=m.getFirstDraggable(ARankColumnModel.class);
m.removeDraggable(info.getFirst());
context.setCursor(-1);
if (info != null) model.combine(info.getSecond());
}
break;
default :
break;
}
}

Fixed version (ground truth):
protected void onMainPick(Pick pick){
  IMouseLayer m=context.getMouseLayer();
switch (pick.getPickingMode()) {
case MOUSE_OVER:
    if (!pick.isDoDragging() && m.hasDraggable(ARankColumnModel.class)) {
      Pair<GLElement,ARankColumnModel> pair=m.getFirstDraggable(ARankColumnModel.class);
      if (model.isCombineAble(pair.getSecond())) {
        m.setDropable(ARankColumnModel.class,true);
        this.armDropColum=true;
        armDropHint=model.getTable().getConfig().getCombineStringHint(model,pair.getSecond());
        repaint();
      }
    }
 else     if (!pick.isAnyDragging()) {
      this.canDrag=true;
      this.relayout();
    }
  break;
case MOUSE_OUT:
if (armDropColum) {
  this.armDropColum=false;
  m.setDropable(ARankColumnModel.class,false);
  repaint();
}
if (this.canDrag) {
this.canDrag=false;
this.relayout();
}
break;
case MOUSE_RELEASED:
if (this.armDropColum) {
Pair<GLElement,ARankColumnModel> info=m.getFirstDraggable(ARankColumnModel.class);
m.removeDraggable(info.getFirst());
m.setDropable(ARankColumnModel.class,false);
context.setCursor(-1);
if (info != null) model.combine(info.getSecond());
}
break;
default :
break;
}
}
Program: 57330
Project: 57330
Buggy source:
@Override public SimpleHistogram getHist(int bins){
  if (cacheHist != null)   return cacheHist;
  return cacheHist=DataUtils.getHist(bins,parent.getCurrentOrder(),this);
}

Fixed version (ground truth):
@Override public SimpleHistogram getHist(int bins){
  if (cacheHist != null && cacheHist.size() == bins)   return cacheHist;
  return cacheHist=DataUtils.getHist(bins,parent.getCurrentOrder(),this);
}
Program: 57331
Project: 57331
Buggy source:
/** 
 * the duration of the hightligh animation
 * @param delta
 * @return
 */
public static int hightlightAnimationDuration(int delta){
  return delta == Integer.MIN_VALUE ? 2000 : Math.min(Math.abs(delta) * 400,2000);
}

Fixed version (ground truth):
/** 
 * the duration of the highlight animation
 * @param delta the number of ranks the item moved up,  {@link Integer#MIN_VALUE} if it was not visible before
 * @return
 */
public static int hightlightAnimationDuration(int delta){
  return delta == Integer.MIN_VALUE ? 2000 : Math.min(Math.abs(delta) * 400,2000);
}
Program: 57332
Project: 57332
Buggy source:
@Override public void render(GLGraphics g,float w,float h,GLElement parent){
  final IRow r=parent.getLayoutDataAs(IRow.class,null);
  MultiFloat v=model.getSplittedValue(r);
  Color[] colors=model.getColors();
  if (v.repr >= 0) {
    boolean selected=model.getTable().getSelectedRow() == r;
    float[] heights=layout.compute(v.size(),v.repr,h * 0.8f);
    float y=h * 0.1f;
    for (int i=0; i < heights.length; ++i) {
      if (v.values[i] <= 0 || Float.isNaN(v.values[i]))       continue;
      float hi=heights[i];
      if (hi <= 0)       continue;
      g.color(colors[i]).fillRect(0,y,w * v.values[i],hi);
      if (selected) {
        ARankColumnModel modeli=model.get(i);
        String text=(modeli instanceof IMappedColumnMixin) ? ((IMappedColumnMixin)modeli).getRawValue(r) : Formatter.formatNumber(v.values[i]);
        ScoreBarRenderer.renderLabel(g,y,w,hi * 0.8f,text,v.values[i],parent);
      }
      y+=hi;
    }
  }
}

Fixed version (ground truth):
@Override public void render(GLGraphics g,float w,float h,GLElement parent){
  final IRow r=parent.getLayoutDataAs(IRow.class,null);
  MultiFloat v=model.getSplittedValue(r);
  if (v.repr < 0)   return;
  if (getRenderInfo(parent).isCollapsed()) {
    g.color(1 - v.get(),1 - v.get(),1 - v.get(),1);
    g.fillRect(w * 0.1f,h * 0.1f,w * 0.8f,h * 0.8f);
    return;
  }
  Color[] colors=model.getColors();
  if (v.repr >= 0) {
    boolean selected=model.getTable().getSelectedRow() == r;
    float[] heights=layout.compute(v.size(),v.repr,h * 0.8f);
    float y=h * 0.1f;
    for (int i=0; i < heights.length; ++i) {
      if (v.values[i] <= 0 || Float.isNaN(v.values[i]))       continue;
      float hi=heights[i];
      if (hi <= 0)       continue;
      g.color(colors[i]).fillRect(0,y,w * v.values[i],hi);
      if (selected) {
        ARankColumnModel modeli=model.get(i);
        String text=(modeli instanceof IMappedColumnMixin) ? ((IMappedColumnMixin)modeli).getRawValue(r) : Formatter.formatNumber(v.values[i]);
        float hli=getTextHeight(hi);
        ScoreBarRenderer.renderLabel(g,y + (hi - hli) * 0.5f,w,hli,text,v.values[i],parent);
      }
      y+=hi;
    }
  }
}
Program: 57333
Project: 57333
Buggy source:
private static IColumnRenderInfo getRenderInfo(GLElement parent){
  return (IColumnRenderInfo)parent.getParent();
}

Fixed version (ground truth):
static IColumnRenderInfo getRenderInfo(GLElement parent){
  return (IColumnRenderInfo)parent.getParent();
}
Program: 57334
Project: 57334
Buggy source:
static void renderLabel(GLGraphics g,float y,float w,float h,String text,float v,GLElement parent){
  if (h < 7)   return;
  float tw=g.text.getTextWidth(text,h);
  boolean hasFreeSpace=getRenderInfo(parent).hasFreeSpace();
  VAlign alignment=getRenderInfo(parent).getAlignment();
  g.drawText(text,2,y,(hasFreeSpace && alignment == VAlign.LEFT) ? w : v - 2,h,VAlign.LEFT);
}

Fixed version (ground truth):
static void renderLabel(GLGraphics g,float y,float w,float h,String text,float v,GLElement parent){
  if (h < 5)   return;
  float tw=g.text.getTextWidth(text,h);
  boolean hasFreeSpace=getRenderInfo(parent).hasFreeSpace();
  VAlign alignment=getRenderInfo(parent).getAlignment();
  g.drawText(text,2,y,(hasFreeSpace && alignment == VAlign.LEFT) ? w : (v * w) - 2,h,VAlign.LEFT);
}
Program: 57335
Project: 57335
Buggy source:
static void renderValue(GLGraphics g,float w,float h,GLElement parent,final IRow r,float v,boolean inferred,IRankableColumnMixin model,boolean align,Color color,Color collapseColor){
  if (getRenderInfo(parent).isCollapsed()) {
    if (collapseColor == null)     g.color(1 - v,1 - v,1 - v,1);
 else {
      float[] rgb=collapseColor.getColorComponents(null);
      g.color(rgb[0],rgb[1],rgb[2],v);
    }
    g.fillRect(w * 0.1f,h * 0.1f,w * 0.8f,h * 0.8f);
    if (inferred) {
      g.gl.glLineStipple(4,(short)0xAAAA);
      g.gl.glEnable(GL2.GL_LINE_STIPPLE);
      g.color(0,0,0,.5f).drawRect(w * 0.1f + 1,h * 0.1f + 1,w * 0.8f - 2,h * 0.8f - 2);
      g.gl.glDisable(GL2.GL_LINE_STIPPLE);
    }
  }
 else {
    g.color(color).fillRect(0,h * 0.1f,w * v,h * 0.8f);
    if (inferred) {
      g.gl.glLineStipple(1,(short)0xAAAA);
      g.gl.glEnable(GL2.GL_LINE_STIPPLE);
      g.color(0,0,0,.5f).drawRect(1,h * 0.1f + 1,w * v - 1,h * 0.8f - 2);
      g.gl.glDisable(GL2.GL_LINE_STIPPLE);
    }
    if (model.getTable().getSelectedRow() == r) {
      String text=(model instanceof IMappedColumnMixin) ? ((IMappedColumnMixin)model).getRawValue(r) : Formatter.formatNumber(v);
      float hi=Math.min(h * 0.45f,12);
      renderLabel(g,(h - hi) * 0.5f,w,hi,text,v,parent);
    }
  }
}

Fixed version (ground truth):
static void renderValue(GLGraphics g,float w,float h,GLElement parent,final IRow r,float v,boolean inferred,IRankableColumnMixin model,boolean align,Color color,Color collapseColor){
  if (getRenderInfo(parent).isCollapsed()) {
    if (collapseColor == null)     g.color(1 - v,1 - v,1 - v,1);
 else {
      float[] rgb=collapseColor.getColorComponents(null);
      g.color(rgb[0],rgb[1],rgb[2],v);
    }
    g.fillRect(w * 0.1f,h * 0.1f,w * 0.8f,h * 0.8f);
    if (inferred) {
      g.gl.glLineStipple(4,(short)0xAAAA);
      g.gl.glEnable(GL2.GL_LINE_STIPPLE);
      g.color(0,0,0,.5f).drawRect(w * 0.1f + 1,h * 0.1f + 1,w * 0.8f - 2,h * 0.8f - 2);
      g.gl.glDisable(GL2.GL_LINE_STIPPLE);
    }
  }
 else {
    g.color(color).fillRect(0,h * 0.1f,w * v,h * 0.8f);
    if (inferred) {
      g.gl.glLineStipple(1,(short)0xAAAA);
      g.gl.glEnable(GL2.GL_LINE_STIPPLE);
      g.color(0,0,0,.5f).drawRect(1,h * 0.1f + 1,w * v - 1,h * 0.8f - 2);
      g.gl.glDisable(GL2.GL_LINE_STIPPLE);
    }
    if (model.getTable().getSelectedRow() == r) {
      String text=(model instanceof IMappedColumnMixin) ? ((IMappedColumnMixin)model).getRawValue(r) : Formatter.formatNumber(v);
      float hi=getTextHeight(h);
      renderLabel(g,(h - hi) * 0.5f,w,hi,text,v,parent);
    }
  }
}
Program: 57336
Project: 57336
Buggy source:
@Override protected void firstTime(float w,float h){
  System.out.println(hashCode() + "String_Node_Str" + animated.asElement().hashCode()+ "String_Node_Str");
}

Fixed version (ground truth):
@Override protected void firstTime(float w,float h){
}
Program: 57337
Project: 57337
Buggy source:
@Override protected void lastTime(){
  animated.setBounds(to);
  System.out.println(hashCode() + "String_Node_Str" + animated.asElement().hashCode()+ "String_Node_Str"+ to);
}

Fixed version (ground truth):
@Override protected void lastTime(){
  animated.setBounds(to);
}
Program: 57338
Project: 57338
Buggy source:
@Override public void init(Vec4f from,Vec4f to){
  this.from=from;
  this.to=to;
  System.out.println(hashCode() + "String_Node_Str" + animated.asElement().hashCode()+ "String_Node_Str"+ from+ "String_Node_Str"+ to);
}

Fixed version (ground truth):
@Override public void init(Vec4f from,Vec4f to){
  this.from=from;
  this.to=to;
}
Program: 57339
Project: 57339
Buggy source:
public final void remove(GLElement child,int duration,IOutTransition animation){
}

Fixed version (ground truth):
public final void remove(GLElement child,IDuration duration,IOutTransition animation){
}
Program: 57340
Project: 57340
Buggy source:
private ALayoutAnimation createMoveAnimation(RecordingLayoutElement elem){
  if (!animateByDefault) {
    return new DummyAnimation(EAnimationType.MOVE,elem.wrappee);
  }
  final IDuration duration=elem.getLayoutDataAs(IDuration.class,Durations.DEFAULT);
  final IMoveTransition animation=elem.getLayoutDataAs(IMoveTransition.class,defaultMoveTransition);
  MoveAnimation anim=new MoveAnimation(0,duration,elem.wrappee,animation);
  return anim;
}

Fixed version (ground truth):
protected ALayoutAnimation createMoveAnimation(IGLLayoutElement elem){
  if (defaultDuration == Durations.NO) {
    return new DummyAnimation(EAnimationType.MOVE,elem);
  }
  final IDuration duration=elem.getLayoutDataAs(IDuration.class,defaultDuration);
  final IMoveTransition animation=elem.getLayoutDataAs(IMoveTransition.class,defaultMoveTransition);
  return new MoveAnimation(0,duration,elem,animation);
}
Program: 57341
Project: 57341
Buggy source:
/** 
 * animated adding of an element
 * @param child
 */
public final void add(GLElement child,int duration,IInTransition animation){
}

Fixed version (ground truth):
public final void add(GLElement child,IDuration duration,IInTransition animation){
}
Program: 57342
Project: 57342
Buggy source:
/** 
 * @param animateByDefault setter, see  {@link animateByDefault}
 */
public AnimatedGLElementContainer setAnimateByDefault(boolean animateByDefault){
  this.animateByDefault=animateByDefault;
  return this;
}

Fixed version (ground truth):
/** 
 * @param animateByDefault setter, see  {@link animateByDefault}
 */
public AnimatedGLElementContainer setAnimateByDefault(boolean animateByDefault){
  this.defaultDuration=animateByDefault ? Durations.DEFAULT : Durations.NO;
  return this;
}
Program: 57343
Project: 57343
Buggy source:
public final void clear(int duration){
  List<GLElement> seenIn=new ArrayList<>(asSeenIn(0));
  for (  GLElement s : seenIn)   remove(s,duration);
}

Fixed version (ground truth):
public final void clear(IDuration duration){
  List<GLElement> seenIn=new ArrayList<>(asSeenIn(0));
  for (  GLElement s : seenIn)   remove(s,duration);
}
Program: 57344
Project: 57344
Buggy source:
@Override protected final void layout(){
  super.layout();
  Vec2f size=getSize();
  if (dirtyAnimation || forceLayout) {
    List<AAnimation> tmp=Lists.newArrayList(animations);
    Collection<GLElement> elems=asSeenIn(0);
    List<RecordingLayoutElement> l=new ArrayList<>(elems.size());
    for (    GLElement elem : elems) {
      if (elem.getVisibility() != EVisibility.NONE)       l.add(new RecordingLayoutElement(elem.layoutElement));
    }
    layout.doLayout(l,size.x(),size.y());
    outer:     for (    RecordingLayoutElement elem : l) {
      for (Iterator<AAnimation> ita=tmp.iterator(); ita.hasNext(); ) {
        AAnimation anim=ita.next();
        if (anim.getAnimated() == elem.wrappee && anim instanceof ALayoutAnimation) {
          ((ALayoutAnimation)anim).init(elem.before,elem.after);
          ita.remove();
          continue outer;
        }
      }
      if (elem.hasChanged()) {
        ALayoutAnimation anim=createMoveAnimation(elem);
        anim.init(elem.before,elem.after);
        animations.add(anim);
      }
    }
  }
}

Fixed version (ground truth):
@Override protected final void layout(){
  super.layout();
  Vec2f size=getSize();
  if (dirtyAnimation || forceLayout) {
    List<AAnimation> tmp=Lists.newArrayList(animations);
    Collection<GLElement> elems=asSeenIn(0);
    List<RecordingLayoutElement> l=new ArrayList<>(elems.size());
    for (    GLElement elem : elems) {
      if (elem.getVisibility() != EVisibility.NONE)       l.add(new RecordingLayoutElement(elem.layoutElement));
    }
    layout.doLayout(l,size.x(),size.y());
    outer:     for (    RecordingLayoutElement elem : l) {
      for (Iterator<AAnimation> ita=tmp.iterator(); ita.hasNext(); ) {
        AAnimation anim=ita.next();
        if (anim.getAnimated() == elem.wrappee && anim instanceof ALayoutAnimation) {
          ((ALayoutAnimation)anim).init(elem.before,elem.after);
          ita.remove();
          continue outer;
        }
      }
      if (elem.hasChanged()) {
        ALayoutAnimation anim=createMoveAnimation(elem.wrappee);
        anim.init(elem.before,elem.after);
        animations.add(anim);
      }
    }
  }
}
Program: 57345
Project: 57345
Buggy source:
@Override protected void renderImpl(GLGraphics g,float w,float h){
  Collection<StyleAnimation> styleAnims=doAnimation();
  super.renderImpl(g,w,h);
  g.incZ();
  for (  GLElement child : activeChildren()) {
    boolean found=false;
    for (Iterator<StyleAnimation> it=styleAnims.iterator(); it.hasNext(); ) {
      StyleAnimation a=it.next();
      if (a.getAnimatedElement() == child && a.isRunning()) {
        a.render(g);
        found=true;
        break;
      }
    }
    if (!found)     child.render(g);
  }
  for (  StyleAnimation anim : styleAnims) {
    if (anim.isDone() || anim.getAnimatedElement().getParent() != this)     animations.remove(anim);
  }
  g.decZ();
}

Fixed version (ground truth):
@Override protected void renderImpl(GLGraphics g,float w,float h){
  Collection<AAnimation> styleAnims=doAnimation();
  super.renderImpl(g,w,h);
  g.incZ();
  for (  GLElement child : activeChildren()) {
    boolean found=false;
    for (Iterator<AAnimation> it=styleAnims.iterator(); it.hasNext(); ) {
      AAnimation a=it.next();
      if (a.getAnimatedElement() == child && a.isRunning()) {
        a.render(g);
        found=true;
        break;
      }
    }
    if (!found) {
      child.render(g);
    }
  }
  for (  AAnimation anim : styleAnims) {
    if (anim.isDone() || anim.getAnimatedElement().getParent() != this)     animations.remove(anim);
  }
  if (animations.isEmpty()) {
    startTime=-1;
  }
  g.decZ();
}
Program: 57346
Project: 57346
Buggy source:
private Collection<StyleAnimation> doAnimation(){
  if (animations.isEmpty())   return Collections.emptyList();
  Vec2f size=getSize();
  int delta=nextDelta();
  Collection<StyleAnimation> styles=new LinkedList<>();
  for (Iterator<AAnimation> it=animations.iterator(); it.hasNext(); ) {
    AAnimation anim=it.next();
    if (anim.apply(delta,size.x(),size.y())) {
      GLElement elem=anim.getAnimatedElement();
switch (anim.getType()) {
case MOVE:
        it.remove();
      break;
case IN:
    it.remove();
  break;
case OUT:
takeDown(elem);
it.remove();
break;
case STYLE:
break;
}
}
if (anim instanceof StyleAnimation) styles.add((StyleAnimation)anim);
}
if (animations.isEmpty()) {
startTime=-1;
}
repaintAll();
return styles;
}

Fixed version (ground truth):
private Collection<AAnimation> doAnimation(){
  if (animations.isEmpty())   return Collections.emptyList();
  Vec2f size=getSize();
  int delta=nextDelta();
  Collection<AAnimation> styles=new LinkedList<>();
  for (Iterator<AAnimation> it=animations.iterator(); it.hasNext(); ) {
    AAnimation anim=it.next();
    if (anim.apply(delta,size.x(),size.y())) {
      GLElement elem=anim.getAnimatedElement();
switch (anim.getType()) {
case MOVE:
        break;
case IN:
      break;
case OUT:
    takeDown(elem);
  break;
case STYLE:
break;
}
if (!anim.hasRenderAnimation()) it.remove();
}
if (anim.hasRenderAnimation()) styles.add(anim);
}
if (animations.isEmpty()) {
startTime=-1;
}
repaintAll();
return styles;
}
Program: 57347
Project: 57347
Buggy source:
/** 
 * performs the animation
 * @param delta between last call in ms
 * @return whether this animation ended
 */
public boolean apply(int delta,float w,float h){
  if (startIn >= 0) {
    startIn-=delta;
    if (startIn < 0) {
      delta=-startIn;
      startIn=-1;
    }
 else {
      delta=0;
    }
    firstTime(w,h);
  }
  if (delta < 3)   return false;
  remaining-=delta;
  float alpha=0;
  if (remaining <= 0) {
    lastTime();
  }
 else {
    alpha=1 - (remaining / (float)durationValue);
    animate(alpha,w,h);
  }
  return remaining <= 0;
}

Fixed version (ground truth):
/** 
 * performs the animation
 * @param delta between last call in ms
 * @return whether this animation ended
 */
public boolean apply(int delta,float w,float h){
  if (startIn >= 0) {
    startIn-=delta;
    if (startIn <= 0) {
      delta=-startIn;
      startIn=-1;
    }
 else {
      delta=0;
    }
    firstTime(w,h);
    lastAlpha=0;
  }
  if (delta < 3)   return false;
  remaining-=delta;
  float alpha=0;
  if (remaining <= 0) {
    lastTime();
    lastAlpha=1;
  }
 else {
    alpha=1 - (remaining / (float)durationValue);
    animate(alpha,w,h);
    lastAlpha=alpha;
  }
  return remaining <= 0;
}
Program: 57348
Project: 57348
Buggy source:
@Override public boolean equals(Object obj){
  if (this == obj)   return true;
  if (obj == null)   return false;
  if (getClass() != obj.getClass())   return false;
  AAnimation other=(AAnimation)obj;
  if (animated == null) {
    if (other.animated != null)     return false;
  }
 else   if (!animated.equals(other.animated))   return false;
  return true;
}

Fixed version (ground truth):
@Override public boolean equals(Object obj){
  if (this == obj)   return true;
  if (obj == null)   return false;
  if (getClass() != obj.getClass())   return false;
  AAnimation other=(AAnimation)obj;
  if (!Objects.equals(animated,other.animated))   return false;
  return true;
}
Program: 57349
Project: 57349
Buggy source:
@Override protected void firstTime(float w,float h){
}

Fixed version (ground truth):
@Override protected void firstTime(float w,float h){
  System.out.println(hashCode() + "String_Node_Str" + animated.asElement().hashCode()+ "String_Node_Str");
}
Program: 57350
Project: 57350
Buggy source:
@Override protected void lastTime(){
  animated.setBounds(to);
}

Fixed version (ground truth):
@Override protected void lastTime(){
  animated.setBounds(to);
  System.out.println(hashCode() + "String_Node_Str" + animated.asElement().hashCode()+ "String_Node_Str"+ to);
}
Program: 57351
Project: 57351
Buggy source:
@Override public void init(Vec4f from,Vec4f to){
  this.from=from;
  this.to=to;
}

Fixed version (ground truth):
@Override public void init(Vec4f from,Vec4f to){
  this.from=from;
  this.to=to;
  System.out.println(hashCode() + "String_Node_Str" + animated.asElement().hashCode()+ "String_Node_Str"+ from+ "String_Node_Str"+ to);
}
Program: 57353
Project: 57353
Buggy source:
private SerializationManager(){
  addons=new ArrayList<>();
  try {
    for (    IConfigurationElement elem : RegistryFactory.getRegistry().getConfigurationElementsFor(EXTENSION_POINT)) {
      final Object o=elem.createExecutableExtension("String_Node_Str");
      if (o instanceof ISerializationAddon)       addons.add((ISerializationAddon)o);
    }
  }
 catch (  CoreException ex) {
    System.err.println(ex.getMessage());
  }
  try {
    Collection<Class<? extends AEvent>> eventTypes=getSerializeableEventTypes();
    Class<?>[] classes=new Class<?>[eventTypes.size()];
    classes=eventTypes.toArray(classes);
    eventContext=JAXBContext.newInstance(classes);
    serializableTypes=new ArrayList<Class<?>>();
    serializableTypes.add(SerializationData.class);
    serializableTypes.add(DataDomainSerializationData.class);
    serializableTypes.add(DataDomainList.class);
    serializableTypes.add(BasicInformation.class);
    for (    ISerializationAddon addon : addons)     serializableTypes.addAll(addon.getJAXBContextClasses());
    createNewProjectContext();
  }
 catch (  JAXBException ex) {
    throw new RuntimeException("String_Node_Str",ex);
  }
}

Fixed version (ground truth):
private SerializationManager(){
  addons=ExtensionUtils.findImplementation(EXTENSION_POINT,"String_Node_Str",ISerializationAddon.class);
  try {
    Collection<Class<? extends AEvent>> eventTypes=getSerializeableEventTypes();
    Class<?>[] classes=new Class<?>[eventTypes.size()];
    classes=eventTypes.toArray(classes);
    eventContext=JAXBContext.newInstance(classes);
    serializableTypes=new ArrayList<Class<?>>();
    serializableTypes.add(SerializationData.class);
    serializableTypes.add(DataDomainSerializationData.class);
    serializableTypes.add(DataDomainList.class);
    serializableTypes.add(BasicInformation.class);
    for (    ISerializationAddon addon : addons)     serializableTypes.addAll(addon.getJAXBContextClasses());
    createNewProjectContext();
  }
 catch (  JAXBException ex) {
    throw new RuntimeException("String_Node_Str",ex);
  }
}
Program: 57354
Project: 57354
Buggy source:
@Override public void takeDown(GLElement element){
}

Fixed version (ground truth):
@Override public void takeDown(GLElement element){
  eventListeners.unregister(element);
}