Program: 149102
Project: 149102
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();
  Properties properties=new Properties();
  String f=System.getProperty("String_Node_Str") + "String_Node_Str";
  Collection<String> endpoints;
  Collection<String> universes;
  String endpointsString=server;
  String universeString=universe;
  Authenticator.setDefault(null);
  LocalTreeObjectRepository.getInstance().startUp(view,username);
  LocalTreeObjectRepository.getInstance().switchOnListening();
  try {
    XtentisServerObjectsRetriever retriever=new XtentisServerObjectsRetriever(server,username,password,universe);
    new ProgressMonitorDialog(view.getSite().getShell()).run(true,true,retriever);
    try {
      File dirFile=new File(f);
      boolean bFile=dirFile.exists();
      if (!bFile)       if (dirFile.createNewFile())       properties.load(new FileInputStream(f));
 else       return;
      int index=0;
      endpoints=Arrays.asList(new String[]{Util.default_endpoint_address});
      if (properties.getProperty("String_Node_Str") != null)       endpoints=Arrays.asList(properties.getProperty("String_Node_Str").split("String_Node_Str"));
      if (properties.getProperty("String_Node_Str") != null)       universes=Arrays.asList(properties.getProperty("String_Node_Str").split("String_Node_Str"));
      for (Iterator<String> iter=endpoints.iterator(); iter.hasNext(); ) {
        String endpoint=iter.next();
        if (!endpoint.equals(server))         endpointsString+="String_Node_Str" + endpoint;
        if (++index == 10)         break;
      }
      properties.setProperty("String_Node_Str",endpointsString);
      index=0;
      universes=Arrays.asList(new String[]{"String_Node_Str"});
      for (Iterator<String> iter=universes.iterator(); iter.hasNext(); ) {
        universe=iter.next();
        if (!universe.equals(server))         universeString+="String_Node_Str" + universe;
        if (++index == 5)         break;
      }
      properties.setProperty("String_Node_Str",universeString);
      properties.store(new FileOutputStream(f),null);
    }
 catch (    Exception e1) {
    }
    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());
  }
}

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();
  Properties properties=new Properties();
  String f=System.getProperty("String_Node_Str") + "String_Node_Str";
  Collection<String> endpoints;
  Collection<String> universes;
  String endpointsString=server;
  String universeString=universe;
  Authenticator.setDefault(null);
  LocalTreeObjectRepository.getInstance().startUp(view,username);
  LocalTreeObjectRepository.getInstance().switchOnListening();
  try {
    XtentisServerObjectsRetriever retriever=new XtentisServerObjectsRetriever(server,username,password,universe);
    new ProgressMonitorDialog(view.getSite().getShell()).run(true,true,retriever);
    try {
      File dirFile=new File(f);
      boolean bFile=dirFile.exists();
      if (!bFile)       if (dirFile.createNewFile())       properties.load(new FileInputStream(f));
 else       return;
      int index=0;
      endpoints=Arrays.asList(new String[]{Util.default_endpoint_address});
      if (properties.getProperty("String_Node_Str") != null)       endpoints=Arrays.asList(properties.getProperty("String_Node_Str").split("String_Node_Str"));
      if (properties.getProperty("String_Node_Str") != null)       universes=Arrays.asList(properties.getProperty("String_Node_Str").split("String_Node_Str"));
      for (Iterator<String> iter=endpoints.iterator(); iter.hasNext(); ) {
        String endpoint=iter.next();
        if (!endpoint.equals(server))         endpointsString+="String_Node_Str" + endpoint;
        if (++index == 10)         break;
      }
      properties.setProperty("String_Node_Str",endpointsString);
      index=0;
      universes=Arrays.asList(new String[]{"String_Node_Str"});
      for (Iterator<String> iter=universes.iterator(); iter.hasNext(); ) {
        universe=iter.next();
        if (!universe.equals(server))         universeString+="String_Node_Str" + universe;
        if (++index == 5)         break;
      }
      properties.setProperty("String_Node_Str",universeString);
      properties.store(new FileOutputStream(f),null);
    }
 catch (    Exception e1) {
    }
    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();
    ErrorExceptionDialog.openError(dialog.getShell(),"String_Node_Str",CommonUtil.getErrMsgFromException(ite.getCause()));
  }
}