The pedantic jack offs who still repeat this anecdote claim the use of the word "ein" is what screwed Kennedy. They point out that "Ich bin Berliner" means "I am from Berlin," and that adding the "ein" changes the meaning. Both facts are true. A rough English equivalent of what Kennedy said was "I am a New Yorker," whereas the phrase the pedantic jack offs claim he should have said translates to "I am from New York." The jelly doughnut myth is like claiming that an audience in Manhattan heard a politician say "I am a New Yorker" and took him to mean "I am a New Yorker magazine." Saying "I am a New Yorker" makes more sense as a symbolic statement of solidarity, and it's the same in German. Which is why people who speak German generally compliment Kennedy's choice as being the more nuanced, conversational phrasing.
So where did the doughnut story come from? Cracked has the answer, and other Cold War myths. Insert here the usual language warning for all Cracked articles. Link