If the code is that confidential, it is hard to help you. I can’t see how 5-6 lines of relevant code can be causing any problems posting.
Strip the code of everything that is confidential (server names, etc). You do understand the concept of “only relevant code”? That means that you delete all code around it and isolate the problem in just a few lines. If teh problem is still showing up, you post the code here and we can take a look at it.
Since what you are describing should be able to be duplicated in just a few lines, there should be no risk of posting those 5-6 lines here.