Sahih Muslim Book 37, Hadith Number 6656.
Chapter : The words of Allah “The good deeds take away the evil deeds”.
Ibn Mas’ud reported that a person came to Allah’s Messenger (may peace be upon him) and told him that he had kissed a woman or touched her with his hand or did something like this. He inquired of him about its expiation. It was (on this occasion) that Allah, the Exalted and Glorious, revealed this verse (as mentioned above).