nus-yam/ex-repair huggingface dataset:
Program: 58366
Project: 58366
Buggy source:
private void updateContentTree(){
  ArrayList<SelectionType> sTypes=contentSelectionManager.getSelectionTypes();
  Color color=null;
  contentTree.removeAll();
  for (  SelectionType tmpSelectionType : sTypes) {
    if (SelectionType.isDefaultType(tmpSelectionType) || tmpSelectionType == SelectionType.DESELECTED)     continue;
    TreeItem item=new TreeItem(contentTree,SWT.NONE);
    float[] fArColor=tmpSelectionType.getColor();
    color=new Color(parentComposite.getDisplay(),(int)(fArColor[0] * 255),(int)(fArColor[1] * 255),(int)(fArColor[2] * 255));
    item.setText(tmpSelectionType.toString() + "String_Node_Str" + contentSelectionManager.getNumberOfElements(tmpSelectionType)+ "String_Node_Str");
    item.setBackground(color);
    item.setData(tmpSelectionType);
    contentTree.setExpanded(true);
  }
}

Fixed version (ground truth):
private void updateContentTree(){
  ArrayList<SelectionType> sTypes=contentSelectionManager.getSelectionTypes();
  Color color=null;
  contentTree.removeAll();
  for (  SelectionType tmpSelectionType : sTypes) {
    if (SelectionType.isDefaultType(tmpSelectionType) || !tmpSelectionType.isManaged())     continue;
    TreeItem item=new TreeItem(contentTree,SWT.NONE);
    float[] fArColor=tmpSelectionType.getColor();
    color=new Color(parentComposite.getDisplay(),(int)(fArColor[0] * 255),(int)(fArColor[1] * 255),(int)(fArColor[2] * 255));
    item.setText(tmpSelectionType.toString() + "String_Node_Str" + contentSelectionManager.getNumberOfElements(tmpSelectionType)+ "String_Node_Str");
    item.setBackground(color);
    item.setData(tmpSelectionType);
    contentTree.setExpanded(true);
  }
}
Program: 58368
Project: 58368
Buggy source:
public void addSelectionType(){
  iCurrentSelectionNr++;
  if (iCurrentSelectionNr > iMaxSelections)   return;
  SelectionTypeEvent event=new SelectionTypeEvent();
  currentSelection=new SelectionType();
  currentSelection.setType(CUSTOM_SELECTION_NAME + "String_Node_Str" + iCurrentSelectionNr);
  currentSelection.setColor(ScatterPlotHelper.getSelectionColor(iCurrentSelectionNr));
  currentSelection.setPriority((float)iCurrentSelectionNr / 10000.0f);
  event.addSelectionType(currentSelection);
  eventPublisher.triggerEvent(event);
}

Fixed version (ground truth):
public void addSelectionType(){
  iCurrentSelectionNr++;
  if (iCurrentSelectionNr > iMaxSelections)   return;
  SelectionTypeEvent event=new SelectionTypeEvent();
  currentSelection=new SelectionType();
  currentSelection.setType(CUSTOM_SELECTION_NAME + "String_Node_Str" + iCurrentSelectionNr);
  currentSelection.setColor(ScatterPlotHelper.getSelectionColor(iCurrentSelectionNr));
  currentSelection.setPriority((float)iCurrentSelectionNr / 10000.0f);
  currentSelection.setManaged(true);
  event.addSelectionType(currentSelection);
  eventPublisher.triggerEvent(event);
}
Program: 58373
Project: 58373
Buggy source:
private void createGUI(){
  composite.layout();
  final Slider pValueSlider=new Slider(composite,SWT.HORIZONTAL);
  final Label pValueLabel=new Label(composite,SWT.NULL);
  pValueLabel.setText("String_Node_Str" + pValueCutOff);
  reducedNumberLabel=new Label(composite,SWT.NULL);
  reducedNumberLabel.setText("String_Node_Str");
  pValueSlider.setMinimum(0);
  pValueSlider.setMaximum(110);
  pValueSlider.setIncrement(10);
  pValueSlider.setPageIncrement(10);
  pValueSlider.setSelection((int)(pValueCutOff * 1000));
  pValueSlider.addMouseListener(new MouseAdapter(){
    @Override public void mouseUp(    MouseEvent e){
      pValueCutOff=pValueSlider.getSelection() / 1000f;
      pValueLabel.setText("String_Node_Str" + pValueCutOff);
      calulateReduction();
      if (reducedVA != null)       reducedNumberLabel.setText("String_Node_Str" + reducedVA.size());
      composite.layout();
    }
  }
);
  final Button button=new Button(composite,SWT.PUSH);
  button.setText("String_Node_Str");
  button.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      performReduction();
    }
  }
);
  final Button buttonClear=new Button(composite,SWT.PUSH);
  buttonClear.setText("String_Node_Str");
  buttonClear.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      clearStatisticsResults();
      calulateReduction();
    }
  }
);
}

Fixed version (ground truth):
private void createGUI(){
  composite.layout();
  final Slider pValueSlider=new Slider(composite,SWT.HORIZONTAL);
  final Label pValueLabel=new Label(composite,SWT.NULL);
  pValueLabel.setText("String_Node_Str" + pValueCutOff);
  reducedNumberLabel=new Label(composite,SWT.NULL);
  reducedNumberLabel.setText("String_Node_Str");
  pValueSlider.setMinimum(0);
  pValueSlider.setMaximum(110);
  pValueSlider.setIncrement(10);
  pValueSlider.setPageIncrement(10);
  pValueSlider.setSelection((int)(pValueCutOff * 1000));
  pValueSlider.addMouseListener(new MouseAdapter(){
    @Override public void mouseUp(    MouseEvent e){
      pValueCutOff=pValueSlider.getSelection() / 1000f;
      pValueLabel.setText("String_Node_Str" + pValueCutOff);
      calulateReduction();
      composite.layout();
    }
  }
);
  final Button button=new Button(composite,SWT.PUSH);
  button.setText("String_Node_Str");
  button.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      performReduction();
    }
  }
);
  final Button buttonClear=new Button(composite,SWT.PUSH);
  buttonClear.setText("String_Node_Str");
  buttonClear.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      clearStatisticsResults();
      calulateReduction();
    }
  }
);
}
Program: 58374
Project: 58374
Buggy source:
public void resultFinished(ArrayList<ISet> sets){
  setsWithPerformedStatistics.addAll(sets);
  calulateReduction();
  if (reducedVA != null) {
    reducedNumberLabel.setText("String_Node_Str" + reducedVA.size());
    composite.layout();
  }
}

Fixed version (ground truth):
public void resultFinished(ArrayList<ISet> sets){
  setsWithPerformedStatistics.addAll(sets);
  calulateReduction();
}
Program: 58375
Project: 58375
Buggy source:
@Override public void mouseUp(MouseEvent e){
  pValueCutOff=pValueSlider.getSelection() / 1000f;
  pValueLabel.setText("String_Node_Str" + pValueCutOff);
  calulateReduction();
  if (reducedVA != null)   reducedNumberLabel.setText("String_Node_Str" + reducedVA.size());
  composite.layout();
}

