Gospel According to Saint Matthew
The third part of the sermon on the mount.
 Judge not, that you may not be judged, [Matthew 7:1] [Latin]  For with what judgment you judge, you shall be judged: and with what measure you mete, it shall be measured to you again.  And why seest thou the mote that is in thy brother’s eye; and seest not the beam that is in thy own eye?  Or how sayest thou to thy brother: Let me cast the mote out of thy eye; and behold a beam is in thy own eye?  Thou hypocrite, cast out first the beam in thy own eye, and then shalt thou see to cast out the mote out of thy brother’s eye.
 Be ye therefore merciful, as your Father also is merciful. [Luke 6:36] [Latin]  Judge not, and you shall not be judged. Condemn not, and you shall not be condemned. Forgive, and you shall be forgiven. 
How does this prohibition relate to using our judgment in relation to friends and acquaintances that are habitual sinners against the commandments of God and the traditions of the Church? Should we shun, avoid, or not talk to “committed” homosexuals and or drug users who violate the Fifth and Six Commandments to protect ourselves and have peace of mind? "Using your better judgment " to choose friends wisely and judging, condemning, or electing yourself the punisher of sin must be two different things, right? Is leaving them to their sins and not trying to turn them from their sinful ways a form of punishment? What if you think it is not very likely they will listen to you if you try?