Program: 148341
Project: 148341
Buggy source:
public synchronized void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
  try {
    monitor.beginTask("String_Node_Str" + IConstants.TALEND + "String_Node_Str","String_Node_Str".equals(username) ? 12 : 9);
    String displayName=endpointaddress;
    serverRoot=new TreeParent(displayName,null,TreeObject._SERVER_,endpointaddress,("String_Node_Str".equals(universe) ? "String_Node_Str" : universe + "String_Node_Str") + username + "String_Node_Str"+ (password == null ? "String_Node_Str" : password));
    monitor.subTask("String_Node_Str");
    LocalTreeObjectRepository.getInstance().startUp(view,endpointaddress,username,password);
    LocalTreeObjectRepository.getInstance().switchOnListening();
    LocalTreeObjectRepository.getInstance().setLazySaveStrategy(true,serverRoot);
    monitor.worked(1);
    XtentisPort port=Util.getPort(new URL(endpointaddress),universe,username,password);
    port.ping(new WSPing("String_Node_Str"));
    monitor.worked(1);
    WSUniverse wUuniverse=null;
    wUuniverse=port.getCurrentUniverse(new WSGetCurrentUniverse());
    if (monitor.isCanceled())     throw new InterruptedException("String_Node_Str");
    monitor.subTask("String_Node_Str");
    UserInfo user=new UserInfo();
    user.setUsername(username);
    user.setPassword(password);
    user.setServerUrl(endpointaddress);
    user.setUniverse(universe);
    user.setWsUuniverse(wUuniverse);
    serverRoot.setUser(user);
    TreeParent models=new TreeParent(EXtentisObjects.DataMODEL.getDisplayName(),serverRoot,TreeObject.DATA_MODEL,null,null);
    WSDataModelPK[] xdmPKs=null;
    try {
      xdmPKs=port.getDataModelPKs(new WSRegexDataModelPKs("String_Node_Str")).getWsDataModelPKs();
    }
 catch (    Exception e) {
      log.error(e.getMessage(),e);
    }
    if (xdmPKs != null) {
      monitor.subTask("String_Node_Str");
      for (int i=0; i < xdmPKs.length; i++) {
        String name=xdmPKs[i].getPk();
        if (!name.startsWith("String_Node_Str")) {
          TreeObject obj=new TreeObject(name,serverRoot,TreeObject.DATA_MODEL,xdmPKs[i],null);
          models.addChild(obj);
        }
      }
    }
    monitor.worked(1);
    if (monitor.isCanceled())     throw new InterruptedException("String_Node_Str");
    TreeParent dataClusters=new TreeParent(EXtentisObjects.DataCluster.getDisplayName(),serverRoot,TreeObject.DATA_CLUSTER,null,null);
    WSDataClusterPK[] xdcPKs=null;
    try {
      xdcPKs=port.getDataClusterPKs(new WSRegexDataClusterPKs("String_Node_Str")).getWsDataClusterPKs();
    }
 catch (    Exception e) {
      log.error(e.getMessage(),e);
    }
    if (xdcPKs != null) {
      monitor.subTask("String_Node_Str");
      for (int i=0; i < xdcPKs.length; i++) {
        String name=xdcPKs[i].getPk();
        if (!("String_Node_Str".equals(name))) {
          TreeObject obj=new TreeObject(name,serverRoot,TreeObject.DATA_CLUSTER,xdcPKs[i],null);
          dataClusters.addChild(obj);
        }
      }
    }
    monitor.worked(1);
    if (monitor.isCanceled())     throw new InterruptedException("String_Node_Str");
    TreeParent eventManagement=new TreeParent(EXtentisObjects.EventManagement.getDisplayName(),serverRoot,TreeObject.EVENT_MANAGEMENT,null,null);
    TreeObject engine=new TreeObject(EXtentisObjects.SubscriptionEngine.getDisplayName(),serverRoot,TreeObject.SUBSCRIPTION_ENGINE,null,null);
    eventManagement.addChild(engine);
    WSTransformerV2PK[] transformerPKs=null;
    try {
      transformerPKs=port.getTransformerV2PKs(new WSGetTransformerV2PKs("String_Node_Str")).getWsTransformerV2PK();
    }
 catch (    Exception e) {
      System.out.println("String_Node_Str");
    }
    TreeParent transformers=null;
    transformers=new TreeParent(EXtentisObjects.Transformer.getDisplayName(),serverRoot,TreeObject.TRANSFORMER,null,null);
    eventManagement.addChild(transformers);
    if (transformerPKs != null) {
      monitor.subTask("String_Node_Str");
      for (int i=0; i < transformerPKs.length; i++) {
        String id=transformerPKs[i].getPk();
        TreeObject obj=new TreeObject(id,serverRoot,TreeObject.TRANSFORMER,new WSTransformerV2PK(id),null);
        transformers.addChild(obj);
      }
    }
    monitor.worked(1);
    WSRoutingRulePK[] routingRulePKs=null;
    try {
      routingRulePKs=port.getRoutingRulePKs(new WSGetRoutingRulePKs("String_Node_Str")).getWsRoutingRulePKs();
    }
 catch (    Exception e) {
      System.out.println("String_Node_Str");
    }
    TreeParent rules=null;
    rules=new TreeParent(EXtentisObjects.RoutingRule.getDisplayName(),serverRoot,TreeObject.ROUTING_RULE,null,null);
    eventManagement.addChild(rules);
    if (routingRulePKs != null) {
      monitor.subTask("String_Node_Str");
      for (int i=0; i < routingRulePKs.length; i++) {
        String id=routingRulePKs[i].getPk();
        TreeObject obj=new TreeObject(id,serverRoot,TreeObject.ROUTING_RULE,new WSRoutingRulePK(id),null);
        rules.addChild(obj);
      }
    }
    monitor.worked(1);
    serverRoot.addChild(eventManagement);
    TreeParent views=new TreeParent(EXtentisObjects.View.getDisplayName(),serverRoot,TreeObject.VIEW,null,null);
    WSViewPK[] viewPKs=null;
    try {
      viewPKs=port.getViewPKs((new WSGetViewPKs("String_Node_Str"))).getWsViewPK();
    }
 catch (    Exception e) {
      log.error(e.getMessage(),e);
    }
    if (viewPKs != null) {
      monitor.subTask("String_Node_Str");
      for (int i=0; i < viewPKs.length; i++) {
        String name=viewPKs[i].getPk();
        TreeObject obj=new TreeObject(name,serverRoot,TreeObject.VIEW,new WSViewPK(name),null);
        views.addChild(obj);
      }
    }
    monitor.worked(1);
    if (monitor.isCanceled())     throw new InterruptedException("String_Node_Str");
    TreeParent storedProcedures=new TreeParent(EXtentisObjects.StoredProcedure.getDisplayName(),serverRoot,TreeObject.STORED_PROCEDURE,null,null);
    WSStoredProcedurePK[] spk=null;
    try {
      spk=port.getStoredProcedurePKs(new WSRegexStoredProcedure("String_Node_Str")).getWsStoredProcedurePK();
    }
 catch (    Exception e) {
      log.error(e.getMessage(),e);
    }
    if (spk != null) {
      monitor.subTask("String_Node_Str");
      for (int i=0; i < spk.length; i++) {
        String name=spk[i].getPk();
        TreeObject obj=new TreeObject(name,serverRoot,TreeObject.STORED_PROCEDURE,new WSStoredProcedurePK(name),null);
        storedProcedures.addChild(obj);
      }
    }
    monitor.worked(1);
    if (monitor.isCanceled())     throw new InterruptedException("String_Node_Str");
    TreeObject serviceConfiguration=new TreeObject(EXtentisObjects.ServiceConfiguration.getDisplayName(),serverRoot,TreeObject.SERVICE_CONFIGURATION,null,null);
    monitor.worked(1);
    if (monitor.isCanceled())     throw new InterruptedException("String_Node_Str");
    WSMenuPK[] menuPKs=null;
    boolean hasMenus=true;
    try {
      menuPKs=port.getMenuPKs(new WSGetMenuPKs("String_Node_Str")).getWsMenuPK();
    }
 catch (    Exception e) {
      System.out.println("String_Node_Str");
      hasMenus=false;
    }
    TreeParent menus=null;
    if (hasMenus) {
      menus=new TreeParent(EXtentisObjects.Menu.getDisplayName(),serverRoot,TreeObject.MENU,null,null);
      if (menuPKs != null) {
        monitor.subTask("String_Node_Str");
        for (int i=0; i < menuPKs.length; i++) {
          String id=menuPKs[i].getPk();
          TreeObject obj=new TreeObject(id,serverRoot,TreeObject.MENU,new WSMenuPK(id),null);
          menus.addChild(obj);
        }
      }
      monitor.worked(1);
      if (monitor.isCanceled())       throw new InterruptedException("String_Node_Str");
    }
    monitor.worked(1);
    serverRoot.addChild(models);
    serverRoot.addChild(dataClusters);
    serverRoot.addChild(views);
    serverRoot.addChild(storedProcedures);
    serverRoot.addChild(serviceConfiguration);
    if (hasMenus)     serverRoot.addChild(menus);
    List<IAvailableModel> availablemodels=AvailableModelUtil.getAvailableModels();
    for (    IAvailableModel model : availablemodels) {
      model.addTreeObjects(port,monitor,serverRoot);
    }
    addRevision(wUuniverse);
    monitor.done();
  }
 catch (  Exception e) {
    if (monitor.isCanceled())     throw new InterruptedException("String_Node_Str");
    log.error(e.getMessage(),e);
    throw new InvocationTargetException(new XtentisException(e.getLocalizedMessage()));
  }
}

