Please, if you're going to offer up pseudo-code, then at least try to get the formatting close to what we'd expect to see.
May I suggest:
ref pseQuestion question;
int repLoss = 100;
int opScaleFactor = 5;
//nail the buggers / gits for voting to close when
// arbitrary user deemed question worthwhile.
foreach( pseUser user in CloseVoters )
if( user.CloseVote.Reason != arbitraryUserJudgement.isValid &&
question.wasClosed( user.CloseVote.Reason ) &&
question.wasReopened( arbitraryUserJudgement.Unfair(user.CloseVote.Reason) )
user.Reputation -= repLoss;
(apologies in advance for the trailing paranthesis on the if, not my preferred style)
And while we're at it, let's give the closed question's author a chance for some extra retribution.
if( arbitraryUserJudgement.currentUser == question.OP )
uesr.Reputation -= ( opScaleFactor * repLoss );
Or maybe instead of all of that, we could just focus on editing the questions that can be saved. If you feel that you (or the OP) are spending an excessive amount of time justifying the question, then maybe that's a sign that the question wasn't very well poised to begin with. Here's a good checklist to start with to make sure your questions are good.
FWIW, I think Yannis' answer is pretty spot-on.
The part of your question that I object to is "who decides what is unfair?" 5 close votes by the community is about as close to fair as we're going to get. If you have an alternative approach to deeming what is fair, please bring it up for the community to discuss.