Merge remote-tracking branch 'origin/master' into BETA_JAVA14

Change-Id: I73c2f1f91c86c9b9b73b71074ea09567e528bb45
diff --git a/org.eclipse.jdt.debug.tests/META-INF/MANIFEST.MF b/org.eclipse.jdt.debug.tests/META-INF/MANIFEST.MF
index 6856ddc..e663ad9 100644
--- a/org.eclipse.jdt.debug.tests/META-INF/MANIFEST.MF
+++ b/org.eclipse.jdt.debug.tests/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.jdt.debug.tests; singleton:=true
-Bundle-Version: 3.11.700.qualifier
+Bundle-Version: 3.11.800.qualifier
 Bundle-ClassPath: javadebugtests.jar
 Bundle-Activator: org.eclipse.jdt.debug.testplugin.JavaTestPlugin
 Bundle-Vendor: %providerName
diff --git a/org.eclipse.jdt.debug.tests/pom.xml b/org.eclipse.jdt.debug.tests/pom.xml
index ca4aa22..ea87994 100644
--- a/org.eclipse.jdt.debug.tests/pom.xml
+++ b/org.eclipse.jdt.debug.tests/pom.xml
@@ -18,7 +18,7 @@
   </parent>
   <groupId>org.eclipse.jdt</groupId>
   <artifactId>org.eclipse.jdt.debug.tests</artifactId>
-  <version>3.11.700-SNAPSHOT</version>
+  <version>3.11.800-SNAPSHOT</version>
   <packaging>eclipse-test-plugin</packaging>
   <properties>
     <code.ignoredWarnings>${tests.ignoredWarnings}</code.ignoredWarnings>
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/launching/ClasspathShortenerTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/launching/ClasspathShortenerTests.java
index d04b4ab..6c7a43d 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/launching/ClasspathShortenerTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/launching/ClasspathShortenerTests.java
@@ -226,7 +226,7 @@
 		assertTrue(result);
 		assertEquals(0, classpathShortener.getProcessTempFiles().size());
 		assertArrayEquals(new String[] { "PATH=C:\\WINDOWS\\System32;C:\\WINDOWS",
-				"CLASSPATH=" + classpathShortener.quoteWindowsPath(classpath) }, classpathShortener.getEnvp());
+				"CLASSPATH=" + classpath }, classpathShortener.getEnvp());
 		assertArrayEquals(new String[] { JAVA_8_PATH, ENCODING_ARG, MAIN_CLASS, "-arg1", "arg2" }, classpathShortener.getCmdLine());
 	}
 
@@ -245,7 +245,7 @@
 		assertTrue(result);
 		assertEquals(0, classpathShortener.getProcessTempFiles().size());
 		assertArrayEquals(new String[] { "MYVAR1=value1", "MYVAR2=value2",
-				"CLASSPATH=" + classpathShortener.quoteWindowsPath(classpath) }, classpathShortener.getEnvp());
+				"CLASSPATH=" + classpath }, classpathShortener.getEnvp());
 		assertArrayEquals(new String[] { JAVA_8_PATH, ENCODING_ARG, MAIN_CLASS, "-arg1", "arg2" }, classpathShortener.getCmdLine());
 	}
 
@@ -267,7 +267,7 @@
 		assertTrue(result);
 		assertEquals(0, classpathShortener.getProcessTempFiles().size());
 		assertArrayEquals(new String[] { "PATH=C:\\WINDOWS\\System32;C:\\WINDOWS",
-				"CLASSPATH=" + classpathShortener.quoteWindowsPath(classpath) }, classpathShortener.getEnvp());
+				"CLASSPATH=" + classpath }, classpathShortener.getEnvp());
 		assertArrayEquals(new String[] { JAVA_8_PATH, ENCODING_ARG, MAIN_CLASS, "-arg1", "arg2" }, classpathShortener.getCmdLine());
 	}
 
diff --git a/org.eclipse.jdt.debug.ui/META-INF/MANIFEST.MF b/org.eclipse.jdt.debug.ui/META-INF/MANIFEST.MF
index 2c97028..532ef22 100644
--- a/org.eclipse.jdt.debug.ui/META-INF/MANIFEST.MF
+++ b/org.eclipse.jdt.debug.ui/META-INF/MANIFEST.MF
@@ -39,7 +39,7 @@
  org.eclipse.core.expressions;bundle-version="[3.4.0,4.0.0)",
  org.eclipse.jdt.core;bundle-version="[3.15.0,4.0.0)",
  org.eclipse.debug.ui;bundle-version="[3.13.400,4.0.0)",