Fixed version (ground truth):
@Override public void mouseUp(MouseEvent e){
  pValueCutOff=pValueSlider.getSelection() / 1000f;
  pValueLabel.setText("String_Node_Str" + pValueCutOff);
  calulateReduction();
  composite.layout();
}
Program: 58376
Project: 58376
Buggy source:
private void clearStatisticsResults(){
  for (  ISet set : setsWithPerformedStatistics) {
    set.getStatisticsResult().clearStatisticsResults();
  }
}

Fixed version (ground truth):
private void clearStatisticsResults(){
  for (  ISet set : setsWithPerformedStatistics) {
    set.getStatisticsResult().clearStatisticsResults();
  }
  calulateReduction();
}
Program: 58377
Project: 58377
Buggy source:
public int getElementNumberOfFoldChangeReduction(ISet compareSet){
  int numberOfElements=0;
  ContentVirtualArray origVA=compareSet.getContentVA(ContentVAType.CONTENT);
  double[] resultVector=setToFoldChangeResult.get(compareSet).getFirst();
  FoldChangeSettings settings=setToFoldChangeResult.get(compareSet).getSecond();
  double foldChangeRatio=settings.getRatio();
  FoldChangeEvaluator foldChangeEvaluator=settings.getEvaluator();
  for (Integer contentIndex=0; contentIndex < origVA.size(); contentIndex++) {
switch (foldChangeEvaluator) {
case LESS:
      if (resultVector[contentIndex] > -foldChangeRatio)       continue;
    break;
case GREATER:
  if (resultVector[contentIndex] < foldChangeRatio)   continue;
break;
case SAME:
if (Math.abs(resultVector[contentIndex]) > foldChangeRatio) continue;
break;
}
numberOfElements++;
}
return numberOfElements;
}

Fixed version (ground truth):
public int getElementNumberOfFoldChangeReduction(ISet compareSet){
  int numberOfElements=0;
  ContentVirtualArray origVA=compareSet.getContentVA(ContentVAType.CONTENT);
  double[] resultVector=setToFoldChangeResult.get(compareSet).getFirst();
  FoldChangeSettings settings=setToFoldChangeResult.get(compareSet).getSecond();
  double foldChangeRatio=settings.getRatio();
  FoldChangeEvaluator foldChangeEvaluator=settings.getEvaluator();
  for (Integer contentIndex=0; contentIndex < origVA.size(); contentIndex++) {
switch (foldChangeEvaluator) {
case LESS:
      if (resultVector[contentIndex] > foldChangeRatio)       continue;
    break;
case GREATER:
  if (resultVector[contentIndex] < foldChangeRatio)   continue;
break;
case SAME:
if (Math.abs(resultVector[contentIndex]) > foldChangeRatio) continue;
break;
}
numberOfElements++;
}
return numberOfElements;
}
Program: 58378
Project: 58378
Buggy source:
@Override public void handleEvent(AEvent event){
  StatisticsPValueReductionEvent pValueReductionEvent=null;
  if (event instanceof StatisticsPValueReductionEvent) {
    pValueReductionEvent=(StatisticsPValueReductionEvent)event;
    handler.twoSidedTTest(pValueReductionEvent.getSets());
  }
}

Fixed version (ground truth):
@Override public void handleEvent(AEvent event){
  StatisticsPValueReductionEvent pValueReductionEvent=null;
  if (event instanceof StatisticsPValueReductionEvent) {
    pValueReductionEvent=(StatisticsPValueReductionEvent)event;
    handler.oneSidedTTest(pValueReductionEvent.getSets());
  }
}
Program: 58379
Project: 58379
Buggy source:
public void reportOneShot(User user,User owner,AccessInformation accessInformation,int srcAppID){
  System.out.println("String_Node_Str" + user.getPointerID() + "String_Node_Str"+ owner.getPointerID()+ "String_Node_Str");
  if (user.getCurrentRenderType() == VisualLinksRenderType.RenderTypeOneShot) {
    System.out.println("String_Node_Str");
    return;
  }
  user.setCurrentRenderType(VisualLinksRenderType.RenderTypeOneShot);
  String selectionID=owner.getPrevSelectionID();
  int[] targetApplicationIds=accessInformation.applicationIds;
  String pointerID=user.getPointerID();
  for (  int appId : targetApplicationIds) {
    Application app=applicationManager.getApplicationsById().get(appId);
    boolean isSource=false;
    if (appId == srcAppID) {
      System.out.println(app.getName() + "String_Node_Str");
      isSource=true;
    }
    this.selectionManager.addSelection(app,selectionID,pointerID,isSource);
  }
  TimeoutEvent event=new OneShotTimeoutEvent(user);
  TimeoutHandler timeoutHandler=new TimeoutHandler(event,this);
  Timer timer=new Timer();
  timer.schedule(timeoutHandler,OneShotTimeoutEvent.ONE_SHOT_DISPLAY_TIME);
  checkRender(pointerID);
}

Fixed version (ground truth):
public void reportOneShot(User user,User owner,AccessInformation accessInformation,int srcAppID){
  System.out.println("String_Node_Str" + user.getPointerID() + "String_Node_Str"+ owner.getPointerID()+ "String_Node_Str");
  TimeoutEvent event=new OneShotTimeoutEvent(user);
  if (this.tmpTimeoutHandler != null) {
    this.tmpTimeoutHandler.cancel();
    this.tmpTimeoutHandler=null;
  }
  this.tmpTimeoutHandler=new TimeoutHandler(event,this);
  Timer timer=new Timer();
  timer.schedule(this.tmpTimeoutHandler,OneShotTimeoutEvent.ONE_SHOT_DISPLAY_TIME);
  if (user.getCurrentRenderType() == VisualLinksRenderType.RenderTypeOneShot) {
    System.out.println("String_Node_Str");
    return;
  }
  user.setCurrentRenderType(VisualLinksRenderType.RenderTypeOneShot);
  String selectionID=owner.getPrevSelectionID();
  int[] targetApplicationIds=accessInformation.applicationIds;
  String pointerID=user.getPointerID();
  for (  int appId : targetApplicationIds) {
    Application app=applicationManager.getApplicationsById().get(appId);
    boolean isSource=false;
    if (appId == srcAppID) {
      System.out.println(app.getName() + "String_Node_Str");
      isSource=true;
    }
    this.selectionManager.addSelection(app,selectionID,pointerID,isSource);
  }
  checkRender(pointerID);
}
Program: 58380
Project: 58380
Buggy source:
public VisLinkManager(){
}

