Bug 311722 E4XMIResource's getUniqueId() is implemented incorrectly
private String getUniqueId() { String id = createId(); while (objectMap.get(id) != null) { id = createId(); } return id; } Here, 'objectMap' is a Map<EObject, String> but we use a String as a key. This is obviously wrong.
bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/workbench/ui/internal/E4XMIResource.java
private Map<EObject, String> objectMap = new WeakHashMap<EObject, String>();
	public E4XMIResource() {
	}
	public E4XMIResource(URI uri) {
		super(uri);
	}
	public void setInternalId(EObject object, String id) {
		objectMap.put(object, id);
	}
	public String getInternalId(EObject object) {
		return objectMap.get(object);
	}
	@Override
	protected boolean useIDs() {
		return true;
	}
	private String createId() {
		return EcoreUtil.generateUUID();
	}
	private String getUniqueId() {
		String id = createId();
		while (objectMap.get(id) != null) {
			id = createId();
		}
		return id;
	}