Bug 513790 - Compiler warnings in I20170316-2000 after moving to M6
compiler

Change-Id: I8ed4bf58d11c23d054a950577add87415f3c910a
Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
diff --git a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/sourcelookup/SourceLookupFacilityTests.java b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/sourcelookup/SourceLookupFacilityTests.java
index 693f81b..f644e1b 100644
--- a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/sourcelookup/SourceLookupFacilityTests.java
+++ b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/sourcelookup/SourceLookupFacilityTests.java
@@ -310,7 +310,7 @@
 				String artifact = "" + i; //$NON-NLS-1$
 				ISourceLookupResult result = SourceLookupFacility.getDefault().lookup(artifact, fTestLocator, false);
 				assertNotNull("There should be a result", result); //$NON-NLS-1$
-				assertFalse(cached.containsKey(result));
+				assertFalse(cached.containsValue(result));
 				cached.put(artifact, result);
 
 				result = SourceLookupFacility.getDefault().lookup(artifact, fTestLocator, false);
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationManager.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationManager.java
index 33fd45f..9db8d18 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationManager.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationManager.java
@@ -722,19 +722,18 @@
 	 * @since 3.3
 	 */
 	public String[] getApplicableConfigurationTypes(IResource resource) {
-		List<String> types = new ArrayList<String>();
 		List<LaunchShortcutExtension> exts = getLaunchShortcuts();
 		List<IResource> list = new ArrayList<IResource>();
 		list.add(resource);
 		IEvaluationContext context = DebugUIPlugin.createEvaluationContext(list);
 		context.setAllowPluginActivation(true);
 		context.addVariable("selection", list); //$NON-NLS-1$
-		HashSet<String> set = new HashSet<String>();
+		HashSet<String> contributedTypeIds = new HashSet<String>();
 		for (Iterator<LaunchShortcutExtension> iter = exts.listIterator(); iter.hasNext();) {
 			LaunchShortcutExtension ext = iter.next();
 			try {
 				if(ext.evalEnablementExpression(context, ext.getContextualLaunchEnablementExpression())) {
-					set.addAll(ext.getAssociatedConfigurationTypes());
+					contributedTypeIds.addAll(ext.getAssociatedConfigurationTypes());
 				}
 			}
 			catch(CoreException ce) {
@@ -743,17 +742,18 @@
 				iter.remove();
 			}
 		}
+		List<String> typeIds = new ArrayList<String>();
 		LaunchManager lm = (LaunchManager) DebugPlugin.getDefault().getLaunchManager();
-		ILaunchConfigurationType type = null;
-		for (String id : set) {
-			type = lm.getLaunchConfigurationType(id);
+		for (String id : contributedTypeIds) {
+			ILaunchConfigurationType type = lm.getLaunchConfigurationType(id);
 			if(type != null) {
-				if(!types.contains(type) && type.isPublic() && !"org.eclipse.ui.externaltools.builder".equals(type.getCategory())) { //$NON-NLS-1$
-					types.add(type.getIdentifier());
+				String identifier = type.getIdentifier();
+				if (!typeIds.contains(identifier) && type.isPublic() && !"org.eclipse.ui.externaltools.builder".equals(type.getCategory())) { //$NON-NLS-1$
+					typeIds.add(identifier);
 				}
 			}
 		}
-		return types.toArray(new String[types.size()]);
+		return typeIds.toArray(new String[typeIds.size()]);
 	}
 
 	/**