private List<Reference> findExistingRefs(ReferenceManager refMgr, AddressFactory af,
			Address start,
			Address end) {
		List<Reference> list = new ArrayList<Reference>();
		AddressIterator it = refMgr.getReferenceSourceIterator(new AddressSet(start, end), true);
		while (it.hasNext()) {
			Address addr = it.next();
			Reference[] refs = refMgr.getReferencesFrom(addr);
			Collections.addAll(list, refs);
		}
		return list;
	}
Creates a new structure by using the provided structure and attaching
it to the program passed in the {@link #applyTo(Program)} method.

@param newStructure The new structure to attach to the program 
       provided in the {@link #applyTo(Program)} method.
@param address the address at which to create the new structure.
Ghidra/Features/Base/src/main/java/ghidra/app/cmd/data/CreateStructureCmd.java