Program: 93039
Project: 93039
Buggy source:
/** 
 * Draws with the given modes.
 * @param drawMode
 * @param animationMode
 * @param id
 */
public void draw(int drawMode,int animationMode,int id){
  setDrawMode(drawMode);
  setAnimationMode(animationMode);
  this.clearSelection();
  this.setRedraw(false);
  if (draw_mode == CONSTANT_DRAWMODE_RADIAL) {
    GridData gd=(GridData)thumbCanvas.getLayoutData();
    gd.exclude=true;
    thumbCanvas.setLayoutData(gd);
    thumbCanvas.setVisible(false);
    CallgraphView.layout();
    gd=(GridData)treeComp.getLayoutData();
    gd.exclude=false;
    treeComp.setLayoutData(gd);
    treeComp.setVisible(true);
    treeViewer.collapseToLevel(getData(id),1);
    treeViewer.expandToLevel(getData(id),1);
  }
 else   if (draw_mode == CONSTANT_DRAWMODE_AGGREGATE) {
    GridData gd=(GridData)treeComp.getLayoutData();
    gd.exclude=true;
    treeComp.setLayoutData(gd);
    treeComp.setVisible(false);
    CallgraphView.layout();
    gd=(GridData)thumbCanvas.getLayoutData();
    gd.exclude=true;
    thumbCanvas.setLayoutData(gd);
    thumbCanvas.setVisible(false);
  }
 else {
    GridData gd=(GridData)treeComp.getLayoutData();
    gd.exclude=true;
    treeComp.setLayoutData(gd);
    treeComp.setVisible(false);
    CallgraphView.layout();
    gd=(GridData)thumbCanvas.getLayoutData();
    gd.exclude=true;
    thumbCanvas.setLayoutData(gd);
    thumbCanvas.setVisible(true);
    thumbCanvas.setBackground(this.getBackground());
  }
  this.setRedraw(true);
  if (draw_mode == CONSTANT_DRAWMODE_TREE) {
    if (animation_mode == CONSTANT_ANIMATION_SLOW) {
      if (nodeMap.get(id) == null)       nodeMap.put(id,getData(id).makeNode(this));
      int tempX=nodeMap.get(id).getLocation().x;
      int tempY=nodeMap.get(id).getLocation().y;
      Animation.markBegin();
      moveAllNodesTo(tempX,tempY);
      Animation.run(ANIMATION_TIME);
      deleteAll(id);
      setLevelLimits(id);
      rootVisibleNodeNumber=id;
      drawTree(id,this.getBounds().width / 2,20);
      currentPositionInLevel.clear();
      this.update();
      Animation.markBegin();
      drawTree(id,this.getBounds().width / 2,20);
      Animation.run(ANIMATION_TIME);
      getNode(id).unhighlight();
      currentPositionInLevel.clear();
    }
 else {
      deleteAll(id);
      setLevelLimits(id);
      rootVisibleNodeNumber=id;
      drawTree(id,this.getBounds().width / 2,20);
      getNode(id).unhighlight();
      currentPositionInLevel.clear();
    }
  }
 else   if (draw_mode == CONSTANT_DRAWMODE_RADIAL) {
    if (animation_mode == CONSTANT_ANIMATION_SLOW) {
      rootVisibleNodeNumber=id;
      deleteAll(id);
      preDrawRadial(id);
      this.redraw();
      this.getLightweightSystem().getUpdateManager().performUpdate();
      Animation.markBegin();
      nodeMap.get(id).setLocation(this.getBounds().width / 2,this.getBounds().height / 2);
      drawRadial(id);
      Animation.run(ANIMATION_TIME);
      CallgraphView.maximizeOrRefresh(false);
    }
 else {
      deleteAll(id);
      drawRadial(id);
    }
  }
 else   if (draw_mode == CONSTANT_DRAWMODE_BOX) {
    rootVisibleNodeNumber=id;
    if (animation_mode == CONSTANT_ANIMATION_SLOW) {
      if (nodeMap.get(id) == null)       nodeMap.put(id,getData(id).makeNode(this));
      Animation.markBegin();
      moveAllNodesTo(nodeMap.get(id).getLocation().x,nodeMap.get(id).getLocation().y);
      Animation.run(ANIMATION_TIME);
      deleteAll(id);
      drawBox(id,0,0);
    }
 else {
      if (nodeMap.get(id) == null)       nodeMap.put(id,getData(id).makeNode(this));
      deleteAll(id);
      drawBox(id,0,0);
    }
  }
 else   if (draw_mode == CONSTANT_DRAWMODE_AGGREGATE) {
    rootVisibleNodeNumber=getFirstUsefulNode();
    deleteAll(-1);
    drawAggregateView();
  }
  if (getNode(id) != null)   getNode(id).unhighlight();
  clearSelection();
}