- org.eclipse.jdt.debug;bundle-version="[3.11.0,4.0.0)",
+ org.eclipse.jdt.debug;bundle-version="[3.15.0,4.0.0)",
  org.eclipse.jdt.launching;bundle-version="[3.11.0,4.0.0)",
  org.eclipse.jdt.ui;bundle-version="[3.17.0,4.0.0)",
  org.eclipse.core.runtime;bundle-version="[3.11.0,4.0.0)",
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/DebugUIMessages.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/DebugUIMessages.java
index 1c1df0a..e930bee 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/DebugUIMessages.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/DebugUIMessages.java
@@ -74,6 +74,8 @@
 	public static String JavaDebugPreferencePage_Value_must_be_a_valid_integer_greater_than__0__ms_1;
 	public static String JavaDebugPreferencePage_Replace_classfiles_containing_compilation_errors_1;
 	public static String JavaDebugPreferencePage_ShowStepResult_1;
+	public static String JavaDebugPreferencePage_ShowStepResult_local;
+	public static String JavaDebugPreferencePage_ShowStepResult_remote;
 	public static String JavaDebugPreferencePage_ShowStepTimeout_ms_1;
 	public static String JavaDebugPreferencePage_Communication_1;
 	public static String JavaDebugPreferencePage_Debugger__timeout__2;
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/DebugUIMessages.properties b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/DebugUIMessages.properties
index c6dabb2..f183829 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/DebugUIMessages.properties
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/DebugUIMessages.properties
@@ -33,7 +33,9 @@
 JavaDebugPreferencePage_Suspend_execution_on_co_mpilation_errors_1=Suspend execution on co&mpilation errors
 JavaDebugPreferencePage_Value_must_be_a_valid_integer_greater_than__0__ms_1=Value must be a valid integer greater than or equal to {0} ms
 JavaDebugPreferencePage_Replace_classfiles_containing_compilation_errors_1=Replace &classfiles containing compilation errors
-JavaDebugPreferencePage_ShowStepResult_1=S&how method result after a step operation (if supported by the VM; may be slow)
+JavaDebugPreferencePage_ShowStepResult_1=Show method result after a step operation (if supported by the VM; may be slow)
+JavaDebugPreferencePage_ShowStepResult_local=Enable for local launc&h types
+JavaDebugPreferencePage_ShowStepResult_remote=Enable for remote connections (may be e&ven slower)
 JavaDebugPreferencePage_ShowStepTimeout_ms_1=Don't show &if step operation takes longer than (ms):
 JavaDebugPreferencePage_Communication_1=Communication
 JavaDebugPreferencePage_Debugger__timeout__2=Debugger &timeout (ms):
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JavaDebugPreferencePage.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JavaDebugPreferencePage.java
index b265681..9045a10 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JavaDebugPreferencePage.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JavaDebugPreferencePage.java
@@ -98,6 +98,7 @@
 	private Button fAlertObsoleteButton;
 	private Button fPerformHCRWithCompilationErrors;
 	private Button fShowStepResult;
+	private Button fShowStepResultRemote;
 	private Button fAdvancedSourcelookup;
 
 	// Timeout preference widgets
@@ -188,9 +189,12 @@
 		fOnlyIncludeExportedEntries = SWTFactory.createCheckButton(composite, DebugUIMessages.JavaDebugPreferencePage_only_include_exported_entries, null, false, 1);
 
 		SWTFactory.createVerticalSpacer(composite, 1);
-		fShowStepResult = SWTFactory.createCheckButton(composite, DebugUIMessages.JavaDebugPreferencePage_ShowStepResult_1, null, false, 1);
+		group = SWTFactory.createGroup(composite, DebugUIMessages.JavaDebugPreferencePage_ShowStepResult_1, 1, 1, GridData.FILL_HORIZONTAL);
+		fShowStepResult = SWTFactory.createCheckButton(group, DebugUIMessages.JavaDebugPreferencePage_ShowStepResult_local, null, false, 1);
 
-		Composite space1 = SWTFactory.createComposite(composite, composite.getFont(), 1, 1, GridData.FILL_HORIZONTAL);
+		fShowStepResultRemote = SWTFactory.createCheckButton(group, DebugUIMessages.JavaDebugPreferencePage_ShowStepResult_remote, null, false, 1);
+
+		Composite space1 = SWTFactory.createComposite(group, composite.getFont(), 1, 1, GridData.FILL_HORIZONTAL);
 		fShowStepTimeoutText = new JavaDebugIntegerFieldEditor(JDIDebugModel.PREF_SHOW_STEP_TIMEOUT, DebugUIMessages.JavaDebugPreferencePage_ShowStepTimeout_ms_1, space1);
 		fShowStepTimeoutText.setPage(this);
 		fShowStepTimeoutText.setValidateStrategy(StringFieldEditor.VALIDATE_ON_KEY_STROKE);