Fixed version (ground truth):
public VisLinkManager(){
  this.tmpTimeoutHandler=null;
}
Program: 58381
Project: 58381
Buggy source:
private void renderWithIce(HashMap<Integer,BoundingBoxList> app2bbs,String pointerID){
  ArrayList<SelectionGroup> selectionGroupList=new ArrayList<SelectionGroup>();
  for (  Entry<Integer,BoundingBoxList> e : app2bbs.entrySet()) {
    SelectionGroup selectionGroup=new SelectionGroup();
    User user=this.userManager.getUser(pointerID);
    int srcAppID=-1;
    if (user.getPrevSrcApp() != null) {
      srcAppID=user.getPrevSrcApp().getId();
    }
    selectionGroup.selections=new Selection[e.getValue().getList().size()];
    ArrayList<Selection> selectionList=new ArrayList<Selection>();
    for (    BoundingBox bb : e.getValue().getList()) {
      if (e.getKey() == srcAppID) {
        bb.setSource(true);
      }
      Selection selection=new Selection(bb.getX(),bb.getY(),bb.getWidth(),bb.getHeight(),new Color4f(-1.0f,0,0,0),bb.isSource());
      selectionList.add(selection);
    }
    selectionGroup.selections=selectionList.toArray(selectionGroup.selections);
    selectionGroup.containerID=e.getKey();
    selectionGroupList.add(selectionGroup);
  }
  SelectionGroup[] groups=new SelectionGroup[selectionGroupList.size()];
  selectionGroupList.toArray(groups);
  SelectionReport report=new SelectionReport();
  report.pointerId=pointerID;
  report.renderType=VisualLinksRenderType.RenderTypeNormal;
  report.selectionGroups=groups;
  rendererPrx.renderAllLinks(report);
}

Fixed version (ground truth):
private void renderWithIce(HashMap<Integer,BoundingBoxList> app2bbs,String pointerID){
  ArrayList<SelectionGroup> selectionGroupList=new ArrayList<SelectionGroup>();
  User user=this.userManager.getUser(pointerID);
  for (  Entry<Integer,BoundingBoxList> e : app2bbs.entrySet()) {
    SelectionGroup selectionGroup=new SelectionGroup();
    selectionGroup.selections=new Selection[e.getValue().getList().size()];
    ArrayList<Selection> selectionList=new ArrayList<Selection>();
    for (    BoundingBox bb : e.getValue().getList()) {
      Selection selection=new Selection(bb.getX(),bb.getY(),bb.getWidth(),bb.getHeight(),new Color4f(-1.0f,0,0,0),bb.isSource());
      selectionList.add(selection);
    }
    selectionGroup.selections=selectionList.toArray(selectionGroup.selections);
    selectionGroup.containerID=e.getKey();
    selectionGroupList.add(selectionGroup);
  }
  SelectionGroup[] groups=new SelectionGroup[selectionGroupList.size()];
  selectionGroupList.toArray(groups);
  SelectionReport report=new SelectionReport();
  report.pointerId=pointerID;
  report.renderType=user.getCurrentRenderType();
  report.selectionGroups=groups;
  rendererPrx.renderAllLinks(report);
}
Program: 58382
Project: 58382
Buggy source:
public void reportSelection(String appName,String selectionId,String boundingBoxListXML){
  System.out.println("String_Node_Str" + appName + "String_Node_Str"+ selectionId+ "String_Node_Str"+ boundingBoxListXML);
  Application app=applicationManager.getApplications().get(appName);
  if (boundingBoxListXML != null && boundingBoxListXML.isEmpty()) {
    boundingBoxListXML=null;
  }
  AccessInformation accessInformation=rendererPrx.getAccessInformation(app.getId());
  int[] targetApplicationIds=accessInformation.applicationIds;
  String pointerID=accessInformation.pointerId;
  this.selectionManager.addSelection(app,selectionId,pointerID);
  UserSelection selection=this.selectionManager.getSelection(app,pointerID);
  if (boundingBoxListXML != null) {
    BoundingBoxList bbl=createBoundingBoxList(boundingBoxListXML);
    selection.setBoundingBoxList(bbl);
  }
  selection.setReported();
  System.out.println("String_Node_Str" + pointerID);
  User user=this.userManager.getUser(pointerID);
  user.setNewSelection(selectionId,app);
  for (  int appId : targetApplicationIds) {
    Application currentApp=applicationManager.getApplicationsById().get(appId);
    if (currentApp.getId() != app.getId() || boundingBoxListXML == null) {
      this.selectionManager.addSelection(currentApp,selectionId,pointerID);
    }
  }
  checkRender(pointerID);
}

Fixed version (ground truth):
public void reportSelection(String appName,String selectionId,String boundingBoxListXML){
  System.out.println("String_Node_Str" + appName + "String_Node_Str"+ selectionId+ "String_Node_Str"+ boundingBoxListXML);
  Application app=applicationManager.getApplications().get(appName);
  if (boundingBoxListXML != null && boundingBoxListXML.isEmpty()) {
    boundingBoxListXML=null;
  }
  AccessInformation accessInformation=rendererPrx.getAccessInformation(app.getId());
  int[] targetApplicationIds=accessInformation.applicationIds;
  String pointerID=accessInformation.pointerId;
  this.selectionManager.addSelection(app,selectionId,pointerID,true);
  UserSelection selection=this.selectionManager.getSelection(app,pointerID);
  if (boundingBoxListXML != null) {
    BoundingBoxList bbl=createBoundingBoxList(boundingBoxListXML);
    selection.setBoundingBoxList(bbl);
  }
  selection.setReported();
  System.out.println("String_Node_Str" + pointerID);
  User user=this.userManager.getUser(pointerID);
  user.setNewSelection(selectionId,app);
  for (  int appId : targetApplicationIds) {
    Application currentApp=applicationManager.getApplicationsById().get(appId);
    if (currentApp.getId() != app.getId() || boundingBoxListXML == null) {
      this.selectionManager.addSelection(currentApp,selectionId,pointerID,false);
    }
  }
  checkRender(pointerID);
}
Program: 58383
Project: 58383
Buggy source:
public void reportVisualLinks(String appName,String pointerID,String boundingBoxListXML){
  System.out.println("String_Node_Str" + appName + "String_Node_Str"+ pointerID+ "String_Node_Str"+ boundingBoxListXML);
  Application app=applicationManager.getApplications().get(appName);
  if (app == null || pointerID == null) {
    System.out.println("String_Node_Str");
    return;
  }
  UserSelection selection=selectionManager.getSelection(app,pointerID);
  selection.setReported();
  if (selection == null) {
    System.out.println("String_Node_Str" + appName + "String_Node_Str"+ pointerID+ "String_Node_Str");
    return;
  }
  BoundingBoxList bbl=createBoundingBoxList(boundingBoxListXML);
  if (bbl.getList().size() > 0) {
    System.out.println("String_Node_Str" + appName + "String_Node_Str"+ pointerID);
    this.userManager.getUser(pointerID).addPrevTargetApp(app);
  }
  selection.setBoundingBoxList(bbl);
  checkRender(pointerID);
}

