Be sure to always test wires with a Digital Multimeter for correct 12 volt/signal/ground..... Sometimes only following colors can get you screwed up, burn your MAF, ECU or wiring harness. Some people extend wires using any colors they find, either to relocate MAF's for cold air intakes or Engine swaps.
Follow the Alphabet code on the MAF, as long as you wire 12 volt to pin (E)
(D) to ECU ground
(C) to Chassis ground
and (B) the 0-5volt signal wire
you should be fine, as some N62 MAF plugs/pigtails are different colors also by users modding or repairing them.
As for testing the N62 MAF to check if its bad?
After hooking up the correct wires to the MAF, while plugged in, turn key on ACC, engine off, then Check voltage from signal wire by back probing the pin (E)..... good MAF will read .5-.4 volts, anything Higher, check wiring before starting the car. If you have the MAF off the car blow slowly and lightly into the sensor, voltage should raise.
If you do start the car, and have idle problems? Shut off the car! Unplug the MAF, restart, if it idles check your wiring, and for codes on ecu. If wiring all checks out MAF is bad but above test will tell you beforehand. Make sure also there is no UN-metered air entering the pipes behind the MAF.
Double check all wiring to make sure you don't Fry/Burn your ECU or MAF's or worst your Harness!
Symptoms of a burned ECU include, no Ignition, richness, MAF code 12 even with good MAF's, car not starting at all, ECU not having power, Fuel pump not priming, no dash lights, buzzing of the EGI relay, Blowing of any fuses, symptoms can vary depending what circuit got damaged.
Open the top cover to the ECU, look for Burned/Burnt traces, resistors, diodes, or capacitors. Any smell of burn or sweet odors is not good, and sometimes you wont be able to see/smell the damage.
At that point I suggest checking the harness for shorts also, check sensors and relays on that burnt circuit also, repair them before getting a new ECU
Info from 2hunglow1standhi on ka-t forums