private CodeUnit startInstructionRange(Address firstInstrStart) throws IOException {

		Instruction inst = null;
		RecordIterator recIt = instAdapter.getRecords(firstInstrStart, true);
		if (recIt.hasNext()) {
			DBRecord rec = recIt.next();
			inst = getInstructionDB(rec);
			recIt.previous();
		}
		if (recIt.hasPrevious()) {
			DBRecord rec = recIt.previous();
			Instruction prevInst = getInstructionDB(rec);
			if (prevInst.getMaxAddress().compareTo(firstInstrStart) >= 0) {
				return prevInst;
			}
		}

		Data data = null;
		recIt = dataAdapter.getRecords(firstInstrStart, true);
		if (recIt.hasNext()) {
			DBRecord rec = recIt.next();
			data = getDataDB(rec);
			recIt.previous();
		}
		if (recIt.hasPrevious()) {
			DBRecord rec = recIt.previous();
			Data prevData = getDataDB(rec);
			if (prevData.getMaxAddress().compareTo(firstInstrStart) >= 0) {
				return prevData;
			}
		}

		if (data == null) {
			return inst;
		}
		if (inst == null) {
			return data;
		}
		return inst.getMinAddress().compareTo(data.getMinAddress()) < 0 ? inst : data;
	}
Set the program after all the managers have been created.
@param program The program object that this manager belongs to.
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/code/CodeManager.java