@@ -239,6 +243,7 @@
 			prefs.put(JDIDebugModel.PREF_SUSPEND_ON_RECURRENCE_STRATEGY, SuspendOnRecurrenceStrategy.values()[suspendOnRecurranceIndex].name());
 			prefs.putBoolean(JDIDebugModel.PREF_HCR_WITH_COMPILATION_ERRORS, fPerformHCRWithCompilationErrors.getSelection());
 			prefs.putBoolean(JDIDebugModel.PREF_SHOW_STEP_RESULT, fShowStepResult.getSelection());
+			prefs.putBoolean(JDIDebugModel.PREF_SHOW_STEP_RESULT_REMOTE, fShowStepResultRemote.getSelection());
 			prefs.putInt(JDIDebugModel.PREF_SHOW_STEP_TIMEOUT, fShowStepTimeoutText.getIntValue());
 			prefs.putInt(JDIDebugModel.PREF_REQUEST_TIMEOUT, fTimeoutText.getIntValue());
 			prefs.putBoolean(JDIDebugModel.PREF_FILTER_BREAKPOINTS_FROM_UNRELATED_SOURCES, fFilterUnrelatedBreakpoints.getSelection());
@@ -287,6 +292,7 @@
 			fSuspendOnRecurringExceptionBreakpoints.select(suspendOnRecurranceIndex);
 			fPerformHCRWithCompilationErrors.setSelection(prefs.getBoolean(JDIDebugModel.PREF_HCR_WITH_COMPILATION_ERRORS, true));
 			fShowStepResult.setSelection(prefs.getBoolean(JDIDebugModel.PREF_SHOW_STEP_RESULT, true));
+			fShowStepResultRemote.setSelection(prefs.getBoolean(JDIDebugModel.PREF_SHOW_STEP_RESULT_REMOTE, true));
 			fShowStepTimeoutText.setStringValue(new Integer(prefs.getInt(JDIDebugModel.PREF_SHOW_STEP_RESULT, JDIDebugModel.DEF_SHOW_STEP_TIMEOUT)).toString());
 			fTimeoutText.setStringValue(new Integer(prefs.getInt(JDIDebugModel.PREF_REQUEST_TIMEOUT, JDIDebugModel.DEF_REQUEST_TIMEOUT)).toString());
 			fFilterUnrelatedBreakpoints.setSelection(prefs.getBoolean(JDIDebugModel.PREF_FILTER_BREAKPOINTS_FROM_UNRELATED_SOURCES, true));
@@ -328,6 +334,7 @@
 		fSuspendOnRecurringExceptionBreakpoints.select(suspendOnRecurranceIndex);
 		fPerformHCRWithCompilationErrors.setSelection(prefs.getBoolean(bundleId, JDIDebugModel.PREF_HCR_WITH_COMPILATION_ERRORS, true, null));
 		fShowStepResult.setSelection(prefs.getBoolean(bundleId, JDIDebugModel.PREF_SHOW_STEP_RESULT, true, null));
+		fShowStepResultRemote.setSelection(prefs.getBoolean(bundleId, JDIDebugModel.PREF_SHOW_STEP_RESULT_REMOTE, false, null));
 		fShowStepTimeoutText.setStringValue(new Integer(prefs.getInt(bundleId, JDIDebugModel.PREF_SHOW_STEP_TIMEOUT, JDIDebugModel.DEF_SHOW_STEP_TIMEOUT, null)).toString());
 		fTimeoutText.setStringValue(new Integer(prefs.getInt(bundleId, JDIDebugModel.PREF_REQUEST_TIMEOUT, JDIDebugModel.DEF_REQUEST_TIMEOUT, null)).toString());
 		fFilterUnrelatedBreakpoints.setSelection(prefs.getBoolean(bundleId, JDIDebugModel.PREF_FILTER_BREAKPOINTS_FROM_UNRELATED_SOURCES, true, null));
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/launcher/SharedJavaMainTab.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/launcher/SharedJavaMainTab.java
index 2a8ab68..ff3dce1 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/launcher/SharedJavaMainTab.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/launcher/SharedJavaMainTab.java
@@ -155,7 +155,10 @@
 		String moduleName = EMPTY_STRING;
 		try {
 			mainTypeName = config.getAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME, EMPTY_STRING);
-			moduleName = config.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, EMPTY_STRING);
+			moduleName = config.getAttribute(IJavaLaunchConfigurationConstants.ATTR_MODULE_NAME, EMPTY_STRING);
+			if (moduleName.isEmpty()) {
+				moduleName = config.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, EMPTY_STRING);
+			}
 		}
 		catch (CoreException ce) {JDIDebugUIPlugin.log(ce);}
 		fMainText.setText(mainTypeName);
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/launcher/SourceElementQualifierProvider.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/launcher/SourceElementQualifierProvider.java
index e462fb0..358f215 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/launcher/SourceElementQualifierProvider.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/launcher/SourceElementQualifierProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2020 IBM Corporation and others.
  *
  * This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License 2.0
