I’m having the same problem. I was updating album artwork when all the duplicates were created. Each one points to the same song as the original. When I look in the XML file for iTunes, I have two entries for about 95% of the songs in my library. The difference in the two is that one entry shows all the data I set, such as ratings. The second entry shows album artwork info. Here is an example:
Original entry:
786
\tTrack ID786
\tNameLive Wire
\tArtistAC/DC
\tAlbum ArtistAC/DC
\tComposerBon Scott, Malcolm Young
\tAlbumHigh Voltage
\tGenreRock
\tKindAAC audio file
\tSize5675212
\tTotal Time349946
\tDisc Number1
\tDisc Count1
\tTrack Number4
\tYear1976
\tBPM2
\tDate Modified2008-08-09T20:07:25Z
\tDate Added2008-08-07T20:31:04Z
\tBit Rate128
\tSample Rate44100
\tRating80
\tAlbum Rating40
\tSort Album ArtistAC/DC
\tSort ArtistAC/DC
\tPersistent ID4A0824A5AEA2E41A
\tTrack TypeFile
\tLocationfile://localhost/Users/skaven/Music/iTunes/iTunes%20Music/AC_DC/High%20Voltage/04%20Live%20Wire.m4a
\tFile Folder Count4
\tLibrary Folder Count1
787
2nd entry, added after updating artwork with Jaikoz. Notice that ratings have been changed:
3693
\t
\t\tTrack ID3693
\t\tNameLive Wire
\t\tArtistAC/DC
\t\tAlbum ArtistAC/DC
\t\tComposerBon Scott, Malcolm Young
\t\tAlbumHigh Voltage
\t\tGenreRock
\t\tKindAAC audio file
\t\tSize5679030
\t\tTotal Time349946
\t\tDisc Number1
\t\tDisc Count1
\t\tTrack Number4
\t\tYear1976
\t\tBPM2
\t\tDate Modified2008-08-18T01:25:50Z
\t\tDate Added2008-08-18T01:37:11Z
\t\tBit Rate128
\t\tSample Rate44100
\t\tRelease Date1976-09-28T00:00:00Z
\t\tRating40
\t\tRating Computed
\t\tAlbum Rating40
\t\tArtwork Count1
\t\tSort Album ArtistAC/DC
\t\tSort ArtistAC/DC
\t\tPersistent ID736BE4680BDC7776
\t\tTrack TypeFile
Locationfile://localhost/Users/skaven/Music/iTunes/iTunes%20Music/AC_DC/High%20Voltage/04%20Live%20Wire.m4a
\t\tFile Folder Count4
\t\tLibrary Folder Count1
\t
3694