Duplicates finder shows wrong duplicate (C#)

Hello,

here's a "duplicate" according to Duplicates Finder for C#:

  1. {
  2.                     comparers.Add(new KeyValuePair<int, Comparison<string>>(i, delegate(string left, string right)
  3.                     {
  4.                         return CompareTo(left, right);
  5.                     }));
  6.                 }

and

  1. {
  2.                     comparers.Add(new KeyValuePair<int, Comparison<string>>(i, delegate(string left, string right)
  3.                     {
  4.                         return CompareTo(right, left);
  5.                     }));
  6.                 }


Sure, they are very similar, but the order is reversed in the second CompareTo. Cost = 79.

Daniel

Using TeamCity 6.0 on Windows.

2 comments
Comment actions Permalink

It's by design. Duplicates Finder searches for "similar", "alike" fragments, not semantically equivalent.

0
Comment actions Permalink

Thank you for clarifying.

0

Please sign in to leave a comment.