Plagiarism in music: where is the line?

A confession – the ideas in these blogs aren’t all fully mine! Sometimes I take things that I have heard before and put my own twist on them.
Any honest songwriter will tell you something similar - we all have our influences, and these manifest themselves to varying degrees in our writing.
In law, sometimes this is acceptable and sometimes it isn’t, and the line is not always clear. Let's look at a few examples.
One that was in the news in January…
Radiohead are suing Lana Del Rey for similarities between her song Get Free and their song Creep.
Del Rey offered Radiohead 40% of the royalties but Radiohead declined and are bringing her to court*. Make your own mind up - listen to the first 1min 25 secs of Get Free and then the first 1min 20secs of Creep. it turns out the writers of The Hollies' 1974 hit The Air That I Breathe already have credits on Creep due to a lawsuit they brought. I'm guessing this was due to similarities between 0:39-0:47 of Creep and 0:15-0:25 of The Air That I Breathe
Here's one that was never in court, but should have been (according to Quincy Jones)...have a listen to the opening synth riff of Donna Summer's State Of Independence...remind you of the bass riff that kicks in at 0:06 in Billie Jean anyone?
And one I discovered recently…the first line of the chorus of You Raise Me Up - 'You raise me up so I can stand on mountains' - vs the first line of the chorus or B section of Danny Boy - 'But come ye back, when summer's in the meadow'. Listen 0:50-1:20 here and see what you think...

It's surprising to me that this doesn't happen more often...after all there are only so many notes and so many ways to combine them, but proving plagiarism in a court of law is a different story. 

*Correction - Lana Del Rey announced at a recent concert that the dispute had been settled.