Could be alot of different things. Air, fuel and spark are all needed in the right ratios at the right time to have everything run smooth. The list of things that could cause the problem you are experiencing is long. Some could be engine specific.
Common issues between the two engines that could cause hesitation and stalling are: dirty fuel filter, bad/worn/improperly gapped spark plugs, worn/fouled distributor cap/rotor, faulty spark plug wires, bad ignition coil, bad fuel pump. I'd check these components first.
I recently developed idle and stalling issues that were multifaceted in their cause: air leak at the carb, dirty carb, fouled spark plugs gapped too large, old plug wires, fouled distributor cap and rotor, exhaust leak at the muffler. My distributor cap was not really worn, but as it was a OEM style cap it had devoloped quite a bit of oxidation on the terminals that was affecting the delivery of spark to the plugs and causing me to stall out. Replacing the fuel filter did not seem to help in my case, but I ended up with a new one anyways as part of the basic tune-up. Each little repair made it run a little better, but only once I had taken care of all of these things did the idle return to normal without any missing or stalling. Your mileage may vary.