Fixed version (ground truth):
public void reportVisualLinks(String appName,String pointerID,String boundingBoxListXML){
  System.out.println("String_Node_Str" + appName + "String_Node_Str"+ pointerID+ "String_Node_Str"+ boundingBoxListXML);
  Application app=applicationManager.getApplications().get(appName);
  if (app == null || pointerID == null) {
    System.out.println("String_Node_Str");
    return;
  }
  UserSelection selection=selectionManager.getSelection(app,pointerID);
  selection.setReported();
  if (selection == null) {
    System.out.println("String_Node_Str" + appName + "String_Node_Str"+ pointerID+ "String_Node_Str");
    return;
  }
  BoundingBoxList bbl=createBoundingBoxList(boundingBoxListXML);
  if (bbl.getList().size() > 0) {
    System.out.println("String_Node_Str" + appName + "String_Node_Str"+ pointerID);
    this.userManager.getUser(pointerID).addPrevTargetApp(app);
    bbl.list.get(0).setSource(selection.isSource());
  }
  selection.setBoundingBoxList(bbl);
  checkRender(pointerID);
}
Program: 58385
Project: 58385
Buggy source:
public void releaseOneShot(User user){
  System.out.println("String_Node_Str" + user.getPointerID());
  if (user.getCurrentRenderType() != VisualLinksRenderType.RenderTypeOneShot) {
    System.out.println("String_Node_Str");
    return;
  }
  user.setCurrentRenderType(VisualLinksRenderType.RenderTypeNormal);
  String selectionID=user.getPrevSelectionID();
  String pointerID=user.getPointerID();
  System.out.println("String_Node_Str" + user.getPointerID() + "String_Node_Str"+ selectionID);
  List<Application> appList=user.getAllPrevApps();
  for (  Application userApp : appList) {
    this.selectionManager.addSelection(userApp,selectionID,pointerID);
  }
  checkRender(pointerID);
}

Fixed version (ground truth):
public void releaseOneShot(User user){
  System.out.println("String_Node_Str" + user.getPointerID());
  if (user.getCurrentRenderType() != VisualLinksRenderType.RenderTypeOneShot) {
    System.out.println("String_Node_Str");
    return;
  }
  user.setCurrentRenderType(VisualLinksRenderType.RenderTypeNormal);
  String selectionID=user.getPrevSelectionID();
  String pointerID=user.getPointerID();
  System.out.println("String_Node_Str" + user.getPointerID() + "String_Node_Str"+ selectionID);
  List<Application> appList=user.getAllPrevApps();
  for (  Application userApp : appList) {
    boolean isSource=false;
    if (userApp == user.getPrevSrcApp()) {
      isSource=true;
    }
    this.selectionManager.addSelection(userApp,selectionID,pointerID,isSource);
  }
  checkRender(pointerID);
}
Program: 58386
Project: 58386
Buggy source:
@Override public void run(){
  super.run();
  StartClusteringDialog dialog=new StartClusteringDialog(new Shell());
  dialog.open();
  ClusterState clusterState=dialog.getClusterState();
  StartClusteringEvent event=null;
  if (sets == null || sets.size() == 0)   sets.add(GeneralManager.get().getMasterUseCase().getSet());
  for (  ISet tmpSet : sets) {
    event=new StartClusteringEvent(clusterState,tmpSet.getID());
    GeneralManager.get().getEventPublisher().triggerEvent(event);
  }
}

Fixed version (ground truth):
@Override public void run(){
  super.run();
  StartClusteringDialog dialog=new StartClusteringDialog(new Shell());
  dialog.open();
  ClusterState clusterState=dialog.getClusterState();
  StartClusteringEvent event=null;
  if (sets == null || sets.size() == 0) {
    sets=new ArrayList<ISet>();
    sets.add(GeneralManager.get().getMasterUseCase().getSet());
  }
  for (  ISet tmpSet : sets) {
    event=new StartClusteringEvent(clusterState,tmpSet.getID());
    GeneralManager.get().getEventPublisher().triggerEvent(event);
  }
}
Program: 58389
Project: 58389
Buggy source:
@Override public Vec3f getDetailHeatMapPosition(int heatMapID){
  return hashHeatMapPositions.get(heatMapID);
}

Fixed version (ground truth):
@Override public Vec3f getDetailHeatMapPosition(int heatMapID){
  if (hashHeatMapPositions == null)   return new Vec3f(0,0,0);
  return hashHeatMapPositions.get(heatMapID);
}
Program: 58390
Project: 58390
Buggy source:
@Override public float getDetailHeatMapHeight(int heatMapID){
  return hashHeatMapHeights.get(heatMapID);
}

Fixed version (ground truth):
@Override public float getDetailHeatMapHeight(int heatMapID){
  if (hashHeatMapHeights == null)   return 0;
  return hashHeatMapHeights.get(heatMapID);
}
Program: 58392
Project: 58392
Buggy source:
@Override public void drawActiveElements(GL gl){
  for (  HeatMapWrapper heatMapWrapper : heatMapWrappers) {
    if (heatMapWrapper.handleDragging(gl,glMouseListener)) {
      view.setDisplayListDirty();
    }
  }
  for (  HeatMapWrapper heatMapWrapper : heatMapWrappers) {
    if (heatMapWrapper.isNewSelection()) {
      for (      HeatMapWrapper wrapper : heatMapWrappers) {
        if (wrapper != heatMapWrapper) {
          wrapper.choosePassiveHeatMaps(heatMapWrapper.getContentVAsOfHeatMaps(true));
        }
      }
      view.setDisplayListDirty();
      break;
    }
  }
  for (  HeatMapWrapper heatMapWrapper : heatMapWrappers) {
    heatMapWrapper.drawRemoteItems(gl,glMouseListener,pickingManager);
  }
}

Fixed version (ground truth):
@Override public void drawActiveElements(GL gl){
  for (  HeatMapWrapper heatMapWrapper : heatMapWrappers) {
    if (heatMapWrapper.handleDragging(gl,glMouseListener)) {
      view.setDisplayListDirty();
    }
  }
  for (  HeatMapWrapper heatMapWrapper : heatMapWrappers) {
    if (heatMapWrapper.isNewSelection()) {
      for (      HeatMapWrapper wrapper : heatMapWrappers) {
        if (wrapper != heatMapWrapper) {
          wrapper.choosePassiveHeatMaps(heatMapWrapper.getContentVAsOfHeatMaps(true),true,true);
        }
      }
      view.setDisplayListDirty();
      break;
    }
  }
  for (  HeatMapWrapper heatMapWrapper : heatMapWrappers) {
    heatMapWrapper.drawRemoteItems(gl,glMouseListener,pickingManager);
  }
}
Program: 58393
Project: 58393
Buggy source:
public ArrayList<GLHeatMap> getHeatMaps(){
  ArrayList<GLHeatMap> heatMaps=new ArrayList<GLHeatMap>();
  for (  Group group : selectedGroups.keySet()) {
    GLHeatMap heatMap=hashHeatMaps.get(group.getGroupIndex());
    heatMaps.add(heatMap);
  }
  return heatMaps;
}

