Since I'm confused with these two phrases, I did a search in Google Books hoping to find some examples. But then I found this paragraph:
Two private spaces or replicas cannot contain the same object with two distinct references. For example, during a disconnected phase, the pump can be present in two different private spaces and still be designated with the same name. During a meeting, two replicas use a same name to access the pump object(local or distant).
This made me more confused. I don't really understand why "the same name" was used in one sentence while "a same name" was used in another. Are there any differences between them?
the same name
but no results at all fora same name
. In Google books Ngram Viewer, the ratio between the two is about 10,000:1, and most of the results that do exist for the latter use same-name attributively, with the preceding article a present because of the following noun, so the actual ratio is even higher.