I personally thought that demo of "You Are Not Alone" was nearly identical to the album version in relation to melody. I mean, MJ's version is far superior (for obvious reasons), but the melody is the heart of the song and there is no doubt the melodies were the same.
We all have our own ears though, but I was taken aback. I remember that version of "Dangerous" by Crystal Cartier or what's-her-face.... there is a similarity... and there have been other cases where I hear no similarity at all... but this one was nearly spot-on.
In regards to song-writers, due credit must be given to both MJ and the original artists/composers/co-producers. Without Rod Temperton, there would be no "Rock With You" or "Baby Be Mine", two personal favorites. Without Stevie Wonder, there would be no "I Can't Help It". The opening chords to "I Can't Help It'' was all Stevie..... that was his style taylored to fit MJ. The uptempo, jazzy drum-heavy beats of Temperton's songs... those are a Temperton trademark. Go listen to "Spice Of Life" by the Manhattan Transfer. The song sounds very similar to "Rock With You" and "Baby Be Mine" because it's Rod Temperton's song. MJ is a master at picking out songs that fit him and making them suit him, but you have to give due credit to the artist. I think it's a bit unfair to bypass them and credit it all to MJ.