I'm afraid, there is no such built-in function to achieve what you are expecting. You should write your own technique to compare the files ignoring what ever you don't want to compare.
If you would like a compare without ignoring anything you can use the
File Compare[
^]
Or, in case if you would like manual compare to check the structure etc to find out if the code is copied or not, you can use
Beyond Compare Tool[
^]