Interplay between Static and Dynamic Properties of Semifluxons in YBa2Cu3O7 0-pi Josephson Junctions