Fixed version (ground truth):
public Collection<GLHeatMap> getHeatMaps(boolean considerSelections){
  if (considerSelections) {
    ArrayList<GLHeatMap> heatMaps=new ArrayList<GLHeatMap>();
    for (    Group group : selectedGroups.keySet()) {
      GLHeatMap heatMap=hashHeatMaps.get(group.getGroupIndex());
      heatMaps.add(heatMap);
    }
    return heatMaps;
  }
  return hashHeatMaps.values();
}
Program: 58394
Project: 58394
Buggy source:
protected void renderDetailBandRelations(GL gl,HeatMapWrapper leftHeatMapWrapper,HeatMapWrapper rightHeatMapWrapper){
  detailBands=new ArrayList<DetailBand>();
  calculateDetailBands(leftHeatMapWrapper,rightHeatMapWrapper);
  for (  DetailBand detailBand : detailBands) {
    ArrayList<Integer> contentIDs=detailBand.getContentIDs();
    if (contentIDs.size() < 2)     continue;
    renderSingleDetailBand(gl,detailBand,false);
  }
  for (  DetailBand detailBand : detailBands) {
    ArrayList<Integer> contentIDs=detailBand.getContentIDs();
    if (contentIDs.size() == 1) {
      int contentID=contentIDs.get(0);
      Vec3f leftTopPos=contentIDToLeftDetailPoints.get(contentID);
      Vec3f rightTopPos=contentIDToRightDetailPoints.get(contentID);
      if (leftTopPos == null || rightTopPos == null)       return;
      float bundlingOffsetX=0.1f;
      rightTopPos.setX(rightTopPos.x() + bundlingOffsetX);
      leftTopPos.setX(leftTopPos.x() - bundlingOffsetX);
      renderSingleDetailRelation(gl,contentIDs.get(0),leftTopPos,rightTopPos);
    }
  }
}

Fixed version (ground truth):
protected void renderDetailBandRelations(GL gl,HeatMapWrapper leftHeatMapWrapper,HeatMapWrapper rightHeatMapWrapper){
  detailBands=new ArrayList<DetailBand>();
  calculateDetailBands(leftHeatMapWrapper,rightHeatMapWrapper,true);
  for (  DetailBand detailBand : detailBands) {
    ArrayList<Integer> contentIDs=detailBand.getContentIDs();
    if (contentIDs.size() < 2)     continue;
    renderSingleDetailBand(gl,detailBand,false);
  }
  for (  DetailBand detailBand : detailBands) {
    ArrayList<Integer> contentIDs=detailBand.getContentIDs();
    if (contentIDs.size() == 1) {
      int contentID=contentIDs.get(0);
      Vec3f leftTopPos=contentIDToLeftDetailPoints.get(contentID);
      Vec3f rightTopPos=contentIDToRightDetailPoints.get(contentID);
      if (leftTopPos == null || rightTopPos == null)       return;
      float bundlingOffsetX=0.1f;
      rightTopPos.setX(rightTopPos.x() + bundlingOffsetX);
      leftTopPos.setX(leftTopPos.x() - bundlingOffsetX);
      renderSingleDetailRelation(gl,contentIDs.get(0),leftTopPos,rightTopPos);
    }
  }
}
Program: 58395
Project: 58395
Buggy source:
public ACompareViewState(GLCompare view,int viewID,TextRenderer textRenderer,TextureManager textureManager,PickingManager pickingManager,GLMouseListener glMouseListener,SetBar setBar,RenderCommandFactory renderCommandFactory,EDataDomain dataDomain,IUseCase useCase,DragAndDropController dragAndDropController,CompareViewStateController compareViewStateController){
  this.view=view;
  this.viewID=viewID;
  this.textRenderer=textRenderer;
  this.textureManager=textureManager;
  this.pickingManager=pickingManager;
  this.glMouseListener=glMouseListener;
  this.setBar=setBar;
  this.renderCommandFactory=renderCommandFactory;
  this.dataDomain=dataDomain;
  this.useCase=useCase;
  this.dragAndDropController=dragAndDropController;
  this.compareViewStateController=compareViewStateController;
  heatMapWrappers=new ArrayList<HeatMapWrapper>();
  layouts=new ArrayList<AHeatMapLayout>();
  setsInFocus=new ArrayList<ISet>();
  setsChanged=false;
  eventPublisher=GeneralManager.get().getEventPublisher();
  compareConnectionRenderer=new CompareConnectionBandRenderer();
  contentIDToLeftDetailPoints=new HashMap<Integer,Vec3f>();
  contentIDToRightDetailPoints=new HashMap<Integer,Vec3f>();
}

Fixed version (ground truth):
public ACompareViewState(GLCompare view,int viewID,TextRenderer textRenderer,TextureManager textureManager,PickingManager pickingManager,GLMouseListener glMouseListener,SetBar setBar,RenderCommandFactory renderCommandFactory,EDataDomain dataDomain,IUseCase useCase,DragAndDropController dragAndDropController,CompareViewStateController compareViewStateController){
  this.view=view;
  this.viewID=viewID;
  this.textRenderer=textRenderer;
  this.textureManager=textureManager;
  this.pickingManager=pickingManager;
  this.glMouseListener=glMouseListener;
  this.setBar=setBar;
  this.renderCommandFactory=renderCommandFactory;
  this.dataDomain=dataDomain;
  this.useCase=useCase;
  this.dragAndDropController=dragAndDropController;
  this.compareViewStateController=compareViewStateController;
  heatMapWrappers=new ArrayList<HeatMapWrapper>();
  layouts=new ArrayList<AHeatMapLayout>();
  setsInFocus=new ArrayList<ISet>();
  setsChanged=false;
  eventPublisher=GeneralManager.get().getEventPublisher();
  compareConnectionRenderer=new CompareConnectionBandRenderer();
  contentIDToLeftDetailPoints=new HashMap<Integer,Vec3f>();
  contentIDToRightDetailPoints=new HashMap<Integer,Vec3f>();
  SelectionTypeEvent selectionTypeEvent=new SelectionTypeEvent(activeHeatMapSelectionType);
  eventPublisher.triggerEvent(selectionTypeEvent);
}
Program: 58397
Project: 58397
Buggy source:
protected float setRelationColor(GL gl,HeatMapWrapper heatMapWrapper,int contentID){
  SelectionType type=heatMapWrapper.getContentSelectionManager().getSelectionTypes(contentID).get(0);
  float z=type.getPriority();
  float[] typeColor=type.getColor();
  float alpha=0;
  if (type == SelectionType.MOUSE_OVER) {
    gl.glLineWidth(2);
    alpha=1f;
    z=0.6f;
  }
 else   if (type == SelectionType.SELECTION) {
    gl.glLineWidth(2);
    alpha=1f;
    z=0.6f;
  }
 else {
    gl.glLineWidth(1);
    alpha=0.4f;
    z=0.4f;
  }
  typeColor[3]=alpha;
  gl.glColor4fv(typeColor,0);
  return z;
}

