private void performMergeData(Data originData, AddressSetView originByteDiffs,
			boolean copyBytes) throws CodeUnitInsertionException, MemoryAccessException {

		Address originMin = originData.getMinAddress();
		Address originMax = originData.getMaxAddress();
		Address resultMin = originToResultTranslator.getAddress(originMin);
		Address resultMax = originToResultTranslator.getAddress(originMax);
		DataType dt = originData.getDataType();
		boolean hasNewData = false;

		// If there are byte differences for this instruction then the
		// bytes need to get copied even though the user did not indicate to.
		if (copyBytes &&
			bytesMayDiffer(originByteDiffs, originMin, resultMin, originData.getLength())) {
			// Copy all the bytes for the instruction if any bytes differ.
			ProgramMemoryUtil.copyBytesInRanges(resultProgram, originProgram, resultMin, resultMax);
		}

		if (!(dt.equals(DataType.DEFAULT))) {
			resultListing.createData(resultMin, originData.getDataType(), originData.getLength());
			hasNewData = true;
		}
		if (hasNewData) {
			Data newData = resultListing.getDataAt(resultMin);
			String[] settingNames = originData.getNames();
			for (String settingName : settingNames) {
				Object obj = originData.getValue(settingName);
				if (obj != null) {
					newData.setValue(settingName, obj);
				}
			}
		}
	}
<CODE>performMergeData</CODE> merges the indicated defined data
into the merge program. The bytes in the merge program are not affected
by this method.
Corresponding code unit(s) must already be cleared in result program.
@param originData the defined data to be merged
This data should be from the origin program.
@param originByteDiffs address set indicating addresses where the bytes differ
between the result program and the origin program.
This addresses in this set should be derived from the origin program.
@param copyBytes true indicates bytes that differ should be copied.
false means don't copy any bytes.
@throws CodeUnitInsertionException if the defined data can't be created
in the merge program.
Ghidra/Features/Base/src/main/java/ghidra/program/util/ProgramMerge.java