Program: 148048
Project: 148048
Buggy source:
public synchronized void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
  try {
    if (password == null || password.length() == 0) {
      throw new Exception("String_Node_Str");
    }
    monitor.beginTask("String_Node_Str" + IConstants.TALEND + "String_Node_Str","String_Node_Str".equals(username) ? 12 : 9);
    serverRoot=new TreeParent(serverName,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);
    try {
      WSVersion version=port.getComponentVersion(new WSGetComponentVersion(WSComponent.DataManager,null));
      String versionStr=version.getMajor() + "String_Node_Str" + version.getMinor()+ "String_Node_Str"+ version.getRevision()+ "String_Node_Str"+ version.getBuild();
      log.info("String_Node_Str" + versionStr);
    }
 catch (    Exception e) {
      log.error(e.getMessage(),e);
    }
    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);
    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")) {
          WSDataModel wsobj=null;
          if (retriveWSObject)           wsobj=port.getDataModel(new WSGetDataModel(xdmPKs[i]));
          TreeObject obj=new TreeObject(name,serverRoot,TreeObject.DATA_MODEL,xdmPKs[i],wsobj);
          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))) {
          WSDataCluster wsObject=null;
          if (retriveWSObject)           wsObject=port.getDataCluster(new WSGetDataCluster(xdcPKs[i]));
          TreeObject obj=new TreeObject(name,serverRoot,TreeObject.DATA_CLUSTER,xdcPKs[i],wsObject);
          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.error(e.getMessage(),e);
    }
    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();
        WSTransformerV2 wsobject=null;
        if (retriveWSObject)         wsobject=port.getTransformerV2(new WSGetTransformerV2(transformerPKs[i]));
        TreeObject obj=new TreeObject(id,serverRoot,TreeObject.TRANSFORMER,new WSTransformerV2PK(id),wsobject);
        transformers.addChild(obj);
      }
    }
    monitor.worked(1);
    WSRoutingRulePK[] routingRulePKs=null;
    try {
      routingRulePKs=port.getRoutingRulePKs(new WSGetRoutingRulePKs("String_Node_Str")).getWsRoutingRulePKs();
    }
 catch (    Exception e) {
      log.error(e.getMessage(),e);
    }
    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();
        WSRoutingRule wsobject=null;
        if (retriveWSObject)         wsobject=port.getRoutingRule(new WSGetRoutingRule(routingRulePKs[i]));
        TreeObject obj=new TreeObject(id,serverRoot,TreeObject.ROUTING_RULE,new WSRoutingRulePK(id),wsobject);
        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();
        WSView wsobject=null;
        if (retriveWSObject)         wsobject=port.getView(new WSGetView(viewPKs[i]));
        TreeObject obj=new TreeObject(name,serverRoot,TreeObject.VIEW,new WSViewPK(name),wsobject);
        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();
        WSStoredProcedure wsobject=null;
        if (retriveWSObject)         wsobject=port.getStoredProcedure(new WSGetStoredProcedure(spk[i]));
        TreeObject obj=new TreeObject(name,serverRoot,TreeObject.STORED_PROCEDURE,new WSStoredProcedurePK(name),wsobject);
        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.error(e.getMessage(),e);
      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();
          WSMenu wsobject=null;
          if (retriveWSObject)           wsobject=port.getMenu(new WSGetMenu(menuPKs[i]));
          TreeObject obj=new TreeObject(id,serverRoot,TreeObject.MENU,new WSMenuPK(id),wsobject);
          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);
    }
    WSUniverse wUuniverse=port.getCurrentUniverse(new WSGetCurrentUniverse());
    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 {
    if (password == null || password.length() == 0) {
      throw new Exception("String_Node_Str");
    }
    monitor.beginTask("String_Node_Str" + IConstants.TALEND + "String_Node_Str","String_Node_Str".equals(username) ? 12 : 9);
    serverRoot=new TreeParent(serverName,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);
    try {
      WSVersion version=port.getComponentVersion(new WSGetComponentVersion(WSComponent.DataManager,null));
      String versionStr=version.getMajor() + "String_Node_Str" + version.getMinor()+ "String_Node_Str"+ version.getRevision()+ "String_Node_Str"+ version.getBuild();
      log.info("String_Node_Str" + versionStr);
    }
 catch (    Exception e) {
      log.error(e.getMessage(),e);
    }
    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);
    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")) {
          WSDataModel wsobj=null;
          if (retriveWSObject)           wsobj=port.getDataModel(new WSGetDataModel(xdmPKs[i]));
          TreeObject obj=new TreeObject(name,serverRoot,TreeObject.DATA_MODEL,xdmPKs[i],wsobj);
          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))) {
          WSDataCluster wsObject=null;
          try {
            if (retriveWSObject)             wsObject=port.getDataCluster(new WSGetDataCluster(xdcPKs[i]));
            TreeObject obj=new TreeObject(name,serverRoot,TreeObject.DATA_CLUSTER,xdcPKs[i],wsObject);
            dataClusters.addChild(obj);
          }
 catch (          Exception e) {
            log.error(e.getMessage(),e);
          }
        }
      }
    }
    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.error(e.getMessage(),e);
    }
    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();
        WSTransformerV2 wsobject=null;
        if (retriveWSObject)         wsobject=port.getTransformerV2(new WSGetTransformerV2(transformerPKs[i]));
        TreeObject obj=new TreeObject(id,serverRoot,TreeObject.TRANSFORMER,new WSTransformerV2PK(id),wsobject);
        transformers.addChild(obj);
      }
    }
    monitor.worked(1);
    WSRoutingRulePK[] routingRulePKs=null;
    try {
      routingRulePKs=port.getRoutingRulePKs(new WSGetRoutingRulePKs("String_Node_Str")).getWsRoutingRulePKs();
    }
 catch (    Exception e) {
      log.error(e.getMessage(),e);
    }
    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();
        WSRoutingRule wsobject=null;
        if (retriveWSObject)         wsobject=port.getRoutingRule(new WSGetRoutingRule(routingRulePKs[i]));
        TreeObject obj=new TreeObject(id,serverRoot,TreeObject.ROUTING_RULE,new WSRoutingRulePK(id),wsobject);
        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();
        WSView wsobject=null;
        if (retriveWSObject)         wsobject=port.getView(new WSGetView(viewPKs[i]));
        TreeObject obj=new TreeObject(name,serverRoot,TreeObject.VIEW,new WSViewPK(name),wsobject);
        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();
        WSStoredProcedure wsobject=null;
        if (retriveWSObject)         wsobject=port.getStoredProcedure(new WSGetStoredProcedure(spk[i]));
        TreeObject obj=new TreeObject(name,serverRoot,TreeObject.STORED_PROCEDURE,new WSStoredProcedurePK(name),wsobject);
        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.error(e.getMessage(),e);
      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();
          WSMenu wsobject=null;
          try {
            if (retriveWSObject)             wsobject=port.getMenu(new WSGetMenu(menuPKs[i]));
            TreeObject obj=new TreeObject(id,serverRoot,TreeObject.MENU,new WSMenuPK(id),wsobject);
            menus.addChild(obj);
          }
 catch (          Exception e) {
            log.error(e.getMessage(),e);
          }
        }
      }
      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);
    }
    WSUniverse wUuniverse=port.getCurrentUniverse(new WSGetCurrentUniverse());
    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()));
  }
}