Fixed version (ground truth):
protected float setRelationColor(GL gl,HeatMapWrapper heatMapWrapper,int contentID){
  SelectionType type=heatMapWrapper.getContentSelectionManager().getSelectionTypes(contentID).get(0);
  float z=type.getPriority();
  float[] typeColor=type.getColor();
  float alpha=0;
  if (type == activeHeatMapSelectionType) {
    gl.glLineWidth(1);
    alpha=0.4f;
    z=0.4f;
  }
 else   if (type == SelectionType.MOUSE_OVER) {
    gl.glLineWidth(2);
    alpha=1f;
    z=0.6f;
  }
 else   if (type == SelectionType.SELECTION) {
    gl.glLineWidth(2);
    alpha=1f;
    z=0.6f;
  }
 else {
    gl.glLineWidth(1);
    alpha=0.4f;
    z=0.4f;
  }
  typeColor[3]=alpha;
  gl.glColor4fv(typeColor,0);
  return z;
}
Program: 58399
Project: 58399
Buggy source:
private void renderDetailRelations(GL gl){
  if (setsInFocus == null || setsInFocus.size() == 0)   return;
  detailBands=new ArrayList<DetailBand>();
  calculateDetailBands(heatMapWrappers.get(0),heatMapWrappers.get(1));
  determineActiveBand();
  for (  DetailBand detailBand : detailBands) {
    ArrayList<Integer> contentIDs=detailBand.getContentIDs();
    if (contentIDs.size() < 2 || detailBand == activeBand)     continue;
    renderSingleDetailBand(gl,detailBand,false);
  }
  if (activeBand != null)   renderSingleDetailBand(gl,activeBand,true);
  HeatMapWrapper leftHeatMapWrapper=heatMapWrappers.get(0);
  for (  ContentVirtualArray contentVA : leftHeatMapWrapper.getContentVAsOfHeatMaps(true)) {
    for (    Integer contentID : contentVA) {
      if (activeBand != null && activeBand.getContentIDs().contains(contentID))       renderSingleDetailRelation(gl,contentID);
    }
  }
  for (  DetailBand detailBand : detailBands) {
    if (detailBand.getContentIDs().size() == 1) {
      renderSingleDetailRelation(gl,detailBand.getContentIDs().get(0));
      continue;
    }
  }
}

Fixed version (ground truth):
private void renderDetailRelations(GL gl){
  if (setsInFocus == null || setsInFocus.size() == 0)   return;
  detailBands=new ArrayList<DetailBand>();
  calculateDetailBands(heatMapWrappers.get(0),heatMapWrappers.get(1),true);
  determineActiveBand();
  for (  DetailBand detailBand : detailBands) {
    ArrayList<Integer> contentIDs=detailBand.getContentIDs();
    if (contentIDs.size() < 2 || detailBand == activeBand)     continue;
    renderSingleDetailBand(gl,detailBand,false);
  }
  if (activeBand != null)   renderSingleDetailBand(gl,activeBand,true);
  HeatMapWrapper leftHeatMapWrapper=heatMapWrappers.get(0);
  for (  ContentVirtualArray contentVA : leftHeatMapWrapper.getContentVAsOfHeatMaps(true)) {
    for (    Integer contentID : contentVA) {
      if (activeBand != null && activeBand.getContentIDs().contains(contentID))       renderSingleDetailRelation(gl,contentID);
    }
  }
  for (  DetailBand detailBand : detailBands) {
    if (detailBand.getContentIDs().size() == 1) {
      renderSingleDetailRelation(gl,detailBand.getContentIDs().get(0));
      continue;
    }
  }
}
Program: 58400
Project: 58400
Buggy source:
private void renderOverviewToDetailRelations(GL gl,HeatMapWrapper heatMapWrapper){
  for (  GLHeatMap heatMap : heatMapWrapper.getHeatMaps()) {
    boolean highlight=false;
    ContentSelectionManager contentSelectionManager=heatMapWrapper.getContentSelectionManager();
    for (    Integer contentID : heatMap.getContentVA()) {
      SelectionType type=contentSelectionManager.getSelectionTypes(contentID).get(0);
      if (type == SelectionType.MOUSE_OVER) {
        highlight=true;
        break;
      }
    }
    renderOverviewToDetailBand(gl,heatMap,heatMapWrapper,highlight);
    if (highlight)     renderSingleOverviewToDetailRelation(gl,heatMap,heatMapWrapper);
  }
}

Fixed version (ground truth):
private void renderOverviewToDetailRelations(GL gl,HeatMapWrapper heatMapWrapper){
  for (  GLHeatMap heatMap : heatMapWrapper.getHeatMaps(true)) {
    boolean highlight=false;
    ContentSelectionManager contentSelectionManager=heatMapWrapper.getContentSelectionManager();
    for (    Integer contentID : heatMap.getContentVA()) {
      SelectionType type=contentSelectionManager.getSelectionTypes(contentID).get(0);
      if (type == SelectionType.MOUSE_OVER) {
        highlight=true;
        break;
      }
    }
    renderOverviewToDetailBand(gl,heatMap,heatMapWrapper,highlight);
    if (highlight)     renderSingleOverviewToDetailRelation(gl,heatMap,heatMapWrapper);
  }
}
Program: 58401
Project: 58401
Buggy source:
@Override public void init(GL gl){
  activeHeatMapSelectionType=new SelectionType("String_Node_Str",new float[]{0.0f,0.0f,0.0f,1.0f},true,false,1f);
  SelectionTypeEvent selectionTypeEvent=new SelectionTypeEvent(activeHeatMapSelectionType);
  eventPublisher.triggerEvent(selectionTypeEvent);
  compareConnectionRenderer.init(gl);
  setsChanged=false;
}

Fixed version (ground truth):
@Override public void init(GL gl){
  compareConnectionRenderer.init(gl);
  setsChanged=false;
}
Program: 58402
Project: 58402
Buggy source:
@Override public void setSetsInFocus(ArrayList<ISet> setsInFocus){
  if (setsInFocus.size() >= getMinSetsInFocus() && setsInFocus.size() <= getMaxSetsInFocus()) {
    this.setsInFocus=setsInFocus;
    if (layouts.isEmpty() || setsInFocus.size() != layouts.size()) {
      layouts.clear();
      heatMapWrappers.clear();
      int heatMapWrapperID=0;
      for (      ISet set : setsInFocus) {
        AHeatMapLayout layout=null;
        if (heatMapWrapperID == 0) {
          layout=new HeatMapLayoutOverviewLeft(renderCommandFactory);
        }
 else         if (heatMapWrapperID == setsInFocus.size() - 1) {
          layout=new HeatMapLayoutOverviewRight(renderCommandFactory);
        }
 else {
          layout=new HeatMapLayoutOverviewMid(renderCommandFactory);
        }
        layouts.add(layout);
        HeatMapWrapper heatMapWrapper=new HeatMapWrapper(heatMapWrapperID,layout,view,null,useCase,view,dataDomain);
        heatMapWrappers.add(heatMapWrapper);
        heatMapWrapperID++;
      }
    }
    for (int i=0; i < heatMapWrappers.size(); i++) {
      HeatMapWrapper heatMapWrapper=heatMapWrappers.get(i);
      heatMapWrapper.setSet(setsInFocus.get(i));
    }
    setsChanged=true;
    numSetsInFocus=setsInFocus.size();
    view.setDisplayListDirty();
  }
}

