I've never really felt it was that different, but for the sake of discussion, how would you simulate the non-social variety of stress in a hiring situation?
You could request the candidate to retrieve an assignment from a password-protected website and require a solution within X hours after retrieval.
This does put on some pressure - there is a deadline, after all - but people who are shy but confident in their coding abilities may be less anxious. This would also solve the common "but I wouldn't code without an IDE/Google/Wikipedia" complaint.
Having experienced it myself, I can vouch that such an difference exist. When forced to write a complicated piece of code with a bunch of strange people breathing down my neck and watching every step I take, my productivity tends to slacken off when I hit a coders equivalent of writer’s block. It just doesn’t come out as naturally as it used to. In contrast, same task in a more familiar and comfortable setting looks like a piece of cake even if deadline is drawing close.
I've had phone interviews where I've been asked to solve a logic puzzle with pen/paper while explaining my approach. Solving a problem you've never thought about while being put on the spot turns out to be incredibly difficult. These sorts of problems require deep concentration and quiet yet it tends to be awkward to have silence between strangers. The situation really inhibits serious problem solving.
This does put on some pressure - there is a deadline, after all - but people who are shy but confident in their coding abilities may be less anxious. This would also solve the common "but I wouldn't code without an IDE/Google/Wikipedia" complaint.