@Override
	protected List<T> doGetLcs(TaskMonitor monitor) throws CancelledException {

		List<T> reducedLcs = super.doGetLcs(monitor);
		int size = reducedLcs.size() + lengthOf(x) + lengthOf(y);
		List<T> lcs = new ArrayList<>(size);

		// add the shared beginning
		for (int i = 0; i < startn; i++) {
			monitor.checkCancelled();
			lcs.add(valueOf(xSource, i));
		}

		// add the calculated LCS
		lcs.addAll(reducedLcs);

		// add the shared end
		int length = lengthOf(xSource);
		int endx = getEnd(xSource);
		for (int i = endx; i < length; i++) {
			monitor.checkCancelled();
			lcs.add(valueOf(xSource, i));
		}

		return lcs;
	}
Return the value at the given 0-based offset
 
@param i the input sequence (x or y)
@param offset the offset
@return the value
Ghidra/Framework/Generic/src/main/java/generic/algorithms/ReducingLcs.java