I have a 2004 Nissan Xterra that has been chugging for a few months now. The problem is intermittent and only happens about once or twice a week when driving, but when it starts to chug (feels like it is running out of gas, jerky, will not accelerate) it is unsafe to drive on the freeway. I have taken it to several places and no one can figure out the problem. It was pulling two codes the speed sensor on the transmission PO500 - and the knock sensor code was coming up along with that. I had the speed sensor replaced twice and checked the wiring. We replaced the fuel filter, checked the fuel pump with a fuel gage and fuel lines, replaced the distributor cap and rotor, put in a new MAF sensor and still nothing is working to remedy the chugging. My last stop is replacing the knock sensor for $600, the problem is that the Nissan Mechanics (I visited two dealerships in different cities) told me not to replace this as it would not cause chugging. Several other mechanics around town tell me that they are wrong and I do need to replace it. Does anyone have any input on this? Please help with any advice.