P0171s are usually a lean condition caused by a vacuum leak of some sort after the MAF. On the Duratec motor, the PCV line is particularly difficult to inspect and replace, iirc. There is a thread on FF with pictures. Edit: thread here
DTC definition from Ford:
P0171 - System too lean (Bank 1) The Adaptive Fuel Strategy continuously monitors fuel delivery hardware. The test fails when the adaptive fuel tables reach a rich calibrated limit.
For lean and rich DTCs:
Excessive fuel pressure.
Leaking/contaminated fuel injectors.
Leaking fuel pressure regulator.
Low fuel pressure or running out of fuel.
Vapor recovery system.
Air leaks after the MAF.
Improperly seated engine oil dipstick.
Stuck EGR valve.
Leaking diaphragm or EVR.
Exhaust leaks before or near the HO2Ss.
A SHRTFT-1,2 PID value between -25% to +35% and a LONGFT-1,2 PID value between -35% to +35% is acceptable. Reading beyond these values indicate a failure.