I am not much into programming. However, I tried a different approach and it worked.
1. I used DISSOLVE to convert all the polylines back to polylines. This takes care of all the gaps.
2. Used the ET GioWizards tool to convert the newly created polylines to polygon.
3. Used clipping features to selet only those that are impacting.
Thanks for all the help and suggestions...