2009 Pontiac G3 stalls and shudders

Stalls and shutters intermittently. Sometimes does it when stop for stop lights. I can’t trust it when I pull out in traffic. My mechanic did new air mass motor and boot and air filter. Any suggestions?

Aftermarket K&N . . . ?

If so, did the problems start AFTER these parts were installed . . . or before?