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
/*******************************************************************************
 * Copyright (c) 2009, 2010 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 ******************************************************************************/
package org.eclipse.e4.workbench.ui.internal;
import java.util.Map;
import java.util.Map.Entry;
import java.util.WeakHashMap;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.emf.ecore.xmi.impl.XMIResourceImpl;
public class E4XMIResource extends XMIResourceImpl {