private boolean isSameData(Data d1, Data d2) {
		if (d1.getLength() != d2.getLength()) {
			return false;
		}
		ghidra.program.model.data.DataType dt1 = d1.getDataType();
		ghidra.program.model.data.DataType dt2 = d2.getDataType();
		if (!dt1.isEquivalent(dt2)) {
			return false;
		}
		// Detect that data type name or path differs?
		if (!dt1.getPathName().equals(dt2.getPathName())) {
			return false;
		}

		// assume only top-level data code units are compared
		// we should not be a DataComponent (i.e., no parent)
		if (d1.getParent() != null || d2.getParent() != null) {
			throw new UnsupportedOperationException("Expecting top-level Data only");
		}

		// Only top-level Data instance Settings are supported 

		String[] settingNames1 = d1.getNames();
		Arrays.sort(settingNames1);
		String[] settingNames2 = d2.getNames();
		Arrays.sort(settingNames2);
		if (!Arrays.equals(settingNames1, settingNames2)) {
			return false;
		}

		for (int i = 0; i < settingNames1.length; i++) {
			Object v1 = d1.getValue(settingNames1[i]);
			Object v2 = d2.getValue(settingNames2[i]);
			if (!Objects.equals(v1, v2)) {
				return false;
			}
		}

		return true;
	}
Returns whether the two defined data objects are the same.
@param d1 the first defined data object
@param d2 the second defined data object
@return true if the defeined data objects are the same.
Ghidra/Features/Base/src/main/java/ghidra/program/util/ProgramDiffDetails.java