Program: 148619
Project: 148619
Buggy source:
public static boolean renameTreeOjects(TreeObject object,ServerView view) throws Exception {
  TreeParent parent=object instanceof TreeParent ? (TreeParent)object : object.getParent();
  final XtentisPort destPort=Util.getPort(new URL(object.getEndpointAddress()),object.getUniverse(),object.getUsername(),object.getPassword());
switch (object.getType()) {
case TreeObject.DATA_MODEL:
{
      WSDataModelPK key=(WSDataModelPK)object.getWsKey();
      WSDataModelPK newKey=new WSDataModelPK(key.getPk());
      if (destPort.existsDataModel(new WSExistsDataModel((WSDataModelPK)object.getWsKey())).is_true()) {
        String newName=getNewName(view.getSite().getShell(),key.getPk(),destPort,object.getType());
        if (newName == null)         return false;
        newKey=new WSDataModelPK(newName);
      }
      XtentisPort originalPort=Util.getPort(new URL(object.getEndpointAddress()),object.getUniverse(),object.getUsername(),object.getPassword());
      WSDataModel originalDataModel=originalPort.getDataModel(new WSGetDataModel(key));
      WSDataModel newDataModel=new WSDataModel(newKey.getPk(),originalDataModel.getDescription(),originalDataModel.getXsdSchema());
      destPort.putDataModel(new WSPutDataModel(newDataModel));
      TreeObject newObj=new TreeObject(newKey.getPk(),parent != null ? parent.getServerRoot() : object.getServerRoot(),object.getType(),newKey,null);
      newTreeObject(newObj,parent);
    }
  break;
case TreeObject.VIEW:
{
  WSViewPK key=(WSViewPK)object.getWsKey();
  WSViewPK newKey=new WSViewPK(key.getPk());
  if (destPort.existsView(new WSExistsView((WSViewPK)object.getWsKey())).is_true()) {
    String newName=getNewName(view.getSite().getShell(),key.getPk(),destPort,object.getType());
    if (newName == null)     return false;
    newKey=new WSViewPK(newName);
  }
  XtentisPort originalPort=Util.getPort(new URL(object.getEndpointAddress()),object.getUniverse(),object.getUsername(),object.getPassword());
  WSView originalView=originalPort.getView(new WSGetView(key));
  WSView newView=new WSView(newKey.getPk(),originalView.getDescription(),originalView.getViewableBusinessElements(),originalView.getWhereConditions(),originalView.getSearchableBusinessElements());
  destPort.putView(new WSPutView(newView));
  TreeObject newObj=new TreeObject(newKey.getPk(),parent != null ? parent.getServerRoot() : object.getServerRoot(),object.getType(),newKey,null);
  newTreeObject(newObj,parent);
}
break;
case TreeObject.DATA_CLUSTER:
{
WSDataClusterPK key=(WSDataClusterPK)object.getWsKey();
WSDataClusterPK newKey=new WSDataClusterPK(key.getPk());
if (destPort.existsDataCluster(new WSExistsDataCluster((WSDataClusterPK)object.getWsKey())).is_true()) {
String newName=getNewName(view.getSite().getShell(),key.getPk(),destPort,object.getType());
if (newName == null) return false;
newKey=new WSDataClusterPK(newName);
}
XtentisPort originalPort=Util.getPort(new URL(object.getEndpointAddress()),object.getUniverse(),object.getUsername(),object.getPassword());
WSDataCluster originalDataCluster=originalPort.getDataCluster(new WSGetDataCluster(key));
WSDataCluster newDataCluster=new WSDataCluster(newKey.getPk(),originalDataCluster.getDescription(),originalDataCluster.getVocabulary());
destPort.putDataCluster(new WSPutDataCluster(newDataCluster));
TreeObject newObj=new TreeObject(newKey.getPk(),parent != null ? parent.getServerRoot() : object.getServerRoot(),object.getType(),newKey,null);
newTreeObject(newObj,parent);
}
break;
case TreeObject.STORED_PROCEDURE:
{
WSStoredProcedurePK key=(WSStoredProcedurePK)object.getWsKey();
WSStoredProcedurePK newKey=new WSStoredProcedurePK(key.getPk());
if (destPort.existsStoredProcedure(new WSExistsStoredProcedure((WSStoredProcedurePK)object.getWsKey())).is_true()) {
String newName=getNewName(view.getSite().getShell(),key.getPk(),destPort,object.getType());
if (newName == null) return false;
newKey=new WSStoredProcedurePK(newName);
}
XtentisPort originalPort=Util.getPort(new URL(object.getEndpointAddress()),object.getUniverse(),object.getUsername(),object.getPassword());
WSStoredProcedure originalStoredProcedure=originalPort.getStoredProcedure(new WSGetStoredProcedure(key));
WSStoredProcedure newStoredProcedure=new WSStoredProcedure(newKey.getPk(),originalStoredProcedure.getDescription(),originalStoredProcedure.getProcedure());
destPort.putStoredProcedure(new WSPutStoredProcedure(newStoredProcedure));
TreeObject newObj=new TreeObject(newKey.getPk(),parent != null ? parent.getServerRoot() : object.getServerRoot(),object.getType(),newKey,null);
newTreeObject(newObj,parent);
}
break;
case TreeObject.ROLE:
{
WSRolePK key=(WSRolePK)object.getWsKey();
WSRolePK newKey=new WSRolePK(key.getPk());
if (destPort.existsRole(new WSExistsRole((WSRolePK)object.getWsKey())).is_true()) {
String newName=getNewName(view.getSite().getShell(),key.getPk(),destPort,object.getType());
if (newName == null) return false;
newKey=new WSRolePK(newName);
}
XtentisPort originalPort=Util.getPort(new URL(object.getEndpointAddress()),object.getUniverse(),object.getUsername(),object.getPassword());
WSRole originalRole=originalPort.getRole(new WSGetRole(key));
WSRole newRole=new WSRole(newKey.getPk(),originalRole.getDescription(),originalRole.getSpecification());
destPort.putRole(new WSPutRole(newRole));
TreeObject newObj=new TreeObject(newKey.getPk(),parent != null ? parent.getServerRoot() : object.getServerRoot(),object.getType(),newKey,null);
newTreeObject(newObj,parent);
}
break;
case TreeObject.ROUTING_RULE:
{
WSRoutingRulePK key=(WSRoutingRulePK)object.getWsKey();
WSRoutingRulePK newKey=new WSRoutingRulePK(key.getPk());
if (destPort.existsRoutingRule(new WSExistsRoutingRule((WSRoutingRulePK)object.getWsKey())).is_true()) {
String newName=getNewName(view.getSite().getShell(),key.getPk(),destPort,object.getType());
if (newName == null) return false;
newKey=new WSRoutingRulePK(newName);
}
XtentisPort originalPort=Util.getPort(new URL(object.getEndpointAddress()),object.getUniverse(),object.getUsername(),object.getPassword());
WSRoutingRule originalRoutingRule=originalPort.getRoutingRule(new WSGetRoutingRule(key));
WSRoutingRule newRoutingRule=new WSRoutingRule(newKey.getPk(),originalRoutingRule.getDescription(),originalRoutingRule.isSynchronous(),originalRoutingRule.getConcept(),originalRoutingRule.getServiceJNDI(),originalRoutingRule.getParameters(),originalRoutingRule.getWsRoutingRuleExpressions(),originalRoutingRule.getCondition(),originalRoutingRule.getDeactive());
destPort.putRoutingRule(new WSPutRoutingRule(newRoutingRule));
TreeObject newObj=new TreeObject(newKey.getPk(),parent != null ? parent.getServerRoot() : object.getServerRoot(),object.getType(),newKey,null);
newTreeObject(newObj,parent);
}
break;
case TreeObject.TRANSFORMER:
{
WSTransformerV2PK key=(WSTransformerV2PK)object.getWsKey();
WSTransformerV2PK newKey=new WSTransformerV2PK(key.getPk());
if (destPort.existsTransformerV2(new WSExistsTransformerV2((WSTransformerV2PK)object.getWsKey())).is_true()) {
String newName=getNewName(view.getSite().getShell(),key.getPk(),destPort,object.getType());
if (newName == null) return false;
newKey=new WSTransformerV2PK(newName);
}
XtentisPort originalPort=Util.getPort(new URL(object.getEndpointAddress()),object.getUniverse(),object.getUsername(),object.getPassword());
WSTransformerV2 originalTransformer=originalPort.getTransformerV2(new WSGetTransformerV2(key));
WSTransformerV2 newTransformer=new WSTransformerV2(newKey.getPk(),originalTransformer.getDescription(),originalTransformer.getProcessSteps());
destPort.putTransformerV2(new WSPutTransformerV2(newTransformer));
TreeObject newObj=new TreeObject(newKey.getPk(),parent != null ? parent.getServerRoot() : object.getServerRoot(),object.getType(),newKey,null);
newTreeObject(newObj,parent);
}
break;
case TreeObject.MENU:
{
WSMenuPK key=(WSMenuPK)object.getWsKey();
WSMenuPK newKey=new WSMenuPK(key.getPk());
if (destPort.existsMenu(new WSExistsMenu((WSMenuPK)object.getWsKey())).is_true()) {
String newName=getNewName(view.getSite().getShell(),key.getPk(),destPort,object.getType());
if (newName == null) return false;
newKey=new WSMenuPK(newName);
}
XtentisPort originalPort=Util.getPort(new URL(object.getEndpointAddress()),object.getUniverse(),object.getUsername(),object.getPassword());
WSMenu originalMenu=originalPort.getMenu(new WSGetMenu(key));
WSMenu newMenu=new WSMenu(newKey.getPk(),originalMenu.getDescription(),originalMenu.getMenuEntries());
destPort.putMenu(new WSPutMenu(newMenu));
TreeObject newObj=new TreeObject(newKey.getPk(),parent != null ? parent.getServerRoot() : object.getServerRoot(),object.getType(),newKey,null);
newTreeObject(newObj,parent);
}
break;
case TreeObject.UNIVERSE:
{
WSUniversePK key=(WSUniversePK)object.getWsKey();
WSUniversePK newKey=new WSUniversePK(key.getPk());
if (destPort.existsUniverse(new WSExistsUniverse((WSUniversePK)object.getWsKey())).is_true()) {
String newName=getNewName(view.getSite().getShell(),key.getPk(),destPort,object.getType());
if (newName == null) return false;
newKey=new WSUniversePK(newName);
}
XtentisPort originalPort=Util.getPort(new URL(object.getEndpointAddress()),object.getUniverse(),object.getUsername(),object.getPassword());
WSUniverse originalUniverse=originalPort.getUniverse(new WSGetUniverse(key));
WSUniverse newUniverse=new WSUniverse(newKey.getPk(),originalUniverse.getDescription(),originalUniverse.getXtentisObjectsRevisionIDs(),originalUniverse.getDefaultItemsRevisionID(),originalUniverse.getItemsRevisionIDs());
destPort.putUniverse(new WSPutUniverse(newUniverse));
TreeObject newObj=new TreeObject(newKey.getPk(),parent != null ? parent.getServerRoot() : object.getServerRoot(),object.getType(),newKey,null);
newTreeObject(newObj,parent);
}
break;
case TreeObject.SYNCHRONIZATIONPLAN:
{
WSSynchronizationPlanPK key=(WSSynchronizationPlanPK)object.getWsKey();
WSSynchronizationPlanPK newKey=new WSSynchronizationPlanPK(key.getPk());
if (destPort.existsSynchronizationPlan(new WSExistsSynchronizationPlan((WSSynchronizationPlanPK)object.getWsKey())).is_true()) {
String newName=getNewName(view.getSite().getShell(),key.getPk(),destPort,object.getType());
if (newName == null) return false;
newKey=new WSSynchronizationPlanPK(newName);
}
XtentisPort originalPort=Util.getPort(new URL(object.getEndpointAddress()),object.getUniverse(),object.getUsername(),object.getPassword());
WSSynchronizationPlan originalSynchronizationPlan=originalPort.getSynchronizationPlan(new WSGetSynchronizationPlan(key));
WSSynchronizationPlan newSynchronizationPlan=new WSSynchronizationPlan(newKey.getPk(),originalSynchronizationPlan.getDescription(),originalSynchronizationPlan.getRemoteSystemName(),originalSynchronizationPlan.getRemoteSystemURL(),originalSynchronizationPlan.getRemoteSystemUsername(),originalSynchronizationPlan.getRemoteSystemPassword(),originalSynchronizationPlan.getTisURL(),originalSynchronizationPlan.getTisUsername(),originalSynchronizationPlan.getTisPassword(),originalSynchronizationPlan.getTisParameters(),originalSynchronizationPlan.getXtentisObjectsSynchronizations(),originalSynchronizationPlan.getItemsSynchronizations());
destPort.putSynchronizationPlan(new WSPutSynchronizationPlan(newSynchronizationPlan));
TreeObject newObj=new TreeObject(newKey.getPk(),parent != null ? parent.getServerRoot() : object.getServerRoot(),object.getType(),newKey,null);
newTreeObject(newObj,parent);
}
break;
default :
}
return true;
}

