The notation in this piece is inconsistent and ambiguous. One can only guess what the composer intended. One heuristic is to assume that an accidental only applies for a 'short' time. Applying this the second line I'd assume the E-flat didn't apply to the last E on that line, and if it did I'd expect to see the flat repeated.
The D's on the third line are almost certainly all intended to be D-sharps, but there's no way to be absolutely sure.
One way of entering an unmeasured piece in notation software is to split it into measures and then hide the bar-lines and time changes. It looks like this was done in this case. If the end of line three had been entered as two measures of 4/4 then that would explain the sharp repeated on the D of the sixteenth notes (and the bad spacing between the notes).
In general there are four ways of writing accidentals in an unmeasured piece:
- an accidental applies only to the note it precedes
- an applies only to the note it precedes and immediately repeated notes of the same pitch
- an accidental applies to the note it precedes and other notes of the same pitch that are beamed together with it.
- an accidental applies until cancelled
But it needs to be explicitly stated which system is being used.