@@ -15,6 +15,8 @@
 
 
 import java.io.File;
+import java.io.IOException;
+import java.util.zip.ZipFile;
 
 import org.eclipse.core.resources.IResource;
 import org.eclipse.core.runtime.IPath;
@@ -49,16 +51,23 @@
 			return fJavaLabels.getText(parent);
 		} else if (element instanceof ZipEntryStorage) {
 			ZipEntryStorage storage = (ZipEntryStorage)element;
-			String zipFileName = storage.getArchive().getName();
-			IPath path = new Path(zipFileName);
-			IRuntimeClasspathEntry entry = JavaRuntime.newArchiveRuntimeClasspathEntry(path);
-			IResource res = entry.getResource();
-			if (res == null) {
-				// external
-				return zipFileName;
+			try (ZipFile archive = storage.getArchive()) {
+				String zipFileName = archive.getName();
+				IPath path = new Path(zipFileName);
+				IRuntimeClasspathEntry entry = JavaRuntime.newArchiveRuntimeClasspathEntry(path);
+				IResource res = entry.getResource();
+				if (res == null) {
+					// external
+					return zipFileName;
+				}
+				// internal
+				return res.getName();
+			} catch (IOException e) {
+				e.printStackTrace();
 			}
-			// internal
-			return res.getName();
+			// ZipFile archive = storage.getArchive();
+			// String zipFileName = archive.getName();
+
 		} else if (element instanceof LocalFileStorage) {
 			LocalFileStorage storage = (LocalFileStorage)element;
 			File extFile = storage.getFile();
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/sourcelookup/SourceLookupMessages.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/sourcelookup/SourceLookupMessages.java
index 4f8eb0d..634d70d 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/sourcelookup/SourceLookupMessages.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/sourcelookup/SourceLookupMessages.java
@@ -1,12 +1,12 @@
 /**********************************************************************
  * Copyright (c) 2000, 2007 IBM Corporation and others.
  *
- * This program and the accompanying
- * materials are made available under the terms of
- * the Eclipse Public License 2.0 which accompanies this distribution, and is
-t https://www.eclipse.org/legal/epl-2.0/
-t
-t SPDX-License-Identifier: EPL-2.0
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
  *
  * Contributors:
  * IBM - Initial API and implementation
diff --git a/org.eclipse.jdt.debug/META-INF/MANIFEST.MF b/org.eclipse.jdt.debug/META-INF/MANIFEST.MF
index 1e4f7ee..6c403be 100644
--- a/org.eclipse.jdt.debug/META-INF/MANIFEST.MF
+++ b/org.eclipse.jdt.debug/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.jdt.debug; singleton:=true
-Bundle-Version: 3.14.100.qualifier
+Bundle-Version: 3.15.0.qualifier
 Bundle-ClassPath: jdi.jar,
  jdimodel.jar,
  tools.jar
diff --git a/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/engine/EvaluationSourceGenerator.java b/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/engine/EvaluationSourceGenerator.java
index 67eb1d4..0685c85 100644
--- a/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/engine/EvaluationSourceGenerator.java
+++ b/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/engine/EvaluationSourceGenerator.java
@@ -215,6 +215,8 @@
 						token = scanner.getNextToken();
 						if (token == ITerminalSymbols.TokenNameEOF) {
 							return true;
+						} else if (token == ITerminalSymbols.TokenNameEQUAL) {
+							return false;
 						}
 					}
 					count = 3;
diff --git a/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/instructions/InstructionsEvaluationMessages.java b/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/instructions/InstructionsEvaluationMessages.java
index 3ea02c7..b97de5f 100644
--- a/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/instructions/InstructionsEvaluationMessages.java
+++ b/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/instructions/InstructionsEvaluationMessages.java
@@ -2,11 +2,11 @@
  * Copyright (c) 2000, 2011 IBM Corporation and others.
  *
  * This program and the accompanying materials
- * are made available under the terms of
- * the Eclipse Public License 2.0 which accompanies this distribution, and is
-t https://www.eclipse.org/legal/epl-2.0/
-t
-t SPDX-License-Identifier: EPL-2.0
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
  *
  * Contributors:
  * IBM - Initial API and implementation
diff --git a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/jdwp/JDWPMessages.java b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/jdwp/JDWPMessages.java
index ef6c5df..67009ab 100644
--- a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/jdwp/JDWPMessages.java
+++ b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/jdwp/JDWPMessages.java
@@ -1,12 +1,12 @@
 /**********************************************************************
  * Copyright (c) 2000, 2005 IBM Corporation and others.
  *
- * This program and the accompanying
- * materials are made available under the terms of
- * the Eclipse Public License 2.0 which accompanies this distribution, and is
-t https://www.eclipse.org/legal/epl-2.0/
-t
-t SPDX-License-Identifier: EPL-2.0
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
  *
  * Contributors:
  * IBM - Initial API and implementation
diff --git a/org.eclipse.jdt.debug/model/org/eclipse/jdt/debug/core/JDIDebugModel.java b/org.eclipse.jdt.debug/model/org/eclipse/jdt/debug/core/JDIDebugModel.java
index 2a55463..d60d947 100644
--- a/org.eclipse.jdt.debug/model/org/eclipse/jdt/debug/core/JDIDebugModel.java
+++ b/org.eclipse.jdt.debug/model/org/eclipse/jdt/debug/core/JDIDebugModel.java
@@ -113,6 +113,13 @@
 			+ ".PREF_SHOW_STEP_RESULT"; //$NON-NLS-1$
 
 	/**
+	 * Preference key for specifying if PREF_SHOW_STEP_RESULT is respected for remote debugging.
+	 *
+	 * @since 3.15
+	 */
+	public static final String PREF_SHOW_STEP_RESULT_REMOTE = getPluginIdentifier() + ".PREF_SHOW_STEP_RESULT_REMOTE"; //$NON-NLS-1$
+
+	/**
 	 * Preference key for specifying if the timeout (in ms) after which the return method result of a step operation is not observed any longer (0
 	 * means no timeout, a negative value means: simulate a timeout condition).
 	 *
diff --git a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/JDIDebugMessages.java b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/JDIDebugMessages.java
index 0568b14..5f54baf 100644
--- a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/JDIDebugMessages.java
+++ b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/JDIDebugMessages.java
@@ -1,12 +1,12 @@
 /**********************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
+ * Copyright (c) 2004, 2005 IBM Corporation and others.s
  *
- * This program and the accompanying
- * materials are made available under the terms of
- * the Eclipse Public License 2.0 which accompanies this distribution, and is
-t https://www.eclipse.org/legal/epl-2.0/
-t
-t SPDX-License-Identifier: EPL-2.0
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
  *
  * Contributors:
  * IBM - Initial API and implementation
diff --git a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/JDIDebugPluginPreferenceInitializer.java b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/JDIDebugPluginPreferenceInitializer.java
index f259a72..e2a3e76 100644
--- a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/JDIDebugPluginPreferenceInitializer.java
+++ b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/JDIDebugPluginPreferenceInitializer.java
@@ -47,6 +47,7 @@
 		node.putInt(JDIDebugPlugin.PREF_ALL_INSTANCES_MAX_COUNT, 100);
 		node.putBoolean(JDIDebugModel.PREF_FILTER_BREAKPOINTS_FROM_UNRELATED_SOURCES, true);
 		node.putBoolean(JDIDebugModel.PREF_SHOW_STEP_RESULT, true);
+		node.putBoolean(JDIDebugModel.PREF_SHOW_STEP_RESULT_REMOTE, false);
 		node.putInt(JDIDebugModel.PREF_SHOW_STEP_TIMEOUT, JDIDebugModel.DEF_SHOW_STEP_TIMEOUT);
 		node.putBoolean(JDIDebugPlugin.PREF_ENABLE_ADVANCED_SOURCELOOKUP, true);
 	}
diff --git a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIDebugTarget.java b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIDebugTarget.java
index bb604cc..5b55b3d 100644
--- a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIDebugTarget.java
+++ b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIDebugTarget.java
@@ -676,7 +676,21 @@
 	@Override
 	public IThread[] getThreads() {
 		synchronized (fThreads) {
-			return fThreads.toArray(new IThread[0]);
+			IThread[] threads = new IThread[fThreads.size()];
+			int index = 0;
+			for (JDIThread thread : fThreads) {
+				if (!thread.isSystemThread()) {
+					threads[index] = thread;
+					++index;
+				}
+			}
+			for (JDIThread thread : fThreads) {
+				if (thread.isSystemThread()) {
+					threads[index] = thread;
+					++index;
+				}
+			}
+			return threads;
 		}
 	}
 
diff --git a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIStackFrame.java b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIStackFrame.java
index 32e8cc5..7fc366c 100644
--- a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIStackFrame.java
+++ b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIStackFrame.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2019 IBM Corporation and others.
+ * Copyright (c) 2000, 2020 IBM Corporation and others.
  *
  * This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License 2.0
@@ -510,7 +510,7 @@
 					String msg = JDIDebugModelMessages.JDIStackFrame_NotObservedBecauseOfTimeout;
 					variables.add(0, new JDIReturnValueVariable(JDIDebugModelMessages.JDIStackFrame_NoMethodReturnValue, new JDIPlaceholderValue(getJavaDebugTarget(), msg), false));
 				}
-			} else if(JDIThread.showStepResultIsEnabled()) {
+			} else if (JDIThread.showStepResultIsEnabled(getDebugTarget())) {
 				variables.add(0, new JDIReturnValueVariable(JDIDebugModelMessages.JDIStackFrame_NoMethodReturnValue, new JDIPlaceholderValue(getJavaDebugTarget(), ""), false)); //$NON-NLS-1$
 			}
 		}
@@ -951,7 +951,7 @@
 	 */
 	protected ObjectReference getUnderlyingThisObject() throws DebugException {
 		synchronized (fThread) {
-			if ((fStackFrame == null || fThisObject == null) && !isStatic()) {
+			if ((fStackFrame == null || fThisObject == null) && !isStatic() && !(getUnderlyingStackFrame() == null)) {
 				try {
 					fThisObject = getUnderlyingStackFrame().thisObject();
 				} catch (RuntimeException e) {
diff --git a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIThread.java b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIThread.java
index 2e9a6a7..ece2b06 100644
--- a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIThread.java
+++ b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIThread.java
@@ -37,6 +37,7 @@
 import org.eclipse.debug.core.DebugPlugin;
 import org.eclipse.debug.core.IStatusHandler;
 import org.eclipse.debug.core.model.IBreakpoint;
+import org.eclipse.debug.core.model.IDebugTarget;
 import org.eclipse.debug.core.model.IStackFrame;
 import org.eclipse.debug.core.model.IStep;
 import org.eclipse.debug.core.model.IStepFilter;
@@ -2580,7 +2581,7 @@
 				attachFiltersToStepRequest(request);
 				request.enable();
 
-				if (manager.virtualMachine().canGetMethodReturnValues() && showStepResultIsEnabled()) {
+				if (manager.virtualMachine().canGetMethodReturnValues() && showStepResultIsEnabled(getDebugTarget())) {
 					if (fCurrentMethodExitRequest != null) {
 						removeJDIEventListener(this, fCurrentMethodExitRequest);
 						manager.deleteEventRequest(fCurrentMethodExitRequest);
@@ -3842,7 +3843,10 @@
     protected DropToFrameHandler createDropToFrameHandler(IStackFrame stackFrame) throws DebugException {
         return new DropToFrameHandler(stackFrame);
     }
-	public static boolean showStepResultIsEnabled() {
+	public static boolean showStepResultIsEnabled(IDebugTarget debugTarget) {
+		if (debugTarget == null || debugTarget.getProcess() == null) {
+			return Platform.getPreferencesService().getBoolean(JDIDebugPlugin.getUniqueIdentifier(), JDIDebugModel.PREF_SHOW_STEP_RESULT_REMOTE, false, null);
+		}
 		return Platform.getPreferencesService().getBoolean(JDIDebugPlugin.getUniqueIdentifier(), JDIDebugModel.PREF_SHOW_STEP_RESULT, true, null);
 	}
 
diff --git a/org.eclipse.jdt.debug/pom.xml b/org.eclipse.jdt.debug/pom.xml
index c301bb6..330c7cb 100644
--- a/org.eclipse.jdt.debug/pom.xml
+++ b/org.eclipse.jdt.debug/pom.xml
@@ -18,6 +18,9 @@
   </parent>
   <groupId>org.eclipse.jdt</groupId>
   <artifactId>org.eclipse.jdt.debug</artifactId>
-  <version>3.14.100-SNAPSHOT</version>
+  <version>3.15.0-SNAPSHOT</version>
   <packaging>eclipse-plugin</packaging>
+  <properties>
+    <maven.compiler.release>8</maven.compiler.release>
+  </properties>
 </project>
diff --git a/org.eclipse.jdt.launching.macosx/META-INF/MANIFEST.MF b/org.eclipse.jdt.launching.macosx/META-INF/MANIFEST.MF
index e42c495..d024cc8 100644
--- a/org.eclipse.jdt.launching.macosx/META-INF/MANIFEST.MF
+++ b/org.eclipse.jdt.launching.macosx/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.jdt.launching.macosx; singleton:=true
-Bundle-Version: 3.4.400.qualifier
+Bundle-Version: 3.4.500.qualifier
 Bundle-Activator: org.eclipse.jdt.internal.launching.macosx.MacOSXLaunchingPlugin
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
diff --git a/org.eclipse.jdt.launching.macosx/pom.xml b/org.eclipse.jdt.launching.macosx/pom.xml
index a1ff724..1ebb5eb 100644
--- a/org.eclipse.jdt.launching.macosx/pom.xml
+++ b/org.eclipse.jdt.launching.macosx/pom.xml
@@ -18,7 +18,7 @@
   </parent>
   <groupId>org.eclipse.jdt</groupId>
   <artifactId>org.eclipse.jdt.launching.macosx</artifactId>
-  <version>3.4.400-SNAPSHOT</version>
+  <version>3.4.500-SNAPSHOT</version>
   <packaging>eclipse-plugin</packaging>
 
   <properties>
diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/ClasspathShortener.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/ClasspathShortener.java
index 76ae86b..9044af2 100644
--- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/ClasspathShortener.java
+++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/ClasspathShortener.java
@@ -440,7 +440,7 @@
 		if (envp == null) {
 			envp = getEnvpFromNativeEnvironment();
 		}
-		String classpathEnvVar = CLASSPATH_ENV_VAR_PREFIX + quoteWindowsPath(classpath);
+		String classpathEnvVar = CLASSPATH_ENV_VAR_PREFIX + classpath;
 		int index = getEnvClasspathIndex(envp);
 		if (index < 0) {
 			envp = Arrays.copyOf(envp, envp.length + 1);
@@ -483,7 +483,21 @@
 
 	public String quoteWindowsPath(String path) {
 		if (os.equals(Platform.OS_WIN32)) {
-			return "\"" + path + "\""; //$NON-NLS-1$ //$NON-NLS-2$
+			int length = path.length();
+			StringBuilder newPath = new StringBuilder(length);
+			boolean insideQuote = false;
+			for (int i = 0; i < length; i++) {
+				char c = path.charAt(i);
+				if (c == ' ' && !insideQuote) {
+					newPath.append('"');
+					insideQuote = true;
+				} else if (insideQuote) {
+					newPath.append('"');
+					insideQuote = false;
+				}
+				newPath.append(c);
+			}
+			return newPath.toString();
 		}
 		return path;
 	}
diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/DefaultProjectClasspathEntry.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/DefaultProjectClasspathEntry.java
index 93956fa..c5d9d43 100644
--- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/DefaultProjectClasspathEntry.java
+++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/DefaultProjectClasspathEntry.java
@@ -372,7 +372,7 @@
 			}
 		}
 	}
-	
+
 	/* (non-Javadoc)
 	 * @see org.eclipse.jdt.launching.IRuntimeClasspathEntry2#isComposite()
 	 */
diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/JREContainer.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/JREContainer.java
index 0b2683b..9773cfe 100644
--- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/JREContainer.java
+++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/JREContainer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2020 IBM Corporation and others.
  *
  * This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License 2.0
@@ -293,6 +293,7 @@
 	 * @param environmentId execution environment the resolution is for, or <code>null</code>
 	 * @return classpath entries
 	 */
+	@SuppressWarnings("unlikely-arg-type")
 	private static IClasspathEntry[] computeClasspathEntries(IVMInstall vm, IJavaProject project, String environmentId) {
 		LibraryLocation[] libs = vm.getLibraryLocations();
 		boolean overrideJavaDoc = false;
diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/sourcelookup/advanced/IJDIHelpers.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/sourcelookup/advanced/IJDIHelpers.java
index b7602ab..5c78d35 100644
--- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/sourcelookup/advanced/IJDIHelpers.java
+++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/sourcelookup/advanced/IJDIHelpers.java
@@ -39,7 +39,7 @@
 	/**
 	 * If the given element is a {@link IStackFrame}, returns classes locations of the stack frames "beneath" the given element. The returned iterable
 	 * does not include {@code null} elements.
-	 * 
+	 *
 	 * Returns empty iterable if the given element is not a {@link IStackFrame}.
 	 */
 	public Iterable<File> getStackFramesClassesLocations(Object element) throws DebugException;
diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/IRuntimeClasspathProvider.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/IRuntimeClasspathProvider.java
index 63fa02e..1e457ae 100644
--- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/IRuntimeClasspathProvider.java
+++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/IRuntimeClasspathProvider.java
@@ -29,7 +29,7 @@
  * </ul>
  * <p>
  * A provider extension is defined in <code>plugin.xml</code>. Following is an example definition of a runtime classpath provider extension.
- * 
+ *
  * <pre>
  * &lt;extension point="org.eclipse.jdt.launching.classpathProviders"&gt;
  *   &lt;classpathProvider&gt;
@@ -38,7 +38,7 @@
  *   &lt;/classpathProvider&gt;
  * &lt;/extension&gt;
  * </pre>
- * 
+ *
  * The attributes are specified as follows:
  * <ul>
  * <li><code>id</code> specifies a unique identifier for this extension. This identifier may be used to reference a provider on one of the launch
diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/JavaLaunchDelegate.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/JavaLaunchDelegate.java
index d45fac1..da19c89 100644
--- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/JavaLaunchDelegate.java
+++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/JavaLaunchDelegate.java
@@ -103,23 +103,23 @@
 		// Module name not required for Scrapbook page
 		if (supportsModule() && !mainTypeName.equals("org.eclipse.jdt.internal.debug.ui.snippeteditor.ScrapbookMain")) { //$NON-NLS-1$
 			// Module name need not be the same as project name
-			String defaultModuleName = null;
-			String moduleName = configuration.getAttribute(IJavaLaunchConfigurationConstants.ATTR_MODULE_NAME, defaultModuleName);
-			if (moduleName != null) {
-				runConfig.setModuleDescription(moduleName);
-			} else {
-				try {
-					IJavaProject proj = JavaRuntime.getJavaProject(configuration);
-					if (proj != null) {
-						IModuleDescription module = proj == null ? null : proj.getModuleDescription();
-						String modName = module == null ? null : module.getElementName();
-						if (modName != null) {
+			try {
+				IJavaProject proj = JavaRuntime.getJavaProject(configuration);
+				if (proj != null) {
+					IModuleDescription module = proj == null ? null : proj.getModuleDescription();
+					String modName = module == null ? null : module.getElementName();
+					if (modName != null && modName.length() > 0) {
+						String defaultModuleName = null;
+						String moduleName = configuration.getAttribute(IJavaLaunchConfigurationConstants.ATTR_MODULE_NAME, defaultModuleName);
+						if (moduleName != null) {
+							runConfig.setModuleDescription(moduleName);
+						} else {
 							runConfig.setModuleDescription(modName);
 						}
 					}
-				} catch (CoreException e) {
-					// Not a java Project so no need to set module description
 				}
+			} catch (CoreException e) {
+				// Not a java Project so no need to set module description
 			}
 		}
 
diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/sourcelookup/ArchiveSourceLocation.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/sourcelookup/ArchiveSourceLocation.java
index b87859e..b808639 100644
--- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/sourcelookup/ArchiveSourceLocation.java
+++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/sourcelookup/ArchiveSourceLocation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2020 IBM Corporation and others.
  *
  * This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License 2.0
@@ -156,7 +156,8 @@
 	@Override
 	public Object findSourceElement(String name) throws CoreException {
 		try {
-			if (getArchive() == null) {
+			ZipFile zip = getArchive();
+			if (zip == null) {
 				return null;
 			}
 
@@ -172,7 +173,7 @@
 				}
 				ZipEntry entry = getArchive().getEntry(entryPath.toString());
 				if (entry != null) {
-					return new ZipEntryStorage(getArchive(), entry);
+					return new ZipEntryStorage(zip, entry);
 				}
 				int index = typeName.lastIndexOf('$');
 				if (index > lastSlash) {
diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/sourcelookup/JavaProjectSourceLocation.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/sourcelookup/JavaProjectSourceLocation.java
index 3926044..22d2334 100644
--- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/sourcelookup/JavaProjectSourceLocation.java
+++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/sourcelookup/JavaProjectSourceLocation.java
@@ -48,7 +48,7 @@
  * <p>
  * This class may be instantiated.
  * </p>
- * 
+ *
  * @see IJavaSourceLocation
  * @since 2.0
  * @deprecated In 3.0, the debug platform provides source lookup facilities that should be used in place of the Java source lookup support provided in
diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/sourcelookup/PackageFragmentRootSourceLocation.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/sourcelookup/PackageFragmentRootSourceLocation.java
index ad49b8b..61020ac 100644
--- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/sourcelookup/PackageFragmentRootSourceLocation.java
+++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/sourcelookup/PackageFragmentRootSourceLocation.java
@@ -46,7 +46,7 @@
  * <p>
  * This class may be instantiated.
  * </p>
- * 
+ *
  * @see IJavaSourceLocation
  * @since 2.1
  * @deprecated In 3.0, the debug platform provides source lookup facilities that should be used in place of the Java source lookup support provided in
diff --git a/org.eclipse.jdt.launching/pom.xml b/org.eclipse.jdt.launching/pom.xml
index 5376a65..d8504a3 100644
--- a/org.eclipse.jdt.launching/pom.xml
+++ b/org.eclipse.jdt.launching/pom.xml
@@ -20,6 +20,9 @@
   <artifactId>org.eclipse.jdt.launching</artifactId>
   <version>3.17.0-SNAPSHOT</version>
   <packaging>eclipse-plugin</packaging>
+  <properties>
+    <maven.compiler.release>8</maven.compiler.release>
+  </properties>
   
   <build>
         <plugins>