I don't know what it is that you use under the hood to to structure compare but I can tell it is wrong!
Here I found this program that uses Rosyln to do code syntax tree compare...
https://github.com/AlexGhiondea/CodeDiff I modified it file TextCodeDiff.cs line 111 to skip the string literal tokens
foreach (var added in _codeDiff.GetModified())
{
// Ignore string literal differences as in attributes
// https://github.com/AlexGhiondea/CodeDiff if (!added.Before.IsKind(Microsoft.CodeAnalysis.CSharp.SyntaxKind.StringLiteralToken) &&
!added.After.IsKind(Microsoft.CodeAnalysis.CSharp.SyntaxKind.StringLiteralToken))
{
ColorSection(rtbAfter, added.After.Span.Start, added.After.Span.Length, Color.LightGreen);
ColorSection(rtbBefore, added.Before.Span.Start, added.Before.Span.Length, Color.LightSalmon);
}
}
This yields the right result.
Your product is wrong string literal differences do not constitute code structure differences.
Sorry I can't attach a picture here to show you.
I don't know what it is that you use under the hood to to structure compare but I can tell it is wrong!
Here I found this program that uses Rosyln to do code syntax tree compare...
https://github.com/AlexGhiondea/CodeDiff
I modified it file TextCodeDiff.cs line 111 to skip the string literal tokens
foreach (var added in _codeDiff.GetModified())
{
// Ignore string literal differences as in attributes
// https://github.com/AlexGhiondea/CodeDiff
if (!added.Before.IsKind(Microsoft.CodeAnalysis.CSharp.SyntaxKind.StringLiteralToken) &&
!added.After.IsKind(Microsoft.CodeAnalysis.CSharp.SyntaxKind.StringLiteralToken))
{
ColorSection(rtbAfter, added.After.Span.Start, added.After.Span.Length, Color.LightGreen);
ColorSection(rtbBefore, added.Before.Span.Start, added.Before.Span.Length, Color.LightSalmon);
}
}
This yields the right result.
Your product is wrong string literal differences do not constitute code structure differences.
Sorry I can't attach a picture here to show you.