Sayyiduna Hani bin Yazid (may Allah be pleased with him) said: I came with the delegation of my people to the Prophet (peace and blessings be upon him), and he (peace and blessings be upon him) saw that the people called me Abu al-Hakam. So he (peace and blessings be upon him) said: "Allah alone is al-Hakam (the Judge); why are you called Abu al-Hakam?" I said: When some matter arose among my people, they would come to me for judgement, and I would judge between them, and they would be satisfied with my judgement. He (peace and blessings be upon him) asked: "Do you have any children?" I said: Yes. He (peace and blessings be upon him) asked: "What is the name of the eldest of them?" I said: Shurayh. He (peace and blessings be upon him) said: "Then you are Abu Shurayh."
Hadith Referenceالمعجم الكبير للطبراني / باب الهاء / 18685