Program: 58750
Project: 58750
Buggy source:
private void close(){
  if (clusterProgressListener != null) {
    GeneralManager.get().getEventPublisher().removeListener(clusterProgressListener);
    clusterProgressListener=null;
  }
  if (!shell.isDisposed())   shell.close();
  if (algorithmType == EClustererAlgo.TREE_CLUSTERER || algorithmType == EClustererAlgo.COBWEB_CLUSTERER) {
    GeneralManager.get().getGUIBridge().getDisplay().asyncExec(new Runnable(){
      public void run(){
        try {
          shell=new Shell();
          shell.setText(algorithmType.getName());
          shell.setImage(GeneralManager.get().getResourceLoader().getImage(shell.getDisplay(),"String_Node_Str"));
          Monitor primary=shell.getDisplay().getPrimaryMonitor();
          Rectangle bounds=primary.getBounds();
          Rectangle rect=shell.getBounds();
          int x=bounds.x + (bounds.width - rect.width) / 2;
          int y=bounds.y + (bounds.height - rect.height) / 2;
          shell.setLocation(x,y);
          Composite composite=new Composite(shell,SWT.NONE);
          composite.setLayout(new GridLayout(1,false));
          Label label=new Label(composite,SWT.NULL);
          label.setText("String_Node_Str");
          GridData gridData=new GridData(GridData.FILL_HORIZONTAL);
          gridData.widthHint=310;
          label.setLayoutData(gridData);
          Composite viewComposite=new Composite(composite,SWT.SHADOW_ETCHED_IN);
          viewComposite.setLayout(new RowLayout());
          Composite selectedViewsComposite=new Composite(viewComposite,SWT.SHADOW_ETCHED_IN);
          selectedViewsComposite.setLayout(new GridLayout());
          final Button[] buttonViews=new Button[2];
          buttonViews[0]=new Button(selectedViewsComposite,SWT.CHECK);
          buttonViews[0].setSelection(true);
          buttonViews[0].setText("String_Node_Str");
          buttonViews[0].setBounds(10,5,75,30);
          buttonViews[1]=new Button(selectedViewsComposite,SWT.CHECK);
          buttonViews[1].setSelection(true);
          buttonViews[1].setText("String_Node_Str");
          buttonViews[1].setBounds(10,5,75,30);
          buttonViews[0].addSelectionListener(new SelectionAdapter(){
            @Override public void widgetSelected(            SelectionEvent e){
              bOpenDendrogram=(bOpenDendrogram == true) ? false : true;
            }
          }
);
          buttonViews[1].addSelectionListener(new SelectionAdapter(){
            @Override public void widgetSelected(            SelectionEvent e){
              bOpenRadialHierarchy=(bOpenRadialHierarchy == true) ? false : true;
            }
          }
);
          Composite buttonComposite=new Composite(viewComposite,SWT.SHADOW_ETCHED_IN);
          buttonComposite.setLayout(new RowLayout());
          Button okButton=new Button(buttonComposite,SWT.PUSH);
          okButton.setText("String_Node_Str");
          okButton.addSelectionListener(new SelectionAdapter(){
            @Override public void widgetSelected(            SelectionEvent e){
              try {
                if (clusterType == EClustererType.GENE_CLUSTERING) {
                  if (bOpenRadialHierarchy)                   PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView(GLRadialHierarchyView.ID);
                  if (bOpenDendrogram)                   PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView(GLDendrogramHorizontalView.ID);
                }
 else                 if (clusterType == EClustererType.EXPERIMENTS_CLUSTERING) {
                  if (bOpenDendrogram)                   PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView(GLDendrogramVerticalView.ID);
                }
 else                 if (clusterType == EClustererType.BI_CLUSTERING) {
                  if (bOpenRadialHierarchy)                   PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView(GLRadialHierarchyView.ID);
                  if (bOpenDendrogram) {
                    PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView(GLDendrogramHorizontalView.ID);
                    PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView(GLDendrogramVerticalView.ID);
                  }
                }
              }
 catch (              PartInitException e1) {
                e1.printStackTrace();
              }
              shell.close();
            }
          }
);
          Button cancelButton=new Button(buttonComposite,SWT.PUSH);
          cancelButton.setText("String_Node_Str");
          cancelButton.addSelectionListener(new SelectionAdapter(){
            @Override public void widgetSelected(            SelectionEvent e){
              shell.close();
            }
          }
);
          composite.pack();
          shell.pack();
          shell.open();
        }
 catch (        Exception e) {
        }
      }
    }
);
  }
}

