  The three-dimensional XY model is studied at finite chemical potential using
complex Langevin dynamics. An adaptive stepsize algorithm is implemented to
cure the problem of runaway solutions that appears when using a constant
stepsize. The validity of complex Langevin dynamics is tested against
calculations using imaginary chemical potential and the world line formalism.
While complex Langevin dynamics is found to work correctly at larger beta, it
fails for smaller beta, in the region of the phase diagram corresponding to the
disordered phase. Diagnostic tests are developed to identify behaviour
symptomatic of incorrect convergence. These indicate that the failure does not
depend on the severeness of the sign problem, but has a different origin.
