@EnglishParts,
Questions about "meaning" of a sentence depend on context of presentation.
Individually, each sentence could mean the same, but juxtaposing them calls for a possible differentiation. In that sense "I have lived in Barcelona" suggests for example that the speaker
could be making an
authoritative point about experience of the place (... stressing
I's experience). A similar contrastive point might be made about "used to" implying "not now".
(Note that many questions on EFL threads generate pages of waffle by not taking into account the context sensitive nature of semantics)