After checking everything and cleaning the Mass Air Flow (MAF) sensor I gave up and took it back to the garage. As I drove it there the check engine light went out! However it failed inspection because it had not been driven enough. So I was given 10 days to fix it. The garage said they had fixed a vacuum leak. The next day the check engine light came back on!
So I spent a Saturday trying things, one at a time, to fix it. One thing I needed was something that could tell me if the problem was fixed without having to drive it many miles to see if the check engine light comes back on. This code reader was the solution. It read a "permanent" code 171 - fuel too lean.
Next I replaced the spark plugs. That helped some and cleared the permanent code but soon a "pending" 171 code came back up. As you can see the plugs were in rough shape. I replaced them with AC Delco plugs.
Next I replaced the MAF sensor that I had cleaned earlier. That fixed the problem. It has some slots in it that I had sprayed the cleaner in but that was apparently not enough to fix the problem. So after 10 days past due my car finally passed inspection.