Program: 149104
Project: 149104
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);
    TreeParent models=new TreeParent(EXtentisObjects.DataMODEL.getDisplayName(),serverRoot,TreeObject.DATA_MODEL,null,null);
    WSDataModelPK[] xdmPKs=port.getDataModelPKs(new WSRegexDataModelPKs("String_Node_Str")).getWsDataModelPKs();
    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=port.getDataClusterPKs(new WSRegexDataClusterPKs("String_Node_Str")).getWsDataClusterPKs();
    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 views=new TreeParent(EXtentisObjects.View.getDisplayName(),serverRoot,TreeObject.VIEW,null,null);
    WSViewPK[] viewPKs=port.getViewPKs((new WSGetViewPKs("String_Node_Str"))).getWsViewPK();
    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=port.getStoredProcedurePKs(new WSRegexStoredProcedure("String_Node_Str")).getWsStoredProcedurePK();
    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");
    WSRolePK[] rolePKs=null;
    boolean hasRoles=true;
    try {
      rolePKs=port.getRolePKs(new WSGetRolePKs("String_Node_Str")).getWsRolePK();
    }
 catch (    Exception e) {
      System.out.println("String_Node_Str");
      hasRoles=false;
    }
    TreeParent roles=null;
    if (hasRoles) {
      roles=new TreeParent(EXtentisObjects.Role.getDisplayName(),serverRoot,TreeObject.ROLE,null,null);
      if (rolePKs != null) {
        monitor.subTask("String_Node_Str");
        for (int i=0; i < rolePKs.length; i++) {
          String name=rolePKs[i].getPk();
          TreeObject obj=new TreeObject(name,serverRoot,TreeObject.ROLE,new WSRolePK(name),null);
          roles.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);
        }
      }
      monitor.worked(1);
      if (monitor.isCanceled())       throw new InterruptedException("String_Node_Str");
    }
    TreeObject engine=new TreeObject(EXtentisObjects.SubscriptionEngine.getDisplayName(),serverRoot,TreeObject.SUBSCRIPTION_ENGINE,null,null);
    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");
    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);
        }
      }
      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");
    }
    WSUniversePK[] universePKs=null;
    try {
      universePKs=port.getUniversePKs(new WSGetUniversePKs("String_Node_Str")).getWsUniversePK();
    }
 catch (    Exception e) {
      System.out.println("String_Node_Str");
    }
    TreeParent Universes=null;
    Universes=new TreeParent(EXtentisObjects.Universe.getDisplayName(),serverRoot,TreeObject.UNIVERSE,null,null);
    if (universePKs != null) {
      monitor.subTask("String_Node_Str");
      for (int i=0; i < universePKs.length; i++) {
        String id=universePKs[i].getPk();
        if (!id.startsWith("String_Node_Str")) {
          TreeObject obj=new TreeObject(id,serverRoot,TreeObject.UNIVERSE,new WSUniversePK(id),null);
          Universes.addChild(obj);
        }
      }
    }
    monitor.worked(1);
    if (monitor.isCanceled())     throw new InterruptedException("String_Node_Str");
    WSSynchronizationPlanPK[] SynchronizationPlanPKs=null;
    try {
      SynchronizationPlanPKs=port.getSynchronizationPlanPKs(new WSGetSynchronizationPlanPKs("String_Node_Str")).getWsSynchronizationPlanPK();
    }
 catch (    Exception e) {
      System.out.println("String_Node_Str");
    }
    TreeParent synchronizationPlans=null;
    synchronizationPlans=new TreeParent(EXtentisObjects.SynchronizationPlan.getDisplayName(),serverRoot,TreeObject.SYNCHRONIZATIONPLAN,null,null);
    if (SynchronizationPlanPKs != null) {
      monitor.subTask("String_Node_Str");
      for (int i=0; i < SynchronizationPlanPKs.length; i++) {
        String id=SynchronizationPlanPKs[i].getPk();
        TreeObject obj=new TreeObject(id,serverRoot,TreeObject.SYNCHRONIZATIONPLAN,new WSSynchronizationPlanPK(id),null);
        synchronizationPlans.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(engine);
    serverRoot.addChild(Universes);
    serverRoot.addChild(synchronizationPlans);
    serverRoot.addChild(serviceConfiguration);
    if (hasTransformers)     serverRoot.addChild(transformers);
    if (hasRoles)     serverRoot.addChild(roles);
    if (hasRoutingRules)     serverRoot.addChild(rules);
    if (hasMenus)     serverRoot.addChild(menus);
    addRevision(wUuniverse);
    monitor.done();
  }
 catch (  Exception e) {
    if (monitor.isCanceled())     throw new InterruptedException("String_Node_Str");
    e.printStackTrace();
    throw new InvocationTargetException(new XtentisException("String_Node_Str" + 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);
    TreeParent models=new TreeParent(EXtentisObjects.DataMODEL.getDisplayName(),serverRoot,TreeObject.DATA_MODEL,null,null);
    WSDataModelPK[] xdmPKs=port.getDataModelPKs(new WSRegexDataModelPKs("String_Node_Str")).getWsDataModelPKs();
    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=port.getDataClusterPKs(new WSRegexDataClusterPKs("String_Node_Str")).getWsDataClusterPKs();
    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 views=new TreeParent(EXtentisObjects.View.getDisplayName(),serverRoot,TreeObject.VIEW,null,null);
    WSViewPK[] viewPKs=port.getViewPKs((new WSGetViewPKs("String_Node_Str"))).getWsViewPK();
    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=port.getStoredProcedurePKs(new WSRegexStoredProcedure("String_Node_Str")).getWsStoredProcedurePK();
    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");
    WSRolePK[] rolePKs=null;
    boolean hasRoles=true;
    try {
      rolePKs=port.getRolePKs(new WSGetRolePKs("String_Node_Str")).getWsRolePK();
    }
 catch (    Exception e) {
      System.out.println("String_Node_Str");
      hasRoles=false;
    }
    TreeParent roles=null;
    if (hasRoles) {
      roles=new TreeParent(EXtentisObjects.Role.getDisplayName(),serverRoot,TreeObject.ROLE,null,null);
      if (rolePKs != null) {
        monitor.subTask("String_Node_Str");
        for (int i=0; i < rolePKs.length; i++) {
          String name=rolePKs[i].getPk();
          TreeObject obj=new TreeObject(name,serverRoot,TreeObject.ROLE,new WSRolePK(name),null);
          roles.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);
        }
      }
      monitor.worked(1);
      if (monitor.isCanceled())       throw new InterruptedException("String_Node_Str");
    }
    TreeObject engine=new TreeObject(EXtentisObjects.SubscriptionEngine.getDisplayName(),serverRoot,TreeObject.SUBSCRIPTION_ENGINE,null,null);
    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");
    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);
        }
      }
      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");
    }
    WSUniversePK[] universePKs=null;
    try {
      universePKs=port.getUniversePKs(new WSGetUniversePKs("String_Node_Str")).getWsUniversePK();
    }
 catch (    Exception e) {
      System.out.println("String_Node_Str");
    }
    TreeParent Universes=null;
    Universes=new TreeParent(EXtentisObjects.Universe.getDisplayName(),serverRoot,TreeObject.UNIVERSE,null,null);
    if (universePKs != null) {
      monitor.subTask("String_Node_Str");
      for (int i=0; i < universePKs.length; i++) {
        String id=universePKs[i].getPk();
        if (!id.startsWith("String_Node_Str")) {
          TreeObject obj=new TreeObject(id,serverRoot,TreeObject.UNIVERSE,new WSUniversePK(id),null);
          Universes.addChild(obj);
        }
      }
    }
    monitor.worked(1);
    if (monitor.isCanceled())     throw new InterruptedException("String_Node_Str");
    WSSynchronizationPlanPK[] SynchronizationPlanPKs=null;
    try {
      SynchronizationPlanPKs=port.getSynchronizationPlanPKs(new WSGetSynchronizationPlanPKs("String_Node_Str")).getWsSynchronizationPlanPK();
    }
 catch (    Exception e) {
      System.out.println("String_Node_Str");
    }
    TreeParent synchronizationPlans=null;
    synchronizationPlans=new TreeParent(EXtentisObjects.SynchronizationPlan.getDisplayName(),serverRoot,TreeObject.SYNCHRONIZATIONPLAN,null,null);
    if (SynchronizationPlanPKs != null) {
      monitor.subTask("String_Node_Str");
      for (int i=0; i < SynchronizationPlanPKs.length; i++) {
        String id=SynchronizationPlanPKs[i].getPk();
        TreeObject obj=new TreeObject(id,serverRoot,TreeObject.SYNCHRONIZATIONPLAN,new WSSynchronizationPlanPK(id),null);
        synchronizationPlans.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(engine);
    serverRoot.addChild(Universes);
    serverRoot.addChild(synchronizationPlans);
    serverRoot.addChild(serviceConfiguration);
    if (hasTransformers)     serverRoot.addChild(transformers);
    if (hasRoles)     serverRoot.addChild(roles);
    if (hasRoutingRules)     serverRoot.addChild(rules);
    if (hasMenus)     serverRoot.addChild(menus);
    addRevision(wUuniverse);
    monitor.done();
  }
 catch (  Exception e) {
    if (monitor.isCanceled())     throw new InterruptedException("String_Node_Str");
    e.printStackTrace();
    throw new InvocationTargetException(new XtentisException(e.getLocalizedMessage()));
  }
}