A US judge piped up “on behalf of all heterosexual males” to suggest he can’t tell sex from assault