1) He is accustomed to swearing.
Is that sentence ambiguous?
a) He is in the habit of swearing.
b) He is used to hearing people swear.
2) He is accustomed to swearing at linguists.
I think sense "a" is the one that more readily comes to mind, but he might be in a select company that swear furiously at linguists constantly and he is merrily accustomed to such swearing.