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.

ExpandedToggleIcon(9x12)         Example 1: Regular Comparison vs Similar Lines Detection in C#

Regular Comparison

ordinary

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.

cc_code

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

ExpandedToggleIcon(9x12)        Example 2: Regular Comparison vs Similar Lines Detection in SQL

Regular Comparison

ordinary_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.

cc_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 Note

This option is available only in Code Compare Pro.

ExpandedToggleIcon(9x12)        See Also