Matches are based on the song name and artist. If you have alternate versions of the same song (live, demo versions) hold the alt/option key and choose View > Show Exact Duplicate Items. This will show only duplicate songs having the same name, artist, and album.
From there you can choose what to remove, and what to keep. When you are finished removing duplicate items from your library, choose View > Show All Items.