Fixed version (ground truth):
public static boolean renameTreeOjects(TreeObject object,ServerView view) throws Exception {
  TreeParent parent=object instanceof TreeParent ? (TreeParent)object : object.getParent();
  final XtentisPort destPort=Util.getPort(new URL(object.getEndpointAddress()),object.getUniverse(),object.getUsername(),object.getPassword());
switch (object.getType()) {
case TreeObject.DATA_MODEL:
{
      WSDataModelPK key=(WSDataModelPK)object.getWsKey();
      WSDataModelPK newKey=new WSDataModelPK(key.getPk());
      if (destPort.existsDataModel(new WSExistsDataModel((WSDataModelPK)object.getWsKey())).is_true()) {
        String newName=getNewName(view.getSite().getShell(),key.getPk(),destPort,object.getType());
        if (newName == null)         return false;
        newKey=new WSDataModelPK(newName);
      }
      XtentisPort originalPort=Util.getPort(new URL(object.getEndpointAddress()),object.getUniverse(),object.getUsername(),object.getPassword());
      WSDataModel originalDataModel=originalPort.getDataModel(new WSGetDataModel(key));
      WSDataModel newDataModel=new WSDataModel(newKey.getPk(),originalDataModel.getDescription(),originalDataModel.getXsdSchema());
      destPort.putDataModel(new WSPutDataModel(newDataModel));
      TreeObject newObj=new TreeObject(newKey.getPk(),parent != null ? parent.getServerRoot() : object.getServerRoot(),object.getType(),newKey,null);
      newTreeObject(newObj,parent);
    }
  break;
case TreeObject.VIEW:
{
  WSViewPK key=(WSViewPK)object.getWsKey();
  WSViewPK newKey=new WSViewPK(key.getPk());
  if (destPort.existsView(new WSExistsView((WSViewPK)object.getWsKey())).is_true()) {
    String newName=getNewName(view.getSite().getShell(),key.getPk(),destPort,object.getType());
    if (newName == null)     return false;
    newKey=new WSViewPK(newName);
  }
  XtentisPort originalPort=Util.getPort(new URL(object.getEndpointAddress()),object.getUniverse(),object.getUsername(),object.getPassword());
  WSView originalView=originalPort.getView(new WSGetView(key));
  WSView newView=new WSView(newKey.getPk(),originalView.getDescription(),originalView.getViewableBusinessElements(),originalView.getWhereConditions(),originalView.getSearchableBusinessElements(),null,new WSBoolean(false));
  destPort.putView(new WSPutView(newView));
  TreeObject newObj=new TreeObject(newKey.getPk(),parent != null ? parent.getServerRoot() : object.getServerRoot(),object.getType(),newKey,null);
  newTreeObject(newObj,parent);
}
break;
case TreeObject.DATA_CLUSTER:
{
WSDataClusterPK key=(WSDataClusterPK)object.getWsKey();
WSDataClusterPK newKey=new WSDataClusterPK(key.getPk());
if (destPort.existsDataCluster(new WSExistsDataCluster((WSDataClusterPK)object.getWsKey())).is_true()) {
String newName=getNewName(view.getSite().getShell(),key.getPk(),destPort,object.getType());
if (newName == null) return false;
newKey=new WSDataClusterPK(newName);
}
XtentisPort originalPort=Util.getPort(new URL(object.getEndpointAddress()),object.getUniverse(),object.getUsername(),object.getPassword());
WSDataCluster originalDataCluster=originalPort.getDataCluster(new WSGetDataCluster(key));
WSDataCluster newDataCluster=new WSDataCluster(newKey.getPk(),originalDataCluster.getDescription(),originalDataCluster.getVocabulary());
destPort.putDataCluster(new WSPutDataCluster(newDataCluster));
TreeObject newObj=new TreeObject(newKey.getPk(),parent != null ? parent.getServerRoot() : object.getServerRoot(),object.getType(),newKey,null);
newTreeObject(newObj,parent);
}
break;
case TreeObject.STORED_PROCEDURE:
{
WSStoredProcedurePK key=(WSStoredProcedurePK)object.getWsKey();
WSStoredProcedurePK newKey=new WSStoredProcedurePK(key.getPk());
if (destPort.existsStoredProcedure(new WSExistsStoredProcedure((WSStoredProcedurePK)object.getWsKey())).is_true()) {
String newName=getNewName(view.getSite().getShell(),key.getPk(),destPort,object.getType());
if (newName == null) return false;
newKey=new WSStoredProcedurePK(newName);
}
XtentisPort originalPort=Util.getPort(new URL(object.getEndpointAddress()),object.getUniverse(),object.getUsername(),object.getPassword());
WSStoredProcedure originalStoredProcedure=originalPort.getStoredProcedure(new WSGetStoredProcedure(key));
WSStoredProcedure newStoredProcedure=new WSStoredProcedure(newKey.getPk(),originalStoredProcedure.getDescription(),originalStoredProcedure.getProcedure());
destPort.putStoredProcedure(new WSPutStoredProcedure(newStoredProcedure));
TreeObject newObj=new TreeObject(newKey.getPk(),parent != null ? parent.getServerRoot() : object.getServerRoot(),object.getType(),newKey,null);
newTreeObject(newObj,parent);
}
break;
case TreeObject.ROLE:
{
WSRolePK key=(WSRolePK)object.getWsKey();
WSRolePK newKey=new WSRolePK(key.getPk());
if (destPort.existsRole(new WSExistsRole((WSRolePK)object.getWsKey())).is_true()) {
String newName=getNewName(view.getSite().getShell(),key.getPk(),destPort,object.getType());
if (newName == null) return false;
newKey=new WSRolePK(newName);
}
XtentisPort originalPort=Util.getPort(new URL(object.getEndpointAddress()),object.getUniverse(),object.getUsername(),object.getPassword());
WSRole originalRole=originalPort.getRole(new WSGetRole(key));
WSRole newRole=new WSRole(newKey.getPk(),originalRole.getDescription(),originalRole.getSpecification());
destPort.putRole(new WSPutRole(newRole));
TreeObject newObj=new TreeObject(newKey.getPk(),parent != null ? parent.getServerRoot() : object.getServerRoot(),object.getType(),newKey,null);
newTreeObject(newObj,parent);
}
break;
case TreeObject.ROUTING_RULE:
{
WSRoutingRulePK key=(WSRoutingRulePK)object.getWsKey();
WSRoutingRulePK newKey=new WSRoutingRulePK(key.getPk());
if (destPort.existsRoutingRule(new WSExistsRoutingRule((WSRoutingRulePK)object.getWsKey())).is_true()) {
String newName=getNewName(view.getSite().getShell(),key.getPk(),destPort,object.getType());
if (newName == null) return false;
newKey=new WSRoutingRulePK(newName);
}
XtentisPort originalPort=Util.getPort(new URL(object.getEndpointAddress()),object.getUniverse(),object.getUsername(),object.getPassword());
WSRoutingRule originalRoutingRule=originalPort.getRoutingRule(new WSGetRoutingRule(key));
WSRoutingRule newRoutingRule=new WSRoutingRule(newKey.getPk(),originalRoutingRule.getDescription(),originalRoutingRule.isSynchronous(),originalRoutingRule.getConcept(),originalRoutingRule.getServiceJNDI(),originalRoutingRule.getParameters(),originalRoutingRule.getWsRoutingRuleExpressions(),originalRoutingRule.getCondition(),originalRoutingRule.getDeactive());
destPort.putRoutingRule(new WSPutRoutingRule(newRoutingRule));
TreeObject newObj=new TreeObject(newKey.getPk(),parent != null ? parent.getServerRoot() : object.getServerRoot(),object.getType(),newKey,null);
newTreeObject(newObj,parent);
}
break;
case TreeObject.TRANSFORMER:
{
WSTransformerV2PK key=(WSTransformerV2PK)object.getWsKey();
WSTransformerV2PK newKey=new WSTransformerV2PK(key.getPk());
if (destPort.existsTransformerV2(new WSExistsTransformerV2((WSTransformerV2PK)object.getWsKey())).is_true()) {
String newName=getNewName(view.getSite().getShell(),key.getPk(),destPort,object.getType());
if (newName == null) return false;
newKey=new WSTransformerV2PK(newName);
}
XtentisPort originalPort=Util.getPort(new URL(object.getEndpointAddress()),object.getUniverse(),object.getUsername(),object.getPassword());
WSTransformerV2 originalTransformer=originalPort.getTransformerV2(new WSGetTransformerV2(key));
WSTransformerV2 newTransformer=new WSTransformerV2(newKey.getPk(),originalTransformer.getDescription(),originalTransformer.getProcessSteps());
destPort.putTransformerV2(new WSPutTransformerV2(newTransformer));
TreeObject newObj=new TreeObject(newKey.getPk(),parent != null ? parent.getServerRoot() : object.getServerRoot(),object.getType(),newKey,null);
newTreeObject(newObj,parent);
}
break;
case TreeObject.MENU:
{
WSMenuPK key=(WSMenuPK)object.getWsKey();
WSMenuPK newKey=new WSMenuPK(key.getPk());
if (destPort.existsMenu(new WSExistsMenu((WSMenuPK)object.getWsKey())).is_true()) {
String newName=getNewName(view.getSite().getShell(),key.getPk(),destPort,object.getType());
if (newName == null) return false;
newKey=new WSMenuPK(newName);
}
XtentisPort originalPort=Util.getPort(new URL(object.getEndpointAddress()),object.getUniverse(),object.getUsername(),object.getPassword());
WSMenu originalMenu=originalPort.getMenu(new WSGetMenu(key));
WSMenu newMenu=new WSMenu(newKey.getPk(),originalMenu.getDescription(),originalMenu.getMenuEntries());
destPort.putMenu(new WSPutMenu(newMenu));
TreeObject newObj=new TreeObject(newKey.getPk(),parent != null ? parent.getServerRoot() : object.getServerRoot(),object.getType(),newKey,null);
newTreeObject(newObj,parent);
}
break;
case TreeObject.UNIVERSE:
{
WSUniversePK key=(WSUniversePK)object.getWsKey();
WSUniversePK newKey=new WSUniversePK(key.getPk());
if (destPort.existsUniverse(new WSExistsUniverse((WSUniversePK)object.getWsKey())).is_true()) {
String newName=getNewName(view.getSite().getShell(),key.getPk(),destPort,object.getType());
if (newName == null) return false;
newKey=new WSUniversePK(newName);
}
XtentisPort originalPort=Util.getPort(new URL(object.getEndpointAddress()),object.getUniverse(),object.getUsername(),object.getPassword());
WSUniverse originalUniverse=originalPort.getUniverse(new WSGetUniverse(key));
WSUniverse newUniverse=new WSUniverse(newKey.getPk(),originalUniverse.getDescription(),originalUniverse.getXtentisObjectsRevisionIDs(),originalUniverse.getDefaultItemsRevisionID(),originalUniverse.getItemsRevisionIDs());
destPort.putUniverse(new WSPutUniverse(newUniverse));
TreeObject newObj=new TreeObject(newKey.getPk(),parent != null ? parent.getServerRoot() : object.getServerRoot(),object.getType(),newKey,null);
newTreeObject(newObj,parent);
}
break;
case TreeObject.SYNCHRONIZATIONPLAN:
{
WSSynchronizationPlanPK key=(WSSynchronizationPlanPK)object.getWsKey();
WSSynchronizationPlanPK newKey=new WSSynchronizationPlanPK(key.getPk());
if (destPort.existsSynchronizationPlan(new WSExistsSynchronizationPlan((WSSynchronizationPlanPK)object.getWsKey())).is_true()) {
String newName=getNewName(view.getSite().getShell(),key.getPk(),destPort,object.getType());
if (newName == null) return false;
newKey=new WSSynchronizationPlanPK(newName);
}
XtentisPort originalPort=Util.getPort(new URL(object.getEndpointAddress()),object.getUniverse(),object.getUsername(),object.getPassword());
WSSynchronizationPlan originalSynchronizationPlan=originalPort.getSynchronizationPlan(new WSGetSynchronizationPlan(key));
WSSynchronizationPlan newSynchronizationPlan=new WSSynchronizationPlan(newKey.getPk(),originalSynchronizationPlan.getDescription(),originalSynchronizationPlan.getRemoteSystemName(),originalSynchronizationPlan.getRemoteSystemURL(),originalSynchronizationPlan.getRemoteSystemUsername(),originalSynchronizationPlan.getRemoteSystemPassword(),originalSynchronizationPlan.getTisURL(),originalSynchronizationPlan.getTisUsername(),originalSynchronizationPlan.getTisPassword(),originalSynchronizationPlan.getTisParameters(),originalSynchronizationPlan.getXtentisObjectsSynchronizations(),originalSynchronizationPlan.getItemsSynchronizations());
destPort.putSynchronizationPlan(new WSPutSynchronizationPlan(newSynchronizationPlan));
TreeObject newObj=new TreeObject(newKey.getPk(),parent != null ? parent.getServerRoot() : object.getServerRoot(),object.getType(),newKey,null);
newTreeObject(newObj,parent);
}
break;
default :
}
return true;
}