It is narrated from Sayyiduna Anas bin Malik (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) recited this verse: "A good word is like a good tree" and said: "What is meant by it is the date palm." And he (peace and blessings be upon him) recited: "A bad word is like a bad tree" and said: "It is the colocynth (bitter gourd)."
The wording of both narrations is the same.
Imam al-Tirmidhi (may Allah have mercy on him) narrated it from Abd bin Humayd (may Allah have mercy on him), from Abu al-Walid (may Allah have mercy on him), from Hammad (may Allah have mercy on him), with his chain, with the like of it.
And (Imam al-Tirmidhi (may Allah have mercy on him) also narrated it) from Ahmad bin Abdah (may Allah have mercy on him), from Hammad bin Zayd (may Allah have mercy on him), from Shu'ayb (may Allah have mercy on him), and he did not narrate it as marfu' (attributed to the Prophet).