Jerking Nissan

I have a mechanical problem and I’m hoping someone can point me in the right direction. My 2001 Nissan Sentra jerks when the car accelerates. I replaced the air flow sensor after the car was diagnosed by a garage and the dealer. I still have the problem which varies in severity without any discerible pattern. The car has stalled while idling and I have watched the tach oscillate between 1500 and 2000 rpms while I drive. At other times, the check engine light goes out and the car drives with no problems for a few hours. The first mechanic who looked at the car mentioned that he got an incorrect voltage from the car’s computer. While replacing the air flow sensor I noticed a small hose attached to the air filter housing (along with the wiring for the air sensor) with no connection. There is no obvious connection for the hose. The other very noticable symptom is that I can smell gas anytime I park and exit the car. Thanks for any tips that you can give.

If it has a throttle body and iac(idle air control), I’d start by cleaning these with a $3.00 can of carb cleaner. Just take off the hose going to the intake, manually opening the butterfly valve and spraying and cleaning in there.
Disconnect the iac and clean it with the spray as well… That might fix the stalling problem.
Next, I’d change the fuel filter if you haven’t done so recently. Sometimes,
water gets in the filter and settles to the bottom… So when you go down hill, the water enters the system and by the time you start going up the hill the water is going in the injectors which causes the jerking while accelerating up the hill.
Next, I’d avoid the cheap gas since its been know to have water in it and
cause the “check engine” lights to come on, intermittedly.
Sometimes a bad or loose ground will cause the engine to oscillate.
Hope this helps,
Caballero