Fixed version (ground truth):
@Override public void setSetsInFocus(ArrayList<ISet> setsInFocus){
  if (setsInFocus.size() >= getMinSetsInFocus() && setsInFocus.size() <= getMaxSetsInFocus()) {
    this.setsInFocus=setsInFocus;
    if (layouts.isEmpty() || setsInFocus.size() != layouts.size()) {
      layouts.clear();
      heatMapWrappers.clear();
      int heatMapWrapperID=0;
      for (      ISet set : setsInFocus) {
        AHeatMapLayout layout=null;
        if (heatMapWrapperID == 0) {
          layout=new HeatMapLayoutOverviewLeft(renderCommandFactory);
        }
 else         if (heatMapWrapperID == setsInFocus.size() - 1) {
          layout=new HeatMapLayoutOverviewRight(renderCommandFactory);
        }
 else {
          layout=new HeatMapLayoutOverviewMid(renderCommandFactory);
        }
        layouts.add(layout);
        HeatMapWrapper heatMapWrapper=new HeatMapWrapper(heatMapWrapperID,layout,view,null,useCase,view,dataDomain);
        heatMapWrapper.setActiveHeatMapSelectionType(activeHeatMapSelectionType);
        heatMapWrappers.add(heatMapWrapper);
        heatMapWrapperID++;
      }
    }
    for (int i=0; i < heatMapWrappers.size(); i++) {
      HeatMapWrapper heatMapWrapper=heatMapWrappers.get(i);
      heatMapWrapper.setSet(setsInFocus.get(i));
    }
    setsChanged=true;
    numSetsInFocus=setsInFocus.size();
    view.setDisplayListDirty();
  }
}
Program: 58403
Project: 58403
Buggy source:
public OverviewState(GLCompare view,int viewID,TextRenderer textRenderer,TextureManager textureManager,PickingManager pickingManager,GLMouseListener glMouseListener,SetBar setBar,RenderCommandFactory renderCommandFactory,EDataDomain dataDomain,IUseCase useCase,DragAndDropController dragAndDropController,CompareViewStateController compareViewStateController){
  super(view,viewID,textRenderer,textureManager,pickingManager,glMouseListener,setBar,renderCommandFactory,dataDomain,useCase,dragAndDropController,compareViewStateController);
  this.setBar.setPosition(new Vec3f(0.0f,0.0f,0.5f));
  numSetsInFocus=4;
}

Fixed version (ground truth):
public OverviewState(GLCompare view,int viewID,TextRenderer textRenderer,TextureManager textureManager,PickingManager pickingManager,GLMouseListener glMouseListener,SetBar setBar,RenderCommandFactory renderCommandFactory,EDataDomain dataDomain,IUseCase useCase,DragAndDropController dragAndDropController,CompareViewStateController compareViewStateController){
  super(view,viewID,textRenderer,textureManager,pickingManager,glMouseListener,setBar,renderCommandFactory,dataDomain,useCase,dragAndDropController,compareViewStateController);
  this.setBar.setPosition(new Vec3f(0.0f,0.0f,0.0f));
  numSetsInFocus=4;
}
Program: 58405
Project: 58405
Buggy source:
@Override public int indexOf(int iElement){
  if (isHashIDToIndexDirty)   buildIDMap();
  ArrayList<Integer> results=hashIDToIndex.get(iElement);
  if (results != null)   return results.get(0);
 else   return -1;
}

Fixed version (ground truth):
@Override public int indexOf(int iElement){
  if (isHashIDToIndexDirty)   buildIDMap();
  ArrayList<Integer> results=hashIDToIndex.get(iElement);
  if (results != null) {
    if (results.size() > 1)     System.out.println("String_Node_Str");
    return results.get(0);
  }
 else   return -1;
}
Program: 58409
Project: 58409
Buggy source:
@Override public void buildDisplayList(GL gl){
  gl.glEnable(GL.GL_BLEND);
  gl.glBlendFunc(GL.GL_SRC_ALPHA,GL.GL_ONE_MINUS_SRC_ALPHA);
  for (  HeatMapWrapper heatMapWrapper : heatMapWrappers) {
    heatMapWrapper.drawLocalItems(gl,textureManager,pickingManager,glMouseListener,viewID);
  }
  IViewFrustum viewFrustum=view.getViewFrustum();
  setBar.setWidth(viewFrustum.getWidth());
  setBar.render(gl);
  renderOverviewToDetailRelations(gl);
  renderDetailRelations(gl);
  if (heatMapWrappers.get(0).getContentVAsOfHeatMaps().size() == 0) {
    renderTree(gl,heatMapWrappers.get(0),heatMapWrappers.get(1));
    renderOverviewRelations(gl,heatMapWrappers.get(0),heatMapWrappers.get(1));
  }
}

Fixed version (ground truth):
@Override public void buildDisplayList(GL gl){
  for (  HeatMapWrapper heatMapWrapper : heatMapWrappers) {
    heatMapWrapper.drawLocalItems(gl,textureManager,pickingManager,glMouseListener,viewID);
  }
  gl.glEnable(GL.GL_BLEND);
  gl.glBlendFunc(GL.GL_SRC_ALPHA,GL.GL_ONE_MINUS_SRC_ALPHA);
  IViewFrustum viewFrustum=view.getViewFrustum();
  setBar.setWidth(viewFrustum.getWidth());
  setBar.render(gl);
  renderOverviewToDetailRelations(gl);
  renderDetailRelations(gl);
  if (heatMapWrappers.get(0).getContentVAsOfHeatMaps().size() == 0) {
    renderTree(gl,heatMapWrappers.get(0),heatMapWrappers.get(1));
    renderOverviewRelations(gl,heatMapWrappers.get(0),heatMapWrappers.get(1));
  }
}
Program: 58410
Project: 58410
Buggy source:
public void setGroupsToCompare(final ArrayList<ISet> sets){
  ClusterState clusterState=new ClusterState();
  clusterState.setClustererAlgo(EClustererAlgo.AFFINITY_PROPAGATION);
  clusterState.setClustererType(EClustererType.GENE_CLUSTERING);
  clusterState.setAffinityPropClusterFactorGenes(8);
  clusterState.setDistanceMeasure(EDistanceMeasure.EUCLIDEAN_DISTANCE);
  for (  ISet set : sets) {
    set.cluster(clusterState);
  }
  compareViewStateController.setSetsToCompare(sets);
}

Fixed version (ground truth):
public void setGroupsToCompare(final ArrayList<ISet> sets){
  ClusterState clusterState=new ClusterState();
  clusterState.setClustererAlgo(EClustererAlgo.AFFINITY_PROPAGATION);
  clusterState.setClustererType(EClustererType.GENE_CLUSTERING);
  clusterState.setAffinityPropClusterFactorGenes(5);
  clusterState.setDistanceMeasure(EDistanceMeasure.EUCLIDEAN_DISTANCE);
  for (  ISet set : sets) {
    set.cluster(clusterState);
  }
  compareViewStateController.setSetsToCompare(sets);
}
Program: 58413
Project: 58413
Buggy source:
private float setRelationColor(GL gl,HeatMapWrapper heatMapWrapper,int contentID){
  SelectionType type=heatMapWrapper.getContentSelectionManager().getSelectionTypes(contentID).get(0);
  float z=type.getPriority();
  float[] typeColor=type.getColor();
  float alpha=0.2f;
  if (type == activeHeatMapSelectionType) {
    gl.glLineWidth(1);
    alpha=0.4f;
    z=0.4f;
  }
 else   if (type == SelectionType.MOUSE_OVER || type == SelectionType.SELECTION) {
    gl.glLineWidth(2);
    alpha=1f;
    z=0.5f;
  }
 else {
    gl.glLineWidth(1);
    alpha=0.4f;
    z=0.4f;
  }
  typeColor[3]=alpha;
  gl.glColor4fv(typeColor,0);
  return z;
}

