It's a story from the Dhammapada Commentary.
Here's a very interesting commentary on the commentary:
http://www.nationmultimedia.com/home/2010/07/26/opinion/Are-Thai-Buddhists-More-Heretical-Than-the-Heretic-30134559.html


thomaslaw03 wrote thus at 09:03 AM 08-01-13:
>Dear Pali friends,
>
>I am interested in the story of the Twin Miracle (Yamaka Patihara)
>that the Buddha showed in Sravasti (?). The story seems rather
>unusual, superstitious, and irrational. Could anyone give some
>explanations and textual information of the story please?
>
>Thank you.
>
>Thomas Law