Those of us who may still rip/re-rip a CD or two in iTunes from time to time may see this dialog:
I heard from a user today who wanted to replace a bunch of MP3s with new Apple Lossless copies. But he was afraid that selecting to "Replace Existing" would erase the tags he had meticulously created for the original MP3s.
iTunes uses the Song Name, Artist and Album of each CD track and looks for a track in the iTunes library with tags that match. If a match is found, then you will see the dialog above. And then if you select to "Replace Existing", you are essentially replacing the file and not the track entry itself; that is, the newly ripped-CD track's file replaces the original MP3 file pointed to by the track entry and the other track entry data remains the same (except for obvious changes due to the change of file, like size and file kind and so on).
If one or more of the Song Name, Artist and Album is different then you won't be asked to replace any tracks and the CD tracks will be imported as "new" tracks, perhaps as duplicates.
Rather than allow iTunes to make these decisions, here's a trick. Before importing, copy some tag data from the original tracks in the library to the corresponding CD tracks using Copy Tag Info Tracks to Tracks.
You probably only need to copy Song Name, Artist and Album. But any additional tags wouldn't hurt either.
Then, when you import the CD, you'll probably now see the "already been imported" dialog from whence you can select "Replace Existing" to correctly replace the original files and keep the existing track entry data.