Program: 59234
Project: 59234
Buggy source:
protected void initToolbar(){
  refToolBar=new ToolBar(refSWTContainer,SWT.NONE);
  refToolBar.setBounds(0,0,iWidth,30);
  refAddEnzymeNodeItem=createToolItem(refToolBar,SWT.PUSH,"String_Node_Str",new Image(refSWTContainer.getDisplay(),"String_Node_Str"),null,"String_Node_Str");
  refZoomOrigItem=createToolItem(refToolBar,SWT.PUSH,"String_Node_Str",new Image(refSWTContainer.getDisplay(),"String_Node_Str"),null,"String_Node_Str");
  refZoomInItem=createToolItem(refToolBar,SWT.PUSH,"String_Node_Str",new Image(refSWTContainer.getDisplay(),"String_Node_Str"),null,"String_Node_Str");
  refZoomOutItem=createToolItem(refToolBar,SWT.PUSH,"String_Node_Str",new Image(refSWTContainer.getDisplay(),"String_Node_Str"),null,"String_Node_Str");
  refNeighbourItem=createToolItem(refToolBar,SWT.PUSH,"String_Node_Str",new Image(refSWTContainer.getDisplay(),"String_Node_Str"),null,"String_Node_Str");
  refShowOverviewMapItem=createToolItem(refToolBar,SWT.PUSH,"String_Node_Str",null,null,"String_Node_Str");
  refFilterEdgesItem=createToolItem(refToolBar,SWT.DROP_DOWN,"String_Node_Str",null,null,"String_Node_Str");
  final Menu filterEdgeMenu=new Menu(refSWTContainer.getShell(),SWT.POP_UP);
  MenuItem refShowRelationsItem=new MenuItem(filterEdgeMenu,SWT.CHECK);
  refShowRelationsItem.setText("String_Node_Str");
  refShowRelationsItem.setSelection(true);
  MenuItem refShowReactionsItem=new MenuItem(filterEdgeMenu,SWT.CHECK);
  refShowReactionsItem.setText("String_Node_Str");
  refShowReactionsItem.setSelection(true);
  refFilterEdgesItem.addListener(SWT.Selection,new Listener(){
    public void handleEvent(    Event event){
      Rectangle rect=refFilterEdgesItem.getBounds();
      Point pt=new Point(rect.x,rect.y + rect.height);
      pt=refToolBar.toDisplay(pt);
      filterEdgeMenu.setLocation(pt.x,pt.y);
      filterEdgeMenu.setVisible(true);
    }
  }
);
  Listener edgeFilterListener=new Listener(){
    public void handleEvent(    Event event){
      System.out.println("String_Node_Str" + event.widget.getClass().getSimpleName());
      if (!event.widget.getClass().getSimpleName().equals("String_Node_Str"))       return;
      MenuItem clickedMenuItem=((MenuItem)event.widget);
      if (((MenuItem)event.widget).getText().equals("String_Node_Str")) {
        refPathwayGraphViewRep.showRelationEdges(clickedMenuItem.getSelection());
      }
 else       if (((MenuItem)event.widget).getText().equals("String_Node_Str")) {
        System.out.println("String_Node_Str" + clickedMenuItem.getSelection());
        refPathwayGraphViewRep.showReactionEdges(clickedMenuItem.getSelection());
      }
    }
  }
;
  Listener toolbarListener=new Listener(){
    public void handleEvent(    Event event){
      ToolItem clickedToolItem=(ToolItem)event.widget;
      String sToolItemIdentifier=((String)clickedToolItem.getToolTipText());
      if (sToolItemIdentifier.equals("String_Node_Str")) {
        refPathwayGraphViewRep.zoomOrig();
      }
 else       if (sToolItemIdentifier.equals("String_Node_Str")) {
        refPathwayGraphViewRep.zoomIn();
      }
 else       if (sToolItemIdentifier.equals("String_Node_Str")) {
        refPathwayGraphViewRep.zoomOut();
      }
 else       if (sToolItemIdentifier.equals("String_Node_Str")) {
      }
 else       if (sToolItemIdentifier.equals("String_Node_Str")) {
        refPathwayGraphViewRep.showOverviewMapInNewWindow(new Dimension(250,250));
      }
    }
  }
;
  refZoomOrigItem.addListener(SWT.Selection,toolbarListener);
  refZoomInItem.addListener(SWT.Selection,toolbarListener);
  refZoomOutItem.addListener(SWT.Selection,toolbarListener);
  refNeighbourItem.addListener(SWT.Selection,toolbarListener);
  refShowOverviewMapItem.addListener(SWT.Selection,toolbarListener);
  refShowRelationsItem.addListener(SWT.Selection,edgeFilterListener);
  refShowReactionsItem.addListener(SWT.Selection,edgeFilterListener);
}

