Volkswagen Repair: 2001 VW Golf 1.8T Check engine light not allowing to pass smog (havent even had car for 2 yrs yet), vw golf 1, mass airflow sensor


Question
Basically on my car the check engine light has been on since forever now. Initially i was told by the dealership that as long as it wasn't "flashing/blinking" there was nothing serious to worry about as long as the car was running fine.
I bought the car in July of 2005 (used 2001 vw golf 1.8T w/ 32K mi on it) . . .
I started back this december 2006 in attempting to get the check engine light issue fixed. The code coming up on the MIL indicator light was P0171 System running too lean (bank 1), when i attempted to get my car smogged.
When i took the car to get worked on by my dealership i bought the car at . . .they #1 Replaced the turbo charge valve and clamps, breather hose, serpentine belt and #4 ignition coil was replaced.
After getting it serviced the check engine light remained off for about 4 hours if not less . . then came back on and stayed on.
I was next able to bring back in (when i had more money to attempt to fix the problem . . . ) in march 2007. Brought back for same check engine light issue. This time around they replaced the mass airflow sensor, breather pipe, vacuum lines and fuel filter (which they didn't didn't inform me they were replacing until i came to pick up my car and discovered it was already replaced without them even getting my permission.), and they performed a brake light switch recall that was currently a recall for the car.
They told me they test drove it and they scanned for any more codes . . . it passed fine they said. I took the car home and within about 6 hours ON comes the check engine light again. My registration was due today so i had paid the fees last week and got one of those red tags to put up in my windshield that'll be good for 3 months so that i don't get pulled over for expired tags.
I don't know what to do . . . i'm tired of having to take time off of work to bring my car in and it's been a NIGHTMARE dealing with the dealership. a guy at a BAR smog referee station recommended that i fill out a consumer complaint form against McKenna VW to see if i can at least have someone come out and inspect them and maybe get some of my money back because he said that after spending close to $1,000 on this problem Mckenna SHOULD have fixed it by now.
Please advise me  . . . all i want to do is find out what the issue is . . fix it . . get my car to pass smog so i can not only get my tags but get the car transferred over to my name as well (which in order to do that i had to pay the registration . . which this year my car had to be smogged as well to register). . . i like my car and am a daily driver i just really don't need the headache of not being able to fix the problem.

Answer
Well I'm sorry for the inconvenience. I and many others have seen cars with gremlins in them. The System to lean fault has everything to do with the amount of air leading to the engine. There are multiple many many vacuum hoses and pipes. Any of these can split open and leak air. Your engine computer is seeing to much air compared to the fuel ratio. The oxygen sensor and throttle body are big factors as well for this fault though not as common as the mass air meter. Another thing to look out for is a swooshing noise from the engine compartment right side bottom. The charge air pressure cooler shaped like a little radiator leaks and causes unmetered air into the system past the mass air meter. With out the proper scan tool it is very hard to determine the cause of failure. March of this year you should be able to take it back to the dealer and have it rediagnosed for free. Don't get discouraged. Talk to the service manager. The dealer your going to is known for its lack of experience. This is not volkswagen. Volkswagen has great cars just annoying problems at times. You have a good car just with a unresolved issue. Let them know that your problem needs to be addressed and you need your car fixed. There are many laws on your side. I've seen many situations like the one your having. The customer sometimes gets a full refund if the dealer is pushed hard enough against the wall. I've personally have had a similar car with a fault like yours that came back 5 times under warranty and even the vw engineers had a hard time diagnosing it. All the engine management parts were replaced and still the fault came back about 50 miles later. It ended up being a problem in the wiring harness at the ground. Under warranty I was told by the engineers to send the harness the hole wiring harness to the vw test center for testing and replace with a new one. For me to be more helpful I need to know every fault every time that it came in. The PO# is required with the VIN#. Also the value blocks #32 #3 #2 every time  that it came in. The dealer should or might still have them. Tanks and keep me informed.