  The combined effect of disorder and symmetry-breaking fields on the
two-dimensional XY model is examined. The study includes disorder in the
interaction among spins in the form of random phase shifts as well as disorder
in the local orientation of the field. The phase diagrams are determined and
the properties of the various phases and phase transitions are calculated. We
use a renormalization group approach in the Coulomb gas representation of the
model. Our results differ from those obtained for special cases in previous
works. In particular, we find a changed topology of the phase diagram that is
composed of phases with long-range order, quasi-long-range order, and
short-range order. The discrepancies can be ascribed to a breakdown of the
fugacity expansion in the Coulomb gas representation.
  Implications for physical systems such as planar Josephson junctions and the
faceting of crystal surfaces are discussed.
