Stalling Problem '05 Ford Focus

My focus has been acting up ever since I took it to Southern California for vacation. It has a tendency to start stalling out on me when it gets hot especially when it’s Got less than a quarter tank of gas. Also, when I’m driving on the freeway it will lurch, almost like I tapped the brakes kinda hard. We took it in to try to get it fixed but the first guy couldn’t find anything wrong with it. He replaced the spark plugs and sent us on our way. We took it to the dealer and the dealer replaced the O2 sensor and the mass air sensor, and that fixed the problem for like a day, and went back to acting like it can’t take the gas. It also recently started having a problem where it sputters and spits out black smoke right after we fill it with gas.

I forgot to mention it’s also coming up with a system lean code whenever the mechanic checks our check engine light.