Program: 148883
Project: 148883
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);
    XtentisPort port=Util.getPort(new URL(endpointaddress),universe,username,password);
    port.ping(new WSPing("String_Node_Str"));
    monitor.worked(1);
    String displayName=endpointaddress;
    WSUniverse wUuniverse=null;
    wUuniverse=port.getCurrentUniverse(new WSGetCurrentUniverse());
    if (monitor.isCanceled())     throw new InterruptedException("String_Node_Str");
    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");
    UserInfo user=new UserInfo();
    user.setUsername(username);
    user.setPassword(password);
    user.setServerUrl(endpointaddress);
    user.setUniverse(universe);
    user.setWsUuniverse(wUuniverse);
    serverRoot.setUser(user);
    List<IAvailableModel> availablemodels=AvailableModelUtil.getAvailableModels();
    for (    IAvailableModel model : availablemodels) {
      model.addTreeObjects(port,monitor,serverRoot);
    }
    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) {
      e.printStackTrace();
    }
    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) {
      e.printStackTrace();
    }
    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");
    WSRoutingRulePK[] routingRulePKs=null;
    boolean hasRoutingRules=true;
    try {
      routingRulePKs=port.getRoutingRulePKs(new WSGetRoutingRulePKs("String_Node_Str")).getWsRoutingRulePKs();
    }
 catch (    Exception e) {
      System.out.println("String_Node_Str");
      hasRoutingRules=false;
    }
    TreeParent rules=null;
    if (hasRoutingRules) {
      rules=new TreeParent(EXtentisObjects.RoutingRule.getDisplayName(),serverRoot,TreeObject.ROUTING_RULE,null,null);
      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);
        }
      }
      serverRoot.addChild(rules);
      monitor.worked(1);
    }
    TreeObject engine=new TreeObject(EXtentisObjects.SubscriptionEngine.getDisplayName(),serverRoot,TreeObject.SUBSCRIPTION_ENGINE,null,null);
    serverRoot.addChild(engine);
    WSTransformerV2PK[] transformerPKs=null;
    boolean hasTransformers=true;
    try {
      transformerPKs=port.getTransformerV2PKs(new WSGetTransformerV2PKs("String_Node_Str")).getWsTransformerV2PK();
    }
 catch (    Exception e) {
      System.out.println("String_Node_Str");
      hasTransformers=false;
    }
    TreeParent transformers=null;
    if (hasTransformers) {
      transformers=new TreeParent(EXtentisObjects.Transformer.getDisplayName(),serverRoot,TreeObject.TRANSFORMER,null,null);
      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);
        }
      }
      serverRoot.addChild(transformers);
      monitor.worked(1);
    }
    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) {
      e.printStackTrace();
    }
    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) {
      e.printStackTrace();
    }
    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");
    }
    serverRoot.addChild(models);
    serverRoot.addChild(dataClusters);
    serverRoot.addChild(views);
    serverRoot.addChild(storedProcedures);
    serverRoot.addChild(serviceConfiguration);
    if (hasMenus)     serverRoot.addChild(menus);
    addRevision(wUuniverse);
    LocalTreeObjectRepository.getInstance().setLazySaveStrategy(false);
    monitor.done();
  }
 catch (  Exception e) {
    if (monitor.isCanceled())     throw new InterruptedException("String_Node_Str");
    e.printStackTrace();
    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);
    XtentisPort port=Util.getPort(new URL(endpointaddress),universe,username,password);
    port.ping(new WSPing("String_Node_Str"));
    monitor.worked(1);
    String displayName=endpointaddress;
    WSUniverse wUuniverse=null;
    wUuniverse=port.getCurrentUniverse(new WSGetCurrentUniverse());
    if (monitor.isCanceled())     throw new InterruptedException("String_Node_Str");
    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");
    UserInfo user=new UserInfo();
    user.setUsername(username);
    user.setPassword(password);
    user.setServerUrl(endpointaddress);
    user.setUniverse(universe);
    user.setWsUuniverse(wUuniverse);
    serverRoot.setUser(user);
    List<IAvailableModel> availablemodels=AvailableModelUtil.getAvailableModels();
    for (    IAvailableModel model : availablemodels) {
      model.addTreeObjects(port,monitor,serverRoot);
    }
    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) {
      e.printStackTrace();
    }
    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) {
      e.printStackTrace();
    }
    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");
    WSRoutingRulePK[] routingRulePKs=null;
    boolean hasRoutingRules=true;
    try {
      routingRulePKs=port.getRoutingRulePKs(new WSGetRoutingRulePKs("String_Node_Str")).getWsRoutingRulePKs();
    }
 catch (    Exception e) {
      System.out.println("String_Node_Str");
      hasRoutingRules=false;
    }
    TreeParent rules=null;
    if (hasRoutingRules) {
      rules=new TreeParent(EXtentisObjects.RoutingRule.getDisplayName(),serverRoot,TreeObject.ROUTING_RULE,null,null);
      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);
        }
      }
      serverRoot.addChild(rules);
      monitor.worked(1);
    }
    TreeObject engine=new TreeObject(EXtentisObjects.SubscriptionEngine.getDisplayName(),serverRoot,TreeObject.SUBSCRIPTION_ENGINE,null,null);
    serverRoot.addChild(engine);
    WSTransformerV2PK[] transformerPKs=null;
    boolean hasTransformers=true;
    try {
      transformerPKs=port.getTransformerV2PKs(new WSGetTransformerV2PKs("String_Node_Str")).getWsTransformerV2PK();
    }
 catch (    Exception e) {
      System.out.println("String_Node_Str");
      hasTransformers=false;
    }
    TreeParent transformers=null;
    if (hasTransformers) {
      transformers=new TreeParent(EXtentisObjects.Transformer.getDisplayName(),serverRoot,TreeObject.TRANSFORMER,null,null);
      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);
        }
      }
      serverRoot.addChild(transformers);
      monitor.worked(1);
    }
    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) {
      e.printStackTrace();
    }
    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) {
      e.printStackTrace();
    }
    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");
    }
    serverRoot.addChild(models);
    serverRoot.addChild(dataClusters);
    serverRoot.addChild(views);
    serverRoot.addChild(storedProcedures);
    serverRoot.addChild(serviceConfiguration);
    if (hasMenus)     serverRoot.addChild(menus);
    addRevision(wUuniverse);
    LocalTreeObjectRepository.getInstance().setLazySaveStrategy(false,serverRoot);
    monitor.done();
  }
 catch (  Exception e) {
    if (monitor.isCanceled())     throw new InterruptedException("String_Node_Str");
    e.printStackTrace();
    throw new InvocationTargetException(new XtentisException(e.getLocalizedMessage()));
  }
}