Brian, Another trick that I have used that works well if you are trying to remove something hollow. Cut the pipe off with enough sticking out to get a hold of. From the inside,with a hacksaw blade,make two cuts length wise about 90 degrees apart,the full length of the pipe,but not cutting into the threads of the hole. Use a punch/chisel and collapse the small cut section into the large part. This will usually partially collapse the large section inward freeing it from the threads of the hole. If the small section is still attached additional cuts to free it may be required. I have used this technique on antique steam engines and boilers and it has always worked. This method works on studs if they are large enough to center drill large enough to get a saw blade in.