What does drupal_clone($node) do What does drupal_clone($node) do in Drupal? Will it clone a node?  I know the node will be saved only if node_save($clone) is rendered. So what will happen when drupal_clone($node) is rendered ?

/**
 * Generate a node preview.
 */
function node_preview($node) {
    if (node_access('create', $node) || node_access('update', $node)) {
        // Load the user's name when needed.
        if (isset($node-&gt;name)) {
            // The use of isset() is mandatory in the context of user IDs, because
            // user ID 0 denotes the anonymous user.
            if ($user = user_load(array('name' =&gt; $node-&gt;name))) {
                $node-&gt;uid = $user-&gt;uid;
                $node-&gt;picture = $user-&gt;picture;
            } else {
                $node-&gt;uid = 0; // anonymous user
            }
        } else if ($node-&gt;uid) {
            $user = user_load(array('uid' =&gt; $node-&gt;uid));
            $node-&gt;name = $user-&gt;name;
            $node-&gt;picture = $user-&gt;picture;
        }

        $node-&gt;changed = time();

        // Extract a teaser, if it hasn't been set (e.g. by a module-provided
        // 'teaser' form item).
        if (!isset($node-&gt;teaser)) {
            $node-&gt;teaser = empty($node-&gt;body) ? '' : node_teaser($node-&gt;body, $node-&gt;format);
            // Chop off the teaser from the body if needed.
            if (!$node-&gt;teaser_include &amp;&amp; $node-&gt;teaser == substr($node-&gt;body, 0, strlen($node-&gt;teaser))) {
                $node-&gt;body = substr($node-&gt;body, strlen($node-&gt;teaser));
            }
        }

        // Display a preview of the node.
        // Previewing alters $node so it needs to be cloned.
        if (!form_get_errors()) {
            $cloned_node = drupal_clone($node);
            $cloned_node-&gt;build_mode = NODE_BUILD_PREVIEW;
            $output = theme('node_preview', $cloned_node);
        }
        drupal_set_title(t('Preview'));

        return $output;
    }
}


Real Issue

I am getting the node cloned when clicking the preview button. Is it related to any code changes?
allows users to make a copy of an existing item of site content (a node) and then edit that copy. The authorship is set to the current user, the menu and url aliases are reset, and the words "Clone of" are inserted into the title to remind you that you are not editing the original content.

https://www.drupal.org/project/node_clone