My answer to Eating with non jews gives an example of a prohibition to prevent intermarriage and the use of the concept of משום איבה to relax the prohibition.
More generally, on the one hand, Chazal made decrees to prevent intermarriage which prevent getting close to non-Jews (e.g. non-Jewish wine, non-Jewish cooking). On the other hand in the consideration of the interaction between Jews and non-Jews, Chazal used the concepts of משום איבה (to avoid enmity ) to relax some of these restrictions.
My question is (1) how do Chazal decide when to apply משום איבה and
(2) are there contemporary sources which show how it is applied now?