IB 5389 then IB 414 at Barcelona
Bari → Barcelona → Madrid
Timetable, Barcelona time
23:20IB 5389 from Bari at the gatealso LL 5389, VY 6113
15:05IB 414 to Madrid leaves the gatealso IB 414S, LA 1557, LL 3014, VY 5062, QR 6557, BA 7082, CZ 7324
15 h 45 apart on the timetable, overnight
IB 414 leaves 15 h 45 after IB 5389 arrives on the timetable: more than half a day, so not a connection we count.