int n = params.size();
for (int i = 0; i < n; ++i)
{
NodeParam param = (NodeParam) params.get(i);
param = (NodeParam) param.clone();
NamedObjectCollectionUtil.createUniqueName(param, targetSocket.getParamList());
targetSocket.addParam(param, - 1);
param.maintainReferences(ModelObject.RESOLVE_GLOBAL_REFS | ModelObject.RESOLVE_LOCAL_REFS);