After upgrading to OS X Yosemite I've noticed that my Mac's name kept on changing on a regular basis. Not only that, but my Mac was appearing multiple times in Finder's 'Shared' list. This seems to be an issue with Yosemite itself and there is no permanent fix for it.
This is what Finder starts to look like after a day or so. The computer name keeps changing with a number being incremented in brackets.
The issue is due to Bonjour and sleep proxies. I found that by turning off 'Power Nap' helped somewhat, but didn't fix the issue. If 'Power Nap' is disabled, Finder no longer shows multiple ghost shared devices having the same name. Like this:
However, the name of my Mac keeps changing even after Power Nap is disabled.
To disable power nap, go to System Preferences, Energy Saver and uptick the Power Nap option.
This is not the final solution, and we will have to wait for Apple to provide a real fix.
-i