Accept you are perfect. The work you do is flawless. You just cannot make any mistakes. Even if you are have consumed two bottles of vodka on an empty stomach and have smoked one kg of weed on the same night, the code you write in that state of mind [assuming you are still conscious and alive], can only be imitated by God. Bugs exist only in your neighbour's code. If anyone points out any bugs in your code, blame your subordinate or your co-worker for his outrageous application of logic but immediately cover his ass by blaming his incompetence on the personal problems he is facing [If he is married, his wife could be dying or he could be going through a rough patch in his married life. If he is single, then damn, you have limited choices], of which one should never speak about, especially to him or in front of him, as he had confided in you and only you and you cannot break his trust. Also you do not believe in gossiping about some colleague's personal life. This is important as he has to be ready to take the next blow. In case, you do not have a subordinate or co-worker, then put the blame on any other person from another department for giving you excess work. But your words should be such that the "bug-pointer" should feel humiliated and disgusted, all because of the person from that other department, whom he respected a lot to this day, till he committed the selfish act of prioritising his own work over the bug-pointer's. If you continue this for a while, then you would soon be successful in making the "bug-pointer" and the "guy-from-the-other-department" sworn enemies. It becomes interesting if both of them are close buddies. Husband and wives should never work in the same office but different departments. Only have sexual relationships with the people from other departments.
Remember always, you are God.