if its got a fly by wire throttle pedal then usually where pedal bolts to floorpan is where the pedal pot is situated, you can usually see that a wire harness is attatched.
best way to check is using a sensor checker or oscilloscope by backpining the sensor, you can use a digital multimeter but not so easy to see if is a glitch, using an anologue multimeter (but nowadays has to have a certain level of resistance) is better as you can watch needle moving through different voltage but as is only I think 5 volts max you have to watch carefully.
Oh sod it, easier to check by using another one and see if it makes a difference and is quicker anyway, or just try squirting an electrical cleaning spray inside yours is always worth trying.
CPS, crank position sensor, again easy to check by replacing, or try taking it off and cleaning any crap off it and out of end of hole where sits as sometimes lots of crap on end, static build up can also cause probs and is removed sometimes just by touching it.
At one time back in early nineties lots of XR3i's and XR2's suffered something terrible from static, lots of callouts, cured by touching, easy £30 callouts.
Something to try anyway if not hole in fuel pipe or other probs as mentioned above.