class AllocationUtils {

    public static TNodeTemplate clone(TNodeTemplate nodeTemplate, boolean changeNames) {
        TNodeTemplate cloned = BackendUtils.clone(nodeTemplate);

        // name used in equals -> make unique to avoid equals bugs caused by cloning
        if (changeNames) {
            cloned.setName(cloned.getId() + idCounter++);
        }
        return cloned;
    }

}