text: public override BytesRef Common(BytesRef output1, BytesRef output2){Debug.Assert(output1 != null);Debug.Assert(output2 != null);int pos1 = output1.Offset;int pos2 = output2.Offset;int stopAt1 = pos1 + Math.Min(output1.Length, output2.Length);while (pos1 < stopAt1){if (output1.Bytes[pos1] != output2.Bytes[pos2]){break;}pos1++;pos2++;}if (pos1 == output1.Offset){return NO_OUTPUT;}else if (pos1 == output1.Offset + output1.Length){return output1;}else if (pos2 == output2.Offset + output2.Length){return output2;}else{return new BytesRef(output1.Bytes, output1.Offset, pos1 - output1.Offset);}}