Fixed version (ground truth):
protected void initToolbar(){
  refToolBar=new ToolBar(refSWTContainer,SWT.NONE);
  refToolBar.setBounds(0,0,iWidth,30);
  refAddEnzymeNodeItem=createToolItem(refToolBar,SWT.PUSH,"String_Node_Str",new Image(refSWTContainer.getDisplay(),"String_Node_Str"),null,"String_Node_Str");
  refZoomOrigItem=createToolItem(refToolBar,SWT.PUSH,"String_Node_Str",new Image(refSWTContainer.getDisplay(),"String_Node_Str"),null,"String_Node_Str");
  refZoomInItem=createToolItem(refToolBar,SWT.PUSH,"String_Node_Str",new Image(refSWTContainer.getDisplay(),"String_Node_Str"),null,"String_Node_Str");
  refZoomOutItem=createToolItem(refToolBar,SWT.PUSH,"String_Node_Str",new Image(refSWTContainer.getDisplay(),"String_Node_Str"),null,"String_Node_Str");
  refNeighbourItem=createToolItem(refToolBar,SWT.PUSH,"String_Node_Str",new Image(refSWTContainer.getDisplay(),"String_Node_Str"),null,"String_Node_Str");
  refShowOverviewMapItem=createToolItem(refToolBar,SWT.PUSH,"String_Node_Str",null,null,"String_Node_Str");
  refFilterEdgesItem=createToolItem(refToolBar,SWT.DROP_DOWN,"String_Node_Str",null,null,"String_Node_Str");
  final Menu filterEdgeMenu=new Menu(refSWTContainer.getShell(),SWT.POP_UP);
  MenuItem refShowRelationsItem=new MenuItem(filterEdgeMenu,SWT.CHECK);
  refShowRelationsItem.setText("String_Node_Str");
  refShowRelationsItem.setSelection(true);
  MenuItem refShowReactionsItem=new MenuItem(filterEdgeMenu,SWT.CHECK);
  refShowReactionsItem.setText("String_Node_Str");
  refShowReactionsItem.setSelection(true);
  refFilterEdgesItem.addListener(SWT.Selection,new Listener(){
    public void handleEvent(    Event event){
      Rectangle rect=refFilterEdgesItem.getBounds();
      Point pt=new Point(rect.x,rect.y + rect.height);
      pt=refToolBar.toDisplay(pt);
      filterEdgeMenu.setLocation(pt.x,pt.y);
      filterEdgeMenu.setVisible(true);
    }
  }
);
  Listener edgeFilterListener=new Listener(){
    public void handleEvent(    Event event){
      if (!event.widget.getClass().getSimpleName().equals("String_Node_Str")) {
        return;
      }
      MenuItem clickedMenuItem=((MenuItem)event.widget);
      if (((MenuItem)event.widget).getText().equals("String_Node_Str")) {
        refPathwayGraphViewRep.showRelationEdges(clickedMenuItem.getSelection());
      }
 else       if (((MenuItem)event.widget).getText().equals("String_Node_Str")) {
        refPathwayGraphViewRep.showReactionEdges(clickedMenuItem.getSelection());
      }
    }
  }
;
  Listener toolbarListener=new Listener(){
    public void handleEvent(    Event event){
      ToolItem clickedToolItem=(ToolItem)event.widget;
      String sToolItemIdentifier=((String)clickedToolItem.getToolTipText());
      if (sToolItemIdentifier.equals("String_Node_Str")) {
        refPathwayGraphViewRep.zoomOrig();
      }
 else       if (sToolItemIdentifier.equals("String_Node_Str")) {
        refPathwayGraphViewRep.zoomIn();
      }
 else       if (sToolItemIdentifier.equals("String_Node_Str")) {
        refPathwayGraphViewRep.zoomOut();
      }
 else       if (sToolItemIdentifier.equals("String_Node_Str")) {
        NumberInputDialog neighbourhoodInputDialog=new NumberInputDialog(refSWTContainer.getShell());
        refPathwayGraphViewRep.setNeighbourhoodDistance(neighbourhoodInputDialog.open());
      }
 else       if (sToolItemIdentifier.equals("String_Node_Str")) {
        refPathwayGraphViewRep.showOverviewMapInNewWindow(new Dimension(250,250));
      }
    }
  }
;
  refZoomOrigItem.addListener(SWT.Selection,toolbarListener);
  refZoomInItem.addListener(SWT.Selection,toolbarListener);
  refZoomOutItem.addListener(SWT.Selection,toolbarListener);
  refNeighbourItem.addListener(SWT.Selection,toolbarListener);
  refShowOverviewMapItem.addListener(SWT.Selection,toolbarListener);
  refShowRelationsItem.addListener(SWT.Selection,edgeFilterListener);
  refShowReactionsItem.addListener(SWT.Selection,edgeFilterListener);
}