Fixed version (ground truth):
private void close(){
  if (clusterProgressListener != null) {
    GeneralManager.get().getEventPublisher().removeListener(clusterProgressListener);
    clusterProgressListener=null;
  }
  if (!shell.isDisposed())   shell.close();
  if (algorithmType == EClustererAlgo.TREE_CLUSTERER || algorithmType == EClustererAlgo.COBWEB_CLUSTERER) {
    GeneralManager.get().getGUIBridge().getDisplay().asyncExec(new Runnable(){
      public void run(){
        try {
          shell=new Shell();
          shell.setText(algorithmType.getName());
          shell.setImage(GeneralManager.get().getResourceLoader().getImage(shell.getDisplay(),"String_Node_Str"));
          Monitor primary=shell.getDisplay().getPrimaryMonitor();
          Rectangle bounds=primary.getBounds();
          Rectangle rect=shell.getBounds();
          int x=bounds.x + (bounds.width - rect.width) / 2;
          int y=bounds.y + (bounds.height - rect.height) / 2;
          shell.setLocation(x,y);
          Composite composite=new Composite(shell,SWT.NONE);
          composite.setLayout(new GridLayout(1,false));
          Label label=new Label(composite,SWT.NULL);
          label.setText("String_Node_Str");
          GridData gridData=new GridData(GridData.FILL_HORIZONTAL);
          gridData.widthHint=310;
          label.setLayoutData(gridData);
          Composite viewComposite=new Composite(composite,SWT.SHADOW_ETCHED_IN);
          viewComposite.setLayout(new RowLayout());
          Composite selectedViewsComposite=new Composite(viewComposite,SWT.SHADOW_ETCHED_IN);
          selectedViewsComposite.setLayout(new GridLayout());
          final Button[] buttonViews=new Button[2];
          buttonViews[0]=new Button(selectedViewsComposite,SWT.CHECK);
          buttonViews[0].setSelection(true);
          buttonViews[0].setText("String_Node_Str");
          buttonViews[0].setBounds(10,5,75,30);
          buttonViews[1]=new Button(selectedViewsComposite,SWT.CHECK);
          buttonViews[1].setSelection(true);
          buttonViews[1].setText("String_Node_Str");
          buttonViews[1].setBounds(10,5,75,30);
          buttonViews[0].addSelectionListener(new SelectionAdapter(){
            @Override public void widgetSelected(            SelectionEvent e){
              bOpenDendrogram=(bOpenDendrogram == true) ? false : true;
            }
          }
);
          buttonViews[1].addSelectionListener(new SelectionAdapter(){
            @Override public void widgetSelected(            SelectionEvent e){
              bOpenRadialHierarchy=(bOpenRadialHierarchy == true) ? false : true;
            }
          }
);
          Composite buttonComposite=new Composite(viewComposite,SWT.SHADOW_ETCHED_IN);
          buttonComposite.setLayout(new RowLayout());
          Button okButton=new Button(buttonComposite,SWT.PUSH);
          okButton.setText("String_Node_Str");
          okButton.addSelectionListener(new SelectionAdapter(){
            @Override public void widgetSelected(            SelectionEvent e){
              try {
                if (clusterType == EClustererType.GENE_CLUSTERING) {
                  if (bOpenRadialHierarchy)                   PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView(GLRadialHierarchyView.ID);
                  if (bOpenDendrogram)                   PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView(GLDendrogramHorizontalView.ID);
                }
 else                 if (clusterType == EClustererType.EXPERIMENTS_CLUSTERING) {
                  if (bOpenDendrogram)                   PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView(GLDendrogramVerticalView.ID);
                }
 else                 if (clusterType == EClustererType.BI_CLUSTERING) {
                  if (bOpenRadialHierarchy)                   PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView(GLRadialHierarchyView.ID);
                  if (bOpenDendrogram) {
                    PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView(GLDendrogramHorizontalView.ID);
                    PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView(GLDendrogramVerticalView.ID);
                  }
                }
                UpdateViewEvent event=new UpdateViewEvent();
                event.setSender(this);
                GeneralManager.get().getEventPublisher().triggerEvent(event);
              }
 catch (              PartInitException e1) {
                e1.printStackTrace();
              }
              shell.close();
            }
          }
);
          Button cancelButton=new Button(buttonComposite,SWT.PUSH);
          cancelButton.setText("String_Node_Str");
          cancelButton.addSelectionListener(new SelectionAdapter(){
            @Override public void widgetSelected(            SelectionEvent e){
              shell.close();
            }
          }
);
          composite.pack();
          shell.pack();
          shell.open();
        }
 catch (        Exception e) {
        }
      }
    }
);
  }
}