Programmatically created node gets created three times, produces error
Have you installed the drupal for a specific language. If yes than please take care of the language on the time of node creation. e.g. for engisg code is en.

Also please make sure that the function you are calling is attached to only 1 menu. It should not be called by several other source on that module. So, please check HOOK_install, HOOK_menu, HOOK_init wherever you add code for the same.