1-7/8" length should work on the three 3/8" studs.
The 5/16" stud question illudes me. Molnar 5/16" studs are 2-1/8" long and threaded 11/16" equally on each end. There is something strange about them though. Molnar's studs are .311" in diameter at the threads and my stock studs are .305". I could not get the Molnar studs started into a set of iron barrels I have on the bench. The tpi is the same but the thread is fatter or slightly wider on the Molnar studs. I did not use the Molnar studs in the Molnar barrels. I used another stainless set that I was using in my iron barrels previously. Probably sloppy in there, but they tightened up when bottomed out on the shank. I don't know what to tell you that would be useful. I don't manufacture fasteners. Knut probably has some technical information he could provide.
Here's a pic of the 3/8" stud pocket in the Molnar barrels for anyone that cares. That fin under at the base of the pocket makes for some fun. The pockets are also very narrow. I had to take a dremel to them to get a wrench to turn in there.