You had better correct that source code.
This one is fine. It sounds quite firm in what you want.
It would be nice, if you have corrected that source code.
To make sentence 2 match the tense in sentence 1, rewrite it like this:
It would be nice if you were to correct that source code.
This version sounds quite a bit lighter than version 1. In particular, if you were my boss telling me this, I might believe that I should correct the source code only if time permits.
Another popular way to use "if only" to make an implication that someone should do something. This is less direct and sounds like "it would be nice... but I'm not insisting on it":
If only someone were to correct that source code.
Because version 1 "You had better correct that source code" can sound a bit "harsh" or too direct, the indirect variants could be used as a softened version to actually deliver the same message as in version 1. For example, suppose my boss really needs me to correct the source code. And suppose everyone in the conversation really understands that it is a hard requirement (i.e. correcting the source code is not "optional"), then the following is also a perfectly fine way to deliver the same message in a soft or friendlier way:
It would be nice if you were to correct that source code. (Everyone understands that the source code must be corrected, but I'm avoiding saying "you must do this" in order to soften the dialogue).