Fixed version (ground truth):
/** 
 * Draws with the given modes.
 * @param drawMode
 * @param animationMode
 * @param id
 */
public void draw(int drawMode,int animationMode,int id){
  setDrawMode(drawMode);
  setAnimationMode(animationMode);
  this.clearSelection();
  this.setRedraw(false);
  if (draw_mode == CONSTANT_DRAWMODE_RADIAL) {
    GridData gd=(GridData)thumbCanvas.getLayoutData();
    gd.exclude=true;
    thumbCanvas.setLayoutData(gd);
    thumbCanvas.setVisible(false);
    CallgraphView.layout();
    gd=(GridData)treeComp.getLayoutData();
    gd.exclude=false;
    treeComp.setLayoutData(gd);
    treeComp.setVisible(true);
    treeViewer.collapseToLevel(getData(id),1);
    treeViewer.expandToLevel(getData(id),1);
  }
 else   if (draw_mode == CONSTANT_DRAWMODE_AGGREGATE) {
    GridData gd=(GridData)treeComp.getLayoutData();
    gd.exclude=true;
    treeComp.setLayoutData(gd);
    treeComp.setVisible(false);
    CallgraphView.layout();
    gd=(GridData)thumbCanvas.getLayoutData();
    gd.exclude=true;
    thumbCanvas.setLayoutData(gd);
    thumbCanvas.setVisible(false);
  }
 else {
    GridData gd=(GridData)treeComp.getLayoutData();
    gd.exclude=true;
    treeComp.setLayoutData(gd);
    treeComp.setVisible(false);
    CallgraphView.layout();
    gd=(GridData)thumbCanvas.getLayoutData();
    gd.exclude=true;
    thumbCanvas.setLayoutData(gd);
    thumbCanvas.setVisible(true);
    thumbCanvas.setBackground(this.getBackground());
  }
  this.setRedraw(true);
  if (draw_mode == CONSTANT_DRAWMODE_TREE) {
    if (animation_mode == CONSTANT_ANIMATION_SLOW) {
      if (nodeMap.get(id) == null)       nodeMap.put(id,getData(id).makeNode(this));
      int tempX=nodeMap.get(id).getLocation().x;
      int tempY=nodeMap.get(id).getLocation().y;
      Animation.markBegin();
      moveAllNodesTo(tempX,tempY);
      Animation.run(ANIMATION_TIME);
      deleteAll(id);
      setLevelLimits(id);
      rootVisibleNodeNumber=id;
      drawTree(id,this.getBounds().width / 2,20);
      currentPositionInLevel.clear();
      this.update();
      Animation.markBegin();
      drawTree(id,this.getBounds().width / 2,20);
      Animation.run(ANIMATION_TIME);
      getNode(id).unhighlight();
      currentPositionInLevel.clear();
    }
 else {
      deleteAll(id);
      setLevelLimits(id);
      rootVisibleNodeNumber=id;
      drawTree(id,this.getBounds().width / 2,20);
      getNode(id).unhighlight();
      currentPositionInLevel.clear();
    }
  }
 else   if (draw_mode == CONSTANT_DRAWMODE_RADIAL) {
    if (animation_mode == CONSTANT_ANIMATION_SLOW) {
      rootVisibleNodeNumber=id;
      deleteAll(id);
      preDrawRadial(id);
      this.redraw();
      this.getLightweightSystem().getUpdateManager().performUpdate();
      Animation.markBegin();
      nodeMap.get(id).setLocation(this.getBounds().width / 2,this.getBounds().height / 2);
      drawRadial(id);
      Animation.run(ANIMATION_TIME);
      CallgraphView.maximizeOrRefresh(false);
    }
 else {
      deleteAll(id);
      drawRadial(id);
    }
  }
 else   if (draw_mode == CONSTANT_DRAWMODE_BOX) {
    rootVisibleNodeNumber=id;
    if (animation_mode == CONSTANT_ANIMATION_SLOW) {
      if (nodeMap.get(id) == null)       nodeMap.put(id,getData(id).makeNode(this));
      Animation.markBegin();
      moveAllNodesTo(nodeMap.get(id).getLocation().x,nodeMap.get(id).getLocation().y);
      Animation.run(ANIMATION_TIME);
      deleteAll(id);
      drawBox(id,0,0);
    }
 else {
      if (nodeMap.get(id) == null)       nodeMap.put(id,getData(id).makeNode(this));
      deleteAll(id);
      drawBox(id,0,0);
    }
  }
 else   if (draw_mode == CONSTANT_DRAWMODE_AGGREGATE) {
    rootVisibleNodeNumber=getFirstUsefulNode();
    deleteAll(-1);
    drawAggregateView();
  }
  if (getNode(id) != null)   getNode(id).unhighlight();
  clearSelection();
  this.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true));
}