Bug 515159 - Fix 'unlikely argument type' compiler warnings

Change-Id: Id189963e084d59c1adb3c26d9a3cca4d12609db0
Signed-off-by: Sopot Cela <scela@redhat.com>
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/tabs/ListTab.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/tabs/ListTab.java
index acbbf6d..a146115 100644
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/tabs/ListTab.java
+++ b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/tabs/ListTab.java
@@ -804,7 +804,7 @@
 	private EAttributeTableViewerColumn addColumn(String attName) {
 		EAttributeTableViewerColumn colName = defaultColumns.get(attName);
 		if (colName == null) {
-			colName = optionalColumns.get(colName);
+			colName = optionalColumns.get(attName);
 			if (colName == null) {
 				colName = new EAttributeTableViewerColumn_Markable(tvResults, attName, attName, context);
 				optionalColumns.put(attName, colName);
diff --git a/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/model/FragmentExtractHelper.java b/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/model/FragmentExtractHelper.java
index a01633b..d35d4ba 100644
--- a/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/model/FragmentExtractHelper.java
+++ b/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/model/FragmentExtractHelper.java
@@ -50,7 +50,10 @@
 		{
 			final EObject objectToBeImported = (EObject) featureIterator.next();
 			final EReference eReference = (EReference)featureIterator.feature();
-			MApplicationElement alreadyImportedElement = importedElements.get(objectToBeImported);
+			MApplicationElement alreadyImportedElement = null;
+			if (objectToBeImported instanceof MApplicationElement) {
+				alreadyImportedElement = importedElements.get((MApplicationElement) objectToBeImported);
+			}
 			if(alreadyImportedElement==null){
 				alreadyImportedElement = (MApplicationElement) EcoreUtil.copy(objectToBeImported);
 				importedElements.put((MApplicationElement) objectToBeImported, alreadyImportedElement);