Fixed version (ground truth):
private float setRelationColor(GL gl,HeatMapWrapper heatMapWrapper,int contentID){
  SelectionType type=heatMapWrapper.getContentSelectionManager().getSelectionTypes(contentID).get(0);
  float z=type.getPriority();
  float[] typeColor=type.getColor();
  float alpha=0.2f;
  if (type == activeHeatMapSelectionType) {
    gl.glLineWidth(1);
    alpha=0.4f;
    z=0.4f;
  }
 else   if (type == SelectionType.MOUSE_OVER || type == SelectionType.SELECTION) {
    gl.glLineWidth(2);
    alpha=1f;
    z=0.5f;
  }
 else {
    gl.glLineWidth(1);
    alpha=0.4f;
    z=0.2f;
  }
  typeColor[3]=alpha;
  gl.glColor4fv(typeColor,0);
  return z;
}
Program: 58414
Project: 58414
Buggy source:
@Override public void display(GL gl){
  compareViewStateController.drawActiveElements(gl);
  if (bIsDisplayListDirtyLocal) {
    bIsDisplayListDirtyLocal=false;
    buildDisplayList(gl,iGLDisplayListIndexLocal);
    iGLDisplayListToCall=iGLDisplayListIndexLocal;
  }
  gl.glCallList(iGLDisplayListToCall);
  if (!isRenderedRemote())   contextMenu.render(gl,this);
  checkForHits(gl);
}

Fixed version (ground truth):
@Override public void display(GL gl){
  compareViewStateController.drawActiveElements(gl);
  if (bIsDisplayListDirtyLocal) {
    bIsDisplayListDirtyLocal=false;
    buildDisplayList(gl,iGLDisplayListIndexLocal);
    iGLDisplayListToCall=iGLDisplayListIndexLocal;
  }
  gl.glCallList(iGLDisplayListToCall);
  compareViewStateController.handleDragging(gl);
  if (!isRenderedRemote())   contextMenu.render(gl,this);
  checkForHits(gl);
}
Program: 58415
Project: 58415
Buggy source:
public SetBarItem(int id,int viewID,PickingManager pickingManager,TextRenderer textRenderer,SetBar setBar){
  this.id=id;
  this.viewID=viewID;
  this.pickingManager=pickingManager;
  this.textRenderer=textRenderer;
  this.setBar=setBar;
  hashSelectionColors=new HashMap<Integer,float[]>();
  hashSelectionColors.put(SELECTION_STATUS_NORMAL,new float[]{0.5f,0.5f,0.5f,1.0f});
  hashSelectionColors.put(SELECTION_STATUS_MOUSE_OVER,SelectionType.MOUSE_OVER.getColor());
  hashSelectionColors.put(SELECTION_STATUS_DRAGGED,SelectionType.MOUSE_OVER.getColor());
}

Fixed version (ground truth):
public SetBarItem(int id,int viewID,PickingManager pickingManager,TextRenderer textRenderer,SetBar setBar){
  this.id=id;
  this.viewID=viewID;
  this.pickingManager=pickingManager;
  this.textRenderer=textRenderer;
  this.setBar=setBar;
  hashSelectionColors=new HashMap<Integer,float[]>();
  hashSelectionColors.put(SELECTION_STATUS_NORMAL,new float[]{0.5f,0.5f,0.5f,1.0f});
  float[] mouseOverColor=SelectionType.MOUSE_OVER.getColor();
  hashSelectionColors.put(SELECTION_STATUS_MOUSE_OVER,mouseOverColor);
  hashSelectionColors.put(SELECTION_STATUS_DRAGGED,new float[]{mouseOverColor[0],mouseOverColor[1],mouseOverColor[2],0.5f});
}
Program: 58416
Project: 58416
Buggy source:
@Override public void handleDragging(GL gl,float mouseCoordinateX,float mouseCoordinateY){
  float draggedPositionX=mouseCoordinateX + draggingSpacingX;
  float draggedPositionY=mouseCoordinateY + draggingSpacingY;
  gl.glPushAttrib(GL.GL_COLOR_BUFFER_BIT);
  gl.glBlendFunc(GL.GL_SRC_ALPHA,GL.GL_ONE_MINUS_SRC_ALPHA);
  renderItemBody(gl,SELECTION_STATUS_DRAGGED,draggedPositionX,draggedPositionY,1.0f);
  gl.glEnd();
  gl.glPopAttrib();
}

Fixed version (ground truth):
@Override public void handleDragging(GL gl,float mouseCoordinateX,float mouseCoordinateY){
  float draggedPositionX=mouseCoordinateX + draggingSpacingX;
  float draggedPositionY=mouseCoordinateY + draggingSpacingY;
  gl.glPushAttrib(GL.GL_COLOR_BUFFER_BIT);
  renderItemBody(gl,SELECTION_STATUS_DRAGGED,draggedPositionX,draggedPositionY,1.0f);
  gl.glEnd();
  gl.glPopAttrib();
}
Program: 58417
Project: 58417
Buggy source:
private void renderArrow(GL gl,Vec3f position,float arrowWidth,float alpha,boolean isLeft){
  Vec3f lowerLeftCorner=new Vec3f(position.x(),positionY,position.z() + 0.1f);
  Vec3f lowerRightCorner=new Vec3f(position.x() + arrowWidth,positionY,position.z() + 0.1f);
  Vec3f upperRightCorner=new Vec3f(position.x() + arrowWidth,positionY + height,position.z() + 0.1f);
  Vec3f upperLeftCorner=new Vec3f(position.x(),positionY + height,position.z() + 0.1f);
  if (isLeft) {
    textureManager.renderTexture(gl,EIconTextures.HEAT_MAP_ARROW,lowerRightCorner,upperRightCorner,upperLeftCorner,lowerLeftCorner,1,1,1,alpha);
  }
 else {
    textureManager.renderTexture(gl,EIconTextures.HEAT_MAP_ARROW,upperLeftCorner,lowerLeftCorner,lowerRightCorner,upperRightCorner,1,1,1,alpha);
  }
}

Fixed version (ground truth):
private void renderArrow(GL gl,Vec3f position,float arrowWidth,float alpha,boolean isLeft,float zOffset){
  Vec3f lowerLeftCorner=new Vec3f(position.x(),positionY,position.z() + zOffset);
  Vec3f lowerRightCorner=new Vec3f(position.x() + arrowWidth,positionY,position.z() + zOffset);
  Vec3f upperRightCorner=new Vec3f(position.x() + arrowWidth,positionY + height,position.z() + zOffset);
  Vec3f upperLeftCorner=new Vec3f(position.x(),positionY + height,position.z() + zOffset);
  if (isLeft) {
    textureManager.renderTexture(gl,EIconTextures.HEAT_MAP_ARROW,lowerRightCorner,upperRightCorner,upperLeftCorner,lowerLeftCorner,1,1,1,alpha);
  }
 else {
    textureManager.renderTexture(gl,EIconTextures.HEAT_MAP_ARROW,upperLeftCorner,lowerLeftCorner,lowerRightCorner,upperRightCorner,1,1,1,alpha);
  }
}