If you’re looking to refactor your code to move similar snippets into a single function you can reuse, an advanced tool like Code Compare can be useful.
Do you often need to compare different versions of the same file to keep track of changes. Here are some of the file comparison (diff) tools for LInux.