Program: 17479
Project: 17479
Buggy source:
private void createMenuItems(Menu menu){
  manageItem=new MenuItem(menu,SWT.CASCADE);
  manageItem.setText("String_Node_Str");
  manageItem.addListener(SWT.Selection,new Listener(){
    public void handleEvent(    Event e){
      try {
        String connectionID=null;
        StructuredSelection sel=(StructuredSelection)comboViewer.getSelection();
        if (sel.getFirstElement() instanceof FtpConnectionProperties) {
          connectionID=((FtpConnectionProperties)sel.getFirstElement()).getConnectionid();
        }
        FtpConnectionDialog dialog=new FtpConnectionDialog(e.widget.getDisplay().getActiveShell(),connectionID);
        if (dialog.open() == IDialogConstants.OK_ID) {
          comboViewer.setInput(dialog.connectionProperties);
        }
      }
 catch (      Exception ex) {
        ex.printStackTrace();
      }
    }
  }
);
  disconnectItem=new MenuItem(menu,SWT.CASCADE);
  disconnectItem.setText("String_Node_Str");
  disconnectItem.setEnabled(false);
  disconnectItem.addListener(SWT.Selection,new Listener(){
    public void handleEvent(    Event e){
      try {
        FtpConnection.getInstance().disconnect();
        disconnectItem.setEnabled(false);
        connectItem.setEnabled(true);
      }
 catch (      Exception ex) {
        ex.printStackTrace();
      }
    }
  }
);
  connectItem=new MenuItem(menu,SWT.CASCADE);
  connectItem.setText("String_Node_Str");
  connectItem.setEnabled(false);
  connectItem.addListener(SWT.Selection,new Listener(){
    public void handleEvent(    Event e){
      try {
        FtpConnection.getInstance().connect();
        disconnectItem.setEnabled(true);
        connectItem.setEnabled(false);
      }
 catch (      Exception ex) {
        ex.printStackTrace();
      }
    }
  }
);
}

Fixed version (ground truth):
private void createMenuItems(Menu menu){
  manageItem=new MenuItem(menu,SWT.CASCADE);
  manageItem.setText("String_Node_Str");
  manageItem.addListener(SWT.Selection,new Listener(){
    public void handleEvent(    Event e){
      try {
        String connectionID=null;
        StructuredSelection sel=(StructuredSelection)comboViewer.getSelection();
        if (sel.getFirstElement() instanceof FTPConnectionProperties) {
          connectionID=((FTPConnectionProperties)sel.getFirstElement()).getConnectionid();
        }
        FtpConnectionDialog dialog=new FtpConnectionDialog(e.widget.getDisplay().getActiveShell(),connectionID);
        if (dialog.open() == IDialogConstants.OK_ID) {
          comboViewer.setInput(dialog.connectionProperties);
        }
      }
 catch (      Exception ex) {
        ex.printStackTrace();
      }
    }
  }
);
  disconnectItem=new MenuItem(menu,SWT.CASCADE);
  disconnectItem.setText("String_Node_Str");
  disconnectItem.setEnabled(false);
  disconnectItem.addListener(SWT.Selection,new Listener(){
    public void handleEvent(    Event e){
      try {
        fileProvider.disconnect();
        disconnectItem.setEnabled(false);
        connectItem.setEnabled(true);
      }
 catch (      Exception ex) {
        ex.printStackTrace();
      }
    }
  }
);
  connectItem=new MenuItem(menu,SWT.CASCADE);
  connectItem.setText("String_Node_Str");
  connectItem.setEnabled(false);
  connectItem.addListener(SWT.Selection,new Listener(){
    public void handleEvent(    Event e){
      try {
        fileProvider.connect();
        disconnectItem.setEnabled(true);
        connectItem.setEnabled(false);
      }
 catch (      Exception ex) {
        ex.printStackTrace();
      }
    }
  }
);
}