First thing to do is to check that all the intake tubing is sealed properly with no vacuum leaks. It is best to pressurize the intake from the air box to the intake with up to 30PSI (DO NOT EXCEED 30 PSI) and look for vacuum leaks. Repair as needed.
Unplug the MAF (Mass Air Flow) sensor and see if the vehicle runs better. If it does and the previous step checks good, then a faulty MAF sensor is the cause.
Next, a scantool will be required for testing.
1. Check the wiring at the Accelerator Pedal Position Sensor (APPS). The Red/Yellow wire and the Pink/White wire are the 5 V reference wires. The Brown/White and the Brown/Yellow wire are the sensor's grounds. 2. Check the resistance between the Yellow wire and the Brown/Yellow wire with the sensor unplugged. The resistance should be about 100k ohms. Check the resistance between the White wire and the Brown/White wire. The resistance should be about 100k ohms. There is a 100k ohm resistor in the ECM that connects these circuits. If these test good, the wires are good to the ECM. 3. The Yellow wire should be double the voltage of the White wire with the sensor connected. If not, the APPS is faulty. The Yellow wire should be about 0.4 volts at closed throttle and the White wire should be about 0.2 volts at closed throttle.
I strive to provide the best answers possible. If you need further help, have any questions, or need clarification about anything regarding this topic... Please feel free to ask by replying and I will give my best efforts to help you until your full satisfaction is achieved. However, if my answer was helpful and you are satisfied... I ask that you accept my answer so I may be compensated. Experts do not have funds transferred to their account unless the customer accepts. Your satisfaction is my main priority and I strive to provide the best service so please ask if there is anything else I could help you with.