I've had the front and rear studs break before and turn out to be a non issue. As long as the intake or the exhaust isn't leaking around the gasket, there is no problem. Fairly common occurrence, many XJ's are missing the rear stud.
I've also had various amounts of luck or non luck when I finally got around to removing the broken stud and replacing them.
The last one I did (in the rear) I drilled and removed with an angle drill, air driven, fairly compact. Which turned out to be a medium pain in the rear (major pain in the back) and took most of a day to accomplish. Though I was eventually successful and remove the broken stud without messing up the threads. I probably should have removed the master cylinder and booster too.
Another front stud (frozen solid that resisted any method of removal) that I eventually had to drill out and re tap to the next bigger size. Which required a special blind hole tap.
The easiest fix was to drill into the center of the bolt ( and break the drill off), then use a counter sink to open up the hole a little and weld some chamfered thread stock onto the frozen broken stud (and broken drill bit), then clean it up with a small air grinder using grinding stones. I know it sounds flacky, but actually worked out well and lasted. I was working with a deadline and couldn't mess with it indefinitely.
Sometimes there is a little movement in the broken stud threads and a lot of patience will eventually get it out. Sometimes any method of removal is likely doomed to failure.
My last great success was a broken rear stud with a little movement, I cleaned the stud used a fairly thick piece of welding rod, a little flux and arched it with my jumper cables and battery. The welding rod welded itself to the stud and I was eventually able to screw it out enough to get some vice grips on it.
It's the kind of job that is really hard to estimate, requires patience rather than great skill and can go really wrong, very fast.