Can using a heavy duty extension cord for a space heater cause a receptacle to melt?
From the comments you seemed to just have a weirdo defective receptacle.  Don't buy the contractor pack 2 for .99 cents.  Buy a good 20A receptacle for a few bucks and put it all back together.  12 ga wire will handle 15 amps which is all a space heater should ever pull.  Fire it up and monitor it for a bit.  If anything is questionable, I would start to look at the space heater itself but then again your breaker should trip before anything gets out of hand.