either ecu, or plugs / leads, reset the ecu... remove battery for as long as you can, then start it up and give it chance to idle for a bit then take it for a run getting through all the gears. if the problems still there could be missing or getting a weak spark so from there check all leads are in good order and on properly and that all plugs are gapped correctly and not cracked or over fouled with deposits
after that it maybe a fuelling issues, but it may well be the ecu
worth cleaning your maf while its resetting