The line you are looking for is:
if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
else
menuentry_id_option=""
fi
Gives you the value of `feature_menuentry_id` and if it's equal to `y` then it will add the `--id` parameter to your menu entries:
menuentry 'Ubuntu 14.04 Trusty Tahr (on sda5)' --class ubuntu --class gnu-linux --class gnu --class os --id 'gnulinux-simple-fe3a2033-d77c-4d8c-ba04-3bb27b267dc2' {
If it's not, then it will leave it as is:
menuentry 'Ubuntu 14.04 Trusty Tahr (on sda5)' --class ubuntu --class gnu-linux --class gnu --class os 'gnulinux-simple-fe3a2033-d77c-4d8c-ba04-3bb27b267dc2' {
The `--id` parameter for `menuentry` isn't defined in the manual for `menuentry`, but one can haphazardly guess is the UUID for the partition the kernel is supposed to boot from.