Fixed version (ground truth):
public synchronized void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
  try {
    monitor.beginTask("String_Node_Str" + IConstants.TALEND + "String_Node_Str","String_Node_Str".equals(username) ? 12 : 9);
    String displayName=endpointaddress;
    serverRoot=new TreeParent(displayName,null,TreeObject._SERVER_,endpointaddress,("String_Node_Str".equals(universe) ? "String_Node_Str" : universe + "String_Node_Str") + username + "String_Node_Str"+ (password == null ? "String_Node_Str" : password));
    monitor.subTask("String_Node_Str");
    LocalTreeObjectRepository.getInstance().startUp(view,endpointaddress,username,password);
    LocalTreeObjectRepository.getInstance().switchOnListening();
    LocalTreeObjectRepository.getInstance().setLazySaveStrategy(true,serverRoot);
    monitor.worked(1);
    XtentisPort port=Util.getPort(new URL(endpointaddress),universe,username,password);
    port.ping(new WSPing("String_Node_Str"));
    monitor.worked(1);
    WSUniverse wUuniverse=null;
    wUuniverse=port.getCurrentUniverse(new WSGetCurrentUniverse());
    if (monitor.isCanceled())     throw new InterruptedException("String_Node_Str");
    monitor.subTask("String_Node_Str");
    UserInfo user=new UserInfo();
    user.setUsername(username);
    user.setPassword(password);
    user.setServerUrl(endpointaddress);
    user.setUniverse(universe);
    user.setWsUuniverse(wUuniverse);
    serverRoot.setUser(user);
    TreeParent models=new TreeParent(EXtentisObjects.DataMODEL.getDisplayName(),serverRoot,TreeObject.DATA_MODEL,null,null);
    WSDataModelPK[] xdmPKs=null;
    try {
      xdmPKs=port.getDataModelPKs(new WSRegexDataModelPKs("String_Node_Str")).getWsDataModelPKs();
    }
 catch (    Exception e) {
      log.error(e.getMessage(),e);
    }
    if (xdmPKs != null) {
      monitor.subTask("String_Node_Str");
      for (int i=0; i < xdmPKs.length; i++) {
        String name=xdmPKs[i].getPk();
        if (!name.startsWith("String_Node_Str")) {
          TreeObject obj=new TreeObject(name,serverRoot,TreeObject.DATA_MODEL,xdmPKs[i],null);
          models.addChild(obj);
        }
      }
    }
    monitor.worked(1);
    if (monitor.isCanceled())     throw new InterruptedException("String_Node_Str");
    TreeParent dataClusters=new TreeParent(EXtentisObjects.DataCluster.getDisplayName(),serverRoot,TreeObject.DATA_CLUSTER,null,null);
    WSDataClusterPK[] xdcPKs=null;
    try {
      xdcPKs=port.getDataClusterPKs(new WSRegexDataClusterPKs("String_Node_Str")).getWsDataClusterPKs();
    }
 catch (    Exception e) {
      log.error(e.getMessage(),e);
    }
    if (xdcPKs != null) {
      monitor.subTask("String_Node_Str");
      for (int i=0; i < xdcPKs.length; i++) {
        String name=xdcPKs[i].getPk();
        if (!("String_Node_Str".equals(name))) {
          TreeObject obj=new TreeObject(name,serverRoot,TreeObject.DATA_CLUSTER,xdcPKs[i],null);
          dataClusters.addChild(obj);
        }
      }
    }
    monitor.worked(1);
    if (monitor.isCanceled())     throw new InterruptedException("String_Node_Str");
    TreeParent eventManagement=new TreeParent(EXtentisObjects.EventManagement.getDisplayName(),serverRoot,TreeObject.EVENT_MANAGEMENT,null,null);
    TreeObject engine=new TreeObject(EXtentisObjects.SubscriptionEngine.getDisplayName(),serverRoot,TreeObject.SUBSCRIPTION_ENGINE,null,null);
    eventManagement.addChild(engine);
    WSTransformerV2PK[] transformerPKs=null;
    try {
      transformerPKs=port.getTransformerV2PKs(new WSGetTransformerV2PKs("String_Node_Str")).getWsTransformerV2PK();
    }
 catch (    Exception e) {
      log.info("String_Node_Str");
    }
    TreeParent transformers=null;
    transformers=new TreeParent(EXtentisObjects.Transformer.getDisplayName(),serverRoot,TreeObject.TRANSFORMER,null,null);
    eventManagement.addChild(transformers);
    if (transformerPKs != null) {
      monitor.subTask("String_Node_Str");
      for (int i=0; i < transformerPKs.length; i++) {
        String id=transformerPKs[i].getPk();
        TreeObject obj=new TreeObject(id,serverRoot,TreeObject.TRANSFORMER,new WSTransformerV2PK(id),null);
        transformers.addChild(obj);
      }
    }
    monitor.worked(1);
    WSRoutingRulePK[] routingRulePKs=null;
    try {
      routingRulePKs=port.getRoutingRulePKs(new WSGetRoutingRulePKs("String_Node_Str")).getWsRoutingRulePKs();
    }
 catch (    Exception e) {
      log.info("String_Node_Str");
    }
    TreeParent rules=null;
    rules=new TreeParent(EXtentisObjects.RoutingRule.getDisplayName(),serverRoot,TreeObject.ROUTING_RULE,null,null);
    eventManagement.addChild(rules);
    if (routingRulePKs != null) {
      monitor.subTask("String_Node_Str");
      for (int i=0; i < routingRulePKs.length; i++) {
        String id=routingRulePKs[i].getPk();
        TreeObject obj=new TreeObject(id,serverRoot,TreeObject.ROUTING_RULE,new WSRoutingRulePK(id),null);
        rules.addChild(obj);
      }
    }
    monitor.worked(1);
    serverRoot.addChild(eventManagement);
    TreeParent views=new TreeParent(EXtentisObjects.View.getDisplayName(),serverRoot,TreeObject.VIEW,null,null);
    WSViewPK[] viewPKs=null;
    try {
      viewPKs=port.getViewPKs((new WSGetViewPKs("String_Node_Str"))).getWsViewPK();
    }
 catch (    Exception e) {
      log.error(e.getMessage(),e);
    }
    if (viewPKs != null) {
      monitor.subTask("String_Node_Str");
      for (int i=0; i < viewPKs.length; i++) {
        String name=viewPKs[i].getPk();
        TreeObject obj=new TreeObject(name,serverRoot,TreeObject.VIEW,new WSViewPK(name),null);
        views.addChild(obj);
      }
    }
    monitor.worked(1);
    if (monitor.isCanceled())     throw new InterruptedException("String_Node_Str");
    TreeParent storedProcedures=new TreeParent(EXtentisObjects.StoredProcedure.getDisplayName(),serverRoot,TreeObject.STORED_PROCEDURE,null,null);
    WSStoredProcedurePK[] spk=null;
    try {
      spk=port.getStoredProcedurePKs(new WSRegexStoredProcedure("String_Node_Str")).getWsStoredProcedurePK();
    }
 catch (    Exception e) {
      log.error(e.getMessage(),e);
    }
    if (spk != null) {
      monitor.subTask("String_Node_Str");
      for (int i=0; i < spk.length; i++) {
        String name=spk[i].getPk();
        TreeObject obj=new TreeObject(name,serverRoot,TreeObject.STORED_PROCEDURE,new WSStoredProcedurePK(name),null);
        storedProcedures.addChild(obj);
      }
    }
    monitor.worked(1);
    if (monitor.isCanceled())     throw new InterruptedException("String_Node_Str");
    TreeObject serviceConfiguration=new TreeObject(EXtentisObjects.ServiceConfiguration.getDisplayName(),serverRoot,TreeObject.SERVICE_CONFIGURATION,null,null);
    monitor.worked(1);
    if (monitor.isCanceled())     throw new InterruptedException("String_Node_Str");
    WSMenuPK[] menuPKs=null;
    boolean hasMenus=true;
    try {
      menuPKs=port.getMenuPKs(new WSGetMenuPKs("String_Node_Str")).getWsMenuPK();
    }
 catch (    Exception e) {
      log.info("String_Node_Str");
      hasMenus=false;
    }
    TreeParent menus=null;
    if (hasMenus) {
      menus=new TreeParent(EXtentisObjects.Menu.getDisplayName(),serverRoot,TreeObject.MENU,null,null);
      if (menuPKs != null) {
        monitor.subTask("String_Node_Str");
        for (int i=0; i < menuPKs.length; i++) {
          String id=menuPKs[i].getPk();
          TreeObject obj=new TreeObject(id,serverRoot,TreeObject.MENU,new WSMenuPK(id),null);
          menus.addChild(obj);
        }
      }
      monitor.worked(1);
      if (monitor.isCanceled())       throw new InterruptedException("String_Node_Str");
    }
    monitor.worked(1);
    serverRoot.addChild(models);
    serverRoot.addChild(dataClusters);
    serverRoot.addChild(views);
    serverRoot.addChild(storedProcedures);
    serverRoot.addChild(serviceConfiguration);
    if (hasMenus)     serverRoot.addChild(menus);
    List<IAvailableModel> availablemodels=AvailableModelUtil.getAvailableModels();
    for (    IAvailableModel model : availablemodels) {
      model.addTreeObjects(port,monitor,serverRoot);
    }
    addRevision(wUuniverse);
    monitor.done();
  }
 catch (  Exception e) {
    if (monitor.isCanceled())     throw new InterruptedException("String_Node_Str");
    log.error(e.getMessage(),e);
    throw new InvocationTargetException(new XtentisException(e.getLocalizedMessage()));
  }
}