EW 520 then FR 8394 at Barcelona
Cologne → Barcelona → Budapest
Timetable, Barcelona time
16:50EW 520 from Cologne at the gate
09:15FR 8394 to Budapest leaves the gate
16 h 25 apart on the timetable, overnight
FR 8394 leaves 16 h 25 after EW 520 arrives on the timetable: more than half a day, so not a connection we count.