Program: 149240
Project: 149240
Buggy source:
/** 
 * Selection Listener on OK Button
 */
public void widgetSelected(SelectionEvent e){
  int buttonId=((Integer)e.widget.getData()).intValue();
  if (IDialogConstants.OK_ID != buttonId)   return;
  String server=dialog.getServer();
  String username=dialog.getUsernameText();
  String password=dialog.getPasswordText();
  String universe=dialog.getUniverse();
  dialog.close();
  Authenticator.setDefault(null);
  try {
    XtentisServerObjectsRetriever retriever=new XtentisServerObjectsRetriever(server,username,password,universe);
    new ProgressMonitorDialog(view.getSite().getShell()).run(true,true,retriever);
    if (!retriever.isExistUniverse()) {
      return;
    }
    TreeParent serverRoot=retriever.getServerRoot();
    TreeParent invisibleRoot=view.getTreeContentProvider().getInvisibleRoot();
    TreeObject[] serverRoots=invisibleRoot.getChildren();
    boolean found=false;
    for (int i=0; i < serverRoots.length; i++) {
      if (serverRoots[i].getWsKey().equals(serverRoot.getWsKey())) {
        if (serverRoots[i].getUser().getUniverse().equalsIgnoreCase(serverRoot.getUser().getUniverse())) {
          found=true;
          ((TreeParent)serverRoots[i]).synchronizeWith(serverRoot);
        }
      }
    }
    if (!found)     invisibleRoot.addChild(serverRoot);
    view.getViewer().refresh();
    view.getViewer().expandToLevel(serverRoot,1);
  }
 catch (  InterruptedException ie) {
    return;
  }
catch (  InvocationTargetException ite) {
    ite.printStackTrace();
    MessageDialog.openError(dialog.getShell(),"String_Node_Str","String_Node_Str" + ite.getCause().getLocalizedMessage());
  }
}

Fixed version (ground truth):
/** 
 * Selection Listener on OK Button
 */
public void widgetSelected(SelectionEvent e){
  int buttonId=((Integer)e.widget.getData()).intValue();
  if (IDialogConstants.OK_ID != buttonId)   return;
  String server=dialog.getServer();
  String username=dialog.getUsernameText();
  String password=dialog.getPasswordText();
  String universe=dialog.getUniverse();
  dialog.close();
  Authenticator.setDefault(null);
  try {
    XtentisServerObjectsRetriever retriever=new XtentisServerObjectsRetriever(server,username,password,universe);
    new ProgressMonitorDialog(view.getSite().getShell()).run(true,true,retriever);
    if (!retriever.isExistUniverse()) {
      return;
    }
    TreeParent serverRoot=retriever.getServerRoot();
    TreeParent invisibleRoot=view.getTreeContentProvider().getInvisibleRoot();
    TreeObject[] serverRoots=invisibleRoot.getChildren();
    boolean found=false;
    for (int i=0; i < serverRoots.length; i++) {
      if (serverRoots[i].getDisplayName().equals(serverRoot.getDisplayName())) {
        if (serverRoots[i].getWsKey().equals(serverRoot.getWsKey())) {
          if (serverRoots[i].getUser().getUniverse().equalsIgnoreCase(serverRoot.getUser().getUniverse())) {
            found=true;
            ((TreeParent)serverRoots[i]).synchronizeWith(serverRoot);
          }
        }
      }
    }
    if (!found)     invisibleRoot.addChild(serverRoot);
    view.getViewer().refresh();
    view.getViewer().expandToLevel(serverRoot,1);
  }
 catch (  InterruptedException ie) {
    return;
  }
catch (  InvocationTargetException ite) {
    ite.printStackTrace();
    MessageDialog.openError(dialog.getShell(),"String_Node_Str","String_Node_Str" + ite.getCause().getLocalizedMessage());
  }
}