P0507 fault code definition: Idle air control system RPM higher than expected.
This code might be triggered by vacuum leak but at the same time will show some other code like lean or rich condition accompanied with the MAF sensor fault codes as well.
If no vacuum leak present or other code beside misfire suspect faulty throttle body ctrl. module.
Recommend to clean throttle body and connection, check power supply to throttle body, perform capacity discharge and Throttle adaptation and see what's happen.
Bresha