I think you are going to have to be more explicit. What problems are you facing with duplicate document names? (and do you mean the filename on disk?)
1- from the revision manager you have a tool to search for duplicated name ( document) This will give you a report of the file. Then it is a manual intervention
2- Place your document under a manage environment. Insight for example as a option you can tick, it will prevent you from creating duplicated name document.
Also I believe there is a tool to help prepare the data when migrating to an manage environment. I didn't use it but other might be able to get more input how the prepare tool can help when duplicated document name are found.