private bool ProcessMatch(Match M, int MinimumOverlap, HasseFragmentInsertionQueue NewFragmentList ,HasseNode [] PartlyMatchingNodes, string debugInfo) { string StringMCS = M.GetMatchString(); bool matchWasNew = false; if (StringMCS.Length >= MinimumOverlap) { // if (M.StrA.Equals("*t")) System.Diagnostics.Debugger.Break(); // deal with the max common substructure: // star to left? Both strings must then have one pos matching star if (M.FirstPosInA > 0 && M.FirstPosInB > 0) { StringMCS = "*" + StringMCS; } // star to right? Both strings must then have one pos matching star if ((M.LastPosInA < M.StrA.Length - 1) && (M.LastPosInB < M.StrB.Length - 1)) { StringMCS = StringMCS + "*"; } // Do not return back what was started from: if (StringMCS.Equals(PartlyMatchingNodes[0].KeyString) | StringMCS.Equals(PartlyMatchingNodes[1].KeyString )) { return false; } if (StringMCS.Equals("**")) System.Diagnostics.Debugger.Break(); if (!StringMCS.Equals("*")) { if (true == NewFragmentList.Add(new HasseNode[1] { this }, PartlyMatchingNodes, StringMCS, debugInfo, HasseNodeTypes.FRAGMENT | HasseNodeTypes.MAX_COMMON_FRAGMENT, null)) matchWasNew = true; } } //if (matchWasNew) { System.Diagnostics.Debugger.Break(); } return matchWasNew; }