private void merge(SequenceSearchState op) {
		SequenceSearchState parent = op.parent;
		for (int i = 0; i < 256; ++i) {
			if (parent.trans[i] == op) {
				parent.trans[i] = this;			// Should be replaced with this
			}
		}
		if (op.success != null) {				// Merge 
			if (success == null) {
				success = op.success;
			}
			else {
				ArrayList<DittedBitSequence> tmp = new ArrayList<DittedBitSequence>();
				int i = 0;
				int j = 0;
				int curpat = -1;
				int thispat = success.get(i).getIndex();
				int oppat = op.success.get(j).getIndex();
				while ((i < success.size()) || (j < op.success.size())) {
					if (thispat == oppat) {
						if (curpat != thispat) {
							tmp.add(success.get(i));
							curpat = thispat;
						}
						i += 1;
						j += 1;
						thispat = (i == success.size()) ? PATTERN_ENDED : success.get(i).getIndex();
						oppat =
							(j == op.success.size()) ? PATTERN_ENDED : op.success.get(j).getIndex();
					}
					else if (thispat < oppat) {
						if (curpat != thispat) {
							tmp.add(success.get(i));
							curpat = thispat;
						}
						i += 1;
						thispat = (i == success.size()) ? PATTERN_ENDED : success.get(i).getIndex();
					}
					else {
						if (curpat != oppat) {
							tmp.add(op.success.get(j));
							curpat = oppat;
						}
						j += 1;
						oppat =
							(j == op.success.size()) ? PATTERN_ENDED : op.success.get(j).getIndex();
					}
				}
				success = tmp;
			}
		}
	}
Merge in -op- and this as a single state
@param op
Ghidra/Features/Base/src/main/java/ghidra/util/bytesearch/SequenceSearchState.java