How to clone an entity?
You could call Replicate's  replicate_entity_by_id($entity_type, $id) method. And maybe hook it's API for custom behavior, see here.

entity_ui_clone_entity won't create the new entity, but only prepare your entity for creation, and could be used like this:

$my_clone = entity_ui_clone_entity('your_bundle', $my_entity);
entity_save('your_bundle', $my_clone);


Or if you created a method for saving your entity, use it direclty:

my_entity_save($my_clone);