 Several cultural references are made during Homer 's flashback to his previous visit to New York City . During the entire flashback , " The Entertainer " , a piece made famous by the film The Sting , is played . Writer Ian Maxtone @-@ Graham had brought the piece to the attention of director Jim Reardon and asked him to try to fit the piece into the flashback . Maxtone @-@ Graham later commented , " It turned out that the music and the visual gags fit each other perfectly . " In the beginning of the scene , Homer passes by three pornographic film theaters , which are playing " The Godfather 's Parts , II " , " Jeremiah 's Johnson " , and " Five Sleazy Pieces " , plays on the names of The Godfather Part II , Jeremiah Johnson , and Five Easy Pieces . Woody Allen can be seen during the flashback , pouring trash out of his window onto Homer . 
