Common popularity
From: Anecdotes of the Pious Ones, #64 V. 1

A certain man had become famous among people. They spoke of his Taqwa and religiosity. The commoners spoke of his grandeur, some had repeatedly mentioned this man and his fame among the commoners to Imam Sadiq (as).

Imam thought to evaluate this "pious" man when he isn't with people.

One day, he went to him anonymously and saw that he was surrounded by many people. Imam (as) watched quietly. The first thing that the Imam (as) noticed was this man's deceiving and pretentious actions.

Then when he was alone, Imam followed him quietly to discover his actions. Soon that man went to a baker's shop. To Imam's surprise, the man took advantage of the baker's neglect and hid two loafs of bread under his garb. Imam (as) thought that perhaps the man had already paid for the bread. Yet he was puzzled as to why he took it when the baker was not attending to him.

Imam (as) continued to follow him, he was still thinking about the event at the baker's shop that the man stopped by a fruit stand. He waited for the owner to look away and he took two pomegranates and hid them under his garb, and walked away. Imam was still puzzled, Imam's (as) astonishment doubled when he saw that the man went to a sick man and gave him the bread and the pomegranates.

The Imam (as) went to him and said: " I have seen a strange behavior from you today." Thus he told him the whole experience and requested clarification. He looked at the Imam and said: "I assume you are Ja'far ibn-e Muhammad?"

"That is true, I am Ja'far ibne Muhammad."

"Of course you are the son of the Prophet of Allah. But I am sorry that you are so ignorant."

"What ignorance have seen in me?"

"This question shows extreme ignorance. Obviously you can't figure out a simple account. Don't you know that Allah says in the Quran: Whoever does a good deed, he shall be reward ten times as much. Also Quran says and whoever commits an evil deed, he will be punished only for one times as much. Thus I stole two loafs of bread, and I gained two sins. Then I stole two pomegranates and earned two more sins. That is a total of four sins. But I gave the two breads and the two pomegranates in the way of Allah. Each counts as ten good deeds. Thus I have earned fourty good deeds, four minus fourty is thirty six. Thus I have thirty six pure good deeds. This is a simple math which you can't understand."

"May Allah kill you. You are an ignorant man, that you have started calculating as such. Don't you know that Allah says: Allah accepts the deed of the pious. Now a simple math is sufficient to make you aware of your mistake. As you say, you gained four sins. Also since you have given stolen material to people under the name of charity and good will, you have not earned any good, Thus you have gained a sin for each deed. Thus you have a total of eight sins. Moreover, you have no good deeds." Imam (as) told him this and while his shocked gaze was fixed on the Imam, he (as) left the man.

When the Imam (as) told this story to his friends he added: "It is these kinds of ugly and erroneous miscalculations about religions obligations that leave people astray while they misguide others."[1]

[1] Wasael v. 2 p.57