  We investigate analytically and numerically a Josephson junction on finite
domain with two $\pi$-discontinuity points characterized by a jump of $\pi$ in
the phase difference of the junction, i.e. a 0-$\pi$-0 Josephson junction. The
system is described by a modified sine-Gordon equation. We show that there is
an instability region in which semifluxons will be spontaneously generated.
Using a Hamiltonian energy characterization, it is shown how the existence of
static semifluxons depends on the length of the junction, the facet length, and
the applied bias current. The critical eigenvalue of the semifluxons is
discussed as well. Numerical simulations are presented, accompanying our
analytical results.
