Similar Lines Detection

Ordinary comparison tools use algorithms based on search for strictly equal strings. That is why such tools can return incorrect results if only minor changes have been introduced into files. You can see the examples of such comparisons on the figures below.

Example 1: Regular Comparison vs Similar lines detection in C#

Regular Comparison

Regular comparison

Regular Comparison: instead of detecting minor changes, considers that almost the whole blocks are changed

Similar Lines Detection

Code Compare detects approximately equal strings, which provides better comparison results.

Similar lines detection

Similar lines detection: promote flag and try-catch statement have been added to the C# code

Example 2: Regular Comparison vs Similar lines detection in SQL

Regular Comparison

Regular comparison in SQL

Regular comparison: considers records and IDs being inserted as changes which is wrong and links wrong lines

Similar lines detection

Code Compare detects approximately equal strings, which provides better comparison results.

Similar lines detection in SQL

Similar lines detection: only two tables have been renamed and one more added, but all the data remain unchanged

To enable or disable similar lines detection by default, in the Tools menu select Options, then in the displayed Options dialog box expand the Code Compare node, navigate to the File page and set the required value in the Similar lines detection check box.

Note

This option is available only in Code Compare Pro.