The Bodhisatta was once a rich merchant of Benares who built an almonry and distributed much alms. On his deathbed, he asked his son to continue with the alms, and, after death, he was reborn as Sakka. His son followed him and became the god Canda. His son Suriya, Suriya's son Mātalī, and Mātalī's son Pańcasikha, all followed in the same path. But the sixth of the line, Bilārikosiya, became a miser and burnt the almonry. Sakka and the others then came separately, in the guise of brahmins, to visit him and to ask for alms. Kosiya refused their request until each one uttered a little verse, when he was asked to enter and receive a small gift. Kosiya asked the servant to give each a little unhusked rice. This was refused, and in the end he was obliged to give the brahmins cooked rice, meant for cows. Each swallowed a mouthful, but then let it stick in his throat and lay down as if dead. Kosiya, very frightened, had a meal prepared, which he put into their bowls, and then, calling in the passers by, asked them to note how the brahmins, in their greed, had eaten too much and died. But the brahmins arose, spat out the rice, and publicly shamed Kosiya by showing up his miserliness and the manner in which he had disgraced his ancestors. Then each revealed his identity and departed. Bilārikosiya mended his ways and became most generous.
The story was related to a monk reputed for his great generosity; he would not even drink a cup of water without sharing it. The monk is identified with Bilārikosiya, and the Buddha related the story in order to show how he had changed his ways. Sāriputta was Canda, Moggallāna Suriya, Kassapa Mātalī and Ananda Pańcasikha. J.iv.62 9.