Hello and thank you for using JustAnswer.com
Do you have a check engine light on?
My first thought was cam sensor, witch is part of your distributor. That can cause intermittent stalls, when your at a light or even driving. It will turn on a check engine light. That is what delivers spark to each spark plug. It could give you that misfire code. If it is failing can cause all kind of interment issues. I would recommend you start there. They have been known to fail.
If you have any more questions on this topic, please feel free to ask. Thanks Jay