Bug 526040: Merge Java 9 related changes from JDT
- tests.model
diff --git a/org.eclipse.jdt.core.tests.model/META-INF/MANIFEST.MF b/org.eclipse.jdt.core.tests.model/META-INF/MANIFEST.MF
index 7a26b38..f2acc30 100644
--- a/org.eclipse.jdt.core.tests.model/META-INF/MANIFEST.MF
+++ b/org.eclipse.jdt.core.tests.model/META-INF/MANIFEST.MF
@@ -1,7 +1,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.jdt.core.tests.model;singleton:=true
-Bundle-Version: 3.10.300.qualifier
+Bundle-Version: 3.10.350.qualifier
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
 Export-Package: org.eclipse.jdt.core.tests,
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/RunAllJava9Tests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/RunAllJava9Tests.java
new file mode 100644
index 0000000..15566b2
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/RunAllJava9Tests.java
@@ -0,0 +1,96 @@
+/*******************************************************************************
+ * Copyright (c) 2016, 2017 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.jdt.core.tests;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+import org.eclipse.jdt.core.tests.dom.ASTConverter9Test;
+import org.eclipse.jdt.core.tests.dom.ConverterTestSetup;
+import org.eclipse.jdt.core.tests.model.CompletionTests9;
+import org.eclipse.jdt.core.tests.model.Java9ElementTests;
+import org.eclipse.jdt.core.tests.model.JavaConventionTests;
+import org.eclipse.jdt.core.tests.model.JavaSearchBugs9Tests;
+import org.eclipse.jdt.core.tests.model.ModuleBuilderTests;
+import org.eclipse.jdt.core.tests.model.ResolveTests9;
+import org.eclipse.jdt.core.tests.util.AbstractCompilerTest;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+@SuppressWarnings({"rawtypes", "unchecked"})
+public class RunAllJava9Tests extends TestCase {
+
+	public RunAllJava9Tests(String name) {
+		super(name);
+	}
+	public static Class[] getAllTestClasses() {
+		return new Class[] {
+			ModuleBuilderTests.class,
+			Java9ElementTests.class,
+			JavaSearchBugs9Tests.class,
+			CompletionTests9.class,
+			ResolveTests9.class,
+			JavaConventionTests.class
+		};
+	}
+
+	public static Class[] getConverterTestClasses() {
+		return new Class[] {
+				ASTConverter9Test.class,
+		};
+	}
+
+	public static Class[] getCompilerClasses() {
+		return new Class[] {
+			org.eclipse.jdt.core.tests.eval.TestAll.class,
+			org.eclipse.jdt.core.tests.compiler.regression.TestAll.class,
+		};
+	}
+
+	public static Test suite() {
+		TestSuite ts = new TestSuite(RunAllJava9Tests.class.getName());
+
+		Class[] testClasses = getAllTestClasses();
+		addTestsToSuite(ts, testClasses);
+		testClasses = getConverterTestClasses();
+		addTestsToSuite(ts, testClasses);
+
+		AbstractCompilerTest.setpossibleComplianceLevels(AbstractCompilerTest.F_9);
+		addTestsToSuite(ts, getCompilerClasses());
+		// ComplianceDiagnoseTest is already added to the test suite through getTestSuite
+		ts.addTest(org.eclipse.jdt.core.tests.compiler.parser.TestAll.getTestSuite(false));
+		return ts;
+	}
+	public static void addTestsToSuite(TestSuite suite, Class[] testClasses) {
+
+		for (int i = 0; i < testClasses.length; i++) {
+			Class testClass = testClasses[i];
+			// call the suite() method and add the resulting suite to the suite
+			try {
+				Method suiteMethod = testClass.getDeclaredMethod("suite", new Class[0]); //$NON-NLS-1$
+				Test test = (Test)suiteMethod.invoke(null, new Object[0]);
+				suite.addTest(test);
+			} catch (IllegalAccessException e) {
+				e.printStackTrace();
+			} catch (InvocationTargetException e) {
+				e.getTargetException().printStackTrace();
+			} catch (NoSuchMethodException e) {
+				e.printStackTrace();
+			}
+		}
+	}
+	protected void tearDown() throws Exception {
+		ConverterTestSetup.PROJECT_SETUP = false;
+		super.tearDown();
+	}
+}
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter15JLS8Test.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter15JLS8Test.java
index 171aac2..ad8744c 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter15JLS8Test.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter15JLS8Test.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2011, 2014 IBM Corporation and others.
+ * Copyright (c) 2011, 2016 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
@@ -41,7 +41,7 @@
 
 	public void setUpSuite() throws Exception {
 		super.setUpSuite();
-		this.ast = AST.newAST(AST.JLS8);
+		this.ast = AST.newAST(getJLS8());
 	}
 
 	public ASTConverter15JLS8Test(String name) {
@@ -392,7 +392,7 @@
 	public void test0006() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0006", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
 		CompilationUnit compilationUnit = (CompilationUnit) result;
 		final String expectedOutput = "Package annotations must be in file package-info.java";
@@ -412,7 +412,7 @@
 	public void test0007() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0007", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
 		CompilationUnit compilationUnit = (CompilationUnit) result;
 		assertProblemsSize(compilationUnit, 0);
@@ -441,7 +441,7 @@
 
 	public void test0009() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0009", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		char[] source = sourceUnit.getSource().toCharArray();
 		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -465,7 +465,7 @@
 
 	public void test0010() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0010", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		char[] source = sourceUnit.getSource().toCharArray();
 		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -495,7 +495,7 @@
 
 	public void test0011() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0011", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		char[] source = sourceUnit.getSource().toCharArray();
 		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -526,7 +526,7 @@
 
 	public void test0012() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0012", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		char[] source = sourceUnit.getSource().toCharArray();
 		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -2230,7 +2230,7 @@
 	 */
 	public void test0072() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter15", "src", "test0072", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		assertProblemsSize(unit, 0);
@@ -3254,7 +3254,7 @@
 			"}";
 		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
 		this.workingCopy.getBuffer().setContents(contents.toCharArray());
-		ASTNode node = runConversion(AST.JLS8, this.workingCopy, true);		
+		ASTNode node = runConversion(getJLS8(), this.workingCopy, true);		
 		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
 		CompilationUnit compilationUnit = (CompilationUnit) node;
 		String expectedOutput = "Dead code";
@@ -4304,6 +4304,7 @@
 
 	/**
 	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=84358
+	 * @deprecated references deprecated code
 	 */
 	public void test0139() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0139", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
@@ -5912,7 +5913,7 @@
 	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=99510
 	public void test0191() throws CoreException, IOException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0191", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode node = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode node = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No node", node);
 		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
 		CompilationUnit unit = (CompilationUnit) node;
@@ -7522,7 +7523,7 @@
 		IType type = sourceUnit.getType("Test3");//$NON-NLS-1$
 
 		assertNotNull("Should not be null", type);
-		ASTParser parser= ASTParser.newParser(AST.JLS8);
+		ASTParser parser= ASTParser.newParser(getJLS8());
 		parser.setProject(type.getJavaProject());
 		IBinding[] bindings= parser.createBindings(new IJavaElement[] { type }, null);
 		if (bindings.length == 1 && bindings[0] instanceof ITypeBinding) {
@@ -7550,7 +7551,7 @@
 		IType type = sourceUnit.getType("Test3");//$NON-NLS-1$
 
 		assertNotNull("Should not be null", type);
-		ASTParser parser= ASTParser.newParser(AST.JLS8);
+		ASTParser parser= ASTParser.newParser(getJLS8());
 		parser.setSource(sourceUnit);
 		parser.setKind(ASTParser.K_COMPILATION_UNIT);
 		parser.setResolveBindings(true);
@@ -8132,7 +8133,7 @@
 	 */
 	public void test0247() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0247", "EclipseCompiler.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true, true);
 		assertNotNull("Not a compilation unit", result);
 	}
 
@@ -8271,7 +8272,7 @@
 	//https://bugs.eclipse.org/bugs/show_bug.cgi?id=174436
 	public void test0251() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0251", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode node = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode node = runConversion(getJLS8(), sourceUnit, false);
 		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
 		CompilationUnit unit = (CompilationUnit) node;
 		assertProblemsSize(unit, 0);
@@ -8301,7 +8302,7 @@
 	//https://bugs.eclipse.org/bugs/show_bug.cgi?id=174436
 	public void test0252() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0252", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode node = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode node = runConversion(getJLS8(), sourceUnit, false);
 		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
 		CompilationUnit unit = (CompilationUnit) node;
 		assertProblemsSize(unit, 0);
@@ -8341,7 +8342,7 @@
 			"}";
 		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
 		this.workingCopy.getBuffer().setContents(contents);
-		ASTNode node = runConversion(AST.JLS8, this.workingCopy, true, true, true);
+		ASTNode node = runConversion(getJLS8(), this.workingCopy, true, true, true);
 		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
 		CompilationUnit unit = (CompilationUnit) node;
 		String expectedError = "List cannot be resolved to a type";
@@ -8379,7 +8380,7 @@
 			"}";
 		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
 		this.workingCopy.getBuffer().setContents(contents);
-		ASTNode node = runConversion(AST.JLS8, this.workingCopy, true, true, true);
+		ASTNode node = runConversion(getJLS8(), this.workingCopy, true, true, true);
 		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
 		CompilationUnit unit = (CompilationUnit) node;
 		assertProblemsSize(unit, 0);
@@ -9451,7 +9452,7 @@
 		}
 
 		CompilationUnitRequestor requestor = new CompilationUnitRequestor();
-		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		ASTParser parser = ASTParser.newParser(getJLS8());
 		parser.setResolveBindings(true);
 		parser.setProject(getJavaProject("Converter15"));
 		parser.setKind(ASTParser.K_COMPILATION_UNIT);
@@ -9627,7 +9628,7 @@
 			"}";
 		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
 		this.workingCopy.getBuffer().setContents(contents);
-		ASTNode node = runConversion(AST.JLS8, this.workingCopy, true, true, true);
+		ASTNode node = runConversion(getJLS8(), this.workingCopy, true, true, true);
 		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
 		CompilationUnit unit = (CompilationUnit) node;
 		assertProblemsSize(unit, 0);
@@ -9681,7 +9682,7 @@
 			"}";
 		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
 		this.workingCopy.getBuffer().setContents(contents);
-		ASTNode node = runConversion(AST.JLS8, this.workingCopy, true, true, true);
+		ASTNode node = runConversion(getJLS8(), this.workingCopy, true, true, true);
 		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
 		CompilationUnit unit = (CompilationUnit) node;
 		assertProblemsSize(unit, 1, "Bar2 cannot be resolved to a type");
@@ -10756,7 +10757,7 @@
 			BindingKey.createTypeBindingKey(typeName)
 		};
 		final BindingRequestor requestor = new BindingRequestor();
-		final ASTParser parser = ASTParser.newParser(AST.JLS8);
+		final ASTParser parser = ASTParser.newParser(getJLS8());
 		parser.setResolveBindings(true);
 		parser.setProject(javaProject);
 		// this doesn't really do a parse; it's a type lookup
@@ -10791,7 +10792,7 @@
 			BindingKey.createTypeBindingKey(typeName)
 		};
 		final BindingRequestor requestor = new BindingRequestor();
-		final ASTParser parser = ASTParser.newParser(AST.JLS8);
+		final ASTParser parser = ASTParser.newParser(getJLS8());
 		parser.setResolveBindings(true);
 		parser.setProject(javaProject);
 		// this doesn't really do a parse; it's a type lookup
@@ -10829,7 +10830,7 @@
 			BindingKey.createTypeBindingKey(typeName)
 		};
 		final BindingRequestor requestor = new BindingRequestor();
-		final ASTParser parser = ASTParser.newParser(AST.JLS8);
+		final ASTParser parser = ASTParser.newParser(getJLS8());
 		parser.setResolveBindings(true);
 		parser.setProject(javaProject);
 		// this doesn't really do a parse; it's a type lookup
@@ -11252,7 +11253,7 @@
 		//IType type2 = sourceUnit2.getType("TestAnnotationWithStringDefault");//$NON-NLS-1$
 
 		assertNotNull("Should not be null", type);
-		ASTParser parser= ASTParser.newParser(AST.JLS8);
+		ASTParser parser= ASTParser.newParser(getJLS8());
 		parser.setProject(type.getJavaProject());
 		IBinding[] bindings= parser.createBindings(new IJavaElement[] { type }, null);
 		if (bindings.length == 1 && bindings[0] instanceof ITypeBinding) {
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter18Test.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter18Test.java
index a729768..616d8a4 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter18Test.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter18Test.java
@@ -37,7 +37,7 @@
 
 	public void setUpSuite() throws Exception {
 		super.setUpSuite();
-		this.ast = AST.newAST(AST.JLS8);
+		this.ast = AST.newAST(getAST8());
 	}
 
 	public ASTConverter18Test(String name) {
@@ -52,7 +52,12 @@
 	public static Test suite() {
 		return buildModelTestSuite(ASTConverter18Test.class);
 	}
-
+	/**
+	 * @deprecated
+	 */
+	static int getAST8() {
+		return AST.JLS8;
+	}
 	protected void tearDown() throws Exception {
 		super.tearDown();
 		if (this.workingCopy != null) {
@@ -3922,7 +3927,7 @@
 				"}\n";
 		this.workingCopy = getWorkingCopy("/Converter18/src/test/X.java", true/*resolve*/);
 		this.workingCopy.getBuffer().setContents(contents);
-		CompilationUnit compilationUnit = this.workingCopy.reconcile(AST.JLS8, ICompilationUnit.FORCE_PROBLEM_DETECTION, null, null);
+		CompilationUnit compilationUnit = this.workingCopy.reconcile(getAST8(), ICompilationUnit.FORCE_PROBLEM_DETECTION, null, null);
 		ASTNode node = getASTNode(compilationUnit, 0);
 		FieldDeclaration[] field = ((TypeDeclaration) node).getFields();
 		List fragments = field[0].fragments();
@@ -4361,7 +4366,7 @@
 		}
 	}
 	final BindingRequestor requestor = new BindingRequestor();
-	final ASTParser parser = ASTParser.newParser(AST.JLS8);
+	final ASTParser parser = ASTParser.newParser(getAST8());
 	parser.setResolveBindings(false);
 	parser.setProject(javaProject);
 	try {
@@ -4390,7 +4395,7 @@
 			"@interface TU { }";
 	this.workingCopy = getWorkingCopy("/Converter18/src/com/test/todo/Test.java", true/*computeProblems*/);
 	try {
-		buildAST(AST.JLS8, contents, this.workingCopy, false, true, true);
+		buildAST(getAST8(), contents, this.workingCopy, false, true, true);
 	} catch (ClassCastException e) {
 		fail(e.getMessage());
 	}
@@ -4434,7 +4439,7 @@
 	};
 	addLibrary(javaProject, jarName, srcName, contents, JavaCore.VERSION_1_8);
 
-	ASTParser parser = ASTParser.newParser(AST.JLS8);
+	ASTParser parser = ASTParser.newParser(getAST8());
 	parser.setIgnoreMethodBodies(true);
 	parser.setProject(javaProject);
 	IType type = javaProject.findType("test406805.TestEnum");
@@ -4497,7 +4502,7 @@
 	};
 	addLibrary(javaProject, jarName, srcName, contents, JavaCore.VERSION_1_8, null);
 
-	ASTParser parser = ASTParser.newParser(AST.JLS8);
+	ASTParser parser = ASTParser.newParser(getAST8());
 	parser.setIgnoreMethodBodies(true);
 	parser.setProject(javaProject);
 	IType type = javaProject.findType("test406805a.NestedTestEnum");
@@ -4558,7 +4563,7 @@
 	};
 	addLibrary(javaProject, jarName, srcName, contents, JavaCore.VERSION_1_8);
 
-	ASTParser parser = ASTParser.newParser(AST.JLS8);
+	ASTParser parser = ASTParser.newParser(getAST8());
 	parser.setIgnoreMethodBodies(true);
 	parser.setProject(javaProject);
 	IType type = javaProject.findType("test406805b.TestEnum");
@@ -4620,7 +4625,7 @@
 	};
 	addLibrary(javaProject, jarName, srcName, contents, JavaCore.VERSION_1_8, null);
 
-	ASTParser parser = ASTParser.newParser(AST.JLS8);
+	ASTParser parser = ASTParser.newParser(getAST8());
 	parser.setIgnoreMethodBodies(true);
 	parser.setProject(javaProject);
 	IType type = javaProject.findType("test406805d.NestedTestEnum");
@@ -4686,7 +4691,7 @@
 	};
 	addLibrary(javaProject, jarName, srcName, contents, JavaCore.VERSION_1_8);
 
-	ASTParser parser = ASTParser.newParser(AST.JLS8);
+	ASTParser parser = ASTParser.newParser(getAST8());
 	parser.setIgnoreMethodBodies(true);
 	parser.setProject(javaProject);
 	IType type = javaProject.findType("test436347.TestEnum");
@@ -4726,7 +4731,7 @@
 			"}\n";
 	this.workingCopy = getWorkingCopy("/Converter18/src/Bug433879/X.java", true/*computeProblems*/);
 	try {
-		buildAST(AST.JLS8, contents, this.workingCopy, false, true, true);
+		buildAST(getAST8(), contents, this.workingCopy, false, true, true);
 	} catch (ClassCastException e) {
 		fail(e.getMessage());
 	}
@@ -4748,7 +4753,7 @@
 			"}\n";
 	this.workingCopy = getWorkingCopy("/Converter18/src/Bug433879a/X.java", true/*computeProblems*/);
 	try {
-		buildAST(AST.JLS8, contents, this.workingCopy, false, true, true);
+		buildAST(getAST8(), contents, this.workingCopy, false, true, true);
 	} catch (ClassCastException e) {
 		fail(e.getMessage());
 	}
@@ -4769,7 +4774,7 @@
 			"}\n";
 	this.workingCopy = getWorkingCopy("/Converter18/src/Bug433879c/X.java", true/*computeProblems*/);
 	try {
-		buildAST(AST.JLS8, contents, this.workingCopy, false, true, true);
+		buildAST(getAST8(), contents, this.workingCopy, false, true, true);
 	} catch (ClassCastException e) {
 		fail(e.getMessage());
 	}
@@ -4796,7 +4801,7 @@
 			"}\n";
 	this.workingCopy = getWorkingCopy("/Converter18/src/Bug433879d/X.java", true/*computeProblems*/);
 	try {
-		buildAST(AST.JLS8, contents, this.workingCopy, false, true, true);
+		buildAST(getAST8(), contents, this.workingCopy, false, true, true);
 	} catch (ClassCastException e) {
 		fail(e.getMessage());
 	}
@@ -4825,7 +4830,7 @@
 			"}\n";
 	this.workingCopy = getWorkingCopy("/Converter18/src/Bug433879e/X.java", true/*computeProblems*/);
 	try {
-		buildAST(AST.JLS8, contents, this.workingCopy, false, true, true);
+		buildAST(getAST8(), contents, this.workingCopy, false, true, true);
 	} catch (ClassCastException e) {
 		fail(e.getMessage());
 	}
@@ -4929,7 +4934,7 @@
 		}
 	}
 	final BindingRequestor requestor = new BindingRequestor();
-	final ASTParser parser = ASTParser.newParser(AST.JLS8);
+	final ASTParser parser = ASTParser.newParser(getAST8());
 	parser.setResolveBindings(false);
 	parser.setProject(javaProject);
 	parser.setIgnoreMethodBodies(true);
@@ -5099,7 +5104,7 @@
 	this.workingCopy = getWorkingCopy("/Converter18/src/test460186/NPE.java", contents, false/*computeProblems*/);
 	IJavaProject javaProject = this.workingCopy.getJavaProject();
 
-	final ASTParser parser = ASTParser.newParser(AST.JLS8);
+	final ASTParser parser = ASTParser.newParser(getAST8());
 	parser.setResolveBindings(false);
 	parser.setProject(javaProject);
 	parser.setIgnoreMethodBodies(false);
@@ -5124,7 +5129,7 @@
 	this.workingCopy = getWorkingCopy("/Converter18/src/test443232/E21.java", contents, false/*computeProblems*/);
 	IJavaProject javaProject = this.workingCopy.getJavaProject();
 
-	final ASTParser parser = ASTParser.newParser(AST.JLS8);
+	final ASTParser parser = ASTParser.newParser(getAST8());
 	parser.setResolveBindings(false);
 	parser.setProject(javaProject);
 	parser.setIgnoreMethodBodies(false);
@@ -5258,6 +5263,7 @@
 		}
 	}
 }
+@SuppressWarnings("deprecation")
 public void testBug500503() throws JavaModelException {
 	String contents =
 			"package test432051;\n" +
@@ -5292,4 +5298,43 @@
 	parser.createASTs(new ICompilationUnit[] {this.workingCopy}, new String[0], requestor, null);
 }
 
+public void testBug497719_0001() throws JavaModelException {
+	String contents =
+			"import java.io.IOException;\n" +
+			"\n" +
+			"class Z {\n" +
+			"	 final Y yz = new Y();\n" +
+			"}\n" +
+			"public class X extends Z {\n" +
+			"	final  Y y2 = new Y();\n" +
+			"	\n" +
+			"	 Y bar() {\n" +
+			"		 return new Y();\n" +
+			"	 }\n" +
+			"	public void foo() {\n" +
+			"		Y y3 = new Y();\n" +
+			"		int a[];\n" +
+			"		try (y3; y3;super.yz;super.yz;this.y2;Y y4 = new Y())  {  \n" +
+			"			System.out.println(\"In Try\");\n" +
+			"		} catch (IOException e) {			  \n" +
+			"		} \n" +
+			"	}\n" +
+			"	public static void main(String[] args) {\n" +
+			"		new X().foo();\n" +
+			"	}\n" +
+			"}\n" +
+			"class Y implements AutoCloseable {\n" +
+			"	@Override\n" +
+			"	public void close() throws IOException {\n" +
+			"		System.out.println(\"Closed\");\n" +
+			"	}  \n" +
+			"}";
+		this.workingCopy = getWorkingCopy("/Converter8/src/X.java", true/*resolve*/);
+		ASTNode node = buildAST(contents, this.workingCopy, false);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		node = getASTNode((CompilationUnit)node, 1, 2);
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		TryStatement tryStatement = (TryStatement)methodDeclaration.getBody().statements().get(2);
+		assertEquals("Try Statement should be malformed", ASTNode.MALFORMED, (tryStatement.getFlags() & ASTNode.MALFORMED));
+}
 }
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter9Test.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter9Test.java
new file mode 100644
index 0000000..5b30d92
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter9Test.java
@@ -0,0 +1,805 @@
+/*******************************************************************************
+ * Copyright (c) 2016, 2017 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.jdt.core.tests.dom;
+
+import junit.framework.Test;
+
+import org.eclipse.jdt.core.dom.*;
+import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
+import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+import org.eclipse.jdt.internal.core.JrtPackageFragmentRoot;
+import org.eclipse.jdt.internal.core.SourceModule;
+
+import java.util.List;
+
+import org.eclipse.core.resources.IncrementalProjectBuilder;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jdt.core.IClasspathAttribute;
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IModularClassFile;
+import org.eclipse.jdt.core.IModuleDescription;
+import org.eclipse.jdt.core.IPackageFragmentRoot;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.core.JavaModelException;
+
+@SuppressWarnings({"rawtypes"})
+public class ASTConverter9Test extends ConverterTestSetup {
+
+	ICompilationUnit workingCopy;
+	private static boolean isJRE9 = false;
+	private static final String jcl9lib = "CONVERTER_JCL9_LIB";
+	
+
+	public void setUpSuite() throws Exception {
+		super.setUpSuite();
+		this.ast = AST.newAST(AST_INTERNAL_JLS9);
+	}
+
+	public ASTConverter9Test(String name) {
+		super(name);
+	}
+
+	static {
+//		TESTS_NUMBERS = new int[] { 19 };
+//		TESTS_RANGE = new int[] { 1, -1 };
+//		TESTS_NAMES = new String[] {"testBug515875_002"};
+	}
+	public static Test suite() {
+		String javaVersion = System.getProperty("java.version");
+		if (javaVersion.length() > 3) {
+			javaVersion = javaVersion.substring(0, 3);
+		}
+		long jdkLevel = CompilerOptions.versionToJdkLevel(javaVersion);
+		if (jdkLevel >= ClassFileConstants.JDK9) {
+			isJRE9 = true;
+		}
+		return buildModelTestSuite(ASTConverter9Test.class);
+	}
+
+	protected void tearDown() throws Exception {
+		super.tearDown();
+		if (this.workingCopy != null) {
+			this.workingCopy.discardWorkingCopy();
+			this.workingCopy = null;
+		}
+	}
+
+	public void testBug497719_0001() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter9" , "src", "testBug497719_001", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode result = runConversion(this.ast.apiLevel(), sourceUnit, true, true);
+		char[] source = sourceUnit.getSource().toCharArray();
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		assertProblemsSize(compilationUnit, 0);
+		ASTNode node = getASTNode(compilationUnit, 0, 0);
+		assertEquals("Not a compilation unit", ASTNode.METHOD_DECLARATION, node.getNodeType());
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		TryStatement tryStatement = (TryStatement) methodDeclaration.getBody().statements().get(1);
+		List list = tryStatement.resources();
+		VariableDeclarationExpression variableDeclarationExpression = (VariableDeclarationExpression) list.get(0);
+		checkSourceRange(variableDeclarationExpression, "final Y y = new Y()", source);
+		SimpleName simpleName = (SimpleName) list.get(1);
+		checkSourceRange(simpleName, "y1", source);
+		variableDeclarationExpression = (VariableDeclarationExpression) list.get(2);
+		checkSourceRange(variableDeclarationExpression, "final Y y2 = new Y()", source);
+		
+	}
+	
+	public void testBug497719_0002() throws JavaModelException {
+		String contents =
+				"import java.io.IOException;\n" +
+				"\n" +
+				"class Z {\n" +
+				"	 final Y yz = new Y();\n" +
+				"}\n" +
+				"public class X extends Z {\n" +
+				"	final  Y y2 = new Y();\n" +
+				"	\n" +
+				"	 Y bar() {\n" +
+				"		 return new Y();\n" +
+				"	 }\n" +
+				"	public void foo() {\n" +
+				"		Y y3 = new Y();\n" +
+				"		int a[];\n" +
+				"		try (y3; y3;super.yz;super.yz;this.y2;Y y4 = new Y())  {  \n" +
+				"			System.out.println(\"In Try\");\n" +
+				"		} catch (IOException e) {			  \n" +
+				"		} \n" +
+				"	}\n" +
+				"	public static void main(String[] args) {\n" +
+				"		new X().foo();\n" +
+				"	}\n" +
+				"}\n" +
+				"class Y implements AutoCloseable {\n" +
+				"	@Override\n" +
+				"	public void close() throws IOException {\n" +
+				"		System.out.println(\"Closed\");\n" +
+				"	}  \n" +
+				"}";
+			this.workingCopy = getWorkingCopy("/Converter9/src/X.java", true/*resolve*/);
+			ASTNode node = buildAST(contents, this.workingCopy, false);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			node = getASTNode((CompilationUnit)node, 1, 2);
+			MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+			TryStatement tryStatement = (TryStatement)methodDeclaration.getBody().statements().get(2);
+			List<Expression> resources = tryStatement.resources();
+			Expression expr = resources.get(0);
+			SimpleName simpleName = (SimpleName) expr;
+			checkSourceRange(simpleName, "y3", contents);
+			expr = resources.get(1);
+			simpleName = (SimpleName) expr;
+			checkSourceRange(expr, "y3", contents);
+			expr = resources.get(2);
+			SuperFieldAccess superFieldAccess = (SuperFieldAccess) expr;
+			checkSourceRange(superFieldAccess, "super.yz", contents);
+			expr = resources.get(3);
+			superFieldAccess = (SuperFieldAccess) expr;
+			checkSourceRange(superFieldAccess, "super.yz", contents);
+			expr = resources.get(4);
+			FieldAccess fieldAccess = (FieldAccess) expr;
+			checkSourceRange(fieldAccess, "this.y2", contents);
+			expr = resources.get(5);
+			VariableDeclarationExpression variableDeclarationExpression = (VariableDeclarationExpression) expr;
+			checkSourceRange(variableDeclarationExpression, "Y y4 = new Y()", contents);
+	}
+	public void testBug496123_0001() throws JavaModelException {
+		this.workingCopies = new ICompilationUnit[1];
+		String content =  "module first {"
+				+ "  requires second;\n"
+				+ "  exports pack11 to third, fourth;\n"
+				+ "  uses NewType;\n"
+				+ "  provides pack22.I22 with pack11.packinternal.Z11;\n"
+				+ "}";
+		this.workingCopies[0] = getWorkingCopy(
+				"/Converter9/src/module-info.java", content);
+
+		CompilationUnit unit = (CompilationUnit) runConversion(AST_INTERNAL_JLS9, this.workingCopies[0], false/*no bindings*/);
+		ModuleDeclaration moduleDecl = unit.getModule();
+
+		assertFalse(moduleDecl.isOpen());
+		checkSourceRange(moduleDecl, content, content);
+		List<ModuleDirective> stmts = moduleDecl.moduleStatements();
+		assertTrue(stmts.size() > 0);
+
+		RequiresDirective req = (RequiresDirective) stmts.get(0);
+		checkSourceRange(req, "requires second;", content);
+
+		ExportsDirective exp = (ExportsDirective) stmts.get(1);
+		checkSourceRange(exp, "exports pack11 to third, fourth;", content);
+		checkSourceRange(exp.getName(), "pack11", content);
+		List<Name> modules = exp.modules();
+		assertTrue(modules.size() == 2);
+		checkSourceRange(modules.get(0), "third", content);
+		checkSourceRange(modules.get(1), "fourth", content);
+
+		UsesDirective u = (UsesDirective) stmts.get(2);
+		checkSourceRange(u, "uses NewType;", content);
+		Name name = u.getName();
+		checkSourceRange(name, "NewType", content);
+
+		ProvidesDirective p = (ProvidesDirective) stmts.get(3);
+		checkSourceRange(p, "provides pack22.I22 with pack11.packinternal.Z11;", content);
+		name = p.getName();
+		checkSourceRange(name, "pack22.I22", content);
+		List<Name> impls = p.implementations();
+		assertTrue(impls.size() > 0);
+		name = impls.get(0);
+		checkSourceRange(name, "pack11.packinternal.Z11", content);
+	}
+
+	public void testBug512023_0001() throws Exception {
+		try {
+			IJavaProject project1 = createJavaProject("ConverterTests9", new String[] {"src"}, new String[] {jcl9lib}, "bin", "9");
+			project1.open(null);
+			addClasspathEntry(project1, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+			String content = 
+				"module first {\n" +
+				"    requires second.third;\n" +
+				"    exports pack1.X11 to org.eclipse.jdt;\n" +
+				"}";
+			createFile("/ConverterTests9/src/module-info.java",	content);
+			createFolder("/ConverterTests9/src/pack1");
+			createFile("/ConverterTests9/src/pack1/X11.java",
+					"package pack1;\n" +
+					"public class X11 {}\n");
+			this.workingCopy = getWorkingCopy("/ConverterTests9/src/module-info.java", false);
+			ASTNode node = buildAST(content, this.workingCopy, false);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit unit = (CompilationUnit) node;
+			ModuleDeclaration moduleDecl = unit.getModule();
+			assertFalse(moduleDecl.isOpen());
+			checkSourceRange(moduleDecl, content, content);
+			List<ModuleDirective> stmts = moduleDecl.moduleStatements();
+			assertTrue(stmts.size() > 0);
+
+			QualifiedName qName;
+			RequiresDirective req = (RequiresDirective) stmts.get(0);
+			qName = (QualifiedName) req.getName();
+			checkSourceRange(qName, "second.third", content);
+			checkSourceRange(qName.getName(), "third", content);
+			checkSourceRange(qName.getQualifier(), "second", content);
+
+			ExportsDirective exp = (ExportsDirective) stmts.get(1);
+			checkSourceRange(exp, "exports pack1.X11 to org.eclipse.jdt;", content);
+			qName = (QualifiedName) exp.getName();
+			checkSourceRange(qName, "pack1.X11", content);
+			checkSourceRange(qName.getName(), "X11", content);
+			checkSourceRange(qName.getQualifier(), "pack1", content);
+
+			List<Name> modules = exp.modules();
+			qName = (QualifiedName) modules.get(0);
+			checkSourceRange(qName, "org.eclipse.jdt", content);
+			checkSourceRange(qName.getName(), "jdt", content);
+			checkSourceRange(qName.getQualifier(), "org.eclipse", content);
+		} finally {
+			deleteProject("ConverterTests9");
+		}
+	}
+
+	public void testBug514417() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			createJava9Project("Bug514417", new String[]{"src"});
+			createFolder("/Bug514417/src/pack1");
+			String content =  "package pack1;\n" +
+					"import java.lang.String;\n" +
+					"public class X { \n" +
+					"	java.lang.String str = null;\n" +
+					"}\n";
+			createFile("/Bug514417/src/pack1/X.java", content);
+			ICompilationUnit sourceUnit = getCompilationUnit("Bug514417" , "src", "pack1", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+			ASTNode unit = runConversion(AST_INTERNAL_JLS9, sourceUnit, true);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, unit.getNodeType());
+			List imps = ((CompilationUnit) unit).imports();
+			assertEquals("import missing", 1, imps.size());
+			ImportDeclaration impo = (ImportDeclaration) imps.get(0);
+			IBinding bind = impo.resolveBinding();
+			assertNotNull("binding null", bind);
+			IJavaElement element = bind.getJavaElement();
+			assertNotNull(element);
+			assertEquals("Incorrect element type", IJavaElement.TYPE, element.getElementType());
+			IType type = (IType) element;
+			assertEquals("Incorrect name", "java.lang.String", type.getFullyQualifiedName());
+			element = element.getParent();
+			assertNotNull(element);
+			assertEquals("Incorrect element type", IJavaElement.CLASS_FILE, element.getElementType());
+			element = element.getParent();
+			assertNotNull(element);
+			assertEquals("Incorrect element type", IJavaElement.PACKAGE_FRAGMENT, element.getElementType());
+			element = element.getParent();
+			assertNotNull(element);
+			assertEquals("Incorrect element type", IJavaElement.PACKAGE_FRAGMENT_ROOT, element.getElementType());
+			assertTrue("incorrect root type", (element instanceof JrtPackageFragmentRoot));
+			JrtPackageFragmentRoot root = (JrtPackageFragmentRoot) element;
+			assertEquals("incorrect module name", "java.base", root.getElementName());
+		} finally {
+			deleteProject("Bug514417");
+		}
+	}
+	public void testBug516785_0001_since_9() throws Exception {
+		this.workingCopies = new ICompilationUnit[1];
+		String content =  "open module first {"
+				+ "  requires one;\n"
+				+ "  requires static two;\n"
+				+ "  requires transitive three;\n"
+				+ "  requires static transitive four;\n"
+				+ "  requires transitive static five;\n"
+				+ "}";
+		this.workingCopies[0] = getWorkingCopy(
+				"/Converter9/src/module-info.java", content);
+		
+		CompilationUnit unit = (CompilationUnit) runConversion(AST_INTERNAL_JLS9, this.workingCopies[0], false/*no bindings*/);
+		ModuleDeclaration moduleDecl = unit.getModule();
+		
+		assertTrue(moduleDecl.isOpen());
+		checkSourceRange(moduleDecl, content, content);
+		List<ModuleDirective> stmts = moduleDecl.moduleStatements();
+		assertTrue(stmts.size() > 0);
+		
+		int count = 0;
+		RequiresDirective req = (RequiresDirective) stmts.get(count++);
+		checkSourceRange(req, "requires one;", content);
+
+		req = (RequiresDirective) stmts.get(count++);
+		checkSourceRange(req, "requires static two;", content);
+		checkSourceRange((ASTNode) req.modifiers().get(0), "static", content);
+
+		req = (RequiresDirective) stmts.get(count++);
+		checkSourceRange(req, "requires transitive three;", content);
+		checkSourceRange((ASTNode) req.modifiers().get(0), "transitive", content);
+
+		req = (RequiresDirective) stmts.get(count++);
+		checkSourceRange(req, "requires static transitive four;", content);
+		checkSourceRange((ASTNode) req.modifiers().get(0), "static", content);
+		checkSourceRange((ASTNode) req.modifiers().get(1), "transitive", content);
+
+		req = (RequiresDirective) stmts.get(count++);
+		checkSourceRange(req, "requires transitive static five;", content);
+		checkSourceRange((ASTNode) req.modifiers().get(0), "transitive", content);
+		checkSourceRange((ASTNode) req.modifiers().get(1), "static", content);
+	}
+
+	public void testBug515875_001() throws Exception {
+		try {
+			IJavaProject project1 = createJavaProject("ConverterTests9", new String[] {"src"}, new String[] {jcl9lib}, "bin", "9");
+			project1.open(null);
+			addClasspathEntry(project1, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+			String content = 
+				"module first {\n" +
+				"    requires transitive static second.third;\n" +
+				"    exports pack1.X11 to org.eclipse.jdt;\n" +
+				"}";
+			createFile("/ConverterTests9/src/module-info.java",	content);
+			createFolder("/ConverterTests9/src/pack1");
+			createFile("/ConverterTests9/src/pack1/X11.java",
+					"package pack1;\n" +
+					"public class X11 {}\n");
+			this.workingCopy = getWorkingCopy("/ConverterTests9/src/module-info.java", true);
+			ASTNode node = buildAST(content, this.workingCopy, false);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit unit = (CompilationUnit) node;
+			ModuleDeclaration moduleDecl = unit.getModule();
+			checkSourceRange(moduleDecl, content, content);
+
+			IModuleBinding moduleBinding = moduleDecl.resolveBinding();
+			assertTrue("Module Binding null", moduleBinding != null);
+			String name = moduleBinding.getName();
+			assertTrue("Module Name null", name != null);
+			assertTrue("Wrong Module Name", name.equals("first"));
+
+			IJavaElement element = moduleBinding.getJavaElement();
+			assertNotNull("Module Java Element Null", element);
+			assertTrue(element instanceof SourceModule);
+			SourceModule sModule = (SourceModule) element;
+			assertTrue("Source module name incorrect", sModule.getElementName().equals("first"));
+
+			String key = moduleBinding.getKey();
+			assertTrue("Unique Key incorrecct", key.equals("\"first"));
+
+		} finally {
+			deleteProject("ConverterTests9");
+		}
+	}
+
+	public void testBug515875_002() throws Exception {
+		try {
+
+			IJavaProject project1 = createJavaProject("ConverterTests9", new String[] {"src"}, new String[] {jcl9lib}, "bin", "9");
+			project1.open(null);
+			addClasspathEntry(project1, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+			String fileContent = 
+				"module first {\n" +
+				"    requires second;\n" +
+				"	 uses pack22.I22;\n" + 
+				"    provides pack22.I22 with pack1.X11;\n" +
+				"}";
+			createFile("/ConverterTests9/src/module-info.java",	fileContent);
+			createFolder("/ConverterTests9/src/pack1");
+			createFile("/ConverterTests9/src/pack1/X11.java",
+					"package pack1;\n" +
+					"public class X11 implements pack22.I22{}\n");
+
+			IJavaProject project2 = createJavaProject("second", new String[] {"src"}, new String[] {jcl9lib}, "bin", "9");
+			project2.open(null);
+			addClasspathEntry(project2, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+			String secondFile = 
+					"module second {\n" +
+					"    exports pack22 to first;\n" +
+					"}";
+			createFile("/second/src/module-info.java",	secondFile);
+			createFolder("/second/src/pack22");
+			createFile("/second/src/pack22/I22.java",
+					"package pack22;\n" +
+					"public interface I22 {}\n");
+
+			addClasspathEntry(project1, JavaCore.newProjectEntry(project2.getPath()));
+
+			// workaround: I need a way to navigate from a source module to a binary module containing "uses" and "provides":
+			IJavaProject project3 = createJavaProject("third", new String[] {"src"}, new String[] {jcl9lib}, "bin", "9");
+			project3.open(null);
+			addClasspathEntry(project3, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+			String thirdFile = 
+					"module third {\n" +
+					"    requires first;\n" +
+					"}";
+			createFile("/third/src/module-info.java",	thirdFile);
+			addClasspathEntry(project3, JavaCore.newProjectEntry(project1.getPath()));
+			//
+
+			project1.close(); // sync
+			project2.close();
+			project3.close();
+			project2.open(null);
+			project1.open(null);
+			project3.open(null);
+
+			ICompilationUnit sourceUnit1 = getCompilationUnit("ConverterTests9" , "src", "", "module-info.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+			ASTNode unit1 = runConversion(AST_INTERNAL_JLS9, sourceUnit1, true);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, unit1.getNodeType());
+			ModuleDeclaration moduleDecl1 = ((CompilationUnit) unit1).getModule();
+			checkSourceRange(moduleDecl1, fileContent, fileContent);
+
+			IModuleBinding moduleBinding = moduleDecl1.resolveBinding();
+			Name modName1 = moduleDecl1.getName();
+			IBinding binding = modName1.resolveBinding();
+			assertTrue("binding not a module binding", binding instanceof IModuleBinding);
+			moduleBinding = (IModuleBinding) binding;
+
+			assertModuleFirstDetails(moduleBinding);
+			
+			// indirectly fetch the binary version of "first" via "third":
+			ICompilationUnit sourceUnit3 = getCompilationUnit("third" , "src", "", "module-info.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+			ASTNode unit3 = runConversion(AST_INTERNAL_JLS9, sourceUnit3, true);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, unit3.getNodeType());
+			ModuleDeclaration moduleDecl3 = ((CompilationUnit) unit3).getModule();
+			IModuleBinding firstModAsBinary = moduleDecl3.resolveBinding().getRequiredModules()[1]; // skip java.base
+
+			assertModuleFirstDetails(firstModAsBinary);
+		
+		} finally {
+			deleteProject("ConverterTests9");
+			deleteProject("second");
+			deleteProject("third");
+		}
+	}
+
+	private void assertModuleFirstDetails(IModuleBinding moduleBinding) {
+		assertTrue("Module Binding null", moduleBinding != null);
+		String name = moduleBinding.getName();
+		assertTrue("Module Name null", name != null);
+		assertTrue("Wrong Module Name", name.equals("first"));
+		
+		assertTrue("Module Binding null", moduleBinding != null);
+		name = moduleBinding.getName();
+		assertTrue("Module Name null", name != null);
+		assertTrue("Wrong Module Name", name.equals("first"));
+
+		IModuleBinding[] reqs = moduleBinding.getRequiredModules();
+		assertTrue("Null requires", reqs != null);
+		assertTrue("incorrect number of requires modules", reqs.length == 2);
+		assertTrue("incorrect name for requires modules", reqs[0].getName().equals("java.base"));
+		assertTrue("incorrect name for requires modules", reqs[1].getName().equals("second"));
+
+		IPackageBinding[] secPacks = reqs[1].getExportedPackages();
+		assertTrue("Packages Exported in second module null", secPacks != null);
+		assertTrue("Incorrect number of exported packages in second module", secPacks.length == 1);
+		IPackageBinding pack22 = secPacks[0];
+		assertTrue("Incorrect Package", pack22.getName().equals("pack22"));
+
+		ITypeBinding[] uses = moduleBinding.getUses();
+		assertTrue("uses null", uses != null);
+		assertTrue("Incorrect number of uses", uses.length == 1);
+		assertTrue("Incorrect uses", uses[0].getQualifiedName().equals("pack22.I22"));
+
+		ITypeBinding[] services = moduleBinding.getServices();
+		assertTrue("services null", services != null);
+		assertTrue("Incorrect number of services", services.length == 1);
+		for (ITypeBinding s : services) {
+			assertTrue("Incorrect service", s.getQualifiedName().equals("pack22.I22"));
+			ITypeBinding[] implementations = moduleBinding.getImplementations(s);
+			assertTrue("implementations null", implementations != null);
+			assertTrue("Incorrect number of implementations", implementations.length == 1);
+			assertTrue("Incorrect implementation", implementations[0].getQualifiedName().equals("pack1.X11"));
+		}
+	}
+
+	public void testBug515875_003() throws Exception {
+		try {
+
+			IJavaProject project1 = createJavaProject("ConverterTests9", new String[] {"src"}, new String[] {jcl9lib}, "bin", "9");
+			project1.open(null);
+			addClasspathEntry(project1, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+			String fileContent = 
+				"module first {\n" +
+				"    requires second;\n" +
+				"    provides pack22.I22 with pack1.X11;\n" +
+				"}";
+			createFile("/ConverterTests9/src/module-info.java",	fileContent);
+			createFolder("/ConverterTests9/src/pack1");
+			createFile("/ConverterTests9/src/pack1/X11.java",
+					"package pack1;\n" +
+					"public class X11 implements pack22.I22{}\n");
+
+			IJavaProject project2 = createJavaProject("second", new String[] {"src"}, new String[] {jcl9lib}, "bin", "9");
+			project2.open(null);
+			addClasspathEntry(project2, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+			String secondFile = 
+					"module second {\n" +
+					"    exports pack22 to first;\n" +
+					"}";
+			createFile("/second/src/module-info.java",	secondFile);
+			createFolder("/second/src/pack22");
+			createFile("/second/src/pack22/I22.java",
+					"package pack22;\n" +
+					"public interface I22 {}\n");
+
+			addClasspathEntry(project1, JavaCore.newProjectEntry(project2.getPath()));
+			project1.close(); // sync
+			project2.close();
+			project2.open(null);
+			project1.open(null);
+
+			ICompilationUnit sourceUnit1 = getCompilationUnit("ConverterTests9" , "src", "", "module-info.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+			ASTNode unit1 = runConversion(AST_INTERNAL_JLS9, sourceUnit1, true);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, unit1.getNodeType());
+			ModuleDeclaration moduleDecl1 = ((CompilationUnit) unit1).getModule();
+			checkSourceRange(moduleDecl1, fileContent, fileContent);
+
+			RequiresDirective req = (RequiresDirective) moduleDecl1.moduleStatements().get(0);
+			Name reqModule = req.getName();
+			IModuleBinding moduleBinding = (IModuleBinding) reqModule.resolveBinding();
+			assertTrue("Module Binding null", moduleBinding != null);
+			String name = moduleBinding.getName();
+			assertTrue("Module Name null", name != null);
+			assertTrue("Wrong Module Name", name.equals("second"));
+		}
+		finally {
+			deleteProject("ConverterTests9");
+			deleteProject("second");
+		}
+	}
+
+	public void testBug515875_004() throws Exception {
+		try {
+
+			IJavaProject project1 = createJavaProject("ConverterTests9", new String[] {"src"}, new String[] {jcl9lib}, "bin", "9");
+			project1.open(null);
+			addClasspathEntry(project1, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+			String fileContent = 
+				"open module first {\n" +
+				"    requires second;\n" +
+				"    provides pack22.I22 with pack1.X11;\n" +
+				"}";
+			createFile("/ConverterTests9/src/module-info.java",	fileContent);
+			createFolder("/ConverterTests9/src/pack1");
+			createFile("/ConverterTests9/src/pack1/X11.java",
+					"package pack1;\n" +
+					"public class X11 implements pack22.I22{}\n");
+
+			IJavaProject project2 = createJavaProject("second", new String[] {"src"}, new String[] {jcl9lib}, "bin", "9");
+			project2.open(null);
+			addClasspathEntry(project2, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+			String secondFile = 
+					"open module second {\n" +
+					"    exports pack22 to first;\n" +
+					"}";
+			createFile("/second/src/module-info.java",	secondFile);
+			createFolder("/second/src/pack22");
+			createFile("/second/src/pack22/I22.java",
+					"package pack22;\n" +
+					"public interface I22 {}\n");
+
+			addClasspathEntry(project1, JavaCore.newProjectEntry(project2.getPath()));
+			project1.close(); // sync
+			project2.close();
+			project2.open(null);
+			project1.open(null);
+
+			ICompilationUnit sourceUnit1 = getCompilationUnit("ConverterTests9" , "src", "", "module-info.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+			ASTNode unit1 = runConversion(AST_INTERNAL_JLS9, sourceUnit1, true);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, unit1.getNodeType());
+			ModuleDeclaration moduleDecl1 = ((CompilationUnit) unit1).getModule();
+			checkSourceRange(moduleDecl1, fileContent, fileContent);
+			
+			Name name = moduleDecl1.getName();
+			IModuleBinding moduleBinding = (IModuleBinding) name.resolveBinding();
+			assertTrue("Module Binding null", moduleBinding != null);
+			assertTrue("Module not open", moduleBinding.isOpen());
+
+			RequiresDirective req = (RequiresDirective) moduleDecl1.moduleStatements().get(0);
+			name = req.getName();
+			moduleBinding = (IModuleBinding) name.resolveBinding();
+			assertTrue("Module Binding null", moduleBinding != null);
+			String moduleName = moduleBinding.getName();
+			assertTrue("Module Name null", moduleName != null);
+			assertTrue("Wrong Module Name", moduleName.equals("second"));
+			assertTrue("Module not open", moduleBinding.isOpen());
+		}
+		finally {
+			deleteProject("ConverterTests9");
+			deleteProject("second");
+		}
+	}
+	public void testBug515875_005() throws Exception {
+		try {
+
+			IJavaProject project1 = createJavaProject("ConverterTests9", new String[] {"src"}, new String[] {jcl9lib}, "bin", "9");
+			project1.open(null);
+			addClasspathEntry(project1, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+			String fileContent =
+				"module first {\n" +
+				"    requires second;\n" +
+				"    exports pack1 to test;\n" +
+				"    opens pack1 to test;\n" +
+				"    provides pack22.I22 with pack1.X11, pack1.X12;\n" +
+				"}";
+			createFile("/ConverterTests9/src/module-info.java",	fileContent);
+			createFolder("/ConverterTests9/src/pack1");
+			createFile("/ConverterTests9/src/pack1/X11.java",
+					"package pack1;\n" +
+					"public class X11 implements pack22.I22{}\n");
+			createFile("/ConverterTests9/src/pack1/X12.java",
+					"package pack1;\n" +
+					"public class X12 implements pack22.I22{}\n");
+
+			IJavaProject project2 = createJavaProject("second", new String[] {"src"}, new String[] {jcl9lib}, "bin", "9");
+			project2.open(null);
+			addClasspathEntry(project2, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+			String secondFile =
+					"module second {\n" +
+					"    exports pack22 to first;\n" +
+					"}";
+			createFile("/second/src/module-info.java",	secondFile);
+			createFolder("/second/src/pack22");
+			createFile("/second/src/pack22/I22.java",
+					"package pack22;\n" +
+					"public interface I22 {}\n");
+
+			addClasspathEntry(project1, JavaCore.newProjectEntry(project2.getPath()));
+			project1.close(); // sync
+			project2.close();
+			project2.open(null);
+			project1.open(null);
+
+			ICompilationUnit sourceUnit1 = getCompilationUnit("ConverterTests9" , "src", "", "module-info.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+			ASTNode unit1 = runConversion(AST_INTERNAL_JLS9, sourceUnit1, true);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, unit1.getNodeType());
+			ModuleDeclaration moduleDecl1 = ((CompilationUnit) unit1).getModule();
+			checkSourceRange(moduleDecl1, fileContent, fileContent);
+
+			IModuleBinding moduleBinding = moduleDecl1.resolveBinding();
+			assertTrue("Module Binding null", moduleBinding != null);
+			String name = moduleBinding.getName();
+			assertTrue("Module Name null", name != null);
+			assertTrue("Wrong Module Name", name.equals("first"));
+
+			IPackageBinding[] exports = moduleBinding.getExportedPackages();
+			assertTrue("Incorrect number of exports", exports.length == 1);
+			IPackageBinding e = exports[0];
+			assertTrue("Incorrect Export", e.getKey().equals("pack1"));
+			String[] targets = moduleBinding.getExportedTo(e);
+			assertTrue("Incorrect number of targets", targets.length == 1);
+			assertTrue("Incorrect Target", targets[0].equals("test"));
+
+			IPackageBinding[] opens = moduleBinding.getOpenedPackages();
+			assertTrue("Incorrect number of opens", opens.length == 1);
+			e = opens[0];
+			assertTrue("Incorrect Opens", e.getKey().equals("pack1"));
+			targets = moduleBinding.getOpenedTo(e);
+			assertTrue("Incorrect number of targets", targets.length == 1);
+			assertTrue("Incorrect Target", targets[0].equals("test"));
+
+			ITypeBinding[] services = moduleBinding.getServices();
+			assertTrue("services null", services != null);
+			assertTrue("Incorrect number of services", services.length == 1);
+			for (ITypeBinding s : services) {
+				assertTrue("Incorrect service", s.getQualifiedName().equals("pack22.I22"));
+				ITypeBinding[] implementations = moduleBinding.getImplementations(s);
+				assertTrue("implementations null", implementations != null);
+				assertTrue("Incorrect number of implementations", implementations.length == 2);
+				assertTrue("Incorrect implementation", implementations[0].getQualifiedName().equals("pack1.X11"));
+				assertTrue("Incorrect implementation", implementations[1].getQualifiedName().equals("pack1.X12"));
+			}
+		}
+		finally {
+			deleteProject("ConverterTests9");
+			deleteProject("second");
+		}
+	}
+
+	public void testBug518843_001() throws Exception {
+		this.workingCopies = new ICompilationUnit[1];
+		String content =  "module first {"
+				+ "  exports pack11.module to third, fourth;\n"
+				+ "}";
+		this.workingCopies[0] = getWorkingCopy("/Converter9/src/module-info.java", content);
+
+		CompilationUnit unit = (CompilationUnit) runConversion(AST_INTERNAL_JLS9, this.workingCopies[0], false/*no bindings*/);
+		ModuleDeclaration moduleDecl = unit.getModule();
+		checkSourceRange(moduleDecl, content, content);
+	}
+	public void testBug519310_001() throws Exception {
+		this.workingCopies = new ICompilationUnit[1];
+		String content =  "package p;\n"
+				+ "  public interface I1 {\n"
+				+ "  private void foo() {}\n"
+				+ "}";
+		this.workingCopies[0] = getWorkingCopy("/Converter9/src/p/I1.java", content);
+
+		CompilationUnit unit = (CompilationUnit) runConversion(AST_INTERNAL_JLS9, this.workingCopies[0], false/*no bindings*/);
+		AbstractTypeDeclaration typeDeclaration = (AbstractTypeDeclaration) unit.types().get(0);
+		MethodDeclaration method = (MethodDeclaration) typeDeclaration.bodyDeclarations().get(0);
+		assertTrue("Method Malformed", (method.getFlags() & ASTNode.MALFORMED) == 0);
+	}
+
+	public void testResolveSourceModule1() throws Exception {
+		IJavaProject project1 = null;
+		try {
+			project1 = createJavaProject("ConverterTests9", new String[] {"src"}, new String[] {jcl9lib}, "bin", "9");
+			project1.open(null);
+			String fileContent = 
+				"open module first.module {\n" +
+				"}";
+			createFile("/ConverterTests9/src/module-info.java",	fileContent);
+	
+			IModuleDescription firstModule = project1.findModule("first.module", null);
+			IJavaElement[] elements = new IJavaElement[] {
+					firstModule,
+				};
+			ASTParser parser = ASTParser.newParser(AST_INTERNAL_JLS9);
+			parser.setProject(project1);
+			IBinding[] bindings = parser.createBindings(elements, null);
+			assertBindingsEqual(
+				"\"first.module",
+				bindings);
+			String key = bindings[0].getKey();
+			IJavaElement element = project1.findElement(key, this.wcOwner);
+			assertEquals("should be the same module", firstModule, element);
+		} finally {
+			if (project1 != null)
+				deleteProject(project1);
+		}
+	}
+
+	public void testResolveBinaryModule1() throws Exception {
+		IJavaProject project1 = null;
+		IJavaProject project2 = null;
+		try {
+			project1 = createJavaProject("ConverterTests9", new String[] {"src"}, new String[] {jcl9lib}, "bin", "9");
+			project1.open(null);
+			String fileContent = 
+				"module first.module { }";
+			createFile("/ConverterTests9/src/module-info.java",	fileContent);
+			
+			project1.getProject().build(IncrementalProjectBuilder.FULL_BUILD, null);
+	
+			project2 = createJavaProject("second", new String[] {"src"}, new String[] {jcl9lib}, "bin", "9");
+			addClasspathEntry(project2, JavaCore.newLibraryEntry(new Path("/ConverterTests9/bin"), null, null, null, 
+					new IClasspathAttribute[] { JavaCore.newClasspathAttribute(IClasspathAttribute.MODULE, "true") }, false));		
+			project2.open(null);
+	
+			IModuleDescription firstModule = null;
+			for (IPackageFragmentRoot root : project2.getPackageFragmentRoots()) {
+				IModuleDescription module = root.getModuleDescription();
+				if (module != null && module.getElementName().equals("first.module")) {
+					assertTrue("should be in modular class file", module.getParent() instanceof IModularClassFile);
+					firstModule = module;
+					break;
+				}
+			}
+			assertNotNull("finding first.module", firstModule);
+			assertEquals("same as through find", firstModule, project2.findModule("first.module", this.wcOwner));
+			IJavaElement[] elements = new IJavaElement[] {
+					firstModule,
+				};
+			ASTParser parser = ASTParser.newParser(AST_INTERNAL_JLS9);
+			parser.setProject(project2);
+			IBinding[] bindings = parser.createBindings(elements, null);
+			assertBindingsEqual(
+				"\"first.module",
+				bindings);
+			String key = bindings[0].getKey();
+			IJavaElement element = project2.findElement(key, this.wcOwner);
+			assertEquals("should be the same module", firstModule, element);
+		} finally {
+			if (project1 != null)
+				deleteProject(project1);
+			if (project2 != null)
+				deleteProject(project2);
+		}
+	}
+
+// Add new tests here
+}
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterAST8Test.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterAST8Test.java
index 9952e12..c4cea87 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterAST8Test.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterAST8Test.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2011, 2015 IBM Corporation and others.
+ * Copyright (c) 2011, 2016 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
@@ -25,7 +25,7 @@
 
 	public void setUpSuite() throws Exception {
 		super.setUpSuite();
-		this.ast = AST.newAST(AST.JLS8);
+		this.ast = AST.newAST(getJLS8());
 	}
 
 	public ASTConverterAST8Test(String name) {
@@ -50,7 +50,7 @@
 	public void test0001() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0001", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 
 		// check that we have the right tree
 		CompilationUnit unit = this.ast.newCompilationUnit();
@@ -119,7 +119,7 @@
 	public void test0002() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0002", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
 		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
 		ClassInstanceCreation classInstanceCreation = this.ast.newClassInstanceCreation();
@@ -134,7 +134,7 @@
 	public void test0003() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0003", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
 		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
 		ClassInstanceCreation classInstanceCreation = this.ast.newClassInstanceCreation();
@@ -155,7 +155,7 @@
 	public void test0004() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0004", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
 		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
 		ClassInstanceCreation classInstanceCreation = this.ast.newClassInstanceCreation();
@@ -179,7 +179,7 @@
 	public void test0005() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0005", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
 		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
 		ClassInstanceCreation classInstanceCreation = this.ast.newClassInstanceCreation();
@@ -206,7 +206,7 @@
 	public void test0006() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0006", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
 		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
 		ClassInstanceCreation classInstanceCreation = this.ast.newClassInstanceCreation();
@@ -236,7 +236,7 @@
 	public void test0007() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0007", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertTrue("Not an ExpressionStatement", node instanceof ExpressionStatement); //$NON-NLS-1$
 		ExpressionStatement expressionStatement = (ExpressionStatement) node;
@@ -257,7 +257,7 @@
 	public void test0008() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0008", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
 		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
 		ArrayCreation arrayCreation = this.ast.newArrayCreation();
@@ -278,7 +278,7 @@
 	public void test0009() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0009", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
 		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
 		ArrayCreation arrayCreation = this.ast.newArrayCreation();
@@ -301,7 +301,7 @@
 	public void test0010() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0010", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
 		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
 		ArrayCreation arrayCreation = this.ast.newArrayCreation();
@@ -317,7 +317,7 @@
 	public void test0011() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0011", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
 		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
 		ArrayCreation arrayCreation = this.ast.newArrayCreation();
@@ -333,7 +333,7 @@
 	public void test0012() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0012", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
 		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
 		ArrayCreation arrayCreation = this.ast.newArrayCreation();
@@ -354,7 +354,7 @@
 	public void test0013() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0013", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
@@ -371,7 +371,7 @@
 	public void test0014() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0014", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
@@ -390,7 +390,7 @@
 	public void test0015() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0015", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		Assignment assignment = this.ast.newAssignment();
@@ -408,7 +408,7 @@
 	public void test0016() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0016", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		Assignment assignment = this.ast.newAssignment();
@@ -426,7 +426,7 @@
 	public void test0017() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0017", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		Assignment assignment = this.ast.newAssignment();
@@ -444,7 +444,7 @@
 	public void test0018() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0018", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		Assignment assignment = this.ast.newAssignment();
@@ -462,7 +462,7 @@
 	public void test0019() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0019", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		Assignment assignment = this.ast.newAssignment();
@@ -480,7 +480,7 @@
 	public void test0020() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0020", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		Assignment assignment = this.ast.newAssignment();
@@ -498,7 +498,7 @@
 	public void test0021() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0021", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		Assignment assignment = this.ast.newAssignment();
@@ -516,7 +516,7 @@
 	public void test0022() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0022", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		Assignment assignment = this.ast.newAssignment();
@@ -534,7 +534,7 @@
 	public void test0023() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0023", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		Assignment assignment = this.ast.newAssignment();
@@ -552,7 +552,7 @@
 	public void test0024() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0024", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		Assignment assignment = this.ast.newAssignment();
@@ -570,7 +570,7 @@
 	public void test0025() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0025", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		Assignment assignment = this.ast.newAssignment();
@@ -588,7 +588,7 @@
 	public void test0026() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0026", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		Assignment assignment = this.ast.newAssignment();
@@ -606,7 +606,7 @@
 	public void test0027() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0027", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		PrefixExpression prefixExpression = this.ast.newPrefixExpression();
@@ -623,7 +623,7 @@
 	public void test0028() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0028", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		PrefixExpression prefixExpression = this.ast.newPrefixExpression();
@@ -640,7 +640,7 @@
 	public void test0029() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0029", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		PostfixExpression postfixExpression = this.ast.newPostfixExpression();
@@ -657,7 +657,7 @@
 	public void test0030() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0030", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		PostfixExpression postfixExpression = this.ast.newPostfixExpression();
@@ -674,7 +674,7 @@
 	public void test0031() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0031", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
@@ -695,7 +695,7 @@
 	public void test0032() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0032", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
@@ -716,7 +716,7 @@
 	public void test0033() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0033", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 
@@ -739,7 +739,7 @@
 	public void test0034() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0034", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 
@@ -762,7 +762,7 @@
 	public void test0035() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0035", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 
@@ -785,7 +785,7 @@
 	public void test0036() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0036", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 
@@ -808,7 +808,7 @@
 	public void test0037() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0037", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 
@@ -831,7 +831,7 @@
 	public void test0038() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0038", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 
@@ -853,7 +853,7 @@
 	public void test0039() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0039", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 
@@ -875,7 +875,7 @@
 	public void test0040() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0040", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 
@@ -897,7 +897,7 @@
 	public void test0041() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0041", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 
@@ -919,7 +919,7 @@
 	public void test0042() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0042", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
 		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
 		BooleanLiteral literal = this.ast.newBooleanLiteral(false);
@@ -933,7 +933,7 @@
 	public void test0043() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0043", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
 		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
 		BooleanLiteral literal = this.ast.newBooleanLiteral(true);
@@ -947,7 +947,7 @@
 	public void test0044() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0044", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
 		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
 		NullLiteral literal = this.ast.newNullLiteral();
@@ -961,7 +961,7 @@
 	public void test0045() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0045", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
 		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
 		CharacterLiteral literal = this.ast.newCharacterLiteral();
@@ -976,7 +976,7 @@
 	public void test0046() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0046", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
 		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
 		NumberLiteral literal = this.ast.newNumberLiteral("1.00001");//$NON-NLS-1$
@@ -990,7 +990,7 @@
 	public void test0047() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0047", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
 		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
 		NumberLiteral literal = this.ast.newNumberLiteral("1.00001f");//$NON-NLS-1$
@@ -1004,7 +1004,7 @@
 	public void test0048() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0048", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
 		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
 		NumberLiteral literal = this.ast.newNumberLiteral("30000");//$NON-NLS-1$
@@ -1018,7 +1018,7 @@
 	public void test0049() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0049", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
 		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
 		NumberLiteral literal = this.ast.newNumberLiteral("-2147483648");//$NON-NLS-1$
@@ -1032,7 +1032,7 @@
 	public void test0050() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0050", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
 		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
 		NumberLiteral literal = this.ast.newNumberLiteral("2147483648L");//$NON-NLS-1$
@@ -1046,7 +1046,7 @@
 	public void test0051() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0051", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
 		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
 		NumberLiteral literal = this.ast.newNumberLiteral("2147483648L");//$NON-NLS-1$
@@ -1063,7 +1063,7 @@
 	public void test0052() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0052", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
 		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
 		NumberLiteral literal = this.ast.newNumberLiteral("-9223372036854775808L");//$NON-NLS-1$
@@ -1077,7 +1077,7 @@
 	public void test0053() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0053", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
 		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
 		/*
@@ -1102,7 +1102,7 @@
 	public void test0054() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0054", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 
@@ -1126,7 +1126,7 @@
 	public void test0055() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0055", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 
@@ -1150,7 +1150,7 @@
 	public void test0056() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0056", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 
@@ -1174,7 +1174,7 @@
 	public void test0057() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0057", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 
@@ -1198,7 +1198,7 @@
 	public void test0058() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0058", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 
@@ -1222,7 +1222,7 @@
 	public void test0059() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0059", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 
@@ -1246,7 +1246,7 @@
 	public void test0060() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0060", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 
@@ -1270,7 +1270,7 @@
 	public void test0061() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0061", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 
@@ -1294,7 +1294,7 @@
 	public void test0062() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0062", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 
@@ -1318,7 +1318,7 @@
 	public void test0063() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0063", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 
@@ -1342,7 +1342,7 @@
 	public void test0064() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0064", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 
@@ -1366,7 +1366,7 @@
 	public void test0065() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0065", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 
@@ -1390,7 +1390,7 @@
 	public void test0066() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0066", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 
@@ -1414,7 +1414,7 @@
 	public void test0067() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0067", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 
@@ -1438,7 +1438,7 @@
 	public void test0068() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0068", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 
@@ -1462,7 +1462,7 @@
 	public void test0069() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0069", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 
@@ -1486,7 +1486,7 @@
 	public void test0070() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0070", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
@@ -1509,7 +1509,7 @@
 	public void test0071() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0071", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 
@@ -1539,7 +1539,7 @@
 	public void test0072() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0072", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
@@ -1561,7 +1561,7 @@
 	public void test0073() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0073", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
@@ -1583,7 +1583,7 @@
 	public void test0074() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0074", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 
@@ -1606,7 +1606,7 @@
 	public void test0075() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0075", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 
@@ -1630,7 +1630,7 @@
 	public void test0076() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0076", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 
@@ -1657,7 +1657,7 @@
 	public void test0077() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0077", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
@@ -1684,7 +1684,7 @@
 	public void test0078() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0078", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		SuperMethodInvocation superMethodInvocation = this.ast.newSuperMethodInvocation();
@@ -1700,7 +1700,7 @@
 	public void test0079() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0079", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		SuperMethodInvocation superMethodInvocation = this.ast.newSuperMethodInvocation();
@@ -1717,7 +1717,7 @@
 	public void test0080() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0080", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		MethodInvocation methodInvocation = this.ast.newMethodInvocation();
@@ -1734,7 +1734,7 @@
 	public void test0081() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0081", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		MethodInvocation methodInvocation = this.ast.newMethodInvocation();
@@ -1752,7 +1752,7 @@
 	public void test0082() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0082", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		ForStatement forStatement = this.ast.newForStatement();
@@ -1767,7 +1767,7 @@
 	public void test0083() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0083", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		ForStatement forStatement = this.ast.newForStatement();
@@ -1797,7 +1797,7 @@
 	public void test0084() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0084", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		ForStatement forStatement = this.ast.newForStatement();
@@ -1829,7 +1829,7 @@
 	public void test0085() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0085", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		ForStatement forStatement = this.ast.newForStatement();
@@ -1856,7 +1856,7 @@
 	public void test0086() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0086", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		ForStatement forStatement = this.ast.newForStatement();
@@ -1880,7 +1880,7 @@
 	public void test0087() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0087", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		ForStatement forStatement = this.ast.newForStatement();
@@ -1899,7 +1899,7 @@
 	public void test0088() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0088", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 
@@ -1919,7 +1919,7 @@
 	public void test0089() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0089", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 
@@ -1947,7 +1947,7 @@
 	public void test0090() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0090", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 
@@ -1970,7 +1970,7 @@
 	public void test0091() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0091", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		MethodDeclaration method = (MethodDeclaration)((TypeDeclaration) ((CompilationUnit) result).types().get(0)).bodyDeclarations().get(0);
 		SingleVariableDeclaration node = (SingleVariableDeclaration) method.parameters().get(0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
@@ -1987,7 +1987,7 @@
 	public void test0092() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0092", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		MethodDeclaration method = (MethodDeclaration)((TypeDeclaration) ((CompilationUnit) result).types().get(0)).bodyDeclarations().get(0);
 		SingleVariableDeclaration node = (SingleVariableDeclaration) method.parameters().get(0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
@@ -2006,7 +2006,7 @@
 	public void test0093() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0093", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
 		ForStatement forStatement = (ForStatement) node;
 		BreakStatement statement = (BreakStatement) ((Block) forStatement.getBody()).statements().get(0);
@@ -2022,7 +2022,7 @@
 	public void test0094() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0094", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
 		ForStatement forStatement = (ForStatement) node;
 		ContinueStatement statement = (ContinueStatement) ((Block) forStatement.getBody()).statements().get(0);
@@ -2038,7 +2038,7 @@
 	public void test0095() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0095", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		LabeledStatement labeledStatement = (LabeledStatement) getASTNode((CompilationUnit) result, 0, 0, 0);
 		ForStatement forStatement = (ForStatement) labeledStatement.getBody();
 		ContinueStatement statement = (ContinueStatement) ((Block) forStatement.getBody()).statements().get(0);
@@ -2055,7 +2055,7 @@
 	public void test0096() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0096", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		LabeledStatement labeledStatement = (LabeledStatement) getASTNode((CompilationUnit) result, 0, 0, 0);
 		ForStatement forStatement = (ForStatement) labeledStatement.getBody();
 		BreakStatement statement = (BreakStatement) ((Block) forStatement.getBody()).statements().get(0);
@@ -2072,7 +2072,7 @@
 	public void test0097() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0097", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		SwitchStatement switchStatement = this.ast.newSwitchStatement();
@@ -2136,7 +2136,7 @@
 	public void test0098() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0098", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		EmptyStatement emptyStatement = this.ast.newEmptyStatement();
@@ -2150,7 +2150,7 @@
 	public void test0099() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0099", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		DoStatement doStatement = this.ast.newDoStatement();
@@ -2170,7 +2170,7 @@
 	public void test0100() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0100", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		WhileStatement whileStatement = this.ast.newWhileStatement();
@@ -2186,7 +2186,7 @@
 	public void test0101() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0101", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		WhileStatement whileStatement = this.ast.newWhileStatement();
@@ -2202,7 +2202,7 @@
 	public void test0102() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0102", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
 		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
 		InfixExpression infixExpression = this.ast.newInfixExpression();
@@ -2226,7 +2226,7 @@
 	public void test0103() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0103", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
 		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
 		InfixExpression infixExpression = this.ast.newInfixExpression();
@@ -2253,7 +2253,7 @@
 	public void test0104() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0104", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
 		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
 		InfixExpression infixExpression = this.ast.newInfixExpression();
@@ -2280,7 +2280,7 @@
 	public void test0105() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0105", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
 		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
 		InfixExpression infixExpression = this.ast.newInfixExpression();
@@ -2307,7 +2307,7 @@
 	public void test0106() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0106", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
 		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
 		InfixExpression infixExpression = this.ast.newInfixExpression();
@@ -2343,7 +2343,7 @@
 	public void test0107() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0107", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
 		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
 		InfixExpression infixExpression = this.ast.newInfixExpression();
@@ -2370,7 +2370,7 @@
 	public void test0108() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0108", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
 		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
 		InfixExpression infixExpression = this.ast.newInfixExpression();
@@ -2397,7 +2397,7 @@
 	public void test0109() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0109", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
 		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
 		InfixExpression infixExpression = this.ast.newInfixExpression();
@@ -2433,7 +2433,7 @@
 	public void test0110() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0110", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		ReturnStatement returnStatement = this.ast.newReturnStatement();
@@ -2450,7 +2450,7 @@
 	public void test0111() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0111", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		ReturnStatement returnStatement = this.ast.newReturnStatement();
@@ -2467,7 +2467,7 @@
 	public void test0112() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0112", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		SynchronizedStatement synchronizedStatement = this.ast.newSynchronizedStatement();
@@ -2485,7 +2485,7 @@
 	public void test0113() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0113", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		TryStatement tryStatement = this.ast.newTryStatement();
@@ -2512,7 +2512,7 @@
 	public void test0114() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0114", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		TryStatement tryStatement = this.ast.newTryStatement();
@@ -2537,7 +2537,7 @@
 	public void test0115() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0115", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		TryStatement tryStatement = this.ast.newTryStatement();
@@ -2569,7 +2569,7 @@
 	public void test0116() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0116", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		ThrowStatement throwStatement = this.ast.newThrowStatement();
@@ -2584,7 +2584,7 @@
 	public void test0117() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0117", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		ThrowStatement throwStatement = this.ast.newThrowStatement();
@@ -2599,7 +2599,7 @@
 	public void test0118() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0118", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		ThrowStatement throwStatement = this.ast.newThrowStatement();
@@ -2614,7 +2614,7 @@
 	public void test0119() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0119", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		IfStatement ifStatement = this.ast.newIfStatement();
@@ -2630,7 +2630,7 @@
 	public void test0120() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0120", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		IfStatement ifStatement = this.ast.newIfStatement();
@@ -2649,7 +2649,7 @@
 	public void test0121() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0121", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		IfStatement ifStatement = this.ast.newIfStatement();
@@ -2668,7 +2668,7 @@
 	public void test0122() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0122", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		IfStatement ifStatement = this.ast.newIfStatement();
@@ -2688,7 +2688,7 @@
 	public void test0123() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0123", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		IfStatement ifStatement = this.ast.newIfStatement();
@@ -2715,7 +2715,7 @@
 	public void test0124() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0124", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		VariableDeclarationFragment fragment = this.ast.newVariableDeclarationFragment();
@@ -2758,7 +2758,7 @@
 	public void test0125() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0125", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		VariableDeclarationFragment fragment = this.ast.newVariableDeclarationFragment();
@@ -2801,7 +2801,7 @@
 	public void test0126() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0126", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		ForStatement forStatement = this.ast.newForStatement();
@@ -2830,7 +2830,7 @@
 	public void test0127() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0127", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		ForStatement forStatement = this.ast.newForStatement();
@@ -2859,7 +2859,7 @@
 	public void test0128() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0128", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		ForStatement forStatement = this.ast.newForStatement();
@@ -2888,7 +2888,7 @@
 	public void test0129() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0129", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		assertTrue("The node is not a FieldDeclaration", node instanceof FieldDeclaration); //$NON-NLS-1$
@@ -2909,7 +2909,7 @@
 	public void test0130() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0130", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		assertTrue("The node is not a FieldDeclaration", node instanceof FieldDeclaration); //$NON-NLS-1$
@@ -2954,7 +2954,7 @@
 	public void test0131() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0131", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		assertTrue("The node is not a MethodDeclaration", node instanceof MethodDeclaration); //$NON-NLS-1$
@@ -2978,7 +2978,7 @@
 	public void test0132() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0132", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		assertTrue("The node is not a MethodDeclaration", node instanceof MethodDeclaration); //$NON-NLS-1$
@@ -2993,7 +2993,7 @@
 	public void test0133() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0133", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		assertTrue("The node is not a MethodDeclaration", node instanceof MethodDeclaration); //$NON-NLS-1$
@@ -3008,7 +3008,7 @@
 	public void test0134() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0134", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		assertTrue("The node is not a MethodDeclaration", node instanceof MethodDeclaration); //$NON-NLS-1$
@@ -3024,7 +3024,7 @@
 	public void test0135() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0135", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		assertTrue("The node is not a FieldDeclaration", node instanceof FieldDeclaration); //$NON-NLS-1$
@@ -3038,7 +3038,7 @@
 	public void test0136() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0136", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		assertTrue("The node is not a FieldDeclaration", node instanceof FieldDeclaration); //$NON-NLS-1$
@@ -3053,7 +3053,7 @@
 	public void test0137() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0137", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		assertTrue("The node is not a FieldDeclaration", node instanceof FieldDeclaration); //$NON-NLS-1$
@@ -3068,7 +3068,7 @@
 	public void test0138() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0138", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		assertTrue("The node is not a TypeDeclaration", node instanceof TypeDeclaration); //$NON-NLS-1$
@@ -3086,7 +3086,7 @@
 	public void test0139() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0139", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		assertTrue("The node is not a TypeDeclaration", node instanceof TypeDeclaration); //$NON-NLS-1$
@@ -3105,7 +3105,7 @@
 	public void test0140() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0140", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		assertTrue("The node is not a TypeDeclaration", node instanceof TypeDeclaration); //$NON-NLS-1$
@@ -3126,7 +3126,7 @@
 	public void test0141() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0141", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		assertTrue("The node is not a TypeDeclaration", node instanceof TypeDeclaration); //$NON-NLS-1$
@@ -3144,7 +3144,7 @@
 	public void test0142() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0142", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		assertTrue("The node is not a TypeDeclaration", node instanceof TypeDeclaration); //$NON-NLS-1$
@@ -3159,7 +3159,7 @@
 	public void test0143() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0143", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		assertTrue("The node is not a TypeDeclaration", node instanceof TypeDeclaration); //$NON-NLS-1$
@@ -3174,7 +3174,7 @@
 	public void test0144() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0144", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		assertTrue("The node is not a TypeDeclaration", node instanceof TypeDeclaration); //$NON-NLS-1$
@@ -3189,7 +3189,7 @@
 	public void test0145() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0145", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		checkSourceRange(node, "{}", source); //$NON-NLS-1$
@@ -3201,7 +3201,7 @@
 	public void test0146() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0146", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		checkSourceRange(node, "static {}", source); //$NON-NLS-1$
@@ -3214,7 +3214,7 @@
 	public void test0147() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0147", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		Javadoc actualJavadoc = ((Initializer) node).getJavadoc();
@@ -3234,7 +3234,7 @@
 	public void test0148() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0148", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		Javadoc actualJavadoc = ((Initializer) node).getJavadoc();
@@ -3253,7 +3253,7 @@
 	public void test0149() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0149", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		Javadoc actualJavadoc = ((Initializer) node).getJavadoc();
@@ -3266,7 +3266,7 @@
 	 */
 	public void test0150() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0150", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		assertNotNull("Expression should not be null", result); //$NON-NLS-1$
 		assertTrue("The result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
@@ -3282,7 +3282,7 @@
 	 */
 	public void test0151() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0151", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		assertNotNull("Expression should not be null", result); //$NON-NLS-1$
 		assertTrue("The compilation unit is malformed", !isMalformed(result)); //$NON-NLS-1$
 	}
@@ -3292,7 +3292,7 @@
 	 */
 	public void test0152() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0152", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		assertNotNull("Expression should not be null", result); //$NON-NLS-1$
 		assertTrue("The compilation unit is malformed", !isMalformed(result)); //$NON-NLS-1$
 		ASTNode node = getASTNode((CompilationUnit) result, 0);
@@ -3311,7 +3311,7 @@
 	 */
 	public void test0153() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0153", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		assertNotNull("Expression should not be null", result); //$NON-NLS-1$
 		assertTrue("The compilation unit is malformed", !isMalformed(result)); //$NON-NLS-1$
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -3325,7 +3325,7 @@
 	 */
 	public void test0154() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0154", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("Expression should not be null", result); //$NON-NLS-1$
 		assertTrue("The result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -3344,7 +3344,7 @@
 	public void test0155() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0155", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("Expression should not be null", result); //$NON-NLS-1$
 		assertTrue("The result is not a compilation unit", result instanceof CompilationUnit);  //$NON-NLS-1$
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -3366,7 +3366,7 @@
 	public void test0156() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0156", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("Expression should not be null", result); //$NON-NLS-1$
 		assertTrue("The result is not a compilation unit", result instanceof CompilationUnit);  //$NON-NLS-1$
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -3389,7 +3389,7 @@
 	 */
 	public void test0157() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "", "Test0157.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("Expression should not be null", result); //$NON-NLS-1$
 		assertTrue("The result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -3427,7 +3427,7 @@
 	 */
 	public void test0158() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "", "Test0158.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("Expression should not be null", result); //$NON-NLS-1$
 		assertTrue("The result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -3465,7 +3465,7 @@
 	 */
 	public void test0159() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0159", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("Expression should not be null", result); //$NON-NLS-1$
 		assertTrue("The result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 	}
@@ -3475,7 +3475,7 @@
 	 */
 	public void test0160() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0160", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("Expression should not be null", result); //$NON-NLS-1$
 		assertTrue("The result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -3536,7 +3536,7 @@
 	 */
 	public void test0161() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0161", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("Expression should not be null", result); //$NON-NLS-1$
 		assertTrue("The result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -3595,7 +3595,7 @@
 	 */
 	public void test0162() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0162", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("Expression should not be null", result); //$NON-NLS-1$
 		assertTrue("The result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -3631,7 +3631,7 @@
 	 */
 	public void test0163() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0163", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
 		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
 		assertTrue("Not an anonymous type declaration", expression instanceof ClassInstanceCreation); //$NON-NLS-1$
@@ -3666,7 +3666,7 @@
 	 */
 	public void test0164() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0164", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		assertTrue("Not an type declaration", node instanceof TypeDeclaration); //$NON-NLS-1$
@@ -3700,7 +3700,7 @@
 	 */
 	public void test0165() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0165", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		assertTrue("Not an type declaration", node instanceof TypeDeclarationStatement); //$NON-NLS-1$
@@ -3736,7 +3736,7 @@
 	 */
 	public void test0166() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0166", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertTrue("Not a VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
 		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
@@ -3806,7 +3806,7 @@
 	public void test0167() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0167", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		assertTrue("Instance of VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
@@ -3825,7 +3825,7 @@
 	 */
 	public void test0168() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0168.test1", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("Expression should not be null", result); //$NON-NLS-1$
 		assertTrue("The result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -3852,7 +3852,7 @@
 	 */
 	public void test0169() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0169", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("Expression should not be null", result); //$NON-NLS-1$
 		assertTrue("The result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -3878,7 +3878,7 @@
 	 */
 	public void test0170() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "", "Test0170.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("Expression should not be null", result); //$NON-NLS-1$
 		assertTrue("The result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -3903,7 +3903,7 @@
 	 */
 	public void test0171() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0171", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("Expression should not be null", result); //$NON-NLS-1$
 		assertTrue("The result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -3936,7 +3936,7 @@
 	 */
 	public void test0172() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0172", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("Expression should not be null", result); //$NON-NLS-1$
 		assertTrue("The result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -4043,7 +4043,7 @@
 	 */
 	public void test0173() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0173", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		assertTrue("Not an expressionStatement", node instanceof ExpressionStatement); //$NON-NLS-1$
@@ -4073,7 +4073,7 @@
 	 */
 	public void test0174() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0174", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 1, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		assertTrue("Not an expressionStatement", node instanceof ExpressionStatement); //$NON-NLS-1$
@@ -4102,7 +4102,7 @@
 	 */
 	public void test0175() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0175", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0);
 		assertTrue("VariableDeclarationStatement", node2 instanceof FieldDeclaration); //$NON-NLS-1$
 		FieldDeclaration fieldDeclaration = (FieldDeclaration) node2;
@@ -4122,7 +4122,7 @@
 	 */
 	public void test0176() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0176", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		ASTNode node2 = getASTNode((CompilationUnit) result, 0, 1, 0);
 		assertTrue("Return statement", node2 instanceof ReturnStatement); //$NON-NLS-1$
 		ReturnStatement returnStatement = (ReturnStatement) node2;
@@ -4145,7 +4145,7 @@
 	 */
 	public void test0177() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0177", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 1, 1);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		assertTrue("Not an expressionStatement", node instanceof ExpressionStatement); //$NON-NLS-1$
@@ -4175,7 +4175,7 @@
 	 */
 	public void test0178() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0178", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		ASTNode node2 = getASTNode((CompilationUnit) result, 1, 0, 0);
 		assertTrue("Return statement", node2 instanceof ReturnStatement); //$NON-NLS-1$
 		ReturnStatement returnStatement = (ReturnStatement) node2;
@@ -4193,7 +4193,7 @@
 	 */
 	public void test0179() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0179", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertTrue("VariableDeclarationStatement", node2 instanceof VariableDeclarationStatement); //$NON-NLS-1$
 		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node2;
@@ -4212,7 +4212,7 @@
 	 */
 	public void test0180() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0180", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertTrue("VariableDeclarationStatement", node2 instanceof VariableDeclarationStatement); //$NON-NLS-1$
 		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node2;
@@ -4233,7 +4233,7 @@
 	 */
 	public void test0181() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0181", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertTrue("VariableDeclarationStatement", node2 instanceof VariableDeclarationStatement); //$NON-NLS-1$
 		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node2;
@@ -4254,7 +4254,7 @@
 	public void test0182() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0182", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 1);
 		assertTrue("IfStatement", node2 instanceof IfStatement); //$NON-NLS-1$
 		IfStatement ifStatement = (IfStatement) node2;
@@ -4272,7 +4272,7 @@
 	public void test0183() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0183", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 1);
 		assertTrue("IfStatement", node2 instanceof IfStatement); //$NON-NLS-1$
 		IfStatement ifStatement = (IfStatement) node2;
@@ -4290,7 +4290,7 @@
 	public void test0184() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0184", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 1);
 		assertTrue("IfStatement", node2 instanceof IfStatement); //$NON-NLS-1$
 		IfStatement ifStatement = (IfStatement) node2;
@@ -4308,7 +4308,7 @@
 	public void test0185() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0185", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 1);
 		assertTrue("IfStatement", node2 instanceof IfStatement); //$NON-NLS-1$
 		IfStatement ifStatement = (IfStatement) node2;
@@ -4326,7 +4326,7 @@
 	public void test0186() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0186", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 1);
 		assertTrue("IfStatement", node2 instanceof IfStatement); //$NON-NLS-1$
 		IfStatement ifStatement = (IfStatement) node2;
@@ -4344,7 +4344,7 @@
 	public void test0187() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0187", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 1);
 		assertTrue("IfStatement", node2 instanceof WhileStatement); //$NON-NLS-1$
 		WhileStatement whileStatement = (WhileStatement) node2;
@@ -4362,7 +4362,7 @@
 	public void test0188() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0188", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 2);
 		assertTrue("DoStatement", node2 instanceof DoStatement); //$NON-NLS-1$
 		DoStatement statement = (DoStatement) node2;
@@ -4380,7 +4380,7 @@
 	public void test0189() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0189", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertTrue("ForStatement", node2 instanceof ForStatement); //$NON-NLS-1$
 		ForStatement statement = (ForStatement) node2;
@@ -4398,7 +4398,7 @@
 	public void test0190() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0190", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		ASTNode node2 = getASTNode((CompilationUnit) result, 0, 2, 1);
 		assertTrue("IfStatement", node2 instanceof IfStatement); //$NON-NLS-1$
 		IfStatement statement = (IfStatement) node2;
@@ -4416,7 +4416,7 @@
 	public void test0191() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0191", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 1);
 		assertTrue("ExpressionStatement", node2 instanceof ExpressionStatement); //$NON-NLS-1$
 		ExpressionStatement expressionStatement = (ExpressionStatement) node2;
@@ -4440,7 +4440,7 @@
 	public void test0192() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0192", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertTrue("VariableDeclarationStatement", node2 instanceof VariableDeclarationStatement); //$NON-NLS-1$
 		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node2;
@@ -4461,7 +4461,7 @@
 	public void test0193() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0193", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		ASTNode node2 = getASTNode((CompilationUnit) result, 0, 1, 0);
 		assertTrue("VariableDeclarationStatement", node2 instanceof VariableDeclarationStatement); //$NON-NLS-1$
 		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node2;
@@ -4483,7 +4483,7 @@
 	public void test0194() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0194", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		ASTNode node2 = getASTNode((CompilationUnit) result, 0, 1, 0);
 		assertTrue("VariableDeclarationStatement", node2 instanceof VariableDeclarationStatement); //$NON-NLS-1$
 		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node2;
@@ -4506,7 +4506,7 @@
 	public void test0195() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0195", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		ASTNode node2 = getASTNode((CompilationUnit) result, 1, 0, 1);
 		assertTrue("ExpressionStatement", node2 instanceof ExpressionStatement); //$NON-NLS-1$
 		ExpressionStatement expressionStatement = (ExpressionStatement) node2;
@@ -4530,7 +4530,7 @@
 	public void test0196() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0196", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		ASTNode node2 = getASTNode((CompilationUnit) result, 0, 1, 2);
 		assertTrue("ExpressionStatement", node2 instanceof ExpressionStatement); //$NON-NLS-1$
 		ExpressionStatement expressionStatement = (ExpressionStatement) node2;
@@ -4551,7 +4551,7 @@
 	public void test0197() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0197", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType());
 		CompilationUnit unit = (CompilationUnit) result;
 		assertProblemsSize(unit, 0);
@@ -4577,7 +4577,7 @@
 	public void test0198() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0198", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertTrue("ReturnStatement", node2 instanceof ReturnStatement); //$NON-NLS-1$
 		ReturnStatement returnStatement = (ReturnStatement) node2;
@@ -4603,7 +4603,7 @@
 	public void test0199() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0199", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertTrue("VariableDeclarationStatement", node2 instanceof VariableDeclarationStatement); //$NON-NLS-1$
 		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node2;
@@ -4632,7 +4632,7 @@
 	public void test0200() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0200", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		ASTNode node2 = getASTNode((CompilationUnit) result, 1, 0, 0);
 		assertTrue("VariableDeclarationStatement", node2 instanceof VariableDeclarationStatement); //$NON-NLS-1$
 		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node2;
@@ -4662,7 +4662,7 @@
 	public void test0201() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0201", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 1);
 		assertTrue("ForStatement", node2 instanceof ForStatement); //$NON-NLS-1$
 		ForStatement forStatement = (ForStatement) node2;
@@ -4678,7 +4678,7 @@
 	public void test0202() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0202", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0);
 		assertTrue("FieldDeclaration", node2 instanceof FieldDeclaration); //$NON-NLS-1$
 		FieldDeclaration fieldDeclaration = (FieldDeclaration) node2;
@@ -4700,7 +4700,7 @@
 	public void test0203() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0203", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0);
 		assertTrue("FieldDeclaration", node2 instanceof FieldDeclaration); //$NON-NLS-1$
 		FieldDeclaration fieldDeclaration = (FieldDeclaration) node2;
@@ -4726,7 +4726,7 @@
 	public void test0204() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0204", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0);
 		assertTrue("FieldDeclaration", node2 instanceof FieldDeclaration); //$NON-NLS-1$
 		FieldDeclaration fieldDeclaration = (FieldDeclaration) node2;
@@ -4760,7 +4760,7 @@
 	public void test0205() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0205", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertTrue("TypeDeclarationStatement", node2 instanceof TypeDeclarationStatement); //$NON-NLS-1$
 		TypeDeclarationStatement typeDeclarationStatement = (TypeDeclarationStatement) node2;
@@ -4848,7 +4848,7 @@
 	public void test0207() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0207", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		assertTrue("The node is not a MethodDeclaration", node instanceof MethodDeclaration); //$NON-NLS-1$
@@ -4863,7 +4863,7 @@
 	public void test0208() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0208", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		assertTrue("The node is not a MethodDeclaration", node instanceof MethodDeclaration); //$NON-NLS-1$
@@ -4878,7 +4878,7 @@
 	public void test0209() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0209", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		assertTrue("The node is not a MethodDeclaration", node instanceof MethodDeclaration); //$NON-NLS-1$
@@ -4894,7 +4894,7 @@
 	public void test0210() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0210", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		assertTrue("The node is not a FieldDeclaration", node instanceof FieldDeclaration); //$NON-NLS-1$
@@ -4908,7 +4908,7 @@
 	public void test0211() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0211", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		assertTrue("The node is not a FieldDeclaration", node instanceof FieldDeclaration); //$NON-NLS-1$
@@ -4923,7 +4923,7 @@
 	public void test0212() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0212", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		assertTrue("The node is not a FieldDeclaration", node instanceof FieldDeclaration); //$NON-NLS-1$
@@ -4938,7 +4938,7 @@
 	public void test0213() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0213", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		assertTrue("The node is not a TypeDeclaration", node instanceof TypeDeclaration); //$NON-NLS-1$
@@ -4956,7 +4956,7 @@
 	public void test0214() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0214", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		assertTrue("The node is not a TypeDeclaration", node instanceof TypeDeclaration); //$NON-NLS-1$
@@ -4975,7 +4975,7 @@
 	public void test0215() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0215", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		assertTrue("The node is not a TypeDeclaration", node instanceof TypeDeclaration); //$NON-NLS-1$
@@ -4996,7 +4996,7 @@
 	public void test0216() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0216", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		assertTrue("The node is not a TypeDeclaration", node instanceof TypeDeclaration); //$NON-NLS-1$
@@ -5014,7 +5014,7 @@
 	public void test0217() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0217", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		assertTrue("The node is not a TypeDeclaration", node instanceof TypeDeclaration); //$NON-NLS-1$
@@ -5029,7 +5029,7 @@
 	public void test0218() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0218", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		assertTrue("The node is not a TypeDeclaration", node instanceof TypeDeclaration); //$NON-NLS-1$
@@ -5044,7 +5044,7 @@
 	public void test0219() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0219", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		assertTrue("The node is not a TypeDeclaration", node instanceof TypeDeclaration); //$NON-NLS-1$
@@ -5059,7 +5059,7 @@
 	public void test0220() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0220", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		checkSourceRange(node, "{}", source); //$NON-NLS-1$
@@ -5071,7 +5071,7 @@
 	public void test0221() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0221", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		checkSourceRange(node, "static {}", source); //$NON-NLS-1$
@@ -5084,7 +5084,7 @@
 	public void test0222() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0222", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		Javadoc actualJavadoc = ((Initializer) node).getJavadoc();
@@ -5104,7 +5104,7 @@
 	public void test0223() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0223", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		Javadoc actualJavadoc = ((Initializer) node).getJavadoc();
@@ -5123,7 +5123,7 @@
 	public void test0224() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0224", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		Javadoc actualJavadoc = ((Initializer) node).getJavadoc();
@@ -5137,7 +5137,7 @@
 	public void test0225() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0225", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		LabeledStatement labeledStatement = (LabeledStatement) getASTNode((CompilationUnit) result, 0, 0, 0);
 		checkSourceRange(labeledStatement.getLabel(), "label", source); //$NON-NLS-1$
 		ForStatement forStatement = (ForStatement) labeledStatement.getBody();
@@ -5156,7 +5156,7 @@
 	public void test0226() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0226", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		LabeledStatement labeledStatement = (LabeledStatement) getASTNode((CompilationUnit) result, 0, 0, 0);
 		checkSourceRange(labeledStatement.getLabel(), "label", source); //$NON-NLS-1$
 		ForStatement forStatement = (ForStatement) labeledStatement.getBody();
@@ -5175,7 +5175,7 @@
 	public void test0227() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0227", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		ASTNode node2 = getASTNode((CompilationUnit) result, 3, 2, 0);
 		assertTrue("ReturnStatement", node2 instanceof ReturnStatement); //$NON-NLS-1$
 		ReturnStatement returnStatement = (ReturnStatement) node2;
@@ -5262,7 +5262,7 @@
 	public void test0228() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0228", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		ASTNode node2 = getASTNode((CompilationUnit) result, 0, 1, 0);
 		assertTrue("ReturnStatement", node2 instanceof ReturnStatement); //$NON-NLS-1$
 		ReturnStatement returnStatement = (ReturnStatement) node2;
@@ -5290,7 +5290,7 @@
 	public void test0229() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0229", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertTrue("ExpressionStatement", node2 instanceof ExpressionStatement); //$NON-NLS-1$
 		ExpressionStatement expressionStatement = (ExpressionStatement) node2;
@@ -5320,7 +5320,7 @@
 	public void test0230() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0230", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		ASTNode node2 = getASTNode((CompilationUnit) result, 0, 1, 0);
 		assertTrue("ExpressionStatement", node2 instanceof ExpressionStatement); //$NON-NLS-1$
 		ExpressionStatement expressionStatement = (ExpressionStatement) node2;
@@ -5345,7 +5345,7 @@
 	public void test0231() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0231", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertTrue("ExpressionStatement", node2 instanceof ExpressionStatement); //$NON-NLS-1$
 		ExpressionStatement expressionStatement = (ExpressionStatement) node2;
@@ -5380,7 +5380,7 @@
 	 */
 	public void test0232() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0232", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertTrue("VariableDeclarationStatement", node2 instanceof VariableDeclarationStatement); //$NON-NLS-1$
 		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node2;
@@ -5411,7 +5411,7 @@
 	 */
 	public void test0233() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0233", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("Expression should not be null", result); //$NON-NLS-1$
 		assertTrue("The compilation unit is malformed", !isMalformed(result)); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -5427,7 +5427,7 @@
 	 */
 	public void test0234() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0234", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true, true, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true, true, true);
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
 		assertTrue("The fiels is not malformed", !isMalformed(node)); //$NON-NLS-1$
@@ -5449,7 +5449,7 @@
 	 */
 	public void test0234_2() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0234", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true, true, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true, true, false);
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
 		assertTrue("The fiels is not malformed", !isMalformed(node)); //$NON-NLS-1$
@@ -5470,7 +5470,7 @@
 	 */
 	public void test0235() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0235", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
 		assertTrue("The fiels is not malformed", !isMalformed(node)); //$NON-NLS-1$
@@ -5491,7 +5491,7 @@
 	 */
 	public void test0237() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "junit.framework", "TestCase.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 	}
@@ -5501,7 +5501,7 @@
 	 */
 	public void test0238() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0238", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		char[] source = sourceUnit.getSource().toCharArray();
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -5536,7 +5536,7 @@
 	 */
 	public void test0239() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0239", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		ASTNode node = getASTNode((CompilationUnit) result, 1, 0, 0);
@@ -5574,7 +5574,7 @@
 	 */
 	public void test0240() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0240", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -5615,7 +5615,7 @@
 	 */
 	public void test0241() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0241", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		ASTNode node = getASTNode((CompilationUnit) result, 0);
@@ -5651,7 +5651,7 @@
 	 */
 	public void test0242() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0242", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		ASTNode node = getASTNode((CompilationUnit) result, 1, 0, 0);
@@ -5694,7 +5694,7 @@
 	public void test0243() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0243", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -5713,7 +5713,7 @@
 	public void test0244() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0244", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -5732,7 +5732,7 @@
 	 */
 	public void test0245() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0245", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
@@ -5758,7 +5758,7 @@
 	public void test0246() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0246", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
@@ -5786,7 +5786,7 @@
 	public void test0247() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0247", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
@@ -5803,7 +5803,7 @@
 	 */
 	public void test0248() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0248", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -5826,7 +5826,7 @@
 	 */
 	public void test0249() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0249", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 2, 1);
@@ -5854,7 +5854,7 @@
 	 */
 	public void test0250() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0250", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -5878,7 +5878,7 @@
 	public void test0251() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0251", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -5908,7 +5908,7 @@
 	 */
 	public void test0252() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0252", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
@@ -5930,7 +5930,7 @@
 	 */
 	public void test0253() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0253", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -5951,7 +5951,7 @@
 	 */
 	public void test0254() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0254", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 1, 0);
@@ -5971,7 +5971,7 @@
 	 */
 	public void test0255() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0255", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -5996,7 +5996,7 @@
 	 */
 	public void test0256() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0256", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -6027,7 +6027,7 @@
 	 */
 	public void test0257() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0257", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -6052,7 +6052,7 @@
 	 */
 	public void test0258() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0258", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -6083,7 +6083,7 @@
 	 */
 	public void test0259() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0259", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 	}
@@ -6093,7 +6093,7 @@
 	 */
 	public void test0260() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0260", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -6122,7 +6122,7 @@
 	 */
 	public void test0261() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0261", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -6141,7 +6141,7 @@
 	 */
 	public void test0262() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0262", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -6171,7 +6171,7 @@
 	 */
 	public void test0263() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0263", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -6196,7 +6196,7 @@
 	public void test0264() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0264", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -6231,7 +6231,7 @@
 	 */
 	public void test0265() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0265", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 	}
@@ -6242,7 +6242,7 @@
 	public void test0266() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0266", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -6269,7 +6269,7 @@
 	public void test0267() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0267", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -6296,7 +6296,7 @@
 	public void test0268() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0268", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -6322,7 +6322,7 @@
 	public void test0269() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0269", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -6348,7 +6348,7 @@
 	public void test0270() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0270", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -6370,7 +6370,7 @@
 	public void test0271() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0271", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -6396,7 +6396,7 @@
 	public void test0272() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0272", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -6414,7 +6414,7 @@
 	public void test0273() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0273", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -6438,7 +6438,7 @@
 	public void test0274() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0274", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -6462,7 +6462,7 @@
 	public void test0275() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0275", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -6480,7 +6480,7 @@
 	public void test0276() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0276", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -6505,7 +6505,7 @@
 	public void test0277() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0277", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -6528,7 +6528,7 @@
 	public void test0278() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0278", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -6552,7 +6552,7 @@
 	public void test0279() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0279", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -6576,7 +6576,7 @@
 	 */
 	public void test0280() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0280", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		AST newAst = result.getAST();
@@ -6663,7 +6663,7 @@
 	public void test0281() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0281", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -6684,7 +6684,7 @@
 	public void test0282() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0282", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -6705,7 +6705,7 @@
 	public void test0283() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0283", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -6726,7 +6726,7 @@
 	public void test0284() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0284", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -6747,7 +6747,7 @@
 	public void test0285() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0285", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -6768,7 +6768,7 @@
 	public void test0286() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0286", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -6789,7 +6789,7 @@
 	public void test0287() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0287", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -6810,7 +6810,7 @@
 	public void test0288() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0288", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -6831,7 +6831,7 @@
 	public void test0289() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0289", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -6852,7 +6852,7 @@
 	public void test0290() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0290", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -6872,7 +6872,7 @@
 	 */
 	public void test0291() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0291", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
@@ -6885,7 +6885,7 @@
 	 */
 	public void test0292() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0292", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -6917,7 +6917,7 @@
 	public void test0293() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0293", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -6953,7 +6953,7 @@
 	public void test0294() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0294", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -6984,7 +6984,7 @@
 	 */
 	public void test0295() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0295", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true, false, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true, false, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7009,7 +7009,7 @@
 	public void test0296() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0296", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7040,7 +7040,7 @@
 	 */
 	public void test0297() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0297", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		runConversion(AST.JLS8, sourceUnit, false);
+		runConversion(getJLS8(), sourceUnit, false);
 	}
 
 	/**
@@ -7049,7 +7049,7 @@
 	public void test0298() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0298", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7067,7 +7067,7 @@
 	public void test0299() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0299", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7092,7 +7092,7 @@
 	public void test0300() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0300", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7114,7 +7114,7 @@
 	public void test0301() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0301", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7135,7 +7135,7 @@
 	public void test0302() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0302", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7154,7 +7154,7 @@
 	 */
 	public void test0303() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0303", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7182,7 +7182,7 @@
 	public void test0304() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0304", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7205,7 +7205,7 @@
 				"	public void foo(int arg) {}\n" +  //$NON-NLS-1$
 				"}").toCharArray(); //$NON-NLS-1$
 		IJavaProject project = getJavaProject("Converter"); //$NON-NLS-1$
-		ASTNode result = runConversion(AST.JLS8, source, "Test.java", project, true); //$NON-NLS-1$
+		ASTNode result = runConversion(getJLS8(), source, "Test.java", project, true); //$NON-NLS-1$
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7230,7 +7230,7 @@
 				"	public void foo(int arg) {}\n" +  //$NON-NLS-1$
 				"}").toCharArray(); //$NON-NLS-1$
 		IJavaProject project = getJavaProject("Converter"); //$NON-NLS-1$
-		ASTNode result = runConversion(AST.JLS8, source, "Object.java", project, true); //$NON-NLS-1$
+		ASTNode result = runConversion(getJLS8(), source, "Object.java", project, true); //$NON-NLS-1$
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7251,7 +7251,7 @@
 	public void test0307() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0307", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7272,7 +7272,7 @@
 	 */
 	public void test0308() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0308", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7297,7 +7297,7 @@
 	 */
 	public void test0309() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0309", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7320,7 +7320,7 @@
 	 */
 	public void test0310() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0310", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7345,7 +7345,7 @@
 	public void test0311() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0311", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7394,7 +7394,7 @@
 	public void test0312() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0312", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7439,7 +7439,7 @@
 	public void test0313() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0313", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7470,7 +7470,7 @@
 	public void test0314() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0314", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		assertNotNull("No result", result); //$NON-NLS-1$
 		assertTrue("Not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7487,7 +7487,7 @@
 	public void test0315() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0315", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7523,7 +7523,7 @@
 	 */
 	public void test0316() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "", "Hello.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No result", result); //$NON-NLS-1$
 		assertTrue("Not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7536,7 +7536,7 @@
 	 */
 	public void test0317() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0317", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7574,7 +7574,7 @@
 	 */
 	public void test0318() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0318", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
@@ -7587,7 +7587,7 @@
 	 */
 	public void test0319() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0319", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7621,7 +7621,7 @@
 	public void test0320() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0320", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7646,7 +7646,7 @@
 	public void test0321() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0321", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7672,7 +7672,7 @@
 	 */
 	public void test0322() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0322", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7696,7 +7696,7 @@
 	 */
 	public void test0323() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0323", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7723,7 +7723,7 @@
 	 */
 	public void test0324() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0324", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7750,7 +7750,7 @@
 	 */
 	public void test0325() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0325", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7777,7 +7777,7 @@
 	 */
 	public void test0326() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0326", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		char[] source = sourceUnit.getSource().toCharArray();
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -7794,7 +7794,7 @@
 	 */
 	public void test0327() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0327", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7823,7 +7823,7 @@
 	public void test0328() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0328", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7864,7 +7864,7 @@
 	public void test0329() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0329", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7904,7 +7904,7 @@
 	 */
 	public void test0330() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0330", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7937,7 +7937,7 @@
 	 */
 	public void test0331() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0331", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7964,7 +7964,7 @@
 	 */
 	public void test0332() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0332", "LocalSelectionTransfer.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 	}
@@ -7974,7 +7974,7 @@
 	 */
 	public void test0333() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0333", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -8012,7 +8012,7 @@
 	public void test0334() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0334", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -8052,7 +8052,7 @@
 	 */
 	public void test0335() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0335", "ExceptionTestCaseTest.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -8086,7 +8086,7 @@
 	 */
 	public void test0336() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0336", "SorterTest.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -8119,7 +8119,7 @@
 	public void test0337() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0337", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -8140,7 +8140,7 @@
 	 */
 	public void test0338() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0338", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -8150,7 +8150,7 @@
 		assertTrue("not a MethodDeclaration", node instanceof MethodDeclaration); //$NON-NLS-1$
 		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
 		IBinding binding;
-		if (node.getAST().apiLevel() < AST.JLS8) {
+		if (node.getAST().apiLevel() < getJLS8()) {
 			List thrownExceptions = internalThrownExceptions(methodDeclaration);
 			assertEquals("Wrong size", 1, thrownExceptions.size()); //$NON-NLS-1$
 			Name name = (Name) thrownExceptions.get(0);
@@ -8171,7 +8171,7 @@
 	public void test0339() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0339", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -8207,7 +8207,7 @@
 	 */
 	public void test0340() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "p3", "B.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -8262,7 +8262,7 @@
 	public void test0341() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0341", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -8380,7 +8380,7 @@
 	public void test0343() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0343", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -8411,7 +8411,7 @@
 			project.setOption(JavaCore.COMPILER_PB_ASSERT_IDENTIFIER, JavaCore.ERROR);
 			project.setOption(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_4);
 			project.setOption(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_1_4);
-			ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+			ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 			assertNotNull("No compilation unit", result); //$NON-NLS-1$
 			assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 			CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -8430,7 +8430,7 @@
 	 */
 	public void test0345() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0345", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -8484,7 +8484,7 @@
 	public void test0346() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0346", "Test2.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -8520,7 +8520,7 @@
 	public void test0347() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0347", "Test2.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -8546,7 +8546,7 @@
 	public void test0348() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0348", "Test2.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -8572,7 +8572,7 @@
 	public void test0349() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0349", "Test2.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -8598,7 +8598,7 @@
 	public void test0350() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0350", "Test2.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -8624,7 +8624,7 @@
 	public void test0351() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0351", "Test2.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -8657,7 +8657,7 @@
 	public void test0352() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0352", "Test2.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -8690,7 +8690,7 @@
 	public void test0353() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0353", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -8724,7 +8724,7 @@
 	 */
 	public void test0354() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0354", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -8736,7 +8736,7 @@
 	 */
 	public void test0355() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0355", "Foo.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -8760,7 +8760,7 @@
 	 */
 	public void test0356() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0356", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -8793,7 +8793,7 @@
 	public void test0357() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0357", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -8812,7 +8812,7 @@
 	public void test0358() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0358", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -8831,7 +8831,7 @@
 	public void test0359() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0359", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -8849,7 +8849,7 @@
 	 */
 	public void test0360() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0360", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -8867,7 +8867,7 @@
 	 */
 	public void test0361() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0361", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -8885,7 +8885,7 @@
 	public void test0362() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0362", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		ForStatement forStatement = this.ast.newForStatement();
@@ -8939,7 +8939,7 @@
 	public void test0363() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0363", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -8963,7 +8963,7 @@
 	public void test0364() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0364", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -8986,7 +8986,7 @@
 	 */
 	public void test0365() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0365", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -9012,7 +9012,7 @@
 	public void test0366() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0366", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -9033,7 +9033,7 @@
 	public void test0367() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0367", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -9054,7 +9054,7 @@
 	public void test0368() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0368", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -9075,7 +9075,7 @@
 	public void test0369() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0369", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -9096,7 +9096,7 @@
 	public void test0370() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0370", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		DoStatement doStatement = this.ast.newDoStatement();
@@ -9117,7 +9117,7 @@
 	public void test0371() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0371", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -9138,7 +9138,7 @@
 	public void test0372() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0372", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -9159,7 +9159,7 @@
 	public void test0373() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0373", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -9185,7 +9185,7 @@
 	public void test0374() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0374", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -9210,7 +9210,7 @@
 	 */
 	public void test0375() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0375", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -9229,7 +9229,7 @@
 	public void test0376() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0376", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -9252,7 +9252,7 @@
 	 */
 	public void test0377() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0377", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -9275,7 +9275,7 @@
 	public void test0378() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0378", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -9294,7 +9294,7 @@
 	public void test0379() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0379", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
 		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
 		assertTrue("Not a class instance creation", expression.getNodeType() == ASTNode.CLASS_INSTANCE_CREATION);		//$NON-NLS-1$
@@ -9308,7 +9308,7 @@
 	 */
 	public void test0380() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0380", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -9336,7 +9336,7 @@
 	 */
 	public void test0381() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0381", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -9354,7 +9354,7 @@
 	 */
 	public void test0382() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0382", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -9372,7 +9372,7 @@
 	 */
 	public void test0383() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0383", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -9390,7 +9390,7 @@
 	 */
 	public void test0384() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0384", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -9408,7 +9408,7 @@
 	 */
 	public void test0385() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0385", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -9421,7 +9421,7 @@
 	public void test0386() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0386", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -9446,7 +9446,7 @@
 	public void test0387() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0387", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -9469,7 +9469,7 @@
 	 */
 	public void test0388() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0388", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -9488,7 +9488,7 @@
 	 */
 	public void test0389() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0389", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -9507,7 +9507,7 @@
 	 */
 	public void test0390() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0390", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -9527,7 +9527,7 @@
 	 */
 	public void test0391() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0391", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -9547,7 +9547,7 @@
 	 */
 	public void test0392() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0392", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -9568,7 +9568,7 @@
 	public void test0393() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0393", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -9600,7 +9600,7 @@
 	public void test0394() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0394", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -9624,7 +9624,7 @@
 	public void test0395() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0395", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -9654,7 +9654,7 @@
 	public void test0396() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0396", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
 		assertNotNull(node);
 		assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
@@ -9688,7 +9688,7 @@
 	public void test0397() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0397", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
 		assertNotNull(node);
 		assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
@@ -9720,7 +9720,7 @@
 	public void test0398() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0398", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertNotNull(node);
 		assertTrue("Not a variable declaration statement", node.getNodeType() == ASTNode.VARIABLE_DECLARATION_STATEMENT); //$NON-NLS-1$
@@ -9745,7 +9745,7 @@
 	 */
 	public void test0399() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0399", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
 		assertNotNull(node);
 		assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
@@ -9762,7 +9762,7 @@
 	public void test0400() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0400", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
 		assertNotNull(node);
 		assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
@@ -9778,7 +9778,7 @@
 	
 	public void test0401() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter18" , "src", "testBug496596", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		ASTNode node = getASTNode((CompilationUnit) result, 2, 0);
 		assertNotNull(node);
 		assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterBindingsTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterBindingsTest.java
index 6b8f9e1..8a4ded5 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterBindingsTest.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterBindingsTest.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 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
@@ -43,6 +43,7 @@
 import org.eclipse.jdt.core.dom.FieldAccess;
 import org.eclipse.jdt.core.dom.IBinding;
 import org.eclipse.jdt.core.dom.IMethodBinding;
+import org.eclipse.jdt.core.dom.IModuleBinding;
 import org.eclipse.jdt.core.dom.IPackageBinding;
 import org.eclipse.jdt.core.dom.ITypeBinding;
 import org.eclipse.jdt.core.dom.IVariableBinding;
@@ -53,6 +54,7 @@
 import org.eclipse.jdt.core.dom.MethodDeclaration;
 import org.eclipse.jdt.core.dom.MethodInvocation;
 import org.eclipse.jdt.core.dom.MethodRef;
+import org.eclipse.jdt.core.dom.ModuleDeclaration;
 import org.eclipse.jdt.core.dom.NullLiteral;
 import org.eclipse.jdt.core.dom.NumberLiteral;
 import org.eclipse.jdt.core.dom.PackageDeclaration;
@@ -280,6 +282,14 @@
 		}
 
 		/**
+		 * @see org.eclipse.jdt.core.dom.ASTVisitor#endVisit(ModuleDeclaration)
+		 */
+		public void endVisit(ModuleDeclaration node) {
+			IModuleBinding moduleBinding = node.resolveBinding();
+			collectBindings(node, moduleBinding);
+		}
+
+		/**
 		 * @see org.eclipse.jdt.core.dom.ASTVisitor#endVisit(MethodInvocation)
 		 */
 		public void endVisit(MethodInvocation node) {
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterBugsTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterBugsTest.java
index 9cf6c08..4d651cc 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterBugsTest.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterBugsTest.java
@@ -1298,6 +1298,7 @@
 }
 
 // Verify that the binding for a constructor is a method binding
+@SuppressWarnings("deprecation")
 public void testBug381503() throws CoreException, IOException {
 	try {
 		IJavaProject javaProject = createJavaProject("P", new String[] { "src" }, new String[] { "CONVERTER_JCL_LIB" }, "bin");
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterBugsTestJLS8.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterBugsTestJLS8.java
index 1218989..0cc8fc5 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterBugsTestJLS8.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterBugsTestJLS8.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2011, 2015 IBM Corporation and others.
+ * Copyright (c) 2011, 2016 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
@@ -29,6 +29,9 @@
 @SuppressWarnings("rawtypes")
 public class ASTConverterBugsTestJLS8 extends ASTConverterBugsTest {
 
+/**
+ * @deprecated
+ */
 public ASTConverterBugsTestJLS8(String name) {
     super(name);
     this.testLevel = AST.JLS8;
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterJavadocFlattener.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterJavadocFlattener.java
index eda547b..e7f0437 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterJavadocFlattener.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterJavadocFlattener.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2016 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
@@ -57,8 +57,9 @@
 	this.buffer.setLength(0);
 }
 
-/*
+/**
  * @see ASTVisitor#visit(ArrayType)
+ * @deprecated
  */
 public boolean visit(ArrayType node) {
 	if (node.getAST().apiLevel() < AST.JLS8) {
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterTest.java
index 51ac7c1..b939c9a 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterTest.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterTest.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2016 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
@@ -8330,7 +8330,7 @@
 		assertTrue("not a MethodDeclaration", node instanceof MethodDeclaration); //$NON-NLS-1$
 		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
 		IBinding binding;
-		if (node.getAST().apiLevel() < AST.JLS8) {
+		if (node.getAST().apiLevel() < getJLS8()) {
 			List thrownExceptions = internalThrownExceptions(methodDeclaration);
 			assertEquals("Wrong size", 1, thrownExceptions.size()); //$NON-NLS-1$
 			Name name = (Name) thrownExceptions.get(0);
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterTest2.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterTest2.java
index d2ad55d..308785c 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterTest2.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterTest2.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2016 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 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
@@ -3563,7 +3563,7 @@
 	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=48292
 	 */
 	public void test0522() throws JavaModelException {
-		IClassFile classFile = getClassFile("Converter" , "bins", "test0522", "Test.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		IOrdinaryClassFile classFile = getClassFile("Converter" , "bins", "test0522", "Test.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		assertNotNull("No bytes", classFile.getBytes());
 		assertNotNull(classFile);
 		assertNotNull(classFile.getSource());
@@ -3613,7 +3613,7 @@
 	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=48292
 	 */
 	public void test0523() throws JavaModelException {
-		IClassFile classFile = getClassFile("Converter" , "bins", "test0523", "Test.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		IOrdinaryClassFile classFile = getClassFile("Converter" , "bins", "test0523", "Test.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		assertNotNull(classFile);
 		assertNotNull(classFile.getSource());
 		IType type = classFile.getType();
@@ -3652,7 +3652,7 @@
 	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=48292
 	 */
 	public void test0524() throws JavaModelException {
-		IClassFile classFile = getClassFile("Converter" , "bins", "test0524", "A.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		IOrdinaryClassFile classFile = getClassFile("Converter" , "bins", "test0524", "A.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		assertNotNull(classFile);
 		assertNotNull(classFile.getSource());
 		IType type = classFile.getType();
@@ -3680,7 +3680,7 @@
 	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=48292
 	 */
 	public void test0525() throws JavaModelException {
-		IClassFile classFile = getClassFile("Converter" , "bins", "test0525", "A.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		IOrdinaryClassFile classFile = getClassFile("Converter" , "bins", "test0525", "A.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		assertNotNull(classFile);
 		assertNotNull(classFile.getSource());
 		IType type = classFile.getType();
@@ -3716,7 +3716,7 @@
 	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=48292
 	 */
 	public void test0526() throws JavaModelException {
-		IClassFile classFile = getClassFile("Converter" , "bins", "test0526", "A.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		IOrdinaryClassFile classFile = getClassFile("Converter" , "bins", "test0526", "A.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		assertNotNull(classFile);
 		assertNotNull(classFile.getSource());
 		IType type = classFile.getType();
@@ -3758,7 +3758,7 @@
 	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=48292
 	 */
 	public void test0527() throws JavaModelException {
-		IClassFile classFile = getClassFile("Converter" , "bins", "test0527", "A.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		IOrdinaryClassFile classFile = getClassFile("Converter" , "bins", "test0527", "A.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		assertNotNull(classFile);
 		assertNotNull(classFile.getSource());
 		IType type = classFile.getType();
@@ -3799,7 +3799,7 @@
 	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=48292
 	 */
 	public void test0528() throws JavaModelException {
-		IClassFile classFile = getClassFile("Converter" , "bins", "test0528", "A.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		IOrdinaryClassFile classFile = getClassFile("Converter" , "bins", "test0528", "A.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		assertNotNull(classFile);
 		assertNotNull(classFile.getSource());
 		IType type = classFile.getType();
@@ -3828,7 +3828,7 @@
 	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=48292
 	 */
 	public void test0529() throws JavaModelException {
-		IClassFile classFile = getClassFile("Converter" , "bins", "test0529", "A.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		IOrdinaryClassFile classFile = getClassFile("Converter" , "bins", "test0529", "A.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		assertNotNull(classFile);
 		assertNotNull(classFile.getSource());
 		IType type = classFile.getType();
@@ -3858,7 +3858,7 @@
 	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=48292
 	 */
 	public void test0530() throws JavaModelException {
-		IClassFile classFile = getClassFile("Converter" , "bins", "test0530", "A.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		IOrdinaryClassFile classFile = getClassFile("Converter" , "bins", "test0530", "A.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		assertNotNull(classFile);
 		assertNotNull(classFile.getSource());
 		IType type = classFile.getType();
@@ -3887,7 +3887,7 @@
 	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=48292
 	 */
 	public void test0531() throws JavaModelException {
-		IClassFile classFile = getClassFile("Converter" , "bins", "test0531", "A.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		IOrdinaryClassFile classFile = getClassFile("Converter" , "bins", "test0531", "A.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		assertNotNull(classFile);
 		assertNotNull(classFile.getSource());
 		IType type = classFile.getType();
@@ -3970,7 +3970,7 @@
 		ISourceRange sourceRange = init.getSourceRange();
 		int position = sourceRange.getOffset() + sourceRange.getLength() / 2;
 
-		IClassFile classFile = getClassFile("Converter" , "bins", "test0532", "A.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		IOrdinaryClassFile classFile = getClassFile("Converter" , "bins", "test0532", "A.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		assertNotNull(classFile);
 		assertNotNull(classFile.getSource());
 		type = classFile.getType();
@@ -5254,7 +5254,7 @@
 				"  }\n" +
 				"}";
 			addLibrary(p, "test0571.jar", "test0571.zip", new String[] {"X.java", source	}, "1.4");
-			IClassFile classFile = getClassFile("P", "/P/test0571.jar", "", "X$Y.class");
+			IOrdinaryClassFile classFile = getClassFile("P", "/P/test0571.jar", "", "X$Y.class");
 			CompilationUnit unit = (CompilationUnit) runConversion(getJLS3(), classFile, 0, true);
 			IProblem[] problems = unit.getProblems();
 			StringBuffer buffer = new StringBuffer();
@@ -5367,7 +5367,7 @@
 				"  }/*end*/\n" +
 				"}",
 			}, "1.5");
-			IClassFile classFile = getClassFile("P1", "/P1/lib.jar", "p", "X$Member.class");
+			IOrdinaryClassFile classFile = getClassFile("P1", "/P1/lib.jar", "p", "X$Member.class");
 			ASTNode node = buildAST(classFile);
 			ITypeBinding binding = ((TypeDeclaration) node).resolveBinding();
 			assertBindingKeyEquals("Lp/X<TT;>.Member;", binding.getKey());
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterTestAST3_2.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterTestAST3_2.java
index ac7d557..1d9b3ae 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterTestAST3_2.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterTestAST3_2.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2016 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 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
@@ -22,7 +22,6 @@
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.OperationCanceledException;
 import org.eclipse.jdt.core.Flags;
-import org.eclipse.jdt.core.IClassFile;
 import org.eclipse.jdt.core.IClasspathEntry;
 import org.eclipse.jdt.core.ICompilationUnit;
 import org.eclipse.jdt.core.IField;
@@ -30,6 +29,7 @@
 import org.eclipse.jdt.core.IJavaElement;
 import org.eclipse.jdt.core.IJavaProject;
 import org.eclipse.jdt.core.IMethod;
+import org.eclipse.jdt.core.IOrdinaryClassFile;
 import org.eclipse.jdt.core.ISourceRange;
 import org.eclipse.jdt.core.IType;
 import org.eclipse.jdt.core.JavaCore;
@@ -3641,7 +3641,7 @@
 	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=48292
 	 */
 	public void test0522() throws JavaModelException {
-		IClassFile classFile = getClassFile("Converter" , "bins", "test0522", "Test.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		IOrdinaryClassFile classFile = getClassFile("Converter" , "bins", "test0522", "Test.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		assertNotNull(classFile);
 		assertNotNull(classFile.getSource());
 		IType type = classFile.getType();
@@ -3690,7 +3690,7 @@
 	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=48292
 	 */
 	public void test0523() throws JavaModelException {
-		IClassFile classFile = getClassFile("Converter" , "bins", "test0523", "Test.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		IOrdinaryClassFile classFile = getClassFile("Converter" , "bins", "test0523", "Test.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		assertNotNull(classFile);
 		assertNotNull(classFile.getSource());
 		IType type = classFile.getType();
@@ -3729,7 +3729,7 @@
 	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=48292
 	 */
 	public void test0524() throws JavaModelException {
-		IClassFile classFile = getClassFile("Converter" , "bins", "test0524", "A.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		IOrdinaryClassFile classFile = getClassFile("Converter" , "bins", "test0524", "A.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		assertNotNull(classFile);
 		assertNotNull(classFile.getSource());
 		IType type = classFile.getType();
@@ -3757,7 +3757,7 @@
 	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=48292
 	 */
 	public void test0525() throws JavaModelException {
-		IClassFile classFile = getClassFile("Converter" , "bins", "test0525", "A.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		IOrdinaryClassFile classFile = getClassFile("Converter" , "bins", "test0525", "A.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		assertNotNull(classFile);
 		assertNotNull(classFile.getSource());
 		IType type = classFile.getType();
@@ -3793,7 +3793,7 @@
 	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=48292
 	 */
 	public void test0526() throws JavaModelException {
-		IClassFile classFile = getClassFile("Converter" , "bins", "test0526", "A.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		IOrdinaryClassFile classFile = getClassFile("Converter" , "bins", "test0526", "A.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		assertNotNull(classFile);
 		assertNotNull(classFile.getSource());
 		IType type = classFile.getType();
@@ -3835,7 +3835,7 @@
 	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=48292
 	 */
 	public void test0527() throws JavaModelException {
-		IClassFile classFile = getClassFile("Converter" , "bins", "test0527", "A.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		IOrdinaryClassFile classFile = getClassFile("Converter" , "bins", "test0527", "A.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		assertNotNull(classFile);
 		assertNotNull(classFile.getSource());
 		IType type = classFile.getType();
@@ -3876,7 +3876,7 @@
 	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=48292
 	 */
 	public void test0528() throws JavaModelException {
-		IClassFile classFile = getClassFile("Converter" , "bins", "test0528", "A.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		IOrdinaryClassFile classFile = getClassFile("Converter" , "bins", "test0528", "A.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		assertNotNull(classFile);
 		assertNotNull(classFile.getSource());
 		IType type = classFile.getType();
@@ -3905,7 +3905,7 @@
 	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=48292
 	 */
 	public void test0529() throws JavaModelException {
-		IClassFile classFile = getClassFile("Converter" , "bins", "test0529", "A.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		IOrdinaryClassFile classFile = getClassFile("Converter" , "bins", "test0529", "A.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		assertNotNull(classFile);
 		assertNotNull(classFile.getSource());
 		IType type = classFile.getType();
@@ -3935,7 +3935,7 @@
 	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=48292
 	 */
 	public void test0530() throws JavaModelException {
-		IClassFile classFile = getClassFile("Converter" , "bins", "test0530", "A.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		IOrdinaryClassFile classFile = getClassFile("Converter" , "bins", "test0530", "A.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		assertNotNull(classFile);
 		assertNotNull(classFile.getSource());
 		IType type = classFile.getType();
@@ -3964,7 +3964,7 @@
 	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=48292
 	 */
 	public void test0531() throws JavaModelException {
-		IClassFile classFile = getClassFile("Converter" , "bins", "test0531", "A.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		IOrdinaryClassFile classFile = getClassFile("Converter" , "bins", "test0531", "A.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		assertNotNull(classFile);
 		assertNotNull(classFile.getSource());
 		IType type = classFile.getType();
@@ -4047,7 +4047,7 @@
 		ISourceRange sourceRange = init.getSourceRange();
 		int position = sourceRange.getOffset() + sourceRange.getLength() / 2;
 
-		IClassFile classFile = getClassFile("Converter" , "bins", "test0532", "A.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		IOrdinaryClassFile classFile = getClassFile("Converter" , "bins", "test0532", "A.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		assertNotNull(classFile);
 		assertNotNull(classFile.getSource());
 		type = classFile.getType();
@@ -7549,11 +7549,11 @@
 	}
 	/*
 	 * Ensures that 2 type bindings (one from .class file, the other from attache source) are "isEqualTo(...)".
-	 * (regression test for bug 130317 ASTParser with IClassFile as source creates type bindings that are not isEqualTo(..) binary bindings)
+	 * (regression test for bug 130317 ASTParser with IOrdinaryClassFile as source creates type bindings that are not isEqualTo(..) binary bindings)
 	 */
 	public void test0641() throws JavaModelException {
 		// Integer from attached source
-		IClassFile classFile = getClassFile("Converter", getConverterJCLPath().toOSString(), "java.lang", "Integer.class");
+		IOrdinaryClassFile classFile = getClassFile("Converter", getConverterJCLPath().toOSString(), "java.lang", "Integer.class");
 		String source = classFile.getSource();
 		MarkerInfo markerInfo = new MarkerInfo(source);
 		markerInfo.astStarts = new int[] {source.indexOf("public")};
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterTestAST4_2.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterTestAST4_2.java
index 514f6f0..8fc2a6c 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterTestAST4_2.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterTestAST4_2.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2011, 2016 IBM Corporation and others.
+ * Copyright (c) 2011, 2017 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
@@ -23,7 +23,6 @@
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.OperationCanceledException;
 import org.eclipse.jdt.core.Flags;
-import org.eclipse.jdt.core.IClassFile;
 import org.eclipse.jdt.core.IClasspathEntry;
 import org.eclipse.jdt.core.ICompilationUnit;
 import org.eclipse.jdt.core.IField;
@@ -31,6 +30,7 @@
 import org.eclipse.jdt.core.IJavaElement;
 import org.eclipse.jdt.core.IJavaProject;
 import org.eclipse.jdt.core.IMethod;
+import org.eclipse.jdt.core.IOrdinaryClassFile;
 import org.eclipse.jdt.core.ISourceRange;
 import org.eclipse.jdt.core.IType;
 import org.eclipse.jdt.core.JavaCore;
@@ -3638,7 +3638,7 @@
 	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=48292
 	 */
 	public void test0522() throws JavaModelException {
-		IClassFile classFile = getClassFile("Converter" , "bins", "test0522", "Test.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		IOrdinaryClassFile classFile = getClassFile("Converter" , "bins", "test0522", "Test.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		assertNotNull(classFile);
 		assertNotNull(classFile.getSource());
 		IType type = classFile.getType();
@@ -3687,7 +3687,7 @@
 	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=48292
 	 */
 	public void test0523() throws JavaModelException {
-		IClassFile classFile = getClassFile("Converter" , "bins", "test0523", "Test.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		IOrdinaryClassFile classFile = getClassFile("Converter" , "bins", "test0523", "Test.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		assertNotNull(classFile);
 		assertNotNull(classFile.getSource());
 		IType type = classFile.getType();
@@ -3726,7 +3726,7 @@
 	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=48292
 	 */
 	public void test0524() throws JavaModelException {
-		IClassFile classFile = getClassFile("Converter" , "bins", "test0524", "A.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		IOrdinaryClassFile classFile = getClassFile("Converter" , "bins", "test0524", "A.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		assertNotNull(classFile);
 		assertNotNull(classFile.getSource());
 		IType type = classFile.getType();
@@ -3754,7 +3754,7 @@
 	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=48292
 	 */
 	public void test0525() throws JavaModelException {
-		IClassFile classFile = getClassFile("Converter" , "bins", "test0525", "A.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		IOrdinaryClassFile classFile = getClassFile("Converter" , "bins", "test0525", "A.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		assertNotNull(classFile);
 		assertNotNull(classFile.getSource());
 		IType type = classFile.getType();
@@ -3790,7 +3790,7 @@
 	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=48292
 	 */
 	public void test0526() throws JavaModelException {
-		IClassFile classFile = getClassFile("Converter" , "bins", "test0526", "A.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		IOrdinaryClassFile classFile = getClassFile("Converter" , "bins", "test0526", "A.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		assertNotNull(classFile);
 		assertNotNull(classFile.getSource());
 		IType type = classFile.getType();
@@ -3832,7 +3832,7 @@
 	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=48292
 	 */
 	public void test0527() throws JavaModelException {
-		IClassFile classFile = getClassFile("Converter" , "bins", "test0527", "A.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		IOrdinaryClassFile classFile = getClassFile("Converter" , "bins", "test0527", "A.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		assertNotNull(classFile);
 		assertNotNull(classFile.getSource());
 		IType type = classFile.getType();
@@ -3873,7 +3873,7 @@
 	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=48292
 	 */
 	public void test0528() throws JavaModelException {
-		IClassFile classFile = getClassFile("Converter" , "bins", "test0528", "A.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		IOrdinaryClassFile classFile = getClassFile("Converter" , "bins", "test0528", "A.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		assertNotNull(classFile);
 		assertNotNull(classFile.getSource());
 		IType type = classFile.getType();
@@ -3902,7 +3902,7 @@
 	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=48292
 	 */
 	public void test0529() throws JavaModelException {
-		IClassFile classFile = getClassFile("Converter" , "bins", "test0529", "A.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		IOrdinaryClassFile classFile = getClassFile("Converter" , "bins", "test0529", "A.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		assertNotNull(classFile);
 		assertNotNull(classFile.getSource());
 		IType type = classFile.getType();
@@ -3932,7 +3932,7 @@
 	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=48292
 	 */
 	public void test0530() throws JavaModelException {
-		IClassFile classFile = getClassFile("Converter" , "bins", "test0530", "A.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		IOrdinaryClassFile classFile = getClassFile("Converter" , "bins", "test0530", "A.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		assertNotNull(classFile);
 		assertNotNull(classFile.getSource());
 		IType type = classFile.getType();
@@ -3961,7 +3961,7 @@
 	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=48292
 	 */
 	public void test0531() throws JavaModelException {
-		IClassFile classFile = getClassFile("Converter" , "bins", "test0531", "A.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		IOrdinaryClassFile classFile = getClassFile("Converter" , "bins", "test0531", "A.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		assertNotNull(classFile);
 		assertNotNull(classFile.getSource());
 		IType type = classFile.getType();
@@ -4044,7 +4044,7 @@
 		ISourceRange sourceRange = init.getSourceRange();
 		int position = sourceRange.getOffset() + sourceRange.getLength() / 2;
 
-		IClassFile classFile = getClassFile("Converter" , "bins", "test0532", "A.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		IOrdinaryClassFile classFile = getClassFile("Converter" , "bins", "test0532", "A.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		assertNotNull(classFile);
 		assertNotNull(classFile.getSource());
 		type = classFile.getType();
@@ -7546,11 +7546,11 @@
 	}
 	/*
 	 * Ensures that 2 type bindings (one from .class file, the other from attache source) are "isEqualTo(...)".
-	 * (regression test for bug 130317 ASTParser with IClassFile as source creates type bindings that are not isEqualTo(..) binary bindings)
+	 * (regression test for bug 130317 ASTParser with IOrdinaryClassFile as source creates type bindings that are not isEqualTo(..) binary bindings)
 	 */
 	public void test0641() throws JavaModelException {
 		// Integer from attached source
-		IClassFile classFile = getClassFile("Converter", getConverterJCLPath().toOSString(), "java.lang", "Integer.class");
+		IOrdinaryClassFile classFile = getClassFile("Converter", getConverterJCLPath().toOSString(), "java.lang", "Integer.class");
 		String source = classFile.getSource();
 		MarkerInfo markerInfo = new MarkerInfo(source);
 		markerInfo.astStarts = new int[] {source.indexOf("public")};
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterTestAST8_2.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterTestAST8_2.java
index 466c9e8..c080e42 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterTestAST8_2.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterTestAST8_2.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2011, 2016 IBM Corporation and others.
+ * Copyright (c) 2011, 2017 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
@@ -23,7 +23,6 @@
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.OperationCanceledException;
 import org.eclipse.jdt.core.Flags;
-import org.eclipse.jdt.core.IClassFile;
 import org.eclipse.jdt.core.IClasspathEntry;
 import org.eclipse.jdt.core.ICompilationUnit;
 import org.eclipse.jdt.core.IField;
@@ -31,6 +30,7 @@
 import org.eclipse.jdt.core.IJavaElement;
 import org.eclipse.jdt.core.IJavaProject;
 import org.eclipse.jdt.core.IMethod;
+import org.eclipse.jdt.core.IOrdinaryClassFile;
 import org.eclipse.jdt.core.ISourceRange;
 import org.eclipse.jdt.core.IType;
 import org.eclipse.jdt.core.JavaCore;
@@ -114,7 +114,7 @@
 
 	public void setUpSuite() throws Exception {
 		super.setUpSuite();
-		this.ast = AST.newAST(AST.JLS8);
+		this.ast = AST.newAST(getJLS8());
 	}
 
 	public ASTConverterTestAST8_2(String name) {
@@ -149,7 +149,7 @@
 	 */
 	public void test0401() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0401", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
 		assertNotNull(node);
 		assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
@@ -175,7 +175,7 @@
 	public void test0402() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0402", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		ASTNode node = getASTNode((CompilationUnit) result, 1, 0, 0);
 		assertEquals("Wrong number of problems", 0, ((CompilationUnit) result).getProblems().length); //$NON-NLS-1$
 		assertNotNull(node);
@@ -188,7 +188,7 @@
 	 */
 	public void test0403() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0403", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		ASTNode node = getASTNode((CompilationUnit) result, 1, 0, 1);
 		assertEquals("Wrong number of problems", 1, ((CompilationUnit) result).getProblems().length); //$NON-NLS-1$
 		assertNotNull(node);
@@ -222,7 +222,7 @@
 	 */
 	public void test0404() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0404", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
 		assertEquals("Wrong number of problems", 1, ((CompilationUnit) result).getProblems().length); //$NON-NLS-1$
 		assertNotNull(node);
@@ -253,7 +253,7 @@
 	 */
 	public void test0405() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0405", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		ASTNode node = getASTNode((CompilationUnit) result, 1, 0, 1);
 		assertEquals("Wrong number of problems", 1, ((CompilationUnit) result).getProblems().length); //$NON-NLS-1$
 		assertNotNull(node);
@@ -284,7 +284,7 @@
 	 */
 	public void test0406() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0406", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		CompilationUnit unit = (CompilationUnit) result;
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
 		assertEquals("Wrong number of problems", 1, ((CompilationUnit) result).getProblems().length); //$NON-NLS-1$
@@ -317,7 +317,7 @@
 	 */
 	public void test0407() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0407", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertEquals("Wrong number of problems", 0, ((CompilationUnit) result).getProblems().length); //$NON-NLS-1$
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
 		CompilationUnit unit = (CompilationUnit) result;
@@ -348,7 +348,7 @@
 	 */
 	public void test0408() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0408", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertEquals("Wrong number of problems", 0, ((CompilationUnit) result).getProblems().length); //$NON-NLS-1$
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
 		assertNotNull(node);
@@ -382,7 +382,7 @@
 			newOptions.put(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_4);
 			JavaCore.setOptions(newOptions);
 			ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0409", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-			ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+			ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 			assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 			CompilationUnit compilationUnit = (CompilationUnit) result;
 			assertProblemsSize(compilationUnit, 0);
@@ -469,7 +469,7 @@
 	 */
 	public void test0410() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0410", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertEquals("Wrong number of problems", 0, ((CompilationUnit) result).getProblems().length); //$NON-NLS-1$
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertNotNull(node);
@@ -486,7 +486,7 @@
 	 */
 	public void test0411() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0411", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertEquals("Wrong number of problems", 0, ((CompilationUnit) result).getProblems().length); //$NON-NLS-1$
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertNotNull(node);
@@ -503,7 +503,7 @@
 	 */
 	public void test0412() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0412", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$
@@ -533,7 +533,7 @@
 	 */
 	public void test0413() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0413", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true, false, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true, false, true);
 		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$
@@ -542,7 +542,7 @@
 		assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
 		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
 		IBinding binding;
-		if (node.getAST().apiLevel() < AST.JLS8) {
+		if (node.getAST().apiLevel() < getJLS8()) {
 			List throwsException = internalThrownExceptions(methodDeclaration);
 			assertEquals("wrong size", 2, throwsException.size()); //$NON-NLS-1$
 			Name name = (Name) throwsException.get(0);
@@ -563,7 +563,7 @@
 	 */
 	public void test0414() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0414", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$
@@ -589,7 +589,7 @@
 
 		ICompilationUnit sourceUnit2 = getCompilationUnit("Converter" , "src", "test0414", "B.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 
-		result = runConversion(AST.JLS8, sourceUnit2, true);
+		result = runConversion(getJLS8(), sourceUnit2, true);
 		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit unit2 = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 0, unit2.getProblems().length); //$NON-NLS-1$
@@ -606,7 +606,7 @@
 	public void test0415() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0415", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$<
@@ -628,7 +628,7 @@
 	 */
 	public void test0416() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0416", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$<
@@ -661,7 +661,7 @@
 	 */
 	public void test0417() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0417", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$<
@@ -686,7 +686,7 @@
 	 */
 	public void test0418() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0418", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$<
@@ -707,7 +707,7 @@
 	 */
 	public void test0419() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0419", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$<
@@ -730,7 +730,7 @@
 	public void test0420() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0420", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$<
@@ -757,7 +757,7 @@
 	public void test0421() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0421", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$<
@@ -785,7 +785,7 @@
 	public void test0422() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0422", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$<
@@ -813,7 +813,7 @@
 	public void test0423() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0423", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$<
@@ -840,7 +840,7 @@
 	public void test0424() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0424", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$<
@@ -864,7 +864,7 @@
 	public void test0425() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0425", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$<
@@ -891,7 +891,7 @@
 	 */
 	public void test0426() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0426", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true, false, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true, false, true);
 		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$<
@@ -912,7 +912,7 @@
 	 */
 	public void test0427() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0427", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$<
@@ -937,7 +937,7 @@
 	 */
 	public void test0428() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0428", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$<
@@ -962,7 +962,7 @@
 	 */
 	public void test0429() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0429", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$<
@@ -988,7 +988,7 @@
 	public void test0430() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0430", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$<
@@ -1011,7 +1011,7 @@
 	 */
 	public void test0431() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0431", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$<
@@ -1032,7 +1032,7 @@
 	 */
 	public void test0432() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0432", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$<
@@ -1054,7 +1054,7 @@
 	 */
 	public void test0433() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0433", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$<
@@ -1083,7 +1083,7 @@
 	 */
 	public void test0434() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0434", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$<
@@ -1107,7 +1107,7 @@
 	 */
 	public void test0435() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0435", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$<
@@ -1131,7 +1131,7 @@
 	 */
 	public void test0436() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0436", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true, false, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true, false, true);
 		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		assertProblemsSize(unit, 1, "The type A.CInner is not visible"); //$NON-NLS-1$
@@ -1157,7 +1157,7 @@
 	 */
 	public void test0437() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0437", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true, false, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true, false, true);
 		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		assertProblemsSize(unit, 1, "The type CInner is not visible"); //$NON-NLS-1$
@@ -1179,7 +1179,7 @@
 	 */
 	public void test0438() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0438", "D.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true, false, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true, false, true);
 		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$<
@@ -1195,7 +1195,7 @@
 	 */
 	public void test0439() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0439", "E.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true, false, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true, false, true);
 		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$<
@@ -1216,7 +1216,7 @@
 	public void test0440() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0440", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$<
@@ -1256,7 +1256,7 @@
 	public void test0441() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0441", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$<
@@ -1284,7 +1284,7 @@
 	public void test0442() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0442", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$<
@@ -1313,7 +1313,7 @@
 	 */
 	public void test0443() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0443", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 3, unit.getProblems().length); //$NON-NLS-1$<
@@ -1337,7 +1337,7 @@
 	 */
 	public void test0444() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0444", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 2, unit.getProblems().length); //$NON-NLS-1$<
@@ -1360,7 +1360,7 @@
 	 */
 	public void test0445() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0445", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$<
@@ -1371,7 +1371,7 @@
 	 */
 	public void test0446() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0446", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 2, unit.getProblems().length); //$NON-NLS-1$<
@@ -1382,7 +1382,7 @@
 	 */
 	public void test0447() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0447", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 3, unit.getProblems().length); //$NON-NLS-1$<
@@ -1393,7 +1393,7 @@
 	 */
 	public void test0448() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0448", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$<
@@ -1412,7 +1412,7 @@
 	 */
 	public void test0449() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0449", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$<
@@ -1430,7 +1430,7 @@
 	 */
 	public void test0450() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0450", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$
@@ -1518,7 +1518,7 @@
 	public void test0451() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0451", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 2, unit.getProblems().length); //$NON-NLS-1$
@@ -1535,7 +1535,7 @@
 	 */
 	public void test0452() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "", "NO_WORKING.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
 		ASTNode node = getASTNode(compilationUnit, 0, 0);
@@ -1551,7 +1551,7 @@
 	 */
 	public void test0453() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0453", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
 		ASTNode node = getASTNode(compilationUnit, 0, 0,0);
@@ -1571,7 +1571,7 @@
 	public void test0454() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0454", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
 		ASTNode node = getASTNode(compilationUnit, 0, 0,1);
@@ -1596,7 +1596,7 @@
 	public void test0455() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0455", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
 		ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
@@ -1624,7 +1624,7 @@
 	public void test0456() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0456", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
 		ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
@@ -1645,7 +1645,7 @@
 	public void test0457() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0457", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
 		ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
@@ -1672,7 +1672,7 @@
 	public void test0458() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0458", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
 		ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
@@ -1701,7 +1701,7 @@
 	public void test0459() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0459", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
 		ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
@@ -1729,7 +1729,7 @@
 	 */
 	public void test0460() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0460", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
 		assertTrue("Has error", compilationUnit.getProblems().length == 0); //$NON-NLS-1$
@@ -1743,7 +1743,7 @@
 	 */
 	public void test0461() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0461", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		char[] source = sourceUnit.getSource().toCharArray();
 		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -1780,7 +1780,7 @@
 	 */
 	public void test0462() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "", "Test462.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
 		assertTrue("Has error", compilationUnit.getProblems().length == 0); //$NON-NLS-1$
@@ -1799,7 +1799,7 @@
 	 */
 	public void test0463() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0463", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		CompilationUnit compilationUnit = (CompilationUnit) result;
 		char[] source = sourceUnit.getSource().toCharArray();
 		ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
@@ -1820,7 +1820,7 @@
 	 */
 	public void test0464() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0464", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		CompilationUnit compilationUnit = (CompilationUnit) result;
 		ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
 		assertEquals("No error", 1, compilationUnit.getProblems().length); //$NON-NLS-1$
@@ -1842,7 +1842,7 @@
 	 */
 	public void test0465() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0465", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		CompilationUnit compilationUnit = (CompilationUnit) result;
 		ASTNode node = getASTNode(compilationUnit, 0, 1, 0);
 		assertEquals("No error", 0, compilationUnit.getProblems().length); //$NON-NLS-1$
@@ -1874,7 +1874,7 @@
 			newOptions.put(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_4);
 			JavaCore.setOptions(newOptions);
 			ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0466", "Assert.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-			ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+			ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 			CompilationUnit compilationUnit = (CompilationUnit) result;
 			char[] source = sourceUnit.getSource().toCharArray();
 			ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
@@ -1898,7 +1898,7 @@
 			newOptions.put(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_4);
 			JavaCore.setOptions(newOptions);
 			ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0467", "Assert.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-			ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+			ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 			CompilationUnit compilationUnit = (CompilationUnit) result;
 			char[] source = sourceUnit.getSource().toCharArray();
 			ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
@@ -1923,7 +1923,7 @@
 	 */
 	public void test0468() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0468", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		CompilationUnit compilationUnit = (CompilationUnit) result;
 		ASTNode node = getASTNode(compilationUnit, 0, 1, 0);
 		assertEquals("No error", 0, compilationUnit.getProblems().length); //$NON-NLS-1$
@@ -1962,7 +1962,7 @@
 	 */
 	public void test0469() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "codeManipulation", "bug.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		CompilationUnit compilationUnit = (CompilationUnit) result;
 		ASTNode node = getASTNode(compilationUnit, 0, 2, 0);
 		assertEquals("No error", 0, compilationUnit.getProblems().length); //$NON-NLS-1$
@@ -1979,7 +1979,7 @@
 	public void test0470() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0470", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		CompilationUnit compilationUnit = (CompilationUnit) result;
 		ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
 		assertEquals("No error", 0, compilationUnit.getProblems().length); //$NON-NLS-1$
@@ -2006,7 +2006,7 @@
 	public void test0471() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0471", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		CompilationUnit compilationUnit = (CompilationUnit) result;
 		assertEquals("No error", 1, compilationUnit.getProblems().length); //$NON-NLS-1$
 		ASTNode node = getASTNode(compilationUnit, 0, 0);
@@ -2027,7 +2027,7 @@
 	 */
 	public void test0472() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "junit.textui", "ResultPrinter.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		CompilationUnit compilationUnit = (CompilationUnit) result;
 		assertEquals("No error", 2, compilationUnit.getProblems().length); //$NON-NLS-1$
 		ASTNode node = getASTNode(compilationUnit, 0, 2);
@@ -2050,7 +2050,7 @@
 
 			ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0473", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 			char[] source = sourceUnit.getSource().toCharArray();
-			ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+			ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 			CompilationUnit compilationUnit = (CompilationUnit) result;
 			assertEquals("No error", 2, compilationUnit.getProblems().length); //$NON-NLS-1$
 			ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
@@ -2071,7 +2071,7 @@
 	public void test0474() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0474", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		CompilationUnit compilationUnit = (CompilationUnit) result;
 		assertEquals("No error", 0, compilationUnit.getProblems().length); //$NON-NLS-1$
 		ASTNode node = getASTNode(compilationUnit, 0, 1, 0);
@@ -2095,7 +2095,7 @@
 	public void test0475() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0475", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		CompilationUnit compilationUnit = (CompilationUnit) result;
 		assertEquals("No error", 0, compilationUnit.getProblems().length); //$NON-NLS-1$
 		ASTNode node = getASTNode(compilationUnit, 0, 1, 0);
@@ -2119,7 +2119,7 @@
 	public void test0476() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0476", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		CompilationUnit compilationUnit = (CompilationUnit) result;
 		assertEquals("No error", 0, compilationUnit.getProblems().length); //$NON-NLS-1$
 		ASTNode node = getASTNode(compilationUnit, 0, 1, 0);
@@ -2144,7 +2144,7 @@
 	public void test0477() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0477", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		CompilationUnit compilationUnit = (CompilationUnit) result;
 		assertEquals("No error", 1, compilationUnit.getProblems().length); //$NON-NLS-1$
 		ASTNode node = getASTNode(compilationUnit, 0, 1, 0);
@@ -2173,7 +2173,7 @@
 		assertEquals("wrong size", 1, methods.length);
 		IMethod method = methods[0];
 		ISourceRange sourceRange = method.getSourceRange();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, true);
 		assertNotNull(result);
 		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		ASTNode node = getASTNode((CompilationUnit) result, 1, 0);
@@ -2222,7 +2222,7 @@
 		assertEquals("wrong size", 1, methods.length);
 		IMethod method = methods[0];
 		ISourceRange sourceRange = method.getSourceRange();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, false);
 		assertNotNull(result);
 		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		ASTNode node = getASTNode((CompilationUnit) result, 1, 0);
@@ -2261,7 +2261,7 @@
 		assertEquals("wrong size", 1, methods.length);
 		IMethod method = methods[0];
 		ISourceRange sourceRange = method.getSourceRange();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, false);
 		assertNotNull(result);
 		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -2289,7 +2289,7 @@
 		assertEquals("wrong size", 1, methods.length);
 		IMethod method = methods[0];
 		ISourceRange sourceRange = method.getSourceRange();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, true);
 		assertNotNull(result);
 		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -2329,7 +2329,7 @@
 		assertEquals("wrong size", 1, methods.length);
 		IMethod method = methods[0];
 		ISourceRange sourceRange = method.getSourceRange();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, true);
 		assertNotNull(result);
 		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -2367,7 +2367,7 @@
 		assertEquals("wrong size", 1, methods.length);
 		IMethod method = methods[0];
 		ISourceRange sourceRange = method.getSourceRange();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, true);
 		assertNotNull(result);
 		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -2410,7 +2410,7 @@
 		assertEquals("wrong size", 1, memberTypes.length);
 		IType memberType = memberTypes[0];
 		ISourceRange sourceRange = memberType.getSourceRange();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, true);
 		assertNotNull(result);
 		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -2441,7 +2441,7 @@
 		assertEquals("wrong size", 1, memberTypes.length);
 		IType memberType = memberTypes[0];
 		ISourceRange sourceRange = memberType.getSourceRange();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, false);
 		assertNotNull(result);
 		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -2471,7 +2471,7 @@
 		assertEquals("wrong size", 2, methods.length);
 		IMethod method = methods[1];
 		ISourceRange sourceRange = method.getSourceRange();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, false);
 		assertNotNull(result);
 		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 2);
@@ -2502,7 +2502,7 @@
 		assertEquals("wrong size", 3, methods.length);
 		IMethod method = methods[1];
 		ISourceRange sourceRange = method.getSourceRange();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, false);
 		assertNotNull(result);
 		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 
@@ -2575,7 +2575,7 @@
 		assertEquals("wrong size", 2, initializers.length);
 		IInitializer init = initializers[1];
 		ISourceRange sourceRange = init.getSourceRange();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, false);
 		assertNotNull(result);
 		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 
@@ -2639,7 +2639,7 @@
 	 */
 	public void test0489() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0489", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 3, unit.getProblems().length); //$NON-NLS-1$<
@@ -2655,7 +2655,7 @@
 	 */
 	public void test0490() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0490", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$<
@@ -2672,7 +2672,7 @@
 			JavaCore.setOptions(newOptions);
 			ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0491", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 			char[] source = sourceUnit.getSource().toCharArray();
-			ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+			ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 			assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 			CompilationUnit unit = (CompilationUnit) result;
 			assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$<
@@ -2698,7 +2698,7 @@
 			JavaCore.setOptions(newOptions);
 			ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0492", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 			char[] source = sourceUnit.getSource().toCharArray();
-			ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+			ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 			assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 			CompilationUnit unit = (CompilationUnit) result;
 			assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$<
@@ -2718,7 +2718,7 @@
 	public void test0493() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0493", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$<
@@ -2729,7 +2729,7 @@
 		checkSourceRange(type, "Class[][]", source);
 		assertTrue("not an array type", type.isArrayType()); //$NON-NLS-1$
 		ArrayType arrayType = (ArrayType) type;
-		if (this.ast.apiLevel() < AST.JLS8) {
+		if (this.ast.apiLevel() < getJLS8()) {
 			Type componentType = componentType(arrayType);
 			assertTrue("not an array type", componentType.isArrayType()); //$NON-NLS-1$
 			checkSourceRange(componentType, "Class[]", source);
@@ -2749,7 +2749,7 @@
 	public void test0494() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0494", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$<
@@ -2760,7 +2760,7 @@
 		checkSourceRange(type, "Class[][][]", source);
 		assertTrue("not an array type", type.isArrayType()); //$NON-NLS-1$
 		ArrayType arrayType = (ArrayType) type;
-		if (this.ast.apiLevel() < AST.JLS8) {
+		if (this.ast.apiLevel() < getJLS8()) {
 			Type componentType = componentType(arrayType);
 			assertTrue("not an array type", componentType.isArrayType()); //$NON-NLS-1$
 			checkSourceRange(componentType, "Class[][]", source);
@@ -2784,7 +2784,7 @@
 	public void test0495() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0495", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$<
@@ -2795,7 +2795,7 @@
 		checkSourceRange(type, "Class[][]", source);
 		assertTrue("not an array type", type.isArrayType()); //$NON-NLS-1$
 		ArrayType arrayType = (ArrayType) type;
-		if (this.ast.apiLevel() < AST.JLS8) {
+		if (this.ast.apiLevel() < getJLS8()) {
 			Type componentType = componentType(arrayType);
 			assertTrue("not an array type", componentType.isArrayType()); //$NON-NLS-1$
 			checkSourceRange(componentType, "Class[]", source);
@@ -2819,7 +2819,7 @@
 	public void test0496() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0496", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$<
@@ -2830,7 +2830,7 @@
 		checkSourceRange(type, "Class[][][][]", source);
 		assertTrue("not an array type", type.isArrayType()); //$NON-NLS-1$
 		ArrayType arrayType = (ArrayType) type;
-		if (this.ast.apiLevel() < AST.JLS8) {
+		if (this.ast.apiLevel() < getJLS8()) {
 			Type componentType = componentType(arrayType);
 			assertTrue("not an array type", componentType.isArrayType()); //$NON-NLS-1$
 			checkSourceRange(componentType, "Class[][][]", source);
@@ -2858,7 +2858,7 @@
 	public void test0497() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0497", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$<
@@ -2869,7 +2869,7 @@
 		checkSourceRange(type, "Class[]", source);
 		assertTrue("not an array type", type.isArrayType()); //$NON-NLS-1$
 		ArrayType arrayType = (ArrayType) type;
-		type = this.ast.apiLevel() < AST.JLS8 ? componentType(arrayType) : arrayType.getElementType();
+		type = this.ast.apiLevel() < getJLS8() ? componentType(arrayType) : arrayType.getElementType();
 		assertTrue("is an array type", !type.isArrayType()); //$NON-NLS-1$
 		checkSourceRange(type, "Class", source);
 	}
@@ -2878,7 +2878,7 @@
 	 */
 	public void test0498() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0498", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 	}
 
@@ -2887,7 +2887,7 @@
 	 */
 	public void test0499() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0499", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$
@@ -2925,7 +2925,7 @@
 			project.setOption(JavaCore.COMPILER_PB_INVALID_JAVADOC, JavaCore.ERROR);
 			project.setOption(JavaCore.COMPILER_PB_MISSING_JAVADOC_TAGS, JavaCore.ERROR);
 			project.setOption(JavaCore.COMPILER_PB_MISSING_JAVADOC_COMMENTS, JavaCore.ERROR);
-			CompilationUnit result = (CompilationUnit)runConversion(AST.JLS8, sourceUnit, true);
+			CompilationUnit result = (CompilationUnit)runConversion(getJLS8(), sourceUnit, true);
 			IProblem[] problems= result.getProblems();
 			assertTrue(problems.length == 1);
 			assertEquals("Invalid warning", "Javadoc: Missing tag for parameter a", problems[0].getMessage());
@@ -2939,7 +2939,7 @@
 	 */
 	public void test0501() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0501", "JavaEditor.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		assertNotNull(result);
 		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 	}
@@ -2949,7 +2949,7 @@
 	 */
 	public void test0502a() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0502", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		CompilationUnit unit = (CompilationUnit)runConversion(AST.JLS8, sourceUnit, true);
+		CompilationUnit unit = (CompilationUnit)runConversion(getJLS8(), sourceUnit, true);
 
 		// 'i' in initializer
 		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement)getASTNode(unit, 0, 0, 0);
@@ -2963,7 +2963,7 @@
 	 */
 	public void test0502b() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0502", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		CompilationUnit unit = (CompilationUnit)runConversion(AST.JLS8, sourceUnit, true);
+		CompilationUnit unit = (CompilationUnit)runConversion(getJLS8(), sourceUnit, true);
 
 		// 'j' in 'then' block in initializer
 		IfStatement ifStatement = (IfStatement) getASTNode(unit, 0, 0, 1);
@@ -2979,7 +2979,7 @@
 	 */
 	public void test0502c() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0502", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		CompilationUnit unit = (CompilationUnit)runConversion(AST.JLS8, sourceUnit, true);
+		CompilationUnit unit = (CompilationUnit)runConversion(getJLS8(), sourceUnit, true);
 
 		// 'i' in 'foo()'
 		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement)getASTNode(unit, 0, 1, 0);
@@ -2993,7 +2993,7 @@
 	 */
 	public void test0502d() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0502", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		CompilationUnit unit = (CompilationUnit)runConversion(AST.JLS8, sourceUnit, true);
+		CompilationUnit unit = (CompilationUnit)runConversion(getJLS8(), sourceUnit, true);
 
 		// 'j' in 'then' block in 'foo()'
 		IfStatement ifStatement = (IfStatement) getASTNode(unit, 0, 1, 1);
@@ -3009,7 +3009,7 @@
 	 */
 	public void test0502e() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0502", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		CompilationUnit unit = (CompilationUnit)runConversion(AST.JLS8, sourceUnit, true);
+		CompilationUnit unit = (CompilationUnit)runConversion(getJLS8(), sourceUnit, true);
 
 		// 'j' in 'else' block in 'foo()'
 		IfStatement ifStatement = (IfStatement) getASTNode(unit, 0, 1, 1);
@@ -3025,7 +3025,7 @@
 	 */
 	public void test0502f() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0502", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		CompilationUnit unit = (CompilationUnit)runConversion(AST.JLS8, sourceUnit, true);
+		CompilationUnit unit = (CompilationUnit)runConversion(getJLS8(), sourceUnit, true);
 
 		// first 'new Object(){...}' in 'foo()'
 		ExpressionStatement expressionStatement = (ExpressionStatement) getASTNode(unit, 0, 1, 2);
@@ -3040,7 +3040,7 @@
 	 */
 	public void test0502g() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0502", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		CompilationUnit unit = (CompilationUnit)runConversion(AST.JLS8, sourceUnit, true);
+		CompilationUnit unit = (CompilationUnit)runConversion(getJLS8(), sourceUnit, true);
 
 		// 'B' in 'foo()'
 		TypeDeclarationStatement typeDeclarationStatement = (TypeDeclarationStatement) getASTNode(unit, 0, 1, 3);
@@ -3054,7 +3054,7 @@
 	 */
 	public void test0502h() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0502", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		CompilationUnit unit = (CompilationUnit)runConversion(AST.JLS8, sourceUnit, true);
+		CompilationUnit unit = (CompilationUnit)runConversion(getJLS8(), sourceUnit, true);
 
 		// second 'new Object(){...}' in 'foo()'
 		ExpressionStatement expressionStatement = (ExpressionStatement) getASTNode(unit, 0, 1, 4);
@@ -3069,7 +3069,7 @@
 	 */
 	public void test0502i() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0502", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		CompilationUnit unit = (CompilationUnit)runConversion(AST.JLS8, sourceUnit, true);
+		CompilationUnit unit = (CompilationUnit)runConversion(getJLS8(), sourceUnit, true);
 
 		// 'field' in 'B' in 'foo()'
 		TypeDeclarationStatement typeDeclarationStatement = (TypeDeclarationStatement) getASTNode(unit, 0, 1, 3);
@@ -3087,7 +3087,7 @@
 	 */
 	public void test0502j() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0502", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		CompilationUnit unit = (CompilationUnit)runConversion(AST.JLS8, sourceUnit, true);
+		CompilationUnit unit = (CompilationUnit)runConversion(getJLS8(), sourceUnit, true);
 
 		// 'bar()' in 'B' in 'foo()'
 		TypeDeclarationStatement typeDeclarationStatement = (TypeDeclarationStatement) getASTNode(unit, 0, 1, 3);
@@ -3104,7 +3104,7 @@
 	 */
 	public void test0503a() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0503", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		CompilationUnit unit = (CompilationUnit)runConversion(AST.JLS8, sourceUnit, true);
+		CompilationUnit unit = (CompilationUnit)runConversion(getJLS8(), sourceUnit, true);
 
 		// top level type A
 		TypeDeclaration type = (TypeDeclaration)getASTNode(unit, 0);
@@ -3117,7 +3117,7 @@
 	 */
 	public void test0503b() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0503", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		CompilationUnit unit = (CompilationUnit)runConversion(AST.JLS8, sourceUnit, true);
+		CompilationUnit unit = (CompilationUnit)runConversion(getJLS8(), sourceUnit, true);
 
 		// member type B in A
 		TypeDeclaration type = (TypeDeclaration)getASTNode(unit, 0, 0);
@@ -3130,7 +3130,7 @@
 	 */
 	public void test0503c() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0503", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		CompilationUnit unit = (CompilationUnit)runConversion(AST.JLS8, sourceUnit, true);
+		CompilationUnit unit = (CompilationUnit)runConversion(getJLS8(), sourceUnit, true);
 
 		// local type E in foo() in A
 		TypeDeclarationStatement typeDeclarationStatement = (TypeDeclarationStatement) getASTNode(unit, 0, 1, 0);
@@ -3144,7 +3144,7 @@
 	 */
 	public void test0503d() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0503", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		CompilationUnit unit = (CompilationUnit)runConversion(AST.JLS8, sourceUnit, true);
+		CompilationUnit unit = (CompilationUnit)runConversion(getJLS8(), sourceUnit, true);
 
 		// anonymous type new Object() {...} in foo() in A
 		ExpressionStatement expressionStatement = (ExpressionStatement) getASTNode(unit, 0, 1, 1);
@@ -3159,7 +3159,7 @@
 	 */
 	public void test0503e() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0503", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		CompilationUnit unit = (CompilationUnit)runConversion(AST.JLS8, sourceUnit, true);
+		CompilationUnit unit = (CompilationUnit)runConversion(getJLS8(), sourceUnit, true);
 
 		// type F in anonymous type new Object() {...} in foo() in A
 		ExpressionStatement expressionStatement = (ExpressionStatement) getASTNode(unit, 0, 1, 1);
@@ -3175,7 +3175,7 @@
 	 */
 	public void test0503f() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0503", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		CompilationUnit unit = (CompilationUnit)runConversion(AST.JLS8, sourceUnit, true);
+		CompilationUnit unit = (CompilationUnit)runConversion(getJLS8(), sourceUnit, true);
 
 		// local type C in bar() in B in A
 		MethodDeclaration method = (MethodDeclaration) getASTNode(unit, 0, 0, 0);
@@ -3190,7 +3190,7 @@
 	 */
 	public void test0503g() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0503", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		CompilationUnit unit = (CompilationUnit)runConversion(AST.JLS8, sourceUnit, true);
+		CompilationUnit unit = (CompilationUnit)runConversion(getJLS8(), sourceUnit, true);
 
 		// anonymous type new Object() {...} in bar() in B in A
 		MethodDeclaration method = (MethodDeclaration) getASTNode(unit, 0, 0, 0);
@@ -3206,7 +3206,7 @@
 	 */
 	public void test0503h() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0503", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		CompilationUnit unit = (CompilationUnit)runConversion(AST.JLS8, sourceUnit, true);
+		CompilationUnit unit = (CompilationUnit)runConversion(getJLS8(), sourceUnit, true);
 
 		// type D in anonymous type new Object() {...} in bar() in B in A
 		MethodDeclaration method = (MethodDeclaration) getASTNode(unit, 0, 0, 0);
@@ -3223,7 +3223,7 @@
 	 */
 	public void test0503i() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0503", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		CompilationUnit unit = (CompilationUnit)runConversion(AST.JLS8, sourceUnit, true);
+		CompilationUnit unit = (CompilationUnit)runConversion(getJLS8(), sourceUnit, true);
 
 		// unreachable type G in foo() in A
 		IfStatement ifStatement = (IfStatement) getASTNode(unit, 0, 1, 2);
@@ -3240,7 +3240,7 @@
 	public void test0504() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0504", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$
@@ -3258,7 +3258,7 @@
 	public void test0505() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0505", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$
@@ -3275,7 +3275,7 @@
 	 */
 	public void test0506() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0506", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		final CompilationUnit unit = (CompilationUnit) result;
 		ASTNode node = getASTNode(unit, 0, 0, 0);
 		assertEquals("Wrong number of problems", 0, (unit).getProblems().length); //$NON-NLS-1$
@@ -3295,7 +3295,7 @@
 	 */
 	public void test0507() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0507", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		final CompilationUnit unit = (CompilationUnit) result;
 		ASTNode node = getASTNode(unit, 0, 0, 0);
 		assertEquals("Wrong number of problems", 0, (unit).getProblems().length); //$NON-NLS-1$
@@ -3315,7 +3315,7 @@
 	 */
 	public void test0508() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0508", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		final CompilationUnit unit = (CompilationUnit) result;
 		ASTNode node = getASTNode(unit, 0, 1, 0);
 		assertEquals("Wrong number of problems", 0, (unit).getProblems().length); //$NON-NLS-1$
@@ -3335,7 +3335,7 @@
 	 */
 	public void test0509() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0509", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		final CompilationUnit unit = (CompilationUnit) result;
 		ASTNode node = getASTNode(unit, 0, 0, 0);
 		assertEquals("Wrong number of problems", 0, (unit).getProblems().length); //$NON-NLS-1$
@@ -3355,7 +3355,7 @@
 	 */
 	public void test0510() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0510", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		final CompilationUnit unit = (CompilationUnit) result;
 		ASTNode node = getASTNode(unit, 0, 0, 0);
 		assertEquals("Wrong number of problems", 0, (unit).getProblems().length); //$NON-NLS-1$
@@ -3375,7 +3375,7 @@
 	 */
 	public void test0511() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0511", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		final CompilationUnit unit = (CompilationUnit) result;
 		ASTNode node = getASTNode(unit, 0, 0, 0);
 		assertEquals("Wrong number of problems", 0, (unit).getProblems().length); //$NON-NLS-1$
@@ -3396,7 +3396,7 @@
 	public void test0512() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0512", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		final CompilationUnit unit = (CompilationUnit) result;
 		ASTNode node = getASTNode(unit, 0, 0);
 		assertEquals("Wrong number of problems", 2, unit.getProblems().length); //$NON-NLS-1$
@@ -3412,7 +3412,7 @@
 	 */
 	public void test0513() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0513", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		final CompilationUnit unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$
 	}
@@ -3423,7 +3423,7 @@
 	 */
 	public void test0514() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0514", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		final CompilationUnit unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$
 	}
@@ -3434,7 +3434,7 @@
 	public void test0515() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0515", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		final CompilationUnit unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$
 		ASTNode node = getASTNode(unit, 0, 0, 0);
@@ -3458,14 +3458,14 @@
 	public void test0516() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0516", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		final CompilationUnit unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$
 		ASTNode node = getASTNode(unit, 0, 0);
 		assertNotNull("No node", node);
 		assertTrue("not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION);
 		MethodDeclaration declaration = (MethodDeclaration) node;
-		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		ASTParser parser = ASTParser.newParser(getJLS8());
 		parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS);
 		parser.setSource(source);
 		parser.setSourceRange(declaration.getStartPosition(), declaration.getLength());
@@ -3492,7 +3492,7 @@
 	public void test0517() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0517", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		final CompilationUnit unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$
 		assertNotNull("No comments", unit.getCommentList());
@@ -3501,7 +3501,7 @@
 		assertNotNull("No node", node);
 		assertTrue("not a field declaration", node.getNodeType() == ASTNode.FIELD_DECLARATION);
 		FieldDeclaration declaration = (FieldDeclaration) node;
-		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		ASTParser parser = ASTParser.newParser(getJLS8());
 		parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS);
 		parser.setSource(source);
 		parser.setSourceRange(declaration.getStartPosition(), declaration.getLength());
@@ -3528,14 +3528,14 @@
 	public void test0518() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0518", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		final CompilationUnit unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$
 		ASTNode node = getASTNode(unit, 0, 0);
 		assertNotNull("No node", node);
 		assertTrue("not an initializer", node.getNodeType() == ASTNode.INITIALIZER);
 		Initializer declaration = (Initializer) node;
-		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		ASTParser parser = ASTParser.newParser(getJLS8());
 		parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS);
 		parser.setSource(source);
 		parser.setSourceRange(declaration.getStartPosition(), declaration.getLength());
@@ -3562,7 +3562,7 @@
 	public void test0519() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0519", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		final CompilationUnit unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$
 		assertNotNull("No comments", unit.getCommentList());
@@ -3570,7 +3570,7 @@
 		ASTNode node = getASTNode(unit, 0, 0, 0);
 		assertNotNull("No node", node);
 		ASTNode statement = node;
-		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		ASTParser parser = ASTParser.newParser(getJLS8());
 		parser.setKind(ASTParser.K_STATEMENTS);
 		parser.setSource(source);
 		parser.setSourceRange(statement.getStartPosition(), statement.getLength());
@@ -3597,7 +3597,7 @@
 	public void test0520() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0520", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		final CompilationUnit unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$
 		assertNotNull("No comments", unit.getCommentList());
@@ -3607,7 +3607,7 @@
 		assertTrue("not a block", node.getNodeType() == ASTNode.EXPRESSION_STATEMENT);
 		ExpressionStatement expressionStatement = (ExpressionStatement) node;
 		Expression expression = expressionStatement.getExpression();
-		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		ASTParser parser = ASTParser.newParser(getJLS8());
 		parser.setKind(ASTParser.K_EXPRESSION);
 		parser.setSource(source);
 		parser.setSourceRange(expression.getStartPosition(), expression.getLength());
@@ -3667,7 +3667,7 @@
 	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=48292
 	 */
 	public void test0522() throws JavaModelException {
-		IClassFile classFile = getClassFile("Converter" , "bins", "test0522", "Test.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		IOrdinaryClassFile classFile = getClassFile("Converter" , "bins", "test0522", "Test.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		assertNotNull(classFile);
 		assertNotNull(classFile.getSource());
 		IType type = classFile.getType();
@@ -3677,7 +3677,7 @@
 		assertEquals("wrong size", 2, methods.length);
 		IMethod method = methods[1];
 		ISourceRange sourceRange = method.getSourceRange();
-		ASTNode result = runConversion(AST.JLS8, classFile, sourceRange.getOffset() + sourceRange.getLength() / 2, true);
+		ASTNode result = runConversion(getJLS8(), classFile, sourceRange.getOffset() + sourceRange.getLength() / 2, true);
 		assertNotNull(result);
 		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		ASTNode node = getASTNode((CompilationUnit) result, 1, 0);
@@ -3716,7 +3716,7 @@
 	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=48292
 	 */
 	public void test0523() throws JavaModelException {
-		IClassFile classFile = getClassFile("Converter" , "bins", "test0523", "Test.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		IOrdinaryClassFile classFile = getClassFile("Converter" , "bins", "test0523", "Test.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		assertNotNull(classFile);
 		assertNotNull(classFile.getSource());
 		IType type = classFile.getType();
@@ -3726,7 +3726,7 @@
 		assertEquals("wrong size", 2, methods.length);
 		IMethod method = methods[1];
 		ISourceRange sourceRange = method.getSourceRange();
-		ASTNode result = runConversion(AST.JLS8, classFile, sourceRange.getOffset() + sourceRange.getLength() / 2, false);
+		ASTNode result = runConversion(getJLS8(), classFile, sourceRange.getOffset() + sourceRange.getLength() / 2, false);
 		assertNotNull(result);
 		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		ASTNode node = getASTNode((CompilationUnit) result, 1, 0);
@@ -3755,7 +3755,7 @@
 	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=48292
 	 */
 	public void test0524() throws JavaModelException {
-		IClassFile classFile = getClassFile("Converter" , "bins", "test0524", "A.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		IOrdinaryClassFile classFile = getClassFile("Converter" , "bins", "test0524", "A.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		assertNotNull(classFile);
 		assertNotNull(classFile.getSource());
 		IType type = classFile.getType();
@@ -3765,7 +3765,7 @@
 		assertEquals("wrong size", 2, methods.length);
 		IMethod method = methods[1];
 		ISourceRange sourceRange = method.getSourceRange();
-		ASTNode result = runConversion(AST.JLS8, classFile, sourceRange.getOffset() + sourceRange.getLength() / 2, false);
+		ASTNode result = runConversion(getJLS8(), classFile, sourceRange.getOffset() + sourceRange.getLength() / 2, false);
 		assertNotNull(result);
 		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -3783,7 +3783,7 @@
 	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=48292
 	 */
 	public void test0525() throws JavaModelException {
-		IClassFile classFile = getClassFile("Converter" , "bins", "test0525", "A.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		IOrdinaryClassFile classFile = getClassFile("Converter" , "bins", "test0525", "A.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		assertNotNull(classFile);
 		assertNotNull(classFile.getSource());
 		IType type = classFile.getType();
@@ -3793,7 +3793,7 @@
 		assertEquals("wrong size", 2, methods.length);
 		IMethod method = methods[1];
 		ISourceRange sourceRange = method.getSourceRange();
-		ASTNode result = runConversion(AST.JLS8, classFile, sourceRange.getOffset() + sourceRange.getLength() / 2, true);
+		ASTNode result = runConversion(getJLS8(), classFile, sourceRange.getOffset() + sourceRange.getLength() / 2, true);
 		assertNotNull(result);
 		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -3819,7 +3819,7 @@
 	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=48292
 	 */
 	public void test0526() throws JavaModelException {
-		IClassFile classFile = getClassFile("Converter" , "bins", "test0526", "A.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		IOrdinaryClassFile classFile = getClassFile("Converter" , "bins", "test0526", "A.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		assertNotNull(classFile);
 		assertNotNull(classFile.getSource());
 		IType type = classFile.getType();
@@ -3832,7 +3832,7 @@
 		assertEquals("wrong size", 2, methods.length);
 		IMethod method = methods[1];
 		ISourceRange sourceRange = method.getSourceRange();
-		ASTNode result = runConversion(AST.JLS8, classFile, sourceRange.getOffset() + sourceRange.getLength() / 2, true);
+		ASTNode result = runConversion(getJLS8(), classFile, sourceRange.getOffset() + sourceRange.getLength() / 2, true);
 		assertNotNull(result);
 		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -3861,7 +3861,7 @@
 	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=48292
 	 */
 	public void test0527() throws JavaModelException {
-		IClassFile classFile = getClassFile("Converter" , "bins", "test0527", "A.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		IOrdinaryClassFile classFile = getClassFile("Converter" , "bins", "test0527", "A.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		assertNotNull(classFile);
 		assertNotNull(classFile.getSource());
 		IType type = classFile.getType();
@@ -3870,7 +3870,7 @@
 		assertEquals("wrong size", 1, methods.length);
 		IMethod method = methods[0];
 		ISourceRange sourceRange = method.getSourceRange();
-		ASTNode result = runConversion(AST.JLS8, classFile, sourceRange.getOffset() + sourceRange.getLength() / 2, true);
+		ASTNode result = runConversion(getJLS8(), classFile, sourceRange.getOffset() + sourceRange.getLength() / 2, true);
 		assertNotNull(result);
 		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -3902,7 +3902,7 @@
 	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=48292
 	 */
 	public void test0528() throws JavaModelException {
-		IClassFile classFile = getClassFile("Converter" , "bins", "test0528", "A.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		IOrdinaryClassFile classFile = getClassFile("Converter" , "bins", "test0528", "A.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		assertNotNull(classFile);
 		assertNotNull(classFile.getSource());
 		IType type = classFile.getType();
@@ -3911,7 +3911,7 @@
 		assertEquals("wrong size", 1, memberTypes.length);
 		IType memberType = memberTypes[0];
 		ISourceRange sourceRange = memberType.getSourceRange();
-		ASTNode result = runConversion(AST.JLS8, classFile, sourceRange.getOffset() + sourceRange.getLength() / 2, true);
+		ASTNode result = runConversion(getJLS8(), classFile, sourceRange.getOffset() + sourceRange.getLength() / 2, true);
 		assertNotNull(result);
 		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -3931,7 +3931,7 @@
 	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=48292
 	 */
 	public void test0529() throws JavaModelException {
-		IClassFile classFile = getClassFile("Converter" , "bins", "test0529", "A.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		IOrdinaryClassFile classFile = getClassFile("Converter" , "bins", "test0529", "A.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		assertNotNull(classFile);
 		assertNotNull(classFile.getSource());
 		IType type = classFile.getType();
@@ -3940,7 +3940,7 @@
 		assertEquals("wrong size", 1, memberTypes.length);
 		IType memberType = memberTypes[0];
 		ISourceRange sourceRange = memberType.getSourceRange();
-		ASTNode result = runConversion(AST.JLS8, classFile, sourceRange.getOffset() + sourceRange.getLength() / 2, false);
+		ASTNode result = runConversion(getJLS8(), classFile, sourceRange.getOffset() + sourceRange.getLength() / 2, false);
 		assertNotNull(result);
 		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -3961,7 +3961,7 @@
 	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=48292
 	 */
 	public void test0530() throws JavaModelException {
-		IClassFile classFile = getClassFile("Converter" , "bins", "test0530", "A.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		IOrdinaryClassFile classFile = getClassFile("Converter" , "bins", "test0530", "A.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		assertNotNull(classFile);
 		assertNotNull(classFile.getSource());
 		IType type = classFile.getType();
@@ -3969,7 +3969,7 @@
 		assertEquals("wrong size", 3, methods.length);
 		IMethod method = methods[2];
 		ISourceRange sourceRange = method.getSourceRange();
-		ASTNode result = runConversion(AST.JLS8, classFile, sourceRange.getOffset() + sourceRange.getLength() / 2, false);
+		ASTNode result = runConversion(getJLS8(), classFile, sourceRange.getOffset() + sourceRange.getLength() / 2, false);
 		assertNotNull(result);
 		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 2);
@@ -3990,7 +3990,7 @@
 	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=48292
 	 */
 	public void test0531() throws JavaModelException {
-		IClassFile classFile = getClassFile("Converter" , "bins", "test0531", "A.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		IOrdinaryClassFile classFile = getClassFile("Converter" , "bins", "test0531", "A.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		assertNotNull(classFile);
 		assertNotNull(classFile.getSource());
 		IType type = classFile.getType();
@@ -3998,7 +3998,7 @@
 		assertEquals("wrong size", 5, methods.length);
 		IMethod method = methods[3];
 		ISourceRange sourceRange = method.getSourceRange();
-		ASTNode result = runConversion(AST.JLS8, classFile, sourceRange.getOffset() + sourceRange.getLength() / 2, false);
+		ASTNode result = runConversion(getJLS8(), classFile, sourceRange.getOffset() + sourceRange.getLength() / 2, false);
 		assertNotNull(result);
 		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 
@@ -4073,13 +4073,13 @@
 		ISourceRange sourceRange = init.getSourceRange();
 		int position = sourceRange.getOffset() + sourceRange.getLength() / 2;
 
-		IClassFile classFile = getClassFile("Converter" , "bins", "test0532", "A.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		IOrdinaryClassFile classFile = getClassFile("Converter" , "bins", "test0532", "A.class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		assertNotNull(classFile);
 		assertNotNull(classFile.getSource());
 		type = classFile.getType();
 		initializers = type.getInitializers();
 		assertEquals("wrong size", 0, initializers.length);
-		ASTNode result = runConversion(AST.JLS8, classFile, position, false);
+		ASTNode result = runConversion(getJLS8(), classFile, position, false);
 		assertNotNull(result);
 		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 
@@ -4145,7 +4145,7 @@
 	public void test0533() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0533", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		final CompilationUnit unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$
 		ASTNode node = getASTNode(unit, 0, 0);
@@ -4170,7 +4170,7 @@
 	public void test0534() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0534", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		final CompilationUnit unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$
 		ASTNode node = getASTNode(unit, 0, 0);
@@ -4195,7 +4195,7 @@
 	public void test0535() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0535", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		final CompilationUnit unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$
 		ASTNode node = getASTNode(unit, 0, 0);
@@ -4218,7 +4218,7 @@
 	 */
 	public void test0536() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0536", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		assertNotNull("No compilation unit", result);
 	}
 	/**
@@ -4226,7 +4226,7 @@
 	 */
 	public void test0537a() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0537", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		assertNotNull("No compilation unit", result);
 	}
 	/**
@@ -4234,7 +4234,7 @@
 	 */
 	public void test0537b() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0537", "B.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		assertNotNull("No compilation unit", result);
 	}
 	/**
@@ -4242,7 +4242,7 @@
 	 */
 	public void test0537c() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0537", "C.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		assertNotNull("No compilation unit", result);
 	}
 	/**
@@ -4262,7 +4262,7 @@
 			CompilationUnit unit = sourceUnit.reconcile(AST.JLS2, false, null, null);
 			assertNotNull("No level 2 compilation unit", unit);
 			assertEquals("Compilation unit has wrong AST level (2)", AST.JLS2, unit.getAST().apiLevel());
-			// TODO improve test for AST.JLS8
+			// TODO improve test for getJLS8()
 		} finally {
 			sourceUnit.discardWorkingCopy();
 		}
@@ -4296,7 +4296,7 @@
 			sourceUnit.becomeWorkingCopy(null, null);
 			CompilationUnit unit = sourceUnit.reconcile(AST.JLS2, false, null, null);
 			assertNull("Unexpected compilation unit", unit);
-			// TODO improve test for AST.JLS8
+			// TODO improve test for getJLS8()
 		} finally {
 			sourceUnit.discardWorkingCopy();
 		}
@@ -4316,7 +4316,7 @@
 				"  Object field;\n" +
 				"}"
 			);
-			// TODO improve test for AST.JLS8
+			// TODO improve test for getJLS8()
 			CompilationUnit unit = sourceUnit.reconcile(AST.JLS2, false, null, null);
 			ASTNode node = getASTNode(unit, 0, 0);
 			assertNotNull("No node", node);
@@ -4340,7 +4340,7 @@
 		try {
 			ReconcilerTests.ProblemRequestor pbRequestor = new ReconcilerTests.ProblemRequestor();
 			sourceUnit.becomeWorkingCopy(pbRequestor, null);
-			// TODO improve test for AST.JLS8
+			// TODO improve test for getJLS8()
 			CompilationUnit unit = sourceUnit.reconcile(AST.JLS2, true/*force pb detection*/, null, null);
 			ASTNode node = getASTNode(unit, 0);
 			assertNotNull("No node", node);
@@ -4375,7 +4375,7 @@
 				"  }\n" +
 				"}"
 			);
-			// TODO improve test for AST.JLS8
+			// TODO improve test for getJLS8()
 			CompilationUnit unit = sourceUnit.reconcile(AST.JLS2, true/*force pb detection*/, null, null);
 			ASTNode node = getASTNode(unit, 0);
 			assertNotNull("No node", node);
@@ -4406,7 +4406,7 @@
 				"}"
 			);
 			sourceUnit.reconcile(ICompilationUnit.NO_AST, false/* don't force pb detection*/, null, null);
-			// TODO improve test for AST.JLS8
+			// TODO improve test for getJLS8()
 			CompilationUnit unit = sourceUnit.reconcile(AST.JLS2, true/*force pb detection*/, null, null);
 			ASTNode node = getASTNode(unit, 0);
 			assertNotNull("No node", node);
@@ -4434,7 +4434,7 @@
 				"  Object field;\n" +
 				"}"
 			);
-			// TODO improve test for AST.JLS8
+			// TODO improve test for getJLS8()
 			CompilationUnit unit = sourceUnit.reconcile(AST.JLS2, false, null, null);
 			assertEquals("Unexpected well known type", null, unit.getAST().resolveWellKnownType("void"));
 		} finally {
@@ -4447,7 +4447,7 @@
 	public void test0539() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0539", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		final CompilationUnit unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$
 		ASTNode node = getASTNode(unit, 0, 1, 0);
@@ -4486,7 +4486,7 @@
 		options.put(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_4);
 		options.put(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, JavaCore.VERSION_1_4);
 		options.put(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_1_4);
-		ASTNode result = runConversion(AST.JLS8, source, "Test.java", project, options, true); //$NON-NLS-1$
+		ASTNode result = runConversion(getJLS8(), source, "Test.java", project, options, true); //$NON-NLS-1$
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -4506,7 +4506,7 @@
 	 */
 	public void test0541() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0541", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		final CompilationUnit unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$
 		ASTNode node = getASTNode(unit, 0, 0);
@@ -4535,7 +4535,7 @@
 	public void test0542() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0542", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		final CompilationUnit unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$
 		ASTNode node = getASTNode(unit, 0, 0);
@@ -4703,7 +4703,7 @@
 	 */
 	public void test0543() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0543", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		final CompilationUnit unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$
 		unit.accept(new GetKeyVisitor());
@@ -4714,7 +4714,7 @@
 	 */
 	public void test0544() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0544", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		final CompilationUnit unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$
 		ASTNode node = getASTNode(unit, 0, 0);
@@ -4731,7 +4731,7 @@
 	 */
 	public void test0545() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0545", "First.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		CompilationUnit unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$
 		ASTNode node = getASTNode(unit, 0, 0);
@@ -4741,7 +4741,7 @@
 		assertEquals("Wrong key", "Ltest0545/First$Test;", typeBinding.getKey());
 
 		sourceUnit = getCompilationUnit("Converter", "src", "test0545", "Second.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		result = runConversion(AST.JLS8, sourceUnit, true);
+		result = runConversion(getJLS8(), sourceUnit, true);
 		unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$
 		node = getASTNode(unit, 0, 0);
@@ -4751,7 +4751,7 @@
 		assertEquals("Wrong key", "Ltest0545/Second$Test;", typeBinding.getKey());
 
 		sourceUnit = getCompilationUnit("Converter", "src", "test0545", "Third.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		result = runConversion(AST.JLS8, sourceUnit, true);
+		result = runConversion(getJLS8(), sourceUnit, true);
 		unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$
 		node = getASTNode(unit, 0, 0);
@@ -4762,7 +4762,7 @@
 
 
 		sourceUnit = getCompilationUnit("Converter", "src", "test0545", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		result = runConversion(AST.JLS8, sourceUnit, true);
+		result = runConversion(getJLS8(), sourceUnit, true);
 		unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$
 		node = getASTNode(unit, 0);
@@ -4777,7 +4777,7 @@
 	 */
 	public void test0546() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0546", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		final CompilationUnit unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$
 		ASTNode node = getASTNode(unit, 1, 0, 0);
@@ -4820,7 +4820,7 @@
 	 */
 	public void test0547() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0547", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		CompilationUnit unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$
 		ASTNode node = getASTNode(unit, 0, 0, 0);
@@ -4845,7 +4845,7 @@
 	 */
 	public void test0548() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0548", "PaletteStackEditPart.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
 	}
 
@@ -4854,7 +4854,7 @@
 	 */
 	public void test0549() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0549", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
 	}
 
@@ -4863,7 +4863,7 @@
 	 */
 	public void test0550() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0550", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
 	}
 
@@ -4873,7 +4873,7 @@
 	public void test0551() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0551", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		final IProblem[] problems = unit.getProblems();
@@ -4885,7 +4885,7 @@
 	public void test0552() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0552", "Test.java");
 		char[] source = sourceUnit.getSource().toCharArray();
-		CompilationUnit result = (CompilationUnit) runConversion(AST.JLS8, sourceUnit, true);
+		CompilationUnit result = (CompilationUnit) runConversion(getJLS8(), sourceUnit, true);
 		assertEquals("Got errors", 0, result.getProblems().length);
 		TypeDeclaration declaration = (TypeDeclaration) result.types().get(0);
 		Block body = declaration.getMethods()[0].getBody();
@@ -4916,7 +4916,7 @@
 	 */
 	public void test0553() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0553", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		final IProblem[] problems = unit.getProblems();
@@ -4939,7 +4939,7 @@
 	public void test0554() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0554", "B.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		final IProblem[] problems = unit.getProblems();
@@ -4968,7 +4968,7 @@
 	public void test0555() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0555", "B.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		final IProblem[] problems = unit.getProblems();
@@ -4997,7 +4997,7 @@
 	public void test0556() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0556", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		final IProblem[] problems = unit.getProblems();
@@ -5022,7 +5022,7 @@
 	public void test0557() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0557", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		final IProblem[] problems = unit.getProblems();
@@ -5066,7 +5066,7 @@
 	public void test0559() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0559", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		final IProblem[] problems = unit.getProblems();
@@ -5094,7 +5094,7 @@
 	public void test0560() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0560", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		final IProblem[] problems = unit.getProblems();
@@ -5122,7 +5122,7 @@
 	public void test0561() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0561", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		final IProblem[] problems = unit.getProblems();
@@ -5150,7 +5150,7 @@
 	public void test0562() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0562", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		final IProblem[] problems = unit.getProblems();
@@ -5178,7 +5178,7 @@
 	public void test0563() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0563", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		final IProblem[] problems = unit.getProblems();
@@ -5205,7 +5205,7 @@
 	public void test0564() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0564", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		final IProblem[] problems = unit.getProblems();
@@ -5232,7 +5232,7 @@
 	public void test0565() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0565", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		final IProblem[] problems = unit.getProblems();
@@ -5259,7 +5259,7 @@
 	public void test0566() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0566", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		final IProblem[] problems = unit.getProblems();
@@ -5275,7 +5275,7 @@
 	public void test0567() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0567", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		final IProblem[] problems = unit.getProblems();
@@ -5290,7 +5290,7 @@
 	 */
 	public void test0568() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0568", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
 	}
 
@@ -5299,7 +5299,7 @@
 	 */
 	public void test0570() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0570", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		final IProblem[] problems = unit.getProblems();
@@ -5310,7 +5310,7 @@
 	 * No binding when there is no unit name set
 	 */
 	public void test0571() throws JavaModelException {
-		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		ASTParser parser = ASTParser.newParser(getJLS8());
 		String source = "public class A {public boolean foo() {}}";
 		parser.setSource(source.toCharArray());
 		parser.setProject(getJavaProject("Converter"));
@@ -5327,7 +5327,7 @@
 	 * No binding when there is no unit name set
 	 */
 	public void test0572() throws JavaModelException {
-		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		ASTParser parser = ASTParser.newParser(getJLS8());
 		String source = "public class A {public boolean foo() {}}";
 		parser.setSource(source.toCharArray());
 		parser.setProject(getJavaProject("Converter"));
@@ -5347,7 +5347,7 @@
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0573", "Z.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		String source = sourceUnit.getSource();
 		int pos = source.indexOf("his.ba");
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, pos, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, pos, true);
 		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		ASTNode node = getASTNode(unit, 0, 0, 0);
@@ -5366,7 +5366,7 @@
 	 */
 	public void test0574() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0574", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		final IProblem[] problems = unit.getProblems();
@@ -5395,7 +5395,7 @@
 	 */
 	public void test0575() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0575", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		final IProblem[] problems = unit.getProblems();
@@ -5432,7 +5432,7 @@
 	 */
 	public void test0578() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0578", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		assertProblemsSize(unit, 0);
@@ -6435,7 +6435,7 @@
 	 */
 	public void test0607() throws JavaModelException {
 		final char[] source = "private static Category[] values = new Category[]{v1, v2, v3};".toCharArray();
-		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		ASTParser parser = ASTParser.newParser(getJLS8());
 		parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS);
 		parser.setSource(source);
 		ASTNode root = parser.createAST(null);
@@ -6506,7 +6506,7 @@
 	 */
 	public void test0610() throws JavaModelException {
 		final ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0610", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		final ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		final ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		assertProblemsSize(unit, 1, "The type Test is deprecated");
@@ -6742,7 +6742,7 @@
 				"}";
 			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
 			workingCopy.getBuffer().setContents(contents.toCharArray());
-			ASTNode node = runConversion(AST.JLS8, workingCopy, true);
+			ASTNode node = runConversion(getJLS8(), workingCopy, true);
 			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
 			CompilationUnit unit = (CompilationUnit) node;
 			assertProblemsSize(unit, 1, "Dead code");
@@ -6777,7 +6777,7 @@
 				"}";
 			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
 			workingCopy.getBuffer().setContents(contents.toCharArray());
-			ASTNode node = runConversion(AST.JLS8, workingCopy, true);			
+			ASTNode node = runConversion(getJLS8(), workingCopy, true);			
 			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
 			CompilationUnit unit = (CompilationUnit) node;
 			String expectedOutput = "Dead code";
@@ -6852,13 +6852,13 @@
 	public void test0619() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0619", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, false);
 		final CompilationUnit unit = (CompilationUnit) result;
 		assertProblemsSize(unit, 0);
 		ASTNode node = getASTNode(unit, 0, 0, 0);
 		assertNotNull("No node", node);
 		ASTNode statement = node;
-		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		ASTParser parser = ASTParser.newParser(getJLS8());
 		parser.setKind(ASTParser.K_STATEMENTS);
 		parser.setSource(source);
 		parser.setSourceRange(statement.getStartPosition(), statement.getLength());
@@ -7125,7 +7125,7 @@
 				"	public void foo(int arg) {}\n" +  //$NON-NLS-1$
 				"}").toCharArray(); //$NON-NLS-1$
 		IJavaProject project = getJavaProject("Converter"); //$NON-NLS-1$
-		ASTNode result = runConversion(AST.JLS8, source, "Test.java", project); //$NON-NLS-1$
+		ASTNode result = runConversion(getJLS8(), source, "Test.java", project); //$NON-NLS-1$
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7147,7 +7147,7 @@
 				"	public void foo(int arg) {}\n" +  //$NON-NLS-1$
 				"}").toCharArray(); //$NON-NLS-1$
 		IJavaProject project = getJavaProject("Converter"); //$NON-NLS-1$
-		ASTNode result = runConversion(AST.JLS8, source, "Object.java", project); //$NON-NLS-1$
+		ASTNode result = runConversion(getJLS8(), source, "Object.java", project); //$NON-NLS-1$
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7222,7 +7222,7 @@
 	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=125270
 	 */
 	public void test0628() throws JavaModelException {
-		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		ASTParser parser = ASTParser.newParser(getJLS8());
 		parser.setKind(ASTParser.K_EXPRESSION);
 		String source = "{\"red\", \"yellow\"}";
 		parser.setSource(source.toCharArray());
@@ -7243,7 +7243,7 @@
 	public void test0629() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0629", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true, true);
 		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
 		String expectedOutput =
@@ -7262,7 +7262,7 @@
 	 */
 	public void test0630() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0630", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true, true);
 		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
 		String expectedOutput =
@@ -7275,7 +7275,7 @@
 	public void test0631() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0631", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true, true);
 		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
 		String expectedOutput =
@@ -7336,7 +7336,7 @@
 	public void test0633() {
 		String src = "switch (state) {case 4:double M0,M1;}";
 		char[] source = src.toCharArray();
-		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		ASTParser parser = ASTParser.newParser(getJLS8());
 		parser.setKind (ASTParser.K_STATEMENTS);
 		parser.setSource (source);
 		ASTNode result = parser.createAST (null);
@@ -7380,7 +7380,7 @@
 					"}";
 
 			char[] source = src.toCharArray();
-			ASTParser parser = ASTParser.newParser(AST.JLS8);
+			ASTParser parser = ASTParser.newParser(getJLS8());
 			parser.setKind (ASTParser.K_COMPILATION_UNIT);
 			parser.setSource (source);
 			parser.setStatementsRecovery(true);
@@ -7575,11 +7575,11 @@
 	}
 	/*
 	 * Ensures that 2 type bindings (one from .class file, the other from attache source) are "isEqualTo(...)".
-	 * (regression test for bug 130317 ASTParser with IClassFile as source creates type bindings that are not isEqualTo(..) binary bindings)
+	 * (regression test for bug 130317 ASTParser with IOrdinaryClassFile as source creates type bindings that are not isEqualTo(..) binary bindings)
 	 */
 	public void test0641() throws JavaModelException {
 		// Integer from attached source
-		IClassFile classFile = getClassFile("Converter", getConverterJCLPath().toOSString(), "java.lang", "Integer.class");
+		IOrdinaryClassFile classFile = getClassFile("Converter", getConverterJCLPath().toOSString(), "java.lang", "Integer.class");
 		String source = classFile.getSource();
 		MarkerInfo markerInfo = new MarkerInfo(source);
 		markerInfo.astStarts = new int[] {source.indexOf("public")};
@@ -8092,7 +8092,7 @@
 	 */
 	public void test0653() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0653", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType());
 		CompilationUnit unit = (CompilationUnit) result;
 
@@ -8239,7 +8239,7 @@
 				"        int d;\n" +
 				"    }";
 		char[] source = src.toCharArray();
-		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		ASTParser parser = ASTParser.newParser(getJLS8());
 		parser.setKind (ASTParser.K_STATEMENTS);
 		parser.setStatementsRecovery(true);
 		parser.setSource (source);
@@ -8272,7 +8272,7 @@
 				"        int d;\n" +
 				"    }";
 		char[] source = src.toCharArray();
-		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		ASTParser parser = ASTParser.newParser(getJLS8());
 		parser.setKind (ASTParser.K_STATEMENTS);
 		parser.setStatementsRecovery(false);
 		parser.setSource (source);
@@ -8333,7 +8333,7 @@
 				"        int d;\n" +
 				"    }";
 		char[] source = src.toCharArray();
-		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		ASTParser parser = ASTParser.newParser(getJLS8());
 		parser.setKind (ASTParser.K_STATEMENTS);
 		parser.setStatementsRecovery(true);
 		parser.setSource (source);
@@ -8359,7 +8359,7 @@
 	public void test0659() throws CoreException, JavaModelException {
 		IJavaProject javaProject = createJavaProject("P659", new String[] { "src" }, new String[0], "bin");
 		try {
-			ASTParser parser = ASTParser.newParser(AST.JLS8);
+			ASTParser parser = ASTParser.newParser(getJLS8());
 			parser.setKind(ASTParser.K_COMPILATION_UNIT);
 			parser.setStatementsRecovery(true);
 			parser.setBindingsRecovery(true);
@@ -8961,7 +8961,7 @@
 	 */
 	public void test0669() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0669", "UIPerformChangeOperation.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true, true);
 		assertNotNull(result);
 	}
 
@@ -8983,7 +8983,7 @@
 				"}";
 			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
 			workingCopy.getBuffer().setContents(contents);
-			ASTNode node = runConversion(AST.JLS8, workingCopy, true, true, true);
+			ASTNode node = runConversion(getJLS8(), workingCopy, true, true, true);
 			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
 			CompilationUnit unit = (CompilationUnit) node;
 			String expectedError =
@@ -9026,7 +9026,7 @@
 				"}";
 			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
 			workingCopy.getBuffer().setContents(contents);
-			ASTNode node = runConversion(AST.JLS8, workingCopy, true, true, true);
+			ASTNode node = runConversion(getJLS8(), workingCopy, true, true, true);
 			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
 			CompilationUnit unit = (CompilationUnit) node;
 			String expectedError =
@@ -9096,7 +9096,7 @@
 				"}";
 			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
 			workingCopy.getBuffer().setContents(contents);
-			ASTNode node = runConversion(AST.JLS8, workingCopy, true, true, true);
+			ASTNode node = runConversion(getJLS8(), workingCopy, true, true, true);
 			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
 			CompilationUnit unit = (CompilationUnit) node;
 			String expectedError =
@@ -9188,7 +9188,7 @@
 				"}";
 			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
 			workingCopy.getBuffer().setContents(contents);
-			ASTNode node = runConversion(AST.JLS8, workingCopy, true, true, true);
+			ASTNode node = runConversion(getJLS8(), workingCopy, true, true, true);
 			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
 			CompilationUnit unit = (CompilationUnit) node;
 			assertTrue("no binding recovery", unit.getAST().hasBindingsRecovery());
@@ -9254,7 +9254,7 @@
 				"}";
 			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
 			workingCopy.getBuffer().setContents(contents);
-			ASTNode node = runConversion(AST.JLS8, workingCopy, true, true, true);
+			ASTNode node = runConversion(getJLS8(), workingCopy, true, true, true);
 			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
 			CompilationUnit unit = (CompilationUnit) node;
 			assertProblemsSize(unit, 0);
@@ -9294,7 +9294,7 @@
 				"}";
 			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
 			workingCopy.getBuffer().setContents(contents);
-			ASTNode node = runConversion(AST.JLS8, workingCopy, true, true, true);
+			ASTNode node = runConversion(getJLS8(), workingCopy, true, true, true);
 			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
 			CompilationUnit unit = (CompilationUnit) node;
 			String expectedError = "Constructor call must be the first statement in a constructor";
@@ -9321,7 +9321,7 @@
 	 */
 	public void test0676() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0676", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode node = runConversion(AST.JLS8, sourceUnit, true, true, true);
+		ASTNode node = runConversion(getJLS8(), sourceUnit, true, true, true);
 		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
 		CompilationUnit unit = (CompilationUnit) node;
 		assertTrue("no binding recovery", unit.getAST().hasBindingsRecovery());
@@ -9375,7 +9375,7 @@
 	 */
 	public void test0677() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0677", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode node = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode node = runConversion(getJLS8(), sourceUnit, true);
 		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType()); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) node;
 		node = getASTNode(unit, 0);
@@ -9409,7 +9409,7 @@
 				"}";
 			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
 			workingCopy.getBuffer().setContents(contents.toCharArray());
-			ASTNode node = runConversion(AST.JLS8, workingCopy, true);			
+			ASTNode node = runConversion(getJLS8(), workingCopy, true);			
 			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
 			CompilationUnit unit = (CompilationUnit) node;
 			String expectedOutput = "Dead code";
@@ -9495,7 +9495,7 @@
 	 */
 	public void test0680() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0680", "SAMPLE_UTF8.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode node = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode node = runConversion(getJLS8(), sourceUnit, true);
 		assertTrue("Not a compilation unit", node.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) node;
 		assertProblemsSize(compilationUnit, 0);
@@ -9512,7 +9512,7 @@
 	 */
 	public void test0681() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "Sample", "Sample.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode node = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode node = runConversion(getJLS8(), sourceUnit, true);
 		assertTrue("Not a compilation unit", node.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) node;
 		assertProblemsSize(compilationUnit, 0);
@@ -9527,7 +9527,7 @@
 	 */
 	public void test0682() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0682", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode node = runConversion(AST.JLS8, sourceUnit, true, true);
+		ASTNode node = runConversion(getJLS8(), sourceUnit, true, true);
 		assertTrue("Not a compilation unit", node.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) node;
 		assertProblemsSize(
@@ -9555,7 +9555,7 @@
 	 */
 	public void test0683() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0683", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode node = runConversion(AST.JLS8, sourceUnit, true, true);
+		ASTNode node = runConversion(getJLS8(), sourceUnit, true, true);
 		assertTrue("Not a compilation unit", node.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) node;
 		assertProblemsSize(unit, 0);
@@ -9572,7 +9572,7 @@
 		ArrayCreation arrayCreation = (ArrayCreation) node;
 		ArrayType arrayType = arrayCreation.getType();
 		checkSourceRange(arrayType, "String[0][b[10]][]", sourceUnit.getSource());
-		if (this.ast.apiLevel() < AST.JLS8) {
+		if (this.ast.apiLevel() < getJLS8()) {
 			node = componentType(arrayType);
 			assertEquals("Not an array type", ASTNode.ARRAY_TYPE, node.getNodeType());
 			arrayType = (ArrayType)node;
@@ -9592,7 +9592,7 @@
 	 */
 	public void test0684() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0684", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode node = runConversion(AST.JLS8, sourceUnit, true, true);
+		ASTNode node = runConversion(getJLS8(), sourceUnit, true, true);
 		assertTrue("Not a compilation unit", node.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) node;
 		assertProblemsSize(unit, 0);
@@ -9617,7 +9617,7 @@
 	 */
 	public void test0685() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0685", "C.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ASTNode node = runConversion(AST.JLS8, sourceUnit, true, true);
+		ASTNode node = runConversion(getJLS8(), sourceUnit, true, true);
 		assertTrue("Not a compilation unit", node.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) node;
 		assertProblemsSize(unit, 0);
@@ -9744,7 +9744,7 @@
 		IField field = type.getField("i");
 		assertNotNull("No field", field);
 		ISourceRange sourceRange = field.getNameRange();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, false);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, false);
 		assertNotNull(result);
 	}
 	/**
@@ -9769,7 +9769,7 @@
 			newClasspathEntries.toArray(newClasspath);
 			project.setRawClasspath(newClasspath, null);
 			ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0689", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-			ASTNode result = runConversion(AST.JLS8, sourceUnit, true, true);
+			ASTNode result = runConversion(getJLS8(), sourceUnit, true, true);
 			assertNotNull(result);
 			ITypeBinding typeBinding = result.getAST().resolveWellKnownType("java.lang.Boolean");
 			assertNull("Should be null", typeBinding);
@@ -9799,7 +9799,7 @@
 			newClasspathEntries.toArray(newClasspath);
 			project.setRawClasspath(newClasspath, null);
 			ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0690", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-			ASTNode result = runConversion(AST.JLS8, sourceUnit, true, true, true);
+			ASTNode result = runConversion(getJLS8(), sourceUnit, true, true, true);
 			assertNotNull(result);
 			ITypeBinding typeBinding = result.getAST().resolveWellKnownType("java.lang.Boolean");
 			assertNull("Should be null", typeBinding);
@@ -9816,7 +9816,7 @@
 		IType type = unit.getType("X");
 		IMethod method = type.getMethod("foo", new String[0]);
 		
-		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		ASTParser parser = ASTParser.newParser(getJLS8());
 		parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS);
 		parser.setSource(unit);
 		Hashtable options = JavaCore.getOptions();
@@ -9861,7 +9861,7 @@
 		ICompilationUnit unit = getCompilationUnit("Converter" , "src", "test0693", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		ICompilationUnit unit2 = getCompilationUnit("Converter" , "src", "test0693", "Y.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		
-		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		ASTParser parser = ASTParser.newParser(getJLS8());
 		ASTRequestor requestor = new ASTRequestor() {};
 		ICompilationUnit[] cus = new ICompilationUnit[2];
 		cus[0] = unit;
@@ -9882,7 +9882,7 @@
 		ICompilationUnit unit = getCompilationUnit("Converter" , "src", "test0694", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		ICompilationUnit unit2 = getCompilationUnit("Converter" , "src", "test0694", "Y.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		
-		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		ASTParser parser = ASTParser.newParser(getJLS8());
 		ASTRequestor requestor = new ASTRequestor() {};
 		ICompilationUnit[] cus = new ICompilationUnit[2];
 		cus[0] = unit;
@@ -9902,7 +9902,7 @@
 	public void test0695() throws JavaModelException {
 		ICompilationUnit unit = getCompilationUnit("Converter" , "src", "test0695", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 
-		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		ASTParser parser = ASTParser.newParser(getJLS8());
 		parser.setKind(ASTParser.K_COMPILATION_UNIT);
 		parser.setSource(unit.getSource().toCharArray());
 		Map options = JavaCore.getOptions();
@@ -9927,7 +9927,7 @@
 	public void test0696() throws JavaModelException {
 		ICompilationUnit unit = getCompilationUnit("Converter" , "src", "test0696", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 
-		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		ASTParser parser = ASTParser.newParser(getJLS8());
 		parser.setKind(ASTParser.K_COMPILATION_UNIT);
 		parser.setSource(unit.getSource().toCharArray());
 		Map options = JavaCore.getOptions();
@@ -10045,7 +10045,7 @@
 			VariableDeclarationFragment fragment = (VariableDeclarationFragment) buildAST(contents, workingCopy, false, true, true);
 			IVariableBinding variableBinding = fragment.resolveBinding();
 			final String key = variableBinding.getKey();
-			ASTParser parser = ASTParser.newParser(AST.JLS8);
+			ASTParser parser = ASTParser.newParser(getJLS8());
 			parser.setProject(workingCopy.getJavaProject());
 			parser.setResolveBindings(true);
 			parser.setKind(ASTParser.K_COMPILATION_UNIT);
@@ -10087,7 +10087,7 @@
 			VariableDeclarationFragment fragment = (VariableDeclarationFragment) buildAST(contents, workingCopy, false, true, true);
 			IVariableBinding variableBinding = fragment.resolveBinding();
 			final String key = variableBinding.getKey();
-			ASTParser parser = ASTParser.newParser(AST.JLS8);
+			ASTParser parser = ASTParser.newParser(getJLS8());
 			parser.setProject(workingCopy.getJavaProject());
 			parser.setResolveBindings(true);
 			parser.setKind(ASTParser.K_COMPILATION_UNIT);
@@ -10130,7 +10130,7 @@
 			VariableDeclarationFragment fragment = (VariableDeclarationFragment) buildAST(contents, workingCopy, false, true, true);
 			IVariableBinding variableBinding = fragment.resolveBinding();
 			final String key = variableBinding.getKey();
-			ASTParser parser = ASTParser.newParser(AST.JLS8);
+			ASTParser parser = ASTParser.newParser(getJLS8());
 			parser.setProject(workingCopy.getJavaProject());
 			parser.setResolveBindings(true);
 			parser.setKind(ASTParser.K_COMPILATION_UNIT);
@@ -10161,7 +10161,7 @@
 		final char[] source = ("void foo() {\n" + 
 				"	Integer I = new ${cursor}\n" +
 				"}").toCharArray();
-		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		ASTParser parser = ASTParser.newParser(getJLS8());
 		parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS);
 		parser.setStatementsRecovery(true);
 		parser.setSource(source);
@@ -10185,7 +10185,7 @@
 				"		Integer I = new ${cursor}\n" + 
 				"	}\n" + 
 				"}").toCharArray();
-		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		ASTParser parser = ASTParser.newParser(getJLS8());
 		parser.setKind(ASTParser.K_COMPILATION_UNIT);
 		parser.setStatementsRecovery(true);
 		parser.setSource(source);
@@ -10207,7 +10207,7 @@
 		final char[] source = ("{\n" + 
 				"	Integer I = new ${cursor}\n" +
 				"}").toCharArray();
-		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		ASTParser parser = ASTParser.newParser(getJLS8());
 		parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS);
 		parser.setStatementsRecovery(true);
 		parser.setSource(source);
@@ -10232,7 +10232,7 @@
 				"{\n" + 
 				"	Integer I = new ${cursor}\n" +
 				"}").toCharArray();
-		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		ASTParser parser = ASTParser.newParser(getJLS8());
 		parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS);
 		parser.setStatementsRecovery(true);
 		parser.setSource(source);
@@ -10261,7 +10261,7 @@
 				"		Integer I = new ${cursor}\n" + 
 				"	};\"\n" + 
 				"}").toCharArray();
-		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		ASTParser parser = ASTParser.newParser(getJLS8());
 		parser.setKind(ASTParser.K_COMPILATION_UNIT);
 		parser.setStatementsRecovery(true);
 		parser.setSource(source);
@@ -10278,7 +10278,7 @@
 		final char[] source = ("Integer i = new Integer() {\n" + 
 				"	Integer I = new ${cursor}\n" + 
 				"};").toCharArray();
-		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		ASTParser parser = ASTParser.newParser(getJLS8());
 		parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS);
 		parser.setStatementsRecovery(true);
 		parser.setSource(source);
@@ -10292,7 +10292,7 @@
 	 */
 	public void test0708() throws JavaModelException {
 		final char[] source = ("System.out.println()\nint i;\n").toCharArray();
-		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		ASTParser parser = ASTParser.newParser(getJLS8());
 		parser.setKind(ASTParser.K_STATEMENTS);
 		parser.setStatementsRecovery(true);
 		parser.setSource(source);
@@ -10337,7 +10337,7 @@
 	 */
 	public void test0710() throws JavaModelException {
 		final char[] source = (";").toCharArray();
-		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		ASTParser parser = ASTParser.newParser(getJLS8());
 		parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS);
 		parser.setStatementsRecovery(true);
 		parser.setSource(source);
@@ -10352,7 +10352,7 @@
 	 */
 	public void test0711() throws JavaModelException {
 		final char[] source = (";void foo() {}").toCharArray();
-		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		ASTParser parser = ASTParser.newParser(getJLS8());
 		parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS);
 		parser.setStatementsRecovery(true);
 		parser.setSource(source);
@@ -10367,7 +10367,7 @@
 	 */
 	public void test0712() throws JavaModelException {
 		final char[] source = (";void foo() {};").toCharArray();
-		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		ASTParser parser = ASTParser.newParser(getJLS8());
 		parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS);
 		parser.setStatementsRecovery(true);
 		parser.setSource(source);
@@ -10390,7 +10390,7 @@
 				"      if (condition) appendAndExecute(new AddCommand(...));\n" + 
 				"    }\n" + 
 				"  }").toCharArray();
-		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		ASTParser parser = ASTParser.newParser(getJLS8());
 		parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS);
 		parser.setStatementsRecovery(false);
 		parser.setSource(source);
@@ -10439,7 +10439,7 @@
 				"      }\n" + 
 				"    }\n" + 
 				"  }").toCharArray();
-		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		ASTParser parser = ASTParser.newParser(getJLS8());
 		parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS);
 		parser.setStatementsRecovery(false);
 		parser.setSource(source);
@@ -10453,7 +10453,7 @@
 	 */
 	public void test0715() throws JavaModelException {
 		final char[] source = ("System.out.println()\nint i;\n").toCharArray();
-		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		ASTParser parser = ASTParser.newParser(getJLS8());
 		parser.setKind(ASTParser.K_STATEMENTS);
 		parser.setStatementsRecovery(true);
 		parser.setIgnoreMethodBodies(true);
@@ -10470,7 +10470,7 @@
 	public void test0716() {
 		String src = "switch (state) {case 4:double M0,M1;}";
 		char[] source = src.toCharArray();
-		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		ASTParser parser = ASTParser.newParser(getJLS8());
 		parser.setKind (ASTParser.K_STATEMENTS);
 		parser.setIgnoreMethodBodies(true);
 		parser.setSource (source);
@@ -10502,7 +10502,7 @@
 				"      if (condition) appendAndExecute(new AddCommand());\n" + 
 				"    }\n" + 
 				"  }").toCharArray();
-		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		ASTParser parser = ASTParser.newParser(getJLS8());
 		parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS);
 		parser.setStatementsRecovery(false);
 		parser.setIgnoreMethodBodies(true);
@@ -10615,7 +10615,7 @@
 	public void test0720() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0720", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		char[] source = sourceUnit.getSource().toCharArray();
-		ASTNode result = runConversion(AST.JLS8, sourceUnit, true);
+		ASTNode result = runConversion(getJLS8(), sourceUnit, true);
 		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$
@@ -10696,7 +10696,7 @@
 	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=347396
 	 */
 	public void test0723() {
-		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		ASTParser parser = ASTParser.newParser(getJLS8());
 		parser.setKind (ASTParser.K_STATEMENTS);
 		String src = "int j;\nfor {};\nj=1000;";
 		char[] source = src.toCharArray();
@@ -10718,7 +10718,7 @@
 	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=347396
 	 */
 	public void test0724() {
-		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		ASTParser parser = ASTParser.newParser(getJLS8());
 		parser.setKind (ASTParser.K_COMPILATION_UNIT);
 		String src = "public class X { void foo() {int j;\nfor {};\nj=1000;}}";
 		char[] source = src.toCharArray();
@@ -10797,8 +10797,8 @@
 				"  public static final native long /*int*/ realpath(byte[] path, byte[] realPath);\n" +
 				"}"
 			);
-			// TODO improve test for AST.JLS8
-			CompilationUnit unit = sourceUnit.reconcile(AST.JLS8, false, null, null);
+			// TODO improve test for getJLS8()
+			CompilationUnit unit = sourceUnit.reconcile(getJLS8(), false, null, null);
 			assertEquals("Unexpected well known type", null, unit.getAST().resolveWellKnownType("void"));
 		} finally {
 			sourceUnit.discardWorkingCopy();
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTMatcherTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTMatcherTest.java
index aa7c155..4450153 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTMatcherTest.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTMatcherTest.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2016 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
@@ -48,7 +48,7 @@
 				suite.addTest(new ASTMatcherTest(methods[i].getName(), AST.JLS2));
 				suite.addTest(new ASTMatcherTest(methods[i].getName(), JLS3_INTERNAL));
 				// https://bugs.eclipse.org/bugs/show_bug.cgi?id=391898
-				suite.addTest(new ASTMatcherTest(methods[i].getName(), AST.JLS8));
+				suite.addTest(new ASTMatcherTest(methods[i].getName(), getJLS8()));
 			}
 		}
 		return suite;
@@ -119,6 +119,13 @@
 	}
 
 	/**
+	 * @deprecated
+	 */
+	static int getJLS8() {
+		return AST.JLS8;
+	}
+
+	/**
 	 * @deprecated (not really - just suppressing the warnings
 	 * that come from testing Javadoc.getComment())
 	 *
@@ -140,7 +147,7 @@
 		this.S1 = this.ast.newContinueStatement();
 		this.S2 = this.ast.newBreakStatement();
 		this.B1 = this.ast.newBlock();
-		if (this.ast.apiLevel() >= AST.JLS8) {
+		if (this.ast.apiLevel() >= getJLS8()) {
 			this.R1 = this.ast.newSimpleType(this.ast.newSimpleName("XYZ"));
 			this.Q1 = this.ast.newSimpleName("XYZ");
 		}
@@ -242,7 +249,7 @@
 			this.EC2 = this.ast.newEnumConstantDeclaration();
 			this.EC2.setName(this.ast.newSimpleName("G")); //$NON-NLS-1$
 		}
-		if (this.ast.apiLevel() >= AST.JLS8) {
+		if (this.ast.apiLevel() >= getJLS8()) {
 			this.T3 = this.ast.newSimpleType(this.ast.newSimpleName("U")); //$NON-NLS-1$
 			this.T4 = this.ast.newSimpleType(this.ast.newSimpleName("V")); //$NON-NLS-1$
 		}
@@ -721,7 +728,7 @@
 
 	/** @deprecated using deprecated code */
 	public void testNameQualifiedType() {
-		if (this.ast.apiLevel() < AST.JLS8) {
+		if (this.ast.apiLevel() < getJLS8()) {
 			return;
 		}
 		Type x1 = this.ast.newNameQualifiedType(this.ast.newQualifiedName(this.N2, this.N3), this.N1);
@@ -881,7 +888,7 @@
 	}
 	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399794
 	public void testCreationReference() {
-		if (this.ast.apiLevel() < AST.JLS8) {
+		if (this.ast.apiLevel() < getJLS8()) {
 			return;
 		}
 		CreationReference x1 = this.ast.newCreationReference();
@@ -946,7 +953,7 @@
 	}
 	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399794
 	public void testExpressionMethodReference() {
-		if (this.ast.apiLevel() < AST.JLS8) {
+		if (this.ast.apiLevel() < getJLS8()) {
 			return;
 		}
 		ExpressionMethodReference x1 = this.ast.newExpressionMethodReference();
@@ -1063,14 +1070,14 @@
 			x1.typeParameters().add(this.TP1);
 			x1.typeParameters().add(this.TP2);
 			x1.setReturnType2(this.T1);
-			if (this.ast.apiLevel() >= AST.JLS8) {
+			if (this.ast.apiLevel() >= getJLS8()) {
 				x1.setReceiverType(this.R1);
 			}
 		}
 		x1.setName(this.N1);
 		x1.parameters().add(this.V1);
 		x1.parameters().add(this.V2);
-		if (this.ast.apiLevel() < AST.JLS8) {
+		if (this.ast.apiLevel() < getJLS8()) {
 			x1.thrownExceptions().add(this.N2);
 			x1.thrownExceptions().add(this.N3);			
 		} else {
@@ -1188,7 +1195,7 @@
 		basicMatch(x1);
 	}
 	public void testSuperMethodReference() {
-		if (this.ast.apiLevel() < AST.JLS8) {
+		if (this.ast.apiLevel() < getJLS8()) {
 			return;
 		}
 		SuperMethodReference x1 = this.ast.newSuperMethodReference();
@@ -1416,7 +1423,7 @@
 
 	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=391898
 	public void testSingleVariableDeclarationVarargsAnnotation() {
-		if (this.ast.apiLevel() < AST.JLS8) {
+		if (this.ast.apiLevel() < getJLS8()) {
 			return;
 		}
 		SingleVariableDeclaration x1 = this.ast.newSingleVariableDeclaration();
@@ -1429,7 +1436,7 @@
 	
 	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=395886
 	public void testQualifiedTypeAnnotation() {
-		if (this.ast.apiLevel() < AST.JLS8) {
+		if (this.ast.apiLevel() < getJLS8()) {
 			return;
 		}
 		QualifiedType x1 = this.ast.newQualifiedType(this.T1, this.N1);
@@ -1441,7 +1448,7 @@
 	
 	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=395886
 	public void testParameterizedQualifiedTypeAnnotation() {
-		if (this.ast.apiLevel() < AST.JLS8) {
+		if (this.ast.apiLevel() < getJLS8()) {
 			return;
 		}
 		QualifiedType qualifiedType = this.ast.newQualifiedType(this.T1, this.N1); 
@@ -1458,7 +1465,7 @@
 	
 	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399768
 	public void testTypeAnnotations1() {	
-		if (this.ast.apiLevel() < AST.JLS8) {
+		if (this.ast.apiLevel() < getJLS8()) {
 			return;
 		}
 		// simpleType with Annotations
@@ -1469,7 +1476,7 @@
 
 	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399768
 	public void testTypeAnnotations2() {		
-		if (this.ast.apiLevel() < AST.JLS8) {
+		if (this.ast.apiLevel() < getJLS8()) {
 			return;
 		}
   		// Type arguments at parameterized types
@@ -1484,7 +1491,7 @@
 
 	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399768
 	public void testTypeAnnotations3() {		
-		if (this.ast.apiLevel() < AST.JLS8) {
+		if (this.ast.apiLevel() < getJLS8()) {
 			return;
 		}
 		// type arguments in constructor invocation
@@ -1497,7 +1504,7 @@
 
 	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399768
 	public void testTypeAnnotations4() {		
-		if (this.ast.apiLevel() < AST.JLS8) {
+		if (this.ast.apiLevel() < getJLS8()) {
 			return;
 		}
 		// annotated simple type at class inheritance
@@ -1511,7 +1518,7 @@
 
 	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399768
 	public void testTypeAnnotations5() {	
-		if (this.ast.apiLevel() < AST.JLS8) {
+		if (this.ast.apiLevel() < getJLS8()) {
 			return;
 		}
 		// constructor invocation results
@@ -1524,7 +1531,7 @@
 
 	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399768
 	public void testTypeAnnotations6() {	
-		if (this.ast.apiLevel() < AST.JLS8) {
+		if (this.ast.apiLevel() < getJLS8()) {
 			return;
 		}
 		// simple type in cast expression
@@ -1537,7 +1544,7 @@
 
 	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399768
 	public void testTypeAnnotations7() {		
-		if (this.ast.apiLevel() < AST.JLS8) {
+		if (this.ast.apiLevel() < getJLS8()) {
 			return;
 		}
 		// simple type type tests
@@ -1551,7 +1558,7 @@
 
 	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399768
 	public void testTypeAnnotations8() {	
-		if (this.ast.apiLevel() < AST.JLS8) {
+		if (this.ast.apiLevel() < getJLS8()) {
 			return;
 		}
 		// annotations on wildcard type
@@ -1564,7 +1571,7 @@
 
 	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399768
 	public void testTypeAnnotations9() {		
-		if (this.ast.apiLevel() < AST.JLS8) {
+		if (this.ast.apiLevel() < getJLS8()) {
 			return;
 		}
 		// annotations on constructor declaration - implying on the object returned.
@@ -1577,7 +1584,7 @@
 
 	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399768
 	public void testTypeAnnotations10() {		
-		if (this.ast.apiLevel() < AST.JLS8) {
+		if (this.ast.apiLevel() < getJLS8()) {
 			return;
 		}
 		// annotations on constructor declaration - implying on the object returned.
@@ -1592,7 +1599,7 @@
 
 	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399768
 	public void testTypeAnnotations11() {	
-		if (this.ast.apiLevel() < AST.JLS8) {
+		if (this.ast.apiLevel() < getJLS8()) {
 			return;
 		}
 		// annotated simple type at class inheritance
@@ -1607,7 +1614,7 @@
 
 	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399768
 	public void testTypeAnnotations12() {
-		if (this.ast.apiLevel() < AST.JLS8) {
+		if (this.ast.apiLevel() < getJLS8()) {
 			return;
 		}
 		VariableDeclarationFragment x1 = this.ast.newVariableDeclarationFragment();
@@ -1630,7 +1637,7 @@
 
 	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399794
 	public void testTypeMethodReference() {
-		if (this.ast.apiLevel() < AST.JLS8) {
+		if (this.ast.apiLevel() < getJLS8()) {
 			return;
 		}
 		TypeMethodReference x1 = this.ast.newTypeMethodReference();
@@ -1641,7 +1648,7 @@
 	
 	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399793
 	public void testLambdaExpressions1() {
-		if (this.ast.apiLevel() < AST.JLS8) {
+		if (this.ast.apiLevel() < getJLS8()) {
 			return;
 		}
 		LambdaExpression x1 = this.ast.newLambdaExpression();
@@ -1654,7 +1661,7 @@
 
 	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399793
 	public void testLambdaExpressions2() {
-		if (this.ast.apiLevel() < AST.JLS8) {
+		if (this.ast.apiLevel() < getJLS8()) {
 			return;
 		}
 		LambdaExpression x1 = this.ast.newLambdaExpression();
@@ -1664,7 +1671,7 @@
 
 	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399793
 	public void testLambdaExpressions3() {
-		if (this.ast.apiLevel() < AST.JLS8) {
+		if (this.ast.apiLevel() < getJLS8()) {
 			return;
 		}
 		LambdaExpression x1 = this.ast.newLambdaExpression();
@@ -1674,7 +1681,7 @@
 
 	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399793
 	public void testLambdaExpressions4() {
-		if (this.ast.apiLevel() < AST.JLS8) {
+		if (this.ast.apiLevel() < getJLS8()) {
 			return;
 		}
 		LambdaExpression x1 = this.ast.newLambdaExpression();
@@ -1688,7 +1695,7 @@
 		basicMatch(x1);
 	}
 	public void testIntersectionType() {
-		if (this.ast.apiLevel() < AST.JLS8) {
+		if (this.ast.apiLevel() < getJLS8()) {
 			return;
 		}
 		IntersectionType x1 = this.ast.newIntersectionType();
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTModelBridgeTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTModelBridgeTests.java
index 5f32640..28a12e2 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTModelBridgeTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTModelBridgeTests.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2015 IBM Corporation and others.
+ * Copyright (c) 2004, 2017 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
@@ -79,6 +79,13 @@
 		);
 	}
 
+	/**
+	 * @deprecated
+	 */
+	static int getJLS8() {
+		return AST.JLS8;
+	}
+
 	/*
 	 * Removes the marker comments "*start*" and "*end*" from the given contents,
 	 * builds an AST from the resulting source, and returns the AST node that was delimited
@@ -378,7 +385,7 @@
 	 * Ensures that the IJavaElement of an IBinding representing an annotation of a binary member type is correct.
 	 */
 	public void testAnnotation8() throws Exception {
-		IClassFile classFile = getClassFile("P", "/P/lib.jar", "p", "Q.class");
+		IOrdinaryClassFile classFile = getClassFile("P", "/P/lib.jar", "p", "Q.class");
 		ASTNode node = buildAST(classFile);
 		IBinding binding = ((Annotation) node).resolveAnnotationBinding();
 		IJavaElement element = binding.getJavaElement();
@@ -532,7 +539,7 @@
 		this.workingCopies = new ICompilationUnit[2];
 		this.workingCopies[1] = getWorkingCopy("/P/src/Bar.java", barSource, this.wcOwner);
 		
-		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		ASTParser parser = ASTParser.newParser(getJLS8());
 		parser.setProject(getJavaProject("P"));
 		parser.setSource(this.workingCopies[1]);
 		parser.setResolveBindings(true);
@@ -634,7 +641,7 @@
 	 * (regression test for bug 91445 IMethodBinding.getJavaElement() returns an "unopen" IMethod)
 	 */
 	public void testBinaryMethod() throws JavaModelException {
-		IClassFile classFile = getClassFile("P", getExternalJCLPathString("1.5"), "java.lang", "Enum.class");
+		IOrdinaryClassFile classFile = getClassFile("P", getExternalJCLPathString("1.5"), "java.lang", "Enum.class");
 		String source = classFile.getSource();
 		MarkerInfo markerInfo = new MarkerInfo(source);
 		markerInfo.astStarts = new int[] {source.indexOf("protected Enum")};
@@ -654,7 +661,7 @@
 	 * (regression test for bug 119249 codeResolve, search, etc. don't work on constructor of binary inner class)
 	 */
 	public void testBinaryMemberTypeConstructor() throws JavaModelException {
-		IClassFile classFile = getClassFile("P", "/P/lib.jar", "p", "W$Member.class");
+		IOrdinaryClassFile classFile = getClassFile("P", "/P/lib.jar", "p", "W$Member.class");
 		ASTNode node = buildAST(classFile);
 		IBinding binding = ((MethodDeclaration) node).resolveBinding();
 		IJavaElement element = binding.getJavaElement();
@@ -669,7 +676,7 @@
 	 * Ensures that the IJavaElement of an IBinding representing a type coming from a class file is correct.
 	 */
 	public void testBinaryType() throws JavaModelException {
-		IClassFile classFile = getClassFile("P", getExternalJCLPathString("1.5"), "java.lang", "String.class");
+		IOrdinaryClassFile classFile = getClassFile("P", getExternalJCLPathString("1.5"), "java.lang", "String.class");
 		String source = classFile.getSource();
 		MarkerInfo markerInfo = new MarkerInfo(source);
 		markerInfo.astStarts = new int[] {source.indexOf("public")};
@@ -690,7 +697,7 @@
 	 * (regression test for bug 136016 [refactoring] CCE during Use Supertype refactoring)
 	 */
 	public void testBinaryType2() throws CoreException {
-		IClassFile classFile = getClassFile("P", "lib.jar", "p", "ABC.class"); // class with no references
+		IOrdinaryClassFile classFile = getClassFile("P", "lib.jar", "p", "ABC.class"); // class with no references
 
 		// ensure classfile is open
 		classFile.open(null);
@@ -763,7 +770,7 @@
 	 * (regression test for bug 100636 [model] Can't find overriden methods of protected nonstatic inner class.)
 	 */
 	public void testBinaryMemberTypeFromAnonymousClassFile1() throws JavaModelException {
-		IClassFile classFile = getClassFile("P", "/P/lib.jar", "p", "Z$1.class");
+		IOrdinaryClassFile classFile = getClassFile("P", "/P/lib.jar", "p", "Z$1.class");
 		ASTNode node = buildAST(classFile);
 		IBinding binding = ((TypeDeclaration) node).resolveBinding();
 		IJavaElement element = binding.getJavaElement();
@@ -779,7 +786,7 @@
 	 * (regression test for bug 100636 [model] Can't find overriden methods of protected nonstatic inner class.)
 	 */
 	public void testBinaryMemberTypeFromAnonymousClassFile2() throws JavaModelException {
-		IClassFile classFile = getClassFile("P", "/P/lib.jar", "", "Z$1.class");
+		IOrdinaryClassFile classFile = getClassFile("P", "/P/lib.jar", "", "Z$1.class");
 		ASTNode node = buildAST(classFile);
 		IBinding binding = ((TypeDeclaration) node).resolveBinding();
 		IJavaElement element = binding.getJavaElement();
@@ -1284,7 +1291,7 @@
 			"package pack;");
 		IJavaProject javaProject = getJavaProject("P");
 		IPackageFragment pack = javaProject.findPackageFragment(new Path("/P/lib/pack"));
-		IType type = pack.getClassFile("package-info.class").getType();
+		IType type = pack.getOrdinaryClassFile("package-info.class").getType();
 		ASTParser parser = ASTParser.newParser(JLS3_INTERNAL);
 		parser.setProject(javaProject);
 		IJavaElement[] elements = new IJavaElement[] {type};
@@ -1309,7 +1316,7 @@
 				"}");
 		this.workingCopy.makeConsistent(null);
 		IMethod method = this.workingCopy.getType("X").getMethod("foo", new String[]{"QString;", "I"});
-		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		ASTParser parser = ASTParser.newParser(getJLS8());
 		parser.setProject(getJavaProject("P"));
 		IBinding[] bindings = parser.createBindings(method.getParameters(), null);
 		assertBindingsEqual(
@@ -1328,7 +1335,7 @@
 				"  void foo(String str, int i) {}\n" +
 				"}");
 		IMethod method = getClassFile("/P/lib/A.class").getType().getMethod("foo", new String[] {"Ljava.lang.String;", "I"});
-		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		ASTParser parser = ASTParser.newParser(getJLS8());
 		parser.setProject(getJavaProject("P"));
 		IBinding[] bindings = parser.createBindings(method.getParameters(), null);
 		assertBindingsEqual(
@@ -1360,7 +1367,7 @@
 		);
 
 		IJavaElement elem= this.workingCopies[0].codeSelect(xSource.indexOf("foo"), 0)[0];
-		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		ASTParser parser = ASTParser.newParser(getJLS8());
 		parser.setProject(getJavaProject("P"));
 		IBinding[] bindings = parser.createBindings(new IJavaElement[]{ elem }, null);
 		assertBindingsEqual(
@@ -1392,7 +1399,7 @@
 			IType typeA = javaProject.findType("p.A");
 			
 			IJavaElement[] elems= typeA.getMethod("foo", new String[]{"I", "Z"}).getParameters();
-			ASTParser parser = ASTParser.newParser(AST.JLS8);
+			ASTParser parser = ASTParser.newParser(getJLS8());
 			parser.setProject(javaProject);
 			IBinding[] bindings = parser.createBindings(elems, null);
 			assertBindingsEqual(
@@ -2622,7 +2629,7 @@
 					javaProject.findType("lib.A").getTypeParameters()[0],
 					javaProject.findType("lib.A").getTypeParameters()[1]
 				};
-			ASTParser parser = ASTParser.newParser(AST.JLS8);
+			ASTParser parser = ASTParser.newParser(getJLS8());
 			parser.setProject(javaProject);
 			IBinding[] bindings = parser.createBindings(elements, null);
 			assertBindingsEqual(
@@ -2655,7 +2662,7 @@
 					method.getTypeParameters()[0],
 					method.getTypeParameters()[1]
 				};
-			ASTParser parser = ASTParser.newParser(AST.JLS8);
+			ASTParser parser = ASTParser.newParser(getJLS8());
 			parser.setProject(javaProject);
 			IBinding[] bindings = parser.createBindings(elements, null);
 			assertBindingsEqual(
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTNodesCollectorVisitor.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTNodesCollectorVisitor.java
index ef3396c..3c4e8df 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTNodesCollectorVisitor.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTNodesCollectorVisitor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 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
@@ -145,6 +145,13 @@
 	}
 
 	/**
+	 * @see org.eclipse.jdt.core.dom.ASTVisitor#endVisit(org.eclipse.jdt.core.dom.ModuleDeclaration)
+	 */
+	public void endVisit(ModuleDeclaration node) {
+		node.setName(node.getAST().newSimpleName("XXX")); //$NON-NLS-1$
+	}
+
+	/**
 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#endVisit(org.eclipse.jdt.core.dom.MethodInvocation)
 	 */
 	public void endVisit(MethodInvocation node) {
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTStructuralPropertyTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTStructuralPropertyTest.java
index f7b15b3..e0ac075 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTStructuralPropertyTest.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTStructuralPropertyTest.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2015 IBM Corporation and others.
+ * Copyright (c) 2004, 2017 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
@@ -444,9 +444,9 @@
 		}
 // {ObjectTeams: adapted for OT specific ASTNodes		
 /* orig:
-		assertEquals("Wrong last known type", 92, hi); // last known one
+		assertEquals("Wrong last known type", 99, hi); // last known one
   :giro */
-		assertEquals("Wrong last known type", 108, hi); // last known one
+		assertEquals("Wrong last known type", 115, hi); // last known one
 // jwl}		
 		assertEquals("Wrong number of distinct types",  hi, classes.size()); // all classes are distinct
 	}
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTTest.java
index 8266872..263d17f 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTTest.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTTest.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2016 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 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
@@ -38,7 +38,12 @@
 	 * @deprecated
 	 */
 	/*package*/ static final int JLS3_INTERNAL = AST.JLS3;
-	
+	/**
+	 * Internal synonym for constant AST.JSL9
+	 * to alleviate deprecation warnings once AST.JLS9 is deprecated in future.
+	 */
+	protected static final int AST_INTERNAL_JLS9 = AST.JLS9;
+
 	class CheckPositionsMatcher extends ASTMatcher {
 
 		public CheckPositionsMatcher() {
@@ -749,7 +754,7 @@
 				suite.addTest(new ASTTest(methods[i].getName(), AST.JLS2));
 				suite.addTest(new ASTTest(methods[i].getName(), JLS3_INTERNAL));
 				suite.addTest(new ASTTest(methods[i].getName(), AST.JLS4));
-				suite.addTest(new ASTTest(methods[i].getName(), AST.JLS8));
+				suite.addTest(new ASTTest(methods[i].getName(), getJLS8()));
 			}
 		}
 		return suite;
@@ -758,6 +763,13 @@
 	AST ast;
 	int API_LEVEL;
 
+	/**
+	 * @deprecated
+	 */
+	static int getJLS8() {
+		return AST.JLS8;
+	}
+
 	public ASTTest(String name) {
 		super(name.substring(0, name.indexOf(" - JLS")));
 		name.indexOf(" - JLS");
@@ -2094,7 +2106,7 @@
 		previousCount = this.ast.modificationCount();
 		assertTrue(x.getAST() == this.ast);
 		assertTrue(x.getParent() == null);
-		if (this.ast.apiLevel() < AST.JLS8) {
+		if (this.ast.apiLevel() < getJLS8()) {
 			assertTrue(getArrayComponentType(x).getParent() == x);
 		} else {
 			assertTrue(x.getElementType().getParent() == x);
@@ -2113,7 +2125,7 @@
 		assertTrue(x.getDimensions() == 1);
 		assertTrue(x.getElementType() == x2);
 
-		if (this.ast.apiLevel() < AST.JLS8) {
+		if (this.ast.apiLevel() < getJLS8()) {
 			genericPropertyTest(x, new Property("ComponentType", true, Type.class) { //$NON-NLS-1$
 				public ASTNode sample(AST targetAst, boolean parented) {
 					SimpleType result = targetAst.newSimpleType(
@@ -3228,7 +3240,7 @@
 		}
 
 		previousCount = this.ast.modificationCount();
-		if (this.ast.apiLevel() < AST.JLS8) {
+		if (this.ast.apiLevel() < getJLS8()) {
 			x.setExtraDimensions(1);
 		} else {
 			x.extraDimensions().add(this.ast.newDimension());
@@ -3237,7 +3249,7 @@
 		assertTrue(x.getExtraDimensions() == 1);
 
 		previousCount = this.ast.modificationCount();
-		if (this.ast.apiLevel() < AST.JLS8) {
+		if (this.ast.apiLevel() < getJLS8()) {
 			x.setExtraDimensions(0);
 		} else {
 			x.extraDimensions().remove(0);
@@ -3340,7 +3352,7 @@
 			}
 		});
 
-		if (this.ast.apiLevel() >= AST.JLS8) {
+		if (this.ast.apiLevel() >= getJLS8()) {
 			genericPropertyListTest(x, x.extraDimensions(),
 					new Property("ExtraDimensions", true, Dimension.class) { //$NON-NLS-1$
 						public ASTNode sample(AST targetAst, boolean parented) {
@@ -3398,7 +3410,7 @@
 		assertTrue(this.ast.modificationCount() == previousCount);
 
 		previousCount = this.ast.modificationCount();
-		if (this.ast.apiLevel() < AST.JLS8) {
+		if (this.ast.apiLevel() < getJLS8()) {
 			setExtraDimensions(x, 1);
 		} else {
 			x.extraDimensions().add(this.ast.newDimension());
@@ -3407,7 +3419,7 @@
 		assertTrue(x.getExtraDimensions() == 1);
 
 		previousCount = this.ast.modificationCount();
-		if (this.ast.apiLevel() < AST.JLS8) {
+		if (this.ast.apiLevel() < getJLS8()) {
 			setExtraDimensions(x, 0);
 		} else {
 			x.extraDimensions().remove(0);
@@ -3416,7 +3428,7 @@
 		assertTrue(x.getExtraDimensions() == 0);
 
 		// check that property cannot be set negative
-		if (this.ast.apiLevel() < AST.JLS8) {
+		if (this.ast.apiLevel() < getJLS8()) {
 			try {
 				setExtraDimensions(x, -1);
 				fail();
@@ -3441,7 +3453,7 @@
 			}
 		});
 
-		if (this.ast.apiLevel() >= AST.JLS8) {
+		if (this.ast.apiLevel() >= getJLS8()) {
 			genericPropertyListTest(x, x.extraDimensions(),
 					new Property("ExtraDimensions", true, Dimension.class) { //$NON-NLS-1$
 						public ASTNode sample(AST targetAst, boolean parented) {
@@ -3520,7 +3532,7 @@
 		assertTrue(x.getExtraDimensions() == 0);
 		assertTrue(x.getJavadoc() == null);
 		assertTrue(x.parameters().size() == 0);
-		if (this.ast.apiLevel() < AST.JLS8) {
+		if (this.ast.apiLevel() < getJLS8()) {
 			assertTrue(x.thrownExceptions().size() == 0);			
 		} else {
 			assertTrue(x.thrownExceptionTypes().size() == 0);			
@@ -3560,7 +3572,7 @@
 		}
 
 		previousCount = this.ast.modificationCount();
-		if (this.ast.apiLevel() < AST.JLS8) {
+		if (this.ast.apiLevel() < getJLS8()) {
 			x.setExtraDimensions(1);
 		} else {
 			x.extraDimensions().add(this.ast.newDimension());
@@ -3569,7 +3581,7 @@
 		assertTrue(x.getExtraDimensions() == 1);
 
 		previousCount = this.ast.modificationCount();
-		if (this.ast.apiLevel() < AST.JLS8) {
+		if (this.ast.apiLevel() < getJLS8()) {
 			x.setExtraDimensions(0);
 		} else {
 			x.extraDimensions().remove(0);
@@ -3647,7 +3659,7 @@
 			});
 		}
 
-		if (this.ast.apiLevel() >= AST.JLS8) {
+		if (this.ast.apiLevel() >= getJLS8()) {
 			genericPropertyListTest(x, x.extraDimensions(),
 					new Property("ExtraDimensions", true, Dimension.class) { //$NON-NLS-1$
 						public ASTNode sample(AST targetAst, boolean parented) {
@@ -3685,7 +3697,7 @@
 			}
 		});
 
-		if (this.ast.apiLevel() < AST.JLS8) {
+		if (this.ast.apiLevel() < getJLS8()) {
 			genericPropertyListTest(x, x.thrownExceptions(),
 					  new Property("ThrownExceptions", true, Name.class) { //$NON-NLS-1$
 						public ASTNode sample(AST targetAst, boolean parented) {
@@ -3752,7 +3764,7 @@
 			x.parameters().add(this.ast.newSingleVariableDeclaration());
 			assertTrue(!x.isVarargs()); // only last param counts
 		}
-		if (this.ast.apiLevel() < AST.JLS8) {
+		if (this.ast.apiLevel() < getJLS8()) {
 			try {
 				x.setExtraDimensions(-1);
 				fail("Should fail");
@@ -6480,6 +6492,10 @@
 				assertTrue(node.resolveBinding() == null);
 				return true;
 			}
+			public boolean visit(ModuleDeclaration node) {
+				assertTrue(node.resolveBinding() == null);
+				return true;
+			}
 			public boolean visit(TypeDeclaration node) {
 				assertTrue(node.resolveBinding() == null);
 				return true;
@@ -8867,15 +8883,23 @@
 			ASTNode.TYPE_ANCHOR,
 			ASTNode.PRECEDENCE_DECLARATION,
 			ASTNode.GUARD_PREDICATE_DECLARATION,
-			ASTNode.METHOD_BINDING_OPERATOR
+			ASTNode.METHOD_BINDING_OPERATOR,
 // SH}
+			ASTNode.MODULE_DECLARATION,
+			ASTNode.REQUIRES_DIRECTIVE,
+			ASTNode.EXPORTS_DIRECTIVE,
+			ASTNode.OPENS_DIRECTIVE,
+			ASTNode.USES_DIRECTIVE,
+			ASTNode.PROVIDES_DIRECTIVE,
+			ASTNode.MODULE_MODIFIER,
+
 		};
-		
+
 		// assert that nodeType values are correct:
 		for (int i= 0; i < nodeTypes.length; i++) {
 			assertSame(i + 1, nodeTypes[i]);
 		}
-		
+
 		// test nodeClassForType:
 		for (int i= 0; i < nodeTypes.length; i++) {
 			int nodeType = nodeTypes[i];
@@ -8883,7 +8907,7 @@
 			try {
 				node = this.ast.createInstance(nodeType);
 			} catch (IllegalArgumentException e) {
-				if (this.API_LEVEL < AST.JLS8 && e.getCause() instanceof UnsupportedOperationException) {
+				if (this.API_LEVEL < AST_INTERNAL_JLS9 && e.getCause() instanceof UnsupportedOperationException) {
 					continue;
 				} else {
 					throw new AssertionFailedError("missing node type: " + nodeType);
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTVisitorTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTVisitorTest.java
index d47d83f..d6d2228 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTVisitorTest.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTVisitorTest.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2016 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
@@ -32,7 +32,7 @@
 				suite.addTest(new ASTVisitorTest(methods[i].getName(), AST.JLS2));
 				suite.addTest(new ASTVisitorTest(methods[i].getName(), AST.JLS3));
 				suite.addTest(new ASTVisitorTest(methods[i].getName(), AST.JLS4));
-				suite.addTest(new ASTVisitorTest(methods[i].getName(), AST.JLS8));
+				suite.addTest(new ASTVisitorTest(methods[i].getName(), getJLS8()));
 			}
 		}
 		return suite;
@@ -299,7 +299,7 @@
 			this.EC2.setName(this.ast.newSimpleName("d")); //$NON-NLS-1$
 			this.EC2S = "[(ECD[(nSddnS)]ECD)]"; //$NON-NLS-1$
 		}
-		if (this.ast.apiLevel() >= AST.JLS8) {
+		if (this.ast.apiLevel() >= getJLS8()) {
 			this.T3 = this.ast.newSimpleType(this.ast.newSimpleName("W")); //$NON-NLS-1$
 			this.T3S = "[(tS[(nSWWnS)]tS)]"; //$NON-NLS-1$
 			this.T4 = this.ast.newSimpleType(this.ast.newSimpleName("X")); //$NON-NLS-1$
@@ -312,6 +312,12 @@
 		this.ast = null;
 		super.tearDown();
 	}
+	/**
+	 * @deprecated
+	 */
+	protected static int getJLS8() {
+		return AST.JLS8;
+	}
 
 	class TestVisitor extends ASTVisitor {
 
@@ -801,6 +807,14 @@
 			ASTVisitorTest.this.b.append("eMI)"); //$NON-NLS-1$
 		}
 
+		public boolean visit(ModuleDeclaration node) {
+			ASTVisitorTest.this.b.append("(MoD"); //$NON-NLS-1$
+			return isVisitingChildren();
+		}
+		public void endVisit(ModuleDeclaration node) {
+			ASTVisitorTest.this.b.append("MoD)"); //$NON-NLS-1$
+		}
+
 		public boolean visit(NullLiteral node) {
 			ASTVisitorTest.this.b.append("(eNL"); //$NON-NLS-1$
 			return isVisitingChildren();
@@ -1154,13 +1168,13 @@
 		this.b.setLength(0);
 		x1.accept(v1);
 		String result = this.b.toString();
-		String expected = this.ast.apiLevel() < AST.JLS8 ? "[(tA[(tPcharchartP)]tA)]" : "[(tA[(tPcharchartP)][(@ED@ED)]tA)]";
+		String expected = this.ast.apiLevel() < getJLS8() ? "[(tA[(tPcharchartP)]tA)]" : "[(tA[(tPcharchartP)][(@ED@ED)]tA)]";
 		assertTrue(expected.equals(result)); //$NON-NLS-1$
 	}
 
 	/** @deprecated using deprecated code */
 	public void testNameQualifiedType() {
-		if (this.ast.apiLevel() < AST.JLS8) {
+		if (this.ast.apiLevel() < getJLS8()) {
 			return;
 		}
 		QualifiedName q = this.ast.newQualifiedName(this.N2, this.N3);
@@ -1252,7 +1266,7 @@
 		this.b.setLength(0);
 		x1.accept(v1);
 		String result = this.b.toString();
-		String dim = this.ast.apiLevel() < AST.JLS8 ? "" : "[(@ED@ED)]";
+		String dim = this.ast.apiLevel() < getJLS8() ? "" : "[(@ED@ED)]";
 		assertTrue(result.equals("[(eAC"+"[(tA"+this.T1S+ dim +"tA)]"+this.E1S+this.E2S+"[(eAIeAI)]eAC)]")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 	}
 	public void testArrayInitializer() {
@@ -1449,7 +1463,7 @@
 	}
 
 	public void testCreationReference() {
-		if (this.ast.apiLevel() < AST.JLS8)
+		if (this.ast.apiLevel() < getJLS8())
 			return;
 		CreationReference x1 = this.ast.newCreationReference();
 		x1.setType(this.T1);
@@ -1521,7 +1535,7 @@
 		assertTrue(result.equals("[(ED"+this.JD1S+this.MOD1S+this.MOD2S+this.N1S+this.T1S+this.T2S+this.EC1S+this.EC2S+this.FD1S+this.FD2S+"ED)]")); //$NON-NLS-1$ //$NON-NLS-2$
 	}
 	public void testExpressionMethodReference() {
-		if (this.ast.apiLevel() < AST.JLS8)
+		if (this.ast.apiLevel() < getJLS8())
 			return;
 		ExpressionMethodReference x1 = this.ast.newExpressionMethodReference();
 		x1.setExpression(this.E1);
@@ -1542,7 +1556,7 @@
 		assertTrue(result.equals("[(sEX"+this.E1S+"sEX)]")); //$NON-NLS-1$ //$NON-NLS-2$
 	}
 	public void testExtraDimension() {
-		if (this.ast.apiLevel() < AST.JLS8) {
+		if (this.ast.apiLevel() < getJLS8()) {
 			return;
 		}
 		Dimension x1 = this.ast.newDimension();
@@ -1760,7 +1774,7 @@
 		x1.setName(this.N1);
 		x1.parameters().add(this.V1);
 		x1.parameters().add(this.V2);
-		if (this.ast.apiLevel() < AST.JLS8) {
+		if (this.ast.apiLevel() < getJLS8()) {
 			x1.thrownExceptions().add(this.N2);
 			x1.thrownExceptions().add(this.N3);			
 		} else {
@@ -1774,7 +1788,7 @@
 		String result = this.b.toString();
 		if (this.ast.apiLevel() == AST.JLS2) {
 			assertEquals("[(MD"+this.JD1S+this.T1S+this.N1S+this.V1S+this.V2S+this.N2S+this.N3S+this.B1S+"MD)]", result); //$NON-NLS-1$ //$NON-NLS-2$
-		} else if (this.ast.apiLevel() < AST.JLS8) {
+		} else if (this.ast.apiLevel() < getJLS8()) {
 			assertEquals("[(MD"+this.JD1S+this.MOD1S+this.MOD2S+this.TP1S+this.T1S+this.N1S+this.V1S+this.V2S+this.N2S+this.N3S+this.B1S+"MD)]", result); //$NON-NLS-1$ //$NON-NLS-2$
 		} else {
 			assertEquals("[(MD"+this.JD1S+this.MOD1S+this.MOD2S+this.TP1S+this.T1S+this.N1S+this.V1S+this.V2S+this.T3S+this.T4S+this.B1S+"MD)]", result); //$NON-NLS-1$ //$NON-NLS-2$			
@@ -2067,7 +2081,7 @@
 		}
 	}
 	public void testSuperMethodReference() {
-		if (this.ast.apiLevel() < AST.JLS8) {
+		if (this.ast.apiLevel() < getJLS8()) {
 			return;
 		}
 		SuperMethodReference x1 = this.ast.newSuperMethodReference();
@@ -2226,7 +2240,7 @@
 		assertTrue(result.equals("[(eTL"+this.T1S+"eTL)]")); //$NON-NLS-1$ //$NON-NLS-2$
 	}
 	public void testTypeMethodReference() {
-		if (this.ast.apiLevel() < AST.JLS8)
+		if (this.ast.apiLevel() < getJLS8())
 			return;
 		TypeMethodReference x1 = this.ast.newTypeMethodReference();
 		x1.setType(this.T1);
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/AbstractASTTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/AbstractASTTests.java
index 310a106..7192aea 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/AbstractASTTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/AbstractASTTests.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2015 IBM Corporation and others.
+ * Copyright (c) 2004, 2016 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
@@ -75,6 +75,12 @@
 	 * @deprecated
 	 */
 	/*package*/ static final int AST_INTERNAL_JLS4 = AST.JLS4;
+	/**
+	 * Internal synonym for deprecated constant AST.JSL8
+	 * to alleviate deprecation warnings.
+	 * @deprecated
+	 */
+	/*package*/ static final int AST_INTERNAL_JLS8 = AST.JLS8;
 	public static final int astInternalJLS2() {
 		return AST_INTERNAL_JLS2;
 	}
@@ -483,8 +489,10 @@
 		String option = cu.getJavaProject().getOption(JavaCore.COMPILER_COMPLIANCE, true);
 		long jdkLevel = CompilerOptions.versionToJdkLevel(option);
 		int JLSLevel = AST_INTERNAL_JLS3;
-		if (jdkLevel >= ClassFileConstants.JDK1_8) {
-			JLSLevel = AST.JLS8;
+		if (jdkLevel >= ClassFileConstants.JDK9) {
+			JLSLevel = AST_INTERNAL_JLS9;			
+		} else if (jdkLevel >= ClassFileConstants.JDK1_8) {
+			JLSLevel = AST_INTERNAL_JLS8;
 		} else if (jdkLevel >= ClassFileConstants.JDK1_7) {
 			JLSLevel = AST_INTERNAL_JLS4;
 		}
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/BindingsCollectorVisitor.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/BindingsCollectorVisitor.java
index b762e5e..6b103e3 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/BindingsCollectorVisitor.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/BindingsCollectorVisitor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 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
@@ -227,6 +227,14 @@
 	}
 
 	/**
+	 * @see org.eclipse.jdt.core.dom.ASTVisitor#endVisit(ModuleDeclaration)
+	 */
+	public void endVisit(ModuleDeclaration node) {
+		IModuleBinding moduleBinding = node.resolveBinding();
+		collectBindings(node, moduleBinding);
+	}
+
+	/**
 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#endVisit(MethodInvocation)
 	 */
 	public void endVisit(MethodInvocation node) {
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ConverterTestSetup.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ConverterTestSetup.java
index 9d6f3ce..9da38a0 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ConverterTestSetup.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ConverterTestSetup.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 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
@@ -42,6 +42,13 @@
 	 */
 	/*package*/ static final int JLS4_INTERNAL = AST.JLS4;
 
+	/**
+	 * Internal synonym for deprecated constant AST.JSL8
+	 * to alleviate deprecation warnings.
+	 * @deprecated
+	 */
+	/*package*/ static final int JLS8_INTERNAL = AST.JLS8;
+
 	static int getJLS3() {
 		return JLS3_INTERNAL;
 	}
@@ -49,7 +56,10 @@
 	static int getJLS4() {
 		return JLS4_INTERNAL;
 	}
-	
+
+	static int getJLS8() {
+		return JLS8_INTERNAL;
+	}	
 	protected AST ast;
 	public static List TEST_SUITES = null;
 	public static boolean PROJECT_SETUP = false;
@@ -89,6 +99,7 @@
 			this.deleteProject("Converter16"); //$NON-NLS-1$
 			this.deleteProject("Converter17"); //$NON-NLS-1$
 			this.deleteProject("Converter18"); //$NON-NLS-1$
+			this.deleteProject("Converter9"); //$NON-NLS-1$
 			PROJECT_SETUP = false;
 		} else {
 			TEST_SUITES.remove(getClass());
@@ -98,6 +109,7 @@
 				this.deleteProject("Converter16"); //$NON-NLS-1$
 				this.deleteProject("Converter17"); //$NON-NLS-1$
 				this.deleteProject("Converter18"); //$NON-NLS-1$
+				this.deleteProject("Converter9"); //$NON-NLS-1$
 				PROJECT_SETUP = false;
 			}
 		}
@@ -106,6 +118,10 @@
 	}
 
 	public void setUpJCLClasspathVariables(String compliance, boolean useFullJCL) throws JavaModelException, IOException {
+		if (useFullJCL) {
+			 super.setUpJCLClasspathVariables(compliance, useFullJCL);
+			 return;
+		}
 		if ("1.5".equals(compliance)
 				|| "1.6".equals(compliance)) {
 			if (JavaCore.getClasspathVariable("CONVERTER_JCL15_LIB") == null) {
@@ -131,6 +147,14 @@
 					new IPath[] {getConverterJCLPath("1.8"), getConverterJCLSourcePath("1.8"), getConverterJCLRootSourcePath()},
 					null);
 			}
+		} else if ("9".equals(compliance)) {
+			if (JavaCore.getClasspathVariable("CONVERTER_JCL9_LIB") == null) {
+				setupExternalJCL("converterJclMin9");
+				JavaCore.setClasspathVariables(
+						new String[] {"CONVERTER_JCL9_LIB", "CONVERTER_JCL9_SRC", "CONVERTER_JCL9_SRCROOT"},
+						new IPath[] {getConverterJCLPath("9"), getConverterJCLSourcePath("9"), getConverterJCLRootSourcePath()},
+						null);
+			}
 		} else if (JavaCore.getClasspathVariable("CONVERTER_JCL_LIB") == null) {
 			setupExternalJCL("converterJclMin");
 			JavaCore.setClasspathVariables(
@@ -152,6 +176,7 @@
 			setUpJavaProject("Converter16", "1.6"); //$NON-NLS-1$ //$NON-NLS-2$
 			setUpJavaProject("Converter17", "1.7"); //$NON-NLS-1$ //$NON-NLS-2$
 			setUpJavaProject("Converter18", "1.8"); //$NON-NLS-1$ //$NON-NLS-2$
+			setUpJavaProject("Converter9", "9"); //$NON-NLS-1$ //$NON-NLS-2$
 			waitUntilIndexesReady(); // needed to find secondary types
 			PROJECT_SETUP = true;
 		}
@@ -407,6 +432,10 @@
 			super.endVisit(node);
 		}
 
+		public void endVisit(ModuleDeclaration node) {
+			assertNotNull(node+" should have a binding", node.resolveBinding());
+			super.endVisit(node);
+		}
 		public void endVisit(MethodRef node) {
 			assertNotNull(node+" should have a binding", node.resolveBinding());
 			super.endVisit(node);
@@ -548,6 +577,9 @@
 		return runJLS8Conversion(unit, resolveBindings, checkJLS2, false);
 	}
 
+	/**
+	 * @deprecated references deprecated old AST level
+	 */
 	public ASTNode runJLS8Conversion(ICompilationUnit unit, boolean resolveBindings, boolean checkJLS2, boolean bindingRecovery) {
 
 		// Create parser
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/MarkedASTFlattener.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/MarkedASTFlattener.java
index 94ea5ea..f889f02 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/MarkedASTFlattener.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/MarkedASTFlattener.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2016 IBM Corporation and others.
+ * Copyright (c) 2008, 2017 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
@@ -249,6 +249,8 @@
 					buffer.append("ENUM_DECLARATION");break;
 				case ASTNode.EXPRESSION_STATEMENT :
 					buffer.append("EXPRESSION_STATEMENT");break;
+				case ASTNode.EXPORTS_DIRECTIVE :
+					buffer.append("EXPORTS_STATEMENT");break;
 				case ASTNode.FIELD_ACCESS :
 					buffer.append("FIELD_ACCESS");break;
 				case ASTNode.FIELD_DECLARATION :
@@ -287,12 +289,16 @@
 					buffer.append("METHOD_REF_PARAMETER");break;
 				case ASTNode.MODIFIER :
 					buffer.append("MODIFIER");break;
+				case ASTNode.MODULE_DECLARATION :
+					buffer.append("MODULE_DECLARATION");break;
 				case ASTNode.NORMAL_ANNOTATION :
 					buffer.append("NORMAL_ANNOTATION");break;
 				case ASTNode.NULL_LITERAL :
 					buffer.append("NULL_LITERAL");break;
 				case ASTNode.NUMBER_LITERAL :
 					buffer.append("NUMBER_LITERAL");break;
+				case ASTNode.OPENS_DIRECTIVE :
+					buffer.append("OPENS_STATEMENT");break;
 				case ASTNode.PACKAGE_DECLARATION :
 					buffer.append("PACKAGE_DECLARATION");break;
 				case ASTNode.PARAMETERIZED_TYPE :
@@ -305,10 +311,14 @@
 					buffer.append("PREFIX_EXPRESSION");break;
 				case ASTNode.PRIMITIVE_TYPE :
 					buffer.append("PRIMITIVE_TYPE");break;
+				case ASTNode.PROVIDES_DIRECTIVE :
+					buffer.append("PROVIDES_STATEMENT");break;
 				case ASTNode.QUALIFIED_NAME :
 					buffer.append("QUALIFIED_NAME");break;
 				case ASTNode.QUALIFIED_TYPE :
 					buffer.append("QUALIFIED_TYPE");break;
+				case ASTNode.REQUIRES_DIRECTIVE :
+					buffer.append("REQUIRES_STATEMENT");break;
 				case ASTNode.RETURN_STATEMENT :
 					buffer.append("RETURN_STATEMENT");break;
 				case ASTNode.SIMPLE_NAME :
@@ -351,6 +361,8 @@
 					buffer.append("TYPE_LITERAL");break;
 				case ASTNode.TYPE_PARAMETER :
 					buffer.append("TYPE_PARAMETER");break;
+				case ASTNode.USES_DIRECTIVE :
+					buffer.append("USES_STATEMENT");break;
 				case ASTNode.VARIABLE_DECLARATION_EXPRESSION :
 					buffer.append("VARIABLE_DECLARATION_EXPRESSION");break;
 				case ASTNode.VARIABLE_DECLARATION_FRAGMENT :
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/RunAllTestsTracing.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/RunAllTestsTracing.java
new file mode 100644
index 0000000..2aa6412
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/RunAllTestsTracing.java
@@ -0,0 +1,22 @@
+/*******************************************************************************
+ * Copyright (c) 2017 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.jdt.core.tests.dom;
+
+import org.eclipse.test.TracingSuite;
+import org.eclipse.test.TracingSuite.TracingOptions;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite.SuiteClasses;
+
+@RunWith(TracingSuite.class)
+@SuiteClasses(RunAllTests.class)
+@TracingOptions(stackDumpTimeoutSeconds = 60)
+public class RunAllTestsTracing {
+}
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/RunConverterTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/RunConverterTests.java
index baca6e3..b68ff26 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/RunConverterTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/RunConverterTests.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2016 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
@@ -48,6 +48,7 @@
 		ASTConverter15JLS8Test.class,
 		TypeAnnotationsConverterTest.class,
 		ASTConverter18Test.class,
+		ASTConverter9Test.class,
 	};
 }
 public static Test suite() {
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/SampleASTs.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/SampleASTs.java
index 59aeff5..c220883 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/SampleASTs.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/SampleASTs.java
@@ -29,7 +29,13 @@
 	 * @deprecated
 	 */
 	/*package*/ static final int JLS4_INTERNAL = AST.JLS4;
-	
+
+	/**
+	 * @deprecated
+	 */
+	static int getJLS8() {
+		return AST.JLS8;
+	}
 	/**
 	 * Returns a subtree of sample of AST nodes. The sample includes
 	 * one of each kind (except for BlockComment and LineComment,
@@ -93,7 +99,7 @@
 			pmt.typeArguments().add(qt);
 			md.setReturnType2(pmt);
 		}
-		if (target.apiLevel() >= AST.JLS8) {
+		if (target.apiLevel() >= getJLS8()) {
 			Dimension ed = target.newDimension();
 			md.extraDimensions().add(ed);
 		}
@@ -180,7 +186,7 @@
 		z.add(booleanLiteral);
 		CastExpression castExpression = target.newCastExpression();
 		z.add(castExpression);
-		if (target.apiLevel() >= AST.JLS8) {
+		if (target.apiLevel() >= getJLS8()) {
 			IntersectionType it = target.newIntersectionType();
 			castExpression.setType(it);
 		}
@@ -198,7 +204,7 @@
 		z.add(infixExpression);
 		InstanceofExpression instanceofExpression = target.newInstanceofExpression();
 		z.add(instanceofExpression);
-		if (target.apiLevel() >= AST.JLS8) {
+		if (target.apiLevel() >= getJLS8()) {
 			LambdaExpression lambdaExpression = target.newLambdaExpression();
 			z.add(lambdaExpression);
 		}
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/TypeAnnotationsConverterTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/TypeAnnotationsConverterTest.java
index ce4e062..89a3410 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/TypeAnnotationsConverterTest.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/TypeAnnotationsConverterTest.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2013 IBM Corporation and others.
+ * Copyright (c) 2000, 2016 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
@@ -23,7 +23,7 @@
 
 	public void setUpSuite() throws Exception {
 		super.setUpSuite();
-		this.ast = AST.newAST(AST.JLS8);
+		this.ast = AST.newAST(AST_INTERNAL_JLS9);
 	}
 
 	public TypeAnnotationsConverterTest(String name) {
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/TypeBindingTests308.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/TypeBindingTests308.java
index 40cdcd1..ed4309a 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/TypeBindingTests308.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/TypeBindingTests308.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2013, 2015 IBM Corporation and others.
+ * Copyright (c) 2013, 2016 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
@@ -78,7 +78,13 @@
 	}
 	public void setUpSuite() throws Exception {
 		super.setUpSuite();
-		this.ast = AST.newAST(AST.JLS8);
+		this.ast = AST.newAST(getAST8());
+	}
+	/**
+	 * @deprecated
+	 */
+	protected int getAST8() {
+		return AST.JLS8;
 	}
 	public TypeBindingTests308(String testName){
 		super(testName);
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/formatter/FormatterRegressionTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/formatter/FormatterRegressionTests.java
index 3eda4a0..67a7006 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/formatter/FormatterRegressionTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/formatter/FormatterRegressionTests.java
@@ -14005,4 +14005,42 @@
 	String input = getCompilationUnit("Formatter", "", "test362260", "G_in.java").getSource();
 	formatSource(input, getCompilationUnit("Formatter", "", "test362260", "G_out.java").getSource());
 }
+/**
+ * https://bugs.eclipse.org/506430 - [1.9] Formatter support for module-info.java
+ */
+public void testBug506430a() throws JavaModelException {
+	setComplianceLevel(CompilerOptions.VERSION_9);
+	setPageWidth80();
+	String input = getCompilationUnit("Formatter", "", "test506430", "A_in.java").getSource();
+	formatSource(input, getCompilationUnit("Formatter", "", "test506430", "A_out.java") .getSource(),
+			CodeFormatter.K_MODULE_INFO | CodeFormatter.F_INCLUDE_COMMENTS);
+}
+/**
+ * https://bugs.eclipse.org/506430 - [1.9] Formatter support for module-info.java
+ */
+public void testBug506430b() throws JavaModelException {
+	setComplianceLevel(CompilerOptions.VERSION_9);
+	setPageWidth80();
+	this.formatterPrefs.brace_position_for_type_declaration = DefaultCodeFormatterConstants.NEXT_LINE;
+	this.formatterPrefs.blank_lines_before_new_chunk = 2;
+	this.formatterPrefs.blank_lines_before_first_class_body_declaration = 3;
+	this.formatterPrefs.blank_lines_before_field = 1;
+	this.formatterPrefs.indent_body_declarations_compare_to_type_header = false;
+	this.formatterPrefs.insert_space_before_comma_in_multiple_field_declarations = true;
+	this.formatterPrefs.alignment_for_module_statements = Alignment.M_NEXT_PER_LINE_SPLIT;
+	this.formatterPrefs.insert_new_line_at_end_of_file_if_missing = true;
+	String input = getCompilationUnit("Formatter", "", "test506430", "B_in.java").getSource();
+	formatSource(input, getCompilationUnit("Formatter", "", "test506430", "B_out.java") .getSource(),
+			CodeFormatter.K_MODULE_INFO | CodeFormatter.F_INCLUDE_COMMENTS);
+}
+/**
+ * https://bugs.eclipse.org/506430 - [1.9] Formatter support for module-info.java
+ */
+public void testBug506430c() throws JavaModelException {
+	setComplianceLevel(CompilerOptions.VERSION_9);
+	setPageWidth80();
+	String input = getCompilationUnit("Formatter", "", "test506430", "A_in.java").getSource();
+	formatSource(input, getCompilationUnit("Formatter", "", "test506430", "A_out.java") .getSource(),
+			CodeFormatter.K_UNKNOWN | CodeFormatter.F_INCLUDE_COMMENTS);
+}
 }
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/AbstractJavaModelTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/AbstractJavaModelTests.java
index 9e492c7..74c1cdc 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/AbstractJavaModelTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/AbstractJavaModelTests.java
@@ -24,11 +24,13 @@
 import org.eclipse.jdt.core.*;
 import org.eclipse.jdt.core.compiler.CharOperation;
 import org.eclipse.jdt.core.compiler.IProblem;
+import org.eclipse.jdt.core.dom.AST;
 import org.eclipse.jdt.core.dom.ASTNode;
 import org.eclipse.jdt.core.dom.CompilationUnit;
 import org.eclipse.jdt.core.search.*;
 import org.eclipse.jdt.core.tests.junit.extension.TestCase;
 import org.eclipse.jdt.core.tests.util.AbstractCompilerTest;
+import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
 import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
 import org.eclipse.jdt.internal.core.ClasspathEntry;
 import org.eclipse.jdt.internal.core.JavaCorePreferenceInitializer;
@@ -68,6 +70,24 @@
 	protected boolean displayName = false;
 	protected String endChar = ",";
 
+	protected static boolean isJRE9 = false;
+	static {
+		String javaVersion = System.getProperty("java.version");
+		if (javaVersion.length() > 3) {
+			javaVersion = javaVersion.substring(0, 3);
+		}
+		long jdkLevel = CompilerOptions.versionToJdkLevel(javaVersion);
+		if (jdkLevel >= ClassFileConstants.JDK9) {
+			isJRE9 = true;
+		}
+	}
+
+	/**
+	 * Internal synonym for constant AST.JSL9
+	 * to alleviate deprecation warnings once AST.JLS9 is deprecated in future.
+	 */
+	protected static final int AST_INTERNAL_JLS9 = AST.JLS9;
+
 	public static class BasicProblemRequestor implements IProblemRequestor {
 		public void acceptProblem(IProblem problem) {}
 		public void beginReporting() {}
@@ -1270,7 +1290,7 @@
 	protected void createJar(String[] javaPathsAndContents, String jarPath, Map options) throws IOException {
 		org.eclipse.jdt.core.tests.util.Util.createJar(javaPathsAndContents, null, jarPath, null, "1.4", options);
 	}
-	
+
 	protected void createJar(String[] javaPathsAndContents, String jarPath, String[] classpath, String compliance) throws IOException {
 		org.eclipse.jdt.core.tests.util.Util.createJar(javaPathsAndContents, null,jarPath, classpath, compliance);
 	}
@@ -1278,7 +1298,27 @@
 	protected void createJar(String[] javaPathsAndContents, String jarPath, String[] classpath, String compliance, Map options) throws IOException {
 		org.eclipse.jdt.core.tests.util.Util.createJar(javaPathsAndContents, null, jarPath, classpath, compliance, options);
 	}
-	
+
+	protected IJavaProject createJava9Project(String name) throws CoreException {
+		return createJava9Project(name, new String[]{"src"});
+	}
+	protected IJavaProject createJava9Project(String name, String[] srcFolders) throws CoreException {
+		return createJava9ProjectWithJREAttributes(name, srcFolders, null);
+	}
+	protected IJavaProject createJava9ProjectWithJREAttributes(String name, String[] srcFolders, IClasspathAttribute[] attributes) throws CoreException {
+		String javaHome = System.getProperty("java.home") + File.separator;
+		Path bootModPath = new Path(javaHome +"/lib/jrt-fs.jar");
+		Path sourceAttachment = new Path(javaHome +"/lib/src.zip");
+		IClasspathEntry jrtEntry = JavaCore.newLibraryEntry(bootModPath, sourceAttachment, null, null, attributes, false);
+		IJavaProject project = this.createJavaProject(name, srcFolders, new String[0],
+				new String[0], "bin", "9");
+		IClasspathEntry[] old = project.getRawClasspath();
+		IClasspathEntry[] newPath = new IClasspathEntry[old.length +1];
+		System.arraycopy(old, 0, newPath, 0, old.length);
+		newPath[old.length] = jrtEntry;
+		project.setRawClasspath(newPath, null);
+		return project;
+	}
 	/*
 	}
 	 * Creates a Java project where prj=src=bin and with JCL_LIB on its classpath.
@@ -1682,12 +1722,19 @@
 					}
 					if (lib.indexOf(File.separatorChar) == -1 && lib.charAt(0) != '/' && lib.equals(lib.toUpperCase())) { // all upper case is a var
 						char[][] vars = CharOperation.splitOn(',', lib.toCharArray());
+						IClasspathAttribute[] extraAttributes = ClasspathEntry.NO_EXTRA_ATTRIBUTES;
+						if (CompilerOptions.versionToJdkLevel(compliance) >= ClassFileConstants.JDK9 
+								&& (lib.startsWith("JCL") || lib.startsWith("CONVERTER_JCL"))) {
+							extraAttributes = new IClasspathAttribute[] {
+								JavaCore.newClasspathAttribute(IClasspathAttribute.MODULE, "true")
+							};
+						}
 						entries[sourceLength+i] = JavaCore.newVariableEntry(
 							new Path(new String(vars[0])),
 							vars.length > 1 ? new Path(new String(vars[1])) : null,
 							vars.length > 2 ? new Path(new String(vars[2])) : null,
 							ClasspathEntry.getAccessRules(accessibleFiles, nonAccessibleFiles), // ClasspathEntry.NO_ACCESS_RULES,
-							ClasspathEntry.NO_EXTRA_ATTRIBUTES,
+							extraAttributes,
 							false);
 					} else if (lib.startsWith("org.eclipse.jdt.core.tests.model.")) { // container
 						entries[sourceLength+i] = JavaCore.newContainerEntry(
@@ -1796,8 +1843,13 @@
 					options.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_8);
 					options.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_8);
 					javaProject.setOptions(options);
+				} else if ("9".equals(compliance)) {
+					Map options = new HashMap();
+					options.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_9);
+					options.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_9);
+					options.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_9);
+					javaProject.setOptions(options);
 				}
-
 				result[0] = javaProject;
 			}
 		};
@@ -1961,12 +2013,12 @@
 	 * Returns the specified compilation unit in the given project, root, and
 	 * package fragment or <code>null</code> if it does not exist.
 	 */
-	public IClassFile getClassFile(String projectName, String rootPath, String packageName, String className) throws JavaModelException {
+	public IOrdinaryClassFile getClassFile(String projectName, String rootPath, String packageName, String className) throws JavaModelException {
 		IPackageFragment pkg= getPackageFragment(projectName, rootPath, packageName);
 		if (pkg == null) {
 			return null;
 		}
-		return pkg.getClassFile(className);
+		return pkg.getOrdinaryClassFile(className);
 	}
 	protected ICompilationUnit getCompilationUnit(String path) {
 		return (ICompilationUnit)JavaCore.create(getFile(path));
@@ -2759,6 +2811,46 @@
 			assertTrue("failed to set classpath", false);
 		}
 	}
+	protected IJavaProject setupModuleProject(String name, String[] sources) throws CoreException {
+		return setupModuleProject(name, sources, false);
+	}
+	protected IJavaProject setupModuleProject(String name, String[] sources, boolean addModulePathContainer) throws CoreException {
+		IClasspathEntry[] deps = null;
+		if (addModulePathContainer) {
+			IClasspathEntry containerEntry = JavaCore.newContainerEntry(new Path(JavaCore.MODULE_PATH_CONTAINER_ID));
+			deps = new IClasspathEntry[] {containerEntry};
+		}
+		return setupModuleProject(name, sources, deps);
+	}
+	protected IJavaProject setupModuleProject(String name, String[] sources, IClasspathEntry[] deps) throws CoreException {
+		return setupModuleProject(name, new String[]{"src"}, sources, deps);
+	}
+	protected IJavaProject setupModuleProject(String name, String[] srcFolders, String[] sources, IClasspathEntry[] deps) throws CoreException {
+		IJavaProject project = createJava9Project(name, srcFolders);
+		createSourceFiles(project, sources);
+		if (deps != null) {
+			IClasspathEntry[] old = project.getRawClasspath();
+			IClasspathEntry[] newPath = new IClasspathEntry[old.length + deps.length];
+			System.arraycopy(old, 0, newPath, 0, old.length);
+			System.arraycopy(deps, 0, newPath, old.length, deps.length);
+			project.setRawClasspath(newPath, null);
+		}
+		return project;
+	}
+
+	protected void createSourceFiles(IJavaProject project, String[] sources) throws CoreException {
+		IProgressMonitor monitor = new NullProgressMonitor();
+		for (int i = 0; i < sources.length; i+= 2) {
+			IPath path = new Path(sources[i]);
+			IPath parentPath = path.removeLastSegments(1);
+			IFolder folder = project.getProject().getFolder(parentPath);
+			if (!folder.exists())
+				this.createFolder(folder.getFullPath());
+			IFile file = project.getProject().getFile(new Path(sources[i]));
+			file.create(new ByteArrayInputStream(sources[i+1].getBytes()), true, monitor);
+		}
+	}
+
 	/**
 	 * Check locally for the required JCL files, <jclName>.jar and <jclName>src.zip.
 	 * If not available, copy from the project resources.
@@ -2849,7 +2941,10 @@
 			newJclLibString = "JCL18_FULL";
 			newJclSrcString = "JCL18_SRC"; // Use the same source
 		} else {
-			if (compliance.charAt(2) > '7') {
+			if (compliance.length() < 3) {
+					newJclLibString = "JCL19_LIB";
+					newJclSrcString = "JCL19_SRC";
+			} else if (compliance.charAt(2) > '7') {
 				newJclLibString = "JCL18_LIB";
 				newJclSrcString = "JCL18_SRC";
 			} else if (compliance.charAt(2) > '4') {
@@ -2894,9 +2989,10 @@
 		IPath jclLib = new Path("JCL_LIB");
 		IPath jcl5Lib = new Path("JCL15_LIB");
 		IPath jcl8Lib = new Path("JCL18_LIB");
+		IPath jcl9Lib = new Path("JCL19_LIB");
 		IPath jclFull = new Path("JCL18_FULL");
 
-		return path.equals(jclLib) || path.equals(jcl5Lib) || path.equals(jcl8Lib) || path.equals(jclFull);
+		return path.equals(jclLib) || path.equals(jcl5Lib) || path.equals(jcl8Lib) || path.equals(jcl9Lib) || path.equals(jclFull);
 	}
 	public void setUpJCLClasspathVariables(String compliance) throws JavaModelException, IOException {
 		setUpJCLClasspathVariables(compliance, false);
@@ -2935,6 +3031,14 @@
 							new IPath[] {getExternalJCLPath("1.8"), getExternalJCLSourcePath("1.8"), getExternalJCLRootSourcePath()},
 							null);
 			}
+		} else if ("9".equals(compliance)) {
+			if (JavaCore.getClasspathVariable("JCL19_LIB") == null) {
+				setupExternalJCL("jclMin9");
+				JavaCore.setClasspathVariables(
+					new String[] {"JCL19_LIB", "JCL19_SRC", "JCL_SRCROOT"},
+					new IPath[] {getExternalJCLPath("9"), getExternalJCLSourcePath("9"), getExternalJCLRootSourcePath()},
+					null);
+			}
 		} else {
 			if (JavaCore.getClasspathVariable("JCL_LIB") == null) {
 				setupExternalJCL("jclMin");
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/AbstractJavaSearchTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/AbstractJavaSearchTests.java
index 387a787..fded20e 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/AbstractJavaSearchTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/AbstractJavaSearchTests.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 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
@@ -316,7 +316,12 @@
 					this.line.append("]");
 				}
 				ICompilationUnit unit = null;
-				if (element instanceof IMethod) {
+				if (element instanceof IModuleDescription) {
+					IModuleDescription md = (IModuleDescription) element;
+					this.line.append(" ");
+					append(md);
+					unit = md.getCompilationUnit();
+				} else if (element instanceof IMethod) {
 					this.line.append(" ");
 					IMethod method = (IMethod)element;
 					append(method);
@@ -596,6 +601,9 @@
 			}
 			this.line.append(")");
 		}
+		private void append(IModuleDescription md) {
+			this.line.append(md.getElementName());
+		}
 		private void append(IPackageFragment pkg) {
 			this.line.append(pkg.getElementName());
 		}
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/AllJavaModelTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/AllJavaModelTests.java
index 24aaeee..4c19df1 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/AllJavaModelTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/AllJavaModelTests.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2016 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 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
@@ -45,6 +45,8 @@
 
 		// Project & Root API unit tests
 		JavaProjectTests.class,
+		// Modularity tests (Java 9)
+		ModuleBuilderTests.class,
 
 		// Compilation unit tests
 		CompilationUnitTests.class,
@@ -202,9 +204,13 @@
 		NullAnnotationModelTests.class,
 		ExternalAnnotations17Test.class,
 		ExternalAnnotations18Test.class,
+		ExternalAnnotations9Test.class,
 
 		// Java model changes related to Java 8
 		JavaElement8Tests.class,
+
+		Java9ElementTests.class,
+		ResolveTests9.class,
 	};
 
 	Class[] deprecatedClasses = getDeprecatedJDOMTestClasses();
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/AllJavaModelTestsTracing.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/AllJavaModelTestsTracing.java
new file mode 100644
index 0000000..8f3bfda
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/AllJavaModelTestsTracing.java
@@ -0,0 +1,22 @@
+/*******************************************************************************
+ * Copyright (c) 2017 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.jdt.core.tests.model;
+
+import org.eclipse.test.TracingSuite;
+import org.eclipse.test.TracingSuite.TracingOptions;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite.SuiteClasses;
+
+@RunWith(TracingSuite.class)
+@SuiteClasses(AllJavaModelTests.class)
+@TracingOptions(stackDumpTimeoutSeconds = 60)
+public class AllJavaModelTestsTracing {
+}
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/AttachSourceTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/AttachSourceTests.java
index 20c9af0..78702dd 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/AttachSourceTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/AttachSourceTests.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 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
@@ -38,6 +38,9 @@
 import org.eclipse.jdt.core.IJavaProject;
 import org.eclipse.jdt.core.IMember;
 import org.eclipse.jdt.core.IMethod;
+import org.eclipse.jdt.core.IModularClassFile;
+import org.eclipse.jdt.core.IModuleDescription;
+import org.eclipse.jdt.core.IOrdinaryClassFile;
 import org.eclipse.jdt.core.IPackageFragment;
 import org.eclipse.jdt.core.IPackageFragmentRoot;
 import org.eclipse.jdt.core.ISourceRange;
@@ -49,6 +52,7 @@
 import org.eclipse.jdt.core.dom.ASTNode;
 import org.eclipse.jdt.core.dom.ASTParser;
 import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
+import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
 import org.eclipse.jdt.internal.core.ExternalFoldersManager;
 import org.eclipse.jdt.internal.core.JarPackageFragmentRoot;
 import org.eclipse.jdt.internal.core.JavaModelManager;
@@ -69,6 +73,14 @@
 	}
 
 	public static Test suite() {
+		String javaVersion = System.getProperty("java.version");
+		if (javaVersion.length() > 3) {
+			javaVersion = javaVersion.substring(0, 3);
+		}
+		long jdkLevel = CompilerOptions.versionToJdkLevel(javaVersion);
+		if (jdkLevel >= ClassFileConstants.JDK9) {
+			isJRE9 = true;
+		}
 		return buildModelTestSuite(AttachSourceTests.class);
 	}
 
@@ -229,11 +241,11 @@
  */
 public void testASTParsing() throws JavaModelException {
 	attachSource(this.pkgFragmentRoot, "/AttachSourceTests/attachsrc.zip", "");
-	IClassFile classFile = this.pkgFragmentRoot.getPackageFragment("x.y").getClassFile("A.class");
+	IClassFile classFile = this.pkgFragmentRoot.getPackageFragment("x.y").getOrdinaryClassFile("A.class");
 	ASTNode node = runConversion(classFile, true);
 	assertNotNull("No node", node);
 	attachSource(this.pkgFragmentRoot, null, null);
-	IClassFile cf = this.pkgFragmentRoot.getPackageFragment("x.y").getClassFile("A.class");
+	IOrdinaryClassFile cf = this.pkgFragmentRoot.getPackageFragment("x.y").getOrdinaryClassFile("A.class");
 	assertTrue("source code should no longer exist for A", cf.getSource() == null);
 	try {
 		node = runConversion(classFile, true);
@@ -248,11 +260,11 @@
  */
 public void testASTParsing2() throws JavaModelException {
 	attachSource(this.pkgFragmentRoot, "/AttachSourceTests/attachsrc.zip", "");
-	IClassFile classFile = this.pkgFragmentRoot.getPackageFragment("x.y").getClassFile("A.class");
+	IClassFile classFile = this.pkgFragmentRoot.getPackageFragment("x.y").getOrdinaryClassFile("A.class");
 	ASTNode node = runConversion(classFile, false);
 	assertNotNull("No node", node);
 	attachSource(this.pkgFragmentRoot, null, null);
-	IClassFile cf = this.pkgFragmentRoot.getPackageFragment("x.y").getClassFile("A.class");
+	IOrdinaryClassFile cf = this.pkgFragmentRoot.getPackageFragment("x.y").getOrdinaryClassFile("A.class");
 	assertTrue("source code should no longer exist for A", cf.getSource() == null);
 	try {
 		node = runConversion(classFile, false);
@@ -266,7 +278,7 @@
  * (regression test for bug 23292 Must restart Eclipse after debug of source in .zip is updated)
  */
 public void testChangeSourceAttachmentFile() throws CoreException {
-	IClassFile cf = this.pkgFragmentRoot.getPackageFragment("x.y").getClassFile("A.class");
+	IOrdinaryClassFile cf = this.pkgFragmentRoot.getPackageFragment("x.y").getOrdinaryClassFile("A.class");
 	IMethod method = cf.getType().getMethod("foo", new String[] {});
 
 	// check initial source
@@ -305,7 +317,7 @@
  * Ensure that a class file with an attached source can retrieve its children given a source index.
  */
 public void testClassFileGetElementAt01() throws JavaModelException {
-	IClassFile classFile = this.pkgFragmentRoot.getPackageFragment("x.y").getClassFile("A.class");
+	IClassFile classFile = this.pkgFragmentRoot.getPackageFragment("x.y").getOrdinaryClassFile("A.class");
 	String source = classFile.getSource();
 	IJavaElement element = classFile.getElementAt(source.indexOf("class A"));
 	assertElementExists(
@@ -317,7 +329,7 @@
  * Ensure that a class file with an attached source can retrieve its children given a source index.
  */
 public void testClassFileGetElementAt02() throws JavaModelException {
-	IClassFile classFile = this.pkgFragmentRoot.getPackageFragment("x.y").getClassFile("A.class");
+	IClassFile classFile = this.pkgFragmentRoot.getPackageFragment("x.y").getOrdinaryClassFile("A.class");
 	String source = classFile.getSource();
 	IJavaElement element = classFile.getElementAt(source.indexOf("public A"));
 	assertElementExists(
@@ -329,7 +341,7 @@
  * Ensure that a class file with an attached source can retrieve its children given a source index.
  */
 public void testClassFileGetElementAt03() throws JavaModelException {
-	IClassFile classFile = this.pkgFragmentRoot.getPackageFragment("x.y").getClassFile("A.class");
+	IClassFile classFile = this.pkgFragmentRoot.getPackageFragment("x.y").getOrdinaryClassFile("A.class");
 	String source = classFile.getSource();
 	IJavaElement element = classFile.getElementAt(source.indexOf("void foo"));
 	assertElementExists(
@@ -347,7 +359,7 @@
 	attachSource(root, "/AttachSourceTests/innerClassessrc.zip", null);
 	IPackageFragment fragment = root.getPackageFragment("inner");
 
-	IClassFile classFile = fragment.getClassFile("X$V.class");
+	IClassFile classFile = fragment.getOrdinaryClassFile("X$V.class");
 	String source = classFile.getSource();
 	IJavaElement element = classFile.getElementAt(source.indexOf("V(String s)"));
 	assertElementExists(
@@ -373,7 +385,7 @@
  * the entire CU for "A.java".
  */
 public void testClassRetrieval() throws JavaModelException {
-	IClassFile objectCF = this.pkgFragmentRoot.getPackageFragment("x.y").getClassFile("A.class");
+	IClassFile objectCF = this.pkgFragmentRoot.getPackageFragment("x.y").getOrdinaryClassFile("A.class");
 	assertTrue("source code does not exist for the entire attached compilation unit", objectCF.getSource() != null);
 }
 /**
@@ -381,7 +393,7 @@
  */
 public void testDetachSource() throws JavaModelException {
 	attachSource(this.pkgFragmentRoot, null, null);
-	IClassFile cf = this.pkgFragmentRoot.getPackageFragment("x.y").getClassFile("A.class");
+	IOrdinaryClassFile cf = this.pkgFragmentRoot.getPackageFragment("x.y").getOrdinaryClassFile("A.class");
 	assertTrue("source code should no longer exist for A", cf.getSource() == null);
 	assertTrue("name range should no longer exist for A", cf.getType().getNameRange().getOffset() == -1);
 	assertTrue("source range should no longer exist for A", cf.getType().getSourceRange().getOffset() == -1);
@@ -399,7 +411,7 @@
 		IJavaProject javaProject = createJavaProject("P2", new String[0], new String[] {"/P1/lib"}, "");
 		IPackageFragmentRoot root = javaProject.getPackageFragmentRoot(lib);
 		attachSource(root, getExternalFolder() + "/src", "");
-		IType type = root.getPackageFragment("p").getClassFile("X.class").getType();
+		IType type = root.getPackageFragment("p").getOrdinaryClassFile("X.class").getType();
 		assertSourceEquals(
 			"Unexpected source",
 			"public class X {\n" +
@@ -422,7 +434,7 @@
 		IJavaProject javaProject = createJavaProject("P2", new String[0], new String[] {externalLib}, "");
 		IPackageFragmentRoot root = javaProject.getPackageFragmentRoot(externalLib);
 		attachSource(root, "/P1/src", "");
-		IType type = root.getPackageFragment("p").getClassFile("X.class").getType();
+		IType type = root.getPackageFragment("p").getOrdinaryClassFile("X.class").getType();
 		assertSourceEquals(
 			"Unexpected source",
 			"public class X {\n" +
@@ -442,7 +454,7 @@
 		IJavaProject javaProject = createJavaProject("P", new String[0], new String[] {externalLib}, "");
 		IPackageFragmentRoot root = javaProject.getPackageFragmentRoot(externalLib);
 		attachSource(root, getExternalFolder() + "/src", "");
-		IType type = root.getPackageFragment("p").getClassFile("X.class").getType();
+		IType type = root.getPackageFragment("p").getOrdinaryClassFile("X.class").getType();
 		assertSourceEquals(
 			"Unexpected source",
 			"public class X {\n" +
@@ -480,7 +492,7 @@
 		IJavaProject javaProject = createJavaProject("P", new String[0], new String[] {externalLib}, "");
 		IPackageFragmentRoot root = javaProject.getPackageFragmentRoot(externalLib);
 		attachSource(root, externalFolder + "/src227813", "");
-		IType type = root.getPackageFragment("p").getClassFile("X.class").getType();
+		IType type = root.getPackageFragment("p").getOrdinaryClassFile("X.class").getType();
 		assertSourceEquals(
 			"Unexpected source",
 			"public class X {\n" +
@@ -541,7 +553,7 @@
 		}
 		IPackageFragmentRoot root = javaProject.getPackageFragmentRoot(externalLib);
 		attachSource(root, externalFolder + "/src228639", "");
-		IType type = root.getPackageFragment("p").getClassFile("X.class").getType();
+		IType type = root.getPackageFragment("p").getOrdinaryClassFile("X.class").getType();
 		assertSourceEquals(
 			"Unexpected source",
 			"public class X {\n" +
@@ -564,7 +576,7 @@
 		IJavaProject javaProject = createJavaProject("P2", new String[0], new String[] {"/P1/lib"}, "");
 		IPackageFragmentRoot root = javaProject.getPackageFragmentRoot(lib);
 		attachSource(root, getExternalFolder() + "/src.abc", "");
-		IType type = root.getPackageFragment("p").getClassFile("X.class").getType();
+		IType type = root.getPackageFragment("p").getOrdinaryClassFile("X.class").getType();
 		assertSourceEquals(
 			"Unexpected source",
 			"public class X {\n" +
@@ -587,7 +599,7 @@
 		IJavaProject javaProject = createJavaProject("P2", new String[0], new String[] {externalLib}, "");
 		IPackageFragmentRoot root = javaProject.getPackageFragmentRoot(externalLib);
 		attachSource(root, "/P1/src", "");
-		IType type = root.getPackageFragment("p").getClassFile("X.class").getType();
+		IType type = root.getPackageFragment("p").getOrdinaryClassFile("X.class").getType();
 		assertSourceEquals(
 			"Unexpected source",
 			"public class X {\n" +
@@ -607,7 +619,7 @@
 		IJavaProject javaProject = createJavaProject("P", new String[0], new String[] {externalLib}, "");
 		IPackageFragmentRoot root = javaProject.getPackageFragmentRoot(externalLib);
 		attachSource(root, getExternalFolder() + "/src.abc", "");
-		IType type = root.getPackageFragment("p").getClassFile("X.class").getType();
+		IType type = root.getPackageFragment("p").getOrdinaryClassFile("X.class").getType();
 		assertSourceEquals(
 			"Unexpected source",
 			"public class X {\n" +
@@ -630,7 +642,7 @@
 		IJavaProject javaProject = createJavaProject("P2", new String[0], new String[] {"/P1/lib.abc"}, "");
 		IPackageFragmentRoot root = javaProject.getPackageFragmentRoot(lib);
 		attachSource(root, "/P1/src.abc", "");
-		IType type = root.getPackageFragment("p").getClassFile("X.class").getType();
+		IType type = root.getPackageFragment("p").getOrdinaryClassFile("X.class").getType();
 		assertSourceEquals(
 			"Unexpected source",
 			"public class X {\n" +
@@ -679,7 +691,7 @@
 	IJavaProject project = this.getJavaProject("/AttachSourceTests");
 	IPackageFragmentRoot root = project.getPackageFragmentRoot(getFile("/AttachSourceTests/generic.jar"));
 	attachSource(root, "/AttachSourceTests/genericsrc.zip", null);
-	IType type = root.getPackageFragment("generic").getClassFile("X.class").getType();
+	IType type = root.getPackageFragment("generic").getOrdinaryClassFile("X.class").getType();
 	IMethod method = type.getMethod("foo", new String[] {"QX<QT;>;"});
 	assertSourceEquals(
 		"Unexpected source",
@@ -695,7 +707,7 @@
 	IJavaProject project = this.getJavaProject("/AttachSourceTests");
 	IPackageFragmentRoot root = project.getPackageFragmentRoot(getFile("/AttachSourceTests/generic.jar"));
 	attachSource(root, "/AttachSourceTests/genericsrc.zip", null);
-	IType type = root.getPackageFragment("generic").getClassFile("X.class").getType();
+	IType type = root.getPackageFragment("generic").getOrdinaryClassFile("X.class").getType();
 	IMethod method = type.getMethod("foo", new String[] {"QK;", "QV;"});
 	assertSourceEquals(
 		"Unexpected source",
@@ -713,7 +725,7 @@
 	IJavaProject project = this.getJavaProject("/AttachSourceTests");
 	IPackageFragmentRoot root = project.getPackageFragmentRoot(getFile("/AttachSourceTests/generic.jar"));
 	attachSource(root, "/AttachSourceTests/genericsrc.zip", null);
-	IType type = root.getPackageFragment("generic").getClassFile("X.class").getType();
+	IType type = root.getPackageFragment("generic").getOrdinaryClassFile("X.class").getType();
 	IMethod method = type.getMethod("foo", new String[] {"I", "Lgeneric.X<[Ljava.lang.Object;>;"});
 	assertSourceEquals(
 		"Unexpected source",
@@ -726,7 +738,7 @@
 	IJavaProject project = this.getJavaProject("/AttachSourceTests");
 	IPackageFragmentRoot root = project.getPackageFragmentRoot(getFile("/AttachSourceTests/generic.jar"));
 	attachSource(root, "/AttachSourceTests/genericsrc.zip", null);
-	IType type = root.getPackageFragment("generic").getClassFile("X.class").getType();
+	IType type = root.getPackageFragment("generic").getOrdinaryClassFile("X.class").getType();
 	IMethod method = type.getMethod("foo", new String[] {"Z", "Lgeneric.X<+Lgeneric.X;>;"});
 	assertSourceEquals(
 		"Unexpected source",
@@ -739,7 +751,7 @@
 	IJavaProject project = this.getJavaProject("/AttachSourceTests");
 	IPackageFragmentRoot root = project.getPackageFragmentRoot(getFile("/AttachSourceTests/generic.jar"));
 	attachSource(root, "/AttachSourceTests/genericsrc.zip", null);
-	IType type = root.getPackageFragment("generic").getClassFile("X.class").getType();
+	IType type = root.getPackageFragment("generic").getOrdinaryClassFile("X.class").getType();
 	IMethod method = type.getMethod("foo", new String[] {"F", "Lgeneric.X<*>;"});
 	assertSourceEquals(
 		"Unexpected source",
@@ -752,7 +764,7 @@
 	IJavaProject project = this.getJavaProject("/AttachSourceTests");
 	IPackageFragmentRoot root = project.getPackageFragmentRoot(getFile("/AttachSourceTests/generic.jar"));
 	attachSource(root, "/AttachSourceTests/genericsrc.zip", null);
-	IType type = root.getPackageFragment("generic").getClassFile("X.class").getType();
+	IType type = root.getPackageFragment("generic").getOrdinaryClassFile("X.class").getType();
 	IMethod method = type.getMethod("foo", new String[] {"Lgeneric.Y<+Ljava.lang.Integer;+Ljava.lang.Object;>;"});
 	assertSourceEquals(
 		"Unexpected source",
@@ -765,7 +777,7 @@
 	IJavaProject project = this.getJavaProject("/AttachSourceTests");
 	IPackageFragmentRoot root = project.getPackageFragmentRoot(getFile("/AttachSourceTests/generic.jar"));
 	attachSource(root, "/AttachSourceTests/genericsrc.zip", null);
-	IType type = root.getPackageFragment("generic").getClassFile("X.class").getType();
+	IType type = root.getPackageFragment("generic").getOrdinaryClassFile("X.class").getType();
 	IMethod method = type.getMethod("foo", new String[] {"Lgeneric.Z.Inner<Ljava.lang.Object;>;"});
 	assertSourceEquals(
 		"Unexpected source",
@@ -778,7 +790,7 @@
 	IJavaProject project = this.getJavaProject("/AttachSourceTests");
 	IPackageFragmentRoot root = project.getPackageFragmentRoot(getFile("/AttachSourceTests/generic.jar"));
 	attachSource(root, "/AttachSourceTests/genericsrc.zip", null);
-	IType type = root.getPackageFragment("generic").getClassFile("X.class").getType();
+	IType type = root.getPackageFragment("generic").getOrdinaryClassFile("X.class").getType();
 	IMethod method = type.getMethod("foo", new String[] {"Lgeneric.AType<Ljava.lang.Object;>;"});
 	assertSourceEquals(
 		"Unexpected source",
@@ -792,7 +804,7 @@
  * mapped source.
  */
 public void testGetNameRange01() throws JavaModelException {
-	IClassFile classFile = this.pkgFragmentRoot.getPackageFragment("x.y").getClassFile("A.class");
+	IOrdinaryClassFile classFile = this.pkgFragmentRoot.getPackageFragment("x.y").getOrdinaryClassFile("A.class");
 	IMethod method = classFile.getType().getMethod("foo", null);
 	assertSourceEquals("Unexpected name source", "foo", getNameSource(classFile.getSource(), method));
 }
@@ -801,7 +813,7 @@
  * mapped source.
  */
 public void testGetNameRange02() throws JavaModelException {
-	IClassFile classFile = this.pkgFragmentRoot.getPackageFragment("x.y").getClassFile("A.class");
+	IOrdinaryClassFile classFile = this.pkgFragmentRoot.getPackageFragment("x.y").getOrdinaryClassFile("A.class");
 	assertSourceEquals("Unexpected name source", "A", getNameSource(classFile.getSource(), classFile.getType()));
 }
 /*
@@ -814,7 +826,7 @@
 	attachSource(root, "/AttachSourceTests/innerClassessrc.zip", null);
 	IPackageFragment fragment = root.getPackageFragment("inner");
 
-	IClassFile classFile = fragment.getClassFile("X$V.class");
+	IOrdinaryClassFile classFile = fragment.getOrdinaryClassFile("X$V.class");
 	IMethod constructor = classFile.getType().getMethod("V", new String[] {"Linner.X;", "Ljava.lang.String;"});
 	assertSourceEquals("Unexpected name source", "V", getNameSource(classFile.getSource(), constructor));
 
@@ -827,7 +839,7 @@
 	attachSource(root, "/AttachSourceTests/innerClassessrc.zip", null);
 	IPackageFragment fragment = root.getPackageFragment("inner");
 
-	IClassFile classFile = fragment.getClassFile("X$Inner.class");
+	IOrdinaryClassFile classFile = fragment.getOrdinaryClassFile("X$Inner.class");
 	IMethod[] methods = classFile.getType().getMethods();
 	for (int i = 0; i < methods.length; i++) {
 		IMethod iMethod = methods[i];
@@ -851,7 +863,7 @@
  * mapped source.
  */
 public void testGetSourceRange() throws JavaModelException {
-	IClassFile cf = this.pkgFragmentRoot.getPackageFragment("x.y").getClassFile("A.class");
+	IOrdinaryClassFile cf = this.pkgFragmentRoot.getPackageFragment("x.y").getOrdinaryClassFile("A.class");
 	ISourceRange sourceRange = cf.getSourceRange();
 	assertTrue("Class file should have associated source range", sourceRange != null);
 	assertEquals("Unexpected offset", 0, sourceRange.getOffset());
@@ -862,7 +874,7 @@
  * mapped source.
  */
 public void testGetSourceRangeInnerClass() throws JavaModelException {
-	IClassFile cf = this.pkgFragmentRoot.getPackageFragment("x.y").getClassFile("A$Inner.class");
+	IOrdinaryClassFile cf = this.pkgFragmentRoot.getPackageFragment("x.y").getOrdinaryClassFile("A$Inner.class");
 	ISourceRange sourceRange = cf.getSourceRange();
 	assertTrue("Inner class file should have associated source range", sourceRange != null);
 	assertEquals("Unexpected offset", 0, sourceRange.getOffset());
@@ -877,7 +889,7 @@
 	attachSource(root, "/AttachSourceTests/innerClassessrc.zip", null);
 	IPackageFragment fragment = root.getPackageFragment("inner");
 
-	IType type = fragment.getClassFile("X.class").getType();
+	IType type = fragment.getOrdinaryClassFile("X.class").getType();
 	assertSourceEquals(
 		"Unexpected source",
 		"public class X {\n" +
@@ -926,7 +938,7 @@
 	attachSource(root, "/AttachSourceTests/innerClassessrc.zip", null);
 	IPackageFragment fragment = root.getPackageFragment("inner");
 
-	IType type = fragment.getClassFile("X$1.class").getType();
+	IType type = fragment.getOrdinaryClassFile("X$1.class").getType();
 	assertSourceEquals(
 		"Unexpected source",
 		"new X() {}",
@@ -942,7 +954,7 @@
 	attachSource(root, "/AttachSourceTests/innerClassessrc.zip", null);
 	IPackageFragment fragment = root.getPackageFragment("inner");
 
-	IType type = fragment.getClassFile("X$2.class").getType();
+	IType type = fragment.getOrdinaryClassFile("X$2.class").getType();
 	assertSourceEquals(
 		"Unexpected source",
 		"new Y() {\n" +
@@ -960,7 +972,7 @@
 	attachSource(root, "/AttachSourceTests/innerClassessrc.zip", null);
 	IPackageFragment fragment = root.getPackageFragment("inner");
 
-	IType type = fragment.getClassFile("X$3.class").getType();
+	IType type = fragment.getOrdinaryClassFile("X$3.class").getType();
 	assertSourceEquals(
 		"Unexpected source",
 		"new W() {}",
@@ -976,7 +988,7 @@
 	attachSource(root, "/AttachSourceTests/innerClassessrc.zip", null);
 	IPackageFragment fragment = root.getPackageFragment("inner");
 
-	IType type = fragment.getClassFile("X$1$Y.class").getType();
+	IType type = fragment.getOrdinaryClassFile("X$1$Y.class").getType();
 	assertSourceEquals(
 		"Unexpected source",
 		"class Y {}",
@@ -992,7 +1004,7 @@
 	attachSource(root, "/AttachSourceTests/innerClassessrc.zip", null);
 	IPackageFragment fragment = root.getPackageFragment("inner");
 
-	IType type = fragment.getClassFile("X$1$W.class").getType();
+	IType type = fragment.getOrdinaryClassFile("X$1$W.class").getType();
 	assertSourceEquals(
 		"Unexpected source",
 		"class W {\n" +
@@ -1012,7 +1024,7 @@
 	attachSource(root, "/AttachSourceTests/innerClassessrc.zip", null);
 	IPackageFragment fragment = root.getPackageFragment("inner");
 
-	IType type = fragment.getClassFile("X$2$Z.class").getType();
+	IType type = fragment.getOrdinaryClassFile("X$2$Z.class").getType();
 	assertSourceEquals(
 		"Unexpected source",
 		"class Z {}",
@@ -1028,7 +1040,7 @@
 	attachSource(root, "/AttachSourceTests/innerClassessrc.zip", null);
 	IPackageFragment fragment = root.getPackageFragment("inner");
 
-	IType type = fragment.getClassFile("X$V.class").getType();
+	IType type = fragment.getOrdinaryClassFile("X$V.class").getType();
 	assertSourceEquals(
 		"Unexpected source",
 		"class V {\n" +
@@ -1048,7 +1060,7 @@
 	attachSource(root, "/AttachSourceTests/innerClassessrc.zip", null);
 	IPackageFragment fragment = root.getPackageFragment("inner");
 
-	IType type = fragment.getClassFile("X$4$U.class").getType();
+	IType type = fragment.getOrdinaryClassFile("X$4$U.class").getType();
 	assertSourceEquals(
 		"Unexpected source",
 		"class U {\n" +
@@ -1065,7 +1077,7 @@
 	attachSource(root, "/AttachSourceTests/innerClassessrc.zip", null);
 	IPackageFragment fragment = root.getPackageFragment("inner");
 
-	IType type = fragment.getClassFile("X$Inner$WW.class").getType();
+	IType type = fragment.getOrdinaryClassFile("X$Inner$WW.class").getType();
 	assertSourceEquals(
 		"Unexpected source",
 		"class WW {\n" + 
@@ -1075,7 +1087,7 @@
 		"      }\n" + 
 		"    }",
 		type.getSource());
-	type = fragment.getClassFile("X$Inner$WW$WWW.class").getType();
+	type = fragment.getOrdinaryClassFile("X$Inner$WW$WWW.class").getType();
 	assertSourceEquals(
 		"Unexpected source",
 		"class WWW {\n" + 
@@ -1091,7 +1103,7 @@
 	IPackageFragmentRoot root = this.getPackageFragmentRoot("/AttachSourceTests/lib");
 	attachSource(root, "/AttachSourceTests/srcLib", "");
 
-	IClassFile cf = root.getPackageFragment("p").getClassFile("X.class");
+	IOrdinaryClassFile cf = root.getPackageFragment("p").getOrdinaryClassFile("X.class");
 	assertSourceEquals(
 		"Unexpected source for class file",
 		"package p;\n" +
@@ -1105,7 +1117,7 @@
  * Retrieves the source code for methods of class A.
  */
 public void testMethodRetrieval() throws JavaModelException {
-	IClassFile cf = this.pkgFragmentRoot.getPackageFragment("x.y").getClassFile("A.class");
+	IOrdinaryClassFile cf = this.pkgFragmentRoot.getPackageFragment("x.y").getOrdinaryClassFile("A.class");
 	IMethod[] methods = cf.getType().getMethods();
 	for (int i = 0; i < methods.length; i++) {
 		IMethod method = methods[i];
@@ -1143,7 +1155,7 @@
 		IJavaProject javaProject = createJavaProject("P2", new String[]{""}, new String[]{"/P1"}, "");
 		IPackageFragmentRoot root = javaProject.getPackageFragmentRoot(p1);
 		attachSource(root, "/P1", null);
-		IClassFile cf = root.getPackageFragment("p").getClassFile("X.class");
+		IOrdinaryClassFile cf = root.getPackageFragment("p").getOrdinaryClassFile("X.class");
 		assertSourceEquals(
 			"Unexpected source for class file P1/p/X.class",
 			"package p;\n" +
@@ -1174,7 +1186,7 @@
 		IJavaProject javaProject = createJavaProject("P2", new String[]{""}, new String[]{"/P1"}, "");
 		IPackageFragmentRoot root = javaProject.getPackageFragmentRoot(p1);
 		attachSource(root, "/P1", null);
-		IClassFile cf = root.getPackageFragment("").getClassFile("X.class");
+		IOrdinaryClassFile cf = root.getPackageFragment("").getOrdinaryClassFile("X.class");
 		assertSourceEquals(
 			"Unexpected source for class file P1/X.class",
 			"public class X {\n" +
@@ -1200,7 +1212,7 @@
 			"public class Test {}");
 		IPackageFragmentRoot root = javaProject.getPackageFragmentRoot(getFile("/AttachSourceTests/test.jar"));
 		attachSource(root, "/Test", null);
-		IClassFile cf = root.getPackageFragment("test1").getClassFile("Test.class");
+		IOrdinaryClassFile cf = root.getPackageFragment("test1").getOrdinaryClassFile("Test.class");
 		assertSourceEquals(
 			"Unexpected source for class file test1/Test.class",
 			"package test1;\n" +
@@ -1225,7 +1237,7 @@
 		JavaCore.initializeAfterLoad(null);
 
 		// ensure source is correct
-		IClassFile cf = this.pkgFragmentRoot.getPackageFragment("x.y").getClassFile("A.class");
+		IOrdinaryClassFile cf = this.pkgFragmentRoot.getPackageFragment("x.y").getOrdinaryClassFile("A.class");
 		IMethod method = cf.getType().getMethod("foo", new String[] {});
 		assertSourceEquals(
 			"unexpected source for foo()",
@@ -1249,10 +1261,10 @@
 	JarPackageFragmentRoot root = (JarPackageFragmentRoot) project.getPackageFragmentRoot(jar);
 	root.attachSource(srcZip.getFullPath(), new Path("src/nested"), null);
 
-	IClassFile cf = root.getPackageFragment("x.y").getClassFile("B.class");
+	IOrdinaryClassFile cf = root.getPackageFragment("x.y").getOrdinaryClassFile("B.class");
 	assertTrue("source code does not exist for the entire attached compilation unit", cf.getSource() != null);
 	root.close();
-	cf = root.getPackageFragment("x.y").getClassFile("B.class");
+	cf = root.getPackageFragment("x.y").getOrdinaryClassFile("B.class");
 	assertTrue("source code does not exist for the entire attached compilation unit", cf.getSource() != null);
 
 	IPath rootSAPath= root.getSourceAttachmentRootPath();
@@ -1274,7 +1286,7 @@
 	JarPackageFragmentRoot root = (JarPackageFragmentRoot) project.getPackageFragmentRoot(jar);
 	root.attachSource(srcZip.getFullPath(), new Path(""), null);
 
-	IClassFile cf = root.getPackageFragment("x.y").getClassFile("B.class");
+	IOrdinaryClassFile cf = root.getPackageFragment("x.y").getOrdinaryClassFile("B.class");
 	assertTrue("source code does not exist for the entire attached compilation unit", cf.getSource() != null);
 	root.close();
 }
@@ -1286,7 +1298,7 @@
 	IPackageFragmentRoot root = this.getPackageFragmentRoot("/AttachSourceTests/lib");
 	attachSource(root, "/AttachSourceTests/srcLib", "invalid");
 
-	IClassFile cf = root.getPackageFragment("p").getClassFile("X.class");
+	IOrdinaryClassFile cf = root.getPackageFragment("p").getOrdinaryClassFile("X.class");
 	assertSourceEquals(
 		"Unexpected source for class file",
 		"package p;\n" +
@@ -1305,7 +1317,7 @@
 	IPackageFragmentRoot root = project.getPackageFragmentRoot(getFile("/AttachSourceTests/test.jar"));
 	attachSource(root, "/AttachSourceTests/src.zip", "invalid");
 
-	IClassFile cf = root.getPackageFragment("test1").getClassFile("Test.class");
+	IOrdinaryClassFile cf = root.getPackageFragment("test1").getOrdinaryClassFile("Test.class");
 	assertSourceEquals(
 		"Unexpected source for class file",
 		"package test1;\n" +
@@ -1322,7 +1334,7 @@
 	IPackageFragmentRoot root = project.getPackageFragmentRoot(getFile("/AttachSourceTests/update.jar"));
 	attachSource(root, "/AttachSourceTests/src.zip", "invalid");
 
-	IClassFile cf = root.getPackageFragment("p1.p2").getClassFile("A.class");
+	IOrdinaryClassFile cf = root.getPackageFragment("p1.p2").getOrdinaryClassFile("A.class");
 	assertSourceEquals(
 		"Unexpected source for class file",
 		"package p1.p2;\n" +
@@ -1330,7 +1342,7 @@
 		"public class A {}",
 		cf.getSource());
 
-	cf = root.getPackageFragment("").getClassFile("B.class");
+	cf = root.getPackageFragment("").getOrdinaryClassFile("B.class");
 	assertSourceEquals(
 		"Unexpected source for class file",
 		"public class B {}",
@@ -1346,7 +1358,7 @@
 	IPackageFragmentRoot root = project.getPackageFragmentRoot(getFile("/AttachSourceTests/update.jar"));
 	attachSource(root, "/AttachSourceTests/src.zip", null);
 
-	IClassFile cf = root.getPackageFragment("p1.p2").getClassFile("A.class");
+	IOrdinaryClassFile cf = root.getPackageFragment("p1.p2").getOrdinaryClassFile("A.class");
 	assertSourceEquals(
 		"Unexpected source for class file",
 		"package p1.p2;\n" +
@@ -1354,7 +1366,7 @@
 		"public class A {}",
 		cf.getSource());
 
-	cf = root.getPackageFragment("").getClassFile("B.class");
+	cf = root.getPackageFragment("").getOrdinaryClassFile("B.class");
 	assertSourceEquals(
 		"Unexpected source for class file",
 		"public class B {}",
@@ -1370,7 +1382,7 @@
 	IPackageFragmentRoot root = project.getPackageFragmentRoot(getFile("/AttachSourceTests/full.jar"));
 	attachSource(root, "/AttachSourceTests/src.zip", null);
 
-	IClassFile cf = root.getPackageFragment("p1.p2").getClassFile("A.class");
+	IOrdinaryClassFile cf = root.getPackageFragment("p1.p2").getOrdinaryClassFile("A.class");
 	assertSourceEquals(
 		"Unexpected source for class file",
 		"package p1.p2;\n" +
@@ -1378,13 +1390,13 @@
 		"public class A {}",
 		cf.getSource());
 
-	cf = root.getPackageFragment("").getClassFile("B.class");
+	cf = root.getPackageFragment("").getOrdinaryClassFile("B.class");
 	assertSourceEquals(
 		"Unexpected source for class file",
 		"public class B {}",
 		cf.getSource());
 
-	cf = root.getPackageFragment("test1").getClassFile("Test.class");
+	cf = root.getPackageFragment("test1").getOrdinaryClassFile("Test.class");
 	assertSourceEquals(
 		"Unexpected source for class file",
 		"package test1;\n" +
@@ -1402,7 +1414,7 @@
 	IPackageFragmentRoot root = project.getPackageFragmentRoot(getFile("/AttachSourceTests/full.jar"));
 	attachSource(root, "/AttachSourceTests/fullsrc.zip", null);
 
-	IClassFile cf = root.getPackageFragment("p1.p2").getClassFile("A.class");
+	IOrdinaryClassFile cf = root.getPackageFragment("p1.p2").getOrdinaryClassFile("A.class");
 	assertSourceEquals(
 		"Unexpected source for class file",
 		"package p1.p2;\n" +
@@ -1410,13 +1422,13 @@
 		"public class A {}",
 		cf.getSource());
 
-	cf = root.getPackageFragment("").getClassFile("B.class");
+	cf = root.getPackageFragment("").getOrdinaryClassFile("B.class");
 	assertSourceEquals(
 		"Unexpected source for class file",
 		"public class B {}",
 		cf.getSource());
 
-	cf = root.getPackageFragment("test1").getClassFile("Test.class");
+	cf = root.getPackageFragment("test1").getOrdinaryClassFile("Test.class");
 	assertSourceEquals(
 		"Unexpected source for class file",
 		"package test1;\n" +
@@ -1434,7 +1446,7 @@
 	IPackageFragmentRoot root = project.getPackageFragmentRoot(getFile("/AttachSourceTests/full.jar"));
 	attachSource(root, "/AttachSourceTests/fullsrc.zip", "invalid");
 
-	IClassFile cf = root.getPackageFragment("p1.p2").getClassFile("A.class");
+	IOrdinaryClassFile cf = root.getPackageFragment("p1.p2").getOrdinaryClassFile("A.class");
 	assertSourceEquals(
 		"Unexpected source for class file",
 		"package p1.p2;\n" +
@@ -1442,13 +1454,13 @@
 		"public class A {}",
 		cf.getSource());
 
-	cf = root.getPackageFragment("").getClassFile("B.class");
+	cf = root.getPackageFragment("").getOrdinaryClassFile("B.class");
 	assertSourceEquals(
 		"Unexpected source for class file",
 		"public class B {}",
 		cf.getSource());
 
-	cf = root.getPackageFragment("test1").getClassFile("Test.class");
+	cf = root.getPackageFragment("test1").getOrdinaryClassFile("Test.class");
 	assertSourceEquals(
 		"Unexpected source for class file",
 		"package test1;\n" +
@@ -1466,7 +1478,7 @@
 	IPackageFragmentRoot root = project.getPackageFragmentRoot(getFile("/AttachSourceTests/test2.jar"));
 	attachSource(root, "/AttachSourceTests/test2.jar", null);
 
-	IClassFile cf = root.getPackageFragment("p").getClassFile("X.class");
+	IOrdinaryClassFile cf = root.getPackageFragment("p").getOrdinaryClassFile("X.class");
 	assertSourceEquals(
 		"Unexpected source for class file",
 		"package p;\n" +
@@ -1487,7 +1499,7 @@
 	IPackageFragmentRoot root = project.getPackageFragmentRoot(getFile("/AttachSourceTests/test4.jar"));
 	attachSource(root, "/AttachSourceTests/test4_src.zip", null);
 
-	IClassFile cf = root.getPackageFragment("P1").getClassFile("D.class");
+	IOrdinaryClassFile cf = root.getPackageFragment("P1").getOrdinaryClassFile("D.class");
 	assertSourceEquals(
 		"Unexpected source for class file P1.D",
 		"package P1;\n" +
@@ -1495,7 +1507,7 @@
 		"public class D {}",
 		cf.getSource());
 
-	cf = root.getPackageFragment("P1.p2").getClassFile("A.class");
+	cf = root.getPackageFragment("P1.p2").getOrdinaryClassFile("A.class");
 	assertSourceEquals(
 		"Unexpected source for class file P1.p2.A",
 		"package P1.p2;\n" +
@@ -1516,7 +1528,7 @@
 	IPackageFragmentRoot root = project.getPackageFragmentRoot(getFile("/AttachSourceTests/test5.jar"));
 	attachSource(root, "/AttachSourceTests/test5.jar", null);
 
-	IClassFile cf = root.getPackageFragment("p1.p2").getClassFile("X.class");
+	IOrdinaryClassFile cf = root.getPackageFragment("p1.p2").getOrdinaryClassFile("X.class");
 	assertSourceEquals(
 		"Unexpected source for class file",
 		"package p1.p2;\n" +
@@ -1536,7 +1548,7 @@
 
 	try {
 		// check the javadoc source range in a class file
-		IClassFile cf = root.getPackageFragment("p1.p2").getClassFile("X.class");
+		IOrdinaryClassFile cf = root.getPackageFragment("p1.p2").getOrdinaryClassFile("X.class");
 		assertNotNull(cf);
 		final String source = cf.getSource();
 		assertNotNull("No source", source);
@@ -1612,14 +1624,14 @@
 	IPackageFragmentRoot root = project.getPackageFragmentRoot(this.getFile("/AttachSourceTests/test7.jar"));
 	attachSource(root, "/AttachSourceTests/test7src/", null);
 	
-	IClassFile cf = root.getPackageFragment("p1.p2").getClassFile("X.class");
+	IOrdinaryClassFile cf = root.getPackageFragment("p1.p2").getOrdinaryClassFile("X.class");
 	assertSourceEquals(
 		"Unexpected source for class file",
 		"package p1.p2;\n" +
 		"public class X {\n" +
 		"}",
 		cf.getSource());
-	cf = root.getPackageFragment("tests.p1").getClassFile("TestforX.class");
+	cf = root.getPackageFragment("tests.p1").getOrdinaryClassFile("TestforX.class");
 	assertSourceEquals(
 		"Unexpected source for class file",
 		"package tests.p1;\n" +
@@ -1638,7 +1650,7 @@
 
 	try {
 		// Get class file type from jar
-		IClassFile cf = root.getPackageFragment("test").getClassFile("Test.class");
+		IOrdinaryClassFile cf = root.getPackageFragment("test").getOrdinaryClassFile("Test.class");
 		assertNotNull(cf);
 		final String source = cf.getSource();
 		assertNotNull("No source", source);
@@ -1677,7 +1689,7 @@
 	IPackageFragmentRoot root = project.getPackageFragmentRoot(getFile("/AttachSourceTests/267046.jar"));
 	attachSource(root, "/AttachSourceTests/267046_src.zip", null);
 
-	IClassFile cf = root.getPackageFragment("test").getClassFile("Foo.class");
+	IOrdinaryClassFile cf = root.getPackageFragment("test").getOrdinaryClassFile("Foo.class");
 	assertSourceEquals(
 		"Unexpected source for class file",
 		"package test;\n" + 
@@ -1737,9 +1749,9 @@
 	attachSource(root, "/AttachSourceTests/innerClassessrc.zip", null);
 	IPackageFragment fragment = root.getPackageFragment("inner");
 
-	IClassFile classFile = fragment.getClassFile("X$V.class");
+	IClassFile classFile = fragment.getOrdinaryClassFile("X$V.class");
 	IBuffer buffer = classFile.getBuffer();
-	classFile = fragment.getClassFile("X.class");
+	classFile = fragment.getOrdinaryClassFile("X.class");
 	IBuffer buffer2 = classFile.getBuffer();
 	assertTrue("Same buffer is not reused", buffer2 == buffer);
 	attachSource(root, null, null); // detach source
@@ -1752,7 +1764,7 @@
 	IPackageFragmentRoot root = project.getPackageFragmentRoot(getFile("/AttachSourceTests/generic.jar"));
 	attachSource(root, "/AttachSourceTests/genericsrc.zip", null);
 	
-	IClassFile cf = root.getPackageFragment("").getClassFile("Container$Inner.class");
+	IOrdinaryClassFile cf = root.getPackageFragment("").getOrdinaryClassFile("Container$Inner.class");
 	final IType type = cf.getType();
 	final IMethod[] methods = type.getMethods();
 	assertEquals("wrong size", 1, methods.length);
@@ -1830,4 +1842,54 @@
 		JavaCore.setOptions(javaCoreOptions);
 	}
 }
+public void testModule1() throws CoreException, IOException {
+	if (!isJRE9) {
+		System.err.println(this.getClass().getName()+'.'+getName()+" needs a Java 9 JRE - skipped");
+		return;
+	}
+	try {
+		IJavaProject javaProject = createJavaProject("Test", new String[]{"src"}, null, "bin", JavaCore.VERSION_9);
+		createFolder("/Test/src/test1");
+		createFile("/Test/src/test1/Test.java",
+			"package test1;\n" +
+			"\n" +
+			"public class Test {}");
+		createFile("/Test/src/module-info.java",
+			"module test {\n" +
+			"	requires mod.one;\n" +
+			"	exports test1;\n" +
+			"}\n");
+
+		String modOneSrc = 
+			"\n" +
+			"/** The no. one module. */\n" +
+			"module mod.one {\n" +
+			"  exports m.o.p;\n" +
+			"}\n";
+		String[] pathAndContents = new String[] {
+			"module-info.java",
+			modOneSrc,
+			"m/o/p/C.java",
+			"package m.o.p;\n" +
+			"public class C {\n" + 
+			"}"
+		};
+		addLibrary(javaProject, "mod.one.jar", "mod.onesrc.zip", pathAndContents, JavaCore.VERSION_9);
+		IPackageFragmentRoot root = javaProject.getPackageFragmentRoot(getFile("/Test/mod.one.jar"));
+		IModularClassFile cf = root.getPackageFragment("").getModularClassFile();
+		assertSourceEquals(
+			"Unexpected source for class file mod.one/module-info.class",
+			modOneSrc,
+			cf.getSource());
+		IModuleDescription module = cf.getModule();
+		ISourceRange javadocRange = module.getJavadocRange();
+		String srcJavadoc = modOneSrc.substring(javadocRange.getOffset(), javadocRange.getOffset()+javadocRange.getLength());
+		assertEquals("javadoc from source", "/** The no. one module. */", srcJavadoc);
+		ISourceRange sourceRange = module.getSourceRange();
+		assertEquals("source start", 1, sourceRange.getOffset()); // start after initial '\n'
+		assertEquals("source end", modOneSrc.length()-2, sourceRange.getLength()); // end before terminal '\n'
+	} finally {
+		deleteProject("Test");
+	}
+}
 }
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/AttachedJavadocTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/AttachedJavadocTests.java
index 203b2bc..fd0ebfb 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/AttachedJavadocTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/AttachedJavadocTests.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2016 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 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
@@ -34,6 +34,8 @@
 import org.eclipse.jdt.core.IField;
 import org.eclipse.jdt.core.IJavaProject;
 import org.eclipse.jdt.core.IMethod;
+import org.eclipse.jdt.core.IModuleDescription;
+import org.eclipse.jdt.core.IOrdinaryClassFile;
 import org.eclipse.jdt.core.IPackageFragment;
 import org.eclipse.jdt.core.IPackageFragmentRoot;
 import org.eclipse.jdt.core.IType;
@@ -143,7 +145,7 @@
 	public void test002() throws JavaModelException {
 		IPackageFragment packageFragment = this.root.getPackageFragment("p1.p2"); //$NON-NLS-1$
 		assertNotNull("Should not be null", packageFragment); //$NON-NLS-1$
-		IClassFile classFile = packageFragment.getClassFile("X.class"); //$NON-NLS-1$
+		IClassFile classFile = packageFragment.getOrdinaryClassFile("X.class"); //$NON-NLS-1$
 		assertNotNull(classFile);
 		String javadoc = classFile.getAttachedJavadoc(new NullProgressMonitor()); //$NON-NLS-1$
 		assertNotNull("Should have a javadoc", javadoc); //$NON-NLS-1$
@@ -153,7 +155,7 @@
 	public void test003() throws JavaModelException {
 		IPackageFragment packageFragment = this.root.getPackageFragment("p1.p2"); //$NON-NLS-1$
 		assertNotNull("Should not be null", packageFragment); //$NON-NLS-1$
-		IClassFile classFile = packageFragment.getClassFile("X.class"); //$NON-NLS-1$
+		IOrdinaryClassFile classFile = packageFragment.getOrdinaryClassFile("X.class"); //$NON-NLS-1$
 		assertNotNull(classFile);
 		IType type = classFile.getType();
 		IField field = type.getField("f"); //$NON-NLS-1$
@@ -166,7 +168,7 @@
 	public void test004() throws JavaModelException {
 		IPackageFragment packageFragment = this.root.getPackageFragment("p1.p2"); //$NON-NLS-1$
 		assertNotNull("Should not be null", packageFragment); //$NON-NLS-1$
-		IClassFile classFile = packageFragment.getClassFile("X.class"); //$NON-NLS-1$
+		IOrdinaryClassFile classFile = packageFragment.getOrdinaryClassFile("X.class"); //$NON-NLS-1$
 		assertNotNull(classFile);
 		IType type = classFile.getType();
 		IMethod method = type.getMethod("foo", new String[] {"I", "J", "Ljava.lang.String;"}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
@@ -185,7 +187,7 @@
 	public void test005() throws JavaModelException {
 		IPackageFragment packageFragment = this.root.getPackageFragment("p1.p2"); //$NON-NLS-1$
 		assertNotNull("Should not be null", packageFragment); //$NON-NLS-1$
-		IClassFile classFile = packageFragment.getClassFile("X.class"); //$NON-NLS-1$
+		IOrdinaryClassFile classFile = packageFragment.getOrdinaryClassFile("X.class"); //$NON-NLS-1$
 		assertNotNull(classFile);
 		IType type = classFile.getType();
 		IMethod method = type.getMethod("X", new String[] {"I"}); //$NON-NLS-1$ //$NON-NLS-2$
@@ -202,7 +204,7 @@
 	public void test006() throws JavaModelException {
 		IPackageFragment packageFragment = this.root.getPackageFragment("p1.p2"); //$NON-NLS-1$
 		assertNotNull("Should not be null", packageFragment); //$NON-NLS-1$
-		IClassFile classFile = packageFragment.getClassFile("X$A.class"); //$NON-NLS-1$
+		IClassFile classFile = packageFragment.getOrdinaryClassFile("X$A.class"); //$NON-NLS-1$
 		assertNotNull(classFile);
 		String javadoc = classFile.getAttachedJavadoc(new NullProgressMonitor()); //$NON-NLS-1$
 		assertNotNull("Should have a javadoc", javadoc); //$NON-NLS-1$
@@ -212,7 +214,7 @@
 	public void test007() throws JavaModelException {
 		IPackageFragment packageFragment = this.root.getPackageFragment("p1.p2"); //$NON-NLS-1$
 		assertNotNull("Should not be null", packageFragment); //$NON-NLS-1$
-		IClassFile classFile = packageFragment.getClassFile("X$A.class"); //$NON-NLS-1$
+		IOrdinaryClassFile classFile = packageFragment.getOrdinaryClassFile("X$A.class"); //$NON-NLS-1$
 		assertNotNull(classFile);
 		IType type = classFile.getType();
 		IMethod method = type.getMethod("A", new String[] {"Lp1.p2.X;", "F"}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
@@ -229,7 +231,7 @@
 	public void test008() throws JavaModelException {
 		IPackageFragment packageFragment = this.root.getPackageFragment("p1.p2"); //$NON-NLS-1$
 		assertNotNull("Should not be null", packageFragment); //$NON-NLS-1$
-		IClassFile classFile = packageFragment.getClassFile("X.class"); //$NON-NLS-1$
+		IOrdinaryClassFile classFile = packageFragment.getOrdinaryClassFile("X.class"); //$NON-NLS-1$
 		assertNotNull(classFile);
 		IType type = classFile.getType();
 		IMethod method = type.getMethod("foo2", new String[0]); //$NON-NLS-1$
@@ -245,7 +247,7 @@
 	public void test009() throws JavaModelException {
 		IPackageFragment packageFragment = this.root.getPackageFragment("p1.p2"); //$NON-NLS-1$
 		assertNotNull("Should not be null", packageFragment); //$NON-NLS-1$
-		IClassFile classFile = packageFragment.getClassFile("X.class"); //$NON-NLS-1$
+		IOrdinaryClassFile classFile = packageFragment.getOrdinaryClassFile("X.class"); //$NON-NLS-1$
 		assertNotNull(classFile);
 		IType type = classFile.getType();
 		IField field = type.getField("f2"); //$NON-NLS-1$
@@ -273,7 +275,7 @@
 			this.project.setRawClasspath(entries, null);
 			IPackageFragment packageFragment = this.root.getPackageFragment("p1.p2"); //$NON-NLS-1$
 			assertNotNull("Should not be null", packageFragment); //$NON-NLS-1$
-			IClassFile classFile = packageFragment.getClassFile("X.class"); //$NON-NLS-1$
+			IOrdinaryClassFile classFile = packageFragment.getOrdinaryClassFile("X.class"); //$NON-NLS-1$
 			assertNotNull(classFile);
 			IType type = classFile.getType();
 			IField field = type.getField("f"); //$NON-NLS-1$
@@ -292,7 +294,7 @@
 	public void test011() throws JavaModelException {
 		IPackageFragment packageFragment = this.root.getPackageFragment("p1.p2"); //$NON-NLS-1$
 		assertNotNull("Should not be null", packageFragment); //$NON-NLS-1$
-		IClassFile classFile = packageFragment.getClassFile("Z.class"); //$NON-NLS-1$
+		IOrdinaryClassFile classFile = packageFragment.getOrdinaryClassFile("Z.class"); //$NON-NLS-1$
 		assertNotNull(classFile);
 		IType type = classFile.getType();
 		IField field = type.getField("out"); //$NON-NLS-1$
@@ -369,7 +371,7 @@
 			this.project.setRawClasspath(entries, null);
 			IPackageFragment packageFragment = this.root.getPackageFragment("p1.p2"); //$NON-NLS-1$
 			assertNotNull("Should not be null", packageFragment); //$NON-NLS-1$
-			IClassFile classFile = packageFragment.getClassFile("X.class"); //$NON-NLS-1$
+			IOrdinaryClassFile classFile = packageFragment.getOrdinaryClassFile("X.class"); //$NON-NLS-1$
 			assertNotNull(classFile);
 			IType type = classFile.getType();
 			IField field = type.getField("f"); //$NON-NLS-1$
@@ -391,7 +393,7 @@
 	public void test017() throws JavaModelException {
 		IPackageFragment packageFragment = this.root.getPackageFragment("p1.p2"); //$NON-NLS-1$
 		assertNotNull("Should not be null", packageFragment); //$NON-NLS-1$
-		IClassFile classFile = packageFragment.getClassFile("Annot2.class"); //$NON-NLS-1$
+		IOrdinaryClassFile classFile = packageFragment.getOrdinaryClassFile("Annot2.class"); //$NON-NLS-1$
 		assertNotNull(classFile);
 		String javadoc = classFile.getAttachedJavadoc(new NullProgressMonitor()); //$NON-NLS-1$
 		assertNotNull("Should have a javadoc", javadoc); //$NON-NLS-1$
@@ -402,7 +404,7 @@
 	public void test018() throws JavaModelException {
 		IPackageFragment packageFragment = this.root.getPackageFragment("p1.p2.p3"); //$NON-NLS-1$
 		assertNotNull("Should not be null", packageFragment); //$NON-NLS-1$
-		IClassFile classFile = packageFragment.getClassFile("C.class"); //$NON-NLS-1$
+		IOrdinaryClassFile classFile = packageFragment.getOrdinaryClassFile("C.class"); //$NON-NLS-1$
 		assertNotNull(classFile);
 		IType type = classFile.getType();
 		IMethod[] methods = type.getMethods();
@@ -420,7 +422,7 @@
 	public void test019() throws JavaModelException {
 		IPackageFragment packageFragment = this.root.getPackageFragment("p1.p2.p3"); //$NON-NLS-1$
 		assertNotNull("Should not be null", packageFragment); //$NON-NLS-1$
-		IClassFile classFile = packageFragment.getClassFile("C.class"); //$NON-NLS-1$
+		IOrdinaryClassFile classFile = packageFragment.getOrdinaryClassFile("C.class"); //$NON-NLS-1$
 		assertNotNull(classFile);
 		IType type = classFile.getType();
 		IMethod method = type.getMethod("bar5", new String[] {"Ljava.util.Map<TK;TV;>;", "I", "Ljava.util.Map<TK;TV;>;"}); //$NON-NLS-1$
@@ -439,7 +441,7 @@
 	public void test020() throws JavaModelException {
 		IPackageFragment packageFragment = this.root.getPackageFragment("p1.p2"); //$NON-NLS-1$
 		assertNotNull("Should not be null", packageFragment); //$NON-NLS-1$
-		IClassFile classFile = packageFragment.getClassFile("Z.class"); //$NON-NLS-1$
+		IOrdinaryClassFile classFile = packageFragment.getOrdinaryClassFile("Z.class"); //$NON-NLS-1$
 		assertNotNull(classFile);
 		IType type = classFile.getType();
 		IMethod method = type.getMethod("foo", new String[] {"I", "I"}); //$NON-NLS-1$
@@ -467,7 +469,7 @@
 		ICompilationUnit workingCopy = null;
 		try {
 			IPackageFragment p = this.root.getPackageFragment("p2");
-			IType type = p.getClassFile("X.class").getType();
+			IType type = p.getOrdinaryClassFile("X.class").getType();
 			IMethod method = type.getMethod("foo", new String[0]);
 
 			// the following call should have no side-effect
@@ -497,7 +499,7 @@
 	public void test022() throws JavaModelException {
 		IPackageFragment packageFragment = this.root.getPackageFragment("p1.p2"); //$NON-NLS-1$
 		assertNotNull("Should not be null", packageFragment); //$NON-NLS-1$
-		IClassFile classFile = packageFragment.getClassFile("X.class"); //$NON-NLS-1$
+		IOrdinaryClassFile classFile = packageFragment.getOrdinaryClassFile("X.class"); //$NON-NLS-1$
 		assertNotNull(classFile);
 		IType type = classFile.getType();
 		IMethod method = type.getMethod("access$1", new String[] {"Lp1.p2.X;", "I"}); //$NON-NLS-1$
@@ -524,7 +526,7 @@
 
 			IPackageFragment packageFragment = this.root.getPackageFragment("p1.p2"); //$NON-NLS-1$
 			assertNotNull("Should not be null", packageFragment); //$NON-NLS-1$
-			IClassFile classFile = packageFragment.getClassFile("X.class"); //$NON-NLS-1$
+			IOrdinaryClassFile classFile = packageFragment.getOrdinaryClassFile("X.class"); //$NON-NLS-1$
 			assertNotNull(classFile);
 			IType type = classFile.getType();
 			IMethod method = type.getMethod("foo", new String[] {"I", "J", "Ljava.lang.String;"}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
@@ -545,7 +547,7 @@
 	public void test024() throws JavaModelException {
 		IPackageFragment packageFragment = this.root.getPackageFragment("p1.p2"); //$NON-NLS-1$
 		assertNotNull("Should not be null", packageFragment); //$NON-NLS-1$
-		IClassFile classFile = packageFragment.getClassFile("X.class"); //$NON-NLS-1$
+		IOrdinaryClassFile classFile = packageFragment.getOrdinaryClassFile("X.class"); //$NON-NLS-1$
 		assertNotNull(classFile);
 		IType type = classFile.getType();
 		IField field = type.getField("f4"); //$NON-NLS-1$
@@ -572,7 +574,7 @@
 			this.project.setRawClasspath(entries, null);
 			IPackageFragment packageFragment = this.root.getPackageFragment("p1.p2"); //$NON-NLS-1$
 			assertNotNull("Should not be null", packageFragment); //$NON-NLS-1$
-			IClassFile classFile = packageFragment.getClassFile("X.class"); //$NON-NLS-1$
+			IOrdinaryClassFile classFile = packageFragment.getOrdinaryClassFile("X.class"); //$NON-NLS-1$
 			assertNotNull(classFile);
 			IType type = classFile.getType();
 			IField field = type.getField("f"); //$NON-NLS-1$
@@ -626,7 +628,7 @@
 			waitForAutoBuild();
 			
 			IPackageFragment packageFragment = this.root.getPackageFragment("p1.p2"); //$NON-NLS-1$
-			IClassFile classFile = packageFragment.getClassFile("X.class"); //$NON-NLS-1$
+			IOrdinaryClassFile classFile = packageFragment.getOrdinaryClassFile("X.class"); //$NON-NLS-1$
 			IType type = classFile.getType();
 			IMethod method = type.getMethod("foo", new String[] {"I", "J", "Ljava.lang.String;"}); //$NON-NLS-1$
 			String javadoc = method.getAttachedJavadoc(new NullProgressMonitor()); //$NON-NLS-1$
@@ -680,7 +682,7 @@
 			waitForAutoBuild();
 			
 			IPackageFragment packageFragment = this.root.getPackageFragment("p1.p2"); //$NON-NLS-1$
-			IClassFile classFile = packageFragment.getClassFile("X.class"); //$NON-NLS-1$
+			IOrdinaryClassFile classFile = packageFragment.getOrdinaryClassFile("X.class"); //$NON-NLS-1$
 			IType type = classFile.getType();
 			IMethod method = type.getMethod("foo", new String[] {"I", "J", "Ljava.lang.String;"}); //$NON-NLS-1$
 			String javadoc = method.getAttachedJavadoc(new NullProgressMonitor()); //$NON-NLS-1$
@@ -702,7 +704,7 @@
 
 			IPackageFragment packageFragment = this.root.getPackageFragment("p1.p2"); //$NON-NLS-1$
 			assertNotNull("Should not be null", packageFragment); //$NON-NLS-1$
-			IClassFile classFile = packageFragment.getClassFile("X.class"); //$NON-NLS-1$
+			IOrdinaryClassFile classFile = packageFragment.getOrdinaryClassFile("X.class"); //$NON-NLS-1$
 			assertNotNull(classFile);
 			IType type = classFile.getType();
 			IMethod method = type.getMethod("foo", new String[] {"I", "J", "Ljava.lang.String;"}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
@@ -741,7 +743,7 @@
 			this.project.getResolvedClasspath(false);
 
 			IPackageFragmentRoot jarRoot = this.project.getPackageFragmentRoot(getFile("/AttachedJavadocProject/bug329671.jar"));
-			final IType type = jarRoot.getPackageFragment("bug").getClassFile("X.class").getType();
+			final IType type = jarRoot.getPackageFragment("bug").getOrdinaryClassFile("X.class").getType();
 			IMethod method = type.getMethod("foo", new String[]{"Ljava.lang.Object;"});
 			assertNotNull(method);
 
@@ -798,7 +800,7 @@
 			this.project.getResolvedClasspath(false);
 
 			IPackageFragmentRoot jarRoot = this.project.getPackageFragmentRoot(getFile("/AttachedJavadocProject/bug334652.jar"));
-			final IType type = jarRoot.getPackageFragment("com.test").getClassFile("PublicAbstractClass$InnerFinalException.class").getType();
+			final IType type = jarRoot.getPackageFragment("com.test").getOrdinaryClassFile("PublicAbstractClass$InnerFinalException.class").getType();
 			IMethod method = type.getMethod("InnerFinalException", new String[] { "Lcom.test.PublicAbstractClass;", "Ljava.lang.String;", "Ljava.lang.String;"});
 			assertNotNull(method);
 			assertTrue("Does not exist", method.exists());
@@ -834,7 +836,7 @@
 			this.project.getResolvedClasspath(false);
 
 			IPackageFragmentRoot jarRoot = this.project.getPackageFragmentRoot(getFile("/AttachedJavadocProject/bug334652(2).jar"));
-			final IType type = jarRoot.getPackageFragment("com.test").getClassFile("PublicAbstractClass$InnerFinalException.class").getType();
+			final IType type = jarRoot.getPackageFragment("com.test").getOrdinaryClassFile("PublicAbstractClass$InnerFinalException.class").getType();
 			IMethod method = type.getMethod("InnerFinalException", new String[] { "Ljava.lang.String;", "Ljava.lang.String;"});
 			assertNotNull(method);
 			assertTrue("Does not exist", method.exists());
@@ -870,7 +872,7 @@
 			this.project.getResolvedClasspath(false);
 
 			IPackageFragmentRoot jarRoot = this.project.getPackageFragmentRoot(getFile("/AttachedJavadocProject/bug334652(3).jar"));
-			final IType type = jarRoot.getPackageFragment("com.test").getClassFile("PublicAbstractClass$A$InnerFinalException.class").getType();
+			final IType type = jarRoot.getPackageFragment("com.test").getOrdinaryClassFile("PublicAbstractClass$A$InnerFinalException.class").getType();
 			IMethod method = type.getMethod("InnerFinalException", new String[] { "Lcom.test.PublicAbstractClass$A;", "Ljava.lang.String;", "Ljava.lang.String;"});
 			assertNotNull(method);
 			assertTrue("Does not exist", method.exists());
@@ -907,7 +909,7 @@
 			this.project.getResolvedClasspath(false);
 
 			IPackageFragmentRoot jarRoot = this.project.getPackageFragmentRoot(getFile("/AttachedJavadocProject/bug334652(4).jar"));
-			final IType type = jarRoot.getPackageFragment("com.test").getClassFile("PublicAbstractClass$A$InnerFinalException.class").getType();
+			final IType type = jarRoot.getPackageFragment("com.test").getOrdinaryClassFile("PublicAbstractClass$A$InnerFinalException.class").getType();
 			IMethod method = type.getMethod("InnerFinalException", new String[] { "Lcom.test.PublicAbstractClass$A;", "Ljava.lang.String;", "Ljava.lang.String;"});
 			assertNotNull(method);
 			assertTrue("Does not exist", method.exists());
@@ -943,7 +945,7 @@
 			this.project.getResolvedClasspath(false);
 
 			IPackageFragmentRoot jarRoot = this.project.getPackageFragmentRoot(getFile("/AttachedJavadocProject/bug354766.jar"));
-			final IType type = jarRoot.getPackageFragment("com.test").getClassFile("PublicAbstractClass$InnerFinalException.class").getType();
+			final IType type = jarRoot.getPackageFragment("com.test").getOrdinaryClassFile("PublicAbstractClass$InnerFinalException.class").getType();
 			IMethod method = type.getMethod("foo", new String[0]);
 			assertNotNull(method);
 			assertTrue("Does not exist", method.exists());
@@ -982,7 +984,7 @@
 			this.project.getResolvedClasspath(false);
 
 			IPackageFragmentRoot jarRoot = this.project.getPackageFragmentRoot(getFile("/AttachedJavadocProject/bug354766.jar"));
-			final IType type = jarRoot.getPackageFragment("com.test").getClassFile("PublicAbstractClass$InnerFinalException.class").getType();
+			final IType type = jarRoot.getPackageFragment("com.test").getOrdinaryClassFile("PublicAbstractClass$InnerFinalException.class").getType();
 			IMethod method = type.getMethod("InnerFinalException", new String[] { "Lcom.test.PublicAbstractClass;"});
 			assertNotNull(method);
 			assertTrue("Does not exist", method.exists());
@@ -1085,7 +1087,7 @@
 			assertNotNull("Should not be null", packageRoot);
 			IPackageFragment packageFragment = packageRoot.getPackageFragment("p"); //$NON-NLS-1$
 			assertNotNull("Should not be null", packageFragment); //$NON-NLS-1$
-			IClassFile classFile = packageFragment.getClassFile("TestBug394382.class"); //$NON-NLS-1$
+			IOrdinaryClassFile classFile = packageFragment.getOrdinaryClassFile("TestBug394382.class"); //$NON-NLS-1$
 			assertNotNull(classFile);
 			IType type = classFile.getType();
 			IFile sourceFile = (IFile) this.project.getProject().findMember("UTF8doc/p/TestBug394382.txt");
@@ -1157,7 +1159,7 @@
 			assertNotNull("Should not be null", packageRoot);
 			IPackageFragment packageFragment = packageRoot.getPackageFragment("p"); //$NON-NLS-1$
 			assertNotNull("Should not be null", packageFragment); //$NON-NLS-1$
-			IClassFile classFile = packageFragment.getClassFile("TestBug394382.class"); //$NON-NLS-1$
+			IOrdinaryClassFile classFile = packageFragment.getOrdinaryClassFile("TestBug394382.class"); //$NON-NLS-1$
 			assertNotNull(classFile);
 			IType type = classFile.getType();
 			IFile sourceFile = (IFile) this.project.getProject().findMember("UTF8doc2/p/TestBug394382.txt");
@@ -1247,7 +1249,7 @@
 			}
 
 			IPackageFragment packageFragment = validRoot.getPackageFragment("p");
-			IClassFile classFile = packageFragment.getClassFile("X.class");
+			IOrdinaryClassFile classFile = packageFragment.getOrdinaryClassFile("X.class");
 			IType type = classFile.getType();
 			String javadoc = null;
 			try {
@@ -1258,7 +1260,7 @@
 			assertNull("Should not have a javadoc", javadoc);
 			
 			packageFragment = invalidRoot.getPackageFragment("q");
-			classFile = packageFragment.getClassFile("Y.class");
+			classFile = packageFragment.getOrdinaryClassFile("Y.class");
 			type = classFile.getType();
 			try {
 				type.getAttachedJavadoc(new NullProgressMonitor());
@@ -1287,7 +1289,7 @@
 			this.project.getResolvedClasspath(false);
 
 			IPackageFragmentRoot jarRoot = this.project.getPackageFragmentRoot(getFile("/AttachedJavadocProject/bug418092.jar"));
-			final IType type = jarRoot.getPackageFragment("p1.p2").getClassFile("Annot3.class").getType();
+			final IType type = jarRoot.getPackageFragment("p1.p2").getOrdinaryClassFile("Annot3.class").getType();
 			assertNotNull(type);
 			IMethod method = type.getMethod("filter", new String[] {"I", "I"}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 			assertTrue(method.exists());
@@ -1313,7 +1315,7 @@
 			this.project.getResolvedClasspath(false);
 
 			IPackageFragmentRoot jarRoot = this.project.getPackageFragmentRoot(getFile("/AttachedJavadocProject/bug499196.jar"));
-			final IType type = jarRoot.getPackageFragment("p1.p2").getClassFile("Bug499196.class").getType();
+			final IType type = jarRoot.getPackageFragment("p1.p2").getOrdinaryClassFile("Bug499196.class").getType();
 			assertNotNull(type);
 			IMethod method = type.getMethod("Bug499196", new String[] {}); //$NON-NLS-1$
 			assertNotNull("Constructor should not be null", method);
@@ -1324,5 +1326,30 @@
 			assertTrue("Should not happen", false);
 		}
 	}
+	public void testBug521256() throws JavaModelException {
+		try {
+			IClasspathAttribute attribute =
+					JavaCore.newClasspathAttribute(
+							IClasspathAttribute.JAVADOC_LOCATION_ATTRIBUTE_NAME,
+							"jar:platform:/resource/AttachedJavadocProject/bug521256_doc.zip!/");
+			IClasspathEntry newEntry = JavaCore.newLibraryEntry(new Path("/AttachedJavadocProject/bug521256.jar"), null, null, null, new IClasspathAttribute[] {attribute}, true);
+			this.project.setRawClasspath(new IClasspathEntry[]{newEntry}, null);
+			this.project.getResolvedClasspath(false);
+
+			IPackageFragmentRoot jarRoot = this.project.getPackageFragmentRoot(getFile("/AttachedJavadocProject/bug521256.jar"));
+			IModuleDescription module = jarRoot.getPackageFragment("").getModularClassFile().getModule();
+			assertNotNull(module);
+			assertTrue(module.exists());
+			String javadoc = module.getAttachedJavadoc(new NullProgressMonitor()); //$NON-NLS-1$
+			assertNotNull("Should have a javadoc", javadoc); //$NON-NLS-1$
+			assertTrue("Should contain", javadoc.contains("Some Module Documentation"));
+			IPackageFragment packageFragment = jarRoot.getPackageFragment("org.eclipse.pub");
+			javadoc = packageFragment.getAttachedJavadoc(new NullProgressMonitor());
+			assertNotNull("Should have a javadoc", javadoc); //$NON-NLS-1$
+			assertTrue("Should contain", javadoc.contains("Some package description"));			
+		} catch (IndexOutOfBoundsException e) {
+			assertTrue("Should not happen", false);
+		}
+	}
 }
 
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ClassFileTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ClassFileTests.java
index f6aa5ef..5a8dabd 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ClassFileTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ClassFileTests.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 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
@@ -29,7 +29,7 @@
 
 	IPackageFragmentRoot jarRoot;
 	ICompilationUnit workingCopy;
-	IClassFile classFile;
+	IOrdinaryClassFile classFile;
 
 public ClassFileTests(String name) {
 	super(name);
@@ -242,10 +242,10 @@
 	super.tearDown();
 }
 
-private IClassFile createClassFile(String contents) throws CoreException, IOException {
+private IOrdinaryClassFile createClassFile(String contents) throws CoreException, IOException {
 	IJavaProject project = getJavaProject("P");
 	addLibrary(project, "lib2.jar", "src2.zip", new String[] {"p/X.java", contents}, "1.5");
-	this.classFile =  project.getPackageFragmentRoot(getFile("/P/lib2.jar")).getPackageFragment("p").getClassFile("X.class");
+	this.classFile =  project.getPackageFragmentRoot(getFile("/P/lib2.jar")).getPackageFragment("p").getOrdinaryClassFile("X.class");
 	return this.classFile;
 }
 
@@ -253,7 +253,7 @@
  * Ensures that the annotations of a binary type are correct
  */
 public void testAnnotations01() throws JavaModelException {
-	IType type = this.jarRoot.getPackageFragment("annotated").getClassFile("X.class").getType();
+	IType type = this.jarRoot.getPackageFragment("annotated").getOrdinaryClassFile("X.class").getType();
 	assertAnnotationsEqual(
 		"@annotated.MyOtherAnnot\n",
 		type.getAnnotations());
@@ -263,7 +263,7 @@
  * Ensures that the annotations of a binary method are correct
  */
 public void testAnnotations02() throws JavaModelException {
-	IType type = this.jarRoot.getPackageFragment("annotated").getClassFile("X.class").getType();
+	IType type = this.jarRoot.getPackageFragment("annotated").getOrdinaryClassFile("X.class").getType();
 	IMethod method = type.getMethod("method", new String[0]);
 	assertAnnotationsEqual(
 		"@annotated.MyOtherAnnot\n",
@@ -274,7 +274,7 @@
  * Ensures that the annotations of a binary field are correct
  */
 public void testAnnotations03() throws JavaModelException {
-	IType type = this.jarRoot.getPackageFragment("annotated").getClassFile("X.class").getType();
+	IType type = this.jarRoot.getPackageFragment("annotated").getOrdinaryClassFile("X.class").getType();
 	IField field = type.getField("field");
 	assertAnnotationsEqual(
 		"@annotated.MyOtherAnnot\n",
@@ -285,7 +285,7 @@
  * Ensures that an annotation with an int value is correct
  */
 public void testAnnotations04() throws JavaModelException {
-	IType type = this.jarRoot.getPackageFragment("annotated").getClassFile("X.class").getType();
+	IType type = this.jarRoot.getPackageFragment("annotated").getOrdinaryClassFile("X.class").getType();
 	IMethod method = type.getMethod("foo01", new String[0]);
 	assertAnnotationsEqual(
 		"@annotated.MyAnnot(_int=(int)1)\n",
@@ -296,7 +296,7 @@
  * Ensures that an annotation with a byte value is correct
  */
 public void testAnnotations05() throws JavaModelException {
-	IType type = this.jarRoot.getPackageFragment("annotated").getClassFile("X.class").getType();
+	IType type = this.jarRoot.getPackageFragment("annotated").getOrdinaryClassFile("X.class").getType();
 	IMethod method = type.getMethod("foo02", new String[0]);
 	assertAnnotationsEqual(
 		"@annotated.MyAnnot(_byte=(byte)2)\n",
@@ -307,7 +307,7 @@
  * Ensures that an annotation with a short value is correct
  */
 public void testAnnotations06() throws JavaModelException {
-	IType type = this.jarRoot.getPackageFragment("annotated").getClassFile("X.class").getType();
+	IType type = this.jarRoot.getPackageFragment("annotated").getOrdinaryClassFile("X.class").getType();
 	IMethod method = type.getMethod("foo03", new String[0]);
 	assertAnnotationsEqual(
 		"@annotated.MyAnnot(_short=(short)3)\n",
@@ -318,7 +318,7 @@
  * Ensures that an annotation with a char value is correct
  */
 public void testAnnotations07() throws JavaModelException {
-	IType type = this.jarRoot.getPackageFragment("annotated").getClassFile("X.class").getType();
+	IType type = this.jarRoot.getPackageFragment("annotated").getOrdinaryClassFile("X.class").getType();
 	IMethod method = type.getMethod("foo04", new String[0]);
 	assertAnnotationsEqual(
 		"@annotated.MyAnnot(_char='a')\n",
@@ -329,7 +329,7 @@
  * Ensures that an annotation with a float value is correct
  */
 public void testAnnotations08() throws JavaModelException {
-	IType type = this.jarRoot.getPackageFragment("annotated").getClassFile("X.class").getType();
+	IType type = this.jarRoot.getPackageFragment("annotated").getOrdinaryClassFile("X.class").getType();
 	IMethod method = type.getMethod("foo05", new String[0]);
 	assertAnnotationsEqual(
 		"@annotated.MyAnnot(_float=1.2f)\n",
@@ -340,7 +340,7 @@
  * Ensures that an annotation with a double value is correct
  */
 public void testAnnotations09() throws JavaModelException {
-	IType type = this.jarRoot.getPackageFragment("annotated").getClassFile("X.class").getType();
+	IType type = this.jarRoot.getPackageFragment("annotated").getOrdinaryClassFile("X.class").getType();
 	IMethod method = type.getMethod("foo06", new String[0]);
 	assertAnnotationsEqual(
 		"@annotated.MyAnnot(_double=(double)3.4)\n",
@@ -351,7 +351,7 @@
  * Ensures that an annotation with a boolean value is correct
  */
 public void testAnnotations10() throws JavaModelException {
-	IType type = this.jarRoot.getPackageFragment("annotated").getClassFile("X.class").getType();
+	IType type = this.jarRoot.getPackageFragment("annotated").getOrdinaryClassFile("X.class").getType();
 	IMethod method = type.getMethod("foo07", new String[0]);
 	assertAnnotationsEqual(
 		"@annotated.MyAnnot(_boolean=true)\n",
@@ -362,7 +362,7 @@
  * Ensures that an annotation with a long value is correct
  */
 public void testAnnotations11() throws JavaModelException {
-	IType type = this.jarRoot.getPackageFragment("annotated").getClassFile("X.class").getType();
+	IType type = this.jarRoot.getPackageFragment("annotated").getOrdinaryClassFile("X.class").getType();
 	IMethod method = type.getMethod("foo08", new String[0]);
 	assertAnnotationsEqual(
 		"@annotated.MyAnnot(_long=123456789L)\n",
@@ -373,7 +373,7 @@
  * Ensures that an annotation with a String value is correct
  */
 public void testAnnotations12() throws JavaModelException {
-	IType type = this.jarRoot.getPackageFragment("annotated").getClassFile("X.class").getType();
+	IType type = this.jarRoot.getPackageFragment("annotated").getOrdinaryClassFile("X.class").getType();
 	IMethod method = type.getMethod("foo09", new String[0]);
 	assertAnnotationsEqual(
 		"@annotated.MyAnnot(_string=\"abc\")\n",
@@ -384,7 +384,7 @@
  * Ensures that an annotation with an annotation value is correct
  */
 public void testAnnotations13() throws JavaModelException {
-	IType type = this.jarRoot.getPackageFragment("annotated").getClassFile("X.class").getType();
+	IType type = this.jarRoot.getPackageFragment("annotated").getOrdinaryClassFile("X.class").getType();
 	IMethod method = type.getMethod("foo10", new String[0]);
 	assertAnnotationsEqual(
 		"@annotated.MyAnnot(_annot=@annotated.MyOtherAnnot)\n",
@@ -395,7 +395,7 @@
  * Ensures that an annotation with a Class value is correct
  */
 public void testAnnotations14() throws JavaModelException {
-	IType type = this.jarRoot.getPackageFragment("annotated").getClassFile("X.class").getType();
+	IType type = this.jarRoot.getPackageFragment("annotated").getOrdinaryClassFile("X.class").getType();
 	IMethod method = type.getMethod("foo11", new String[0]);
 	assertAnnotationsEqual(
 		"@annotated.MyAnnot(_class=java.lang.String.class)\n",
@@ -406,7 +406,7 @@
  * Ensures that an annotation with an enumeration value is correct
  */
 public void testAnnotations15() throws JavaModelException {
-	IType type = this.jarRoot.getPackageFragment("annotated").getClassFile("X.class").getType();
+	IType type = this.jarRoot.getPackageFragment("annotated").getOrdinaryClassFile("X.class").getType();
 	IMethod method = type.getMethod("foo12", new String[0]);
 	assertAnnotationsEqual(
 		"@annotated.MyAnnot(_enum=annotated.MyEnum.SECOND)\n",
@@ -417,7 +417,7 @@
  * Ensures that an annotation with an array value is correct
  */
 public void testAnnotations16() throws JavaModelException {
-	IType type = this.jarRoot.getPackageFragment("annotated").getClassFile("X.class").getType();
+	IType type = this.jarRoot.getPackageFragment("annotated").getOrdinaryClassFile("X.class").getType();
 	IMethod method = type.getMethod("foo13", new String[0]);
 	assertAnnotationsEqual(
 		"@annotated.MyAnnot(_array={(int)1, (int)2, (int)3})\n",
@@ -429,7 +429,7 @@
  * (regression test for https://bugs.eclipse.org/bugs/show_bug.cgi?id=248309 )
  */
 public void testAnnotations17() throws JavaModelException {
-	IType type = this.jarRoot.getPackageFragment("annotated").getClassFile("Y.class").getType();
+	IType type = this.jarRoot.getPackageFragment("annotated").getOrdinaryClassFile("Y.class").getType();
 	assertAnnotationsEqual(
 		"@java.lang.annotation.Target({java.lang.annotation.ElementType.TYPE, java.lang.annotation.ElementType.FIELD, java.lang.annotation.ElementType.METHOD, java.lang.annotation.ElementType.PARAMETER, java.lang.annotation.ElementType.CONSTRUCTOR, java.lang.annotation.ElementType.LOCAL_VARIABLE, java.lang.annotation.ElementType.ANNOTATION_TYPE, java.lang.annotation.ElementType.PACKAGE})\n" + 
 		"@java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE)\n" + 
@@ -443,7 +443,7 @@
  * Ensures that the annotation of a binary type exists
  */
 public void testAnnotations18() throws JavaModelException {
-	IAnnotation annotation = this.jarRoot.getPackageFragment("annotated").getClassFile("X.class").getType().getAnnotation("annotated.MyOtherAnnot");
+	IAnnotation annotation = this.jarRoot.getPackageFragment("annotated").getOrdinaryClassFile("X.class").getType().getAnnotation("annotated.MyOtherAnnot");
 	assertTrue("Annotation should exist", annotation.exists());
 }
 
@@ -452,7 +452,7 @@
  */
 public void testAnnotations19() throws JavaModelException {
 	IPackageFragment packageFragment = this.jarRoot.getPackageFragment("annotated");
-	IClassFile classFile2 = packageFragment.getClassFile("MyAnnotation.class");
+	IOrdinaryClassFile classFile2 = packageFragment.getOrdinaryClassFile("MyAnnotation.class");
 	IType type = classFile2.getType();
 	assertAnnotationsEqual(
 		"@java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME)\n",
@@ -463,7 +463,7 @@
  */
 public void testAnnotations20() throws JavaModelException {
 	IPackageFragment packageFragment = this.jarRoot.getPackageFragment("annotated");
-	IClassFile classFile2 = packageFragment.getClassFile("MyAnnotation2.class");
+	IOrdinaryClassFile classFile2 = packageFragment.getOrdinaryClassFile("MyAnnotation2.class");
 	IType type = classFile2.getType();
 	assertAnnotationsEqual(
 		"@java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE)\n",
@@ -474,7 +474,7 @@
  */
 public void testAnnotations21() throws JavaModelException {
 	IPackageFragment packageFragment = this.jarRoot.getPackageFragment("annotated");
-	IClassFile classFile2 = packageFragment.getClassFile("MyAnnotation3.class");
+	IOrdinaryClassFile classFile2 = packageFragment.getOrdinaryClassFile("MyAnnotation3.class");
 	IType type = classFile2.getType();
 	assertAnnotationsEqual(
 		"@java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.CLASS)\n",
@@ -486,7 +486,7 @@
  * Ensures that an annotation with a negative int value is correct
  */
 public void testAnnotations22() throws JavaModelException {
-	IType type = this.jarRoot.getPackageFragment("annotated").getClassFile("X.class").getType();
+	IType type = this.jarRoot.getPackageFragment("annotated").getOrdinaryClassFile("X.class").getType();
 	IMethod method = type.getMethod("foo14", new String[0]);
 	assertAnnotationsEqual(
 		"@annotated.MyAnnot(_neg_int=(int)-2)\n",
@@ -498,7 +498,7 @@
  * Ensures that an annotation with a negative float value is correct
  */
 public void testAnnotations23() throws JavaModelException {
-	IType type = this.jarRoot.getPackageFragment("annotated").getClassFile("X.class").getType();
+	IType type = this.jarRoot.getPackageFragment("annotated").getOrdinaryClassFile("X.class").getType();
 	IMethod method = type.getMethod("foo15", new String[0]);
 	assertAnnotationsEqual(
 		"@annotated.MyAnnot(_neg_float=-2.0f)\n",
@@ -510,7 +510,7 @@
  * Ensures that an annotation with a negative double value is correct
  */
 public void testAnnotations24() throws JavaModelException {
-	IType type = this.jarRoot.getPackageFragment("annotated").getClassFile("X.class").getType();
+	IType type = this.jarRoot.getPackageFragment("annotated").getOrdinaryClassFile("X.class").getType();
 	IMethod method = type.getMethod("foo16", new String[0]);
 	assertAnnotationsEqual(
 		"@annotated.MyAnnot(_neg_double=(double)-2.0)\n",
@@ -522,7 +522,7 @@
  * Ensures that an annotation with a negative long value is correct
  */
 public void testAnnotations25() throws JavaModelException {
-	IType type = this.jarRoot.getPackageFragment("annotated").getClassFile("X.class").getType();
+	IType type = this.jarRoot.getPackageFragment("annotated").getOrdinaryClassFile("X.class").getType();
 	IMethod method = type.getMethod("foo17", new String[0]);
 	assertAnnotationsEqual(
 		"@annotated.MyAnnot(_neg_long=-2L)\n",
@@ -533,7 +533,7 @@
  * https://bugs.eclipse.org/bugs/show_bug.cgi?id=342757
  */
 public void testAnnotations26() throws JavaModelException {
-	IType type = this.jarRoot.getPackageFragment("test342757").getClassFile("X$B.class").getType();
+	IType type = this.jarRoot.getPackageFragment("test342757").getOrdinaryClassFile("X$B.class").getType();
 	IMethod[] methods = type.getMethods();
 	String expected =
 			"@test342757.Annot\n" + 
@@ -572,7 +572,7 @@
  * Ensure that the exception types of a binary method are correct.
  */
 public void testExceptionTypes1() throws JavaModelException {
-	IType type = this.jarRoot.getPackageFragment("generic").getClassFile("X.class").getType();
+	IType type = this.jarRoot.getPackageFragment("generic").getOrdinaryClassFile("X.class").getType();
 	IMethod method = type.getMethod("foo", new String[] {"TK;", "TV;"});
 	assertStringsEqual(
 		"Unexpected return type",
@@ -584,7 +584,7 @@
  * Ensure that the exception types of a binary method is correct.
  */
 public void testExceptionTypes2() throws JavaModelException {
-	IType type = this.jarRoot.getPackageFragment("generic").getClassFile("X.class").getType();
+	IType type = this.jarRoot.getPackageFragment("generic").getOrdinaryClassFile("X.class").getType();
 	IMethod method = type.getMethod("foo", new String[] {"Lgeneric.X<TT;>;"});
 	assertStringsEqual(
 		"Unexpected return type",
@@ -860,7 +860,7 @@
  * Ensures that the default value for an annotation method is correct.
  */
 public void testDefaultValue1() throws JavaModelException {
-	IType type = this.jarRoot.getPackageFragment("annotated").getClassFile("MyAnnot.class").getType();
+	IType type = this.jarRoot.getPackageFragment("annotated").getOrdinaryClassFile("MyAnnot.class").getType();
 	IMethod method = type.getMethod("_int", new String[0]);
 	assertMemberValuePairEquals(
 		"_int=(int)0",
@@ -871,7 +871,7 @@
  * Ensures that the default value for an annotation method is correct.
  */
 public void testDefaultValue2() throws JavaModelException {
-	IType type = this.jarRoot.getPackageFragment("annotated").getClassFile("MyAnnot.class").getType();
+	IType type = this.jarRoot.getPackageFragment("annotated").getOrdinaryClassFile("MyAnnot.class").getType();
 	IMethod method = type.getMethod("_annot", new String[0]);
 	assertMemberValuePairEquals(
 		"_annot=@annotated.MyOtherAnnot",
@@ -882,7 +882,7 @@
  * Ensures that the default value for an annotation method is correct.
  */
 public void testDefaultValue3() throws JavaModelException {
-	IType type = this.jarRoot.getPackageFragment("annotated").getClassFile("MyAnnot.class").getType();
+	IType type = this.jarRoot.getPackageFragment("annotated").getOrdinaryClassFile("MyAnnot.class").getType();
 	IMethod method = type.getMethod("_array", new String[0]);
 	assertMemberValuePairEquals(
 		"_array=[unknown]{}",
@@ -894,7 +894,7 @@
  * Ensures that the default value for an regular method is correct.
  */
 public void testDefaultValue4() throws JavaModelException {
-	IType type = getPackageFragmentRoot("P", getExternalJCLPathString(JavaCore.VERSION_1_5)).getPackageFragment("java.lang").getClassFile("Object.class").getType();
+	IType type = getPackageFragmentRoot("P", getExternalJCLPathString(JavaCore.VERSION_1_5)).getPackageFragment("java.lang").getOrdinaryClassFile("Object.class").getType();
 	IMethod method = type.getMethod("toString", new String[0]);
 	assertMemberValuePairEquals(
 		"<null>",
@@ -973,7 +973,7 @@
 		createExternalFolder("externalLib/p");
 		createExternalFile("externalLib/p/X.class", "");
 		createJavaProject("P1", new String[0], new String[] {getExternalResourcePath("externalLib")}, "");
-		IClassFile classFile1 = getClassFile("P1", getExternalResourcePath("externalLib"), "p", "X.class");
+		IOrdinaryClassFile classFile1 = getClassFile("P1", getExternalResourcePath("externalLib"), "p", "X.class");
 		assertResourceEquals(
 			"Unexpected resource",
 			"<null>",
@@ -989,7 +989,7 @@
  * (regression test for bug 78520 [model] IType#getSuperInterfaceTypeSignatures() doesn't include type arguments)
  */
 public void testGetSuperclassTypeSignature() throws JavaModelException {
-	IType type = this.jarRoot.getPackageFragment("generic").getClassFile("V.class").getType();
+	IType type = this.jarRoot.getPackageFragment("generic").getOrdinaryClassFile("V.class").getType();
 	assertEquals(
 		"Unexpected signature",
 		"Lgeneric.X<Ljava.lang.Thread;>;",
@@ -1001,7 +1001,7 @@
  * (regression test for bug 78520 [model] IType#getSuperInterfaceTypeSignatures() doesn't include type arguments)
  */
 public void testGetSuperInterfaceTypeSignatures() throws JavaModelException {
-	IType type = this.jarRoot.getPackageFragment("generic").getClassFile("V.class").getType();
+	IType type = this.jarRoot.getPackageFragment("generic").getOrdinaryClassFile("V.class").getType();
 	assertStringsEqual(
 		"Unexpected signatures",
 		"Lgeneric.I<Ljava.lang.String;>;\n",
@@ -1027,7 +1027,7 @@
 		IPackageFragment invalidPkg = p.getPackageFragmentRoot("/P1/classFolder.jar").getPackageFragment("p");
 
 		// ensure that the class file cannot be opened with a valid exception
-		IClassFile openable = invalidPkg.getClassFile("X.class");
+		IOrdinaryClassFile openable = invalidPkg.getOrdinaryClassFile("X.class");
 		JavaModelException expected = null;
 		try {
 			openable.open(null);
@@ -1044,7 +1044,7 @@
  * Ensures that the parameter names of a binary method with source attached are correct.
  */
 public void testParameterNames01() throws CoreException {
-	IMethod method = this.jarRoot.getPackageFragment("generic").getClassFile("X.class").getType().getMethod("foo", new String[] {"TK;", "TV;"});
+	IMethod method = this.jarRoot.getPackageFragment("generic").getOrdinaryClassFile("X.class").getType().getMethod("foo", new String[] {"TK;", "TV;"});
 	String[] parameterNames = method.getParameterNames();
 	assertStringsEqual(
 		"Unexpected parameter names",
@@ -1060,7 +1060,7 @@
 	IPath sourceAttachmentPath = this.jarRoot.getSourceAttachmentPath();
 	try {
 		attachSource(this.jarRoot, null, null);
-		IMethod method = this.jarRoot.getPackageFragment("generic").getClassFile("X.class").getType().getMethod("foo", new String[] {"TK;", "TV;"});
+		IMethod method = this.jarRoot.getPackageFragment("generic").getOrdinaryClassFile("X.class").getType().getMethod("foo", new String[] {"TK;", "TV;"});
 		String[] parameterNames = method.getParameterNames();
 		assertStringsEqual(
 			"Unexpected parameter names",
@@ -1076,7 +1076,7 @@
  * Ensure that the type parameter signatures of a binary type are correct.
  */
 public void testParameterTypeSignatures1() throws JavaModelException {
-	IType type = this.jarRoot.getPackageFragment("generic").getClassFile("X.class").getType();
+	IType type = this.jarRoot.getPackageFragment("generic").getOrdinaryClassFile("X.class").getType();
 	assertStringsEqual(
 		"Unexpected type parameters",
 		"T:Ljava.lang.Object;\n",
@@ -1087,7 +1087,7 @@
  * Ensure that the type parameter signatures of a binary type are correct.
  */
 public void testParameterTypeSignatures2() throws JavaModelException {
-	IType type = this.jarRoot.getPackageFragment("nongeneric").getClassFile("A.class").getType();
+	IType type = this.jarRoot.getPackageFragment("nongeneric").getOrdinaryClassFile("A.class").getType();
 	assertStringsEqual(
 		"Unexpected type parameters",
 		"",
@@ -1098,7 +1098,7 @@
  * Ensure that the type parameter signatures of a binary type are correct.
  */
 public void testParameterTypeSignatures3() throws JavaModelException {
-	IType type = this.jarRoot.getPackageFragment("generic").getClassFile("Y.class").getType();
+	IType type = this.jarRoot.getPackageFragment("generic").getOrdinaryClassFile("Y.class").getType();
 	assertStringsEqual(
 		"Unexpected type parameters",
 		"K:Ljava.lang.Object;\n" +
@@ -1110,7 +1110,7 @@
  * Ensure that the type parameter signatures of a binary type are correct.
  */
 public void testParameterTypeSignatures4() throws JavaModelException {
-	IType type = this.jarRoot.getPackageFragment("generic").getClassFile("Z.class").getType();
+	IType type = this.jarRoot.getPackageFragment("generic").getOrdinaryClassFile("Z.class").getType();
 	assertStringsEqual(
 		"Unexpected type parameters",
 		"T:Ljava.lang.Object;:Lgeneric.I<-TT;>;\n",
@@ -1121,7 +1121,7 @@
  * Ensure that the type parameter signatures of a binary type are correct.
  */
 public void testParameterTypeSignatures5() throws JavaModelException {
-	IType type = this.jarRoot.getPackageFragment("generic").getClassFile("W.class").getType();
+	IType type = this.jarRoot.getPackageFragment("generic").getOrdinaryClassFile("W.class").getType();
 	assertStringsEqual(
 		"Unexpected type parameters",
 		"T:Lgeneric.X<TT;>;\n" +
@@ -1134,7 +1134,7 @@
  * @deprecated
  */
 public void testParameterTypeSignatures6() throws JavaModelException {
-	IType type = this.jarRoot.getPackageFragment("generic").getClassFile("X.class").getType();
+	IType type = this.jarRoot.getPackageFragment("generic").getOrdinaryClassFile("X.class").getType();
 	IMethod method = type.getMethod("foo", new String[] {"TK;", "TV;"});
 	assertStringsEqual(
 		"Unexpected type parameters",
@@ -1147,7 +1147,7 @@
  * Ensures that the raw parameter names of a binary method with source attached are correct.
  */
 public void testRawParameterNames01() throws CoreException {
-	IMethod method = this.jarRoot.getPackageFragment("generic").getClassFile("X.class").getType().getMethod("foo", new String[] {"TK;", "TV;"});
+	IMethod method = this.jarRoot.getPackageFragment("generic").getOrdinaryClassFile("X.class").getType().getMethod("foo", new String[] {"TK;", "TV;"});
 	String[] parameterNames = method.getRawParameterNames();
 	assertStringsEqual(
 		"Unexpected parameter names",
@@ -1163,7 +1163,7 @@
 	IPath sourceAttachmentPath = this.jarRoot.getSourceAttachmentPath();
 	try {
 		attachSource(this.jarRoot, null, null);
-		IMethod method = this.jarRoot.getPackageFragment("generic").getClassFile("X.class").getType().getMethod("foo", new String[] {"TK;", "TV;"});
+		IMethod method = this.jarRoot.getPackageFragment("generic").getOrdinaryClassFile("X.class").getType().getMethod("foo", new String[] {"TK;", "TV;"});
 		String[] parameterNames = method.getParameterNames();
 		assertStringsEqual(
 			"Unexpected parameter names",
@@ -1179,7 +1179,7 @@
  * Ensure that the return type of a binary method is correct.
  */
 public void testReturnType1() throws JavaModelException {
-	IType type = this.jarRoot.getPackageFragment("generic").getClassFile("X.class").getType();
+	IType type = this.jarRoot.getPackageFragment("generic").getOrdinaryClassFile("X.class").getType();
 	IMethod method = type.getMethod("foo", new String[] {"TK;", "TV;"});
 	assertEquals(
 		"Unexpected return type",
@@ -1191,7 +1191,7 @@
  * Ensure that the return type of a binary method is correct.
  */
 public void testReturnType2() throws JavaModelException {
-	IType type = this.jarRoot.getPackageFragment("generic").getClassFile("X.class").getType();
+	IType type = this.jarRoot.getPackageFragment("generic").getOrdinaryClassFile("X.class").getType();
 	IMethod method = type.getMethod("foo", new String[] {"Lgeneric.X<TT;>;"});
 	assertEquals(
 		"Unexpected return type",
@@ -1200,14 +1200,14 @@
 }
 
 /*
- * Ensures that asking for the source range of a IClassFile in a non-Java project throws a JavaModelException
+ * Ensures that asking for the source range of a IOrdinaryClassFile in a non-Java project throws a JavaModelException
  * (regression test for bug 132494 JavaModelException opening up class file in non java project)
  */
 public void testSourceRange1() throws CoreException { // was testSourceRangeNonJavaProject()
 	try {
 		createProject("Simple");
 		createFile("/Simple/X.class", "");
-		IClassFile classX = getClassFile("/Simple/X.class");
+		IOrdinaryClassFile classX = getClassFile("/Simple/X.class");
 		JavaModelException exception = null;
 		try {
 			classX.getSourceRange();
@@ -1221,14 +1221,14 @@
 }
 
 /*
- * Ensures that asking for the source range of a IClassFile not on the classpath of a Java project doesn't throw a JavaModelException
+ * Ensures that asking for the source range of a IOrdinaryClassFile not on the classpath of a Java project doesn't throw a JavaModelException
  * (regression test for bug 138507 exception in .class file editor for classes imported via plug-in import)
  */
 public void testSourceRange2() throws CoreException { // was testSourceRangeNotOnClasspath()
 	try {
 		createJavaProject("P2", new String[] {"src"}, "bin");
 		createFile("/P2/bin/X.class", "");
-		IClassFile classX = getClassFile("/P2/bin/X.class");
+		IOrdinaryClassFile classX = getClassFile("/P2/bin/X.class");
 		assertNull("Unxepected source range", classX.getSourceRange());
 	} finally {
 		deleteProject("P2");
@@ -1236,14 +1236,14 @@
 }
 
 /*
- * Ensures that asking for the source range of a IClassFile in proj==src case without the corresponding .java file doesn't throw a JavaModelException
+ * Ensures that asking for the source range of a IOrdinaryClassFile in proj==src case without the corresponding .java file doesn't throw a JavaModelException
  * (regression test for bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=221904 )
  */
 public void testSourceRange3() throws CoreException {
 	try {
 		createJavaProject("P2", new String[] {""}, "");
 		createFile("/P2/X.class", "");
-		IClassFile classX = getClassFile("/P2/X.class");
+		IOrdinaryClassFile classX = getClassFile("/P2/X.class");
 		assertNull("Unxepected source range", classX.getSourceRange());
 	} finally {
 		deleteProject("P2");
@@ -1256,7 +1256,7 @@
  * (regression test for bug 101228 JME on code assist)
  */
 public void testTypeParameter() throws CoreException {
-	IClassFile clazz = this.jarRoot.getPackageFragment("generic").getClassFile("X.class");
+	IOrdinaryClassFile clazz = this.jarRoot.getPackageFragment("generic").getOrdinaryClassFile("X.class");
 	ITypeParameter typeParameter = clazz.getType().getTypeParameter("T");
 	clazz.close();
 	assertStringsEqual(
@@ -1269,7 +1269,7 @@
  * Ensure that a method with varargs has the AccVarargs flag set.
  */
 public void testVarargs() throws JavaModelException {
-	IType type = this.jarRoot.getPackageFragment("varargs").getClassFile("X.class").getType();
+	IType type = this.jarRoot.getPackageFragment("varargs").getOrdinaryClassFile("X.class").getType();
 	IMethod method = type.getMethod("foo", new String[]{"Ljava.lang.String;", "[Ljava.lang.Object;"});
 	assertTrue("Should have the AccVarargs flag set", Flags.isVarargs(method.getFlags()));
 }
@@ -1278,7 +1278,7 @@
  * Ensures that a class file can be turned into a working copy and that its children are correct.
  */
 public void testWorkingCopy01() throws CoreException {
-	IClassFile clazz = this.jarRoot.getPackageFragment("workingcopy").getClassFile("X.class");
+	IOrdinaryClassFile clazz = this.jarRoot.getPackageFragment("workingcopy").getOrdinaryClassFile("X.class");
 	this.workingCopy = clazz.getWorkingCopy(null/*primary owner*/, (IProgressMonitor) null/*no progress*/);
 	assertElementDescendants(
 		"Unexpected children",
@@ -1296,7 +1296,7 @@
 	IPath sourceAttachmentPath = this.jarRoot.getSourceAttachmentPath();
 	try {
 		attachSource(this.jarRoot, null, null);
-		IClassFile clazz = this.jarRoot.getPackageFragment("workingcopy").getClassFile("X.class");
+		IOrdinaryClassFile clazz = this.jarRoot.getPackageFragment("workingcopy").getOrdinaryClassFile("X.class");
 		assertNull("Should not have source attached", clazz.getSource());
 		this.workingCopy = clazz.getWorkingCopy(null/*primary owner*/, (IProgressMonitor) null/*no progress*/);
 		assertElementDescendants(
@@ -1316,7 +1316,7 @@
  * Ensures that a class file can be turned into a working copy, modified and that its children are correct.
  */
 public void testWorkingCopy03() throws CoreException {
-	IClassFile clazz = this.jarRoot.getPackageFragment("workingcopy").getClassFile("X.class");
+	IOrdinaryClassFile clazz = this.jarRoot.getPackageFragment("workingcopy").getOrdinaryClassFile("X.class");
 	this.workingCopy = clazz.getWorkingCopy(null/*primary owner*/, (IProgressMonitor) null/*no progress*/);
 	this.workingCopy.getBuffer().setContents(
 		"package workingcopy;\n" +
@@ -1339,7 +1339,7 @@
  * Ensures that a class file working copy cannot be commited
  */
 public void testWorkingCopy04() throws CoreException {
-	IClassFile clazz = this.jarRoot.getPackageFragment("workingcopy").getClassFile("X.class");
+	IOrdinaryClassFile clazz = this.jarRoot.getPackageFragment("workingcopy").getOrdinaryClassFile("X.class");
 	this.workingCopy = clazz.getWorkingCopy(null/*primary owner*/, (IProgressMonitor) null/*no progress*/);
 	this.workingCopy.getBuffer().setContents(
 		"package workingcopy;\n" +
@@ -1364,7 +1364,7 @@
  * Ensures that a type can be created in class file working copy.
  */
 public void testWorkingCopy05() throws CoreException {
-	IClassFile clazz = this.jarRoot.getPackageFragment("workingcopy").getClassFile("X.class");
+	IOrdinaryClassFile clazz = this.jarRoot.getPackageFragment("workingcopy").getOrdinaryClassFile("X.class");
 	this.workingCopy = clazz.getWorkingCopy(null/*primary owner*/, (IProgressMonitor) null/*no progress*/);
 	this.workingCopy.createType(
 		"class Y {\n" +
@@ -1386,7 +1386,7 @@
  * Ensures that the primary compilation unit of class file working copy is correct.
  */
 public void testWorkingCopy06() throws CoreException {
-	IClassFile clazz = this.jarRoot.getPackageFragment("workingcopy").getClassFile("X.class");
+	IOrdinaryClassFile clazz = this.jarRoot.getPackageFragment("workingcopy").getOrdinaryClassFile("X.class");
 	WorkingCopyOwner owner = new WorkingCopyOwner() {};
 	this.workingCopy = clazz.getWorkingCopy(owner, null/*no progress*/);
 	ICompilationUnit primary = this.workingCopy.getPrimary();
@@ -1397,7 +1397,7 @@
  * Ensures that a class file working copy can be restored from the original source.
  */
 public void testWorkingCopy07() throws CoreException {
-	IClassFile clazz = this.jarRoot.getPackageFragment("workingcopy").getClassFile("X.class");
+	IOrdinaryClassFile clazz = this.jarRoot.getPackageFragment("workingcopy").getOrdinaryClassFile("X.class");
 	WorkingCopyOwner owner = new WorkingCopyOwner() {};
 	this.workingCopy = clazz.getWorkingCopy(owner, null/*no progress*/);
 	this.workingCopy.getBuffer().setContents(
@@ -1422,7 +1422,7 @@
  * Ensures that a class file working copy can be reconciled against.
  */
 public void testWorkingCopy08() throws CoreException {
-	IClassFile clazz = this.jarRoot.getPackageFragment("workingcopy").getClassFile("X.class");
+	IOrdinaryClassFile clazz = this.jarRoot.getPackageFragment("workingcopy").getOrdinaryClassFile("X.class");
 	ProblemRequestor problemRequestor = new ProblemRequestor();
 	WorkingCopyOwner owner = newWorkingCopyOwner(problemRequestor);
 	this.workingCopy = clazz.getWorkingCopy(owner, null/*no progress*/);
@@ -1464,7 +1464,7 @@
  * Ensures that types in a class file are hidden when reconciling against if the class file working copy is empty.
  */
 public void testWorkingCopy09() throws CoreException {
-	IClassFile clazz = this.jarRoot.getPackageFragment("workingcopy").getClassFile("X.class");
+	IOrdinaryClassFile clazz = this.jarRoot.getPackageFragment("workingcopy").getOrdinaryClassFile("X.class");
 	ProblemRequestor problemRequestor = new ProblemRequestor();
 	WorkingCopyOwner owner = newWorkingCopyOwner(problemRequestor);
 	this.workingCopy = clazz.getWorkingCopy(owner, null/*no progress*/);
@@ -1503,7 +1503,7 @@
 	IPath sourceAttachmentPath = this.jarRoot.getSourceAttachmentPath();
 	try {
 		attachSource(this.jarRoot, null, null);
-		IClassFile clazz = this.jarRoot.getPackageFragment("workingcopy").getClassFile("Y.class");
+		IOrdinaryClassFile clazz = this.jarRoot.getPackageFragment("workingcopy").getOrdinaryClassFile("Y.class");
 		assertNull("Should not have source attached", clazz.getSource());
 		this.workingCopy = clazz.getWorkingCopy(null/*primary owner*/, (IProgressMonitor) null/*no progress*/);
 		assertSourceEquals(
@@ -1529,7 +1529,7 @@
  */
 public void testWorkingCopy11() throws CoreException {
 	IPackageFragment pkg = this.jarRoot.getPackageFragment("workingcopy");
-	IClassFile clazz = pkg.getClassFile("X.class");
+	IOrdinaryClassFile clazz = pkg.getOrdinaryClassFile("X.class");
 	this.workingCopy = clazz.getWorkingCopy(null/*primary owner*/, (IProgressMonitor) null/*no progress*/);
 	this.workingCopy.getBuffer().setContents(	"");
 	this.workingCopy.makeConsistent(null);
@@ -1546,7 +1546,7 @@
  */
 public void testGetBytes() throws CoreException {
 	IPackageFragment pkg = this.jarRoot.getPackageFragment("workingcopy");
-	IClassFile clazz = pkg.getClassFile("X.class");
+	IOrdinaryClassFile clazz = pkg.getOrdinaryClassFile("X.class");
 	byte[] bytes = clazz.getBytes();
 	assertNotNull("No bytes", bytes);
 	int length = bytes.length;
@@ -1561,7 +1561,7 @@
  * Ensures that the annotations of a binary field are correct
  */
 public void testGenericFieldGetTypeSignature() throws JavaModelException {
-	IType type = this.jarRoot.getPackageFragment("generic").getClassFile("GenericField.class").getType();
+	IType type = this.jarRoot.getPackageFragment("generic").getOrdinaryClassFile("GenericField.class").getType();
 	IField field = type.getField("myField");
 	assertEquals(
 		"Wrong type signature",
@@ -1570,7 +1570,7 @@
 }
 
 	public void testBug246594() throws JavaModelException {
-		IType type = this.jarRoot.getPackageFragment("generic").getClassFile(
+		IType type = this.jarRoot.getPackageFragment("generic").getOrdinaryClassFile(
 				"Z.class").getType();
 		ITypeParameter typeParam = type.getTypeParameter("T");
 		assertNotNull(typeParam);
@@ -1581,7 +1581,7 @@
 	}
 
 	public void testBug246594a() throws JavaModelException {
-		IType type = this.jarRoot.getPackageFragment("generic").getClassFile(
+		IType type = this.jarRoot.getPackageFragment("generic").getOrdinaryClassFile(
 				"X.class").getType();
 		IMethod method = type.getMethod("foo", new String[] { "TK;", "TV;" });
 		ITypeParameter typeParam = method.getTypeParameter("V");
@@ -1604,7 +1604,7 @@
 					.getPackageFragmentRoot(getFile("/P/lib316937.jar"));
 
 			IType type = packageFragRoot.getPackageFragment("bug316937")
-					.getClassFile("Foo.class").getType();
+					.getOrdinaryClassFile("Foo.class").getType();
 			IType subType = type.getType("Bar");
 			IMethod[] methods = subType.getMethods();
 			assertEquals("Constructros", 1, methods.length);
@@ -1626,7 +1626,7 @@
 			packageFragRoot = project
 					.getPackageFragmentRoot(getFile("/P/lib316937.jar"));
 			type = packageFragRoot.getPackageFragment("bug316937")
-					.getClassFile("Foo.class").getType();
+					.getOrdinaryClassFile("Foo.class").getType();
 			subType = type.getType("Bar");
 			methods = subType.getMethods();
 			assertEquals("Constructros", 1, methods.length);
@@ -1650,7 +1650,7 @@
 		class GetClassThread extends Thread {
 			public String childString;
 			public void run(){
-				IClassFile clazz = ClassFileTests.this.jarRoot.getPackageFragment("workingcopy").getClassFile("X.class");
+				IOrdinaryClassFile clazz = ClassFileTests.this.jarRoot.getPackageFragment("workingcopy").getOrdinaryClassFile("X.class");
 				try {
 					this.childString = expandAll(clazz);
 				} catch (CoreException e) {
@@ -1675,7 +1675,7 @@
 			assertEquals("Unexpected children", expected, th1.childString);
 			assertEquals("Unexpected children", expected, th2.childString);
 			assertEquals("Unexpected children", expected, th3.childString);
-			IClassFile clazz = ClassFileTests.this.jarRoot.getPackageFragment("workingcopy").getClassFile("X.class");
+			IOrdinaryClassFile clazz = ClassFileTests.this.jarRoot.getPackageFragment("workingcopy").getOrdinaryClassFile("X.class");
 			clazz.close();
 		}
 	}
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ClasspathTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ClasspathTests.java
index e6535c2..03527fd 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ClasspathTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ClasspathTests.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 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
@@ -973,7 +973,7 @@
 		assertEquals(
 			"Unexpected numbers of .class files",
 			0,
-			pkg.getClassFiles().length);
+			pkg.getAllClassFiles().length);
 
 		setClasspath(
 			proj,
@@ -991,7 +991,7 @@
 		assertEquals(
 			"Unexpected numbers of .class files",
 			1,
-			pkg.getClassFiles().length);
+			pkg.getAllClassFiles().length);
 
 		//ensure that the new kind has been persisted in the classpath file
 		proj.close();
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/CompilationUnitTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/CompilationUnitTests.java
index 3c431dd..15454c7 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/CompilationUnitTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/CompilationUnitTests.java
@@ -2596,7 +2596,7 @@
 				"public class X {}\n");
 		ICompilationUnit cuD = getCompilationUnit("/P/src/X.java");
 		
-		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		ASTParser parser = ASTParser.newParser(AST_INTERNAL_JLS9);
 		parser.setProject(this.testProject);
 		parser.setSource(cuD);
 		parser.setResolveBindings(true);
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/CompletionTests2.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/CompletionTests2.java
index a3d5f37..866ae0f 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/CompletionTests2.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/CompletionTests2.java
@@ -18,7 +18,6 @@
 import java.util.Map;
 import java.util.StringTokenizer;
 
-import junit.framework.ComparisonFailure;
 import junit.framework.Test;
 
 import org.eclipse.core.resources.IFile;
@@ -52,8 +51,8 @@
 import org.eclipse.jdt.internal.core.SourceType;
 import org.eclipse.jdt.internal.core.search.indexing.IndexManager;
 
-@SuppressWarnings({"rawtypes", "unchecked"})
-public class CompletionTests2 extends ModifyingResourceTests implements RelevanceConstants {
+@SuppressWarnings({"rawtypes", "unchecked", "hiding"})
+public class CompletionTests2 extends AbstractJavaModelCompletionTests {
 	
 	static {
 //		TESTS_NAMES = new String[]{"testBug373409"};
@@ -176,15 +175,6 @@
 	super.tearDownSuite();
 }
 
-protected static void assertResults(String expected, String actual) {
-	try {
-		assertEquals(expected, actual);
-	} catch(ComparisonFailure c) {
-		System.out.println(actual);
-		System.out.println();
-		throw c;
-	}
-}
 static {
 //	TESTS_NAMES = new String[] { "testBug96950" };
 }
@@ -4990,8 +4980,8 @@
 	} finally {
 		this.deleteProject("PS1");
 		this.deleteProject("PS2");
-		this.deleteExternalFile(externalJar1);
-		this.deleteExternalFile(externalJar2);
+		this.deleteResource(new File(externalJar1));
+		this.deleteResource(new File(externalJar2));
 	}
 }
 public void testBug237469b() throws Exception {
@@ -5103,8 +5093,8 @@
 	} finally {
 		this.deleteProject("PS1");
 		this.deleteProject("PS2");
-		this.deleteExternalFile(externalJar1);
-		this.deleteExternalFile(externalJar2);
+		this.deleteResource(new File(externalJar1));
+		this.deleteResource(new File(externalJar2));
 	}
 }
 //https://bugs.eclipse.org/bugs/show_bug.cgi?id=270113
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/CompletionTests9.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/CompletionTests9.java
new file mode 100644
index 0000000..b631673
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/CompletionTests9.java
@@ -0,0 +1,760 @@
+/*******************************************************************************
+ * Copyright (c) 2016, 2017 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.jdt.core.tests.model;
+
+import java.util.Hashtable;
+
+import org.eclipse.core.resources.IncrementalProjectBuilder;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jdt.core.IClasspathAttribute;
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.core.tests.util.AbstractCompilerTest;
+
+import junit.framework.Test;
+
+public class CompletionTests9 extends AbstractJavaModelCompletionTests {
+
+	static {
+//		TESTS_NUMBERS = new int[] { 19 };
+//		TESTS_NAMES = new String[] {"test486988_001"};
+//		TESTS_NAMES = new String[] {"test0001"};
+}
+
+public CompletionTests9(String name) {
+	super(name);
+}
+
+public void setUpSuite() throws Exception {
+	if (COMPLETION_PROJECT == null)  {
+		COMPLETION_PROJECT = setUpJavaProject("Completion", "9", true);
+	} else {
+		setUpProjectCompliance(COMPLETION_PROJECT, "9", true);
+	}
+	super.setUpSuite();
+}
+
+public static Test suite() {
+	return buildModelTestSuite(AbstractCompilerTest.F_9, CompletionTests9.class);
+}
+
+
+private void createTypePlus(String folder, String pack, String typeName, String plus, boolean isClass, boolean createFolder) throws CoreException {
+	String filePath;
+	String fileContent;
+	fileContent = "package " + pack + ";\n" + "public " + (isClass ? "class " : "interface ") + typeName + ' ';
+	if (plus != null) fileContent = fileContent + plus;
+	fileContent = fileContent + " {}\n";
+	pack = pack.replace('.', '/');
+	if (createFolder)  createFolder(folder + pack);
+	filePath = folder + pack + "/" + typeName + ".java";
+	createFile(filePath, fileContent);
+}
+
+private void createType(String folder, String pack, String typeName) throws CoreException {
+	createTypePlus(folder, pack, typeName, null, true /* isClass */, true /*createFolder */);
+}
+
+public void test486988_0001() throws Exception {
+	IJavaProject project = createJavaProject("Completion9_1", new String[] {"src"}, new String[] {"JCL18_LIB"}, "bin", "9");
+	try {
+		project.open(null);
+		String projName = "/" + project.getElementName();
+		String packageName = "/src/";
+		String fullFilePath = projName + packageName + "module-info.java";
+		String fileContent =  "module my.mod { }\n";
+		createFile(fullFilePath, fileContent);
+		String completeBehind = "{";
+		int cursorLocation = fileContent.lastIndexOf(completeBehind) + completeBehind.length();
+		CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2();
+
+		ICompilationUnit unit = getCompilationUnit(fullFilePath);
+		unit.codeComplete(cursorLocation, requestor);
+
+		String expected = "exports[KEYWORD]{exports, null, null, exports, 49}\n"
+				+ "opens[KEYWORD]{opens, null, null, opens, 49}\n"
+				+ "provides[KEYWORD]{provides, null, null, provides, 49}\n"
+				+ "requires[KEYWORD]{requires, null, null, requires, 49}\n"
+				+ "uses[KEYWORD]{uses, null, null, uses, 49}";
+		assertResults(expected,	requestor.getResults());
+	} finally {
+		assertNotNull("Project Null", project);
+		deleteProject(project);
+	}
+}
+
+public void test486988_0002() throws JavaModelException {
+	this.workingCopies = new ICompilationUnit[1];
+	String fileContent =  "module my.mod { }\n";
+
+	this.workingCopies[0] = getWorkingCopy("/Completion/src/module-info.java", fileContent);
+
+	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true);
+	requestor.allowAllRequiredProposals();
+	String str = this.workingCopies[0].getSource();
+	String completeBehind = "{";
+	int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length();
+	this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner);
+	String expected = "exports[KEYWORD]{exports, null, null, exports, null, 49}\n"
+			+ "opens[KEYWORD]{opens, null, null, opens, null, 49}\n"
+			+ "provides[KEYWORD]{provides, null, null, provides, null, 49}\n"
+			+ "requires[KEYWORD]{requires, null, null, requires, null, 49}\n"
+			+ "uses[KEYWORD]{uses, null, null, uses, null, 49}";
+	assertResults(expected,	requestor.getResults());
+}
+
+public void test486988_0003() throws JavaModelException {
+	this.workingCopies = new ICompilationUnit[1];
+	String fileContent =  "module my.mod {e }\n";
+
+	this.workingCopies[0] = getWorkingCopy("/Completion/src/module-info.java", fileContent);
+
+	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true);
+	requestor.allowAllRequiredProposals();
+	String str = this.workingCopies[0].getSource();
+	String completeBehind = "{e";
+	int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length();
+	this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner);
+	String expected = "exports[KEYWORD]{exports, null, null, exports, null, 49}";
+	assertResults(expected,	requestor.getResults());
+}
+
+public void test486988_0004() throws JavaModelException {
+	this.workingCopies = new ICompilationUnit[1];
+	String fileContent =  "module my.mod { p }\n";
+
+
+	this.workingCopies[0] = getWorkingCopy("/Completion/src/module-info.java", fileContent);
+
+	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true);
+	requestor.allowAllRequiredProposals();
+	String str = this.workingCopies[0].getSource();
+	String completeBehind = "p";
+	int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length();
+	Hashtable<String, String> tmpOld = JavaCore.getOptions();
+	Hashtable<String, String> options = new Hashtable<>(tmpOld);
+	options.put(JavaCore.CODEASSIST_SUBSTRING_MATCH, JavaCore.DISABLED);
+	JavaCore.setOptions(options);
+
+	this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner);
+
+	JavaCore.setOptions(tmpOld);
+	String expected = "provides[KEYWORD]{provides, null, null, provides, null, 49}";
+	assertResults(expected,	requestor.getResults());
+}
+
+// run locally until th
+public void _test486988_0005() throws JavaModelException {
+	this.workingCopies = new ICompilationUnit[1];
+	String fileContent =  "module my.mod { p }\n";
+
+	this.workingCopies[0] = getWorkingCopy("/Completion/src/module-info.java", fileContent);
+
+	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true);
+	requestor.allowAllRequiredProposals();
+	String str = this.workingCopies[0].getSource();
+	String completeBehind = "p";
+	int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length();
+	Hashtable<String, String> tmpOld = JavaCore.getOptions();
+	Hashtable<String, String> options = new Hashtable<>(tmpOld);
+	options.put(JavaCore.CODEASSIST_SUBSTRING_MATCH, JavaCore.ENABLED);
+	JavaCore.setOptions(options);
+
+	this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner);
+
+	JavaCore.setOptions(tmpOld);
+	String expected = "exports[KEYWORD]{exports, null, null, exports, null, 19}\n"
+			+ "provides[KEYWORD]{provides, null, null, provides, null, 49}";
+	assertResults(expected,	requestor.getResults());
+}
+
+public void _test486988_0006() throws JavaModelException {
+	this.workingCopies = new ICompilationUnit[1];
+	String fileContent =  "module my.mod { u }\n";
+
+	this.workingCopies[0] = getWorkingCopy("/Completion/src/module-info.java", fileContent);
+
+	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true);
+	requestor.allowAllRequiredProposals();
+	String str = this.workingCopies[0].getSource();
+	String completeBehind = "u";
+	int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length();
+
+	Hashtable<String, String> tmpOld = JavaCore.getOptions();
+	Hashtable<String, String> options = new Hashtable<>(tmpOld);
+	options.put(JavaCore.CODEASSIST_SUBSTRING_MATCH, JavaCore.ENABLED);
+	JavaCore.setOptions(options);
+
+	this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner);
+
+	JavaCore.setOptions(tmpOld);
+
+	String expected = "requires[KEYWORD]{requires, null, null, requires, null, 19}\n"
+			+ "uses[KEYWORD]{uses, null, null, uses, null, 49}";
+	assertResults(expected, requestor.getResults());
+}
+
+public void test486988_0007() throws JavaModelException {
+	this.workingCopies = new ICompilationUnit[4];
+	String fileContent =  "module my.mod {"
+			+ "exports mypa"
+			+ "}\n";
+
+	this.workingCopies[0] = getWorkingCopy(
+			"/Completion/src/module-info.java", fileContent);
+	
+	this.workingCopies[1] = getWorkingCopy(
+			"/Completion/src/mypack1/Y.java",
+			"package pack1;\n" +
+			"public class Y {\n" +
+			"}");
+
+	this.workingCopies[2] = getWorkingCopy(
+			"/Completion/src/mypack2/Z.java",
+			"package pack2;\n" +
+			"public class Z {\n" +
+			"}");
+
+	this.workingCopies[3] = getWorkingCopy(
+			"/Completion/src/mypack1.mypack2/Z.java",
+			"package mypack1.mypack2;\n" +
+			"public class Z {\n" +
+			"}");
+
+	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true);
+	requestor.allowAllRequiredProposals();
+	String str = this.workingCopies[0].getSource();
+	String completeBehind = "mypa";
+	int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length();
+
+	Hashtable<String, String> tmpOld = JavaCore.getOptions();
+	Hashtable<String, String> options = new Hashtable<>(tmpOld);
+	options.put(JavaCore.CODEASSIST_SUBSTRING_MATCH, JavaCore.DISABLED);
+	JavaCore.setOptions(options);
+
+	this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner);
+	String expected = "mypack1[PACKAGE_REF]{mypack1, mypack1, null, null, null, 49}\n"
+			+ "mypack2[PACKAGE_REF]{mypack2, mypack2, null, null, null, 49}\n" 
+			+ "mypackage[PACKAGE_REF]{mypackage, mypackage, null, null, null, 49}";
+	assertResults(expected, requestor.getResults());
+	JavaCore.setOptions(tmpOld);
+}
+
+public void test486988_0008() throws JavaModelException {
+	this.workingCopies = new ICompilationUnit[4];
+	String fileContent =  "module my.mod {"
+			+ "exports mypack1 t"
+			+ "}\n";
+
+	this.workingCopies[0] = getWorkingCopy(
+			"/Completion/src/module-info.java", fileContent);
+
+	this.workingCopies[1] = getWorkingCopy(
+			"/Completion/src/mypack1/Y.java",
+			"package pack1;\n" +
+			"public class Y {\n" +
+			"}");
+
+	this.workingCopies[2] = getWorkingCopy(
+			"/Completion/src/mypack2/Z.java",
+			"package pack2;\n" +
+			"public class Z {\n" +
+			"}");
+
+	this.workingCopies[3] = getWorkingCopy(
+			"/Completion/src/mypack1.mypack2/Z.java",
+			"package mypack1.mypack2;\n" +
+			"public class Z {\n" +
+			"}");
+
+	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true);
+	requestor.allowAllRequiredProposals();
+	String str = this.workingCopies[0].getSource();
+	String completeBehind = "mypack1 t";
+	int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length();
+
+	Hashtable<String, String> tmpOld = JavaCore.getOptions();
+	Hashtable<String, String> options = new Hashtable<>(tmpOld);
+	options.put(JavaCore.CODEASSIST_SUBSTRING_MATCH, JavaCore.DISABLED);
+	JavaCore.setOptions(options);
+
+	this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner);
+	String expected = "to[KEYWORD]{to, null, null, to, null, 49}";
+	assertResults(expected, requestor.getResults());
+	JavaCore.setOptions(tmpOld);
+
+}
+public void test486988_0009() throws Exception {
+	IJavaProject project1 = createJavaProject("Completion9_1", new String[] {"src"}, new String[] {"JCL18_LIB"}, "bin", "9");
+	IJavaProject project2 = createJavaProject("Completion9_2", new String[] {"src"}, new String[] {"JCL18_LIB"}, "bin", "9");
+	try {
+		project2.open(null);
+		String fileContent =  "module org.eclipse.foo {}\n";
+		String filePath = "/Completion9_2/src/module-info.java";
+		createFile(filePath, fileContent);
+
+		project1.open(null);
+		filePath = "/Completion9_1/src/module-info.java";
+		fileContent =  "module com.greetings {requires o }\n";
+		createFile(filePath, fileContent);
+		String completeBehind = "requires o";
+		int cursorLocation = fileContent.lastIndexOf(completeBehind) + completeBehind.length();
+		CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2();
+
+		ICompilationUnit unit = getCompilationUnit(filePath);
+		unit.codeComplete(cursorLocation, requestor);
+
+		String expected = "[PROPOSAL]{org.eclipse.foo, org.eclipse.foo, null, null, 49}";
+		assertResults(expected,	requestor.getResults());
+	} finally {
+		deleteProject(project1);
+		deleteProject(project2);
+	}
+}
+
+public void test486988_0010() throws Exception {
+	IJavaProject project1 = createJavaProject("Completion9_1", new String[] {"src"}, new String[] {"JCL18_LIB"}, "bin", "9");
+	IJavaProject project2 = createJavaProject("Completion9_2", new String[] {"src"}, new String[] {"JCL18_LIB"}, "bin", "9");
+	try {
+		project1.open(null);
+		String filePath = "/Completion9_1/src/module-info.java";
+		String fileContent =  "module com.greetings {"
+				+ "requires org.eclipse.foo;\n"
+				+ "}\n";
+		createFile(filePath, fileContent);
+		project1.close(); //sync
+		project1.open(null);
+
+		project2.open(null);
+		String pack = "/Completion9_2/src/mypack1";
+		createFolder(pack);
+		filePath = pack + "/Y.java";
+		fileContent = "package pack1;\n" +
+		"public class Y {}\n";
+		createFile(filePath, fileContent);
+
+		fileContent =  "module org.eclipse.foo { "
+				+ "exports mypack1 to com"
+				+ "}\n";
+		filePath = "/Completion9_2/src/module-info.java";
+		createFile(filePath, fileContent);
+
+		String completeBehind = "com";
+		int cursorLocation = fileContent.lastIndexOf(completeBehind) + completeBehind.length();
+		CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2();
+
+		ICompilationUnit unit = getCompilationUnit(filePath);
+		unit.codeComplete(cursorLocation, requestor);
+
+		String expected = "[PROPOSAL]{com.greetings, com.greetings, null, null, 49}";
+		assertResults(expected,	requestor.getResults());
+	} finally {
+		deleteProject(project1);
+		deleteProject(project2);
+	}
+}
+public void test486988_0011() throws Exception {
+	IJavaProject project1 = createJavaProject("Completion9_1", new String[] {"src"}, new String[] {"JCL18_LIB"}, "bin", "9");
+	IJavaProject project2 = createJavaProject("Completion9_2", new String[] {"src"}, new String[] {"JCL18_LIB"}, "bin", "9");
+	try {
+		project1.open(null);
+		createType("/Completion9_1/src/", "pack11", "X11");
+		createType("/Completion9_1/src/", "pack12", "X12");
+		String filePath1 = "/Completion9_1/src/module-info.java";
+		String completeBehind = "pack";
+		String fileContent1 =  "module first {\n"
+				+ "requires second;\n"
+				+ "uses " + completeBehind
+				+ "}\n";
+		createFile(filePath1, fileContent1);
+
+		project2.open(null);
+		createType("/Completion9_2/src/", "pack21", "X21");
+		createType("/Completion9_2/src/", "pack22", "X22");
+
+		String fileContent2 =  "module second { "
+				+ "exports pack21 to first;\n"
+				+ "}\n";
+		String filePath2 = "/Completion9_2/src/module-info.java";
+		createFile(filePath2, fileContent2);
+
+		project1.close(); // sync
+		project2.close();
+		project2.open(null);
+		project1.open(null);
+
+		int cursorLocation = fileContent1.lastIndexOf(completeBehind) + completeBehind.length();
+		CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2();
+
+		ICompilationUnit unit = getCompilationUnit(filePath1);
+		unit.codeComplete(cursorLocation, requestor);
+
+		String expected = "pack11[PACKAGE_REF]{pack11, pack11, null, null, 49}\n"
+				+ "pack12[PACKAGE_REF]{pack12, pack12, null, null, 49}";
+		assertResults(expected,	requestor.getResults());
+	} finally {
+		deleteProject(project1);
+		deleteProject(project2);
+	}
+}
+public void test486988_0012() throws Exception {
+	IJavaProject project1 = createJavaProject("Completion9_1", new String[] {"src"}, new String[] {"JCL18_LIB"}, "bin", "9");
+	IJavaProject project2 = createJavaProject("Completion9_2", new String[] {"src"}, new String[] {"JCL18_LIB"}, "bin", "9");
+	try {
+		project1.open(null);
+		createType("/Completion9_1/src/", "pack11", "X11");
+		createType("/Completion9_1/src/", "pack12", "X12");
+		String filePath1 = "/Completion9_1/src/module-info.java";
+		String completeBehind = "X1";
+		String fileContent1 =  "module first {\n"
+				+ "requires second;\n"
+				+ "uses " + completeBehind
+				+ "}\n";
+		createFile(filePath1, fileContent1);
+
+		project2.open(null);
+		createType("/Completion9_2/src/", "pack21", "X21");
+		createType("/Completion9_2/src/", "pack22", "X22");
+
+		String fileContent2 =  "module second { "
+				+ "exports pack21 to first;"
+				+ "}\n";
+		String filePath2 = "/Completion9_2/src/module-info.java";
+		createFile(filePath2, fileContent2);
+
+		project1.close(); // sync
+		project2.close();
+		project2.open(null);
+		project1.open(null);
+
+		int cursorLocation = fileContent1.lastIndexOf(completeBehind) + completeBehind.length();
+		CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2();
+
+		ICompilationUnit unit = getCompilationUnit(filePath1);
+		unit.codeComplete(cursorLocation, requestor);
+
+		String expected = "X11[TYPE_REF]{pack11.X11, pack11, Lpack11.X11;, null, 49}\n"
+				+ "X12[TYPE_REF]{pack12.X12, pack12, Lpack12.X12;, null, 49}";
+		assertResults(expected,	requestor.getResults());
+	} finally {
+		deleteProject(project1);
+		deleteProject(project2);
+	}
+}
+public void test486988_0013() throws Exception {
+	IJavaProject project1 = createJavaProject("Completion9_1", new String[] {"src"}, new String[] {"JCL18_LIB"}, "bin", "9");
+	IJavaProject project2 = createJavaProject("Completion9_2", new String[] {"src"}, new String[] {"JCL18_LIB"}, "bin", "9");
+	try {
+		project1.open(null);
+		createType("/Completion9_1/src/", "pack11", "X11");
+		createType("/Completion9_1/src/", "pack12", "X12");
+		String filePath1 = "/Completion9_1/src/module-info.java";
+		String completeBehind = "X1";
+		String fileContent1 =  "module first {\n"
+				+ "requires second;\n"
+				+ "provides " + completeBehind
+				+ "}\n";
+		createFile(filePath1, fileContent1);
+
+		project2.open(null);
+		createType("/Completion9_2/src/", "pack21", "X21");
+		createType("/Completion9_2/src/", "pack22", "X22");
+
+		String fileContent2 =  "module second { "
+				+ "exports pack21 to first;"
+				+ "}\n";
+		String filePath2 = "/Completion9_2/src/module-info.java";
+		createFile(filePath2, fileContent2);
+
+		project1.close(); // sync
+		project2.close();
+		project2.open(null);
+		project1.open(null);
+
+		int cursorLocation = fileContent1.lastIndexOf(completeBehind) + completeBehind.length();
+		CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2();
+
+		ICompilationUnit unit = getCompilationUnit(filePath1);
+		unit.codeComplete(cursorLocation, requestor);
+
+		String expected = "X11[TYPE_REF]{pack11.X11, pack11, Lpack11.X11;, null, 49}\n"
+				+ "X12[TYPE_REF]{pack12.X12, pack12, Lpack12.X12;, null, 49}";
+		assertResults(expected,	requestor.getResults());
+	} finally {
+		deleteProject(project1);
+		deleteProject(project2);
+	}
+}
+public void test486988_0014() throws Exception {
+	IJavaProject project1 = createJavaProject("Completion9_1", new String[] {"src"}, new String[] {"JCL18_LIB"}, "bin", "9");
+	IJavaProject project2 = createJavaProject("Completion9_2", new String[] {"src"}, new String[] {"JCL18_LIB"}, "bin", "9");
+	try {
+		project1.open(null);
+		createType("/Completion9_1/src/", "pack11", "X11");
+		createType("/Completion9_1/src/", "pack12", "X12");
+		String filePath1 = "/Completion9_1/src/module-info.java";
+		String completeBehind = "w";
+		String fileContent1 =  "module first {\n"
+				+ "requires second;\n"
+				+ "provides pack11.X11 " + completeBehind
+				+ "}\n";
+		createFile(filePath1, fileContent1);
+
+		project2.open(null);
+		createType("/Completion9_2/src/", "pack21", "X21");
+		createType("/Completion9_2/src/", "pack22", "X22");
+
+		String fileContent2 =  "module second { "
+				+ "exports pack21 to first;"
+				+ "}\n";
+		String filePath2 = "/Completion9_2/src/module-info.java";
+		createFile(filePath2, fileContent2);
+
+		project1.close(); // sync
+		project2.close();
+		project2.open(null);
+		project1.open(null);
+
+		int cursorLocation = fileContent1.lastIndexOf(completeBehind) + completeBehind.length();
+		CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2();
+
+		ICompilationUnit unit = getCompilationUnit(filePath1);
+		unit.codeComplete(cursorLocation, requestor);
+
+		String expected = "with[KEYWORD]{with, null, null, with, 49}";
+		assertResults(expected,	requestor.getResults());
+	} finally {
+		deleteProject(project1);
+		deleteProject(project2);
+	}
+}
+public void test486988_0015() throws Exception {
+	IJavaProject project1 = createJavaProject("Completion9_1", new String[] {"src"}, new String[] {"JCL18_LIB"}, "bin", "9");
+	IJavaProject project2 = createJavaProject("Completion9_2", new String[] {"src"}, new String[] {"JCL18_LIB"}, "bin", "9");
+	try {
+		project1.open(null);
+		createType("/Completion9_1/src/", "pack11", "X11");
+		createType("/Completion9_1/src/", "pack11.packinternal", "Z11");
+		createTypePlus("/Completion9_1/src/", "pack11.packinternal", "Z12", "implements pack22.I22", true /* isClass */, false /* createFolder */);
+		createType("/Completion9_1/src/", "pack12", "X12");
+		createTypePlus("/Completion9_1/src/", "pack12", "Y12", "implements pack22.I22", true /* isClass */, false /* createFolder */);
+		String filePath1 = "/Completion9_1/src/module-info.java";
+		String completeBehind = "with p";
+		String fileContent1 =  "module first {\n"
+				+ "requires second;\n"
+				+ "provides pack22.I22 " + completeBehind
+				+ "}\n";
+		createFile(filePath1, fileContent1);
+		addClasspathEntry(project1, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+
+		project2.open(null);
+		createType("/Completion9_2/src/", "pack21", "X21");
+		createType("/Completion9_2/src/", "pack22", "X22");
+		createTypePlus("/Completion9_2/src/", "pack22", "I22", null, false /* isClass */, false /* createFolder */);
+
+		String fileContent2 =  "module second { "
+				+ "exports pack21 to first;\n"
+				+ "exports pack22 to first;\n" 
+				+ "}\n";
+		String filePath2 = "/Completion9_2/src/module-info.java";
+		createFile(filePath2, fileContent2);
+		addClasspathEntry(project2, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+
+		project1.close(); // sync
+		project2.close();
+		project2.open(null);
+		project1.open(null);
+
+		int cursorLocation = fileContent1.lastIndexOf(completeBehind) + completeBehind.length();
+		CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2();
+
+		ICompilationUnit unit = getCompilationUnit(filePath1);
+		unit.codeComplete(cursorLocation, requestor);
+
+		String expected = "pack11[PACKAGE_REF]{pack11, pack11, null, null, 49}\n" +
+				"pack11.packinternal[PACKAGE_REF]{pack11.packinternal, pack11.packinternal, null, null, 49}\n" + 
+				"pack12[PACKAGE_REF]{pack12, pack12, null, null, 49}"
+				//+ "\nShow me the type Honey!!"
+				;
+		assertResults(expected,	requestor.getResults());
+	} finally {
+		deleteProject(project1);
+		deleteProject(project2);
+	}
+}
+public void testBug518618_001() throws Exception {
+	IJavaProject project1 = createJavaProject("Completion9_1", new String[] {"src"}, new String[] {"JCL18_LIB"}, "bin", "9");
+	IJavaProject project2 = createJavaProject("Completion9_2", new String[] {"src"}, new String[] {"JCL18_LIB"}, "bin", "9");
+	try {
+		project1.open(null);
+		createType("/Completion9_1/src/", "pack11", "X11");
+		createType("/Completion9_1/src/", "pack11.packinternal", "Z11");
+		createTypePlus("/Completion9_1/src/", "pack11.packinternal", "Z12", "implements pack22.I22", true /* isClass */, false /* createFolder */);
+		createType("/Completion9_1/src/", "pack12", "X12");
+		createTypePlus("/Completion9_1/src/", "pack12", "Y12", "implements pack22.I22", true /* isClass */, false /* createFolder */);
+		String filePath1 = "/Completion9_1/src/module-info.java";
+		String completeBehind = "with pack12.Y12;";
+		String fileContent1 =  "module first {\n"
+				+ "requires second;\n"
+				+ "provides pack22.I22 " + completeBehind
+				+ "}\n";
+		createFile(filePath1, fileContent1);
+		addClasspathEntry(project1, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+
+		project2.open(null);
+		createType("/Completion9_2/src/", "pack21", "X21");
+		createType("/Completion9_2/src/", "pack22", "X22");
+		createTypePlus("/Completion9_2/src/", "pack22", "I22", null, false /* isClass */, false /* createFolder */);
+
+		String fileContent2 =  "module second { "
+				+ "exports pack21 to first;\n"
+				+ "exports pack22 to first;\n" 
+				+ "}\n";
+		String filePath2 = "/Completion9_2/src/module-info.java";
+		createFile(filePath2, fileContent2);
+		addClasspathEntry(project2, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+
+		project1.close(); // sync
+		project2.close();
+		project2.open(null);
+		project1.open(null);
+
+		int cursorLocation = fileContent1.lastIndexOf(completeBehind) + completeBehind.length();
+		CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2();
+
+		ICompilationUnit unit = getCompilationUnit(filePath1);
+		unit.codeComplete(cursorLocation, requestor);
+
+		String expected = "exports[KEYWORD]{exports, null, null, exports, 49}\n"
+				+ "opens[KEYWORD]{opens, null, null, opens, 49}\n"
+				+ "provides[KEYWORD]{provides, null, null, provides, 49}\n"
+				+ "requires[KEYWORD]{requires, null, null, requires, 49}\n"
+				+ "uses[KEYWORD]{uses, null, null, uses, 49}";
+		assertResults(expected,	requestor.getResults());
+	} finally {
+		deleteProject(project1);
+		deleteProject(project2);
+	}
+}
+// test that types in a module can be correctly resolved including their super types when seen from the unnamed module during completion
+public void testBug522164_src() throws Exception {
+	IJavaProject project1 = createJavaProject("Completion9_1", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+	IJavaProject project2 = createJavaProject("Completion9_2", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+	try {
+		project1.open(null);
+		createTypePlus("/Completion9_1/src/", "p.priv", "PrivIfc", null, false, true);
+		createFolder("/Completion9_1/src/p/a");
+		createFile("/Completion9_1/src/p/a/Ifc.java",
+					"package p.a;\n" +
+					"public interface Ifc extends p.priv.PrivIfc {\n" +
+					"	default void test() {};\n" +
+					"}\n");
+		createTypePlus("/Completion9_1/src/", "p.a", "Impl", "implements Ifc", true, false);
+		createFile("/Completion9_1/src/module-info.java",
+					"module mod.one { \n" +
+					"	exports p.a;\n" +
+					"	provides p.a.Ifc with p.a.Impl;\n" +
+					"}");
+		project1.getProject().build(IncrementalProjectBuilder.FULL_BUILD, null);
+
+		IClasspathAttribute[] attributes = {
+			JavaCore.newClasspathAttribute(IClasspathAttribute.MODULE, "true")	
+		};
+		addClasspathEntry(project2, JavaCore.newProjectEntry(new Path("/Completion9_1"), null, false, attributes, false));
+		createFolder("/Completion9_2/src/x");
+		String filePath = "/Completion9_2/src/x/X.java";
+		String completeBehind = "ifc.te";
+		String content =
+					"package x;\n" +
+					"public class X {\n" +
+					"	void test(p.a.Ifc ifc) {\n" +
+					"		" + completeBehind + "\n" +
+					"	}\n" +
+					"}\n";
+		createFile(filePath, content);
+		int cursorLocation = content.lastIndexOf(completeBehind) + completeBehind.length();
+		CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2();
+
+		waitUntilIndexesReady();
+
+		ICompilationUnit unit = getCompilationUnit("/Completion9_2/src/x/X.java");
+		unit.codeComplete(cursorLocation, requestor);
+
+		String expected = "test[METHOD_REF]{test(), Lp.a.Ifc;, ()V, test, 60}";
+		assertResults(expected,	requestor.getResults());
+
+	} finally {
+		deleteProject(project1);
+		deleteProject(project2);
+	}
+}
+// test that types in a module can be correctly resolved including their super types when seen from the unnamed module during completion
+public void testBug522164_jar() throws Exception {
+	IJavaProject project1 = createJavaProject("Completion9_1", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+	try {
+		project1.open(null);
+		String[] jarSources = {
+					"module-info.java",
+					"module mod.one { \n" +
+					"	exports p.a;\n" +
+					"	provides p.a.Ifc with p.a.Impl;\n" +
+					"}",
+					"p/priv/PrivIfc.java",
+					"package p.priv;\n" +
+					"public interface PrivIfc {}\n",
+					"p/a/Ifc.java",
+					"package p.a;\n" +
+					"public interface Ifc extends p.priv.PrivIfc {\n" +
+					"	default void test() {};\n" +
+					"}\n",
+					"p/a/Impl.java",
+					"package p.a;\n" +
+					"public class Impl implements Ifc {}\n",
+			};
+		createFolder("/Completion9_1/lib");
+		createJar(jarSources, project1.getProject().getLocation().append("lib").append("mod.one.jar").toOSString(), new String[0], "9");
+		refresh(project1);
+
+		IClasspathAttribute[] attributes = {
+			JavaCore.newClasspathAttribute(IClasspathAttribute.MODULE, "true")	
+		};
+		addClasspathEntry(project1, JavaCore.newLibraryEntry(new Path("/Completion9_1/lib/mod.one.jar"), null, null, null, attributes, false));
+
+		createFolder("/Completion9_1/src/x");
+		String filePath = "/Completion9_1/src/x/X.java";
+		String completeBehind = "ifc.te";
+		String content =
+					"package x;\n" +
+					"public class X {\n" +
+					"	void test(p.a.Ifc ifc) {\n" +
+					"		" + completeBehind + "\n" +
+					"	}\n" +
+					"}\n";
+		createFile(filePath, content);
+		int cursorLocation = content.lastIndexOf(completeBehind) + completeBehind.length();
+		CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2();
+
+		waitUntilIndexesReady();
+
+		ICompilationUnit unit = getCompilationUnit("/Completion9_1/src/x/X.java");
+		unit.codeComplete(cursorLocation, requestor);
+
+		String expected = "test[METHOD_REF]{test(), Lp.a.Ifc;, ()V, test, 60}";
+		assertResults(expected,	requestor.getResults());
+
+	} finally {
+		deleteProject(project1);
+	}
+}
+}
\ No newline at end of file
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/CopyMoveElementsTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/CopyMoveElementsTests.java
index d3fd949..40ed4d8 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/CopyMoveElementsTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/CopyMoveElementsTests.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 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
@@ -71,7 +71,7 @@
  * Ensures that a binary field cannot be renamed.
  */
 public void testCopyBinaryField() throws JavaModelException {
-	IClassFile cf = getClassFile("P", "/BinaryProject/bin", "", "X.class");
+	IOrdinaryClassFile cf = getClassFile("P", "/BinaryProject/bin", "", "X.class");
 	IField binaryField = cf.getType().getField("bar");
 	copyNegative(binaryField, cf, null, "bar2", false, IJavaModelStatusConstants.READ_ONLY);
 }
@@ -79,7 +79,7 @@
  * Ensures that a binary method cannot be renamed.
  */
 public void testCopyBinaryMethod() throws JavaModelException {
-	IClassFile cf = getClassFile("P", "/BinaryProject/bin", "", "X.class");
+	IOrdinaryClassFile cf = getClassFile("P", "/BinaryProject/bin", "", "X.class");
 	IMethod binaryMethod = cf.getType().getMethod("foo", new String[] {});
 	copyNegative(binaryMethod, cf, null, "foo2", false, IJavaModelStatusConstants.READ_ONLY);
 }
@@ -87,7 +87,7 @@
  * Ensures that a binary type cannot be copied.
  */
 public void testCopyBinaryType() throws JavaModelException {
-	IClassFile cf = getClassFile("P", "/BinaryProject/bin", "", "X.class");
+	IOrdinaryClassFile cf = getClassFile("P", "/BinaryProject/bin", "", "X.class");
 	IType binaryType = cf.getType();
 	copyNegative(binaryType, cf, null, "Y", false, IJavaModelStatusConstants.READ_ONLY);
 }
@@ -548,7 +548,7 @@
 	IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
 	IField fieldSource= typeSource.getField("foo");
 
-	IClassFile cf = getClassFile("P", "/BinaryProject/bin", "", "X.class");
+	IOrdinaryClassFile cf = getClassFile("P", "/BinaryProject/bin", "", "X.class");
 
 	copyNegative(fieldSource, cf.getType(), null, null, false, IJavaModelStatusConstants.INVALID_DESTINATION);
 }
@@ -567,7 +567,7 @@
 		IField fieldSource= typeSource.getField("foo");
 
 		this.createJavaProject("P2", new String[] {"src"}, new String[] {"/BinaryProject/bin"}, "bin");
-		IClassFile cf = getClassFile("P2", "/BinaryProject/bin", "", "X.class");
+		IOrdinaryClassFile cf = getClassFile("P2", "/BinaryProject/bin", "", "X.class");
 
 		copyNegative(fieldSource, cf.getType(), null, null, false, IJavaModelStatusConstants.INVALID_DESTINATION);
 	} finally {
@@ -1875,7 +1875,7 @@
 	IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
 	IField fieldSource= typeSource.getField("foo");
 
-	IClassFile cf = getClassFile("P", "/BinaryProject/bin", "", "X.class");
+	IOrdinaryClassFile cf = getClassFile("P", "/BinaryProject/bin", "", "X.class");
 
 	moveNegative(fieldSource, cf.getType(), null, null, false, IJavaModelStatusConstants.INVALID_DESTINATION);
 }
@@ -1894,7 +1894,7 @@
 		IField fieldSource= typeSource.getField("foo");
 
 		this.createJavaProject("P2", new String[] {"src"}, new String[] {"/BinaryProject/bin"}, "bin");
-		IClassFile cf = getClassFile("P2", "/BinaryProject/bin", "", "X.class");
+		IOrdinaryClassFile cf = getClassFile("P2", "/BinaryProject/bin", "", "X.class");
 
 		moveNegative(fieldSource, cf.getType(), null, null, false, IJavaModelStatusConstants.INVALID_DESTINATION);
 	} finally {
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/DeleteTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/DeleteTests.java
index 51610f6..638cba2 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/DeleteTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/DeleteTests.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 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
@@ -107,7 +107,7 @@
 		};
 		this.createFile("P1/lib/X.class", bytes);
 
-		IClassFile cf = getClassFile("P1/lib/X.class");
+		IOrdinaryClassFile cf = getClassFile("P1/lib/X.class");
 		IMethod method = cf.getType().getMethod("foo", new String[] {});
 
 		try {
@@ -141,7 +141,7 @@
 		};
 		this.createFile("P1/lib/X.class", bytes);
 
-		IClassFile cf = getClassFile("P1/lib/X.class");
+		IOrdinaryClassFile cf = getClassFile("P1/lib/X.class");
 		IType binaryType = cf.getType();
 
 		try {
@@ -836,7 +836,7 @@
 			},
 			JavaCore.VERSION_1_4
 		);
-		IClassFile classFile = getClassFile("P78128", "lib.jar", "p", "X.class");
+		IOrdinaryClassFile classFile = getClassFile("P78128", "lib.jar", "p", "X.class");
 		ToolFactory.createDefaultClassFileReader(classFile, IClassFileReader.ALL);
 		Util.delete(javaProject.getProject());
 	} finally {
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ExistenceTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ExistenceTests.java
index b7cfa67..1c9537e 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ExistenceTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ExistenceTests.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 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
@@ -65,7 +65,7 @@
 public void testBinaryMethodAfterNonExistingMember() throws CoreException {
 	try {
 		IJavaProject project = createJavaProject("P", new String[] {}, new String[] {"JCL_LIB"}, "");
-		IClassFile classFile = project.getPackageFragmentRoot(getExternalJCLPathString()).getPackageFragment("java.lang").getClassFile("Object.class");
+		IOrdinaryClassFile classFile = project.getPackageFragmentRoot(getExternalJCLPathString()).getPackageFragment("java.lang").getOrdinaryClassFile("Object.class");
 		classFile.open(null);
 		IType type = classFile.getType();
 		type.getMethod("foo", new String[0]).exists();
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ExternalAnnotations17Test.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ExternalAnnotations17Test.java
index 89e92bd..3b06c21 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ExternalAnnotations17Test.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ExternalAnnotations17Test.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2015 GK Software AG, and others.
+ * Copyright (c) 2015, 2016 GK Software AG, 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
@@ -58,6 +58,13 @@
 	}
 
 	/**
+	 * @deprecated
+	 */
+	static int getJLS8() {
+		return AST.JLS8;
+	}
+
+	/**
 	 * @deprecated indirectly uses deprecated class PackageAdmin
 	 */
 	protected Bundle[] getAnnotationBundles() {
@@ -148,7 +155,7 @@
 				"	}\n" +
 				"}\n",
 				true, new NullProgressMonitor()).getWorkingCopy(new NullProgressMonitor());
-		CompilationUnit reconciled = unit.reconcile(AST.JLS8, true, null, new NullProgressMonitor());
+		CompilationUnit reconciled = unit.reconcile(getJLS8(), true, null, new NullProgressMonitor());
 		IProblem[] problems = reconciled.getProblems();
 		assertProblems(problems, new String[] {
 			"Pb(933) Null type mismatch: required '@NonNull String' but the provided value is specified as @Nullable",
@@ -165,7 +172,7 @@
 			}, null);
 		IPackageFragment fragment = this.root.getPackageFragment("test1");
 		ICompilationUnit unit = fragment.getCompilationUnit("Test1.java").getWorkingCopy(new NullProgressMonitor());
-		CompilationUnit reconciled = unit.reconcile(AST.JLS8, true, null, new NullProgressMonitor());
+		CompilationUnit reconciled = unit.reconcile(getJLS8(), true, null, new NullProgressMonitor());
 		IProblem[] problems = reconciled.getProblems();
 		assertProblems(problems,
 					new String[] {
@@ -214,7 +221,7 @@
 				"	}\n" +
 				"}\n",
 				true, new NullProgressMonitor()).getWorkingCopy(new NullProgressMonitor());
-		CompilationUnit reconciled = unit.reconcile(AST.JLS8, true, null, new NullProgressMonitor());
+		CompilationUnit reconciled = unit.reconcile(getJLS8(), true, null, new NullProgressMonitor());
 		IProblem[] problems = reconciled.getProblems();
 		assertProblems(problems, new String[] {
 			"Pb(933) Null type mismatch: required '@NonNull String' but the provided value is specified as @Nullable",
@@ -250,7 +257,7 @@
 				"}\n";
 		ICompilationUnit cu = fragment.createCompilationUnit("Test1.java", test1Content,
 						true, new NullProgressMonitor()).getWorkingCopy(new NullProgressMonitor());
-		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		ASTParser parser = ASTParser.newParser(getJLS8());
 		parser.setSource(cu);
 		parser.setResolveBindings(true);
 		parser.setStatementsRecovery(false);
@@ -282,7 +289,7 @@
 		assertTrue("file should exist", annotationFile.exists());
 
 		// check that the error is gone:
-		CompilationUnit reconciled = cu.reconcile(AST.JLS8, true, null, new NullProgressMonitor());
+		CompilationUnit reconciled = cu.reconcile(getJLS8(), true, null, new NullProgressMonitor());
 		assertNoProblems(reconciled.getProblems());		
 	}
 
@@ -312,7 +319,7 @@
 				"}\n";
 		ICompilationUnit cu = fragment.createCompilationUnit("Test1.java", test1Content,
 						true, new NullProgressMonitor()).getWorkingCopy(new NullProgressMonitor());
-		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		ASTParser parser = ASTParser.newParser(getJLS8());
 		parser.setSource(cu);
 		parser.setResolveBindings(true);
 		parser.setStatementsRecovery(false);
@@ -344,7 +351,7 @@
 		assertTrue("file should exist", annotationFile.exists());
 
 		// check that the error is even worse now:
-		CompilationUnit reconciled = cu.reconcile(AST.JLS8, true, null, new NullProgressMonitor());
+		CompilationUnit reconciled = cu.reconcile(getJLS8(), true, null, new NullProgressMonitor());
 		problems = reconciled.getProblems();
 		assertProblems(problems, new String[] {
 				"Pb(933) Null type mismatch: required '@NonNull Lib1<String>' but the provided value is specified as @Nullable",
@@ -378,7 +385,7 @@
 				"	}\n" +
 				"}\n",
 				true, new NullProgressMonitor()).getWorkingCopy(new NullProgressMonitor());
-		CompilationUnit reconciled = cu.reconcile(AST.JLS8, true, null, new NullProgressMonitor());
+		CompilationUnit reconciled = cu.reconcile(getJLS8(), true, null, new NullProgressMonitor());
 		IProblem[] problems = reconciled.getProblems();
 		assertProblems(problems, new String[] {
 				"Pb(912) Null type safety: The expression of type 'Lib1<String>' needs unchecked conversion to conform to '@NonNull Lib1<String>'",
@@ -387,7 +394,7 @@
 		// acquire library AST:
 		IType type = this.project.findType("libs.Lib1");
 		ICompilationUnit libWorkingCopy = type.getClassFile().getWorkingCopy(this.wcOwner, null);
-		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		ASTParser parser = ASTParser.newParser(getJLS8());
 		parser.setSource(libWorkingCopy);
 		parser.setResolveBindings(true);
 		parser.setStatementsRecovery(false);
@@ -417,7 +424,7 @@
 		assertTrue("file should exist", annotationFile.exists());
 
 		// check that the error has gone:
-		reconciled = cu.reconcile(AST.JLS8, true, null, new NullProgressMonitor());
+		reconciled = cu.reconcile(getJLS8(), true, null, new NullProgressMonitor());
 		assertNoProblems(reconciled.getProblems());
 	}
 
@@ -457,7 +464,7 @@
 					"	}\n" +
 					"}\n",
 					true, new NullProgressMonitor()).getWorkingCopy(new NullProgressMonitor());
-			CompilationUnit reconciled = cu.reconcile(AST.JLS8, true, null, new NullProgressMonitor());
+			CompilationUnit reconciled = cu.reconcile(getJLS8(), true, null, new NullProgressMonitor());
 			IProblem[] problems = reconciled.getProblems();
 			assertProblems(problems, new String[] {
 					"Pb(912) Null type safety: The expression of type 'Lib1<String>' needs unchecked conversion to conform to '@NonNull Lib1<String>'",
@@ -505,7 +512,7 @@
 					"	}\n" +
 					"}\n",
 					true, new NullProgressMonitor()).getWorkingCopy(new NullProgressMonitor());
-			CompilationUnit reconciled = cu.reconcile(AST.JLS8, true, null, new NullProgressMonitor());
+			CompilationUnit reconciled = cu.reconcile(getJLS8(), true, null, new NullProgressMonitor());
 			IProblem[] problems = reconciled.getProblems();
 			assertProblems(problems, new String[] {
 					"Pb(912) Null type safety: The expression of type 'Lib1<String>' needs unchecked conversion to conform to '@NonNull Lib1<String>'",
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ExternalAnnotations18Test.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ExternalAnnotations18Test.java
index 4d61dc0..df5fb09 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ExternalAnnotations18Test.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ExternalAnnotations18Test.java
@@ -175,6 +175,13 @@
 	}
 
 	/**
+	 * @deprecated
+	 */
+	static int getJLS8() {
+		return AST.JLS8;
+	}
+
+	/**
 	 * @deprecated indirectly uses deprecated class PackageAdmin
 	 */
 	protected Bundle[] getAnnotationBundles() {
@@ -457,7 +464,7 @@
 			}, null);
 		IPackageFragment fragment = this.root.getPackageFragment("test1");
 		ICompilationUnit unit = fragment.getCompilationUnit("Test1.java").getWorkingCopy(new NullProgressMonitor());
-		CompilationUnit reconciled = unit.reconcile(AST.JLS8, true, null, new NullProgressMonitor());
+		CompilationUnit reconciled = unit.reconcile(getJLS8(), true, null, new NullProgressMonitor());
 		IProblem[] problems = reconciled.getProblems();
 		assertNoProblems(problems);
 	}
@@ -520,7 +527,7 @@
 				"	}\n" + 
 				"}\n",
 				true, new NullProgressMonitor()).getWorkingCopy(new NullProgressMonitor());
-		CompilationUnit reconciled = unit.reconcile(AST.JLS8, true, null, new NullProgressMonitor());
+		CompilationUnit reconciled = unit.reconcile(getJLS8(), true, null, new NullProgressMonitor());
 		IProblem[] problems = reconciled.getProblems();
 		assertNoProblems(problems);
 	}
@@ -586,7 +593,7 @@
 				"	}\n" + 
 				"}\n",
 				true, new NullProgressMonitor()).getWorkingCopy(new NullProgressMonitor());
-		CompilationUnit reconciled = unit.reconcile(AST.JLS8, true, null, new NullProgressMonitor());
+		CompilationUnit reconciled = unit.reconcile(getJLS8(), true, null, new NullProgressMonitor());
 		IProblem[] problems = reconciled.getProblems();
 		assertProblems(problems, new String[] {
 				"Pb(980) Unsafe interpretation of method return type as '@NonNull' based on the receiver type 'Iterator<@NonNull capture#of ?>'. Type 'Iterator<E>' doesn't seem to be designed with null type annotations in mind",
@@ -647,7 +654,7 @@
 				"	}\n" + 
 				"}\n",
 				true, new NullProgressMonitor()).getWorkingCopy(new NullProgressMonitor());
-		CompilationUnit reconciled = unit.reconcile(AST.JLS8, true, null, new NullProgressMonitor());
+		CompilationUnit reconciled = unit.reconcile(getJLS8(), true, null, new NullProgressMonitor());
 		IProblem[] problems = reconciled.getProblems();
 		assertProblems(problems, new String[] {
 			"Pb(955) Null type safety (type annotations): The expression of type 'String[]' needs unchecked conversion to conform to '@Nullable String @Nullable[]'",
@@ -693,7 +700,7 @@
 				"	}\n" +
 				"}\n",
 				true, new NullProgressMonitor()).getWorkingCopy(new NullProgressMonitor());
-		CompilationUnit reconciled = unit.reconcile(AST.JLS8, true, null, new NullProgressMonitor());
+		CompilationUnit reconciled = unit.reconcile(getJLS8(), true, null, new NullProgressMonitor());
 		IProblem[] problems = reconciled.getProblems();
 		assertProblems(problems, new String[] {
 			"Pb(953) Null type mismatch (type annotations): required '@NonNull String' but this expression has type '@Nullable String'",
@@ -744,7 +751,7 @@
 				"	}\n" +
 				"}\n",
 				true, new NullProgressMonitor()).getWorkingCopy(new NullProgressMonitor());
-		CompilationUnit reconciled = unit.reconcile(AST.JLS8, true, null, new NullProgressMonitor());
+		CompilationUnit reconciled = unit.reconcile(getJLS8(), true, null, new NullProgressMonitor());
 		IProblem[] problems = reconciled.getProblems();
 		assertProblems(problems, new String[] {
 			"Pb(953) Null type mismatch (type annotations): required '@NonNull String' but this expression has type '@Nullable String'",
@@ -795,7 +802,7 @@
 				"	}\n" +
 				"}\n",
 				true, new NullProgressMonitor()).getWorkingCopy(new NullProgressMonitor());
-		CompilationUnit reconciled = unit.reconcile(AST.JLS8, true, null, new NullProgressMonitor());
+		CompilationUnit reconciled = unit.reconcile(getJLS8(), true, null, new NullProgressMonitor());
 		IProblem[] problems = reconciled.getProblems();
 		assertProblems(problems, new String[] {
 			"Pb(953) Null type mismatch (type annotations): required '@NonNull String' but this expression has type '@Nullable String'",
@@ -849,7 +856,7 @@
 				"	}\n" +
 				"}\n",
 				true, new NullProgressMonitor()).getWorkingCopy(new NullProgressMonitor());
-		CompilationUnit reconciled = unit.reconcile(AST.JLS8, true, null, new NullProgressMonitor());
+		CompilationUnit reconciled = unit.reconcile(getJLS8(), true, null, new NullProgressMonitor());
 		IProblem[] problems = reconciled.getProblems();
 		assertProblems(problems, new String[] {
 			"Pb(953) Null type mismatch (type annotations): required '@NonNull String' but this expression has type '@Nullable String'",
@@ -896,7 +903,7 @@
 				"	}\n" +
 				"}\n",
 				true, new NullProgressMonitor()).getWorkingCopy(new NullProgressMonitor());
-		CompilationUnit reconciled = unit.reconcile(AST.JLS8, true, null, new NullProgressMonitor());
+		CompilationUnit reconciled = unit.reconcile(getJLS8(), true, null, new NullProgressMonitor());
 		IProblem[] problems = reconciled.getProblems();
 		assertProblems(problems, new String[] {
 			"Pb(953) Null type mismatch (type annotations): required '@NonNull Exception' but this expression has type '@Nullable Exception'",
@@ -973,7 +980,7 @@
 				"	}\n" +
 				"}\n",
 				true, new NullProgressMonitor()).getWorkingCopy(new NullProgressMonitor());
-		CompilationUnit reconciled = cu.reconcile(AST.JLS8, true, null, new NullProgressMonitor());
+		CompilationUnit reconciled = cu.reconcile(getJLS8(), true, null, new NullProgressMonitor());
 		assertProblems(reconciled.getProblems(), new String[] {
 				"Pb(955) Null type safety (type annotations): The expression of type 'String' needs unchecked conversion to conform to '@NonNull String'",
 		}, new int[] { 8 });
@@ -981,7 +988,7 @@
 		// acquire library AST:
 		IType type = this.project.findType("libs.Lib1");
 		ICompilationUnit libWorkingCopy = type.getClassFile().getWorkingCopy(this.wcOwner, null);
-		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		ASTParser parser = ASTParser.newParser(getJLS8());
 		parser.setSource(libWorkingCopy);
 		parser.setResolveBindings(true);
 		parser.setStatementsRecovery(false);
@@ -1010,7 +1017,7 @@
 		assertTrue("file should exist", annotationFile.exists());
 
 		// check that the error is even worse now:
-		reconciled = cu.reconcile(AST.JLS8, true, null, new NullProgressMonitor());
+		reconciled = cu.reconcile(getJLS8(), true, null, new NullProgressMonitor());
 		assertProblems(reconciled.getProblems(), new String[] {
 				"Pb(953) Null type mismatch (type annotations): required '@NonNull String' but this expression has type '@Nullable String'",
 		}, new int[] { 8 });
@@ -1044,7 +1051,7 @@
 				"	}\n" +
 				"}\n",
 				true, new NullProgressMonitor()).getWorkingCopy(new NullProgressMonitor());
-		CompilationUnit reconciled = cu.reconcile(AST.JLS8, true, null, new NullProgressMonitor());
+		CompilationUnit reconciled = cu.reconcile(getJLS8(), true, null, new NullProgressMonitor());
 		assertProblems(reconciled.getProblems(), new String[] {
 				"Pb(953) Null type mismatch (type annotations): required 'Lib1<Lib1.X,@Nullable String>' but this expression has type 'Lib1<Lib1.@Nullable X,@NonNull String>'",
 		}, new int[] { 7 });
@@ -1052,7 +1059,7 @@
 		// acquire library AST:
 		IType type = this.project.findType("libs.Lib1");
 		ICompilationUnit libWorkingCopy = type.getClassFile().getWorkingCopy(this.wcOwner, null);
-		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		ASTParser parser = ASTParser.newParser(getJLS8());
 		parser.setSource(libWorkingCopy);
 		parser.setResolveBindings(true);
 		parser.setStatementsRecovery(false);
@@ -1082,7 +1089,7 @@
 		assertTrue("file should exist", annotationFile.exists());
 
 		// check that the error is resolved now:
-		reconciled = cu.reconcile(AST.JLS8, true, null, new NullProgressMonitor());
+		reconciled = cu.reconcile(getJLS8(), true, null, new NullProgressMonitor());
 		assertNoProblems(reconciled.getProblems());
 	}
 	
@@ -1114,7 +1121,7 @@
 				"	}\n" +
 				"}\n",
 				true, new NullProgressMonitor()).getWorkingCopy(new NullProgressMonitor());
-		CompilationUnit reconciled = cu.reconcile(AST.JLS8, true, null, new NullProgressMonitor());
+		CompilationUnit reconciled = cu.reconcile(getJLS8(), true, null, new NullProgressMonitor());
 		assertProblems(reconciled.getProblems(), new String[] {
 				"Pb(910) Null type mismatch: required '@NonNull String' but the provided value is null",
 		}, new int[] { 7 });
@@ -1122,7 +1129,7 @@
 		// acquire library AST:
 		IType type = this.project.findType("libs.Lib1");
 		ICompilationUnit libWorkingCopy = type.getClassFile().getWorkingCopy(this.wcOwner, null);
-		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		ASTParser parser = ASTParser.newParser(getJLS8());
 		parser.setSource(libWorkingCopy);
 		parser.setResolveBindings(true);
 		parser.setStatementsRecovery(false);
@@ -1152,7 +1159,7 @@
 		assertTrue("file should exist", annotationFile.exists());
 
 		// check that the error is resolved now:
-		reconciled = cu.reconcile(AST.JLS8, true, null, new NullProgressMonitor());
+		reconciled = cu.reconcile(getJLS8(), true, null, new NullProgressMonitor());
 		assertNoProblems(reconciled.getProblems());
 		
 		// invert annotation:
@@ -1165,7 +1172,7 @@
 		assertTrue("file should exist", annotationFile.exists());
 
 		// check that the error is back now:
-		reconciled = cu.reconcile(AST.JLS8, true, null, new NullProgressMonitor());
+		reconciled = cu.reconcile(getJLS8(), true, null, new NullProgressMonitor());
 		assertProblems(reconciled.getProblems(), new String[] {
 				"Pb(910) Null type mismatch: required '@NonNull String' but the provided value is null",
 		}, new int[] { 7 });
@@ -1201,7 +1208,7 @@
 		// acquire library AST:
 		IType type = this.project.findType("libs.Collectors");
 		ICompilationUnit libWorkingCopy = type.getClassFile().getWorkingCopy(this.wcOwner, null);
-		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		ASTParser parser = ASTParser.newParser(getJLS8());
 		parser.setSource(libWorkingCopy);
 		parser.setResolveBindings(true);
 		parser.setStatementsRecovery(false);
@@ -1256,7 +1263,7 @@
 		// acquire library AST:
 		IType type = this.project.findType("libs.Collectors");
 		ICompilationUnit libWorkingCopy = type.getClassFile().getWorkingCopy(this.wcOwner, null);
-		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		ASTParser parser = ASTParser.newParser(getJLS8());
 		parser.setSource(libWorkingCopy);
 		parser.setResolveBindings(true);
 		parser.setStatementsRecovery(false);
@@ -1308,7 +1315,7 @@
 		// acquire library AST:
 		IType type = this.project.findType("libs.Collections");
 		ICompilationUnit libWorkingCopy = type.getClassFile().getWorkingCopy(this.wcOwner, null);
-		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		ASTParser parser = ASTParser.newParser(getJLS8());
 		parser.setSource(libWorkingCopy);
 		parser.setResolveBindings(true);
 		parser.setStatementsRecovery(false);
@@ -1362,7 +1369,7 @@
 		// acquire library AST:
 		IType type = this.project.findType("libs.Collections");
 		ICompilationUnit libWorkingCopy = type.getClassFile().getWorkingCopy(this.wcOwner, null);
-		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		ASTParser parser = ASTParser.newParser(getJLS8());
 		parser.setSource(libWorkingCopy);
 		parser.setResolveBindings(true);
 		parser.setStatementsRecovery(false);
@@ -1417,7 +1424,7 @@
 		// acquire library AST:
 		IType type = this.project.findType("libs.Thread");
 		ICompilationUnit libWorkingCopy = type.getClassFile().getWorkingCopy(this.wcOwner, null);
-		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		ASTParser parser = ASTParser.newParser(getJLS8());
 		parser.setSource(libWorkingCopy);
 		parser.setResolveBindings(true);
 		parser.setStatementsRecovery(false);
@@ -1472,7 +1479,7 @@
 		// acquire library AST:
 		IType type = this.project.findType("libs.Thread");
 		ICompilationUnit libWorkingCopy = type.getClassFile().getWorkingCopy(this.wcOwner, null);
-		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		ASTParser parser = ASTParser.newParser(getJLS8());
 		parser.setSource(libWorkingCopy);
 		parser.setResolveBindings(true);
 		parser.setStatementsRecovery(false);
@@ -1527,7 +1534,7 @@
 		// acquire library AST:
 		IType type = this.project.findType("libs.Thread");
 		ICompilationUnit libWorkingCopy = type.getClassFile().getWorkingCopy(this.wcOwner, null);
-		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		ASTParser parser = ASTParser.newParser(getJLS8());
 		parser.setSource(libWorkingCopy);
 		parser.setResolveBindings(true);
 		parser.setStatementsRecovery(false);
@@ -1613,7 +1620,7 @@
 					"	}\n" + 
 					"}\n",
 					true, new NullProgressMonitor()).getWorkingCopy(new NullProgressMonitor());
-			CompilationUnit reconciled = unit.reconcile(AST.JLS8, true, null, new NullProgressMonitor());
+			CompilationUnit reconciled = unit.reconcile(getJLS8(), true, null, new NullProgressMonitor());
 			IProblem[] problems = reconciled.getProblems();
 			assertEquals("number of problems", 4, problems.length);
 
@@ -1628,7 +1635,7 @@
 					"	}\n" + 
 					"}\n",
 					true, new NullProgressMonitor()).getWorkingCopy(new NullProgressMonitor());
-			CompilationUnit reconciled2 = unit2.reconcile(AST.JLS8, true, null, new NullProgressMonitor());
+			CompilationUnit reconciled2 = unit2.reconcile(getJLS8(), true, null, new NullProgressMonitor());
 			assertNoProblems(reconciled2.getProblems());
 			
 			assertEquals("number of log entries", 0, listener.loggedStatus.size());
@@ -1664,7 +1671,7 @@
 			addProjectDependencyWithExternalAnnotations(this.project, "/Lib", "annots", null);
 			IPackageFragment fragment = this.root.getPackageFragment("test1");
 			ICompilationUnit unit = fragment.getCompilationUnit("Test1.java").getWorkingCopy(new NullProgressMonitor());
-			CompilationUnit reconciled = unit.reconcile(AST.JLS8, true, null, new NullProgressMonitor());
+			CompilationUnit reconciled = unit.reconcile(getJLS8(), true, null, new NullProgressMonitor());
 			IProblem[] problems = reconciled.getProblems();
 			assertNoProblems(problems);
 		} finally {
@@ -1707,7 +1714,7 @@
 			addProjectDependencyWithExternalAnnotations(this.project, "/Lib", "annots.zip", null);
 			IPackageFragment fragment = this.root.getPackageFragment("test1");
 			ICompilationUnit unit = fragment.getCompilationUnit("Reconcile2.java").getWorkingCopy(new NullProgressMonitor());
-			CompilationUnit reconciled = unit.reconcile(AST.JLS8, true, null, new NullProgressMonitor());
+			CompilationUnit reconciled = unit.reconcile(getJLS8(), true, null, new NullProgressMonitor());
 			IProblem[] problems = reconciled.getProblems();
 			assertNoProblems(problems);
 		} finally {
@@ -1741,7 +1748,7 @@
 			addProjectDependencyWithExternalAnnotations(this.project, "/Lib", "annots.zip", null);
 			IPackageFragment fragment = this.root.getPackageFragment("test1");
 			ICompilationUnit unit = fragment.getCompilationUnit("Reconcile3.java").getWorkingCopy(new NullProgressMonitor());
-			CompilationUnit reconciled = unit.reconcile(AST.JLS8, true, null, new NullProgressMonitor());
+			CompilationUnit reconciled = unit.reconcile(getJLS8(), true, null, new NullProgressMonitor());
 			assertProblems(reconciled.getProblems(), new String[] {
 					"Pb(964) Null constraint mismatch: The type '@Nullable B' is not a valid substitute for the type parameter '@NonNull R'",
 					"Pb(964) Null constraint mismatch: The type '@Nullable String' is not a valid substitute for the type parameter '@NonNull V'",
@@ -1777,7 +1784,7 @@
 				"	}\n" + 
 				"}\n",
 				true, new NullProgressMonitor()).getWorkingCopy(new NullProgressMonitor());
-		CompilationUnit reconciled = unit.reconcile(AST.JLS8, true, null, new NullProgressMonitor());
+		CompilationUnit reconciled = unit.reconcile(getJLS8(), true, null, new NullProgressMonitor());
 		assertProblems(reconciled.getProblems(), new String[] {
 				"Pb(953) Null type mismatch (type annotations): required '@NonNull String' but this expression has type '@Nullable String'",
 				"Pb(980) Unsafe interpretation of method return type as '@NonNull' based on the receiver type 'Lib1<@NonNull String>'. Type 'Lib1<T>' doesn't seem to be designed with null type annotations in mind",
@@ -1788,7 +1795,7 @@
 				" <T:Ljava/lang/Object;>\n" + 
 				" <T:Ljava/lang/Object;>\n" + 
 				"\n");
-		reconciled = unit.reconcile(AST.JLS8, true, null, new NullProgressMonitor());
+		reconciled = unit.reconcile(getJLS8(), true, null, new NullProgressMonitor());
 		assertProblems(reconciled.getProblems(), new String[] {
 				"Pb(953) Null type mismatch (type annotations): required '@NonNull String' but this expression has type '@Nullable String'",
 		}, new int[] { 8 });
@@ -1841,7 +1848,7 @@
 				"	}\n" + 
 				"}\n",
 				true, new NullProgressMonitor()).getWorkingCopy(new NullProgressMonitor());
-		CompilationUnit reconciled = unit.reconcile(AST.JLS8, true, null, new NullProgressMonitor());
+		CompilationUnit reconciled = unit.reconcile(getJLS8(), true, null, new NullProgressMonitor());
 		assertProblems(reconciled.getProblems(), new String[] {
 				"Pb(980) Unsafe interpretation of method return type as '@NonNull' based on the receiver type 'Lib1<@NonNull String>'. Type 'Lib1<T>' doesn't seem to be designed with null type annotations in mind",
 				"Pb(980) Unsafe interpretation of method return type as '@NonNull' based on the receiver type 'Lib2<@NonNull String>'. Type 'Lib2<T>' doesn't seem to be designed with null type annotations in mind",
@@ -1889,12 +1896,13 @@
 				"}\n" +
 				"",
 				true, new NullProgressMonitor()).getWorkingCopy(new NullProgressMonitor());
-		CompilationUnit reconciled = unit.reconcile(AST.JLS8, true, null, new NullProgressMonitor());
+		CompilationUnit reconciled = unit.reconcile(getJLS8(), true, null, new NullProgressMonitor());
 		IProblem[] problems = reconciled.getProblems();
 		assertProblems(problems, new String[] {
 				"Pb(149) Dead code"
 			}, new int[] { 7 });
 	}
+	@SuppressWarnings("deprecation")
 	public void testBug507256() throws Exception {
 		myCreateJavaProject("TestLibs");
 		addLibraryWithExternalAnnotations(this.project, "lib1.jar", "annots", new String[] {
@@ -1975,6 +1983,7 @@
 	 * Assert that external annotations configured for project A's library are considered also while compiling dependent project B. 
 	 * Reconcile.
 	 */
+	@SuppressWarnings("deprecation")
 	public void testBug509715reconcile() throws Exception {
 		try {
 			setupJavaProject("Bug509715ProjA");
@@ -1995,6 +2004,7 @@
 		}
 	}
 
+	@SuppressWarnings("deprecation")
 	public void testBug500024dir() throws CoreException, IOException {
 		try {
 			String projectName = "Bug500024";
@@ -2033,6 +2043,7 @@
 		}
 	}
 
+	@SuppressWarnings("deprecation")
 	public void testBug500024jar() throws CoreException, IOException {
 		try {
 			String projectName = "Bug500024";
@@ -2079,6 +2090,7 @@
 		}
 	}
 
+		@SuppressWarnings("deprecation")
 	public void testBug508955() throws CoreException, IOException {
 		myCreateJavaProject("TestLibs");
 		addLibraryWithExternalAnnotations(this.project, "lib1.jar", "annots",
@@ -2130,6 +2142,7 @@
 		assertNoProblems(problems);
 	}
 
+	@SuppressWarnings("deprecation")
 	public void testBug508955b() throws CoreException, IOException {
 		myCreateJavaProject("TestLibs");
 		addLibraryWithExternalAnnotations(this.project, "lib1.jar", "annots",
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ExternalAnnotations9Test.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ExternalAnnotations9Test.java
new file mode 100644
index 0000000..e3b20f1
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ExternalAnnotations9Test.java
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ * Copyright (c) 2017 Till Brychcy 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:
+ *     Till Brychcy - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.core.tests.model;
+
+import java.util.Hashtable;
+
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
+import org.eclipse.jdt.core.IJavaModelMarker;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.core.tests.util.AbstractCompilerTest;
+
+import junit.framework.Test;
+
+@SuppressWarnings({"rawtypes", "unchecked"})
+public class ExternalAnnotations9Test extends ExternalAnnotations18Test {
+
+	public ExternalAnnotations9Test(String name) {
+		super(name, "9", "JCL19_LIB");
+	}
+	
+	// Static initializer to specify tests subset using TESTS_* static variables
+	// All specified tests which do not belong to the class are skipped...
+	static {
+//		TESTS_NAMES = new String[] {"testBug522401"};
+	}
+
+	public static Test suite() {
+		return buildModelTestSuite(ExternalAnnotations9Test.class, BYTECODE_DECLARATION_ORDER);
+	}
+
+	public String getSourceWorkspacePath() {
+		// we read individual projects from within this folder:
+		return super.getSourceWorkspacePathBase()+"/ExternalAnnotations9";
+	}
+
+	protected boolean hasJRE19() {
+		return ((AbstractCompilerTest.getPossibleComplianceLevels() & AbstractCompilerTest.F_9) != 0);
+	}
+
+	/** Project with real JRE. */
+	public void testBug522401() throws Exception {
+		if (!hasJRE19()) {
+			System.out.println("Skipping ExternalAnnotations9Test.testBug522401(), needs JRE9");
+			return;
+		}
+		Hashtable options = JavaCore.getOptions();
+		try {
+			setupJavaProject("Test2");
+			this.project.getProject().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = this.project.getProject().findMarkers(IJavaModelMarker.JAVA_MODEL_PROBLEM_MARKER, false, IResource.DEPTH_INFINITE);
+			assertNoMarkers(markers);
+		} finally {
+			JavaCore.setOptions(options);
+		}
+	}
+}
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/HierarchyOnWorkingCopiesTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/HierarchyOnWorkingCopiesTests.java
index 9f64a81..2ad2ffc 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/HierarchyOnWorkingCopiesTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/HierarchyOnWorkingCopiesTests.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2014 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 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
@@ -16,9 +16,9 @@
 
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jdt.core.IClassFile;
 import org.eclipse.jdt.core.ICompilationUnit;
 import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IOrdinaryClassFile;
 import org.eclipse.jdt.core.IType;
 import org.eclipse.jdt.core.ITypeHierarchy;
 import org.eclipse.jdt.core.JavaCore;
@@ -189,7 +189,7 @@
 		primaryCu.getBuffer().setContents(newContents);
 		primaryCu.reconcile(ICompilationUnit.NO_AST, false, null, null);
 		
-		IClassFile cf = getClassFile("P", "myLib.jar", "my.pkg", "X.class");
+		IOrdinaryClassFile cf = getClassFile("P", "myLib.jar", "my.pkg", "X.class");
 		IType typ = cf.getType();
 	
 		ITypeHierarchy h = typ.newTypeHierarchy(null);	
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/Java9ElementTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/Java9ElementTests.java
new file mode 100644
index 0000000..bc15c6e
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/Java9ElementTests.java
@@ -0,0 +1,1281 @@
+/*******************************************************************************
+ * Copyright (c) 2017 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.jdt.core.tests.model;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.regex.Pattern;
+
+import org.eclipse.core.resources.IncrementalProjectBuilder;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jdt.core.IClasspathAttribute;
+import org.eclipse.jdt.core.IClasspathEntry;
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IModuleDescription;
+import org.eclipse.jdt.core.IPackageFragment;
+import org.eclipse.jdt.core.IPackageFragmentRoot;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.ITypeRoot;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.core.ToolFactory;
+import org.eclipse.jdt.core.compiler.CharOperation;
+import org.eclipse.jdt.core.provisional.JavaModelAccess;
+import org.eclipse.jdt.core.tests.util.AbstractCompilerTest;
+import org.eclipse.jdt.core.util.IAttributeNamesConstants;
+import org.eclipse.jdt.core.util.IClassFileAttribute;
+import org.eclipse.jdt.core.util.IClassFileReader;
+import org.eclipse.jdt.core.util.IModuleMainClassAttribute;
+import org.eclipse.jdt.core.util.IModulePackagesAttribute;
+import org.eclipse.jdt.internal.compiler.env.IModule.IPackageExport;
+import org.eclipse.jdt.internal.core.BinaryModule;
+
+import junit.framework.Test;
+
+import static org.eclipse.jdt.core.IJavaElement.*;
+
+public class Java9ElementTests extends AbstractJavaModelTests {
+
+	static {
+//		TESTS_NAMES = new String[] {"testBug510339_002"};
+	}
+
+	public Java9ElementTests(String name) {
+		super(name);
+	}
+	public static Test suite() {
+		return buildModelTestSuite(AbstractCompilerTest.F_9, Java9ElementTests.class);
+	}
+	public void test001() throws Exception {
+		try {
+			IJavaProject project = createJavaProject("Java9Elements", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+			project.open(null);
+				String fileContent =  "module my.mod{}\n";
+				createFile(	"/Java9Elements/src/module-info.java",	fileContent);
+
+				ICompilationUnit unit = getCompilationUnit("/Java9Elements/src/module-info.java");
+				IModuleDescription mod = unit.getModule();
+				assertNotNull("Module should not be null", mod);
+		}
+		finally {
+			deleteProject("Java9Elements");
+		}
+	}
+	public void test002() throws Exception {
+		try {
+			IJavaProject project = createJavaProject("Java9Elements", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+			project.open(null);
+				String fileContent =  "module my.mod{\n" +
+						 "	exports p.q.r;" +
+						 "	exports a.b.c;\n" +
+						 "	requires java.sql;\n" +
+						 "	requires transitive java.desktop;\n" +
+						 "}";
+				createFile(	"/Java9Elements/src/module-info.java",	fileContent);
+
+				ICompilationUnit unit = getCompilationUnit("/Java9Elements/src/module-info.java");
+				IModuleDescription mod = unit.getModule();
+				assertNotNull("Module should not be null", mod);
+		}
+		finally {
+			deleteProject("Java9Elements");
+		}
+	}
+	public void test003() throws Exception {
+		try {
+			IJavaProject project = createJavaProject("Java9Elements", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+			project.open(null);
+				String fileContent =  
+						"module my.mod{\n" +
+						 "	exports p.q.r;" +
+						 "	exports a.b.c;\n" +
+						 "}";
+				createFile(	"/Java9Elements/src/module-info.java",	fileContent);
+
+				createFolder("/Java9Elements/src/p/q/r");
+				createFolder("/Java9Elements/src/a/b/c");
+				createFile(	"/Java9Elements/src/p/q/package-info.java",	
+						"/** Javadoc for package p.q */"
+						+ "package p.q;");
+				createFile(	"/Java9Elements/src/a/b/c/package-info.java",	
+						"/** Javadoc for package a.b.c */"
+						+ "package a.b.c;");
+
+				ICompilationUnit unit = getCompilationUnit("/Java9Elements/src/module-info.java");
+				
+				int start = fileContent.indexOf("p.q");
+				IJavaElement[] elements = unit.codeSelect(start, 3);
+				assertEquals("Incorrect no of elements", 1, elements.length);
+				assertEquals("Incorrect element type", IJavaElement.PACKAGE_FRAGMENT, elements[0].getElementType());
+				assertElementEquals("Incorrect Java element", "p.q [in src [in Java9Elements]]", elements[0]);
+
+				start = fileContent.indexOf("a.b.c");
+				elements = unit.codeSelect(start, 5);
+				assertEquals("Incorrect no of elements", 1, elements.length);
+				assertEquals("Incorrect element type", IJavaElement.PACKAGE_FRAGMENT, elements[0].getElementType());
+				assertElementEquals("Incorrect Java element", "a.b.c [in src [in Java9Elements]]", elements[0]);
+		}
+		finally {
+			deleteProject("Java9Elements");
+		}
+	}
+	public void test004() throws Exception {
+		try {
+			IJavaProject project = createJavaProject("Java9Elements", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+			project.open(null);
+				String fileContent =  
+						"module my.mod{\n" +
+						 "	provides com.socket.spi.NetworkSocketProvider\n" +
+						 "      with org.fastsocket.FastNetworkSocketProvider;\n" +
+						 "}";
+				createFile(	"/Java9Elements/src/module-info.java",	fileContent);
+
+				ICompilationUnit unit = getCompilationUnit("/Java9Elements/src/module-info.java");
+				IModuleDescription mod = unit.getModule();
+				assertNotNull("Module should not be null", mod);
+		}
+		finally {
+			deleteProject("Java9Elements");
+		}
+	}
+	public void test005() throws Exception {
+		try {
+			IJavaProject project = createJavaProject("Java9Elements", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+			project.open(null);
+				String fileContent =  
+						"module my.mod{\n" +
+						 "	uses com.socket.spi.NetworkSocketProvider;\n" +
+						 "}";
+				createFile(	"/Java9Elements/src/module-info.java",	fileContent);
+
+				ICompilationUnit unit = getCompilationUnit("/Java9Elements/src/module-info.java");
+				IModuleDescription mod = unit.getModule();
+				assertNotNull("Module should not be null", mod);
+		}
+		finally {
+			deleteProject("Java9Elements");
+		}
+	}
+	public void test006() throws Exception {
+		try {
+			IJavaProject project = createJavaProject("Java9Elements", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+			project.open(null);
+			String fileContent =  
+					"module my.mod{\n" +
+					"	exports p.q.r;" +
+					"	exports a.b.c;\n" +
+					"	requires java.sql;\n" +
+					"	requires transitive java.desktop;\n" +
+					"}";
+			createFile(	"/Java9Elements/src/module-info.java",	fileContent);
+
+			project = createJavaProject("Java9Elements2", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+			project.open(null);
+			fileContent =  "module your.mod{\n" +
+					"	requires my.mod;\n" +
+					"	requires transitive java.desktop;\n" +
+					"}";
+			createFile(	"/Java9Elements2/src/module-info.java",	fileContent);
+
+			ICompilationUnit unit = getCompilationUnit("/Java9Elements2/src/module-info.java");
+			int start = fileContent.indexOf("y.mod");
+			IJavaElement[] elements = unit.codeSelect(start, 0);
+			assertEquals("Incorrect no of elements", 1, elements.length);
+			assertEquals("Incorrect element type", IJavaElement.JAVA_MODULE, elements[0].getElementType());
+			assertEquals("incorrect element name", "my.mod", elements[0].getElementName());
+		}
+		finally {
+			deleteProject("Java9Elements");
+			deleteProject("Java9Elements2");
+		}
+	}
+	public void test007() throws Exception {
+		try {
+			IJavaProject project = createJavaProject("Java9Elements", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+			project.open(null);
+			String fileContent =  
+					"module my.mod{\n" +
+					"	exports p.q.r;" +
+					"	exports a.b.c;\n" +
+					"}";
+			createFile(	"/Java9Elements/src/module-info.java",	fileContent);
+
+			project = createJavaProject("Java9Elements2", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+			project.open(null);
+			fileContent =  
+					"module your.mod{\n" +
+					"	requires my.mod;\n" +
+					"}";
+			createFile(	"/Java9Elements2/src/module-info.java",	fileContent);
+
+			ICompilationUnit unit = getCompilationUnit("/Java9Elements2/src/module-info.java");
+			int start = fileContent.lastIndexOf(".mod");
+			IJavaElement[] elements = unit.codeSelect(start, 0);
+			assertEquals("Incorrect no of elements", 1, elements.length);
+			assertEquals("Incorrect element type", IJavaElement.JAVA_MODULE, elements[0].getElementType());
+			assertEquals("incorrect element name", "my.mod", elements[0].getElementName());
+		}
+		finally {
+			deleteProject("Java9Elements");
+			deleteProject("Java9Elements2");
+		}	
+	}
+	public void test008() throws Exception {
+		try {
+			IJavaProject project = createJavaProject("Java9Elements", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+			project.open(null);
+			String fileContent =  "module my.mod {\n" +
+					"	exports p.q.r to your.mod;" +
+					"}";
+			createFolder("/Java9Elements/src/p/q/r");
+			createFile(	"/Java9Elements/src/module-info.java",	fileContent);
+			int start = fileContent.indexOf("your.mod");
+
+			project = createJavaProject("Java9Elements2", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+			project.open(null);
+			fileContent =  "module your.mod{\n" +
+					"	requires my.mod;\n" +
+					"}";
+			createFile(	"/Java9Elements2/src/module-info.java",	fileContent);
+
+			ICompilationUnit unit = getCompilationUnit("/Java9Elements/src/module-info.java");
+
+			IJavaElement[] elements = unit.codeSelect(start, 0);
+			assertEquals("Incorrect no of elements", 1, elements.length);
+			assertEquals("Incorrect element type", IJavaElement.JAVA_MODULE, elements[0].getElementType());
+			assertEquals("incorrect element name", "your.mod", elements[0].getElementName());
+		}
+		finally {
+			deleteProject("Java9Elements");
+			deleteProject("Java9Elements2");
+		}	
+	}
+	public void test009() throws Exception {
+		try {
+			IJavaProject project = createJavaProject("Java9Elements", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+			project.open(null);
+			String fileContent =  "module my.mod {\n" +
+					"	exports p.q.r;" +
+					"}";
+			createFolder("/Java9Elements/src/p/q/r");
+			createFile("/Java9Elements/src/package-info.java",
+					"package p.q.r;");
+			createFile("/Java9Elements/src/module-info.java",	fileContent);
+			int start = fileContent.indexOf("r;");
+
+			ICompilationUnit unit = getCompilationUnit("/Java9Elements/src/module-info.java");
+
+			IJavaElement[] elements = unit.codeSelect(start, 0);
+			assertEquals("Incorrect no of elements", 1, elements.length);
+			assertEquals("Incorrect element type", IJavaElement.PACKAGE_FRAGMENT, elements[0].getElementType());
+			assertEquals("incorrect element name", "p.q.r", elements[0].getElementName());
+		}
+		finally {
+			deleteProject("Java9Elements");
+		}	
+	}
+	public void test010() throws Exception {
+		try {
+			IJavaProject project = createJavaProject("Java9Elements", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "1.9");
+			project.open(null);
+			String fileContent =  "// A very simple module" +
+					 "module my.mod {\n" +
+					"	exports p.q.r;" +
+					"}";
+			createFolder("/Java9Elements/src/p/q/r");
+			createFile("/Java9Elements/src/module-info.java",	fileContent);
+			int start = fileContent.lastIndexOf("module");
+
+			ICompilationUnit unit = getCompilationUnit("/Java9Elements/src/module-info.java");
+
+			IJavaElement[] elements = unit.codeSelect(start, "module".length());
+			assertEquals("Incorrect no of elements", 0, elements.length);
+		}
+		finally {
+			deleteProject("Java9Elements");
+		}
+	}
+	public void test011() throws Exception {
+		try {
+			IJavaProject project = createJavaProject("Java9Elements", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+			project.open(null);
+				String fileContent =  "module my.mod{" +
+									"	provides a.b.C with a.b.CImpl, a.b.DImpl;\n" + 
+									"	opens a.b;" +
+									"}\n";
+				createFolder("/Java9Elements/src/a/b");
+				createFile("/Java9Elements/src/a/b/C.java",
+						"package a.b;\n" + 
+						"public interface C {}");
+				createFile("/Java9Elements/src/a/b/CImpl.java",
+						"package a.b;\n" + 
+						"public class CImpl implements C {}");
+				createFile(	"/Java9Elements/src/module-info.java",	fileContent);
+
+				ICompilationUnit unit = getCompilationUnit("/Java9Elements/src/module-info.java");
+				IModuleDescription mod = unit.getModule();
+				assertNotNull("Module should not be null", mod);
+		}
+		finally {
+			deleteProject("Java9Elements");
+		}
+	}
+	public void test012() throws Exception {
+		try {
+			IJavaProject project = createJavaProject("Java9Elements", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+			project.open(null);
+				String fileContent =  "module my.mod{" +
+									"	provides a.b.C with a.b.CImpl, a.b.DImpl;\n" + 
+									"}\n";
+				createFolder("/Java9Elements/src/a/b");
+				createFile("/Java9Elements/src/a/b/C.java",
+						"package a.b;\n" + 
+						"public interface C {}");
+				createFile("/Java9Elements/src/a/b/CImpl.java",
+						"package a.b;\n" + 
+						"public class CImpl implements C {}");
+				createFile(	"/Java9Elements/src/module-info.java",	fileContent);
+
+				ICompilationUnit unit = getCompilationUnit("/Java9Elements/src/module-info.java");
+				IModuleDescription mod = unit.getModule();
+				assertNotNull("Module should not be null", mod);
+		}
+		finally {
+			deleteProject("Java9Elements");
+		}
+	}
+	public void test013() throws Exception {
+		try {
+			IJavaProject project = createJavaProject("Java9Elements", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+			project.open(null);
+				String fileContent =  "module my.mod{" +
+									"	opens a.b to java.base, java.sql;" +
+									"}\n";
+				createFolder("/Java9Elements/src/a/b");
+				createFile(	"/Java9Elements/src/module-info.java",	fileContent);
+
+				ICompilationUnit unit = getCompilationUnit("/Java9Elements/src/module-info.java");
+				IModuleDescription mod = unit.getModule();
+				assertNotNull("Module should not be null", mod);
+		}
+		finally {
+			deleteProject("Java9Elements");
+		}
+	}
+	public void test014() throws Exception {
+		try {
+			IJavaProject project = createJavaProject("Java9Elements", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+			project.open(null);
+				String fileContent =  "module my.mod{" +
+									"	exports a.b to java.base, java.sql;" +
+									"}\n";
+				createFolder("/Java9Elements/src/a/b");
+				createFile(	"/Java9Elements/src/module-info.java",	fileContent);
+
+				ICompilationUnit unit = getCompilationUnit("/Java9Elements/src/module-info.java");
+				IModuleDescription mod = unit.getModule();
+				assertNotNull("Module should not be null", mod);
+		}
+		finally {
+			deleteProject("Java9Elements");
+		}
+	}
+	public void testBug510339_001_since_9() throws Exception {
+		try {
+			IJavaProject project = createJavaProject("Java9Elements", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+			addClasspathEntry(project, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+			project.open(null);
+			String fileContent =
+				"module first {\n" +
+				"    exports pack1 to second;\n" +
+				"}\n";
+			createFile("/Java9Elements/src/module-info.java",	fileContent);
+			int start = fileContent.lastIndexOf("pack1");
+			createFolder("/Java9Elements/src/pack1");
+			createFile("/Java9Elements/src/pack1/X11.java",
+					"package pack1;\n" +
+					"public class X11 {}\n");
+
+			ICompilationUnit unit = getCompilationUnit("/Java9Elements/src/module-info.java");
+
+			IJavaElement[] elements = unit.codeSelect(start, "pack1".length());
+			assertEquals("Incorrect no of elements", 1, elements.length);
+			IPackageFragment fragment = (IPackageFragment) elements[0];
+			assertEquals("pack1", fragment.getElementName());
+		}
+		finally {
+			deleteProject("Java9Elements");
+		}
+	}
+	public void testBug510339_002_since_9() throws Exception {
+		try {
+
+			IJavaProject project1 = createJavaProject("Java9Elements", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+			project1.open(null);
+			addClasspathEntry(project1, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+			String fileContent =
+				"module first {\n" +
+				"    exports pack1 to second;\n" +
+				"}\n";
+			createFile("/Java9Elements/src/module-info.java",	fileContent);
+			String selection = "second";
+			int start = fileContent.lastIndexOf(selection);
+			createFolder("/Java9Elements/src/pack1");
+			createFile("/Java9Elements/src/pack1/X11.java",
+					"package pack1;\n" +
+					"public class X11 {}\n");
+
+			IJavaProject project2 = createJavaProject("second", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+			project2.open(null);
+			addClasspathEntry(project2, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+			String secondFile =
+					"module second {\n" +
+					"    requires first;\n" +
+					"}\n";
+			createFile("/second/src/module-info.java",	secondFile);
+
+			addClasspathEntry(project1, JavaCore.newProjectEntry(project2.getPath()));
+			project1.close(); // sync
+			project2.close();
+			project2.open(null);
+			project1.open(null);
+
+			ICompilationUnit unit = getCompilationUnit("/Java9Elements/src/module-info.java");
+			IJavaElement[] elements = unit.codeSelect(start, selection.length());
+			assertEquals("Incorrect no of elements", 1, elements.length);
+			IModuleDescription ref = (IModuleDescription) elements[0];
+			assertEquals("second", ref.getElementName());
+		}
+		finally {
+			deleteProject("Java9Elements");
+			deleteProject("second");
+		}
+	}
+	public void testBug510339_003_since_9() throws Exception {
+		try {
+			IJavaProject project = createJavaProject("Java9Elements", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+			addClasspathEntry(project, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+			project.open(null);
+			String fileContent =
+				"module first {\n" +
+				"    opens pack1 to second;\n" +
+				"}\n";
+			createFile("/Java9Elements/src/module-info.java",	fileContent);
+			int start = fileContent.lastIndexOf("pack1");
+			createFolder("/Java9Elements/src/pack1");
+			createFile("/Java9Elements/src/pack1/X11.java",
+					"package pack1;\n" +
+					"public class X11 {}\n");
+
+			ICompilationUnit unit = getCompilationUnit("/Java9Elements/src/module-info.java");
+
+			IJavaElement[] elements = unit.codeSelect(start, "pack1".length());
+			assertEquals("Incorrect no of elements", 1, elements.length);
+			IPackageFragment fragment = (IPackageFragment) elements[0];
+			assertEquals("pack1", fragment.getElementName());
+		}
+		finally {
+			deleteProject("Java9Elements");
+		}
+	}
+	public void testBug510339_004_since_9() throws Exception {
+		try {
+
+			IJavaProject project1 = createJavaProject("Java9Elements", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+			project1.open(null);
+			addClasspathEntry(project1, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+			String fileContent =
+				"module first {\n" +
+				"    exports pack1 to second;\n" +
+				"}\n";
+			createFile("/Java9Elements/src/module-info.java",	fileContent);
+			createFolder("/Java9Elements/src/pack1");
+			createFile("/Java9Elements/src/pack1/X11.java",
+					"package pack1;\n" +
+					"public class X11 {}\n");
+
+			IJavaProject project2 = createJavaProject("second", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+			project2.open(null);
+			addClasspathEntry(project2, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+			String secondFile =
+					"module second {\n" +
+					"    requires first;\n" +
+					"}\n";
+			createFile("/second/src/module-info.java",	secondFile);
+
+			addClasspathEntry(project1, JavaCore.newProjectEntry(project2.getPath()));
+			project1.close(); // sync
+			project2.close();
+			project2.open(null);
+			project1.open(null);
+
+			ICompilationUnit unit = getCompilationUnit("/second/src/module-info.java");
+			String selection = "first";
+			int start = secondFile.lastIndexOf(selection);
+			IJavaElement[] elements = unit.codeSelect(start, selection.length());
+			assertEquals("Incorrect no of elements", 1, elements.length);
+			IModuleDescription ref = (IModuleDescription) elements[0];
+			assertEquals("first", ref.getElementName());
+		}
+		finally {
+			deleteProject("Java9Elements");
+			deleteProject("second");
+		}
+	}
+	public void testBug510339_005_since_9() throws Exception {
+		try {
+
+			IJavaProject project1 = createJavaProject("Java9Elements", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+			project1.open(null);
+			addClasspathEntry(project1, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+			String fileContent =
+				"module first {\n" +
+				"    requires second;\n" +
+				"    provides pack22.I22 with pack11.X11;\n" +
+				"}\n";
+			createFile("/Java9Elements/src/module-info.java", fileContent);
+			createFolder("/Java9Elements/src/pack11");
+			createFile("/Java9Elements/src/pack11/X11.java",
+					"package pack11;\n" +
+					"public class X11 implements pack22.I22 {}\n");
+
+			IJavaProject project2 = createJavaProject("second", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+			project2.open(null);
+			addClasspathEntry(project2, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+			String secondFile =
+					"module second {\n" +
+					"    exports pack22 to first;\n" +
+					"}\n";
+			createFile("/second/src/module-info.java",	secondFile);
+			createFolder("/second/src/pack22");
+			createFile("/second/src/pack22/I22.java",
+					"package pack22;\n" +
+					"public interface I22 {}\n");
+
+			addClasspathEntry(project1, JavaCore.newProjectEntry(project2.getPath()));
+			project1.close(); // sync
+			project2.close();
+			project2.open(null);
+			project1.open(null);
+
+			ICompilationUnit unit = getCompilationUnit("/Java9Elements/src/module-info.java");
+			String selection = "pack22";
+			int start = fileContent.lastIndexOf(selection);
+			IJavaElement[] elements = unit.codeSelect(start, selection.length());
+			assertEquals("Incorrect no of elements", 1, elements.length);
+			IPackageFragment fragment = (IPackageFragment) elements[0];
+			assertEquals("pack22", fragment.getElementName());
+		}
+		finally {
+			deleteProject("Java9Elements");
+			deleteProject("second");
+		}
+	}
+	public void testBug510339_006_since_9() throws Exception {
+		try {
+
+			IJavaProject project1 = createJavaProject("Java9Elements", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+			project1.open(null);
+			addClasspathEntry(project1, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+			String fileContent =
+				"module first {\n" +
+				"    requires second;\n" +
+				"    provides pack22.I22 with pack11.X11;\n" +
+				"}\n";
+			createFile("/Java9Elements/src/module-info.java", fileContent);
+			createFolder("/Java9Elements/src/pack11");
+			createFile("/Java9Elements/src/pack11/X11.java",
+					"package pack11;\n" +
+					"public class X11 implements pack22.I22 {}\n");
+
+			IJavaProject project2 = createJavaProject("second", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+			project2.open(null);
+			addClasspathEntry(project2, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+			String secondFile =
+					"module second {\n" +
+					"    exports pack22 to first;\n" +
+					"}\n";
+			createFile("/second/src/module-info.java",	secondFile);
+			createFolder("/second/src/pack22");
+			createFile("/second/src/pack22/I22.java",
+					"package pack22;\n" +
+					"public interface I22 {}\n");
+
+			addClasspathEntry(project1, JavaCore.newProjectEntry(project2.getPath()));
+			project1.close(); // sync
+			project2.close();
+			project2.open(null);
+			project1.open(null);
+
+			ICompilationUnit unit = getCompilationUnit("/Java9Elements/src/module-info.java");
+			String selection = "pack11";
+			int start = fileContent.lastIndexOf(selection);
+			IJavaElement[] elements = unit.codeSelect(start, selection.length());
+			assertEquals("Incorrect no of elements", 1, elements.length);
+			IPackageFragment fragment = (IPackageFragment) elements[0];
+			assertEquals("pack11", fragment.getElementName());
+		}
+		finally {
+			deleteProject("Java9Elements");
+			deleteProject("second");
+		}
+	}
+	public void testBug510339_007_since_9() throws Exception {
+		try {
+
+			IJavaProject project1 = createJavaProject("Java9Elements", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+			project1.open(null);
+			addClasspathEntry(project1, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+			String fileContent =
+				"module first {\n" +
+				"    requires second;\n" +
+				"    uses pack11.X11;\n" +
+				"}\n";
+			createFile("/Java9Elements/src/module-info.java", fileContent);
+			createFolder("/Java9Elements/src/pack11");
+			createFile("/Java9Elements/src/pack11/X11.java",
+					"package pack11;\n" +
+					"public class X11 implements pack22.I22 {}\n");
+
+			project1.close(); // sync
+			project1.open(null);
+
+			ICompilationUnit unit = getCompilationUnit("/Java9Elements/src/module-info.java");
+			String selection = "pack11";
+			int start = fileContent.lastIndexOf(selection);
+			IJavaElement[] elements = unit.codeSelect(start, selection.length());
+			assertEquals("Incorrect no of elements", 1, elements.length);
+			IPackageFragment fragment = (IPackageFragment) elements[0];
+			assertEquals("pack11", fragment.getElementName());
+		}
+		finally {
+			deleteProject("Java9Elements");
+		}
+	}
+	public void testBug510339_008_since_9() throws Exception {
+		try {
+
+			IJavaProject project1 = createJavaProject("Java9Elements", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+			project1.open(null);
+			addClasspathEntry(project1, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+			String fileContent =
+				"module first {\n" +
+				"    requires second;\n" +
+				"    provides pack22.I22 with pack11.X11;\n" +
+				"}\n";
+			createFile("/Java9Elements/src/module-info.java", fileContent);
+			createFolder("/Java9Elements/src/pack11");
+			createFile("/Java9Elements/src/pack11/X11.java",
+					"package pack11;\n" +
+					"public class X11 implements pack22.I22 {}\n");
+
+			IJavaProject project2 = createJavaProject("second", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+			project2.open(null);
+			addClasspathEntry(project2, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+			String secondFile =
+					"module second {\n" +
+					"    exports pack22 to first;\n" +
+					"}\n";
+			createFile("/second/src/module-info.java",	secondFile);
+			createFolder("/second/src/pack22");
+			createFile("/second/src/pack22/I22.java",
+					"package pack22;\n" +
+					"public interface I22 {}\n");
+
+			addClasspathEntry(project1, JavaCore.newProjectEntry(project2.getPath()));
+			project1.close(); // sync
+			project2.close();
+			project2.open(null);
+			project1.open(null);
+
+			ICompilationUnit unit = getCompilationUnit("/Java9Elements/src/module-info.java");
+			String selection = "X11";
+			int start = fileContent.lastIndexOf(selection);
+			IJavaElement[] elements = unit.codeSelect(start, selection.length());
+			assertEquals("Incorrect no of elements", 1, elements.length);
+			IType type = (IType) elements[0];
+			assertEquals("X11", type.getElementName());
+		}
+		finally {
+			deleteProject("Java9Elements");
+			deleteProject("second");
+		}
+	}
+	public void testBug510339_009_since_9() throws Exception {
+		try {
+
+			IJavaProject project1 = createJavaProject("Java9Elements", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+			project1.open(null);
+			addClasspathEntry(project1, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+			String fileContent =
+				"module first {\n" +
+				"    requires second;\n" +
+				"    uses pack11.X11;\n" +
+				"}\n";
+			createFile("/Java9Elements/src/module-info.java", fileContent);
+			createFolder("/Java9Elements/src/pack11");
+			createFile("/Java9Elements/src/pack11/X11.java",
+					"package pack11;\n" +
+					"public class X11 implements pack22.I22 {}\n");
+
+			project1.close(); // sync
+			project1.open(null);
+
+			ICompilationUnit unit = getCompilationUnit("/Java9Elements/src/module-info.java");
+			String selection = "X11";
+			int start = fileContent.lastIndexOf(selection);
+			IJavaElement[] elements = unit.codeSelect(start, selection.length());
+			assertEquals("Incorrect no of elements", 1, elements.length);
+			IType type = (IType) elements[0];
+			assertEquals("X11", type.getElementName());
+		}
+		finally {
+			deleteProject("Java9Elements");
+		}
+	}
+	public void testBug510339_010_since_9() throws Exception {
+		try {
+			IJavaProject project1 = createJavaProject("Java9Elements", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+			project1.open(null);
+			addClasspathEntry(project1, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+			String fileContent =
+				"module first {\n" +
+				"    requires second;\n" +
+				"    uses pack11.X11;\n" +
+				"}\n";
+			createFile("/Java9Elements/src/module-info.java", fileContent);
+			createFolder("/Java9Elements/src/pack11");
+			createFile("/Java9Elements/src/pack11/X11.java",
+					"package pack11;\n" +
+					"public class X11 implements pack22.I22 {}\n");
+
+			project1.close(); // sync
+			project1.open(null);
+
+			ICompilationUnit unit = getCompilationUnit("/Java9Elements/src/module-info.java");
+			String selection = "X11";
+			int start = fileContent.lastIndexOf(selection);
+			IJavaElement[] elements = unit.codeSelect(start, selection.length());
+			assertEquals("Incorrect no of elements", 1, elements.length);
+			IType type = (IType) elements[0];
+			assertEquals("X11", type.getElementName());
+		}
+		finally {
+			deleteProject("Java9Elements");
+		}
+	}
+	public void testSystemLibAsJMod() throws Exception {
+		try {
+			IJavaProject project1 = createJava9Project("Java9Elements", new String[] {"src"});
+			project1.open(null);
+			IClasspathEntry[] rawClasspath = project1.getRawClasspath();
+			for (int i = 0; i < rawClasspath.length; i++) {
+				IPath path = rawClasspath[i].getPath();
+				if (path.lastSegment().equals("jrt-fs.jar")) {
+					path = path.removeLastSegments(2).append("jmods").append("java.base.jmod");
+					IClasspathEntry newEntry = JavaCore.newLibraryEntry(path, rawClasspath[i].getSourceAttachmentPath(), new Path("java.base"));
+					rawClasspath[i] = newEntry;
+				}
+			}
+			project1.setRawClasspath(rawClasspath, null);
+			String fileContent =
+					"module first {\n" +
+					"    requires java.base;\n" +
+					"    uses pack11.X11;\n" +
+					"}\n";
+				createFile("/Java9Elements/src/module-info.java", fileContent);
+
+			ICompilationUnit unit = getCompilationUnit("/Java9Elements/src/module-info.java");
+			String selection = "java.base";
+			int start = fileContent.lastIndexOf(selection);
+			IJavaElement[] elements = unit.codeSelect(start, selection.length());
+			assertEquals("Incorrect no of elements", 1, elements.length);
+			assertTrue("Invalid selection result", (elements[0] instanceof BinaryModule));
+			BinaryModule mod = (BinaryModule) elements[0];
+			IPackageExport[] exportedPackages = mod.getExportedPackages();
+			assertNotNull("missing package exports", exportedPackages);
+			assertTrue("missing package exports", exportedPackages.length > 0);
+		}
+		finally {
+			deleteProject("Java9Elements");
+		}
+	}
+	public void test515342a() throws Exception {
+		try {
+			IJavaProject project = createJavaProject("Java9Elements", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+			project.open(null);
+				String fileContent =  "module my.mod{}\n";
+				createFile(	"/Java9Elements/src/module-info.java",	fileContent);
+
+				ICompilationUnit unit = getCompilationUnit("/Java9Elements/src/module-info.java");
+				IModuleDescription mod = unit.getModule();
+				String id = mod.getHandleIdentifier();
+				assertEquals("incorrect id", "=Java9Elements/src<{module-info.java`my.mod", id);
+				IJavaElement element = JavaCore.create(id);
+				assertEquals("incorrect element type", IJavaElement.JAVA_MODULE, element.getElementType());
+				assertEquals("incorrect module name", "my.mod", element.getElementName());
+		}
+		finally {
+			deleteProject("Java9Elements");
+		}
+	}
+	public void test515342b() throws Exception {
+		try {
+			IJavaProject project1 = createJava9Project("Java9Elements", new String[] {"src"});
+			project1.open(null);
+			IClasspathEntry[] rawClasspath = project1.getRawClasspath();
+			for (int i = 0; i < rawClasspath.length; i++) {
+				IPath path = rawClasspath[i].getPath();
+				if (path.lastSegment().equals("jrt-fs.jar")) {
+					path = path.removeLastSegments(2).append("jmods").append("java.base.jmod");
+					IClasspathEntry newEntry = JavaCore.newLibraryEntry(path, rawClasspath[i].getSourceAttachmentPath(), new Path("java.base"));
+					rawClasspath[i] = newEntry;
+				}
+			}
+			project1.setRawClasspath(rawClasspath, null);
+			String fileContent =
+					"module first {\n" +
+							"    requires java.base;\n" +
+							"    uses pack11.X11;\n" +
+							"}\n";
+			createFile("/Java9Elements/src/module-info.java", fileContent);
+
+			ICompilationUnit unit = getCompilationUnit("/Java9Elements/src/module-info.java");
+			String selection = "java.base";
+			int start = fileContent.lastIndexOf(selection);
+			IJavaElement[] elements = unit.codeSelect(start, selection.length());
+			assertEquals("Incorrect no of elements", 1, elements.length);
+			assertTrue("Invalid selection result", (elements[0] instanceof BinaryModule));
+			IModuleDescription mod = (IModuleDescription) elements[0];
+			String id = mod.getHandleIdentifier();
+			assertTrue("incorrect id", id.matches("=Java9Elements/.*"+Pattern.quote("\\/jmods\\/java.base.jmod<'`java.base")));
+			IJavaElement element = JavaCore.create(id);
+			assertEquals("incorrect element type", IJavaElement.JAVA_MODULE, element.getElementType());
+			assertEquals("incorrect module name", "java.base", element.getElementName());
+		}
+		finally {
+			deleteProject("Java9Elements");
+		}
+	}
+	public void test_binary_module_bug520651() throws Exception {
+		try {
+			IJavaProject project = createJavaProject("Java9Elements", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+			project.open(null);
+			ITypeRoot classFile = null;
+			IModuleDescription moduleDescription = null;
+			for (IPackageFragmentRoot root : project.getAllPackageFragmentRoots()) {
+				moduleDescription = root.getModuleDescription();
+				if (moduleDescription != null && moduleDescription.getElementName().equals("java.base")) {
+					try {
+						classFile = root.getPackageFragment("").getOrdinaryClassFile("module-info.class");
+						fail("getOrdinaryClassFile() should not answer module-info.class");
+					} catch (IllegalArgumentException iae) {
+						// expected
+					}
+					classFile = root.getPackageFragment("").getModularClassFile();
+					break;
+				}
+			}
+			assertNotNull("classfile should not be null", classFile);
+			assertEquals("same module", moduleDescription, classFile.getModule());
+			IJavaElement[] children = classFile.getChildren();
+			assertEquals("number of children", 1, children.length);
+			IJavaElement child = children[0];
+			assertTrue("type of child", child instanceof BinaryModule);
+			assertEquals("module name", "java.base", child.getElementName());
+			BinaryModule mod = (BinaryModule) child;
+			assertEquals("# mod children", 0, mod.getChildren().length);
+		}
+		finally {
+			deleteProject("Java9Elements");
+		}
+	}
+	public void test_module_in_classfolder_bug520651() throws Exception {
+		try {
+			IJavaProject libPrj= createJavaProject("Java9Lib", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+			createFile("Java9Lib/src/module-info.java", "module java9.lib {}\n");
+			libPrj.getProject().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			
+			IJavaProject project = createJavaProject("Java9Elements",
+					new String[] {"src"},
+					new String[] {"JCL19_LIB", "/Java9Lib/bin"},
+					"bin", "9");
+			project.open(null);
+			IModuleDescription moduleDescription = null;
+			for (IPackageFragmentRoot root : project.getAllPackageFragmentRoots()) {
+				if (root.getPath().toString().equals("/Java9Lib/bin")) {
+					moduleDescription = root.getModuleDescription();
+					assertEquals("module name", "java9.lib", moduleDescription.getElementName());
+					return;
+				}
+			}
+			fail("class folder not found");
+		}
+		finally {
+			deleteProject("Java9Lib");
+			deleteProject("Java9Elements");
+		}
+	}
+	public void testFindModule1() throws CoreException, IOException {
+		try {
+			createJavaProject("mod.zero", new String[]{"src"}, null, "bin", JavaCore.VERSION_9);
+			createFolder("/mod.zero/src/test0");
+			createFile("/mod.zero/src/test0/Test.java",
+				"package test0;\n" +
+				"\n" +
+				"public class Test {}");
+			createFile("/mod.zero/src/module-info.java",
+				"module mod.zero {\n" +
+				"	exports test0;\n" +
+				"}\n");
+
+			IJavaProject javaProject = createJavaProject("Test", new String[]{"src"}, null, new String[] {"/mod.zero"}, "bin", JavaCore.VERSION_9);
+			createFolder("/Test/src/test1");
+			createFile("/Test/src/test1/Test.java",
+				"package test1;\n" +
+				"\n" +
+				"public class Test {}");
+			createFile("/Test/src/module-info.java",
+				"module test {\n" +
+				"	requires mod.one;\n" +
+				"	exports test1;\n" +
+				"}\n");
+
+			String modOneSrc = 
+				"\n" +
+				"/** The no. one module. */\n" +
+				"module mod.one {\n" +
+				"  exports m.o.p;\n" +
+				"}\n";
+			String[] pathAndContents = new String[] {
+				"module-info.java",
+				modOneSrc,
+				"m/o/p/C.java",
+				"package m.o.p;\n" +
+				"public class C {\n" +
+				"}"
+			};
+			addLibrary(javaProject, "mod.one.jar", "mod.onesrc.zip", pathAndContents, JavaCore.VERSION_9);
+
+			// search self module:
+			IModuleDescription modTest = javaProject.findModule("test", null);
+			assertNotNull("module", modTest);
+			assertEquals("module name", "test", modTest.getElementName());
+			IJavaElement root = parentChain(modTest, new int[] { COMPILATION_UNIT, PACKAGE_FRAGMENT, PACKAGE_FRAGMENT_ROOT });
+			String rootPath = ((IPackageFragmentRoot) root).getPath().toString();
+			assertEquals("package fragment root path", "/Test/src", rootPath);
+
+			// search source module in project dependency:
+			IModuleDescription modZero = javaProject.findModule("mod.zero", null);
+			assertNotNull("module", modZero);
+			assertEquals("module name", "mod.zero", modZero.getElementName());
+			root = parentChain(modZero, new int[] { COMPILATION_UNIT, PACKAGE_FRAGMENT, PACKAGE_FRAGMENT_ROOT });
+			rootPath = ((IPackageFragmentRoot) root).getPath().toString();
+			assertEquals("package fragment root path", "/mod.zero/src", rootPath);
+
+			// search binary module in jar dependency:
+			IModuleDescription modOne = javaProject.findModule("mod.one", null);
+			assertNotNull("module", modOne);
+			assertEquals("module name", "mod.one", modOne.getElementName());
+			root = parentChain(modOne, new int[] { CLASS_FILE, PACKAGE_FRAGMENT, PACKAGE_FRAGMENT_ROOT });
+			rootPath = ((IPackageFragmentRoot) root).getPath().toString();
+			assertEquals("package fragment root path", "/Test/mod.one.jar", rootPath);
+
+			IModuleDescription notSuchModule = javaProject.findModule("does.not.exist", null);
+			assertNull("inexistent module", notSuchModule);
+		} finally {
+			deleteProject("Test");
+			deleteProject("mod.zero");
+		}
+	}
+
+	private IJavaElement parentChain(IJavaElement element, int[] elementTypes) {
+		IJavaElement current = element;
+		for (int i = 0; i < elementTypes.length; i++) {
+			current = current.getParent();
+			assertEquals("Parent type at level "+i, elementTypes[i], current.getElementType());
+		}
+		return current;
+	}
+	/*
+	 * Test finding module elements with similarly named types in the environment
+	 */
+	public void testBug521287a() throws CoreException, IOException {
+		try {
+			createJavaProject("mod.zero", new String[]{"src"}, null, "bin", JavaCore.VERSION_9);
+			createFolder("/mod.zero/src/test0");
+			createFile("/mod.zero/src/test0/ABCD.java",
+				"package test0;\n" +
+				"\n" +
+				"public class ABCD {}");
+			createFile("/mod.zero/src/module-info.java",
+				"module ABCD {\n" +
+				"	exports test0 to PQRS;\n" +
+				"}\n");
+
+			createJavaProject("Test", new String[]{"src"}, null, new String[] {"/mod.zero"}, "bin", JavaCore.VERSION_9);
+			createFolder("/Test/src/test1");
+			createFile("/Test/src/test1/Test.java",
+				"package test1;\n" +
+				"\n" +
+				"public class Test {}");
+			String content = "module PQRS {\n" +
+								"	exports test1;\n" +
+								"	requires ABCD;\n" +
+								"}\n";
+			createFile("/Test/src/module-info.java",
+				content);
+
+			ICompilationUnit unit = getCompilationUnit("/Test/src/module-info.java");
+			
+			int start = content.indexOf("ABCD");
+			IJavaElement[] elements = unit.codeSelect(start, 4);
+			assertEquals("Incorrect no of elements", 1, elements.length);
+			assertEquals("Incorrect element type", IJavaElement.JAVA_MODULE, elements[0].getElementType());
+			assertElementEquals("Incorrect Java element", 
+					"ABCD [in module-info.java [in <default> [in src [in mod.zero]]]]", elements[0]);
+	
+		} finally {
+			deleteProject("Test");
+			deleteProject("mod.zero");
+		}
+	}
+	/*
+	 * Test finding module elements with similarly named types in the environment
+	 */
+	public void testBug521287b() throws CoreException, IOException {
+		try {
+			createJavaProject("mod.zero", new String[]{"src"}, null, "bin", JavaCore.VERSION_9);
+			createFolder("/mod.zero/src/test0");
+			createFile("/mod.zero/src/test0/PQRS.java",
+							"package test0;\n" +
+							"\n" +
+							"public class PQRS {}");
+			String content = 	"module ABCD {\n" +
+								"	exports test0 to PQRS;\n" +
+								"}\n";
+			createFile("/mod.zero/src/module-info.java",
+				content);
+
+			createJavaProject("Test", new String[]{"src"}, null, new String[] {"/mod.zero"}, "bin", JavaCore.VERSION_9);
+			createFolder("/Test/src/test1");
+			createFile("/Test/src/test1/Test.java",
+				"package test1;\n" +
+				"\n" +
+				"public class Test {}");
+			createFile("/Test/src/module-info.java",
+							"module PQRS {\n" +
+							"	exports test1;\n" +
+							"	requires ABCD;\n" +
+							"}\n");
+
+			ICompilationUnit unit = getCompilationUnit("/mod.zero/src/module-info.java");
+			
+			int start = content.indexOf("PQRS");
+			IJavaElement[] elements = unit.codeSelect(start, 4);
+			assertEquals("Incorrect no of elements", 1, elements.length);
+			assertEquals("Incorrect element type", IJavaElement.JAVA_MODULE, elements[0].getElementType());
+			assertElementEquals("Incorrect Java element", 
+					"PQRS [in module-info.java [in <default> [in src [in Test]]]]", elements[0]);
+	
+		} finally {
+			deleteProject("Test");
+			deleteProject("mod.zero");
+		}
+	}
+
+	// using classpath attribute
+	public void testModuleAttributes1() throws Exception {
+		try {
+			IJavaProject javaProject = createJava9Project("mod.zero");
+			IClasspathAttribute[] cpMainAttribute = {JavaCore.newClasspathAttribute(IClasspathAttribute.MODULE_MAIN_CLASS, "test0.PQRS")};
+			IClasspathEntry src2 = JavaCore.newSourceEntry(new Path("/mod.zero/src2"), null, null, new Path("/mod.zero/bin"), cpMainAttribute);
+			addClasspathEntry(javaProject, src2);
+			createFolder("/mod.zero/src/test0");
+			createFile("/mod.zero/src/test0/PQRS.java",
+							"package test0;\n" +
+							"\n" +
+							"public class PQRS {}");
+			createFolder("/mod.zero/src/test1");
+			String content = 	"module mod.zero {\n" +
+								"	exports test0;\n" +
+								"}\n";
+			createFolder("/mod.zero/src2");
+			createFile("/mod.zero/src2/module-info.java", content);
+
+			javaProject.getProject().build(IncrementalProjectBuilder.FULL_BUILD, null);
+
+			String classFile = javaProject.getProject().getLocation().toString()+"/bin/module-info.class";
+			IClassFileReader cfr = ToolFactory.createDefaultClassFileReader(classFile, IClassFileReader.ALL);
+			assertNotNull("Error reading class bytes", cfr);
+			IClassFileAttribute attr = Arrays.stream(cfr.getAttributes())
+					.filter(e -> new String(e.getAttributeName()).equals("ModuleMainClass"))
+					.findFirst()
+					.orElse(null);
+			assertNotNull("ModuleMainClass attribute not found", attr);
+			IModuleMainClassAttribute mainAttribute = (IModuleMainClassAttribute) attr;
+			assertEquals("main attribute value", "test0/PQRS", String.valueOf(mainAttribute.getMainClassName()));
+
+		} finally {
+			deleteProject("mod.zero");
+		}
+	}
+
+	// using dedicated API
+	public void testModuleAttributes2() throws Exception {
+		try {
+			IJavaProject javaProject = createJava9Project("mod.zero");
+
+			createFolder("/mod.zero/src/test0");
+			createFile("/mod.zero/src/test0/SPQR.java",
+							"package test0;\n" +
+							"\n" +
+							"public class SPQR {}");
+
+			createFolder("/mod.zero/src/test1");
+			createFile("/mod.zero/src/test1/Service.java",
+							"package test1;\n" +
+							"\n" +
+							"public interface Service {}");
+
+			createFolder("/mod.zero/src/test2");
+			createFile("/mod.zero/src/test2/Impl.java",
+							"package test2;\n" +
+							"\n" +
+							"public class Impl implements test1.Service {}");
+
+			createFolder("/mod.zero/src/testDont");
+			createFile("/mod.zero/src/testDont/Show.java",
+							"package testDont;\n" +
+							"\n" +
+							"public class Show {}");
+
+			String content = 	"module mod.zero {\n" +
+								"	exports test0;\n" +
+								"	opens test1;\n" +
+								"	provides test1.Service with test2.Impl;\n" +
+								"}\n";
+			createFile("/mod.zero/src/module-info.java", content);
+
+			javaProject.getProject().build(IncrementalProjectBuilder.FULL_BUILD, null);
+
+			ICompilationUnit unit = getCompilationUnit("/mod.zero/src/module-info.java");
+			IModuleDescription module = unit.getModule();
+
+			Map<String,String> attributes = new HashMap<>();
+			attributes.put(String.valueOf(IAttributeNamesConstants.MODULE_MAIN_CLASS), "test0.SPQR");
+			attributes.put(String.valueOf(IAttributeNamesConstants.MODULE_PACKAGES), "");
+
+			byte[] bytes = JavaCore.compileWithAttributes(module, attributes);
+
+			InputStream byteStream = new ByteArrayInputStream(bytes);
+			IClassFileReader cfr = ToolFactory.createDefaultClassFileReader(byteStream, IClassFileReader.ALL);
+			assertNotNull("Error reading class bytes", cfr);
+			IClassFileAttribute attr = Arrays.stream(cfr.getAttributes())
+					.filter(e -> new String(e.getAttributeName()).equals("ModuleMainClass"))
+					.findFirst()
+					.orElse(null);
+			assertNotNull("Module attribute not found", attr);
+
+			assertNotNull("main attribute", attr);
+			IModuleMainClassAttribute mainAttribute = (IModuleMainClassAttribute) attr;
+			assertEquals("main attribute value", "test0/SPQR", String.valueOf(mainAttribute.getMainClassName()));
+
+			attr = Arrays.stream(cfr.getAttributes())
+					.filter(e -> new String(e.getAttributeName()).equals("ModulePackages"))
+					.findFirst()
+					.orElse(null);
+			assertNotNull("ModulePackages attribute not found", attr);
+			IModulePackagesAttribute packagesAttribute = (IModulePackagesAttribute) attr;
+			String[] packageNames = CharOperation.toStrings(packagesAttribute.getPackageNames());
+			assertEquals("main attribute value", "test0,test1,test2", String.join(",", packageNames));
+
+			// now include testDont in ModulePackages:
+			attributes.put(String.valueOf(IAttributeNamesConstants.MODULE_PACKAGES), "testDont");
+			bytes = JavaCore.compileWithAttributes(module, attributes);
+
+			byteStream = new ByteArrayInputStream(bytes);
+			cfr = ToolFactory.createDefaultClassFileReader(byteStream, IClassFileReader.ALL);
+			assertNotNull("Error reading class bytes", cfr);
+			attr = Arrays.stream(cfr.getAttributes())
+					.filter(e -> new String(e.getAttributeName()).equals("ModulePackages"))
+					.findFirst()
+					.orElse(null);
+			assertNotNull("ModulePackages attribute not found", attr);
+			packagesAttribute = (IModulePackagesAttribute) attr;
+			packageNames = CharOperation.toStrings(packagesAttribute.getPackageNames());
+			assertEquals("main attribute value", "testDont,test0,test1,test2", String.join(",", packageNames));
+
+		} finally {
+			deleteProject("mod.zero");
+		}
+	}
+	public void testAutoModule1() throws Exception {
+		try {
+			IJavaProject project1 = createJavaProject("my_mod", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+			project1.open(null);
+			createFolder("/my_mod/src/p/q");
+			createFile("/my_mod/src/p/q/R.java", 
+					"package p.q;\n" +
+					"public class R {\n" +
+					"}");
+
+			IJavaProject project2 = createJava9Project("your.mod", new String[] {"src"});
+			IClasspathAttribute[] attrs = { JavaCore.newClasspathAttribute(IClasspathAttribute.MODULE, "true") };
+			IClasspathEntry dep = JavaCore.newProjectEntry(project1.getPath(), null, false, attrs, false);
+			addClasspathEntry(project2, dep);
+			project2.open(null);
+			createFile("/your.mod/src/module-info.java",
+					"module your.mod{\n" +
+					"	requires my.mod;\n" +
+					"}");
+
+			IModuleDescription mod1 = JavaModelAccess.getAutomaticModuleDescription(project1);
+			assertNotNull("auto module not found via project", mod1);
+
+			IPackageFragmentRoot fragmentRoot = project2.getPackageFragmentRoot(project1.getResource());
+			IModuleDescription mod2 = JavaModelAccess.getAutomaticModuleDescription(fragmentRoot);
+			assertNotNull("auto module not found via package fragment root", mod2);
+
+			assertEquals("names of module descriptions should be equal", mod1.getElementName(), mod2.getElementName());
+
+			for (IModuleDescription m : new IModuleDescription[] {mod1, mod2}) {
+				assertFalse(m.exists()); // exists would imply: included in getParent().getChildren()
+				assertTrue(m.getParent().exists());
+				assertNull(m.getClassFile());
+				assertNull(m.getCompilationUnit());
+				assertNull(m.getDeclaringType());
+				assertNull(m.getTypeRoot());
+				assertEquals(0, m.getChildren().length);
+				assertEquals(IJavaElement.JAVA_MODULE, m.getElementType());
+				assertEquals(0, m.getFlags());
+				assertEquals(m.getParent(), m.getOpenable());
+// these throw exceptions, which is OK after exists() answers false:
+//				assertNull(m.getCorrespondingResource());
+//				assertNull(m.getJavadocRange());
+//				assertNull(m.getSourceRange());
+			}
+			assertEquals(project1, mod1.getParent());
+			assertEquals(fragmentRoot, mod2.getParent());
+		}
+		finally {
+			deleteProject("Java9Elements");
+			deleteProject("Java9Elements2");
+		}	
+	}
+}
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaConventionTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaConventionTests.java
index 713b111..f8e2834 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaConventionTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaConventionTests.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 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
@@ -93,6 +93,9 @@
 		CompilerOptions.VERSION_1_4,
 		CompilerOptions.VERSION_1_5,
 		CompilerOptions.VERSION_1_6,
+		CompilerOptions.VERSION_1_7,
+		CompilerOptions.VERSION_1_8,
+		CompilerOptions.VERSION_9,
 	};
 
 	/*
@@ -129,6 +132,11 @@
 		}
 		return -1;
 	}
+	void validateModuleName(String name, String sourceLevel, String complianceLevel, int sev, String message) {
+		IStatus s = JavaConventions.validateModuleName(name, sourceLevel, complianceLevel);
+		assertEquals("incorrect status", sev, s.getSeverity());
+		assertEquals("incorrect status message", message, s.getMessage());
+	}
 
 	/**
 	 * @see JavaConventions
@@ -200,10 +208,18 @@
 		for (int i = 0; i < invalidNames.length; i++) {
 			assertEquals("compilation unit name not recognized as invalid: " + invalidNames[i], IStatus.ERROR, validate(invalidNames[i], COMPILATION_UNIT_NAME));
 		}
-		String[] validNames = new String[] {"Object.java", "OBJECT.java", "object.java", "package-info.java"};
+		invalidNames = new String[] {"module-package.class"};
+		for (int i = 0; i < invalidNames.length; i++) {
+			assertEquals("compilation unit name not recognized as valid: " + invalidNames[i], IStatus.ERROR, validate(invalidNames[i], CLASS_FILE_NAME));
+		}
+		String[] validNames = new String[] {"Object.java", "OBJECT.java", "object.java", "package-info.java", "module-info.java"};
 		for (int i = 0; i < validNames.length; i++) {
 			assertEquals("compilation unit name not recognized as valid: " + validNames[i], IStatus.OK, validate(validNames[i], COMPILATION_UNIT_NAME));
 		}
+		validNames = new String[] {"module-info.class"};
+		for (int i = 0; i < validNames.length; i++) {
+			assertEquals("compilation unit name not recognized as valid: " + validNames[i], IStatus.OK, validate(validNames[i], CLASS_FILE_NAME));
+		}
 	}
 	/**
 	 * @see JavaConventions
@@ -400,4 +416,42 @@
 			}
 		}
 	}
+
+	public void testModuleName() {
+		int length = VERSIONS.length;
+		for (int i = 0; i < length; i++) { // source level
+			for (int j = 0; j < length; j++) { // compliance level
+				if (i >= 8 && j >= 8) { // source and compliance level > VERSION_9
+					validateModuleName(null, VERSIONS[i], VERSIONS[j], IStatus.ERROR, "A module name must not be null");
+					validateModuleName("mod.one", VERSIONS[i], VERSIONS[j], IStatus.OK, "OK");
+					validateModuleName("mod_one", VERSIONS[i], VERSIONS[j], IStatus.OK, "OK");
+					validateModuleName("one.java", VERSIONS[i], VERSIONS[j], IStatus.OK, "OK");
+					validateModuleName("m0d.one", VERSIONS[i], VERSIONS[j], IStatus.OK, "OK");
+					validateModuleName("1mod1. one", VERSIONS[i], VERSIONS[j], IStatus.ERROR, "'1mod1' is not a valid Java identifier");
+					validateModuleName("mod1.2one", VERSIONS[i], VERSIONS[j], IStatus.ERROR, "'2one' is not a valid Java identifier");
+					validateModuleName("mod..one", VERSIONS[i], VERSIONS[j], IStatus.ERROR, "A module name must not contain consecutive dots");
+					validateModuleName(".mod.one", VERSIONS[i], VERSIONS[j], IStatus.ERROR, "A module name cannot start or end with a dot");
+					validateModuleName("mod.one.", VERSIONS[i], VERSIONS[j], IStatus.ERROR, "A module name cannot start or end with a dot");
+					validateModuleName(".mod.one.", VERSIONS[i], VERSIONS[j], IStatus.ERROR, "A module name cannot start or end with a dot");
+					validateModuleName("mod.one ", VERSIONS[i], VERSIONS[j], IStatus.ERROR, "A module name must not start or end with a blank");
+					validateModuleName(" mod.one", VERSIONS[i], VERSIONS[j], IStatus.ERROR, "A module name must not start or end with a blank");
+					validateModuleName("java one", VERSIONS[i], VERSIONS[j], IStatus.ERROR, "'java one' is not a valid Java identifier");
+					validateModuleName("mod,one", VERSIONS[i], VERSIONS[j], IStatus.ERROR, "'mod,one' is not a valid Java identifier");
+					validateModuleName("mod1.one", VERSIONS[i], VERSIONS[j], IStatus.WARNING, "A module name should avoid terminal digits");
+					validateModuleName("mod.one1.two", VERSIONS[i], VERSIONS[j], IStatus.WARNING, "A module name should avoid terminal digits");
+					validateModuleName("java.one", VERSIONS[i], VERSIONS[j], IStatus.WARNING, "java is reserved for system modules");
+					validateModuleName("mod. one", VERSIONS[i], VERSIONS[j], IStatus.OK, "OK");
+
+					// Now try using keywords
+					validateModuleName("module.requires", VERSIONS[i], VERSIONS[j], IStatus.OK, "OK");
+					validateModuleName("exports.to", VERSIONS[i], VERSIONS[j], IStatus.OK, "OK");
+					validateModuleName("provides.with", VERSIONS[i], VERSIONS[j], IStatus.OK, "OK");
+					validateModuleName("opens.uses", VERSIONS[i], VERSIONS[j], IStatus.OK, "OK");
+					validateModuleName("transitive.open", VERSIONS[i], VERSIONS[j], IStatus.OK, "OK");
+					validateModuleName("static.requires", VERSIONS[i], VERSIONS[j], IStatus.ERROR, "'static' is not a valid Java identifier");
+					validateModuleName("class.interface.method", VERSIONS[i], VERSIONS[j], IStatus.ERROR, "'class' is not a valid Java identifier");
+				}
+			}
+		}
+	}
 }
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaCoreOptionsTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaCoreOptionsTests.java
index 7522813..2da617d 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaCoreOptionsTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaCoreOptionsTests.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2010, 2015 IBM Corporation and others.
+ * Copyright (c) 2010, 2016 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
@@ -113,8 +113,10 @@
 	assertTrue(JavaCore.compareJavaVersions("cldc1.1", "1.1") > 0);
 	assertTrue(JavaCore.compareJavaVersions("1.1", "cldc1.1") < 0);
 	assertTrue(JavaCore.compareJavaVersions("1.8", "1.8") == 0);
-	assertTrue(JavaCore.compareJavaVersions("1.8", "1.9") < 0);
-	assertTrue(JavaCore.compareJavaVersions("1.9", "1.8") > 0);
+	assertTrue(JavaCore.compareJavaVersions("1.8", "9") < 0);
+	assertTrue(JavaCore.compareJavaVersions("9", "1.8") > 0);
+	assertTrue(JavaCore.compareJavaVersions("9.0.1", "9.1.2") == 0);
+	assertTrue(JavaCore.compareJavaVersions("9", "9.1.2") == 0);
 }
 }
 
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaElement8Tests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaElement8Tests.java
index b9f9a1d..f2efc14 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaElement8Tests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaElement8Tests.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2014, 2015 IBM Corporation and others.
+ * Copyright (c) 2014, 2017 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
@@ -81,7 +81,7 @@
 							"src.zip", new 
 							String[] {"p/Test.java", fileContent},
 							JavaCore.VERSION_1_8);
-				IType type = getPackageFragmentRoot("Bug428178", "lib.jar").getPackageFragment("p").getClassFile("Test.class").getType();
+				IType type = getPackageFragmentRoot("Bug428178", "lib.jar").getPackageFragment("p").getOrdinaryClassFile("Test.class").getType();
 				IMethod method = type.getMethods()[0];
 				assertNotNull("Method should not be null", method);
 				assertTrue("Should be a main method", method.isMainMethod());
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaProjectTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaProjectTests.java
index a15213f..0f868ee 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaProjectTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaProjectTests.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2016 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 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
@@ -52,13 +52,13 @@
 import org.eclipse.jdt.core.IJavaModelStatusConstants;
 import org.eclipse.jdt.core.IJavaProject;
 import org.eclipse.jdt.core.IMethod;
+import org.eclipse.jdt.core.IOrdinaryClassFile;
 import org.eclipse.jdt.core.IPackageFragment;
 import org.eclipse.jdt.core.IPackageFragmentRoot;
 import org.eclipse.jdt.core.IType;
 import org.eclipse.jdt.core.JavaCore;
 import org.eclipse.jdt.core.JavaModelException;
 import org.eclipse.jdt.core.WorkingCopyOwner;
-import org.eclipse.jdt.core.dom.AST;
 import org.eclipse.jdt.core.dom.ASTNode;
 import org.eclipse.jdt.core.dom.ASTParser;
 import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
@@ -516,7 +516,7 @@
  * has a corresponding resource.
  */
 public void testBinaryTypeCorrespondingResource() throws CoreException {
-	IClassFile element= getClassFile("/JavaProjectLibTests/lib/p/Y.class");
+	IOrdinaryClassFile element= getClassFile("/JavaProjectLibTests/lib/p/Y.class");
 	IType type= element.getType();
 	IResource corr= type.getCorrespondingResource();
 	assertTrue("incorrect corresponding resource", corr == null);
@@ -2633,7 +2633,7 @@
 		proj.getProject().build(IncrementalProjectBuilder.FULL_BUILD, null);
 
 		try {
-			ASTParser parser= ASTParser.newParser(AST.JLS8);
+			ASTParser parser= ASTParser.newParser(AST_INTERNAL_JLS9);
 			parser.setSource(unit);
 			parser.setResolveBindings(true);
 			ASTNode node = parser.createAST(null);
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaSearchBugs9Tests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaSearchBugs9Tests.java
new file mode 100644
index 0000000..57d1cf7
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaSearchBugs9Tests.java
@@ -0,0 +1,2391 @@
+/*******************************************************************************
+ * Copyright (c) 2016, 2017 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.jdt.core.tests.model;
+
+import java.util.Map;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.ILocalVariable;
+import org.eclipse.jdt.core.IModuleDescription;
+import org.eclipse.jdt.core.IPackageFragment;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.core.WorkingCopyOwner;
+import org.eclipse.jdt.core.search.IJavaSearchConstants;
+import org.eclipse.jdt.core.search.IJavaSearchScope;
+import org.eclipse.jdt.core.search.ReferenceMatch;
+import org.eclipse.jdt.core.search.SearchEngine;
+import org.eclipse.jdt.core.search.SearchMatch;
+import org.eclipse.jdt.core.search.SearchPattern;
+import org.eclipse.jdt.core.search.TypeReferenceMatch;
+import junit.framework.Test;
+
+/**
+ * Non-regression tests for bugs fixed in Java Search engine.
+ */
+public class JavaSearchBugs9Tests extends AbstractJavaSearchTests {
+
+	static {
+//	 org.eclipse.jdt.internal.core.search.BasicSearchEngine.VERBOSE = true;
+//	TESTS_NAMES = new String[] {"testBug521221_001"};
+}
+
+public JavaSearchBugs9Tests(String name) {
+	super(name);
+	this.endChar = "";
+}
+public static Test suite() {
+	return buildModelTestSuite(JavaSearchBugs9Tests.class, BYTECODE_DECLARATION_ORDER);
+}
+class TestCollector extends JavaSearchResultCollector {
+	public void acceptSearchMatch(SearchMatch searchMatch) throws CoreException {
+		super.acceptSearchMatch(searchMatch);
+	}
+}
+class ReferenceCollector extends JavaSearchResultCollector {
+	protected void writeLine() throws CoreException {
+		super.writeLine();
+		ReferenceMatch refMatch = (ReferenceMatch) this.match;
+		IJavaElement localElement = refMatch.getLocalElement();
+		if (localElement != null) {
+			this.line.append("+[");
+			if (localElement.getElementType() == IJavaElement.ANNOTATION) {
+				this.line.append('@');
+				this.line.append(localElement.getElementName());
+				this.line.append(" on ");
+				this.line.append(localElement.getParent().getElementName());
+			} else {
+				this.line.append(localElement.getElementName());
+			}
+			this.line.append(']');
+		}
+	}
+
+}
+class TypeReferenceCollector extends ReferenceCollector {
+	protected void writeLine() throws CoreException {
+		super.writeLine();
+		TypeReferenceMatch typeRefMatch = (TypeReferenceMatch) this.match;
+		IJavaElement[] others = typeRefMatch.getOtherElements();
+		int length = others==null ? 0 : others.length;
+		if (length > 0) {
+			this.line.append("+[");
+			for (int i=0; i<length; i++) {
+				IJavaElement other = others[i];
+				if (i>0) this.line.append(',');
+				if (other.getElementType() == IJavaElement.ANNOTATION) {
+					this.line.append('@');
+					this.line.append(other.getElementName());
+					this.line.append(" on ");
+					this.line.append(other.getParent().getElementName());
+				} else {
+					this.line.append(other.getElementName());
+				}
+			}
+			this.line.append(']');
+		}
+	}
+}
+
+IJavaSearchScope getJavaSearchScope() {
+	return SearchEngine.createJavaSearchScope(new IJavaProject[] {getJavaProject("JavaSearchBugs")});
+}
+IJavaSearchScope getJavaSearchScopeBugs(String packageName, boolean addSubpackages) throws JavaModelException {
+	if (packageName == null) return getJavaSearchScope();
+	return getJavaSearchPackageScope("JavaSearchBugs", packageName, addSubpackages);
+}
+public ICompilationUnit getWorkingCopy(String path, String source) throws JavaModelException {
+	if (this.wcOwner == null) {
+		this.wcOwner = new WorkingCopyOwner() {};
+	}
+	return getWorkingCopy(path, source, this.wcOwner);
+}
+/* (non-Javadoc)
+ * @see org.eclipse.jdt.core.tests.model.SuiteOfTestCases#setUpSuite()
+ */
+public void setUpSuite() throws Exception {
+	super.setUpSuite();
+	JAVA_PROJECT = setUpJavaProject("JavaSearchBugs", "9");
+}
+public void tearDownSuite() throws Exception {
+	deleteProject("JavaSearchBugs");
+	super.tearDownSuite();
+}
+protected void setUp () throws Exception {
+	super.setUp();
+	this.resultCollector = new TestCollector();
+	this.resultCollector.showAccuracy(true);
+}
+
+public void _testBug499338_001() throws CoreException {
+	this.workingCopies = new ICompilationUnit[1];
+	this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/X.java",
+			"public class X {\n" +
+			"    public static void main(String [] args) throws Exception {\n" +
+			"    	Z z1 = new Z();\n" +
+			"        try (z1;  z1) {\n" +
+			"        }  \n" +
+			"    }  \n" +
+			"}\n" +
+			"class Y implements AutoCloseable {\n" +
+			"	public void close() throws Exception {\n" +
+			"		System.out.println(\"Y CLOSE\");\n" +
+			"	}\n" +
+			"}\n" +
+			"\n" +
+			"class Z implements AutoCloseable {\n" +
+			"	public void close() throws Exception {\n" +
+			"		System.out.println(\"Z CLOSE\");\n" +
+			"	}\n" +
+			"}\n"
+			);
+	String str = this.workingCopies[0].getSource();
+	String selection = "z1";
+	int start = str.indexOf(selection);
+	int length = selection.length();
+	
+	IJavaElement[] elements = this.workingCopies[0].codeSelect(start, length);
+	ILocalVariable local = (ILocalVariable) elements[0];
+	search(local, REFERENCES, EXACT_RULE);
+	assertSearchResults(	
+			"src/X.java void X.main(String[]) [z1] EXACT_MATCH\n" + 
+			"src/X.java void X.main(String[]) [z1] EXACT_MATCH");	
+}
+
+public void testBug501162_001() throws Exception {
+	try {
+
+		IJavaProject project1 = createJavaProject("JavaSearchBugs9", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+		project1.open(null);
+		addClasspathEntry(project1, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+		String fileContent = 
+			"module first {\n" +
+			"    exports pack1 to second;\n" +
+			"}\n";
+		createFile("/JavaSearchBugs9/src/module-info.java",	fileContent);
+		createFolder("/JavaSearchBugs9/src/pack1");
+		createFile("/JavaSearchBugs9/src/pack1/X11.java",
+				"package pack1;\n" +
+				"public class X11 {}\n");
+
+		IJavaProject project2 = createJavaProject("second", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+		project2.open(null);
+		addClasspathEntry(project2, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+		String secondFile = 
+				"module second {\n" +
+				"    requires first;\n" +
+				"}\n";
+		createFile("/second/src/module-info.java",	secondFile);
+
+		addClasspathEntry(project1, JavaCore.newProjectEntry(project2.getPath()));
+		project1.close(); // sync
+		project2.close();
+		project2.open(null);
+		project1.open(null);
+		
+		IPackageFragment pkg = getPackageFragment("JavaSearchBugs9", "src", "pack1");
+		IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaProject[] 
+				{getJavaProject("JavaSearchBugs9")});
+
+		search(
+			pkg,
+			ALL_OCCURRENCES,
+			scope,
+			this.resultCollector);
+		assertSearchResults(
+			"src/module-info.java first [pack1] EXACT_MATCH\n" + 
+			"src/pack1 pack1 EXACT_MATCH",
+			this.resultCollector);
+
+	}
+	finally {
+		deleteProject("JavaSearchBugs9");
+		deleteProject("second");
+	}
+}
+public void testBug501162_002() throws Exception {
+	try {
+
+		IJavaProject project1 = createJavaProject("JavaSearchBugs9", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+		project1.open(null);
+		addClasspathEntry(project1, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+		String fileContent = 
+			"module first {\n" +
+			"    exports pack1 to second;\n" +
+			"    exports pack1 to third;\n" +
+			"    opens pack1 to fourth;\n" +
+			"}\n";
+		createFile("/JavaSearchBugs9/src/module-info.java",	fileContent);
+		createFolder("/JavaSearchBugs9/src/pack1");
+		createFile("/JavaSearchBugs9/src/pack1/X11.java",
+				"package pack1;\n" +
+				"public class X11 {}\n");
+
+		IJavaProject project2 = createJavaProject("second", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+		project2.open(null);
+		addClasspathEntry(project2, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+		String secondFile = 
+				"module second {\n" +
+				"    requires first;\n" +
+				"}\n";
+		createFile("/second/src/module-info.java",	secondFile);
+
+		addClasspathEntry(project1, JavaCore.newProjectEntry(project2.getPath()));
+		project1.close(); // sync
+		project2.close();
+		project2.open(null);
+		project1.open(null);
+		
+		IPackageFragment pkg = getPackageFragment("JavaSearchBugs9", "src", "pack1");
+		IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaProject[] 
+				{getJavaProject("JavaSearchBugs9")});
+
+		search(
+			pkg,
+			ALL_OCCURRENCES,
+			scope,
+			this.resultCollector);
+		assertSearchResults(
+			"src/module-info.java first [pack1] EXACT_MATCH\n" + 
+			"src/module-info.java first [pack1] EXACT_MATCH\n" + 
+			"src/module-info.java first [pack1] EXACT_MATCH\n" + 
+			"src/pack1 pack1 EXACT_MATCH",
+			this.resultCollector);
+
+	}
+	finally {
+		deleteProject("JavaSearchBugs9");
+		deleteProject("second");
+	}
+}
+public void testBug501162_003() throws Exception {
+	try {
+
+		IJavaProject project1 = createJavaProject("JavaSearchBugs9", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+		project1.open(null);
+		addClasspathEntry(project1, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+		String fileContent = 
+			"module first {\n" +
+			"    requires second;" +
+			"    provides pack22.I22 with pack1.X11;" +
+			"}\n";
+		createFile("/JavaSearchBugs9/src/module-info.java",	fileContent);
+		createFolder("/JavaSearchBugs9/src/pack1");
+		createFile("/JavaSearchBugs9/src/pack1/X11.java",
+				"package pack1;\n" +
+				"public class X11 implements pack22.I22{}\n");
+
+		IJavaProject project2 = createJavaProject("second", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+		project2.open(null);
+		addClasspathEntry(project2, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+		String secondFile = 
+				"module second {\n" +
+				"    exports pack22 to first;\n" +
+				"}\n";
+		createFile("/second/src/module-info.java",	secondFile);
+		createFolder("/second/src/pack22");
+		createFile("/second/src/pack22/I22.java",
+				"package pack22;\n" +
+				"public interface I22 {}\n");
+
+		addClasspathEntry(project1, JavaCore.newProjectEntry(project2.getPath()));
+		project1.close(); // sync
+		project2.close();
+		project2.open(null);
+		project1.open(null);
+
+		IPackageFragment pkg = getPackageFragment("second", "src", "pack22");
+		IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaProject[] 
+				{getJavaProject("JavaSearchBugs9")});
+
+		search(
+			pkg,
+			REFERENCES,
+			scope,
+			this.resultCollector);
+		assertSearchResults(
+			"src/module-info.java first [pack22] EXACT_MATCH\n" + 
+			"src/pack1/X11.java pack1.X11 [pack22] EXACT_MATCH\n" + 
+			"src/module-info.java second [pack22] EXACT_MATCH",
+			this.resultCollector);
+	}
+	finally {
+		deleteProject("JavaSearchBugs9");
+		deleteProject("second");
+	}
+}
+public void testBug501162_005() throws CoreException {
+	this.workingCopies = new ICompilationUnit[1];
+	this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/module-info.java",
+			"module first {\n" +
+			"    requires second;" +
+			"    provides pack22.I22 with pack1.X11;" +
+			"}\n"
+			);
+	String str = this.workingCopies[0].getSource();
+	String selection = "first";
+	int start = str.indexOf(selection);
+	int length = selection.length();
+	
+	IJavaElement[] elements = this.workingCopies[0].codeSelect(start, length);
+	IModuleDescription module = (IModuleDescription) elements[0];
+	search(module, ALL_OCCURRENCES, EXACT_RULE);
+	assertSearchResults(	
+			"src/module-info.java first [first] EXACT_MATCH");
+}
+public void testBug501162_006() throws Exception {
+	try {
+
+		IJavaProject project1 = createJavaProject("JavaSearchBugs9", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+		project1.open(null);
+		addClasspathEntry(project1, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+		String fileContent = 
+			"module first {\n" +
+			"    requires second;" +
+			"    provides pack22.I22 with pack1.X11;" +
+			"}\n";
+		createFile("/JavaSearchBugs9/src/module-info.java",	fileContent);
+		createFolder("/JavaSearchBugs9/src/pack1");
+		createFile("/JavaSearchBugs9/src/pack1/X11.java",
+				"package pack1;\n" +
+				"public class X11 implements pack22.I22{}\n");
+
+		IJavaProject project2 = createJavaProject("second", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+		project2.open(null);
+		addClasspathEntry(project2, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+		String secondFile = 
+				"module second {\n" +
+				"    exports pack22 to first;\n" +
+				"}\n";
+		createFile("/second/src/module-info.java",	secondFile);
+		createFolder("/second/src/pack1");
+		createFile("/second/src/pack1/I22.java",
+				"package pack22;\n" +
+				"public interface I22 {}\n");
+
+		addClasspathEntry(project1, JavaCore.newProjectEntry(project2.getPath()));
+		project1.close(); // sync
+		project2.close();
+		project2.open(null);
+		project1.open(null);
+
+		SearchPattern pattern = SearchPattern.createPattern("first", IJavaSearchConstants.MODULE, REFERENCES, ERASURE_RULE);
+		IJavaSearchScope scope = SearchEngine.createWorkspaceScope();
+		search(pattern, scope, this.resultCollector);
+
+		assertSearchResults(
+				"src/module-info.java second [first] EXACT_MATCH",
+			this.resultCollector);
+	}
+	finally {
+		deleteProject("JavaSearchBugs9");
+		deleteProject("second");
+	}
+}
+public void testBug501162_007() throws Exception {
+	try {
+
+		IJavaProject project1 = createJavaProject("JavaSearchBugs9", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+		project1.open(null);
+		addClasspathEntry(project1, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+		String fileContent = 
+			"module first.test.org {\n" +
+			"    requires second;" +
+			"    provides pack22.I22 with pack1.X11;" +
+			"}\n";
+		createFile("/JavaSearchBugs9/src/module-info.java",	fileContent);
+		createFolder("/JavaSearchBugs9/src/pack1");
+		createFile("/JavaSearchBugs9/src/pack1/X11.java",
+				"package pack1;\n" +
+				"public class X11 implements pack22.I22{}\n");
+
+		IJavaProject project2 = createJavaProject("second", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+		project2.open(null);
+		addClasspathEntry(project2, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+		String secondFile = 
+				"module second {\n" +
+				"    exports pack22 to first.test.org;\n" +
+				"}\n";
+		createFile("/second/src/module-info.java",	secondFile);
+		createFolder("/second/src/pack1");
+		createFile("/second/src/pack1/I22.java",
+				"package pack22;\n" +
+				"public interface I22 {}\n");
+
+		addClasspathEntry(project1, JavaCore.newProjectEntry(project2.getPath()));
+		project1.close(); // sync
+		project2.close();
+		project2.open(null);
+		project1.open(null);
+
+		SearchPattern pattern = SearchPattern.createPattern("first.test.org", IJavaSearchConstants.MODULE, REFERENCES, ERASURE_RULE);
+		IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaProject[] {getJavaProject("JavaSearchBugs9")});
+		search(pattern, scope, this.resultCollector);
+
+		assertSearchResults(
+			"src/module-info.java second [first.test.org] EXACT_MATCH",
+			this.resultCollector);
+	}
+	finally {
+		deleteProject("JavaSearchBugs9");
+		deleteProject("second");
+	}
+}
+public void testBug501162_008() throws Exception {
+	try {
+
+		IJavaProject project1 = createJavaProject("JavaSearchBugs9", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+		project1.open(null);
+		addClasspathEntry(project1, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+		String fileContent = 
+			"module first {\n" +
+			"    requires second;" +
+			"    provides pack22.I22 with pack1.X11;" +
+			"}\n";
+		createFile("/JavaSearchBugs9/src/module-info.java",	fileContent);
+		createFolder("/JavaSearchBugs9/src/pack1");
+		createFile("/JavaSearchBugs9/src/pack1/X11.java",
+				"package pack1;\n" +
+				"public class X11 implements pack22.I22{}\n");
+
+		IJavaProject project2 = createJavaProject("second", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+		project2.open(null);
+		addClasspathEntry(project2, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+		String secondFile = 
+				"module second {\n" +
+				"    exports pack22 to first;\n" +
+				"}\n";
+		createFile("/second/src/module-info.java",	secondFile);
+		createFolder("/second/src/pack1");
+		createFile("/second/src/pack1/I22.java",
+				"package pack22;\n" +
+				"public interface I22 {}\n");
+
+		addClasspathEntry(project1, JavaCore.newProjectEntry(project2.getPath()));
+		project1.close(); // sync
+		project2.close();
+		project2.open(null);
+		project1.open(null);
+
+		SearchPattern pattern = SearchPattern.createPattern("second", IJavaSearchConstants.MODULE, REFERENCES, ERASURE_RULE);
+		IJavaSearchScope scope = SearchEngine.createWorkspaceScope();
+		search(pattern, scope, this.resultCollector);
+
+		assertSearchResults(
+			"src/module-info.java first [second] EXACT_MATCH",
+			this.resultCollector);
+	}
+	finally {
+		deleteProject("JavaSearchBugs9");
+		deleteProject("second");
+	}
+}
+
+public void testBug501162_009() throws Exception {
+	try {
+
+		IJavaProject project1 = createJavaProject("JavaSearchBugs9", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+		project1.open(null);
+		addClasspathEntry(project1, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+		String fileContent = 
+			"module first {\n" +
+			"    exports pack1;\n" +
+			"    exports pack2;\n" +
+			"    opens pack1 to fourth;\n" +
+			"}\n";
+		createFile("/JavaSearchBugs9/src/module-info.java",	fileContent);
+		createFolder("/JavaSearchBugs9/src/pack1");
+		createFile("/JavaSearchBugs9/src/pack1/X11.java",
+				"package pack1;\n" +
+				"public class X11 {}\n");
+		createFolder("/JavaSearchBugs9/src/pack2");
+		createFile("/JavaSearchBugs9/src/pack2/X21.java",
+				"package pack2;\n" +
+				"public class X21 {}\n");
+
+		IJavaProject project2 = createJavaProject("second", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+		project2.open(null);
+		addClasspathEntry(project2, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+		String secondFile = 
+				"module second {\n" +
+				"    requires first;\n" +
+				"}\n";
+		createFile("/second/src/module-info.java",	secondFile);
+
+		addClasspathEntry(project1, JavaCore.newProjectEntry(project2.getPath()));
+		project1.close(); // sync
+		project2.close();
+		project2.open(null);
+		project1.open(null);
+		
+		IPackageFragment pkg = getPackageFragment("JavaSearchBugs9", "src", "pack2");
+		IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaProject[] 
+				{getJavaProject("JavaSearchBugs9")});
+
+		search(
+			pkg,
+			ALL_OCCURRENCES,
+			scope,
+			this.resultCollector);
+		assertSearchResults(
+			"src/module-info.java first [pack2] EXACT_MATCH\n" + 
+			"src/pack2 pack2 EXACT_MATCH",
+			this.resultCollector);
+
+	}
+	finally {
+		deleteProject("JavaSearchBugs9");
+		deleteProject("second");
+	}
+}
+public void testBug501162_010() throws Exception {
+	try {
+
+		IJavaProject project1 = createJavaProject("JavaSearchBugs9", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+		project1.open(null);
+		addClasspathEntry(project1, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+		String fileContent = 
+			"module first {\n" +
+			"    requires second;" +
+			"    provides pack22.I22 with pack1.X11;" +
+			"}\n";
+		createFile("/JavaSearchBugs9/src/module-info.java",	fileContent);
+		createFolder("/JavaSearchBugs9/src/pack1");
+		createFile("/JavaSearchBugs9/src/pack1/X11.java",
+				"package pack1;\n" +
+				"public class X11 implements pack22.I22{}\n");
+
+		IJavaProject project2 = createJavaProject("second", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+		project2.open(null);
+		addClasspathEntry(project2, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+		String secondFile = 
+				"module second {\n" +
+				"    exports pack22 to first, zero;\n" +
+				"}\n";
+		createFile("/second/src/module-info.java",	secondFile);
+		createFolder("/second/src/pack1");
+		createFile("/second/src/pack1/I22.java",
+				"package pack22;\n" +
+				"public interface I22 {}\n");
+
+		addClasspathEntry(project1, JavaCore.newProjectEntry(project2.getPath()));
+		project1.close(); // sync
+		project2.close();
+		project2.open(null);
+		project1.open(null);
+
+		SearchPattern pattern = SearchPattern.createPattern("first", IJavaSearchConstants.MODULE, REFERENCES, ERASURE_RULE);
+		IJavaSearchScope scope = SearchEngine.createWorkspaceScope();
+		search(pattern, scope, this.resultCollector);
+
+		assertSearchResults(
+				"src/module-info.java second [first] EXACT_MATCH",
+			this.resultCollector);
+	}
+	finally {
+		deleteProject("JavaSearchBugs9");
+		deleteProject("second");
+	}
+}
+public void testBug501162_011() throws Exception {
+	try {
+
+		IJavaProject project1 = createJavaProject("JavaSearchBugs9", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+		project1.open(null);
+		addClasspathEntry(project1, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+		String fileContent = 
+			"module first {\n" +
+			"    requires second;" +
+			"    provides pack22.I22 with pack1.X11;" +
+			"}\n";
+		createFile("/JavaSearchBugs9/src/module-info.java",	fileContent);
+		createFolder("/JavaSearchBugs9/src/pack1");
+		createFile("/JavaSearchBugs9/src/pack1/X11.java",
+				"package pack1;\n" +
+				"public class X11 implements pack22.I22{}\n");
+
+		IJavaProject project2 = createJavaProject("second", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+		project2.open(null);
+		addClasspathEntry(project2, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+		String secondFile = 
+				"module second {\n" +
+				"    opens pack22 to first, zero;\n" +
+				"}\n";
+		createFile("/second/src/module-info.java",	secondFile);
+		createFolder("/second/src/pack1");
+		createFile("/second/src/pack1/I22.java",
+				"package pack22;\n" +
+				"public interface I22 {}\n");
+
+		addClasspathEntry(project1, JavaCore.newProjectEntry(project2.getPath()));
+		project1.close(); // sync
+		project2.close();
+		project2.open(null);
+		project1.open(null);
+
+		SearchPattern pattern = SearchPattern.createPattern("first", IJavaSearchConstants.MODULE, REFERENCES, ERASURE_RULE);
+		IJavaSearchScope scope = SearchEngine.createWorkspaceScope();
+		search(pattern, scope, this.resultCollector);
+
+		assertSearchResults(
+				"src/module-info.java second [first] EXACT_MATCH",
+			this.resultCollector);
+	}
+	finally {
+		deleteProject("JavaSearchBugs9");
+		deleteProject("second");
+	}
+}
+public void testBug501162_012() throws Exception {
+	try {
+		IJavaProject project1 = createJavaProject("JavaSearchBugs9", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+		project1.open(null);
+		addClasspathEntry(project1, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+		String fileContent = 
+			"module first {\n" +
+			"    exports pack1 to one;\n" +
+			"    exports pack2;\n" +
+			"}\n";
+		createFile("/JavaSearchBugs9/src/module-info.java",	fileContent);
+		createFolder("/JavaSearchBugs9/src/pack1");
+		createFile("/JavaSearchBugs9/src/pack1/X11.java",
+				"package pack1;\n" +
+				"public class X11 {}\n");
+		createFolder("/JavaSearchBugs9/src/pack2");
+		createFile("/JavaSearchBugs9/src/pack2/X21.java",
+				"package pack2;\n" +
+				"public class X21 {}\n");
+
+		IJavaProject project2 = createJavaProject("second", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+		project2.open(null);
+		addClasspathEntry(project2, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+		String secondFile = 
+				"module second {\n" +
+				"    requires first;\n" +
+				"}\n";
+		createFile("/second/src/module-info.java",	secondFile);
+
+		addClasspathEntry(project1, JavaCore.newProjectEntry(project2.getPath()));
+		project1.close(); // sync
+		project2.close();
+		project2.open(null);
+		project1.open(null);
+		
+		IPackageFragment pkg = getPackageFragment("JavaSearchBugs9", "src", "pack1");
+		IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaProject[] 
+				{getJavaProject("JavaSearchBugs9")});
+
+		search(
+			pkg,
+			ALL_OCCURRENCES,
+			scope,
+			this.resultCollector);
+		assertSearchResults(
+				"src/module-info.java first [pack1] EXACT_MATCH\n" + 
+				"src/pack1 pack1 EXACT_MATCH",
+			this.resultCollector);
+
+	}
+	finally {
+		deleteProject("JavaSearchBugs9");
+		deleteProject("second");
+	}
+}
+public void testBug501162_013() throws Exception {
+	try {
+		IJavaProject project1 = createJavaProject("JavaSearchBugs9", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+		project1.open(null);
+		addClasspathEntry(project1, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+		String fileContent = 
+			"module first {\n" +
+			"    opens pack1 to one;\n" +
+			"    opens pack2;\n" +
+			"}\n";
+		createFile("/JavaSearchBugs9/src/module-info.java",	fileContent);
+		createFolder("/JavaSearchBugs9/src/pack1");
+		createFile("/JavaSearchBugs9/src/pack1/X11.java",
+				"package pack1;\n" +
+				"public class X11 {}\n");
+		createFolder("/JavaSearchBugs9/src/pack2");
+		createFile("/JavaSearchBugs9/src/pack2/X21.java",
+				"package pack2;\n" +
+				"public class X21 {}\n");
+
+		IJavaProject project2 = createJavaProject("second", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+		project2.open(null);
+		addClasspathEntry(project2, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+		String secondFile = 
+				"module second {\n" +
+				"    requires first;\n" +
+				"}\n";
+		createFile("/second/src/module-info.java",	secondFile);
+
+		addClasspathEntry(project1, JavaCore.newProjectEntry(project2.getPath()));
+		project1.close(); // sync
+		project2.close();
+		project2.open(null);
+		project1.open(null);
+		
+		IPackageFragment pkg = getPackageFragment("JavaSearchBugs9", "src", "pack1");
+		IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaProject[] 
+				{getJavaProject("JavaSearchBugs9")});
+
+		search(
+			pkg,
+			ALL_OCCURRENCES,
+			scope,
+			this.resultCollector);
+		assertSearchResults(
+				"src/module-info.java first [pack1] EXACT_MATCH\n" + 
+				"src/pack1 pack1 EXACT_MATCH",
+			this.resultCollector);
+
+	}
+	finally {
+		deleteProject("JavaSearchBugs9");
+		deleteProject("second");
+	}
+}
+public void testBug501162_014() throws Exception {
+	try {
+		IJavaProject project1 = createJavaProject("JavaSearchBugs9", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+		project1.open(null);
+		addClasspathEntry(project1, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+		String fileContent = 
+			"module first {\n" +
+			"    opens pack1;\n" +
+			"    opens pack2;\n" +
+			"}\n";
+		createFile("/JavaSearchBugs9/src/module-info.java",	fileContent);
+		createFolder("/JavaSearchBugs9/src/pack1");
+		createFile("/JavaSearchBugs9/src/pack1/X11.java",
+				"package pack1;\n" +
+				"public class X11 {}\n");
+		createFolder("/JavaSearchBugs9/src/pack2");
+		createFile("/JavaSearchBugs9/src/pack2/X21.java",
+				"package pack2;\n" +
+				"public class X21 {}\n");
+
+		IJavaProject project2 = createJavaProject("second", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+		project2.open(null);
+		addClasspathEntry(project2, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+		String secondFile = 
+				"module second {\n" +
+				"    requires first;\n" +
+				"}\n";
+		createFile("/second/src/module-info.java",	secondFile);
+
+		addClasspathEntry(project1, JavaCore.newProjectEntry(project2.getPath()));
+		project1.close(); // sync
+		project2.close();
+		project2.open(null);
+		project1.open(null);
+		
+		IPackageFragment pkg = getPackageFragment("JavaSearchBugs9", "src", "pack2");
+		IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaProject[] 
+				{getJavaProject("JavaSearchBugs9")});
+
+		search(
+			pkg,
+			ALL_OCCURRENCES,
+			scope,
+			this.resultCollector);
+		assertSearchResults(
+				"src/module-info.java first [pack2] EXACT_MATCH\n" + 
+				"src/pack2 pack2 EXACT_MATCH",
+			this.resultCollector);
+
+	}
+	finally {
+		deleteProject("JavaSearchBugs9");
+		deleteProject("second");
+	}
+}
+public void testBug501162_015() throws Exception {
+	try {
+		IJavaProject project1 = createJavaProject("JavaSearchBugs9", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+		project1.open(null);
+		addClasspathEntry(project1, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+		String fileContent = 
+			"module first {\n" +
+			"    opens pack1;\n" +
+			"    exports pack2;\n" +
+			"}\n";
+		createFile("/JavaSearchBugs9/src/module-info.java",	fileContent);
+		createFolder("/JavaSearchBugs9/src/pack1");
+		createFile("/JavaSearchBugs9/src/pack1/X11.java",
+				"package pack1;\n" +
+				"public class X11 {}\n");
+		createFolder("/JavaSearchBugs9/src/pack2");
+		createFile("/JavaSearchBugs9/src/pack2/X21.java",
+				"package pack2;\n" +
+				"public class X21 {}\n");
+
+		IJavaProject project2 = createJavaProject("second", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+		project2.open(null);
+		addClasspathEntry(project2, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+		String secondFile = 
+				"module second {\n" +
+				"    requires first;\n" +
+				"}\n";
+		createFile("/second/src/module-info.java",	secondFile);
+
+		addClasspathEntry(project1, JavaCore.newProjectEntry(project2.getPath()));
+		project1.close(); // sync
+		project2.close();
+		project2.open(null);
+		project1.open(null);
+		
+		IPackageFragment pkg = getPackageFragment("JavaSearchBugs9", "src", "pack2");
+		IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaProject[] 
+				{getJavaProject("JavaSearchBugs9")});
+
+		search(
+			pkg,
+			ALL_OCCURRENCES,
+			scope,
+			this.resultCollector);
+		assertSearchResults(
+				"src/module-info.java first [pack2] EXACT_MATCH\n" + 
+				"src/pack2 pack2 EXACT_MATCH",
+			this.resultCollector);
+
+	}
+	finally {
+		deleteProject("JavaSearchBugs9");
+		deleteProject("second");
+	}
+}
+public void testBug501162_016() throws Exception {
+	try {
+		IJavaProject project1 = createJavaProject("JavaSearchBugs9", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+		project1.open(null);
+		addClasspathEntry(project1, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+		String fileContent = 
+			"module first {\n" +
+			"    opens pack1 to one;\n" +
+			"    exports pack2;\n" +
+			"}\n";
+		createFile("/JavaSearchBugs9/src/module-info.java",	fileContent);
+		createFolder("/JavaSearchBugs9/src/pack1");
+		createFile("/JavaSearchBugs9/src/pack1/X11.java",
+				"package pack1;\n" +
+				"public class X11 {}\n");
+		createFolder("/JavaSearchBugs9/src/pack2");
+		createFile("/JavaSearchBugs9/src/pack2/X21.java",
+				"package pack2;\n" +
+				"public class X21 {}\n");
+
+		IJavaProject project2 = createJavaProject("second", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+		project2.open(null);
+		addClasspathEntry(project2, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+		String secondFile = 
+				"module second {\n" +
+				"    requires first;\n" +
+				"}\n";
+		createFile("/second/src/module-info.java",	secondFile);
+
+		addClasspathEntry(project1, JavaCore.newProjectEntry(project2.getPath()));
+		project1.close(); // sync
+		project2.close();
+		project2.open(null);
+		project1.open(null);
+		
+		IPackageFragment pkg = getPackageFragment("JavaSearchBugs9", "src", "pack2");
+		IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaProject[] 
+				{getJavaProject("JavaSearchBugs9")});
+
+		search(
+			pkg,
+			ALL_OCCURRENCES,
+			scope,
+			this.resultCollector);
+		assertSearchResults(
+				"src/module-info.java first [pack2] EXACT_MATCH\n" + 
+				"src/pack2 pack2 EXACT_MATCH",
+			this.resultCollector);
+
+	}
+	finally {
+		deleteProject("JavaSearchBugs9");
+		deleteProject("second");
+	}
+}
+public void testBug501162_017() throws Exception {
+	try {
+		IJavaProject project1 = createJavaProject("JavaSearchBugs9", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+		project1.open(null);
+		addClasspathEntry(project1, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+		String fileContent = 
+			"module first {\n" +
+			"    exports pack1 to one;\n" +
+			"    opens pack2;\n" +
+			"}\n";
+		createFile("/JavaSearchBugs9/src/module-info.java",	fileContent);
+		createFolder("/JavaSearchBugs9/src/pack1");
+		createFile("/JavaSearchBugs9/src/pack1/X11.java",
+				"package pack1;\n" +
+				"public class X11 {}\n");
+		createFolder("/JavaSearchBugs9/src/pack2");
+		createFile("/JavaSearchBugs9/src/pack2/X21.java",
+				"package pack2;\n" +
+				"public class X21 {}\n");
+
+		IJavaProject project2 = createJavaProject("second", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+		project2.open(null);
+		addClasspathEntry(project2, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+		String secondFile = 
+				"module second {\n" +
+				"    requires first;\n" +
+				"}\n";
+		createFile("/second/src/module-info.java",	secondFile);
+
+		addClasspathEntry(project1, JavaCore.newProjectEntry(project2.getPath()));
+		project1.close(); // sync
+		project2.close();
+		project2.open(null);
+		project1.open(null);
+		
+		IPackageFragment pkg = getPackageFragment("JavaSearchBugs9", "src", "pack2");
+		IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaProject[] 
+				{getJavaProject("JavaSearchBugs9")});
+
+		search(
+			pkg,
+			ALL_OCCURRENCES,
+			scope,
+			this.resultCollector);
+		assertSearchResults(
+				"src/module-info.java first [pack2] EXACT_MATCH\n" + 
+				"src/pack2 pack2 EXACT_MATCH",
+			this.resultCollector);
+
+	}
+	finally {
+		deleteProject("JavaSearchBugs9");
+		deleteProject("second");
+	}
+}
+public void testBug501162_018() throws Exception {
+	try {
+		IJavaProject project1 = createJavaProject("JavaSearchBugs9", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+		project1.open(null);
+		addClasspathEntry(project1, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+		String fileContent = 
+			"module first {\n" +
+			"    opens pack2;\n" +
+			"}\n";
+		createFile("/JavaSearchBugs9/src/module-info.java",	fileContent);
+		createFolder("/JavaSearchBugs9/src/pack1");
+		createFile("/JavaSearchBugs9/src/pack1/X11.java",
+				"package pack1;\n" +
+				"public class X11 {}\n");
+		createFolder("/JavaSearchBugs9/src/pack2");
+		createFile("/JavaSearchBugs9/src/pack2/X21.java",
+				"package pack2;\n" +
+				"public class X21 {}\n");
+
+		IJavaProject project2 = createJavaProject("second", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+		project2.open(null);
+		addClasspathEntry(project2, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+		String secondFile = 
+				"module second {\n" +
+				"    requires first;\n" +
+				"}\n";
+		createFile("/second/src/module-info.java",	secondFile);
+
+		addClasspathEntry(project1, JavaCore.newProjectEntry(project2.getPath()));
+		project1.close(); // sync
+		project2.close();
+		project2.open(null);
+		project1.open(null);
+		
+		IPackageFragment pkg = getPackageFragment("JavaSearchBugs9", "src", "pack2");
+		IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaProject[] 
+				{getJavaProject("JavaSearchBugs9")});
+
+		search(
+			pkg,
+			ALL_OCCURRENCES,
+			scope,
+			this.resultCollector);
+		assertSearchResults(
+				"src/module-info.java first [pack2] EXACT_MATCH\n" + 
+				"src/pack2 pack2 EXACT_MATCH",
+			this.resultCollector);
+
+	}
+	finally {
+		deleteProject("JavaSearchBugs9");
+		deleteProject("second");
+	}
+}
+public void testBug501162_019() throws Exception {
+	try {
+		IJavaProject project1 = createJavaProject("JavaSearchBugs9", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+		project1.open(null);
+		addClasspathEntry(project1, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+		String fileContent =
+			"module zerotest {\n" +
+			"    requires zero;\n" +
+			"}\n";
+		createFile("/JavaSearchBugs9/src/module-info.java",	fileContent);
+		createFolder("/JavaSearchBugs9/src/pack1");
+		createFile("/JavaSearchBugs9/src/pack1/X.java",
+				"package pack1;\n" +
+				"import pack.one.XOne;\n" +
+				"import pack.two.ITwo;\n" +
+				"public class X {\n" +
+				"    public ITwo i2;\n" +
+				"    public XOne X1;\n" +
+				"}\n");
+		addLibraryEntry(project1, "/JavaSearchBugs/lib/bzero501162.jar", false);
+		project1.close(); // sync
+		project1.open(null);
+		SearchPattern pattern = SearchPattern.createPattern("pack.one",
+				IJavaSearchConstants.PACKAGE, IJavaSearchConstants.REFERENCES, EXACT_RULE);
+		IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaProject[]
+				{getJavaProject("JavaSearchBugs9")});
+
+		search(pattern, scope, this.resultCollector);
+
+		assertSearchResults(
+				"src/pack1/X.java [pack.one] EXACT_MATCH\n" +
+				"lib/bzero501162.jar zero [No source] EXACT_MATCH\n" +
+				"lib/bzero501162.jar zero [No source] EXACT_MATCH",
+			this.resultCollector);
+	}
+	finally {
+		deleteProject("JavaSearchBugs9");
+	}
+}
+public void testBug501162_020() throws Exception {
+	try {
+		IJavaProject project1 = createJavaProject("JavaSearchBugs9", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+		project1.open(null);
+		addClasspathEntry(project1, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+		String fileContent =
+			"module zerotest {\n" +
+			"    requires zero;\n" +
+			"}\n";
+		createFile("/JavaSearchBugs9/src/module-info.java",	fileContent);
+		createFolder("/JavaSearchBugs9/src/pack1");
+		createFile("/JavaSearchBugs9/src/pack1/X.java",
+				"package pack1;\n" +
+				"import pack.one.XOne;\n" +
+				"import pack.two.ITwo;\n" +
+				"public class X {\n" +
+				"    public ITwo i2;\n" +
+				"    public XOne X1;\n" +
+				"}\n");
+		addLibraryEntry(project1, "/JavaSearchBugs/lib/bzero501162.jar", false);
+		project1.close(); // sync
+		project1.open(null);
+		SearchPattern pattern = SearchPattern.createPattern("pack.two",
+				IJavaSearchConstants.PACKAGE, IJavaSearchConstants.REFERENCES, EXACT_RULE);
+		IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaProject[]
+				{getJavaProject("JavaSearchBugs9")});
+
+		search(pattern, scope, this.resultCollector);
+
+		assertSearchResults(
+				"src/pack1/X.java [pack.two] EXACT_MATCH\n" +
+				"lib/bzero501162.jar zero [No source] EXACT_MATCH\n" +
+				"lib/bzero501162.jar zero [No source] EXACT_MATCH\n" +
+				"lib/bzero501162.jar zero [No source] EXACT_MATCH",
+			this.resultCollector);
+	}
+	finally {
+		deleteProject("JavaSearchBugs9");
+	}
+}
+public void testBug501162_021() throws Exception {
+	try {
+		IJavaProject project1 = createJavaProject("JavaSearchBugs9", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+		project1.open(null);
+		addClasspathEntry(project1, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+		String fileContent =
+			"module zerotest {\n" +
+			"    requires zero;\n" +
+			"}\n";
+		createFile("/JavaSearchBugs9/src/module-info.java",	fileContent);
+		createFolder("/JavaSearchBugs9/src/pack1");
+		createFile("/JavaSearchBugs9/src/pack1/X.java",
+				"package pack1;\n" +
+				"import pack.one.XOne;\n" +
+				"import pack.two.ITwo;\n" +
+				"public class X {\n" +
+				"    public ITwo i2;\n" +
+				"    public XOne X1;\n" +
+				"}\n");
+		addLibraryEntry(project1, "/JavaSearchBugs/lib/bzero501162.jar", false);
+		project1.close(); // sync
+		project1.open(null);
+		SearchPattern pattern = SearchPattern.createPattern("pack.three",
+				IJavaSearchConstants.PACKAGE, IJavaSearchConstants.REFERENCES, EXACT_RULE);
+		IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaProject[]
+				{getJavaProject("JavaSearchBugs9")});
+
+		search(pattern, scope, this.resultCollector);
+
+		assertSearchResults(
+				"lib/bzero501162.jar zero [No source] EXACT_MATCH\n" +
+				"lib/bzero501162.jar zero [No source] EXACT_MATCH\n" +
+				"lib/bzero501162.jar zero [No source] EXACT_MATCH\n" +
+				"lib/bzero501162.jar zero [No source] EXACT_MATCH",
+			this.resultCollector);
+	}
+	finally {
+		deleteProject("JavaSearchBugs9");
+	}
+}
+public void testBug501162_022() throws Exception {
+	try {
+		IJavaProject project1 = createJavaProject("JavaSearchBugs9", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+		project1.open(null);
+		addClasspathEntry(project1, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+		String fileContent =
+			"module zerotest {\n" +
+			"    requires zero;\n" +
+			"}\n";
+		createFile("/JavaSearchBugs9/src/module-info.java",	fileContent);
+		createFolder("/JavaSearchBugs9/src/pack1");
+		createFile("/JavaSearchBugs9/src/pack1/X.java",
+				"package pack1;\n" +
+				"import pack.one.XOne;\n" +
+				"import pack.two.ITwo;\n" +
+				"public class X {\n" +
+				"    public ITwo i2;\n" +
+				"    public XOne X1;\n" +
+				"}\n");
+		addLibraryEntry(project1, "/JavaSearchBugs/lib/bzero501162.jar", false);
+		project1.close(); // sync
+		project1.open(null);
+		SearchPattern pattern = SearchPattern.createPattern("java.base",
+				IJavaSearchConstants.MODULE, IJavaSearchConstants.REFERENCES, EXACT_RULE);
+		IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaProject[]
+				{getJavaProject("JavaSearchBugs9")});
+
+		search(pattern, scope, this.resultCollector);
+
+		assertSearchResults(
+				"lib/bzero501162.jar zero [No source] EXACT_MATCH",
+			this.resultCollector);
+	}
+	finally {
+		deleteProject("JavaSearchBugs9");
+	}
+}
+public void testBug501162_023() throws Exception {
+	try {
+		IJavaProject project1 = createJavaProject("JavaSearchBugs9", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+		project1.open(null);
+		addClasspathEntry(project1, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+		String fileContent =
+			"module zerotest {\n" +
+			"    requires zero;\n" +
+			"}\n";
+		createFile("/JavaSearchBugs9/src/module-info.java",	fileContent);
+		createFolder("/JavaSearchBugs9/src/pack1");
+		createFile("/JavaSearchBugs9/src/pack1/X.java",
+				"package pack1;\n" +
+				"import pack.one.XOne;\n" +
+				"import pack.two.ITwo;\n" +
+				"public class X {\n" +
+				"    public ITwo i2;\n" +
+				"    public XOne X1;\n" +
+				"}\n");
+		addLibraryEntry(project1, "/JavaSearchBugs/lib/bzero501162.jar", false);
+		project1.close(); // sync
+		project1.open(null);
+		SearchPattern pattern = SearchPattern.createPattern("zerotest",
+				IJavaSearchConstants.MODULE, IJavaSearchConstants.REFERENCES, EXACT_RULE);
+		IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaProject[]
+				{getJavaProject("JavaSearchBugs9")});
+
+		search(pattern, scope, this.resultCollector);
+
+		assertSearchResults(
+				"lib/bzero501162.jar zero [No source] EXACT_MATCH\n" +
+				"lib/bzero501162.jar zero [No source] EXACT_MATCH",
+			this.resultCollector);
+	}
+	finally {
+		deleteProject("JavaSearchBugs9");
+	}
+}
+public void testBug501162_024() throws Exception {
+	try {
+		IJavaProject project1 = createJavaProject("JavaSearchBugs9", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+		project1.open(null);
+		addClasspathEntry(project1, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+		String fileContent =
+			"module zerotest {\n" +
+			"    requires zero;\n" +
+			"}\n";
+		createFile("/JavaSearchBugs9/src/module-info.java",	fileContent);
+		createFolder("/JavaSearchBugs9/src/pack1");
+		createFile("/JavaSearchBugs9/src/pack1/X.java",
+				"package pack1;\n" +
+				"import pack.one.XOne;\n" +
+				"import pack.two.ITwo;\n" +
+				"public class X {\n" +
+				"    public ITwo i2;\n" +
+				"    public XOne X1;\n" +
+				"}\n");
+		addLibraryEntry(project1, "/JavaSearchBugs/lib/bzero501162.jar", false);
+		project1.close(); // sync
+		project1.open(null);
+		SearchPattern pattern = SearchPattern.createPattern("first",
+				IJavaSearchConstants.MODULE, IJavaSearchConstants.REFERENCES, EXACT_RULE);
+		IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaProject[]
+				{getJavaProject("JavaSearchBugs9")});
+
+		search(pattern, scope, this.resultCollector);
+
+		assertSearchResults(
+				"lib/bzero501162.jar zero [No source] EXACT_MATCH",
+			this.resultCollector);
+	}
+	finally {
+		deleteProject("JavaSearchBugs9");
+	}
+}
+public void testBug501162_025() throws Exception {
+	try {
+		IJavaProject project1 = createJavaProject("JavaSearchBugs9", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+		project1.open(null);
+		addClasspathEntry(project1, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+		String fileContent =
+			"module zerotest {\n" +
+			"    requires zero;\n" +
+			"}\n";
+		createFile("/JavaSearchBugs9/src/module-info.java",	fileContent);
+		createFolder("/JavaSearchBugs9/src/pack1");
+		createFile("/JavaSearchBugs9/src/pack1/X.java",
+				"package pack1;\n" +
+				"import pack.one.XOne;\n" +
+				"import pack.two.ITwo;\n" +
+				"public class X {\n" +
+				"    public ITwo i2;\n" +
+				"    public XOne X1;\n" +
+				"}\n");
+		addLibraryEntry(project1, "/JavaSearchBugs/lib/bzero501162.jar", false);
+		project1.close(); // sync
+		project1.open(null);
+		SearchPattern pattern = SearchPattern.createPattern("four",
+				IJavaSearchConstants.MODULE, IJavaSearchConstants.REFERENCES, EXACT_RULE);
+		IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaProject[]
+				{getJavaProject("JavaSearchBugs9")});
+
+		search(pattern, scope, this.resultCollector);
+
+		assertSearchResults(
+				"lib/bzero501162.jar zero [No source] EXACT_MATCH",
+			this.resultCollector);
+	}
+	finally {
+		deleteProject("JavaSearchBugs9");
+	}
+}
+public void testBug501162_026() throws Exception {
+	try {
+		IJavaProject project1 = createJavaProject("JavaSearchBugs9", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+		project1.open(null);
+		addClasspathEntry(project1, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+		String fileContent =
+			"module zerotest {\n" +
+			"    requires zero;\n" +
+			"}\n";
+		createFile("/JavaSearchBugs9/src/module-info.java",	fileContent);
+		createFolder("/JavaSearchBugs9/src/pack1");
+		createFile("/JavaSearchBugs9/src/pack1/X.java",
+				"package pack1;\n" +
+				"import pack.one.XOne;\n" +
+				"import pack.two.ITwo;\n" +
+				"public class X {\n" +
+				"    public ITwo i2;\n" +
+				"    public XOne X1;\n" +
+				"}\n");
+		addLibraryEntry(project1, "/JavaSearchBugs/lib/bzero501162.jar", false);
+		project1.close(); // sync
+		project1.open(null);
+		SearchPattern pattern = SearchPattern.createPattern("nomodule",
+				IJavaSearchConstants.MODULE, IJavaSearchConstants.REFERENCES, EXACT_RULE);
+		IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaProject[]
+				{getJavaProject("JavaSearchBugs9")});
+
+		search(pattern, scope, this.resultCollector);
+
+		assertSearchResults(
+				"",
+			this.resultCollector);
+	}
+	finally {
+		deleteProject("JavaSearchBugs9");
+	}
+}
+public void testBug501162_027() throws Exception {
+	try {
+		IJavaProject project1 = createJavaProject("JavaSearchBugs9", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+		project1.open(null);
+		addClasspathEntry(project1, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+		String fileContent =
+			"module zerotest {\n" +
+			"    requires zero;\n" +
+			"}\n";
+		createFile("/JavaSearchBugs9/src/module-info.java",	fileContent);
+		createFolder("/JavaSearchBugs9/src/pack1");
+		createFile("/JavaSearchBugs9/src/pack1/X.java",
+				"package pack1;\n" +
+				"import pack.one.XOne;\n" +
+				"import pack.two.ITwo;\n" +
+				"public class X {\n" +
+				"    public ITwo i2;\n" +
+				"    public XOne X1;\n" +
+				"}\n");
+		addLibraryEntry(project1, "/JavaSearchBugs/lib/bzero501162.jar", false);
+		project1.close(); // sync
+		project1.open(null);
+		SearchPattern pattern = SearchPattern.createPattern("XOne",
+				IJavaSearchConstants.TYPE, IJavaSearchConstants.REFERENCES, EXACT_RULE);		
+		IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaProject[]
+				{getJavaProject("JavaSearchBugs9")});
+
+		search(pattern, scope, this.resultCollector);
+
+		assertSearchResults(
+				"src/pack1/X.java [XOne] EXACT_MATCH\n" + 
+				"src/pack1/X.java pack1.X.X1 [XOne] EXACT_MATCH\n" +
+				"lib/bzero501162.jar zero [No source] EXACT_MATCH",
+			this.resultCollector);
+	}
+	finally {
+		deleteProject("JavaSearchBugs9");
+	}
+}
+public void testBug501162_028() throws Exception {
+	try {
+		IJavaProject project1 = createJavaProject("JavaSearchBugs9", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+		project1.open(null);
+		addClasspathEntry(project1, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+		String fileContent =
+			"module zerotest {\n" +
+			"    requires zero;\n" +
+			"}\n";
+		createFile("/JavaSearchBugs9/src/module-info.java",	fileContent);
+		createFolder("/JavaSearchBugs9/src/pack1");
+		createFile("/JavaSearchBugs9/src/pack1/X.java",
+				"package pack1;\n" +
+				"import pack.one.XOne;\n" +
+				"import pack.two.ITwo;\n" +
+				"public class X {\n" +
+				"    public ITwo i2;\n" +
+				"    public XOne X1;\n" +
+				"}\n");
+		addLibraryEntry(project1, "/JavaSearchBugs/lib/bzero501162.jar", false);
+		project1.close(); // sync
+		project1.open(null);
+		SearchPattern pattern = SearchPattern.createPattern("XFourOne",
+				IJavaSearchConstants.TYPE, IJavaSearchConstants.REFERENCES, EXACT_RULE);
+		IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaProject[]
+				{getJavaProject("JavaSearchBugs9")});
+
+		search(pattern, scope, this.resultCollector);
+
+		assertSearchResults(
+				"lib/bzero501162.jar zero [No source] EXACT_MATCH",
+			this.resultCollector);
+	}
+	finally {
+		deleteProject("JavaSearchBugs9");
+	}
+}
+public void testBug501162_029() throws Exception {
+	try {
+		IJavaProject project1 = createJavaProject("JavaSearchBugs9", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+		project1.open(null);
+		addClasspathEntry(project1, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+		String fileContent =
+			"module zerotest {\n" +
+			"    requires zero;\n" +
+			"}\n";
+		createFile("/JavaSearchBugs9/src/module-info.java",	fileContent);
+		createFolder("/JavaSearchBugs9/src/pack1");
+		createFile("/JavaSearchBugs9/src/pack1/X.java",
+				"package pack1;\n" +
+				"import pack.one.XOne;\n" +
+				"import pack.two.ITwo;\n" +
+				"public class X {\n" +
+				"    public ITwo i2;\n" +
+				"    public XOne X1;\n" +
+				"}\n");
+		addLibraryEntry(project1, "/JavaSearchBugs/lib/bzero501162.jar", false);
+		project1.close(); // sync
+		project1.open(null);
+		SearchPattern pattern = SearchPattern.createPattern("ITwo",
+				IJavaSearchConstants.TYPE, IJavaSearchConstants.REFERENCES, EXACT_RULE);
+		IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaProject[]
+				{getJavaProject("JavaSearchBugs9")});
+
+		search(pattern, scope, this.resultCollector);
+
+		assertSearchResults(
+				"src/pack1/X.java [ITwo] EXACT_MATCH\n" +
+				"src/pack1/X.java pack1.X.i2 [ITwo] EXACT_MATCH\n" +
+				"lib/bzero501162.jar zero [No source] EXACT_MATCH",
+			this.resultCollector);
+	}
+	finally {
+		deleteProject("JavaSearchBugs9");
+	}
+}
+public void testBug501162_030() throws Exception {
+	try {
+		IJavaProject project1 = createJavaProject("JavaSearchBugs9", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+		project1.open(null);
+		addClasspathEntry(project1, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+		String fileContent =
+			"module zerotest {\n" +
+			"    requires zero;\n" +
+			"}\n";
+		createFile("/JavaSearchBugs9/src/module-info.java",	fileContent);
+		createFolder("/JavaSearchBugs9/src/pack1");
+		createFile("/JavaSearchBugs9/src/pack1/X.java",
+				"package pack1;\n" +
+				"import pack.one.XOne;\n" +
+				"import pack.two.ITwo;\n" +
+				"public class X {\n" +
+				"    public ITwo i2;\n" +
+				"    public XOne X1;\n" +
+				"}\n");
+		addLibraryEntry(project1, "/JavaSearchBugs/lib/bzero501162.jar", false);
+		project1.close(); // sync
+		project1.open(null);
+		SearchPattern pattern = SearchPattern.createPattern("IThreeOne",
+				IJavaSearchConstants.TYPE, IJavaSearchConstants.REFERENCES, EXACT_RULE);
+		IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaProject[]
+				{getJavaProject("JavaSearchBugs9")});
+
+		search(pattern, scope, this.resultCollector);
+
+		assertSearchResults(
+				"lib/bzero501162.jar zero [No source] EXACT_MATCH",
+			this.resultCollector);
+	}
+	finally {
+		deleteProject("JavaSearchBugs9");
+	}
+}
+public void testBug501162_031() throws Exception {
+	try {
+		IJavaProject project1 = createJavaProject("JavaSearchBugs9", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+		project1.open(null);
+		addClasspathEntry(project1, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+		String fileContent =
+			"module zerotest {\n" +
+			"    requires zero;\n" +
+			"}\n";
+		createFile("/JavaSearchBugs9/src/module-info.java",	fileContent);
+		createFolder("/JavaSearchBugs9/src/pack1");
+		createFile("/JavaSearchBugs9/src/pack1/X.java",
+				"package pack1;\n" +
+				"import pack.one.XOne;\n" +
+				"import pack.two.ITwo;\n" +
+				"public class X {\n" +
+				"    public ITwo i2;\n" +
+				"    public XOne X1;\n" +
+				"}\n");
+		addLibraryEntry(project1, "/JavaSearchBugs/lib/bzero501162.jar", false);
+		project1.close(); // sync
+		project1.open(null);
+		SearchPattern pattern = SearchPattern.createPattern("XThreeOne",
+				IJavaSearchConstants.TYPE, IJavaSearchConstants.REFERENCES, EXACT_RULE);
+		IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaProject[]
+				{getJavaProject("JavaSearchBugs9")});
+
+		search(pattern, scope, this.resultCollector);
+
+		assertSearchResults(
+				"lib/bzero501162.jar zero [No source] EXACT_MATCH",
+			this.resultCollector);
+	}
+	finally {
+		deleteProject("JavaSearchBugs9");
+	}
+}
+public void testBug501162_032() throws Exception {
+	try {
+		IJavaProject project1 = createJavaProject("JavaSearchBugs9", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+		project1.open(null);
+		addClasspathEntry(project1, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+		String fileContent =
+			"module zerotest {\n" +
+			"    requires zero;\n" +
+			"}\n";
+		createFile("/JavaSearchBugs9/src/module-info.java",	fileContent);
+		createFolder("/JavaSearchBugs9/src/pack1");
+		createFile("/JavaSearchBugs9/src/pack1/X.java",
+				"package pack1;\n" +
+				"import pack.one.XOne;\n" +
+				"import pack.two.ITwo;\n" +
+				"public class X {\n" +
+				"    public ITwo i2;\n" +
+				"    public XOne X1;\n" +
+				"}\n");
+		addLibraryEntry(project1, "/JavaSearchBugs/lib/bzero501162.jar", false);
+		project1.close(); // sync
+		project1.open(null);
+		SearchPattern pattern = SearchPattern.createPattern("zero",
+				IJavaSearchConstants.MODULE, IJavaSearchConstants.DECLARATIONS, EXACT_RULE);
+		IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaProject[]
+				{getJavaProject("JavaSearchBugs9")});
+
+		search(pattern, scope, this.resultCollector);
+
+		assertSearchResults(
+				"lib/bzero501162.jar zero [No source] EXACT_MATCH",
+			this.resultCollector);
+	}
+	finally {
+		deleteProject("JavaSearchBugs9");
+	}
+}
+public void testBug501162_033() throws Exception {
+	try {
+		IJavaProject project1 = createJavaProject("JavaSearchBugs9", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+		project1.open(null);
+		addClasspathEntry(project1, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+		String fileContent =
+			"module zerotest {\n" +
+			"    requires zero;\n" +
+			"}\n";
+		createFile("/JavaSearchBugs9/src/module-info.java",	fileContent);
+		createFolder("/JavaSearchBugs9/src/pack1");
+		createFile("/JavaSearchBugs9/src/pack1/X.java",
+				"package pack1;\n" +
+				"import pack.one.XOne;\n" +
+				"import pack.two.ITwo;\n" +
+				"public class X {\n" +
+				"    public ITwo i2;\n" +
+				"    public XOne X1;\n" +
+				"}\n");
+		addLibraryEntry(project1, "/JavaSearchBugs/lib/bzero.src.501162.jar", false);
+		project1.close(); // sync
+		project1.open(null);
+		SearchPattern pattern = SearchPattern.createPattern("pack.one",
+				IJavaSearchConstants.PACKAGE, IJavaSearchConstants.REFERENCES, EXACT_RULE);
+		IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaProject[]
+				{getJavaProject("JavaSearchBugs9")});
+
+		search(pattern, scope, this.resultCollector);
+
+		assertSearchResults(
+				"src/pack1/X.java [pack.one] EXACT_MATCH\n" +
+				"lib/bzero.src.501162.jar zero EXACT_MATCH\n" +
+				"lib/bzero.src.501162.jar zero EXACT_MATCH",
+			this.resultCollector);
+	}
+	finally {
+		deleteProject("JavaSearchBugs9");
+	}
+}
+public void testBug501162_034() throws Exception {
+	try {
+		IJavaProject project1 = createJavaProject("JavaSearchBugs9", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+		project1.open(null);
+		addClasspathEntry(project1, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+		String fileContent =
+			"module zerotest {\n" +
+			"    requires zero;\n" +
+			"}\n";
+		createFile("/JavaSearchBugs9/src/module-info.java",	fileContent);
+		createFolder("/JavaSearchBugs9/src/pack1");
+		createFile("/JavaSearchBugs9/src/pack1/X.java",
+				"package pack1;\n" +
+				"import pack.one.XOne;\n" +
+				"import pack.two.ITwo;\n" +
+				"public class X {\n" +
+				"    public ITwo i2;\n" +
+				"    public XOne X1;\n" +
+				"}\n");
+		addLibraryEntry(project1, "/JavaSearchBugs/lib/bzero.src.501162.jar", false);
+		project1.close(); // sync
+		project1.open(null);
+		SearchPattern pattern = SearchPattern.createPattern("pack.two",
+				IJavaSearchConstants.PACKAGE, IJavaSearchConstants.REFERENCES, EXACT_RULE);
+		IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaProject[]
+				{getJavaProject("JavaSearchBugs9")});
+
+		search(pattern, scope, this.resultCollector);
+
+		assertSearchResults(
+				"src/pack1/X.java [pack.two] EXACT_MATCH\n" +
+				"lib/bzero.src.501162.jar zero EXACT_MATCH\n" +
+				"lib/bzero.src.501162.jar zero EXACT_MATCH\n" +
+				"lib/bzero.src.501162.jar zero EXACT_MATCH",
+			this.resultCollector);
+	}
+	finally {
+		deleteProject("JavaSearchBugs9");
+	}
+}
+public void testBug501162_035() throws Exception {
+	try {
+		IJavaProject project1 = createJavaProject("JavaSearchBugs9", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+		project1.open(null);
+		addClasspathEntry(project1, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+		String fileContent =
+			"module zerotest {\n" +
+			"    requires zero;\n" +
+			"}\n";
+		createFile("/JavaSearchBugs9/src/module-info.java",	fileContent);
+		createFolder("/JavaSearchBugs9/src/pack1");
+		createFile("/JavaSearchBugs9/src/pack1/X.java",
+				"package pack1;\n" +
+				"import pack.one.XOne;\n" +
+				"import pack.two.ITwo;\n" +
+				"public class X {\n" +
+				"    public ITwo i2;\n" +
+				"    public XOne X1;\n" +
+				"}\n");
+		addLibraryEntry(project1, "/JavaSearchBugs/lib/bzero.src.501162.jar", false);
+		project1.close(); // sync
+		project1.open(null);
+		SearchPattern pattern = SearchPattern.createPattern("pack.three",
+				IJavaSearchConstants.PACKAGE, IJavaSearchConstants.REFERENCES, EXACT_RULE);
+		IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaProject[]
+				{getJavaProject("JavaSearchBugs9")});
+
+		search(pattern, scope, this.resultCollector);
+
+		assertSearchResults(
+				"lib/bzero.src.501162.jar zero EXACT_MATCH\n" +
+				"lib/bzero.src.501162.jar zero EXACT_MATCH\n" +
+				"lib/bzero.src.501162.jar zero EXACT_MATCH\n" +
+				"lib/bzero.src.501162.jar zero EXACT_MATCH",
+			this.resultCollector);
+	}
+	finally {
+		deleteProject("JavaSearchBugs9");
+	}
+}
+public void _testBug501162_036() throws Exception {
+	try {
+		IJavaProject project1 = createJavaProject("JavaSearchBugs9", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+		project1.open(null);
+		addClasspathEntry(project1, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+		String fileContent =
+			"module zerotest {\n" +
+			"    requires zero;\n" +
+			"}\n";
+		createFile("/JavaSearchBugs9/src/module-info.java",	fileContent);
+		createFolder("/JavaSearchBugs9/src/pack1");
+		createFile("/JavaSearchBugs9/src/pack1/X.java",
+				"package pack1;\n" +
+				"import pack.one.XOne;\n" +
+				"import pack.two.ITwo;\n" +
+				"public class X {\n" +
+				"    public ITwo i2;\n" +
+				"    public XOne X1;\n" +
+				"}\n");
+		addLibraryEntry(project1, "/JavaSearchBugs/lib/bzero.src.501162.jar", false);
+		project1.close(); // sync
+		project1.open(null);
+		SearchPattern pattern = SearchPattern.createPattern("java.base",
+				IJavaSearchConstants.MODULE, IJavaSearchConstants.REFERENCES, EXACT_RULE);
+		IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaProject[]
+				{getJavaProject("JavaSearchBugs9")});
+
+		search(pattern, scope, this.resultCollector);
+
+		assertSearchResults(
+				"lib/bzero.src.501162.jar zero [No source] EXACT_MATCH",
+			this.resultCollector);
+	}
+	finally {
+		deleteProject("JavaSearchBugs9");
+	}
+}
+public void testBug501162_037() throws Exception {
+	try {
+		IJavaProject project1 = createJavaProject("JavaSearchBugs9", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+		project1.open(null);
+		addClasspathEntry(project1, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+		String fileContent =
+			"module zerotest {\n" +
+			"    requires zero;\n" +
+			"}\n";
+		createFile("/JavaSearchBugs9/src/module-info.java",	fileContent);
+		createFolder("/JavaSearchBugs9/src/pack1");
+		createFile("/JavaSearchBugs9/src/pack1/X.java",
+				"package pack1;\n" +
+				"import pack.one.XOne;\n" +
+				"import pack.two.ITwo;\n" +
+				"public class X {\n" +
+				"    public ITwo i2;\n" +
+				"    public XOne X1;\n" +
+				"}\n");
+		addLibraryEntry(project1, "/JavaSearchBugs/lib/bzero.src.501162.jar", false);
+		project1.close(); // sync
+		project1.open(null);
+		SearchPattern pattern = SearchPattern.createPattern("zerotest",
+				IJavaSearchConstants.MODULE, IJavaSearchConstants.REFERENCES, EXACT_RULE);
+		IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaProject[]
+				{getJavaProject("JavaSearchBugs9")});
+
+		search(pattern, scope, this.resultCollector);
+
+		assertSearchResults(
+				"lib/bzero.src.501162.jar zero EXACT_MATCH\n" +
+				"lib/bzero.src.501162.jar zero EXACT_MATCH",
+			this.resultCollector);
+	}
+	finally {
+		deleteProject("JavaSearchBugs9");
+	}
+}
+public void testBug501162_038() throws Exception {
+	try {
+		IJavaProject project1 = createJavaProject("JavaSearchBugs9", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+		project1.open(null);
+		addClasspathEntry(project1, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+		String fileContent =
+			"module zerotest {\n" +
+			"    requires zero;\n" +
+			"}\n";
+		createFile("/JavaSearchBugs9/src/module-info.java",	fileContent);
+		createFolder("/JavaSearchBugs9/src/pack1");
+		createFile("/JavaSearchBugs9/src/pack1/X.java",
+				"package pack1;\n" +
+				"import pack.one.XOne;\n" +
+				"import pack.two.ITwo;\n" +
+				"public class X {\n" +
+				"    public ITwo i2;\n" +
+				"    public XOne X1;\n" +
+				"}\n");
+		addLibraryEntry(project1, "/JavaSearchBugs/lib/bzero.src.501162.jar", false);
+		project1.close(); // sync
+		project1.open(null);
+		SearchPattern pattern = SearchPattern.createPattern("first",
+				IJavaSearchConstants.MODULE, IJavaSearchConstants.REFERENCES, EXACT_RULE);
+		IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaProject[]
+				{getJavaProject("JavaSearchBugs9")});
+
+		search(pattern, scope, this.resultCollector);
+
+		assertSearchResults(
+				"lib/bzero.src.501162.jar zero EXACT_MATCH",
+			this.resultCollector);
+	}
+	finally {
+		deleteProject("JavaSearchBugs9");
+	}
+}
+public void testBug501162_039() throws Exception {
+	try {
+		IJavaProject project1 = createJavaProject("JavaSearchBugs9", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+		project1.open(null);
+		addClasspathEntry(project1, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+		String fileContent =
+			"module zerotest {\n" +
+			"    requires zero;\n" +
+			"}\n";
+		createFile("/JavaSearchBugs9/src/module-info.java",	fileContent);
+		createFolder("/JavaSearchBugs9/src/pack1");
+		createFile("/JavaSearchBugs9/src/pack1/X.java",
+				"package pack1;\n" +
+				"import pack.one.XOne;\n" +
+				"import pack.two.ITwo;\n" +
+				"public class X {\n" +
+				"    public ITwo i2;\n" +
+				"    public XOne X1;\n" +
+				"}\n");
+		addLibraryEntry(project1, "/JavaSearchBugs/lib/bzero.src.501162.jar", false);
+		project1.close(); // sync
+		project1.open(null);
+		SearchPattern pattern = SearchPattern.createPattern("four",
+				IJavaSearchConstants.MODULE, IJavaSearchConstants.REFERENCES, EXACT_RULE);
+		IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaProject[]
+				{getJavaProject("JavaSearchBugs9")});
+
+		search(pattern, scope, this.resultCollector);
+
+		assertSearchResults(
+				"lib/bzero.src.501162.jar zero EXACT_MATCH",
+			this.resultCollector);
+	}
+	finally {
+		deleteProject("JavaSearchBugs9");
+	}
+}
+public void testBug501162_040() throws Exception {
+	try {
+		IJavaProject project1 = createJavaProject("JavaSearchBugs9", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+		project1.open(null);
+		addClasspathEntry(project1, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+		String fileContent =
+			"module zerotest {\n" +
+			"    requires zero;\n" +
+			"}\n";
+		createFile("/JavaSearchBugs9/src/module-info.java",	fileContent);
+		createFolder("/JavaSearchBugs9/src/pack1");
+		createFile("/JavaSearchBugs9/src/pack1/X.java",
+				"package pack1;\n" +
+				"import pack.one.XOne;\n" +
+				"import pack.two.ITwo;\n" +
+				"public class X {\n" +
+				"    public ITwo i2;\n" +
+				"    public XOne X1;\n" +
+				"}\n");
+		addLibraryEntry(project1, "/JavaSearchBugs/lib/bzero.src.501162.jar", false);
+		project1.close(); // sync
+		project1.open(null);
+		SearchPattern pattern = SearchPattern.createPattern("nomodule",
+				IJavaSearchConstants.MODULE, IJavaSearchConstants.REFERENCES, EXACT_RULE);
+		IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaProject[]
+				{getJavaProject("JavaSearchBugs9")});
+
+		search(pattern, scope, this.resultCollector);
+
+		assertSearchResults(
+				"",
+			this.resultCollector);
+	}
+	finally {
+		deleteProject("JavaSearchBugs9");
+	}
+}
+public void testBug501162_041() throws Exception {
+	try {
+		IJavaProject project1 = createJavaProject("JavaSearchBugs9", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+		project1.open(null);
+		addClasspathEntry(project1, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+		String fileContent =
+			"module zerotest {\n" +
+			"    requires zero;\n" +
+			"}\n";
+		createFile("/JavaSearchBugs9/src/module-info.java",	fileContent);
+		createFolder("/JavaSearchBugs9/src/pack1");
+		createFile("/JavaSearchBugs9/src/pack1/X.java",
+				"package pack1;\n" +
+				"import pack.one.XOne;\n" +
+				"import pack.two.ITwo;\n" +
+				"public class X {\n" +
+				"    public ITwo i2;\n" +
+				"    public XOne X1;\n" +
+				"}\n");
+		addLibraryEntry(project1, "/JavaSearchBugs/lib/bzero.src.501162.jar", false);
+		project1.close(); // sync
+		project1.open(null);
+		SearchPattern pattern = SearchPattern.createPattern("XOne",
+				IJavaSearchConstants.TYPE, IJavaSearchConstants.REFERENCES, EXACT_RULE);		
+		IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaProject[]
+				{getJavaProject("JavaSearchBugs9")});
+
+		search(pattern, scope, this.resultCollector);
+
+		assertSearchResults(
+				"src/pack1/X.java [XOne] EXACT_MATCH\n" + 
+				"src/pack1/X.java pack1.X.X1 [XOne] EXACT_MATCH\n" +
+				"lib/bzero.src.501162.jar zero EXACT_MATCH",
+			this.resultCollector);
+	}
+	finally {
+		deleteProject("JavaSearchBugs9");
+	}
+}
+public void testBug501162_042() throws Exception {
+	try {
+		IJavaProject project1 = createJavaProject("JavaSearchBugs9", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+		project1.open(null);
+		addClasspathEntry(project1, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+		String fileContent =
+			"module zerotest {\n" +
+			"    requires zero;\n" +
+			"}\n";
+		createFile("/JavaSearchBugs9/src/module-info.java",	fileContent);
+		createFolder("/JavaSearchBugs9/src/pack1");
+		createFile("/JavaSearchBugs9/src/pack1/X.java",
+				"package pack1;\n" +
+				"import pack.one.XOne;\n" +
+				"import pack.two.ITwo;\n" +
+				"public class X {\n" +
+				"    public ITwo i2;\n" +
+				"    public XOne X1;\n" +
+				"}\n");
+		addLibraryEntry(project1, "/JavaSearchBugs/lib/bzero.src.501162.jar", false);
+		project1.close(); // sync
+		project1.open(null);
+		SearchPattern pattern = SearchPattern.createPattern("XFourOne",
+				IJavaSearchConstants.TYPE, IJavaSearchConstants.REFERENCES, EXACT_RULE);
+		IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaProject[]
+				{getJavaProject("JavaSearchBugs9")});
+
+		search(pattern, scope, this.resultCollector);
+
+		assertSearchResults(
+				"lib/bzero.src.501162.jar zero EXACT_MATCH",
+			this.resultCollector);
+	}
+	finally {
+		deleteProject("JavaSearchBugs9");
+	}
+}
+public void testBug501162_043() throws Exception {
+	try {
+		IJavaProject project1 = createJavaProject("JavaSearchBugs9", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+		project1.open(null);
+		addClasspathEntry(project1, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+		String fileContent =
+			"module zerotest {\n" +
+			"    requires zero;\n" +
+			"}\n";
+		createFile("/JavaSearchBugs9/src/module-info.java",	fileContent);
+		createFolder("/JavaSearchBugs9/src/pack1");
+		createFile("/JavaSearchBugs9/src/pack1/X.java",
+				"package pack1;\n" +
+				"import pack.one.XOne;\n" +
+				"import pack.two.ITwo;\n" +
+				"public class X {\n" +
+				"    public ITwo i2;\n" +
+				"    public XOne X1;\n" +
+				"}\n");
+		addLibraryEntry(project1, "/JavaSearchBugs/lib/bzero.src.501162.jar", false);
+		project1.close(); // sync
+		project1.open(null);
+		SearchPattern pattern = SearchPattern.createPattern("ITwo",
+				IJavaSearchConstants.TYPE, IJavaSearchConstants.REFERENCES, EXACT_RULE);
+		IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaProject[]
+				{getJavaProject("JavaSearchBugs9")});
+
+		search(pattern, scope, this.resultCollector);
+
+		assertSearchResults(
+				"src/pack1/X.java [ITwo] EXACT_MATCH\n" +
+				"src/pack1/X.java pack1.X.i2 [ITwo] EXACT_MATCH\n" +
+				"lib/bzero.src.501162.jar zero EXACT_MATCH\n" + 
+				"lib/bzero.src.501162.jar pack.one.XOne EXACT_MATCH\n" +
+				"lib/bzero.src.501162.jar pack.one.XOne.itwo EXACT_MATCH\n" +
+				"lib/bzero.src.501162.jar pack.two.XTwo EXACT_MATCH",
+			this.resultCollector);
+	}
+	finally {
+		deleteProject("JavaSearchBugs9");
+	}
+}
+public void testBug501162_044() throws Exception {
+	try {
+		IJavaProject project1 = createJavaProject("JavaSearchBugs9", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+		project1.open(null);
+		addClasspathEntry(project1, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+		String fileContent =
+			"module zerotest {\n" +
+			"    requires zero;\n" +
+			"}\n";
+		createFile("/JavaSearchBugs9/src/module-info.java",	fileContent);
+		createFolder("/JavaSearchBugs9/src/pack1");
+		createFile("/JavaSearchBugs9/src/pack1/X.java",
+				"package pack1;\n" +
+				"import pack.one.XOne;\n" +
+				"import pack.two.ITwo;\n" +
+				"public class X {\n" +
+				"    public ITwo i2;\n" +
+				"    public XOne X1;\n" +
+				"}\n");
+		addLibraryEntry(project1, "/JavaSearchBugs/lib/bzero.src.501162.jar", false);
+		project1.close(); // sync
+		project1.open(null);
+		SearchPattern pattern = SearchPattern.createPattern("IThreeOne",
+				IJavaSearchConstants.TYPE, IJavaSearchConstants.REFERENCES, EXACT_RULE);
+		IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaProject[]
+				{getJavaProject("JavaSearchBugs9")});
+
+		search(pattern, scope, this.resultCollector);
+
+		assertSearchResults(
+				"lib/bzero.src.501162.jar zero EXACT_MATCH\n" +
+				"lib/bzero.src.501162.jar pack.three.XThreeOne EXACT_MATCH",
+			this.resultCollector);
+	}
+	finally {
+		deleteProject("JavaSearchBugs9");
+	}
+}
+public void testBug501162_045() throws Exception {
+	try {
+		IJavaProject project1 = createJavaProject("JavaSearchBugs9", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+		project1.open(null);
+		addClasspathEntry(project1, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+		String fileContent =
+			"module zerotest {\n" +
+			"    requires zero;\n" +
+			"}\n";
+		createFile("/JavaSearchBugs9/src/module-info.java",	fileContent);
+		createFolder("/JavaSearchBugs9/src/pack1");
+		createFile("/JavaSearchBugs9/src/pack1/X.java",
+				"package pack1;\n" +
+				"import pack.one.XOne;\n" +
+				"import pack.two.ITwo;\n" +
+				"public class X {\n" +
+				"    public ITwo i2;\n" +
+				"    public XOne X1;\n" +
+				"}\n");
+		addLibraryEntry(project1, "/JavaSearchBugs/lib/bzero.src.501162.jar", false);
+		project1.close(); // sync
+		project1.open(null);
+		SearchPattern pattern = SearchPattern.createPattern("XThreeOne",
+				IJavaSearchConstants.TYPE, IJavaSearchConstants.REFERENCES, EXACT_RULE);
+		IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaProject[]
+				{getJavaProject("JavaSearchBugs9")});
+
+		search(pattern, scope, this.resultCollector);
+
+		assertSearchResults(
+				"lib/bzero.src.501162.jar zero EXACT_MATCH",
+			this.resultCollector);
+	}
+	finally {
+		deleteProject("JavaSearchBugs9");
+	}
+}
+public void testBug501162_046() throws Exception {
+	try {
+		IJavaProject project1 = createJavaProject("JavaSearchBugs9", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+		project1.open(null);
+		addClasspathEntry(project1, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+		String fileContent =
+			"module zerotest {\n" +
+			"    requires zero;\n" +
+			"}\n";
+		createFile("/JavaSearchBugs9/src/module-info.java",	fileContent);
+		createFolder("/JavaSearchBugs9/src/pack1");
+		createFile("/JavaSearchBugs9/src/pack1/X.java",
+				"package pack1;\n" +
+				"import pack.one.XOne;\n" +
+				"import pack.two.ITwo;\n" +
+				"public class X {\n" +
+				"    public ITwo i2;\n" +
+				"    public XOne X1;\n" +
+				"}\n");
+		addLibraryEntry(project1, "/JavaSearchBugs/lib/bzero.src.501162.jar", false);
+		project1.close(); // sync
+		project1.open(null);
+		SearchPattern pattern = SearchPattern.createPattern("zero",
+				IJavaSearchConstants.MODULE, IJavaSearchConstants.DECLARATIONS, EXACT_RULE);
+		IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaProject[]
+				{getJavaProject("JavaSearchBugs9")});
+
+		search(pattern, scope, this.resultCollector);
+
+		assertSearchResults(
+				"lib/bzero.src.501162.jar zero EXACT_MATCH",
+			this.resultCollector);
+	}
+	finally {
+		deleteProject("JavaSearchBugs9");
+	}
+}
+public void _testBug501162_047() throws Exception {
+	try {
+		IJavaProject project1 = createJavaProject("JavaSearchBugs9", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+		project1.open(null);
+		addClasspathEntry(project1, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+		String fileContent =
+				"package pack.top;\n" +
+				"import pack.first.Y;\n" +
+				"//import pack.first.second.Z;\n" +
+				"\n" +
+				"public class X {\n" +
+				"	public Y y;\n" +
+				"	//public Z z;\n" +
+				"}\n";
+		createFolder("/JavaSearchBugs9/src/top");
+		createFile("/JavaSearchBugs9/src/top/X.java",	fileContent);
+		project1.close(); // sync
+		project1.open(null);
+
+		IJavaProject project2 = createJavaProject("split.first", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+		project2.open(null);
+		addClasspathEntry(project2, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+		String file = 
+				"module split.first {\n" +
+				"    exports  pack.first;\n" +
+				"}\n";
+		createFile("/split.first/src/module-info.java",	file);
+		createFolder("/split.first/src/pack");
+		createFolder("/split.first/src/pack/first");
+		createFile("/split.first/src/pack/first/Y.java",
+				"package pack.first;\n" +
+				"public class Y{}\n");
+		addClasspathEntry(project1, JavaCore.newProjectEntry(project2.getPath()));
+
+		IJavaProject project3 = createJavaProject("split.second", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+		project3.open(null);
+		file = 
+				"module split.second {\n" +
+				"    exports  pack.first.second;\n" +
+				"}\n";
+		createFile("/split.second/src/module-info.java", file);
+		createFolder("/split.second/src/pack");
+		createFolder("/split.second/src/pack/first");
+		createFolder("/split.second/src/pack/first/second");
+		createFile("/split.second/src/pack/first/second/Z.java",
+				"package pack.first.second;\n" +
+				"public class Z{}\n");
+		addClasspathEntry(project1, JavaCore.newProjectEntry(project3.getPath()));
+
+		project1.close(); // sync
+		project2.close();
+		project3.close();
+		project3.open(null);
+		project2.open(null);
+		project1.open(null);
+		SearchPattern pattern = SearchPattern.createPattern("pack.first.Y",
+				IJavaSearchConstants.TYPE, IJavaSearchConstants.REFERENCES, EXACT_RULE);
+		IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaProject[]
+				{getJavaProject("JavaSearchBugs9")});
+		search(pattern, scope, this.resultCollector);
+
+		assertSearchResults(
+				"src/top/X.java [pack.first.Y] EXACT_MATCH\n" +
+				"src/top/X.java pack.top.X.y [Y] EXACT_MATCH",
+			this.resultCollector);
+	}
+	finally {
+		deleteProject("JavaSearchBugs9");
+		deleteProject("split.first");
+		deleteProject("split.second");
+	}
+}
+public void testBug519211_001() throws CoreException {
+	try {
+
+		IJavaProject project1 = createJavaProject("JavaSearchBugs9", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+		project1.open(null);
+		addClasspathEntry(project1, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+		String fileContent =
+			"module first {\n" +
+			"    requires second;" +
+			"    provides pack22.I22 with pack1.X11;" +
+			"}\n";
+		createFile("/JavaSearchBugs9/src/module-info.java",	fileContent);
+		createFolder("/JavaSearchBugs9/src/pack1");
+		createFile("/JavaSearchBugs9/src/pack1/X11.java",
+				"package pack1;\n" +
+				"public class X11 implements pack22.I22{}\n");
+
+		IJavaProject project2 = createJavaProject("second", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+		project2.open(null);
+		addClasspathEntry(project2, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+		String secondFile = 
+				"module second {\n" +
+				"    exports pack22 to first;\n" +
+				"}\n";
+		createFile("/second/src/module-info.java",	secondFile);
+		createFolder("/second/src/pack1");
+		createFile("/second/src/pack1/I22.java",
+				"package pack22;\n" +
+				"public interface I22 {}\n");
+
+		addClasspathEntry(project1, JavaCore.newProjectEntry(project2.getPath()));
+		project1.close(); // sync
+		project2.close();
+		project2.open(null);
+		project1.open(null);
+
+		ICompilationUnit unit = getCompilationUnit("/JavaSearchBugs9/src/module-info.java");
+		String modName = "first";
+		int start = fileContent.indexOf(modName);
+		IJavaElement[] elements = unit.codeSelect(start, modName.length());
+		IJavaSearchScope scope = SearchEngine.createWorkspaceScope();
+		search(elements[0], REFERENCES, scope,	this.resultCollector);
+
+		assertSearchResults(
+				"src/module-info.java second [first] EXACT_MATCH",
+			this.resultCollector);
+	}
+	finally {
+		deleteProject("JavaSearchBugs9");
+		deleteProject("second");
+	}
+}
+public void testBug519980_001() throws Exception {
+	try {
+
+		IJavaProject project1 = createJavaProject("JavaSearchBugs9", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+		project1.open(null);
+		addClasspathEntry(project1, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+		String fileContent = 
+			"module first {\n" +
+			"    requires second;" +
+			"    provides pack22.I22 with pack1.X11;" +
+			"}\n";
+		createFile("/JavaSearchBugs9/src/module-info.java",	fileContent);
+		createFolder("/JavaSearchBugs9/src/pack1");
+		createFile("/JavaSearchBugs9/src/pack1/X11.java",
+				"package pack1;\n" +
+				"public class X11 implements pack22.I22{}\n");
+
+		IJavaProject project2 = createJavaProject("second", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+		project2.open(null);
+		addClasspathEntry(project2, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+		String secondFile = 
+				"module second {\n" +
+				"    exports pack22 to first;\n" +
+				"}\n";
+		createFile("/second/src/module-info.java",	secondFile);
+		createFolder("/second/src/pack22");
+		createFile("/second/src/pack22/I22.java",
+				"package pack22;\n" +
+				"public interface I22 {}\n");
+
+		addClasspathEntry(project1, JavaCore.newProjectEntry(project2.getPath()));
+		project1.close(); // sync
+		project2.close();
+		project2.open(null);
+		project1.open(null);
+
+		SearchPattern pattern = SearchPattern.createPattern("pack1.X11", IJavaSearchConstants.CLASS, REFERENCES, ERASURE_RULE);
+		IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaProject[] 
+				{getJavaProject("JavaSearchBugs9"), getJavaProject("second")});
+		search(pattern, scope, this.resultCollector);
+		assertSearchResults("src/module-info.java first [pack1.X11] EXACT_MATCH",
+			this.resultCollector);
+	}
+	finally {
+		deleteProject("JavaSearchBugs9");
+		deleteProject("second");
+	}
+}
+public void testBug519980_002() throws Exception {
+	try {
+
+		IJavaProject project1 = createJavaProject("JavaSearchBugs9", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+		project1.open(null);
+		addClasspathEntry(project1, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+		String fileContent = 
+			"module first {\n" +
+			"    requires second;" +
+			"    provides pack22.I22 with pack1.X11;" +
+			"}\n";
+		createFile("/JavaSearchBugs9/src/module-info.java",	fileContent);
+		createFolder("/JavaSearchBugs9/src/pack1");
+		createFile("/JavaSearchBugs9/src/pack1/X11.java",
+				"package pack1;\n" +
+				"public class X11 implements pack22.I22{}\n");
+
+		IJavaProject project2 = createJavaProject("second", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+		project2.open(null);
+		addClasspathEntry(project2, JavaCore.newContainerEntry(new Path("org.eclipse.jdt.MODULE_PATH")));
+		String secondFile = 
+				"module second {\n" +
+				"    exports pack22 to first;\n" +
+				"}\n";
+		createFile("/second/src/module-info.java",	secondFile);
+		createFolder("/second/src/pack22");
+		createFile("/second/src/pack22/I22.java",
+				"package pack22;\n" +
+				"public interface I22 {}\n");
+
+		addClasspathEntry(project1, JavaCore.newProjectEntry(project2.getPath()));
+		project1.close(); // sync
+		project2.close();
+		project2.open(null);
+		project1.open(null);
+
+		SearchPattern pattern = SearchPattern.createPattern("pack22.I22", IJavaSearchConstants.INTERFACE, REFERENCES, ERASURE_RULE);
+		IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaProject[] 
+				{getJavaProject("JavaSearchBugs9"), getJavaProject("second")});
+		search(pattern, scope, this.resultCollector);
+		assertSearchResults(		"src/module-info.java first [pack22.I22] EXACT_MATCH\n" + 
+				"src/pack1/X11.java pack1.X11 [pack22.I22] EXACT_MATCH",
+			this.resultCollector);
+	}
+	finally {
+		deleteProject("JavaSearchBugs9");
+		deleteProject("second");
+	}
+}
+public void testBug520477_001() throws Exception {
+	try {
+
+		IJavaProject project1 = createJavaProject("JavaSearchBugs9", new String[] {"src", "src2"}, new String[] {"JCL19_LIB"}, "bin", "9");
+		project1.open(null);
+		String fileContent =
+			"module first {\n" +
+			"    exports pack1;\n" +
+			"}\n";
+		createFile("/JavaSearchBugs9/src/module-info.java",	fileContent);
+		createFile("/JavaSearchBugs9/src/X.java",
+				"public class X {\n" +
+				"    pack1.C C;\n" +
+				"}\n"
+		);
+		createFolder("/JavaSearchBugs9/src2/pack1");
+		createFile("/JavaSearchBugs9/src2/pack1/C.java",
+				"package pack1;\n" +
+				"public class C {\n" +
+				"}\n"
+		);
+
+		SearchPattern pattern = SearchPattern.createPattern("pack1", IJavaSearchConstants.PACKAGE, REFERENCES, EXACT_RULE);
+		IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaProject[]
+				{getJavaProject("JavaSearchBugs9")});
+		search(pattern, scope, this.resultCollector);
+		assertSearchResults(
+				"src/X.java X.C [pack1] EXACT_MATCH\n" +
+				"src/module-info.java first [pack1] EXACT_MATCH",
+			this.resultCollector);
+	}
+	finally {
+		deleteProject("JavaSearchBugs9");
+	}
+}
+public void testBug521221_001() throws Exception {
+	try {
+
+		IJavaProject project1 = createJavaProject("JavaSearchBugs9", new String[] {"src"}, new String[] {"JCL19_LIB"}, "bin", "9");
+		Map<String, String> options = project1.getOptions(false);
+		options.put(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_1_8);
+		project1.setOptions(options);
+		project1.open(null);
+		createFolder("/JavaSearchBugs9/src/pack11");
+		String fileContent = "package pack11;\n" +
+				"public class X11 implements pack22.I22 {\n" +
+				"}\n";
+
+		createFile("/JavaSearchBugs9/src/pack11/X11.java", fileContent);
+		createFolder("/JavaSearchBugs9/src/pack12");
+		createFile("/JavaSearchBugs9/src/pack12/X12.java",
+				"package pack12;\n" +
+				"public class X12 extends pack11.X11 implements pack22.I22 {\n" +
+				"}\n"
+		);
+		ICompilationUnit unit = getCompilationUnit("/JavaSearchBugs9/src/pack11/X11.java");
+		String x11 = "X11";
+		int start = fileContent.indexOf(x11);
+		IJavaElement[] elements = unit.codeSelect(start, x11.length());
+		IJavaSearchScope scope = SearchEngine.createWorkspaceScope();
+		search(elements[0], REFERENCES, scope,	this.resultCollector);
+	} catch (NullPointerException e) {
+		assertFalse(true);
+	}
+	finally {
+		deleteProject("JavaSearchBugs9");
+	}
+}
+// Add more tests here
+}
\ No newline at end of file
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaSearchBugsTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaSearchBugsTests.java
index 47b234c..cb33277 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaSearchBugsTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaSearchBugsTests.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 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
@@ -34,7 +34,6 @@
 import org.eclipse.core.runtime.Platform;
 import org.eclipse.core.runtime.content.IContentType;
 import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jdt.core.IClassFile;
 import org.eclipse.jdt.core.IClasspathContainer;
 import org.eclipse.jdt.core.IClasspathEntry;
 import org.eclipse.jdt.core.ICompilationUnit;
@@ -45,6 +44,7 @@
 import org.eclipse.jdt.core.IJavaProject;
 import org.eclipse.jdt.core.ILocalVariable;
 import org.eclipse.jdt.core.IMethod;
+import org.eclipse.jdt.core.IOrdinaryClassFile;
 import org.eclipse.jdt.core.IPackageDeclaration;
 import org.eclipse.jdt.core.IPackageFragment;
 import org.eclipse.jdt.core.IPackageFragmentRoot;
@@ -3533,10 +3533,10 @@
  * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=95152"
  */
 public void testBug95152_jar01() throws CoreException {
-	IType type = getPackageFragment("JavaSearchBugs", "lib/b95152.jar", "b95152").getClassFile("T1$T12.class").getType();
+	IType type = getPackageFragment("JavaSearchBugs", "lib/b95152.jar", "b95152").getOrdinaryClassFile("T1$T12.class").getType();
 	// search constructor first level member
 	search(type.getMethods()[0], REFERENCES);
-	type = getPackageFragment("JavaSearchBugs", "lib/b95152.jar", "b95152").getClassFile("T1$T12$T13.class").getType();
+	type = getPackageFragment("JavaSearchBugs", "lib/b95152.jar", "b95152").getOrdinaryClassFile("T1$T12$T13.class").getType();
 	// search constructor second level member
 	search(type.getMethods()[0], REFERENCES);
 	assertSearchResults(
@@ -3545,10 +3545,10 @@
 	);
 }
 public void testBug95152_jar02() throws CoreException {
-	IType type = getPackageFragment("JavaSearchBugs", "lib/b95152.jar", "b95152").getClassFile("T2$T22.class").getType();
+	IType type = getPackageFragment("JavaSearchBugs", "lib/b95152.jar", "b95152").getOrdinaryClassFile("T2$T22.class").getType();
 	// search constructor first level member
 	search(type.getMethods()[0], REFERENCES);
-	type = getPackageFragment("JavaSearchBugs", "lib/b95152.jar", "b95152").getClassFile("T2$T22$T23.class").getType();
+	type = getPackageFragment("JavaSearchBugs", "lib/b95152.jar", "b95152").getOrdinaryClassFile("T2$T22$T23.class").getType();
 	// search constructor second level member
 	search(type.getMethods()[0], REFERENCES);
 	assertSearchResults(
@@ -3557,10 +3557,10 @@
 	);
 }
 public void testBug95152_jar03() throws CoreException {
-	IType type = getPackageFragment("JavaSearchBugs", "lib/b95152.jar", "b95152").getClassFile("T3$T32.class").getType();
+	IType type = getPackageFragment("JavaSearchBugs", "lib/b95152.jar", "b95152").getOrdinaryClassFile("T3$T32.class").getType();
 	// search constructor first level member
 	search(type.getMethods()[0], REFERENCES);
-	type = getPackageFragment("JavaSearchBugs", "lib/b95152.jar", "b95152").getClassFile("T3$T32$T33.class").getType();
+	type = getPackageFragment("JavaSearchBugs", "lib/b95152.jar", "b95152").getOrdinaryClassFile("T3$T32$T33.class").getType();
 	// search constructor second level member
 	search(type.getMethods()[0], REFERENCES);
 	assertSearchResults(
@@ -3569,10 +3569,10 @@
 	);
 }
 public void testBug95152_jar04() throws CoreException {
-	IType type = getPackageFragment("JavaSearchBugs", "lib/b95152.jar", "b95152").getClassFile("T4$T42.class").getType();
+	IType type = getPackageFragment("JavaSearchBugs", "lib/b95152.jar", "b95152").getOrdinaryClassFile("T4$T42.class").getType();
 	// search constructor first level member
 	search(type.getMethods()[0], REFERENCES);
-	type = getPackageFragment("JavaSearchBugs", "lib/b95152.jar", "b95152").getClassFile("T4$T42$T43.class").getType();
+	type = getPackageFragment("JavaSearchBugs", "lib/b95152.jar", "b95152").getOrdinaryClassFile("T4$T42$T43.class").getType();
 	// search constructor second level member
 	search(type.getMethods()[0], REFERENCES);
 	assertSearchResults(
@@ -6430,7 +6430,7 @@
  * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=123679"
  */
 public void testBug123679() throws CoreException {
-	IType type = getPackageFragment("JavaSearchBugs", "lib/b123679.jar", "pack").getClassFile("I123679.class").getType();
+	IType type = getPackageFragment("JavaSearchBugs", "lib/b123679.jar", "pack").getOrdinaryClassFile("I123679.class").getType();
 	search(type, REFERENCES);
 	assertSearchResults(
 		"lib/b123679.jar test.<anonymous> EXACT_MATCH\n" +
@@ -6886,7 +6886,7 @@
  * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=124645"
  */
 public void testBug124645a() throws CoreException {
-	IClassFile classFile = getClassFile("JavaSearchBugs", "lib/b124645.jar", "xy", "BE_124645.class");
+	IOrdinaryClassFile classFile = getClassFile("JavaSearchBugs", "lib/b124645.jar", "xy", "BE_124645.class");
 	IType type = classFile.getType();
 	search(type, IMPLEMENTORS);
 	assertSearchResults(
@@ -6897,7 +6897,7 @@
 	);
 }
 public void testBug124645b() throws CoreException {
-	IClassFile classFile = getClassFile("JavaSearchBugs", "lib/b124645.jar", "test", "BE_124645.class");
+	IOrdinaryClassFile classFile = getClassFile("JavaSearchBugs", "lib/b124645.jar", "test", "BE_124645.class");
 	IType type = classFile.getType();
 	search(type, IMPLEMENTORS);
 	assertSearchResults(
@@ -6912,7 +6912,7 @@
 	);
 }
 public void testBug124645c() throws CoreException {
-	IClassFile classFile = getClassFile("JavaSearchBugs", "lib/b124645.jar", "", "BC_124645.class");
+	IOrdinaryClassFile classFile = getClassFile("JavaSearchBugs", "lib/b124645.jar", "", "BC_124645.class");
 	IType type = classFile.getType();
 	search(type, IMPLEMENTORS);
 	assertSearchResults(
@@ -6920,7 +6920,7 @@
 	);
 }
 public void testBug124645d() throws CoreException {
-	IClassFile classFile = getClassFile("JavaSearchBugs", "lib/b124645.jar", "", "BI_124645.class");
+	IOrdinaryClassFile classFile = getClassFile("JavaSearchBugs", "lib/b124645.jar", "", "BI_124645.class");
 	IType type = classFile.getType();
 	search(type, IMPLEMENTORS);
 	assertSearchResults(
@@ -6973,7 +6973,7 @@
  * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=126330"
  */
 public void testBug126330() throws CoreException {
-	IType type = getPackageFragment("JavaSearchBugs", "lib/b126330.jar", "").getClassFile("A126330.class").getType();
+	IType type = getPackageFragment("JavaSearchBugs", "lib/b126330.jar", "").getOrdinaryClassFile("A126330.class").getType();
 	search(type, REFERENCES);
 	assertSearchResults(
 		"lib/b126330.jar B126330.a EXACT_MATCH"
@@ -7020,7 +7020,7 @@
  * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=128877"
  */
 public void testBug128877a() throws CoreException {
-	IType type = getPackageFragment("JavaSearchBugs", "lib/b128877.jar", "pack").getClassFile("Test.class").getType();
+	IType type = getPackageFragment("JavaSearchBugs", "lib/b128877.jar", "pack").getOrdinaryClassFile("Test.class").getType();
 	IMethod method = type.getMethod("Test", new String[0]);
 	search(method, REFERENCES);
 	assertSearchResults(
@@ -7028,7 +7028,7 @@
 	);
 }
 public void testBug128877b() throws CoreException {
-	IType type = getPackageFragment("JavaSearchBugs", "lib/b128877.jar", "pack").getClassFile("Test.class").getType();
+	IType type = getPackageFragment("JavaSearchBugs", "lib/b128877.jar", "pack").getOrdinaryClassFile("Test.class").getType();
 	IMethod method = type.getMethod("Test", new String[] { "Ljava.lang.String;" });
 	search(method, REFERENCES);
 	assertSearchResults(
@@ -7036,7 +7036,7 @@
 	);
 }
 public void testBug128877c() throws CoreException {
-	IType type = getPackageFragment("JavaSearchBugs", "lib/b128877.jar", "pack").getClassFile("Test.class").getType();
+	IType type = getPackageFragment("JavaSearchBugs", "lib/b128877.jar", "pack").getOrdinaryClassFile("Test.class").getType();
 	IMethod method = type.getMethod("foo128877", new String[] { "I" });
 	search(method, REFERENCES);
 	assertSearchResults(
@@ -7402,7 +7402,7 @@
  * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=137984"
  */
 public void testBug137984_jar() throws CoreException {
-	IType type = getPackageFragment("JavaSearchBugs", "lib/b137984.jar", "").getClassFile("CJ.class").getType();
+	IType type = getPackageFragment("JavaSearchBugs", "lib/b137984.jar", "").getOrdinaryClassFile("CJ.class").getType();
 	IField field = type.getField("c3");
 	search(field, REFERENCES);
 	assertSearchResults(
@@ -7447,7 +7447,7 @@
  * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=140156"
  */
 public void testBug140156() throws CoreException {
-	IType type = getPackageFragment("JavaSearchBugs", "lib/b140156.jar", "").getClassFile("X.class").getType();
+	IType type = getPackageFragment("JavaSearchBugs", "lib/b140156.jar", "").getOrdinaryClassFile("X.class").getType();
 	IMethod method = type.getMethods()[1];
 	assertEquals("Search wrong method!!!", "foo", method.getElementName());
 	search(method, DECLARATIONS);
@@ -14328,7 +14328,7 @@
 
 		waitUntilIndexesReady();
 		// search
-		IClassFile classFile = getClassFile("ProjectA", "common.jar", "validator", "Validator.class");
+		IOrdinaryClassFile classFile = getClassFile("ProjectA", "common.jar", "validator", "Validator.class");
 		IType type = classFile.getType();
 		IMethod method = type.getMethods()[1];
 		search(method, REFERENCES, EXACT_RULE, SearchEngine.createWorkspaceScope(), this.resultCollector);
@@ -15110,4 +15110,38 @@
 	assertTrue("Unexpected Method Name", expectedName.equals(name));
 	assertTrue("IJavaElement Does not exist", method.exists());
 }
+public void testBug521240_001() throws CoreException {
+	this.workingCopies = new ICompilationUnit[3];
+	WorkingCopyOwner owner = new WorkingCopyOwner() {};
+	this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/pack1/X.java",
+		"package pack1;\n" +
+		"public class X {\n" +
+		"    void foo(Y s) {}\n" +
+		"    void foo(pack2.Y s) {}\n" +
+		"}\n",
+		owner
+	);
+	this.workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/pack1/Y.java",
+			"package pack1;\n" +
+			"public class Y{}\n",
+			owner
+		);
+	this.workingCopies[2] = getWorkingCopy("/JavaSearchBugs/src/pack2/Y.java",
+		"package pack2;\n" +
+		"public class Y{}\n",
+		owner
+	);
+	SearchPattern pattern = SearchPattern.createPattern("pack1.X.foo(pack1.Y)",METHOD, DECLARATIONS,
+			SearchPattern.R_ERASURE_MATCH | SearchPattern.R_EXACT_MATCH | SearchPattern.R_CASE_SENSITIVE);
+
+	new SearchEngine(this.workingCopies).search(pattern,
+			new SearchParticipant[] {SearchEngine.getDefaultSearchParticipant()},
+			getJavaSearchWorkingCopiesScope(),
+			this.resultCollector,
+			null);
+	assertSearchResults(
+			"src/pack1/X.java void pack1.X.foo(Y) [foo] EXACT_MATCH"
+	);
+}
+
 }
\ No newline at end of file
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaSearchTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaSearchTests.java
index 37f6bdc..d40fbac 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaSearchTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaSearchTests.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 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
@@ -2423,7 +2423,7 @@
 			externalJar + " p0.X",
 			this.resultCollector);
 
-		IClassFile classFile = pkg.getClassFile("X.class");
+		IOrdinaryClassFile classFile = pkg.getOrdinaryClassFile("X.class");
 		scope = SearchEngine.createJavaSearchScope(new IJavaElement[] {classFile});
 		this.resultCollector = new JavaSearchResultCollector();
 		search(
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/MementoTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/MementoTests.java
index 250235b..162e177 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/MementoTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/MementoTests.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2014 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 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
@@ -413,7 +413,7 @@
  * Tests that a binary field in an internal jar can be persisted and restored using its memento.
  */
 public void testInternalJarBinaryFieldMemento() throws JavaModelException {
-	IType type = getPackageFragmentRoot("/P/lib/myLib.jar").getPackageFragment("p").getClassFile("X.class").getType();
+	IType type = getPackageFragmentRoot("/P/lib/myLib.jar").getPackageFragment("p").getOrdinaryClassFile("X.class").getType();
 	IField field = type.getField("field");
 	assertMemento(
 		"=P/lib\\/myLib.jar<p(X.class[X^field",
@@ -423,7 +423,7 @@
  * Tests that a inner binary type and field in an internal jar can be persisted and restored using its memento.
  */
 public void testInternalJarBinaryInnerTypeMemento() throws JavaModelException {
-	IType type = getPackageFragmentRoot("/P/lib/myLib.jar").getPackageFragment("p").getClassFile("X$Inner.class").getType();
+	IType type = getPackageFragmentRoot("/P/lib/myLib.jar").getPackageFragment("p").getOrdinaryClassFile("X$Inner.class").getType();
 	assertMemento(
 		"=P/lib\\/myLib.jar<p(X$Inner.class[Inner",
 		type);
@@ -432,7 +432,7 @@
  * Tests that a binary method in an internal jar can be persisted and restored using its memento.
  */
 public void testInternalJarBinaryMethodMemento() throws JavaModelException {
-	IType type = getPackageFragmentRoot("/P/lib/myLib.jar").getPackageFragment("p").getClassFile("X.class").getType();
+	IType type = getPackageFragmentRoot("/P/lib/myLib.jar").getPackageFragment("p").getOrdinaryClassFile("X.class").getType();
 	IMethod method = type.getMethod("foo", new String[] {"[Ljava.lang.String;"});
 	assertMemento(
 		"=P/lib\\/myLib.jar<p(X.class[X~foo~\\[Ljava.lang.String;",
@@ -442,7 +442,7 @@
  * Tests that a binary type in an internal jar can be persisted and restored using its memento.
  */
 public void testInternalJarBinaryTypeMemento() throws JavaModelException {
-	IType type = getPackageFragmentRoot("/P/lib/myLib.jar").getPackageFragment("p").getClassFile("X.class").getType();
+	IType type = getPackageFragmentRoot("/P/lib/myLib.jar").getPackageFragment("p").getOrdinaryClassFile("X.class").getType();
 	assertMemento(
 		"=P/lib\\/myLib.jar<p(X.class[X",
 		type);
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ModifyingResourceTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ModifyingResourceTests.java
index 3f44c37..921938e 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ModifyingResourceTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ModifyingResourceTests.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 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
@@ -167,8 +167,8 @@
 protected void renameProject(String project, String newName) throws CoreException {
 	getProject(project).move(new Path(newName), true, null);
 }
-protected IClassFile getClassFile(String path) {
-	return (IClassFile)JavaCore.create(getFile(path));
+protected IOrdinaryClassFile getClassFile(String path) {
+	return (IOrdinaryClassFile)JavaCore.create(getFile(path));
 }
 protected IFolder getFolder(String path) {
 	return getFolder(new Path(path));
@@ -214,7 +214,7 @@
 	getWorkspace().run(runnable, null);
 }
 protected IClassFile createClassFile(String libPath, String classFileRelativePath, String contents) throws CoreException {
-	IClassFile classFile = getClassFile(libPath + "/" + classFileRelativePath);
+	IOrdinaryClassFile classFile = getClassFile(libPath + "/" + classFileRelativePath);
 //	classFile.getResource().delete(false, null);
 	Util.delete(classFile.getResource());
 	IJavaProject javaProject = classFile.getJavaProject();
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ModuleBuilderTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ModuleBuilderTests.java
new file mode 100644
index 0000000..8041086
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ModuleBuilderTests.java
@@ -0,0 +1,5777 @@
+/*******************************************************************************
+ * Copyright (c) 2016, 2017 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.jdt.core.tests.model;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Hashtable;
+import java.util.Map;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspaceDescription;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jdt.core.IClasspathAttribute;
+import org.eclipse.jdt.core.IClasspathEntry;
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.IJavaModelMarker;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IModuleDescription;
+import org.eclipse.jdt.core.IPackageFragmentRoot;
+import org.eclipse.jdt.core.IProblemRequestor;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.core.WorkingCopyOwner;
+import org.eclipse.jdt.core.dom.AST;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jdt.core.tests.util.Util;
+import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+import org.eclipse.jdt.internal.compiler.lookup.TypeConstants;
+import org.eclipse.jdt.internal.compiler.util.JRTUtil;
+import org.eclipse.jdt.internal.core.ClasspathAttribute;
+import org.eclipse.jdt.internal.core.ClasspathEntry;
+import org.eclipse.jdt.internal.core.builder.ClasspathJrt;
+import org.eclipse.jdt.internal.core.util.Messages;
+
+import junit.framework.Test;
+
+public class ModuleBuilderTests extends ModifyingResourceTests {
+	public ModuleBuilderTests(String name) {
+		super(name);
+	}
+
+	static {
+//		 TESTS_NAMES = new String[] { "test_conflicting_packages" };
+	}
+	private String sourceWorkspacePath = null;
+	protected ProblemRequestor problemRequestor;
+	public static Test suite() {
+		return buildModelTestSuite(ModuleBuilderTests.class, BYTECODE_DECLARATION_ORDER);
+	}
+	public String getSourceWorkspacePath() {
+		return this.sourceWorkspacePath == null ? super.getSourceWorkspacePath() : this.sourceWorkspacePath;
+	}
+	public void setUp() throws Exception {
+		super.setUp();
+		this.problemRequestor =  new ProblemRequestor();
+		this.wcOwner = new WorkingCopyOwner() {
+			public IProblemRequestor getProblemRequestor(ICompilationUnit unit) {
+				return ModuleBuilderTests.this.problemRequestor;
+			}
+		};
+	}
+	public void setUpSuite() throws Exception {
+		super.setUpSuite();
+		System.setProperty("modules.to.load", "java.base;java.desktop;java.rmi;java.sql;");
+		this.currentProject = createJava9Project("P1");
+		this.createFile("P1/src/module-info.java", "");
+		this.createFolder("P1/src/com/greetings");
+		this.createFile("P1/src/com/greetings/Main.java", "");
+		waitForManualRefresh();
+		waitForAutoBuild();
+	}
+	
+	public void tearDownSuite() throws Exception {
+		super.tearDownSuite();
+		deleteProject("P1");
+		System.setProperty("modules.to.load", "");
+	}
+	
+	// Test that the java.base found as a module package fragment root in the project 
+	public void test001() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			IJavaProject project = createJava9Project("Test01", new String[]{"src"});
+			this.createFile("Test01/src/module-info.java", "");
+			this.createFolder("Test01/src/com/greetings");
+			this.createFile("Test01/src/com/greetings/Main.java", "");
+			waitForManualRefresh();
+			waitForAutoBuild();
+			project.getProject().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IPackageFragmentRoot[] roots = project.getPackageFragmentRoots();
+			IPackageFragmentRoot base = null;
+			for (IPackageFragmentRoot iRoot : roots) {
+				IModuleDescription moduleDescription = iRoot.getModuleDescription();
+				if (moduleDescription != null && moduleDescription.getElementName().equals("java.base")) {
+					base = iRoot;
+					break;
+				}
+			}
+			assertNotNull("Java.base module should not null", base);
+			assertMarkers("Unexpected markers", "", project);
+		} finally {
+			deleteProject("Test01");
+		}
+	}
+	// Test the project compiles without errors with a simple module-info.java
+	public void test002() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			this.editFile("P1/src/module-info.java",
+							"module M1 {\n" +
+							"	exports com.greetings;\n" +
+							"	requires java.base;\n" +
+							"}");
+			waitForManualRefresh();
+			this.currentProject.getProject().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			assertMarkers("Unexpected markers", "", this.currentProject);
+		} finally {
+		}
+	}
+	// Test that types from java.base module are seen by the compiler
+	// even without an explicit 'requires java.base' declaration.
+	public void test003() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			this.editFile("P1/src/module-info.java",
+					"module M1 {\n" +
+							"	exports com.greetings;\n" +
+					"}");
+			this.editFile("P1/src/com/greetings/Main.java",
+					"package com.greetings;\n" +
+					"public class Main {\n" +
+					"	public static void main(String[] args) {\n" +
+					"	}\n" +
+					"}");
+			waitForManualRefresh();
+			this.currentProject.getProject().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = this.currentProject.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers", "", markers);
+		} finally {
+		}
+	}
+	// Test that a type that is present in the JDK, but not observable to the source module,
+	// is reported as a compilation error.
+	public void test004() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			this.editFile("P1/src/module-info.java",
+					"module M1 {\n" +
+					"	exports com.greetings;\n" +
+					"	requires java.base;\n" +
+					"}");
+			this.editFile("P1/src/com/greetings/Main.java",
+					"package com.greetings;\n" +
+					"import java.sql.Connection;\n" +
+					"public class Main {\n" +
+					"	public Connection con = null;\n" +
+					"}");
+			waitForManualRefresh();
+			this.currentProject.getProject().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = this.currentProject.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			sortMarkers(markers);
+			assertMarkers("Unexpected markers", 
+					"The import java.sql cannot be resolved\n" + 
+					"Connection cannot be resolved to a type", markers);
+		} finally {
+		}
+	}
+	// Test that a type that is outside java.base module is available to the compiler
+	// when the module is specified as 'requires'.
+	public void test005() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			this.editFile("P1/src/module-info.java",
+					"module M1 {\n" +
+					"	exports com.greetings;\n" +
+					"	requires java.base;\n" +
+					"	requires java.sql;\n" +
+					"}");
+			waitForManualRefresh();
+			this.currentProject.getProject().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = this.currentProject.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers",
+					// just an API leak warning:
+					"The type Connection from module java.sql may not be accessible to clients due to missing \'requires transitive\'",
+					markers);
+		} finally {
+		}
+	}
+	// Test that a module that doesn't exist but specified as requires in module-info
+	// doesn't affect rest of the compilation.
+	public void _test006() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			this.editFile("P1/src/module-info.java",
+					"module M1 {\n" +
+					"	exports com.greetings;\n" +
+					"	requires java.base;\n" +
+					"	requires java.sql;\n" +
+					"	requires java.idontexist;\n" +
+					"}");
+			this.editFile("P1/src/com/greetings/Main.java",
+					"package com.greetings;\n" +
+					"public class Main {\n" +
+					"}");
+			waitForManualRefresh();
+			this.currentProject.getProject().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = this.currentProject.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers", "", markers);
+		} finally {
+		}
+	}
+	private IJavaProject setupP2() throws CoreException {
+		IJavaProject project = createJava9Project("P2");
+		IClasspathAttribute modAttr = new ClasspathAttribute("module", "true");
+		IClasspathEntry projectEntry = JavaCore.newProjectEntry(new Path("/P1"), null, false,
+			new IClasspathAttribute[] {modAttr},
+			true);
+		IClasspathEntry[] old = project.getRawClasspath();
+		IClasspathEntry[] newPath = new IClasspathEntry[old.length +1];
+		System.arraycopy(old, 0, newPath, 0, old.length);
+		newPath[old.length] = projectEntry;
+		project.setRawClasspath(newPath, null);
+		this.editFile("P1/src/module-info.java",
+				"module M1 {\n" +
+				"	exports com.greetings;\n" +
+				"	requires java.base;\n" +
+				"}");
+		this.editFile("P1/src/com/greetings/Main.java",
+				"package com.greetings;\n" +
+				"public class Main {\n" +
+				"	public static void main(String[] args) {\n" +
+				"	}\n" +
+				"}");
+		this.createFile("P2/src/module-info.java",
+				"module M2 {\n" +
+				"	exports org.astro;\n" +
+				"	requires M1;\n" +
+				"}");
+		this.createFolder("P2/src/org/astro");
+		this.createFile("P2/src/org/astro/Test.java",
+				"package org.astro;\n" +
+				"import com.greetings.Main;\n" +
+				"public class Test {\n" +
+				"	public static void main(String[] args) {\n" +
+				"		Main.main(args);\n" +
+				"	}\n" +
+				"}");
+		return project;
+	}
+	/*
+	 * Two Java projects, each with one module. P2 has P1 in its build path but
+	 * module M2 has no 'requires' M1. Should report unresolved type, import etc.  
+	 *
+	 */
+	public void test007() throws Exception {
+		if (!isJRE9) return;
+		try {
+			IJavaProject project = setupP2();
+			this.editFile("P1/src/module-info.java",
+					"module M1 {\n" +
+					"	exports com.greetings;\n" +
+					"}");
+			this.editFile("P2/src/module-info.java",
+					"module M2 {\n" +
+					"	exports org.astro;\n" +
+					"	//requires M1;\n" +
+					"}");
+			waitForManualRefresh();
+			project.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = project.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			sortMarkers(markers);
+			assertMarkers("Unexpected markers", 
+					"The import com.greetings cannot be resolved\n" + 
+					"Main cannot be resolved", 
+					markers);
+		} finally {
+			deleteProject("P2");
+		}
+	}
+	/*
+	 * Two Java project, each with one module. P2 has P1 in its build path and
+	 * module M2 'requires' M1. Should report unresolved type, import etc. But M1
+	 * does not export the package that is used by M2. Test that M2 does not see
+	 * the types in unexported packages.
+	 *
+	 */
+	public void test008() throws Exception {
+		if (!isJRE9) return;
+		try {
+			IJavaProject project = setupP2();
+			this.editFile("P1/src/module-info.java",
+					"module M1 {\n" +
+					"	//exports com.greetings;\n" +
+					"}");
+			this.editFile("P2/src/module-info.java",
+					"module M2 {\n" +
+					"	exports org.astro;\n" +
+					"	requires M1;\n" +
+					"}");
+			waitForManualRefresh();
+			project.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = project.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			sortMarkers(markers);
+			assertMarkers("Unexpected markers", 
+					"The type com.greetings.Main is not accessible\n" + 
+					"Main cannot be resolved", 
+					markers);
+		} finally {
+			deleteProject("P2");
+		}
+	}
+	/*
+	 * Two Java projects, each with one module. P2 has P1 in its build path.
+	 * Module M2 has "requires M1" in module-info and all packages used by M2 
+	 * are exported by M1. No errors expected. 
+	 */
+	public void test009() throws Exception {
+		if (!isJRE9) return;
+		try {
+			IJavaProject project = setupP2();
+			this.editFile("P1/src/module-info.java",
+					"module M1 {\n" +
+					"	exports com.greetings;\n" +
+					"}");
+			this.editFile("P2/src/module-info.java",
+					"module M2 {\n" +
+					"	exports org.astro;\n" +
+					"	requires M1;\n" +
+					"}");
+			waitForManualRefresh();
+			project.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = project.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers", 
+					"", markers);
+		} finally {
+			deleteProject("P2");
+		}
+	}
+	/*
+	 * Two Java projects, each with a module. Project P2 depends on P1.
+	 * Module M1 exports a package to a specific module, which is not M2.
+	 * Usage of types from M1 in M2 should be reported.
+	 */
+	public void _test010() throws Exception {
+		if (!isJRE9) return;
+		try {
+			IJavaProject project = setupP2();
+			this.editFile("P1/src/module-info.java",
+					"module M1 {\n" +
+					"	exports com.greetings to org.main;\n" +
+					"}");
+			this.editFile("P2/src/module-info.java",
+					"module M2 {\n" +
+					"	exports org.astro;\n" +
+					"	requires M1;\n" +
+					"}");
+			waitForManualRefresh();
+			project.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = project.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			sortMarkers(markers);
+			assertMarkers("Unexpected markers", 
+					"The import com.greetings.Main cannot be resolved\n" + 
+					"Main cannot be resolved", 
+					markers);
+		} finally {
+			deleteProject("P2");
+		}
+	}
+	private IJavaProject setupP3() throws CoreException {
+		IJavaProject project = createJava9Project("P3");
+		IClasspathAttribute modAttr = new ClasspathAttribute("module", "true");
+		IClasspathEntry projectEntry = JavaCore.newProjectEntry(new Path("/P2"), null, false,
+			new IClasspathAttribute[] {modAttr},
+			true);
+		IClasspathEntry[] old = project.getRawClasspath();
+		IClasspathEntry[] newPath = new IClasspathEntry[old.length +1];
+		System.arraycopy(old, 0, newPath, 0, old.length);
+		newPath[old.length] = projectEntry;
+		project.setRawClasspath(newPath, null);
+		this.createFile("P3/src/module-info.java",
+				"module M3 {\n" +
+				"	exports org.main;\n" +
+				"	requires M2;\n" +
+				"}");
+		this.createFolder("P3/src/org/main");
+		this.createFile("P3/src/org/main/TestMain.java",
+				"package org.main;\n" +
+				"import com.greetings.*;\n" +
+				"public class TestMain {\n" +
+				"	public static void main(String[] args) {\n" +
+				"		Main.main(args);\n" +
+				"	}\n" +
+				"}");
+		return project;
+	}
+	/*
+	 * Three Java projects, each with one module. Project P3 depends on P2, which depends on P1.
+	 * Module M1 exports a package (to all), M2 requires M1 and M3 requires M2. Usage of types from
+	 * M1 in M3 should be reported as errors.
+	 */
+	public void test011() throws Exception {
+		if (!isJRE9) return;
+		try {
+			this.editFile("P1/src/module-info.java",
+					"module M1 {\n" +
+					"	exports com.greetings;\n" +
+					"}");
+			IJavaProject p2 = setupP2();
+			IJavaProject p3 = setupP3();
+			waitForManualRefresh();
+			p2.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p3.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			sortMarkers(markers);
+			assertMarkers("Unexpected markers",
+					"The package com.greetings is not accessible\n" +
+					"Main cannot be resolved",
+					markers);
+		} finally {
+			deleteProject("P2");
+			deleteProject("P3");
+		}
+	}
+	/*
+	 * Three Java projects, each with one module. Project P3 depends on P2, which depends on P1.
+	 * Module M1 exports a package only to M2, M2 requires M1 and M3 requires M2. Usage of types from
+	 * M1 in M3 should not be allowed.
+	 */
+	public void test012() throws Exception {
+		if (!isJRE9) return;
+		try {
+			this.editFile("P1/src/module-info.java",
+					"module M1 {\n" +
+					"	exports com.greetings to M2;\n" +
+					"}");
+			IJavaProject p2 = setupP2();
+			IJavaProject p3 = setupP3();
+			this.editFile("P2/src/module-info.java",
+					"module M2 {\n" +
+					"	exports org.astro;\n" +
+					"	requires M1;\n" +
+					"}");
+			waitForManualRefresh();
+			p2.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p2.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers", "",  markers);
+			markers = p3.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			sortMarkers(markers);
+			assertMarkers("Unexpected markers", 
+					"The package com.greetings is not accessible\n" + 
+					"Main cannot be resolved", 
+					markers);
+		} finally {
+			deleteProject("P2");
+			deleteProject("P3");
+		}
+	}
+	/*
+	 * Three Java projects, each with one module. Project P3 depends on P2, which depends on P1.
+	 * Module M1 exports a package (to all), M2 requires 'transitive' M1 and M3 requires M2. Usage of types from
+	 * M1 in M3 should be allowed.
+	 */
+	public void test013() throws Exception {
+		if (!isJRE9) return;
+		try {
+			IJavaProject p2 = setupP2();
+			IJavaProject p3 = setupP3();
+			this.editFile("P2/src/module-info.java",
+					"module M2 {\n" +
+					"	exports org.astro;\n" +
+					"	requires transitive M1;\n" +
+					"}");
+			waitForManualRefresh();
+			p2.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p3.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers", "",  markers);
+		} finally {
+			deleteProject("P2");
+			deleteProject("P3");
+		}
+	}
+	/*
+	 * Three Java projects, each with one module. Project P3 depends on P2, which depends on P1.
+	 * Module M1 exports a package only to M2, M2 requires 'public' M1 and M3 requires M2. Usage of types from
+	 * M1 in M3 should be allowed. And no errors reported on M2.
+	 */
+	public void test014() throws Exception {
+		if (!isJRE9) return;
+		try {
+			this.editFile("P1/src/module-info.java",
+					"module M1 {\n" +
+					"	exports com.greetings to M2;\n" +
+					"}");
+			IJavaProject p2 = setupP2();
+			IJavaProject p3 = setupP3();
+			this.editFile("P2/src/module-info.java",
+					"module M2 {\n" +
+					"	exports org.astro;\n" +
+					"	requires transitive M1;\n" +
+					"}");
+			waitForManualRefresh();
+			p2.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p2.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers", "",  markers);
+			markers = p3.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers", "",  markers);
+		} finally {
+			deleteProject("P2");
+			deleteProject("P3");
+		}
+	}
+	public void test015() throws CoreException, IOException {
+		if (!isJRE9) return;
+		try {
+			this.editFile("P1/src/module-info.java",
+					"module M1 {\n" +
+					"	exports com.greetings to M2;\n" +
+					"}");
+			IJavaProject p2 = setupP2();
+			this.editFile("P2/src/module-info.java",
+					"module M2 {\n" +
+					"	exports org.astro;\n" +
+					"	requires transitive M1;\n" +
+					"}");
+			waitForManualRefresh();
+			p2.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IFolder folder = getFolder("P1/src");
+			assertNotNull("Should be a module", this.currentProject.getModuleDescription());
+			folder = getFolder("P2/src");
+			folder = getFolder("P1/bin");
+			IPath jarPath = p2.getResource().getLocation().append("m0.jar");
+			org.eclipse.jdt.core.tests.util.Util.zip(new File(folder.getLocation().toOSString()), jarPath.toOSString());
+			IClasspathEntry[] old = p2.getRawClasspath();
+			for (int i = 0; i < old.length; i++) {
+				if (old[i].isExported()) {
+					old[i] = JavaCore.newLibraryEntry(new Path("/P2/m0.jar"), null, null);
+					break;
+				}
+			}
+			p2.setRawClasspath(old, null);
+			p2.getProject().refreshLocal(IResource.DEPTH_INFINITE, null);
+			p2.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			assertNotNull("Should be a module", p2.getModuleDescription());
+		} finally {
+			deleteProject("P2");
+			deleteProject("P3");
+		}
+	}
+	/*
+	 * Change the module-info and wait for autobuild to 
+	 * report expected errors.
+	 */
+	public void test016() throws CoreException, IOException {
+		if (!isJRE9) return;
+		try {
+			IJavaProject p2 = setupP2();
+			this.editFile("P2/src/module-info.java",
+					"module M2 {\n" +
+					"	exports org.astro;\n" +
+					"	requires java.base;\n" +
+					"	requires transitive M1;\n" +
+					"}");
+			waitForManualRefresh();
+			p2.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p2.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers", "",  markers);
+			this.editFile("P2/src/module-info.java",
+					"module M2 {\n" +
+					"	exports org.astro;\n" +
+					"}");
+			waitForManualRefresh();
+			p2.getProject().getWorkspace().build(IncrementalProjectBuilder.AUTO_BUILD, null);
+			markers = p2.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			sortMarkers(markers);
+			assertMarkers("Unexpected markers",
+					"The import com.greetings cannot be resolved\n" + 
+					"Main cannot be resolved",  markers);
+		} finally {
+			deleteProject("P2");
+		}
+	}
+	/*
+	 * Change the module-info of a required module and wait for autobuild to 
+	 * report expected errors.
+	 */
+	public void test017() throws CoreException, IOException {
+		if (!isJRE9) return;
+		try {
+			IJavaProject p2 = setupP2();
+			this.editFile("P2/src/module-info.java",
+					"module M2 {\n" +
+					"	exports org.astro;\n" +
+					"	requires java.base;\n" +
+					"	requires transitive M1;\n" +
+					"}");
+			waitForManualRefresh();
+			p2.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p2.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers", "",  markers);
+			this.editFile("P1/src/module-info.java",
+					"module M1 {\n" +
+					"	requires java.base;\n" +
+					"}");
+			waitForManualRefresh();
+			p2.getProject().getWorkspace().build(IncrementalProjectBuilder.AUTO_BUILD, null);
+			markers = p2.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			sortMarkers(markers);
+			assertMarkers("Unexpected markers",
+					"The type com.greetings.Main is not accessible\n" + 
+					"Main cannot be resolved",  markers);
+		} finally {
+			deleteProject("P2");
+			this.editFile("P1/src/module-info.java",
+					"module M1 {\n" +
+					"	exports com.greetings;\n" +
+					"	requires java.base;\n" +
+					"}");
+		}
+	}
+	/*
+	 * Change the module-info of a required module and wait for autobuild to 
+	 * report expected errors.
+	 */
+	public void test018() throws CoreException, IOException {
+		if (!isJRE9) return;
+		try {
+			String wkspEncoding = System.getProperty("file.encoding");
+			final String encoding = "UTF-8".equals(wkspEncoding) ? "Cp1252" : "UTF-8";
+			IJavaProject p2 = setupP2();
+			this.editFile("P2/src/module-info.java",
+					"module M2 {\n" +
+					"	exports org.astro;\n" +
+					"	requires java.base;\n" +
+					"	requires transitive M1;\n" +
+					"}");
+			waitForManualRefresh();
+			p2.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p2.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers", "",  markers);
+			IFile bin = getFile("P1/bin/com/greetings/Main.class");
+			long old = bin.getLocalTimeStamp();
+			IFile file = getFile("P1/src/module-info.java");
+			file.setCharset(encoding, null);
+			waitForManualRefresh();
+			p2.getProject().getWorkspace().build(IncrementalProjectBuilder.AUTO_BUILD, null);
+			markers = p2.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers",
+					"",  markers);
+			long latest = getFile("P1/bin/com/greetings/Main.class").getLocalTimeStamp();
+			assertTrue("Should not have been recompiled", old == latest);
+		} finally {
+			deleteProject("P2");
+		}
+	}
+	/*
+	 * Test that adding or removing java.base does not result in
+	 * re-compilation of module.
+	 */
+	public void _test019() throws CoreException, IOException {
+		if (!isJRE9) return;
+		try {
+			this.editFile("P1/src/module-info.java",
+					"module M1 {\n" +
+					"	exports com.greetings;\n" +
+					"	requires java.base;\n" +
+					"}");
+			waitForManualRefresh();
+			this.currentProject.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = this.currentProject.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers", "",  markers);
+			IFile bin = getFile("P1/bin/com/greetings/Main.class");
+			long old = bin.getLocalTimeStamp();
+			waitForManualRefresh();
+			this.editFile("P1/src/module-info.java",
+					"module M1 {\n" +
+					"	exports com.greetings;\n" +
+					"}");
+			this.currentProject.getProject().getWorkspace().build(IncrementalProjectBuilder.AUTO_BUILD, null);
+			long latest = getFile("P1/bin/com/greetings/Main.class").getLocalTimeStamp();
+			assertTrue("Should not have been recompiled", old == latest);
+		} finally {
+			deleteProject("P2");
+			this.editFile("P1/src/module-info.java",
+					"module M1 {\n" +
+					"	exports com.greetings;\n" +
+					"	requires java.base;\n" +
+					"}");
+		}
+	}
+	public void testConvertToModule() throws CoreException, IOException {
+		if (!isJRE9) return;
+		Hashtable<String, String> javaCoreOptions = JavaCore.getOptions();
+		try {
+			IJavaProject project = setUpJavaProject("ConvertToModule", "9");
+			if (!project.getOption("org.eclipse.jdt.core.compiler.compliance", true).equals("9")) {
+				return;
+			}
+			project.getProject().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IPackageFragmentRoot[] roots = project.getPackageFragmentRoots();
+			IPackageFragmentRoot theRoot = null;
+			for (IPackageFragmentRoot root : roots) {
+				if (root.getElementName().equals("jdt.test")) {
+					theRoot = root;
+					break;
+				}
+			}
+			assertNotNull("should not be null", theRoot);
+			String[] modules = JavaCore.getReferencedModules(project);
+			assertStringsEqual("incorrect result", new String[]{"java.desktop", "java.rmi", "java.sql"}, modules);
+		} finally {
+			this.deleteProject("ConvertToModule");
+			 JavaCore.setOptions(javaCoreOptions);
+		}
+	}
+	public void test_services_abstractImpl() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			String[] sources = new String[] { 
+					"src/module-info.java",
+					"module org.astro {\n" +
+					"	exports org.astro;\n" +
+					"}",
+					"src/org/astro/World.java",
+					"package org.astro;\n" +
+					"public interface World {\n" +
+					"	public String name();\n" +
+					"}" 
+			};
+			IJavaProject p1 = setupModuleProject("org.astro", sources);
+			IClasspathAttribute modAttr = new ClasspathAttribute("module", "true");
+			IClasspathEntry dep = JavaCore.newProjectEntry(p1.getPath(), null, false,
+				new IClasspathAttribute[] {modAttr},
+				false/*not exported*/);
+			String[] src = new String[] { 
+					"src/module-info.java",
+					"module com.greetings {\n" +
+					"	requires org.astro;\n" +
+					"	exports com.greetings;\n" +
+					"	provides org.astro.World with com.greetings.MyWorld;\n" +
+					"}",
+					"src/com/greetings/MyWorld.java",
+					"package com.greetings;\n" +
+					"import org.astro.World;\n"	+
+					"public abstract class MyWorld implements World { }\n"
+			};
+			IJavaProject p2 = setupModuleProject("com.greetings", src, new IClasspathEntry[] { dep });
+			p2.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p2.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers",
+					"Invalid service implementation, the type com.greetings.MyWorld is abstract", markers);
+		} finally {
+			deleteProject("org.astro");
+			deleteProject("com.greetings");
+		}
+	}
+	public void test_services_invalidImpl() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			String[] sources = new String[] { 
+					"src/module-info.java",
+					"module org.astro {\n" +
+					"	exports org.astro;\n" +
+					"}",
+					"src/org/astro/World.java",
+					"package org.astro;\n" +
+					"public interface World {\n" +
+					"	public String name();\n" +
+					"}" 
+			};
+			IJavaProject p1 = setupModuleProject("org.astro", sources);
+			IClasspathAttribute modAttr = new ClasspathAttribute("module", "true");
+			IClasspathEntry dep = JavaCore.newProjectEntry(p1.getPath(), null, false,
+				new IClasspathAttribute[] {modAttr},
+				false/*not exported*/);
+			String[] src = new String[] { 
+					"src/module-info.java",
+					"module com.greetings {\n" +
+					"	requires org.astro;\n" +
+					"	exports com.greetings;\n" +
+					"	provides org.astro.World with com.greetings.MyWorld;\n" +
+					"}",
+					"src/com/greetings/MyWorld.java",
+					"package com.greetings;\n" +
+					"public class MyWorld { }\n"
+			};
+			IJavaProject p2 = setupModuleProject("com.greetings", src, new IClasspathEntry[] { dep });
+			p2.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p2.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers",
+					"Type mismatch: cannot convert from MyWorld to World", markers);
+		} finally {
+			deleteProject("org.astro");
+			deleteProject("com.greetings");
+		}
+	}
+	public void test_services_NoDefaultConstructor() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			String[] sources = new String[] {
+				"src/module-info.java",
+				"module org.astro {\n" +
+				"	exports org.astro;\n" + 
+				"}",
+				"src/org/astro/World.java",
+				"package org.astro;\n" +
+				"public interface World {\n" +
+				"	public String name();\n" +
+				"}"
+			};
+			IJavaProject p1 = setupModuleProject("org.astro", sources);
+			IClasspathAttribute modAttr = new ClasspathAttribute("module", "true");
+			IClasspathEntry dep = JavaCore.newProjectEntry(p1.getPath(), null, false,
+				new IClasspathAttribute[] {modAttr},
+				false/*not exported*/);
+			String[] src = new String[] {
+				"src/module-info.java",
+				"module com.greetings {\n" +
+				"	requires org.astro;\n" +
+				"	exports com.greetings;\n" +
+				"	provides org.astro.World with com.greetings.MyWorld;\n" +
+				"}",
+				"src/com/greetings/MyWorld.java",
+				"package com.greetings;\n" +
+				"import org.astro.World;\n" +
+				"public class MyWorld implements World {\n" +
+				"	public MyWorld(String name) { }\n" +
+				"	public String name() {\n" +
+				"		return \" My World!!\";\n" +
+				"	}\n" +
+				"}"
+			};
+			IJavaProject p2 = setupModuleProject("com.greetings", src, new IClasspathEntry[] { dep });
+			p2.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p2.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers",
+					"The service implementation com.greetings.MyWorld must define a public static provider method or a no-arg constructor",  markers);
+		} finally {
+			deleteProject("org.astro");
+			deleteProject("com.greetings");
+		}
+	}
+	public void test_services_DefaultConstructorNotVisible() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			String[] sources = new String[] {
+				"src/module-info.java",
+				"module org.astro {\n" +
+				"	exports org.astro;\n" + 
+				"}",
+				"src/org/astro/World.java",
+				"package org.astro;\n" +
+				"public interface World {\n" +
+				"	public String name();\n" +
+				"}"
+			};
+			IJavaProject p1 = setupModuleProject("org.astro", sources);
+			IClasspathAttribute modAttr = new ClasspathAttribute("module", "true");
+			IClasspathEntry dep = JavaCore.newProjectEntry(p1.getPath(), null, false,
+				new IClasspathAttribute[] {modAttr},
+				false/*not exported*/);
+			String[] src = new String[] {
+				"src/module-info.java",
+				"module com.greetings {\n" +
+				"	requires org.astro;\n" +
+				"	exports com.greetings;\n" +
+				"	provides org.astro.World with com.greetings.MyWorld;\n" +
+				"}",
+				"src/com/greetings/MyWorld.java",
+				"package com.greetings;\n" +
+				"import org.astro.World;\n" +
+				"public class MyWorld implements World {\n" +
+				"	MyWorld() { }\n" +
+				"	public String name() {\n" +
+				"		return \" My World!!\";\n" +
+				"	}\n" +
+				"}"
+			};
+			IJavaProject p2 = setupModuleProject("com.greetings", src, new IClasspathEntry[] { dep });
+			p2.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p2.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers",
+					"The no-arg constructor of service implementation com.greetings.MyWorld is not public",  markers);
+		} finally {
+			deleteProject("org.astro");
+			deleteProject("com.greetings");
+		}
+	}
+	public void test_services_DuplicateEntries() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			String[] sources = new String[] {
+				"src/module-info.java",
+				"module org.astro {\n" +
+				"	exports org.astro;\n" + 
+				"}",
+				"src/org/astro/World.java",
+				"package org.astro;\n" +
+				"public interface World {\n" +
+				"	public String name();\n" +
+				"}"
+			};
+			IJavaProject p1 = setupModuleProject("org.astro", sources);
+			IClasspathAttribute modAttr = new ClasspathAttribute("module", "true");
+			IClasspathEntry dep = JavaCore.newProjectEntry(p1.getPath(), null, false,
+				new IClasspathAttribute[] {modAttr},
+				false/*not exported*/);
+			String[] src = new String[] {
+				"src/module-info.java",
+				"module com.greetings {\n" +
+				"	requires org.astro;\n" +
+				"	exports com.greetings;\n" +
+				"	provides org.astro.World with com.greetings.MyWorld;\n" +
+				"	provides org.astro.World with com.greetings.MyWorld;\n" +
+				"}",
+				"src/com/greetings/MyWorld.java",
+				"package com.greetings;\n" +
+				"import org.astro.World;\n" +
+				"public class MyWorld implements World {\n" +
+				"	public String name() {\n" +
+				"		return \" My World!!\";\n" +
+				"	}\n" +
+				"}"
+			};
+			IJavaProject p2 = setupModuleProject("com.greetings", src, new IClasspathEntry[] { dep });
+			p2.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p2.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers",
+					"Duplicate service entry: org.astro.World",  markers);
+		} finally {
+			deleteProject("org.astro");
+			deleteProject("com.greetings");
+		}
+	}
+	public void test_services_NestedClass() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			String[] sources = new String[] {
+				"src/module-info.java",
+				"module org.astro {\n" +
+				"	exports org.astro;\n" + 
+				"}",
+				"src/org/astro/World.java",
+				"package org.astro;\n" +
+				"public interface World {\n" +
+				"	public String name();\n" +
+				"}"
+			};
+			IJavaProject p1 = setupModuleProject("org.astro", sources);
+			IClasspathAttribute modAttr = new ClasspathAttribute("module", "true");
+			IClasspathEntry dep = JavaCore.newProjectEntry(p1.getPath(), null, false,
+				new IClasspathAttribute[] {modAttr},
+				false/*not exported*/);
+			String[] src = new String[] {
+				"src/module-info.java",
+				"module com.greetings {\n" +
+				"	requires org.astro;\n" +
+				"	exports com.greetings;\n" +
+				"	provides org.astro.World with com.greetings.MyWorld.Nested;\n" +
+				"}",
+				"src/com/greetings/MyWorld.java",
+				"package com.greetings;\n" +
+				"import org.astro.World;\n" +
+				"public class MyWorld {\n" +
+				"	public static class Nested implements World {\n" +
+				"		public String name() {\n" +
+				"			return \" My World!!\";\n" +
+				"		}\n" +
+				"	}\n" +
+				"}"
+			};
+			IJavaProject p2 = setupModuleProject("com.greetings", src, new IClasspathEntry[] { dep });
+			p2.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p2.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers",	"",  markers);
+		} finally {
+			deleteProject("org.astro");
+			deleteProject("com.greetings");
+		}
+	}
+	public void test_services_NonStatic_NestedClass() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			String[] sources = new String[] {
+				"src/module-info.java",
+				"module org.astro {\n" +
+				"	exports org.astro;\n" + 
+				"}",
+				"src/org/astro/World.java",
+				"package org.astro;\n" +
+				"public interface World {\n" +
+				"	public String name();\n" +
+				"}"
+			};
+			IJavaProject p1 = setupModuleProject("org.astro", sources);
+			IClasspathAttribute modAttr = new ClasspathAttribute("module", "true");
+			IClasspathEntry dep = JavaCore.newProjectEntry(p1.getPath(), null, false,
+				new IClasspathAttribute[] {modAttr},
+				false/*not exported*/);
+			String[] src = new String[] {
+				"src/module-info.java",
+				"module com.greetings {\n" +
+				"	requires org.astro;\n" +
+				"	exports com.greetings;\n" +
+				"	provides org.astro.World with com.greetings.MyWorld.Nested;\n" +
+				"}",
+				"src/com/greetings/MyWorld.java",
+				"package com.greetings;\n" +
+				"import org.astro.World;\n" +
+				"public class MyWorld {\n" +
+				"	public class Nested implements World {\n" +
+				"		public String name() {\n" +
+				"			return \" My World!!\";\n" +
+				"		}\n" +
+				"	}\n" +
+				"}"
+			};
+			IJavaProject p2 = setupModuleProject("com.greetings", src, new IClasspathEntry[] { dep });
+			p2.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p2.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers",
+					"Invalid service implementation, the type com.greetings.MyWorld.Nested is an inner class",  markers);
+		} finally {
+			deleteProject("org.astro");
+			deleteProject("com.greetings");
+		}
+	}
+	public void test_services_ImplDefinedInAnotherModule() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			String[] sources = new String[] {
+				"src/module-info.java",
+				"module org.astro {\n" +
+				"	exports org.astro;\n" + 
+				"}",
+				"src/org/astro/World.java",
+				"package org.astro;\n" +
+				"public interface World {\n" +
+				"	public String name();\n" +
+				"}",
+				"src/org/astro/AstroWorld.java",
+				"package org.astro;\n" +
+				"public class AstroWorld implements World{\n" +
+				"}"
+			};
+			IJavaProject p1 = setupModuleProject("org.astro", sources);
+			IClasspathAttribute modAttr = new ClasspathAttribute("module", "true");
+			IClasspathEntry dep = JavaCore.newProjectEntry(p1.getPath(), null, false,
+				new IClasspathAttribute[] {modAttr},
+				false/*not exported*/);
+			String[] src = new String[] {
+				"src/module-info.java",
+				"module com.greetings {\n" +
+				"	requires org.astro;\n" +
+				"	provides org.astro.World with org.astro.AstroWorld;\n" +
+				"}"
+			};
+			IJavaProject p2 = setupModuleProject("com.greetings", src, new IClasspathEntry[] { dep });
+			p2.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p2.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers",
+					"Service implementation org.astro.AstroWorld is not defined in the module with the provides directive",  markers);
+		} finally {
+			deleteProject("org.astro");
+			deleteProject("com.greetings");
+		}
+	}
+	public void test_services_ProviderMethod() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			String[] sources = new String[] {
+				"src/module-info.java",
+				"module org.astro {\n" +
+				"	exports org.astro;\n" + 
+				"}",
+				"src/org/astro/World.java",
+				"package org.astro;\n" +
+				"public interface World {\n" +
+				"	public String name();\n" +
+				"}"
+			};
+			IJavaProject p1 = setupModuleProject("org.astro", sources);
+			IClasspathAttribute modAttr = new ClasspathAttribute("module", "true");
+			IClasspathEntry dep = JavaCore.newProjectEntry(p1.getPath(), null, false,
+				new IClasspathAttribute[] {modAttr},
+				false/*not exported*/);
+			String[] src = new String[] {
+				"src/module-info.java",
+				"module com.greetings {\n" +
+				"	requires org.astro;\n" +
+				"	exports com.greetings;\n" +
+				"	provides org.astro.World with com.greetings.MyImpl;\n" +
+				"}",
+				"src/com/greetings/MyImpl.java",
+				"package com.greetings;\n" +
+				"public class MyImpl {\n" +
+				"	public static MyWorld provider() {\n" +
+				"		return new MyWorld(\"Name\");\n" +
+				"	}\n" +
+				"}",
+				"src/com/greetings/MyWorld.java",
+				"package com.greetings;\n" +
+				"import org.astro.World;\n" +
+				"public class MyWorld implements World {\n" +
+				"	public MyWorld(String name) { }\n" +
+				"	public String name() {\n" +
+				"		return \" My World!!\";\n" +
+				"	}\n" +
+				"}"
+			};
+			IJavaProject p2 = setupModuleProject("com.greetings", src, new IClasspathEntry[] { dep });
+			p2.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p2.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers",	"",  markers);
+		} finally {
+			deleteProject("org.astro");
+			deleteProject("com.greetings");
+		}
+	}
+	public void test_services_ProviderMethod_ReturnTypeFromAnotherModule() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			String[] sources = new String[] {
+				"src/module-info.java",
+				"module org.astro {\n" +
+				"	exports org.astro;\n" + 
+				"}",
+				"src/org/astro/World.java",
+				"package org.astro;\n" +
+				"public interface World {\n" +
+				"	public String name();\n" +
+				"}"
+			};
+			setupModuleProject("org.astro", sources, true);
+			sources = new String[] {
+				"src/module-info.java",
+				"module other.mod {\n" +
+				"	requires org.astro;\n" + 
+				"	exports org.impl;\n" + 
+				"}",
+				"src/org/impl/MyWorld.java",
+				"package org.impl;\n" +
+				"import org.astro.World;\n" +
+				"public class MyWorld implements World {\n" +
+				"	public String name() {\n" +
+				"		return \" My World!!\";\n" +
+				"	}\n" +
+				"}"
+			};
+			setupModuleProject("other.mod", sources, true);
+			String[] src = new String[] {
+				"src/module-info.java",
+				"module com.greetings {\n" +
+				"	requires org.astro;\n" +
+				"	requires transitive other.mod;\n" +
+				"	exports com.greetings;\n" +
+				"	provides org.astro.World with com.greetings.MyImpl;\n" +
+				"}",
+				"src/com/greetings/MyImpl.java",
+				"package com.greetings;\n" +
+				"import org.impl.MyWorld;\n" +
+				"public class MyImpl {\n" +
+				"	public static MyWorld provider() {\n" +
+				"		return new MyWorld();\n" +
+				"	}\n" +
+				"}"
+			};
+			IJavaProject p3 = setupModuleProject("com.greetings", src, true);
+			p3.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p3.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers",	"",  markers);
+		} finally {
+			deleteProject("org.astro");
+			deleteProject("other.mod");
+			deleteProject("com.greetings");
+		}
+	}
+	public void test_services_ProviderMethod_ReturnTypeInvisible() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			String[] sources = new String[] {
+				"src/module-info.java",
+				"module org.astro {\n" +
+				"	exports org.astro;\n" + 
+				"}",
+				"src/org/astro/World.java",
+				"package org.astro;\n" +
+				"public interface World {\n" +
+				"	public String name();\n" +
+				"}"
+			};
+			setupModuleProject("org.astro", sources, true);
+			sources = new String[] {
+				"src/module-info.java",
+				"module other.mod {\n" +
+				"	requires org.astro;\n" + 
+				"}",
+				"src/org/impl/MyWorld.java",
+				"package org.impl;\n" +
+				"import org.astro.World;\n" +
+				"public class MyWorld implements World {\n" +
+				"	public String name() {\n" +
+				"		return \" My World!!\";\n" +
+				"	}\n" +
+				"}"
+			};
+			setupModuleProject("other.mod", sources, true);
+			String[] src = new String[] {
+				"src/module-info.java",
+				"module com.greetings {\n" +
+				"	requires org.astro;\n" +
+				"	requires other.mod;\n" +
+				"	exports com.greetings;\n" +
+				"	provides org.astro.World with com.greetings.MyImpl;\n" +
+				"}",
+				"src/com/greetings/MyImpl.java",
+				"package com.greetings;\n" +
+				"import org.impl.MyWorld;\n" +
+				"public class MyImpl {\n" +
+				"	public static MyWorld provider() {\n" +
+				"		return new MyWorld();\n" +
+				"	}\n" +
+				"}"
+			};
+			IJavaProject p3 = setupModuleProject("com.greetings", src, true);
+			p3.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p3.getProject().getFile(new Path("src/module-info.java")).findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers",	"MyWorld cannot be resolved to a type",  markers);
+		} finally {
+			deleteProject("org.astro");
+			deleteProject("other.mod");
+			deleteProject("com.greetings");
+		}
+	}
+	public void test_services_ProviderMethod_InvalidReturnType() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			String[] sources = new String[] {
+				"src/module-info.java",
+				"module org.astro {\n" +
+				"	exports org.astro;\n" + 
+				"}",
+				"src/org/astro/World.java",
+				"package org.astro;\n" +
+				"public interface World {\n" +
+				"	public String name();\n" +
+				"}"
+			};
+			IJavaProject p1 = setupModuleProject("org.astro", sources);
+			IClasspathAttribute modAttr = new ClasspathAttribute("module", "true");
+			IClasspathEntry dep = JavaCore.newProjectEntry(p1.getPath(), null, false,
+				new IClasspathAttribute[] {modAttr},
+				false/*not exported*/);
+			String[] src = new String[] {
+				"src/module-info.java",
+				"module com.greetings {\n" +
+				"	requires org.astro;\n" +
+				"	exports com.greetings;\n" +
+				"	provides org.astro.World with com.greetings.MyImpl;\n" +
+				"}",
+				"src/com/greetings/MyImpl.java",
+				"package com.greetings;\n" +
+				"public class MyImpl {\n" +
+				"	public static MyWorld provider() {\n" +
+				"		return new MyWorld(\"Name\");\n" +
+				"	}\n" +
+				"}",
+				"src/com/greetings/MyWorld.java",
+				"package com.greetings;\n" +
+				"public class MyWorld {\n" +
+				"	public MyWorld(String name) { }\n" +
+				"	public String name() {\n" +
+				"		return \" My World!!\";\n" +
+				"	}\n" +
+				"}"
+			};
+			IJavaProject p2 = setupModuleProject("com.greetings", src, new IClasspathEntry[] { dep });
+			p2.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p2.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers",	"Type mismatch: cannot convert from MyWorld to World",  markers);
+		} finally {
+			deleteProject("org.astro");
+			deleteProject("com.greetings");
+		}
+	}
+	public void test_services_DuplicateImplEntries() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			String[] sources = new String[] {
+				"src/module-info.java",
+				"module org.astro {\n" +
+				"	exports org.astro;\n" + 
+				"}",
+				"src/org/astro/World.java",
+				"package org.astro;\n" +
+				"public interface World {\n" +
+				"	public String name();\n" +
+				"}"
+			};
+			IJavaProject p1 = setupModuleProject("org.astro", sources);
+			IClasspathAttribute modAttr = new ClasspathAttribute("module", "true");
+			IClasspathEntry dep = JavaCore.newProjectEntry(p1.getPath(), null, false,
+				new IClasspathAttribute[] {modAttr},
+				false/*not exported*/);
+			String[] src = new String[] {
+				"src/module-info.java",
+				"module com.greetings {\n" +
+				"	requires org.astro;\n" +
+				"	exports com.greetings;\n" +
+				"	provides org.astro.World with com.greetings.MyWorld, com.greetings.MyWorld;\n" +
+				"}",
+				"src/com/greetings/MyWorld.java",
+				"package com.greetings;\n" +
+				"import org.astro.World;\n" +
+				"public class MyWorld implements World {\n" +
+				"	public String name() {\n" +
+				"		return \" My World!!\";\n" +
+				"	}\n" +
+				"}"
+			};
+			IJavaProject p2 = setupModuleProject("com.greetings", src, new IClasspathEntry[] { dep });
+			p2.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p2.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers",
+					"Duplicate service entry: com.greetings.MyWorld",  markers);
+		} finally {
+			deleteProject("org.astro");
+			deleteProject("com.greetings");
+		}
+	}
+	public void test_services_InvalidIntfType() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			String[] src = new String[] {
+				"src/module-info.java",
+				"module com.greetings {\n" +
+				"	exports com.greetings;\n" +
+				"	provides com.greetings.MyEnum with com.greetings.MyEnum;\n" +
+				"}",
+				"src/com/greetings/MyEnum.java",
+				"package com.greetings;\n" +
+				"public enum MyEnum {}"
+			};
+			IJavaProject p2 = setupModuleProject("com.greetings", src);
+			p2.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p2.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			sortMarkers(markers);
+			assertMarkers("Unexpected markers",
+					"Invalid service interface com.greetings.MyEnum, must be a class, interface or annotation type\n" +
+					"Invalid service implementation com.greetings.MyEnum, must be a public class or interface type",  markers);
+		} finally {
+			deleteProject("com.greetings");
+		}
+	}
+	public void test_services_InvalidImplType() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			String[] sources = new String[] {
+				"src/module-info.java",
+				"module org.astro {\n" +
+				"	exports org.astro;\n" + 
+				"}",
+				"src/org/astro/World.java",
+				"package org.astro;\n" +
+				"public interface World {\n" +
+				"	public String name();\n" +
+				"}"
+			};
+			IJavaProject p1 = setupModuleProject("org.astro", sources);
+			IClasspathAttribute modAttr = new ClasspathAttribute("module", "true");
+			IClasspathEntry dep = JavaCore.newProjectEntry(p1.getPath(), null, false,
+				new IClasspathAttribute[] {modAttr},
+				false/*not exported*/);
+			String[] src = new String[] {
+				"src/module-info.java",
+				"module com.greetings {\n" +
+				"	requires org.astro;\n" +
+				"	exports com.greetings;\n" +
+				"	provides org.astro.World with com.greetings.MyEnum;\n" +
+				"}",
+				"src/com/greetings/MyEnum.java",
+				"package com.greetings;\n" +
+				"public enum MyEnum implements org.astro.World {}"
+			};
+			IJavaProject p2 = setupModuleProject("com.greetings", src, new IClasspathEntry[] { dep });
+			p2.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p2.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers",
+					"Invalid service implementation com.greetings.MyEnum, must be a public class or interface type",  markers);
+		} finally {
+			deleteProject("org.astro");
+			deleteProject("com.greetings");
+		}
+	}
+	public void test_services_nonPublicImpl() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			String[] sources = new String[] {
+				"src/module-info.java",
+				"module org.astro {\n" +
+				"	exports org.astro;\n" + 
+				"}",
+				"src/org/astro/World.java",
+				"package org.astro;\n" +
+				"public interface World {\n" +
+				"	public String name();\n" +
+				"}"
+			};
+			IJavaProject p1 = setupModuleProject("org.astro", sources);
+			IClasspathAttribute modAttr = new ClasspathAttribute("module", "true");
+			IClasspathEntry dep = JavaCore.newProjectEntry(p1.getPath(), null, false,
+				new IClasspathAttribute[] {modAttr},
+				false/*not exported*/);
+			String[] src = new String[] {
+				"src/module-info.java",
+				"module com.greetings {\n" +
+				"	requires org.astro;\n" +
+				"	exports com.greetings;\n" +
+				"	provides org.astro.World with com.greetings.MyWorld;\n" +
+				"}",
+				"src/com/greetings/MyWorld.java",
+				"package com.greetings;\n" +
+				"import org.astro.World;\n" +
+				"class MyWorld implements World {\n" +
+				"	public String name() {\n" +
+				"		return \" My World!!\";\n" +
+				"	}\n" +
+				"}"
+			};
+			IJavaProject p2 = setupModuleProject("com.greetings", src, new IClasspathEntry[] { dep });
+			p2.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p2.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers",
+					"The type com.greetings.MyWorld is not visible",  markers);
+		} finally {
+			deleteProject("org.astro");
+			deleteProject("com.greetings");
+		}
+	}
+	public void test_Exports_Error() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			String[] src = new String[] {
+				"src/module-info.java",
+				"module com.greetings {\n" +
+				"	exports com.greetings;\n" +
+				"}"
+			};
+			IJavaProject p2 = setupModuleProject("com.greetings", src);
+			p2.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p2.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers",	
+					"The package com.greetings does not exist or is empty",  markers);
+		} finally {
+			deleteProject("com.greetings");
+		}
+	}
+	public void test_DuplicateExports() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			String[] sources = new String[] {
+				"src/module-info.java",
+				"module org.astro {\n" +
+				"	exports org.astro;\n" + 
+				"	exports org.astro;\n" + 
+				"}",
+				"src/org/astro/World.java",
+				"package org.astro;\n" +
+				"public interface World {\n" +
+				"	public String name();\n" +
+				"}"
+			};
+			IJavaProject p1 = setupModuleProject("org.astro", sources);
+			p1.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p1.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers",	
+					"Duplicate exports entry: org.astro",  markers);
+		} finally {
+			deleteProject("org.astro");
+		}
+	}
+	public void test_TargetedExports_Duplicates() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			String[] sources = new String[] {
+				"src/module-info.java",
+				"module org.astro {\n" +
+				"	exports org.astro to com.greetings, com.greetings;\n" + 
+				"}",
+				"src/org/astro/World.java",
+				"package org.astro;\n" +
+				"public interface World {\n" +
+				"	public String name();\n" +
+				"}"
+			};
+			IJavaProject p1 = setupModuleProject("org.astro", sources);
+			IClasspathEntry dep = JavaCore.newProjectEntry(p1.getPath());
+			String[] src = new String[] {
+				"src/module-info.java",
+				"module com.greetings {\n" +
+				"	requires org.astro;\n" +
+				"	exports com.greetings;\n" +
+				"}",
+				"src/com/greetings/MyWorld.java",
+				"package com.greetings;\n" +
+				"import org.astro.World;\n" +
+				"public class MyWorld implements World {\n" +
+				"	public String name() {\n" +
+				"		return \" My World!!\";\n" +
+				"	}\n" +
+				"}"
+			};
+			setupModuleProject("com.greetings", src, new IClasspathEntry[] { dep });
+			p1.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p1.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers",	
+					"Duplicate module name: com.greetings",  markers);
+		} finally {
+			deleteProject("org.astro");
+			deleteProject("com.greetings");
+		}
+	}
+	// Types from source module should be resolved in target module
+	// when package is exported specifically to the target module
+	public void test_TargetedExports() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			String[] sources = new String[] {
+				"src/module-info.java",
+				"module org.astro {\n" +
+				"	exports org.astro to com.greetings;\n" + 
+				"}",
+				"src/org/astro/World.java",
+				"package org.astro;\n" +
+				"public interface World {\n" +
+				"	public String name();\n" +
+				"}"
+			};
+			IJavaProject p1 = setupModuleProject("org.astro", sources);
+			IClasspathAttribute modAttr = new ClasspathAttribute("module", "true");
+			IClasspathEntry dep = JavaCore.newProjectEntry(p1.getPath(), null, false,
+				new IClasspathAttribute[] {modAttr},
+				false/*not exported*/);
+			String[] src = new String[] {
+				"src/module-info.java",
+				"module com.greetings {\n" +
+				"	requires org.astro;\n" +
+				"	exports com.greetings;\n" +
+				"}",
+				"src/com/greetings/MyWorld.java",
+				"package com.greetings;\n" +
+				"import org.astro.World;\n" +
+				"public class MyWorld implements World {\n" +
+				"	public String name() {\n" +
+				"		return \" My World!!\";\n" +
+				"	}\n" +
+				"}"
+			};
+			IJavaProject p2 = setupModuleProject("com.greetings", src, new IClasspathEntry[] { dep });
+			p2.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p2.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers",	"",  markers);
+		} finally {
+			deleteProject("org.astro");
+			deleteProject("com.greetings");
+		}
+	}
+	// Types in one module should not be visible in target module when
+	// source module exports packages to a specific module which is not
+	// the same as the target module
+	public void test_TargetedExports_Error() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			String[] sources = new String[] {
+				"src/module-info.java",
+				"module some.mod { }",
+			};
+			setupModuleProject("some.mod", sources);
+			sources = new String[] {
+				"src/module-info.java",
+				"module org.astro {\n" +
+				"	exports org.astro to some.mod;\n" + 
+				"}",
+				"src/org/astro/World.java",
+				"package org.astro;\n" +
+				"public interface World {\n" +
+				"	public String name();\n" +
+				"}"
+			};
+			IJavaProject p1 = setupModuleProject("org.astro", sources);
+			IClasspathAttribute modAttr = new ClasspathAttribute("module", "true");
+			IClasspathEntry dep = JavaCore.newProjectEntry(p1.getPath(), null, false,
+				new IClasspathAttribute[] {modAttr},
+				false/*not exported*/);
+			String[] src = new String[] {
+				"src/module-info.java",
+				"module com.greetings {\n" +
+				"	requires org.astro;\n" +
+				"	exports com.greetings;\n" +
+				"}",
+				"src/com/greetings/MyWorld.java",
+				"package com.greetings;\n" +
+				"import org.astro.World;\n" +
+				"public class MyWorld implements World {\n" +
+				"	public String name() {\n" +
+				"		return \" My World!!\";\n" +
+				"	}\n" +
+				"}"
+			};
+			IJavaProject p2 = setupModuleProject("com.greetings", src, new IClasspathEntry[] { dep });
+			p2.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p2.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			sortMarkers(markers);
+			assertMarkers("Unexpected markers",	
+					"The type org.astro.World is not accessible\n" +
+					"World cannot be resolved to a type",
+					markers);
+		} finally {
+			deleteProject("some.mod");
+			deleteProject("org.astro");
+			deleteProject("com.greetings");
+		}
+	}
+	// It is permitted for the to clause of an exports or opens statement to 
+	// specify a module which is not observable
+	public void test_TargetedExports_Unresolved() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			String[] sources = new String[] {
+				"src/module-info.java",
+				"module org.astro {\n" +
+				"	exports org.astro to some.mod;\n" + 
+				"}",
+				"src/org/astro/World.java",
+				"package org.astro;\n" +
+				"public interface World {\n" +
+				"	public String name();\n" +
+				"}"
+			};
+			IJavaProject p1 = setupModuleProject("org.astro", sources);
+			p1.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p1.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers",	"",  markers);
+		} finally {
+			deleteProject("org.astro");
+		}
+	}
+	// Target module of an exports statement should be resolved without having an explicit
+	// dependency to the project that defines the module
+	public void test_TargetedExports_Resolution() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			String[] sources = new String[] {
+				"src/module-info.java",
+				"module some.mod {\n" +
+				"}"
+			};
+			setupModuleProject("some.mod", sources);
+			sources = new String[] {
+				"src/module-info.java",
+				"module org.astro {\n" +
+				"	exports org.astro to some.mod;\n" + 
+				"}",
+				"src/org/astro/World.java",
+				"package org.astro;\n" +
+				"public interface World {\n" +
+				"	public String name();\n" +
+				"}"
+			};
+			IJavaProject p1 = setupModuleProject("org.astro", sources);
+			p1.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p1.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers", "",  markers);
+		} finally {
+			deleteProject("org.astro");
+			deleteProject("some.mod");
+		}
+	}
+	// Make sure modules in the workspace are resolved via the module source path container
+	// without needing to add a dependency to the project explicitly
+	public void test_ModuleSourcePathContainer() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			String[] sources = new String[] {
+				"src/module-info.java",
+				"module org.astro {\n" +
+				"	exports org.astro;\n" + 
+				"}",
+				"src/org/astro/World.java",
+				"package org.astro;\n" +
+				"public interface World {\n" +
+				"	public String name();\n" +
+				"}"
+			};
+			setupModuleProject("org.astro", sources);
+			String[] src = new String[] {
+				"src/module-info.java",
+				"module com.greetings {\n" +
+				"	requires org.astro;\n" +
+				"	exports com.greetings;\n" +
+				"}",
+				"src/com/greetings/MyWorld.java",
+				"package com.greetings;\n" +
+				"import org.astro.World;\n" +
+				"public class MyWorld implements World {\n" +
+				"	public String name() {\n" +
+				"		return \" My World!!\";\n" +
+				"	}\n" +
+				"}"
+			};
+			IClasspathEntry dep = JavaCore.newContainerEntry(new Path(JavaCore.MODULE_PATH_CONTAINER_ID));
+			IJavaProject p2 = setupModuleProject("com.greetings", src, new IClasspathEntry[] { dep });
+			p2.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p2.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers", "",  markers);
+		} finally {
+			deleteProject("org.astro");
+			deleteProject("com.greetings");
+		}
+	}
+	// Make sure module path container picks up changes to module-info
+	public void _test_ModuleSourcePath_update() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			String[] sources = new String[] {
+				"src/module-info.java",
+				"module some.mod {\n" +
+				"}"
+			};
+			setupModuleProject("some.mod", sources);
+			sources = new String[] {
+				"src/module-info.java",
+				"module org.astro {\n" +
+				"	exports org.astro;\n" + 
+				"}",
+				"src/org/astro/World.java",
+				"package org.astro;\n" +
+				"public interface World {\n" +
+				"	public String name();\n" +
+				"}"
+			};
+			setupModuleProject("org.astro", sources);
+			String[] src = new String[] {
+				"src/module-info.java",
+				"module com.greetings {\n" +
+				"	requires org.astro;\n" +
+				"	exports com.greetings;\n" +
+				"}",
+				"src/com/greetings/MyWorld.java",
+				"package com.greetings;\n" +
+				"import org.astro.World;\n" +
+				"public class MyWorld implements World {\n" +
+				"	public String name() {\n" +
+				"		return \" My World!!\";\n" +
+				"	}\n" +
+				"}"
+			};
+			IClasspathEntry dep = JavaCore.newContainerEntry(new Path(JavaCore.MODULE_PATH_CONTAINER_ID));
+			IJavaProject p2 = setupModuleProject("com.greetings", src, new IClasspathEntry[] { dep });
+			this.editFile("com.greetings/src/module-info.java",
+				"module com.greetings {\n" +
+				"	requires org.astro;\n" +
+				"	requires some.mod;\n" +
+				"	exports com.greetings;\n" +
+				"}");
+			p2.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p2.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers", "",  markers);
+		} finally {
+			deleteProject("org.astro");
+			deleteProject("some.mod");
+			deleteProject("com.greetings");
+		}
+	}
+	// Implicit module dependencies via the 'requires transitive' directive should be
+	// resolved via the module path container
+	public void test_ModuleSourcePath_implicitdeps() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			String[] sources = new String[] {
+				"src/module-info.java",
+				"module org.astro {\n" +
+				"	exports org.astro;\n" + 
+				"}",
+				"src/org/astro/World.java",
+				"package org.astro;\n" +
+				"public interface World {\n" +
+				"	public String name();\n" +
+				"}"
+			};
+			IClasspathEntry dep = JavaCore.newContainerEntry(new Path(JavaCore.MODULE_PATH_CONTAINER_ID));
+			setupModuleProject("org.astro", sources, new IClasspathEntry[]{dep});
+			sources = new String[] {
+				"src/module-info.java",
+				"module some.mod {\n" +
+				"	requires transitive org.astro;\n" +
+				"}"
+			};
+			setupModuleProject("some.mod", sources, new IClasspathEntry[]{dep});
+			String[] src = new String[] {
+				"src/module-info.java",
+				"module com.greetings {\n" +
+				"	requires some.mod;\n" +
+				"	exports com.greetings;\n" +
+				"}",
+				"src/com/greetings/MyWorld.java",
+				"package com.greetings;\n" +
+				"import org.astro.World;\n" +
+				"public class MyWorld implements World {\n" +
+				"	public String name() {\n" +
+				"		return \" My World!!\";\n" +
+				"	}\n" +
+				"}"
+			};
+			
+			IJavaProject p2 = setupModuleProject("com.greetings", src, new IClasspathEntry[] { dep });
+			p2.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p2.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers", "",  markers);
+		} finally {
+			deleteProject("org.astro");
+			deleteProject("some.mod");
+			deleteProject("com.greetings");
+		}
+	}
+	// Changes to implicit dependencies should be reflected
+	public void test_ModuleSourcePath_implicitdeps2() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			String[] sources = new String[] {
+				"src/module-info.java",
+				"module some.mod {\n" +
+				"	requires transitive org.astro;\n" +
+				"}"
+			};
+			IClasspathEntry dep = JavaCore.newContainerEntry(new Path(JavaCore.MODULE_PATH_CONTAINER_ID));
+			setupModuleProject("some.mod", sources, new IClasspathEntry[]{dep});
+			sources = new String[] {
+				"src/module-info.java",
+				"module org.astro {\n" +
+				"	exports org.astro;\n" + 
+				"}",
+				"src/org/astro/World.java",
+				"package org.astro;\n" +
+				"public interface World {\n" +
+				"	public String name();\n" +
+				"}"
+			};
+			setupModuleProject("org.astro", sources, new IClasspathEntry[]{dep});
+			String[] src = new String[] {
+				"src/module-info.java",
+				"module com.greetings {\n" +
+				"	requires some.mod;\n" +
+				"	exports com.greetings;\n" +
+				"}",
+				"src/com/greetings/MyWorld.java",
+				"package com.greetings;\n" +
+				"import org.astro.World;\n" +
+				"public class MyWorld implements World {\n" +
+				"	public String name() {\n" +
+				"		return \" My World!!\";\n" +
+				"	}\n" +
+				"}"
+			};
+			
+			IJavaProject p2 = setupModuleProject("com.greetings", src, new IClasspathEntry[] { dep });
+			this.editFile("some.mod/src/module-info.java",
+				"module some.mod {\n" +
+				"	requires org.astro;\n" +
+				"}");
+			p2.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p2.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			sortMarkers(markers);
+			assertMarkers("Unexpected markers", 
+					"The type org.astro.World is not accessible\n" +
+					"World cannot be resolved to a type",  markers);
+		} finally {
+			deleteProject("org.astro");
+			deleteProject("some.mod");
+			deleteProject("com.greetings");
+		}
+	}
+	// Changes to implicit dependencies should be reflected
+	//TODO enable once we know how to update project cache
+	public void _test_ModuleSourcePath_implicitdeps3() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			String[] sources = new String[] {
+				"src/module-info.java",
+				"module some.mod {\n" +
+				"	requires org.astro;\n" +
+				"}"
+			};
+			IClasspathEntry dep = JavaCore.newContainerEntry(new Path(JavaCore.MODULE_PATH_CONTAINER_ID));
+			setupModuleProject("some.mod", sources, new IClasspathEntry[]{dep});
+			sources = new String[] {
+				"src/module-info.java",
+				"module org.astro {\n" +
+				"	exports org.astro;\n" + 
+				"}",
+				"src/org/astro/World.java",
+				"package org.astro;\n" +
+				"public interface World {\n" +
+				"	public String name();\n" +
+				"}"
+			};
+			setupModuleProject("org.astro", sources, new IClasspathEntry[]{dep});
+			String[] src = new String[] {
+				"src/module-info.java",
+				"module com.greetings {\n" +
+				"	requires some.mod;\n" +
+				"	exports com.greetings;\n" +
+				"}",
+				"src/com/greetings/MyWorld.java",
+				"package com.greetings;\n" +
+				"import org.astro.World;\n" +
+				"public class MyWorld implements World {\n" +
+				"	public String name() {\n" +
+				"		return \" My World!!\";\n" +
+				"	}\n" +
+				"}"
+			};
+			
+			IJavaProject p2 = setupModuleProject("com.greetings", src, new IClasspathEntry[] { dep });
+			this.editFile("some.mod/src/module-info.java",
+				"module some.mod {\n" +
+				"	requires transitive org.astro;\n" +
+				"}");
+			p2.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p2.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers", "",  markers);
+		} finally {
+			deleteProject("org.astro");
+			deleteProject("some.mod");
+			deleteProject("com.greetings");
+		}
+	}
+	public void test_Cycle_In_Module_Dependency() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			String[] sources = new String[] {
+				"src/module-info.java",
+				"module org.astro {\n" +
+				"	exports org.astro;\n" +
+				"}",
+				"src/org/astro/World.java",
+				"package org.astro;\n" +
+				"public interface World {\n" +
+				"	public String name();\n" +
+				"}"
+			};
+			IClasspathEntry dep = JavaCore.newContainerEntry(new Path(JavaCore.MODULE_PATH_CONTAINER_ID));
+			setupModuleProject("org.astro", sources, new IClasspathEntry[]{dep});
+			sources = new String[] {
+				"src/module-info.java",
+				"module some.mod {\n" +
+				"	requires org.astro;\n" +
+				"}"
+			};
+			setupModuleProject("some.mod", sources, new IClasspathEntry[]{dep});
+			String[] src = new String[] {
+				"src/module-info.java",
+				"module com.greetings {\n" +
+				"	requires some.mod;\n" +
+				"	exports com.greetings;\n" +
+				"}"
+			};
+			
+			IJavaProject p2 = setupModuleProject("com.greetings", src, new IClasspathEntry[] { dep });
+			editFile("org.astro/src/module-info.java", 
+					"module org.astro {\n" +
+					"	exports org.astro;\n" +
+					"	requires com.greetings;\n" +
+					"}");
+			waitForAutoBuild();
+			getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			assertTrue("Should detect cycle", p2.hasClasspathCycle(null));
+		} finally {
+			deleteProject("org.astro");
+			deleteProject("some.mod");
+			deleteProject("com.greetings");
+		}
+	}
+	public void test_Cycle_In_Implicit_Module_Dependency() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			String[] sources = new String[] {
+				"src/module-info.java",
+				"module org.astro {\n" +
+				"	exports org.astro;\n" +
+				"}",
+				"src/org/astro/World.java",
+				"package org.astro;\n" +
+				"public interface World {\n" +
+				"	public String name();\n" +
+				"}"
+			};
+			IClasspathEntry dep = JavaCore.newContainerEntry(new Path(JavaCore.MODULE_PATH_CONTAINER_ID));
+			setupModuleProject("org.astro", sources, new IClasspathEntry[]{dep});
+			sources = new String[] {
+				"src/module-info.java",
+				"module some.mod {\n" +
+				"	requires transitive org.astro;\n" +
+				"}"
+			};
+			setupModuleProject("some.mod", sources, new IClasspathEntry[]{dep});
+			String[] src = new String[] {
+				"src/module-info.java",
+				"module com.greetings {\n" +
+				"	requires some.mod;\n" +
+				"	exports com.greetings;\n" +
+				"}"
+			};
+			IJavaProject p2 = setupModuleProject("com.greetings", src, new IClasspathEntry[] { dep });
+			editFile("org.astro/src/module-info.java", 
+				"module org.astro {\n" +
+				"	exports org.astro;\n" +
+				"	requires transitive com.greetings;\n" +
+				"}");
+			waitForAutoBuild();
+			getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			assertTrue("Should detect cycle", p2.hasClasspathCycle(null));
+		} finally {
+			deleteProject("org.astro");
+			deleteProject("some.mod");
+			deleteProject("com.greetings");
+		}
+	}
+	public void test_bug506479() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			String[] sources = new String[] {
+					"src/module-info.java",
+					"module org.astro {\n" +
+					"	exports org.astro;\n" +
+					"}",
+					"src/org/astro/World.java",
+					"package org.astro;\n" +
+					"public interface World {\n" +
+					"	public String name();\n" +
+					"}"
+				};
+			IClasspathEntry dep = JavaCore.newContainerEntry(new Path(JavaCore.MODULE_PATH_CONTAINER_ID));
+			IJavaProject p1 = setupModuleProject("org.astro", sources, new IClasspathEntry[]{dep});
+			IWorkspaceDescription desc = p1.getProject().getWorkspace().getDescription();
+			desc.setAutoBuilding(false);
+			p1.getProject().getWorkspace().setDescription(desc);
+			this.deleteFile("org.astro/src/module-info.java");
+			this.createFile(
+					"org.astro/src/module-info.java",
+					"module org.astro {\n" +
+					"	exports org.astro;\n" +
+					"}");
+			p1.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+		} finally {
+			deleteProject("org.astro");
+		}
+	}
+	public void test_Multiple_SourceFolders() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			String[] sources = new String[] {
+				"src/module-info.java",
+				"module org.astro {\n" +
+				"	exports org.astro;\n" + 
+				"}",
+				"src/org/astro/World.java",
+				"package org.astro;\n" +
+				"public interface World {\n" +
+				"	public String name();\n" +
+				"}",
+				"othersrc/org/astro/OtherWorld.java",
+				"package org.astro;\n" +
+				"import org.astro.World;\n" +
+				"public interface OtherWorld {\n" +
+				"	default public String name() {\n" +
+				"		return \" Other World!!\";\n" +
+				"	}\n" +
+				"}"
+			};
+			setupModuleProject("org.astro", new String[]{"src", "othersrc"}, sources, null);
+			String[] src = new String[] {
+				"src/module-info.java",
+				"module com.greetings {\n" +
+				"	requires org.astro;\n" +
+				"	exports com.greetings;\n" +
+				"}",
+				"src/com/greetings/MyWorld.java",
+				"package com.greetings;\n" +
+				"import org.astro.World;\n" +
+				"public class MyWorld implements World {\n" +
+				"	public String name() {\n" +
+				"		return \" My World!!\";\n" +
+				"	}\n" +
+				"}",
+				"othersrc/com/greetings/AnotherWorld.java",
+				"package com.greetings;\n" +
+				"import org.astro.OtherWorld;\n" +
+				"public class AnotherWorld implements OtherWorld {\n" +
+				"	public String name() {\n" +
+				"		return \" Another World!!\";\n" +
+				"	}\n" +
+				"}"
+			};
+			IClasspathEntry dep = JavaCore.newContainerEntry(new Path(JavaCore.MODULE_PATH_CONTAINER_ID));
+			IJavaProject p2 = setupModuleProject("com.greetings", new String[]{"src", "othersrc"}, src, new IClasspathEntry[] { dep });
+			p2.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p2.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers", "",  markers);
+		} finally {
+			deleteProject("org.astro");
+			deleteProject("com.greetings");
+		}
+	}
+	public void test_Multiple_SourceFolders_WithModuleInfo() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			String[] sources = new String[] {
+				"src/module-info.java",
+				"module org.astro {\n" +
+				"	exports org.astro;\n" + 
+				"}",
+				"src/org/astro/World.java",
+				"package org.astro;\n" +
+				"public interface World {\n" +
+				"	public String name();\n" +
+				"}",
+				"othersrc/org/astro/OtherWorld.java",
+				"package org.astro;\n" +
+				"import org.astro.World;\n" +
+				"public interface OtherWorld {\n" +
+				"	default public String name() {\n" +
+				"		return \" Other World!!\";\n" +
+				"	}\n" +
+				"}"
+			};
+			setupModuleProject("org.astro", new String[]{"src", "othersrc"}, sources, null);
+			String[] src = new String[] {
+				"src/module-info.java",
+				"module com.greetings {\n" +
+				"	requires org.astro;\n" +
+				"	exports com.greetings;\n" +
+				"}",
+				"src/com/greetings/MyWorld.java",
+				"package com.greetings;\n" +
+				"import org.astro.World;\n" +
+				"public class MyWorld implements World {\n" +
+				"	public String name() {\n" +
+				"		return \" My World!!\";\n" +
+				"	}\n" +
+				"}",
+				"othersrc/module-info.java",
+				"module com.greetings1 {\n" +
+				"	requires org.astro;\n" +
+				"	exports com.greetings;\n" +
+				"}",
+				"othersrc/com/greetings/AnotherWorld.java",
+				"package com.greetings;\n" +
+				"import org.astro.OtherWorld;\n" +
+				"public class AnotherWorld implements OtherWorld {\n" +
+				"	public String name() {\n" +
+				"		return \" Another World!!\";\n" +
+				"	}\n" +
+				"}"
+			};
+			IClasspathEntry dep = JavaCore.newContainerEntry(new Path(JavaCore.MODULE_PATH_CONTAINER_ID));
+			IJavaProject p2 = setupModuleProject("com.greetings", new String[]{"src", "othersrc"}, src, new IClasspathEntry[] { dep });
+			p2.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p2.getProject().findMarkers(IJavaModelMarker.JAVA_MODEL_PROBLEM_MARKER, true, IResource.DEPTH_ZERO);
+			assertEquals(1, markers.length);
+			String msg = markers[0].getAttribute(IMarker.MESSAGE, "");
+			String expected = Messages.bind(Messages.classpath_duplicateEntryPath, TypeConstants.MODULE_INFO_FILE_NAME_STRING, p2.getElementName());
+			assertTrue("Unexpected result", msg.indexOf(expected) != -1);
+		} finally {
+			deleteProject("org.astro");
+			deleteProject("com.greetings");
+		}
+	}
+	public void test_Multiple_SourceFolders_addModuleInfo() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			String[] sources = new String[] {
+				"src/module-info.java",
+				"module org.astro {\n" +
+				"	exports org.astro;\n" + 
+				"}",
+				"src/org/astro/World.java",
+				"package org.astro;\n" +
+				"public interface World {\n" +
+				"	public String name();\n" +
+				"}",
+				"othersrc/org/astro/OtherWorld.java",
+				"package org.astro;\n" +
+				"import org.astro.World;\n" +
+				"public interface OtherWorld {\n" +
+				"	default public String name() {\n" +
+				"		return \" Other World!!\";\n" +
+				"	}\n" +
+				"}"
+			};
+			IJavaProject p1 = setupModuleProject("org.astro", new String[]{"src", "othersrc"}, sources, null);
+			this.createFile("org.astro/othersrc/module-info.java", 
+					"module org.astro1 {\n" +
+					"	exports org.astro;\n" + 
+					"}");
+			waitForAutoBuild();
+			p1.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p1.getProject().findMarkers(IJavaModelMarker.JAVA_MODEL_PROBLEM_MARKER, true, IResource.DEPTH_ZERO);
+			assertEquals(1, markers.length);
+			String msg = markers[0].getAttribute(IMarker.MESSAGE, "");
+			String expected = Messages.bind(Messages.classpath_duplicateEntryPath, TypeConstants.MODULE_INFO_FILE_NAME_STRING, p1.getElementName());
+			assertTrue("Unexpected result", msg.indexOf(expected) != -1);
+		} finally {
+			deleteProject("org.astro");
+		}
+	}
+	public void test_Multiple_SourceFolders_removeModuleInfo() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			String[] sources = new String[] {
+				"src/module-info.java",
+				"module org.astro {\n" +
+				"	exports org.astro;\n" + 
+				"}",
+				"src/org/astro/World.java",
+				"package org.astro;\n" +
+				"public interface World {\n" +
+				"	public String name();\n" +
+				"}",
+				"othersrc/module-info.java",
+				"module org.astro1 {\n" +
+				"	exports org.astro;\n" + 
+				"}",
+				"othersrc/org/astro/OtherWorld.java",
+				"package org.astro;\n" +
+				"import org.astro.World;\n" +
+				"public interface OtherWorld {\n" +
+				"	default public String name() {\n" +
+				"		return \" Other World!!\";\n" +
+				"	}\n" +
+				"}"
+			};
+			IJavaProject p1 = setupModuleProject("org.astro", new String[]{"src", "othersrc"}, sources, null);
+			waitForAutoBuild();
+			this.deleteFile("org.astro/othersrc/module-info.java");
+			waitForAutoBuild();
+			p1.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p1.getProject().findMarkers(IJavaModelMarker.JAVA_MODEL_PROBLEM_MARKER, true, IResource.DEPTH_ZERO);
+			assertEquals(0, markers.length);
+		} finally {
+			deleteProject("org.astro");
+		}
+	}
+	public void test_services_multipleImpl() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			String[] sources = new String[] { 
+					"src/module-info.java",
+					"module org.astro {\n" +
+					"	exports org.astro;\n" +
+					"}",
+					"src/org/astro/World.java",
+					"package org.astro;\n" +
+					"public interface World {\n" +
+					"	public String name();\n" +
+					"}" 
+			};
+			IJavaProject p1 = setupModuleProject("org.astro", sources);
+			IClasspathAttribute modAttr = new ClasspathAttribute("module", "true");
+			IClasspathEntry dep = JavaCore.newProjectEntry(p1.getPath(), null, false,
+				new IClasspathAttribute[] {modAttr},
+				false/*not exported*/);
+			String[] src = new String[] { 
+					"src/module-info.java",
+					"import org.astro.World;\n" +
+					"import com.greetings.*;\n" +
+					"module com.greetings {\n" +
+					"	requires org.astro;\n" +
+					"	exports com.greetings;\n" +
+					"	provides World with MyWorld, AnotherWorld;\n" +
+					"}",
+					"src/com/greetings/MyWorld.java",
+					"package com.greetings;\n" +
+					"import org.astro.World;\n"	+
+					"public class MyWorld implements World {\n" +
+					"	public String name() {\n" +
+					"		return \" My World!!\";\n" +
+					"	}\n" +
+					"}",
+					"src/com/greetings/AnotherWorld.java",
+					"package com.greetings;\n" +
+					"import org.astro.World;\n"	+
+					"public class AnotherWorld implements World {\n" +
+					"	public String name() {\n" +
+					"		return \" Another World!!\";\n" +
+					"	}\n" +
+					"}"
+			};
+			IJavaProject p2 = setupModuleProject("com.greetings", src, new IClasspathEntry[] { dep });
+			p2.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p2.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers", "", markers);
+		} finally {
+			deleteProject("org.astro");
+			deleteProject("com.greetings");
+		}
+	}
+	public void test_imports_in_moduleinfo() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			String[] sources = new String[] { 
+					"src/module-info.java",
+					"module org.astro {\n" +
+					"	exports org.astro;\n" +
+					"}",
+					"src/org/astro/World.java",
+					"package org.astro;\n" +
+					"public interface World {\n" +
+					"	public String name();\n" +
+					"}" 
+			};
+			IJavaProject p1 = setupModuleProject("org.astro", sources);
+			IClasspathAttribute modAttr = new ClasspathAttribute("module", "true");
+			IClasspathEntry dep = JavaCore.newProjectEntry(p1.getPath(), null, false,
+				new IClasspathAttribute[] {modAttr},
+				false/*not exported*/);
+			String[] src = new String[] { 
+					"src/module-info.java",
+					"import org.astro.World;\n" +
+					"module com.greetings {\n" +
+					"	requires org.astro;\n" +
+					"	exports com.greetings;\n" +
+					"	provides World with com.greetings.MyWorld;\n" +
+					"}",
+					"src/com/greetings/MyWorld.java",
+					"package com.greetings;\n" +
+					"import org.astro.World;\n"	+
+					"public class MyWorld implements World {\n" +
+					"	public String name() {\n" +
+					"		return \" My World!!\";\n" +
+					"	}\n" +
+					"}"
+			};
+			IJavaProject p2 = setupModuleProject("com.greetings", src, new IClasspathEntry[] { dep });
+			p2.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p2.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers", "", markers);
+		} finally {
+			deleteProject("org.astro");
+			deleteProject("com.greetings");
+		}
+	}
+
+	public void test_Opens_Nonexistent_Package() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			String[] src = new String[] {
+				"src/module-info.java",
+				"module com.greetings {\n" +
+				"	opens com.greetings;\n" +
+				"}"
+			};
+			IJavaProject p2 = setupModuleProject("com.greetings", src);
+			p2.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			assertNoErrors();
+		} finally {
+			deleteProject("com.greetings");
+		}
+	}
+	public void test_Opens_Alien_Package() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			String[] src = new String[] {
+				"src/module-info.java",
+				"module org.astro {}",
+				"src/org/astro/World.java",
+				"package org.astro;\n" + 
+				"public interface World {\n" + 
+				"    public String name();\n" + 
+				"}\n"
+			};
+			IJavaProject p1 = setupModuleProject("org.astro", src);
+			src = new String[] {
+				"src/module-info.java",
+				"module com.greetings {\n" +
+				"	requires org.astro;\n" +
+				"	opens org.astro;\n" +
+				"}",
+				"src/test/Test.java",
+				"package test;\n" +
+				"public class Test {\n" +
+				"	org.astro.World w = null;\n" +
+				"}"
+			};
+			IClasspathAttribute modAttr = new ClasspathAttribute(IClasspathAttribute.MODULE, "true");
+			IClasspathEntry dep = JavaCore.newProjectEntry(p1.getPath(), null, false, new IClasspathAttribute[] {modAttr}, false);
+			IJavaProject p2 = setupModuleProject("com.greetings", src, new IClasspathEntry[] {dep});
+			getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p2.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			sortMarkers(markers);
+			assertMarkers("Unexpected markers",	
+					"The type org.astro.World is not accessible\n" +
+					"The package org.astro does not exist or is empty",  markers);
+		} finally {
+			deleteProject("org.astro");
+			deleteProject("com.greetings");
+		}
+	}
+	public void test_DuplicateOpens() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			String[] sources = new String[] {
+				"src/module-info.java",
+				"module org.astro {\n" +
+				"	opens org.astro;\n" + 
+				"	opens org.astro;\n" + 
+				"}",
+				"src/org/astro/World.java",
+				"package org.astro;\n" +
+				"public interface World {\n" +
+				"	public String name();\n" +
+				"}"
+			};
+			IJavaProject p1 = setupModuleProject("org.astro", sources);
+			p1.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p1.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers",	
+					"Duplicate opens entry: org.astro",  markers);
+		} finally {
+			deleteProject("org.astro");
+		}
+	}
+	public void test_TargetedOpens_Duplicates() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			String[] sources = new String[] {
+				"src/module-info.java",
+				"module org.astro {\n" +
+				"	opens org.astro to com.greetings, com.greetings;\n" + 
+				"}",
+				"src/org/astro/World.java",
+				"package org.astro;\n" +
+				"public interface World {\n" +
+				"	public String name();\n" +
+				"}"
+			};
+			IJavaProject p1 = setupModuleProject("org.astro", sources);
+			IClasspathEntry dep = JavaCore.newProjectEntry(p1.getPath());
+			String[] src = new String[] {
+				"src/module-info.java",
+				"module com.greetings {\n" +
+				"	requires org.astro;\n" +
+				"	exports com.greetings;\n" +
+				"}",
+				"src/com/greetings/MyWorld.java",
+				"package com.greetings;\n" +
+				"import org.astro.World;\n" +
+				"public class MyWorld implements World {\n" +
+				"	public String name() {\n" +
+				"		return \" My World!!\";\n" +
+				"	}\n" +
+				"}"
+			};
+			setupModuleProject("com.greetings", src, new IClasspathEntry[] { dep });
+			p1.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p1.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers",	
+					"Duplicate module name: com.greetings",  markers);
+		} finally {
+			deleteProject("org.astro");
+			deleteProject("com.greetings");
+		}
+	}
+	// It is permitted for the to clause of an exports or opens statement to 
+	// specify a module which is not observable
+	public void test_TargetedOpens_Unresolved() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			String[] sources = new String[] {
+				"src/module-info.java",
+				"module org.astro {\n" +
+				"	opens org.astro to some.mod;\n" + 
+				"}",
+				"src/org/astro/World.java",
+				"package org.astro;\n" +
+				"public interface World {\n" +
+				"	public String name();\n" +
+				"}"
+			};
+			IJavaProject p1 = setupModuleProject("org.astro", sources);
+			p1.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p1.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers",	"",  markers);
+		} finally {
+			deleteProject("org.astro");
+		}
+	}
+	// It is a compile-time error if an opens statement appears in the declaration of an open module. 
+	public void test_OpensStatment_in_OpenModule() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			String[] sources = new String[] {
+				"src/module-info.java",
+				"open module org.astro {\n" +
+				"	opens org.astro to some.mod;\n" + 
+				"}",
+				"src/org/astro/World.java",
+				"package org.astro;\n" +
+				"public interface World {\n" +
+				"	public String name();\n" +
+				"}"
+			};
+			IJavaProject p1 = setupModuleProject("org.astro", sources);
+			p1.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p1.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers",	
+				"opens statement is not allowed, as module org.astro is declared open",  markers);
+		} finally {
+			deleteProject("org.astro");
+		}
+	}
+	public void test_uses_DuplicateEntries() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			String[] sources = new String[] {
+				"src/module-info.java",
+				"module org.astro {\n" +
+				"	exports org.astro;\n" +
+				"	uses org.astro.World;\n" +
+				"	uses org.astro.World;\n" +
+				"}",
+				"src/org/astro/World.java",
+				"package org.astro;\n" +
+				"public interface World {\n" +
+				"	public String name();\n" +
+				"}"
+			};
+			IJavaProject p1 = setupModuleProject("org.astro", sources);
+			p1.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p1.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers",
+					"Duplicate uses entry: org.astro.World",  markers);
+		} finally {
+			deleteProject("org.astro");
+		}
+	}
+	public void test_uses_InvalidIntfType() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			String[] src = new String[] {
+				"src/module-info.java",
+				"module com.greetings {\n" +
+				"	exports com.greetings;\n" +
+				"	uses com.greetings.MyEnum;\n" +
+				"}",
+				"src/com/greetings/MyEnum.java",
+				"package com.greetings;\n" +
+				"public enum MyEnum {}"
+			};
+			IJavaProject p2 = setupModuleProject("com.greetings", src);
+			p2.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p2.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			sortMarkers(markers);
+			assertMarkers("Unexpected markers",
+					"Invalid service interface com.greetings.MyEnum, must be a class, interface or annotation type",  markers);
+		} finally {
+			deleteProject("com.greetings");
+		}
+	}
+	public void test_ReconcilerModuleLookup1() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			String[] src = new String[] {
+				"src/module-info.java",
+				"module com.greetings {\n" +
+				"	requires java.sql;\n" +
+				"}"};
+			setupModuleProject("com.greetings", src);
+			this.workingCopies = new ICompilationUnit[1];
+			char[] sourceChars = src[1].toCharArray();
+			this.problemRequestor.initialize(sourceChars);
+			this.workingCopies[0] = getCompilationUnit("/com.greetings/src/module-info.java").getWorkingCopy(this.wcOwner, null);
+			assertProblems(
+					"Unexpected problems",
+					"----------\n" + 
+					"----------\n",
+					this.problemRequestor);
+		} finally {
+			deleteProject("com.greetings");
+		}
+	}
+	public void test_ReconcilerModuleLookup2() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			String[] src = new String[] {
+				"src/module-info.java",
+				"module com.greetings {\n" +
+				"	requires java.sq;\n" +
+				"}"};
+			setupModuleProject("com.greetings", src);
+			this.workingCopies = new ICompilationUnit[1];
+			char[] sourceChars = src[1].toCharArray();
+			this.problemRequestor.initialize(sourceChars);
+			this.workingCopies[0] = getCompilationUnit("/com.greetings/src/module-info.java").getWorkingCopy(this.wcOwner, null);
+			assertProblems(
+					"Unexpected problems",
+					"----------\n" + 
+					"1. ERROR in /com.greetings/src/module-info.java (at line 2)\n" + 
+					"	requires java.sq;\n" + 
+					"	         ^^^^^^^\n" + 
+					"java.sq cannot be resolved to a module\n" + 
+					"----------\n",
+					this.problemRequestor);
+		} finally {
+			deleteProject("com.greetings");
+		}
+	}
+	public void testSystemLibAsJMod() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			IJavaProject project = createJava9Project("Test01", new String[]{"src"});
+			IClasspathEntry[] rawClasspath = project.getRawClasspath();
+			for (int i = 0; i < rawClasspath.length; i++) {
+				IPath path = rawClasspath[i].getPath();
+				if (path.lastSegment().equals("jrt-fs.jar")) {
+					path = path.removeLastSegments(2).append("jmods").append("java.base.jmod");
+					IClasspathEntry newEntry = JavaCore.newLibraryEntry(path, rawClasspath[i].getSourceAttachmentPath(), new Path("java.base"));
+					rawClasspath[i] = newEntry;
+				}
+			}
+			project.setRawClasspath(rawClasspath, null);
+			this.createFile("Test01/src/module-info.java", "");
+			this.createFolder("Test01/src/com/greetings");
+			this.createFile("Test01/src/com/greetings/Main.java", "");
+			waitForManualRefresh();
+			waitForAutoBuild();
+			project.getProject().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IPackageFragmentRoot[] roots = project.getPackageFragmentRoots();
+			IPackageFragmentRoot base = null;
+			for (IPackageFragmentRoot iRoot : roots) {
+				IModuleDescription moduleDescription = iRoot.getModuleDescription();
+				if (moduleDescription != null) {
+					base = iRoot;
+					break;
+				}
+			}
+			assertNotNull("Java.base module should not null", base);
+			assertMarkers("Unexpected markers", "", project);
+		} finally {
+			deleteProject("Test01");
+		}
+	}
+	public void testBug510617() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			String[] src = new String[] {
+				"src/module-info.java",
+				"module Test {\n" +
+				"	exports p;\n" +
+				"	requires java.sql;\n" + 
+				"	provides java.sql.Driver with p.C;\n" +
+				"}",
+				"src/p/C.java",
+				"package p;\n" + 
+				"import java.lang.SecurityManager;\n" + 
+				"import java.sql.Connection;\n" + 
+				"import java.sql.Driver;\n" + 
+				"import java.sql.DriverPropertyInfo;\n" + 
+				"import java.sql.SQLException;\n" + 
+				"import java.sql.SQLFeatureNotSupportedException;\n" + 
+				"import java.util.Properties;\n" + 
+				"import java.util.logging.Logger;\n" + 
+				"public class C implements Driver {\n" + 
+				"	SecurityManager s;\n" + 
+				"	@Override\n" + 
+				"	public boolean acceptsURL(String arg0) throws SQLException {\n" + 
+				"		return false;\n" + 
+				"	}\n" + 
+				"	@Override\n" + 
+				"	public Connection connect(String arg0, Properties arg1) throws SQLException {\n" + 
+				"		return null;\n" + 
+				"	}\n" + 
+				"	@Override\n" + 
+				"	public int getMajorVersion() {\n" + 
+				"		return 0;\n" + 
+				"	}\n" + 
+				"	@Override\n" + 
+				"	public int getMinorVersion() {\n" + 
+				"		return 0;\n" + 
+				"	}\n" + 
+				"	@Override\n" + 
+				"	public Logger getParentLogger() throws SQLFeatureNotSupportedException {\n" + 
+				"		return null;\n" + 
+				"	}\n" + 
+				"	@Override\n" + 
+				"	public DriverPropertyInfo[] getPropertyInfo(String arg0, Properties arg1) throws SQLException {\n" + 
+				"		return null;\n" + 
+				"	}\n" + 
+				"	@Override\n" + 
+				"	public boolean jdbcCompliant() {\n" + 
+				"		return false;\n" + 
+				"	} \n" + 
+				"}"
+			};
+			setupModuleProject("Test", src);
+			this.workingCopies = new ICompilationUnit[1];
+			char[] sourceChars = src[1].toCharArray();
+			this.problemRequestor.initialize(sourceChars);
+			this.workingCopies[0] = getCompilationUnit("/Test/src/module-info.java").getWorkingCopy(this.wcOwner, null);
+			assertProblems(
+				"Unexpected problems",
+				"----------\n" + 
+				"----------\n",
+				this.problemRequestor);
+		} finally {
+			deleteProject("Test");
+		}
+	}
+	public void test_annotations_in_moduleinfo() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			String[] sources = new String[] { 
+					"src/module-info.java",
+					"module org.astro {\n" +
+					"	exports org.astro;\n" +
+					"}",
+					"src/org/astro/World.java",
+					"package org.astro;\n" +
+					"public interface World {\n" +
+					"	public String name();\n" +
+					"}",
+					"src/org/astro/Foo.java",
+					"package org.astro;\n" +
+					"public @interface Foo {}" 
+			};
+			IJavaProject p1 = setupModuleProject("org.astro", sources);
+			IClasspathAttribute modAttr = new ClasspathAttribute("module", "true");
+			IClasspathEntry dep = JavaCore.newProjectEntry(p1.getPath(), null, false,
+				new IClasspathAttribute[] {modAttr},
+				false/*not exported*/);
+			String[] src = new String[] { 
+					"src/module-info.java",
+					"import org.astro.Foo;\n" +
+					"import org.astro.World;\n" +
+					"@Foo\n" +
+					"module com.greetings {\n" +
+					"	requires org.astro;\n" +
+					"	exports com.greetings;\n" +
+					"	provides World with com.greetings.MyWorld;\n" +
+					"}",
+					"src/com/greetings/MyWorld.java",
+					"package com.greetings;\n" +
+					"import org.astro.World;\n"	+
+					"public class MyWorld implements World {\n" +
+					"	public String name() {\n" +
+					"		return \" My World!!\";\n" +
+					"	}\n" +
+					"}"
+			};
+			IJavaProject p2 = setupModuleProject("com.greetings", src, new IClasspathEntry[] { dep });
+			p2.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p2.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers", "", markers);
+		} finally {
+			deleteProject("org.astro");
+			deleteProject("com.greetings");
+		}
+	}
+	public void test_unresolved_annotations() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			String[] sources = new String[] { 
+					"src/module-info.java",
+					"module org.astro {\n" +
+					"	exports org.astro;\n" +
+					"}",
+					"src/org/astro/World.java",
+					"package org.astro;\n" +
+					"public interface World {\n" +
+					"	public String name();\n" +
+					"}",
+					"src/org/astro/Foo.java",
+					"package org.astro;\n" +
+					"public @interface Foo {}" 
+			};
+			IJavaProject p1 = setupModuleProject("org.astro", sources);
+			IClasspathAttribute modAttr = new ClasspathAttribute("module", "true");
+			IClasspathEntry dep = JavaCore.newProjectEntry(p1.getPath(), null, false,
+				new IClasspathAttribute[] {modAttr},
+				false/*not exported*/);
+			String[] src = new String[] { 
+					"src/module-info.java",
+					"import org.astro.Foo;\n" +
+					"import org.astro.World;\n" +
+					"@Foo @Bar\n" +
+					"module com.greetings {\n" +
+					"	requires org.astro;\n" +
+					"	exports com.greetings;\n" +
+					"	provides World with com.greetings.MyWorld;\n" +
+					"}",
+					"src/com/greetings/MyWorld.java",
+					"package com.greetings;\n" +
+					"import org.astro.World;\n"	+
+					"public class MyWorld implements World {\n" +
+					"	public String name() {\n" +
+					"		return \" My World!!\";\n" +
+					"	}\n" +
+					"}"
+			};
+			IJavaProject p2 = setupModuleProject("com.greetings", src, new IClasspathEntry[] { dep });
+			p2.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p2.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers", 
+					"Bar cannot be resolved to a type", markers);
+		} finally {
+			deleteProject("org.astro");
+			deleteProject("com.greetings");
+		}
+	}
+	public void test_illegal_modifiers() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			String[] sources = new String[] { 
+					"src/module-info.java",
+					"module org.astro {\n" +
+					"	exports org.astro;\n" +
+					"}",
+					"src/org/astro/World.java",
+					"package org.astro;\n" +
+					"public interface World {\n" +
+					"	public String name();\n" +
+					"}",
+					"src/org/astro/Foo.java",
+					"package org.astro;\n" +
+					"public @interface Foo {}" 
+			};
+			IJavaProject p1 = setupModuleProject("org.astro", sources);
+			IClasspathAttribute modAttr = new ClasspathAttribute("module", "true");
+			IClasspathEntry dep = JavaCore.newProjectEntry(p1.getPath(), null, false,
+				new IClasspathAttribute[] {modAttr},
+				false/*not exported*/);
+			String[] src = new String[] { 
+					"src/module-info.java",
+					"import org.astro.Foo;\n" +
+					"import org.astro.World;\n" +
+					"@Foo\n" +
+					"private static module com.greetings {\n" +
+					"	requires org.astro;\n" +
+					"	exports com.greetings;\n" +
+					"	provides World with com.greetings.MyWorld;\n" +
+					"}",
+					"src/com/greetings/MyWorld.java",
+					"package com.greetings;\n" +
+					"import org.astro.World;\n"	+
+					"public class MyWorld implements World {\n" +
+					"	public String name() {\n" +
+					"		return \" My World!!\";\n" +
+					"	}\n" +
+					"}"
+			};
+			IJavaProject p2 = setupModuleProject("com.greetings", src, new IClasspathEntry[] { dep });
+			p2.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p2.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers", 
+					"Illegal modifier for module com.greetings; only open is permitted", markers);
+		} finally {
+			deleteProject("org.astro");
+			deleteProject("com.greetings");
+		}
+	}
+	public void test_annotations_with_target() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			String[] sources = new String[] { 
+					"src/module-info.java",
+					"module org.astro {\n" +
+					"	exports org.astro;\n" +
+					"}",
+					"src/org/astro/World.java",
+					"package org.astro;\n" +
+					"public interface World {\n" +
+					"	public String name();\n" +
+					"}",
+					"src/org/astro/Foo.java",
+					"package org.astro;\n" +
+					"import java.lang.annotation.ElementType;\n" +
+					"import java.lang.annotation.Target;\n" +
+					"@Target(ElementType.MODULE)\n" +
+					"public @interface Foo {}" 
+			};
+			IJavaProject p1 = setupModuleProject("org.astro", sources);
+			IClasspathAttribute modAttr = new ClasspathAttribute("module", "true");
+			IClasspathEntry dep = JavaCore.newProjectEntry(p1.getPath(), null, false,
+				new IClasspathAttribute[] {modAttr},
+				false/*not exported*/);
+			String[] src = new String[] { 
+					"src/module-info.java",
+					"import org.astro.Foo;\n" +
+					"import org.astro.World;\n" +
+					"@Foo\n" +
+					"module com.greetings {\n" +
+					"	requires org.astro;\n" +
+					"	exports com.greetings;\n" +
+					"	provides World with com.greetings.MyWorld;\n" +
+					"}",
+					"src/com/greetings/MyWorld.java",
+					"package com.greetings;\n" +
+					"import org.astro.World;\n"	+
+					"public class MyWorld implements World {\n" +
+					"	public String name() {\n" +
+					"		return \" My World!!\";\n" +
+					"	}\n" +
+					"}"
+			};
+			IJavaProject p2 = setupModuleProject("com.greetings", src, new IClasspathEntry[] { dep });
+			p2.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p2.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers", "", markers);
+		} finally {
+			deleteProject("org.astro");
+			deleteProject("com.greetings");
+		}
+	}
+	public void test_annotations_with_wrong_target() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			String[] sources = new String[] { 
+					"src/module-info.java",
+					"module org.astro {\n" +
+					"	exports org.astro;\n" +
+					"}",
+					"src/org/astro/World.java",
+					"package org.astro;\n" +
+					"public interface World {\n" +
+					"	public String name();\n" +
+					"}",
+					"src/org/astro/Foo.java",
+					"package org.astro;\n" +
+					"import java.lang.annotation.ElementType;\n" +
+					"import java.lang.annotation.Target;\n" +
+					"@Target({ElementType.TYPE_PARAMETER, ElementType.TYPE})\n" +
+					"public @interface Foo {}" 
+			};
+			IJavaProject p1 = setupModuleProject("org.astro", sources);
+			IClasspathAttribute modAttr = new ClasspathAttribute("module", "true");
+			IClasspathEntry dep = JavaCore.newProjectEntry(p1.getPath(), null, false,
+				new IClasspathAttribute[] {modAttr},
+				false/*not exported*/);
+			String[] src = new String[] { 
+					"src/module-info.java",
+					"import org.astro.Foo;\n" +
+					"import org.astro.World;\n" +
+					"@Foo\n" +
+					"module com.greetings {\n" +
+					"	requires org.astro;\n" +
+					"	exports com.greetings;\n" +
+					"	provides World with com.greetings.MyWorld;\n" +
+					"}",
+					"src/com/greetings/MyWorld.java",
+					"package com.greetings;\n" +
+					"import org.astro.World;\n"	+
+					"public class MyWorld implements World {\n" +
+					"	public String name() {\n" +
+					"		return \" My World!!\";\n" +
+					"	}\n" +
+					"}"
+			};
+			IJavaProject p2 = setupModuleProject("com.greetings", src, new IClasspathEntry[] { dep });
+			p2.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p2.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers", 
+					"The annotation @Foo is disallowed for this location", markers);
+		} finally {
+			deleteProject("org.astro");
+			deleteProject("com.greetings");
+		}
+	}
+	public void testBug518334() throws CoreException, IOException {
+		if (!isJRE9) return;
+		try {
+			String[] sources = new String[] { 
+					"src/module-info.java",
+					"module org.astro {\n" +
+					"	requires java.sql;\n" +
+					"}"
+			};
+			IJavaProject p1 = setupModuleProject("org.astro", sources);
+			waitForAutoBuild();
+			// set options
+			Map<String, String> options = new HashMap<>();
+			options.put(CompilerOptions.OPTION_Compliance, "1.8");
+			options.put(CompilerOptions.OPTION_Source, "1.8");
+			options.put(CompilerOptions.OPTION_TargetPlatform, "1.8");
+			p1.setOptions(options);
+//			waitForAutoBuild();
+			p1.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p1.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertTrue("Module declaration incorrectly accepted below 9", markers.length > 0);
+		} finally {
+			deleteProject("org.astro");
+		}
+	}
+	public void testBug518334a() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			String[] sources = new String[] { 
+					"src/module-info.java",
+					"module org.astro {\n" +
+					"	exports org.astro;\n" +
+					"}",
+					"src/org/astro/World.java",
+					"package org.astro;\n" +
+					"public interface World {\n" +
+					"	public String name();\n" +
+					"}" 
+			};
+			IJavaProject p1 = setupModuleProject("org.astro", sources);
+			IClasspathEntry dep = JavaCore.newProjectEntry(p1.getPath());
+			String[] src = new String[] { 
+					"src/module-info.java",
+					"module com.greetings {\n" +
+					"	requires org.astro;\n" +
+					"}"
+			};
+			IJavaProject p2 = setupModuleProject("com.greetings", src, new IClasspathEntry[] { dep });
+			waitForAutoBuild();
+			// set options
+			Map<String, String> options = new HashMap<>();
+			options.put(CompilerOptions.OPTION_Compliance, "1.8");
+			options.put(CompilerOptions.OPTION_Source, "1.8");
+			options.put(CompilerOptions.OPTION_TargetPlatform, "1.8");
+			p1.setOptions(options);
+
+			p2.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p2.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers", 
+					"org.astro cannot be resolved to a module", markers);
+		} finally {
+			deleteProject("org.astro");
+			deleteProject("com.greetings");
+		}
+	}
+
+	public void test_api_leak_1() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			String[] sources1 = {
+								"src/module-info.java", 
+								"module mod.one { \n" +
+								"	exports pm;\n" +
+								"}",
+								"src/impl/Other.java", 
+								"package impl;\n" +
+								"public class Other {\n" +
+								"}\n",
+								"src/pm/C1.java", 
+								"package pm;\n" +
+								"import impl.Other;\n" + 
+								"public class C1 extends Other {\n" +
+								"	public void m1(Other o) {}\n" + 
+								"}\n"
+							};
+			IJavaProject p1 = setupModuleProject("mod.one", sources1);
+			IClasspathAttribute modAttr = new ClasspathAttribute("module", "true");
+			IClasspathEntry dep = JavaCore.newProjectEntry(p1.getPath(), null, false,
+				new IClasspathAttribute[] {modAttr},
+				false/*not exported*/);
+			p1.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+
+			String[] sources2 = {
+								"src/module-info.java", 
+								"module mod.two { \n" +
+								"	requires mod.one;\n" +
+								"}",
+								"src/impl/Other.java", 
+								"package impl;\n" +
+								"public class Other {\n" +
+								"}\n",
+								"src/po/Client.java", 
+								"package po;\n" + 
+								"import pm.C1;\n" + 
+								"public class Client {\n" + 
+								"    void test1(C1 one) {\n" + 
+								"        one.m1(one);\n" + 
+								"    }\n" + 
+								"}\n"
+							};
+			IJavaProject p2 = setupModuleProject("mod.two", sources2, new IClasspathEntry[] { dep });
+			p2.getProject().getWorkspace().build(IncrementalProjectBuilder.INCREMENTAL_BUILD, null);
+			IMarker[] markers = p2.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers", "", markers);
+
+			p2.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			markers = p2.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers", "", markers);
+		} finally {
+			deleteProject("mod.one");
+			deleteProject("mod.two");
+		}
+	}
+
+	/**
+	 * Same-named classes should not conflict, since one is not accessible.
+	 * Still a sub class of the inaccessible class can be accessed and used for a method argument.
+	 */
+	public void test_api_leak_2() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			String[] sources1 = {
+						"src/module-info.java", 
+						"module mod.one { \n" +
+						"	exports pm;\n" +
+						"}",
+						"src/impl/SomeImpl.java", 
+						"package impl;\n" +
+								"public class SomeImpl {\n" +
+						"}\n",
+						"src/pm/C1.java", 
+						"package pm;\n" +
+						"import impl.SomeImpl;\n" + 
+						"public class C1 {\n" +
+						"	public void m1(SomeImpl o) {}\n" + 
+						"}\n",
+						"src/pm/Other.java", 
+						"package pm;\n" +
+								"import impl.SomeImpl;\n" + 
+								"public class Other extends SomeImpl {\n" +
+						"}\n"
+					};
+			IJavaProject p1 = setupModuleProject("mod.one", sources1);
+			IClasspathAttribute modAttr = new ClasspathAttribute("module", "true");
+			IClasspathEntry dep = JavaCore.newProjectEntry(p1.getPath(), null, false,
+				new IClasspathAttribute[] {modAttr},
+				false/*not exported*/);
+			p1.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+
+			String[] sources2 = {
+						"src/module-info.java",
+						"module mod.two { \n" +
+						"	requires mod.one;\n" +
+						"}",
+						"src/impl/SomeImpl.java", 
+						"package impl;\n" +
+								"public class SomeImpl {\n" + // pseudo-conflict to same named, but inaccessible class from mod.one
+						"}\n",
+						"src/po/Client.java", 
+						"package po;\n" + 
+						"import pm.C1;\n" + 
+						"import pm.Other;\n" +
+						"import impl.SomeImpl;\n" + 
+						"public class Client {\n" + 
+						"    void test1(C1 one) {\n" +
+						"		 SomeImpl impl = new SomeImpl();\n" + // our own version 
+						"        one.m1(impl);\n" + // incompatible to what's required 
+						"		 one.m1(new Other());\n" + // OK
+						"    }\n" + 
+						"}\n",
+					};
+			String expectedError = "The method m1(impl.SomeImpl) in the type C1 is not applicable for the arguments (impl.SomeImpl)";
+			IJavaProject p2 = setupModuleProject("mod.two", sources2, new IClasspathEntry[] { dep });
+			p2.getProject().getWorkspace().build(IncrementalProjectBuilder.INCREMENTAL_BUILD, null);
+			IMarker[] markers = p2.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers", expectedError, markers);
+
+			p2.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			markers = p2.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers", expectedError, markers);
+		} finally {
+			deleteProject("mod.one");
+			deleteProject("mod.two");
+		}
+	}
+	
+	public void testNonPublic1() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			String[] sources1 = {
+					"src/module-info.java", 
+					"module mod.one { \n" +
+					"	exports pm;\n" +
+					"}",
+					"src/pm/C1.java", 
+					"package pm;\n" +
+					"class C1 {\n" +
+					"	public void test() {}\n" +
+					"}\n"
+			};
+			IJavaProject p1 = setupModuleProject("mod.one", sources1);
+			IClasspathAttribute modAttr = new ClasspathAttribute("module", "true");
+			IClasspathEntry dep = JavaCore.newProjectEntry(p1.getPath(), null, false,
+				new IClasspathAttribute[] {modAttr},
+				false/*not exported*/);
+			p1.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+
+			String[] sources2 = {
+					"src/module-info.java", 
+					"module mod.two { \n" +
+					"	requires mod.one;\n" +
+					"}",
+					"src/pm/sub/C2.java", 
+					"package pm.sub;\n" +
+					"class C2 {\n" +
+					"	public void foo() {}\n" +
+					"}\n",
+					"src/po/Client.java", 
+					"package po;\n" + 
+					"import pm.*;\n" + // package is exported but type C1 is not public
+					"public class Client {\n" + 
+					"    void test1(C1 one) {\n" +
+					"        one.test();\n" + 
+					"    }\n" + 
+					"}\n"
+			};
+
+			IJavaProject p2 = setupModuleProject("mod.two", sources2, new IClasspathEntry[] { dep });
+			this.workingCopies = new ICompilationUnit[3];
+			this.workingCopies[0] = getCompilationUnit("/mod.two/src/module-info.java").getWorkingCopy(this.wcOwner, null);
+			this.workingCopies[1] = getCompilationUnit("/mod.two/src/pm/sub/C2.java").getWorkingCopy(this.wcOwner, null);
+			this.problemRequestor.initialize(sources2[5].toCharArray());
+			this.workingCopies[2] = getCompilationUnit("/mod.two/src/po/Client.java").getWorkingCopy(this.wcOwner, null);
+			assertProblems(
+					"Unexpected problems",
+					"----------\n" + 
+					"1. ERROR in /mod.two/src/po/Client.java (at line 4)\n" + 
+					"	void test1(C1 one) {\n" + 
+					"	           ^^\n" + 
+					"The type C1 is not visible\n" + 
+					"----------\n" + 
+					"2. ERROR in /mod.two/src/po/Client.java (at line 5)\n" + 
+					"	one.test();\n" + 
+					"	^^^\n" + 
+					"The type C1 is not visible\n" + 
+					"----------\n",
+					this.problemRequestor);
+
+			String expectedError = "The type C1 is not visible\n" + 
+									"The type C1 is not visible";
+			p2.getProject().getWorkspace().build(IncrementalProjectBuilder.INCREMENTAL_BUILD, null);
+			IMarker[] markers = p2.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers", expectedError, markers);
+
+			p2.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			markers = p2.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers", expectedError, markers);
+		} finally {
+			deleteProject("mod.one");
+			deleteProject("mod.two");
+		}
+	}
+	// test that two packages with the same name result in conflict if they are both
+	// accessible to a module
+	public void test_conflicting_packages() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			String[] sources = new String[] {
+				"src/module-info.java",
+				"module some.mod {\n" +
+				"	exports org.astro;\n" +
+				"}",
+				"src/org/astro/Test.java",
+				"package org.astro;\n" +
+				"public class Test { }"
+			};
+			IClasspathEntry dep = JavaCore.newContainerEntry(new Path(JavaCore.MODULE_PATH_CONTAINER_ID));
+			setupModuleProject("some.mod", sources, new IClasspathEntry[]{dep});
+			sources = new String[] {
+				"src/module-info.java",
+				"module org.astro {\n" +
+				"	exports org.astro;\n" + 
+				"}",
+				"src/org/astro/World.java",
+				"package org.astro;\n" +
+				"public interface World {\n" +
+				"	public String name();\n" +
+				"}"
+			};
+			setupModuleProject("org.astro", sources, new IClasspathEntry[]{dep});
+			String[] src = new String[] {
+				"src/module-info.java",
+				"module com.greetings {\n" +
+				"	requires some.mod;\n" +
+				"	requires org.astro;\n" +
+				"	exports com.greetings;\n" +
+				"}",
+				"src/com/greetings/MyWorld.java",
+				"package com.greetings;\n" +
+				"import org.astro.World;\n" +
+				"public class MyWorld implements World {\n" +
+				"	public String name() {\n" +
+				"		return \" My World!!\";\n" +
+				"	}\n" +
+				"}"
+			};
+			
+			IJavaProject p2 = setupModuleProject("com.greetings", src, new IClasspathEntry[] { dep });
+			p2.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p2.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			sortMarkers(markers);
+			assertMarkers("Unexpected markers",
+					// reported against both 'requires' directives & against the import:
+					"The package org.astro is accessible from more than one module: org.astro, some.mod\n" +
+					"The package org.astro is accessible from more than one module: org.astro, some.mod\n" +
+					"The package org.astro is accessible from more than one module: org.astro, some.mod",
+					markers);
+		} finally {
+			deleteProject("org.astro");
+			deleteProject("some.mod");
+			deleteProject("com.greetings");
+		}
+	}
+	// test that a package declared in a module conflicts with an accessible package
+	// of the same name declared in another required module
+	public void test_conflicting_packages_declaredvsaccessible() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			IClasspathEntry dep = JavaCore.newContainerEntry(new Path(JavaCore.MODULE_PATH_CONTAINER_ID));
+			String[] sources = new String[] {
+				"src/module-info.java",
+				"module org.astro {\n" +
+				"	exports org.astro;\n" + 
+				"}",
+				"src/org/astro/World.java",
+				"package org.astro;\n" +
+				"public interface World {\n" +
+				"	public String name();\n" +
+				"}"
+			};
+			setupModuleProject("org.astro", sources, new IClasspathEntry[]{dep});
+			String[] src = new String[] {
+				"src/module-info.java",
+				"module com.greetings {\n" +
+				"	requires org.astro;\n" +
+				"	exports com.greetings;\n" +
+				"}",
+				"src/org/astro/Test.java",
+				"package org.astro;\n" +
+				"public class Test {\n" +
+				"	public String name() {\n" +
+				"		return \" My World!!\";\n" +
+				"	}\n" +
+				"}",
+				"src/com/greetings/MyWorld.java",
+				"package com.greetings;\n" +
+				"public class MyWorld implements org.astro.World {\n" +
+				"	public String name() {\n" +
+				"		return \" My World!!\";\n" +
+				"	}\n" +
+				"}"
+			};
+			IJavaProject p2 = setupModuleProject("com.greetings", src, new IClasspathEntry[] { dep });
+			p2.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p2.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers", 
+					"The package org.astro conflicts with a package accessible from another module: org.astro",  markers);
+		} finally {
+			deleteProject("org.astro");
+			deleteProject("com.greetings");
+		}
+	}
+	// accessible package bundle.org contains type astro
+	// accessible package bundle.org.astro contains type World
+	// Type bundle.org.astro.World should not be resolved, because type
+	// bundle.org.astro trumps package bundle.org.astro
+	public void test_conflict_packagevstype() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			IClasspathEntry dep = JavaCore.newContainerEntry(new Path(JavaCore.MODULE_PATH_CONTAINER_ID));
+			String[] sources = new String[] {
+				"src/module-info.java",
+				"module org.astro {\n" +
+				"	exports bundle.org.astro;\n" + 
+				"}",
+				"src/bundle/org/astro/World.java",
+				"package bundle.org.astro;\n" +
+				"public interface World {\n" +
+				"	public String name();\n" +
+				"}"
+			};
+			setupModuleProject("org.astro", sources, new IClasspathEntry[]{dep});
+			sources = new String[] {
+					"src/module-info.java",
+					"module other.mod {\n" +
+					"	exports bundle.org;\n" + 
+					"}",
+					"src/bundle/org/astro.java",
+					"package bundle.org;\n" +
+					"public class astro {}"
+				};
+			setupModuleProject("other.mod", sources, new IClasspathEntry[]{dep});
+			String[] src = new String[] {
+				"src/module-info.java",
+				"module com.greetings {\n" +
+				"	requires org.astro;\n" +
+				"	requires other.mod;\n" +
+				"	exports com.greetings;\n" +
+				"}",
+				"src/com/greetings/MyWorld.java",
+				"package com.greetings;\n" +
+				"public class MyWorld implements bundle.org.astro.World {\n" +
+				"	public String name() {\n" +
+				"		return \" My World!!\";\n" +
+				"	}\n" +
+				"}"
+			};
+			IJavaProject p2 = setupModuleProject("com.greetings", src, new IClasspathEntry[] { dep });
+			p2.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p2.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers", 
+					"bundle.org.astro.World cannot be resolved to a type",  markers);
+		} finally {
+			deleteProject("org.astro");
+			deleteProject("other.mod");
+			deleteProject("com.greetings");
+		}
+	}
+	// package bundle.org contains type astro, but the package is not accessible
+	// accessible package bundle.org.astro contains type World
+	// type bundle.org.astro.World should be resolved because type bundle.org.astro
+	// cannot be seen
+	// TODO - to be confirmed with spec
+	public void test_noconflict_concealedtype_accessiblepackage() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			IClasspathEntry dep = JavaCore.newContainerEntry(new Path(JavaCore.MODULE_PATH_CONTAINER_ID));
+			String[] sources = new String[] {
+				"src/module-info.java",
+				"module org.astro {\n" +
+				"	exports bundle.org.astro;\n" + 
+				"}",
+				"src/bundle/org/astro/World.java",
+				"package bundle.org.astro;\n" +
+				"public interface World {\n" +
+				"	public String name();\n" +
+				"}"
+			};
+			setupModuleProject("org.astro", sources, new IClasspathEntry[]{dep});
+			sources = new String[] {
+					"src/module-info.java",
+					"module other.mod {\n" +
+					"}",
+					"src/bundle/org/astro.java",
+					"package bundle.org;\n" +
+					"public class astro {}"
+				};
+			setupModuleProject("other.mod", sources, new IClasspathEntry[]{dep});
+			String[] src = new String[] {
+				"src/module-info.java",
+				"module com.greetings {\n" +
+				"	requires org.astro;\n" +
+				"	requires other.mod;\n" +
+				"	exports com.greetings;\n" +
+				"}",
+				"src/com/greetings/MyWorld.java",
+				"package com.greetings;\n" +
+				"public class MyWorld implements bundle.org.astro.World {\n" +
+				"	public String name() {\n" +
+				"		return \" My World!!\";\n" +
+				"	}\n" +
+				"}"
+			};
+			IJavaProject p2 = setupModuleProject("com.greetings", src, new IClasspathEntry[] { dep });
+			p2.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p2.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers",	"",  markers);
+		} finally {
+			deleteProject("org.astro");
+			deleteProject("other.mod");
+			deleteProject("com.greetings");
+		}
+	}
+	// test that two packages of the same name exported by two named modules result in
+	// a conflict in the context of a non-modular project
+	public void test_conflicting_packages_unnamed() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			String[] sources = new String[] {
+				"src/module-info.java",
+				"module some.mod {\n" +
+				"	exports org.astro;\n" +
+				"}",
+				"src/org/astro/Test.java",
+				"package org.astro;\n" +
+				"public class Test { }"
+			};
+			IClasspathEntry dep = JavaCore.newContainerEntry(new Path(JavaCore.MODULE_PATH_CONTAINER_ID));
+			IJavaProject p1 = setupModuleProject("some.mod", sources, new IClasspathEntry[]{dep});
+			sources = new String[] {
+				"src/module-info.java",
+				"module org.astro {\n" +
+				"	exports org.astro;\n" + 
+				"}",
+				"src/org/astro/World.java",
+				"package org.astro;\n" +
+				"public interface World {\n" +
+				"	public String name();\n" +
+				"}"
+			};
+			IJavaProject p2 = setupModuleProject("org.astro", sources, new IClasspathEntry[]{dep});
+			String[] src = new String[] {
+				"src/com/greetings/MyWorld.java",
+				"package com.greetings;\n" +
+				"import org.astro.World;\n" +
+				"public class MyWorld implements World {\n" +
+				"	public String name() {\n" +
+				"		return \" My World!!\";\n" +
+				"	}\n" +
+				"}"
+			};
+			IClasspathAttribute modAttr = new ClasspathAttribute("module", "true");
+			IClasspathEntry dep1 = JavaCore.newProjectEntry(p1.getPath(), null, false,
+				new IClasspathAttribute[] {modAttr},
+				false/*not exported*/);
+			IClasspathEntry dep2 = JavaCore.newProjectEntry(p2.getPath(), null, false,
+				new IClasspathAttribute[] {modAttr},
+				false/*not exported*/);
+			IJavaProject p3 = setupModuleProject("com.greetings", src, new IClasspathEntry[] { dep1, dep2 });
+			getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p3.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			sortMarkers(markers);
+			assertMarkers("Unexpected markers", 
+					"The package org.astro is accessible from more than one module: org.astro, some.mod",
+					markers);
+		} finally {
+			deleteProject("org.astro");
+			deleteProject("some.mod");
+			deleteProject("com.greetings");
+		}
+	}
+	// test that a package declared in a non-modular project conflicts with a package with the same name
+	// exported by a named module on it's build path
+	public void test_conflict_unnamed_declaredvsexported() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			IClasspathEntry dep = JavaCore.newContainerEntry(new Path(JavaCore.MODULE_PATH_CONTAINER_ID));
+			String[] sources = new String[] {
+				"src/module-info.java",
+				"module org.astro {\n" +
+				"	exports org.astro;\n" + 
+				"}",
+				"src/org/astro/World.java",
+				"package org.astro;\n" +
+				"public interface World {\n" +
+				"	public String name();\n" +
+				"}"
+			};
+			IJavaProject p1 = setupModuleProject("org.astro", sources, new IClasspathEntry[]{dep});
+			String[] src = new String[] {
+				"src/org/astro/Test.java",
+				"package org.astro;\n" +
+				"public class Test {\n" +
+				"	public String name() {\n" +
+				"		return \" My World!!\";\n" +
+				"	}\n" +
+				"}",
+				"src/com/greetings/MyWorld.java",
+				"package com.greetings;\n" +
+				"public class MyWorld implements org.astro.World {\n" +
+				"	public String name() {\n" +
+				"		return \" My World!!\";\n" +
+				"	}\n" +
+				"}"
+			};
+			IClasspathAttribute modAttr = new ClasspathAttribute("module", "true");
+			IClasspathEntry dep1 = JavaCore.newProjectEntry(p1.getPath(), null, false,
+				new IClasspathAttribute[] {modAttr},
+				false/*not exported*/);
+			IJavaProject p2 = setupModuleProject("com.greetings", src, new IClasspathEntry[] { dep1 });
+			p2.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p2.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers", 
+					"The package org.astro conflicts with a package accessible from another module: org.astro",
+					markers);
+		} finally {
+			deleteProject("org.astro");
+			deleteProject("com.greetings");
+		}
+	}
+	// test that a type in an accessible package trumps an accessible package with the same name
+	// in the context of a non-modular project
+	public void test_conflict_packagevstype_unnamed() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			IClasspathEntry dep = JavaCore.newContainerEntry(new Path(JavaCore.MODULE_PATH_CONTAINER_ID));
+			String[] sources = new String[] {
+				"src/module-info.java",
+				"module org.astro {\n" +
+				"	exports bundle.org.astro;\n" + 
+				"}",
+				"src/bundle/org/astro/World.java",
+				"package bundle.org.astro;\n" +
+				"public interface World {\n" +
+				"	public String name();\n" +
+				"}"
+			};
+			IJavaProject p1 = setupModuleProject("org.astro", sources, new IClasspathEntry[]{dep});
+			sources = new String[] {
+					"src/module-info.java",
+					"module other.mod {\n" +
+					"	exports bundle.org;\n" + 
+					"}",
+					"src/bundle/org/astro.java",
+					"package bundle.org;\n" +
+					"public class astro {}"
+				};
+			IJavaProject p2 = setupModuleProject("other.mod", sources, new IClasspathEntry[]{dep});
+			String[] src = new String[] {
+				"src/com/greetings/MyWorld.java",
+				"package com.greetings;\n" +
+				"public class MyWorld implements bundle.org.astro.World {\n" +
+				"	public String name() {\n" +
+				"		return \" My World!!\";\n" +
+				"	}\n" +
+				"}"
+			};
+			IClasspathAttribute modAttr = new ClasspathAttribute("module", "true");
+			IClasspathEntry dep1 = JavaCore.newProjectEntry(p1.getPath(), null, false,
+				new IClasspathAttribute[] {modAttr},
+				false/*not exported*/);
+			IClasspathEntry dep2 = JavaCore.newProjectEntry(p2.getPath(), null, false,
+				new IClasspathAttribute[] {modAttr},
+				false/*not exported*/);
+			IJavaProject p3 = setupModuleProject("com.greetings", src, new IClasspathEntry[] { dep1, dep2 });
+			getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p3.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers", 
+					"bundle.org.astro.World cannot be resolved to a type",  markers);
+		} finally {
+			deleteProject("org.astro");
+			deleteProject("other.mod");
+			deleteProject("com.greetings");
+		}
+	}
+	// test that a conflicting package does not cause an error when resolving a sub package name
+	// when the sub package is accessible in the context of a non-modular project
+	public void test_noconflict_subpkg_unnamed() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			IClasspathEntry dep = JavaCore.newContainerEntry(new Path(JavaCore.MODULE_PATH_CONTAINER_ID));
+			String[] sources = new String[] {
+				"src/module-info.java",
+				"module org.astro {\n" +
+				"	exports bundle.org.astro;\n" + 
+				"}",
+				"src/bundle/org/astro/World.java",
+				"package bundle.org.astro;\n" +
+				"public interface World {\n" +
+				"	public String name();\n" +
+				"}"
+			};
+			IJavaProject p1 = setupModuleProject("org.astro", sources, new IClasspathEntry[]{dep});
+			sources = new String[] {
+					"src/module-info.java",
+					"module other.mod {\n" +
+					"	exports bundle.org;\n" + 
+					"}",
+					"src/bundle/org/astro.java",
+					"package bundle.org;\n" +
+					"public class astro {}"
+				};
+			IJavaProject p2 = setupModuleProject("other.mod", sources, new IClasspathEntry[]{dep});
+			String[] src = new String[] {
+				"src/bundle/org/Test.java",
+				"package bundle.org;\n" +
+				"public class Test {}",
+				"src/com/greetings/MyWorld.java",
+				"package com.greetings;\n" +
+				"public class MyWorld implements bundle.org.astro.World {\n" +
+				"	public String name() {\n" +
+				"		return \" My World!!\";\n" +
+				"	}\n" +
+				"}"
+			};
+			IClasspathAttribute modAttr = new ClasspathAttribute("module", "true");
+			IClasspathEntry dep1 = JavaCore.newProjectEntry(p1.getPath(), null, false,
+				new IClasspathAttribute[] {modAttr},
+				false/*not exported*/);
+			IClasspathEntry dep2 = JavaCore.newProjectEntry(p2.getPath(), null, false,
+				new IClasspathAttribute[] {modAttr},
+				false/*not exported*/);
+			IJavaProject p3 = setupModuleProject("com.greetings", src, new IClasspathEntry[] { dep1, dep2 });
+			getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p3.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers", 
+					"The package bundle.org conflicts with a package accessible from another module: other.mod\n" + 
+					"bundle.org.astro.World cannot be resolved to a type",
+					markers);
+		} finally {
+			deleteProject("org.astro");
+			deleteProject("other.mod");
+			deleteProject("com.greetings");
+		}
+	}
+	// test that a type in a non-accessible package does not conflict with an accessible package
+	// in the context of a non-modular project
+	public void test_noconflict_concealedtype_accessiblepackage_unnamed() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			IClasspathEntry dep = JavaCore.newContainerEntry(new Path(JavaCore.MODULE_PATH_CONTAINER_ID));
+			String[] sources = new String[] {
+				"src/module-info.java",
+				"module org.astro {\n" +
+				"	exports bundle.org.astro;\n" + 
+				"}",
+				"src/bundle/org/astro/World.java",
+				"package bundle.org.astro;\n" +
+				"public interface World {\n" +
+				"	public String name();\n" +
+				"}"
+			};
+			IJavaProject p1 = setupModuleProject("org.astro", sources, new IClasspathEntry[]{dep});
+			sources = new String[] {
+					"src/module-info.java",
+					"module other.mod {\n" +
+					"}",
+					"src/bundle/org/astro.java",
+					"package bundle.org;\n" +
+					"public class astro {}"
+				};
+			IJavaProject p2 = setupModuleProject("other.mod", sources, new IClasspathEntry[]{dep});
+			String[] src = new String[] {
+				"src/com/greetings/MyWorld.java",
+				"package com.greetings;\n" +
+				"public class MyWorld implements bundle.org.astro.World {\n" +
+				"	public String name() {\n" +
+				"		return \" My World!!\";\n" +
+				"	}\n" +
+				"}"
+			};
+			IClasspathAttribute modAttr = new ClasspathAttribute("module", "true");
+			IClasspathEntry dep1 = JavaCore.newProjectEntry(p1.getPath(), null, false,
+				new IClasspathAttribute[] {modAttr},
+				false/*not exported*/);
+			IClasspathEntry dep2 = JavaCore.newProjectEntry(p2.getPath(), null, false,
+				new IClasspathAttribute[] {modAttr},
+				false/*not exported*/);
+			IJavaProject p3 = setupModuleProject("com.greetings", src, new IClasspathEntry[] { dep1, dep2 });
+			getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p3.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers",	"",  markers);
+		} finally {
+			deleteProject("org.astro");
+			deleteProject("other.mod");
+			deleteProject("com.greetings");
+		}
+	}
+	public void testBug512053() throws CoreException, IOException {
+		if (!isJRE9) return;
+		Hashtable<String, String> javaCoreOptions = JavaCore.getOptions();
+		this.sourceWorkspacePath = super.getSourceWorkspacePath() + java.io.File.separator + "bug512053"; 
+		try {
+			setUpJavaProject("bundle.test.a.callable", "9");
+			setUpJavaProject("bundle.test.a", "9");
+			setUpJavaProject("bundle.test.b", "9");
+			setUpJavaProject("jpms.test.a", "9");
+			setUpJavaProject("jpms.test.b", "9");
+			getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			assertNoErrors();
+			//assertNoErrors(p2);
+		} finally {
+			this.deleteProject("bundle.test.a.callable");
+			this.deleteProject("bundle.test.a");
+			this.deleteProject("bundle.test.b");
+			this.deleteProject("jpms.test.a");
+			this.deleteProject("jpms.test.b");
+			this.sourceWorkspacePath = null;
+			 JavaCore.setOptions(javaCoreOptions);
+		}
+	}
+	// basic test for automatic modules - external jars
+	public void testBug518280() throws CoreException, IOException {
+		if (!isJRE9) return;
+		try {
+			String libPath = "externalLib/test.jar";
+			Util.createJar(
+					new String[] {
+						"test/src/org/astro/World.java", //$NON-NLS-1$
+						"package org.astro;\n" +
+						"public interface World {\n" +
+						"	public String name();\n" +
+						"}",
+					},
+					null,
+					new HashMap<>(),
+					null,
+					getExternalResourcePath(libPath));
+			String[] src = new String[] { 
+					"src/module-info.java",
+					"module com.greetings {\n" +
+					"	requires test;\n" +
+					"	exports com.greetings;\n" +
+					"}",
+					"src/com/greetings/MyWorld.java",
+					"package com.greetings;\n" +
+					"import org.astro.World;\n"	+
+					"public class MyWorld implements World {\n" +
+					"	public String name() {\n" +
+					"		return \" My World!!\";\n" +
+					"	}\n" +
+					"}"
+			};
+			IClasspathAttribute modAttr = new ClasspathAttribute("module", "true");
+			IClasspathEntry dep = JavaCore.newLibraryEntry(new Path(getExternalResourcePath(libPath)), null, null, ClasspathEntry.NO_ACCESS_RULES,
+					new IClasspathAttribute[] {modAttr},
+					false/*not exported*/);
+			IJavaProject p2 = setupModuleProject("com.greetings", src, new IClasspathEntry[] { dep });
+
+			getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p2.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers", "", markers);
+		} finally {
+			deleteExternalResource("externalLib");
+			this.deleteProject("com.greetings");
+		}
+	}
+	// basic test for automatic modules - workspace jars
+	public void testBug518282() throws CoreException, IOException {
+		if (!isJRE9) return;
+		Hashtable<String, String> javaCoreOptions = JavaCore.getOptions();
+		try {
+			setUpJavaProject("test_automodules", "9");
+			getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			assertNoErrors();
+		} finally {
+			this.deleteProject("test_automodules");
+			JavaCore.setOptions(javaCoreOptions);
+		}
+	}
+	// Only the project using a jar as an automatic module should be able to
+	// resolve one as such
+	public void testBug518282a() throws CoreException, IOException {
+		if (!isJRE9) return;
+		Hashtable<String, String> javaCoreOptions = JavaCore.getOptions();
+		try {
+			IJavaProject p1 = setUpJavaProject("test_automodules", "9");
+			getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			assertNoErrors();
+			String[] src = new String[] { 
+					"src/module-info.java",
+					"module com.greetings {\n" +
+					"	requires junit; // This should not be resolved\n" +
+					"	exports com.greetings;\n" +
+					"}",
+					"src/com/greetings/Test.java",
+					"package com.greetings;\n" +
+					"public class Test {\n" +
+					"	public String name() {\n" +
+					"		return \" My World!!\";\n" +
+					"	}\n" +
+					"}"
+			};
+			IClasspathAttribute modAttr = new ClasspathAttribute("module", "false");
+			IClasspathEntry dep = JavaCore.newLibraryEntry(p1.getProject().findMember("lib/junit.jar").getFullPath(), null, null,
+					ClasspathEntry.NO_ACCESS_RULES,
+					new IClasspathAttribute[] {modAttr},
+					false/*not exported*/);
+			IJavaProject p2 = setupModuleProject("com.greetings", src, new IClasspathEntry[] { dep });
+
+			getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p2.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers", 
+					"junit cannot be resolved to a module", markers);
+		} finally {
+			this.deleteProject("test_automodules");
+			this.deleteProject("com.greetings");
+			JavaCore.setOptions(javaCoreOptions);
+		}
+	}
+	// A modular jar on the module path of a project should behave as a regular module and not
+	// as an automatic module
+	public void testBug518282b() throws CoreException, IOException {
+		if (!isJRE9) return;
+		Hashtable<String, String> javaCoreOptions = JavaCore.getOptions();
+		String libPath = "externalLib/test.jar";
+		try {
+			String[] src = new String[] { 
+					"src/module-info.java",
+					"module com.greetings {\n" +
+					"	exports com.greetings;\n" +
+					"}",
+					"src/com/greetings/Test.java",
+					"package com.greetings;\n" +
+					"public class Test {\n" +
+					"	public String name() {\n" +
+					"		return \" My World!!\";\n" +
+					"	}\n" +
+					"}"
+			};
+			IJavaProject p1 = setupModuleProject("test", src);
+			getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			File rootDir = new File(p1.getProject().findMember("bin").getLocation().toString());
+			Util.zip(rootDir, getExternalResourcePath(libPath));
+			src = new String[] { 
+					"src/module-info.java",
+					"module test_automodules {\n" +
+					"	requires com.greetings;\n" +
+					"}",
+					"src/test/Main.java",
+					"package test;\n" +
+					"import com.greetings.Test;\n" +
+					"public class Main {\n" +
+					"	public static void main(String[] args) {\n" +
+					"		System.out.println(new Test().name());\n" +
+					"	}\n" +
+					"}"
+			};
+			IClasspathAttribute modAttr = new ClasspathAttribute("module", "true");
+			IClasspathEntry dep = JavaCore.newLibraryEntry(new Path(getExternalResourcePath(libPath)), null, null,
+				ClasspathEntry.NO_ACCESS_RULES,
+				new IClasspathAttribute[] {modAttr},
+				false/*not exported*/);
+			IJavaProject p2 = setupModuleProject("test_automodules", src, new IClasspathEntry[] {dep});
+			getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p2.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers", "", markers);
+		} finally {
+			this.deleteProject("test");
+			this.deleteProject("test_automodules");
+			deleteExternalResource(libPath);
+			JavaCore.setOptions(javaCoreOptions);
+		}
+	}
+	// A modular jar on the class path of a module project - shouldn't be
+	// treated as a module and shouldn't be readable
+	public void testBug518282c() throws CoreException, IOException {
+		if (!isJRE9) return;
+		Hashtable<String, String> javaCoreOptions = JavaCore.getOptions();
+		String libPath = "externalLib/test.jar";
+		try {
+			String[] src = new String[] { 
+					"src/module-info.java",
+					"module test {\n" +
+					"	exports com.greetings;\n" +
+					"}",
+					"src/com/greetings/Test.java",
+					"package com.greetings;\n" +
+					"public class Test {\n" +
+					"	public String name() {\n" +
+					"		return \" My World!!\";\n" +
+					"	}\n" +
+					"}"
+			};
+			IJavaProject p1 = setupModuleProject("test", src);
+			getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			File rootDir = new File(p1.getProject().findMember("bin").getLocation().toString());
+			Util.zip(rootDir, getExternalResourcePath(libPath));
+			src = new String[] { 
+					"src/module-info.java",
+					"module test_automodules {\n" +
+					"	requires test;\n" +
+					"}",
+					"src/test/Main.java",
+					"package test;\n" +
+					"import com.greetings.Test;\n" +
+					"public class Main {\n" +
+					"	public static void main(String[] args) {\n" +
+					"		System.out.println(new Test().name());\n" +
+					"	}\n" +
+					"}"
+			};
+			IClasspathAttribute modAttr = new ClasspathAttribute("module", "false");
+			IClasspathEntry dep = JavaCore.newLibraryEntry(new Path(getExternalResourcePath(libPath)), null, null,
+				ClasspathEntry.NO_ACCESS_RULES,
+				new IClasspathAttribute[] {modAttr},
+				false/*not exported*/);
+			IJavaProject p2 = setupModuleProject("test_automodules", src, new IClasspathEntry[] {dep});
+			getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p2.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertTrue("Compilation succeeds unexpectedly", markers.length > 0);
+		} finally {
+			this.deleteProject("test");
+			this.deleteProject("test_automodules");
+			deleteExternalResource(libPath);
+			JavaCore.setOptions(javaCoreOptions);
+		}
+	}
+	// An automatic module grants implied readability to all other automatic modules
+	public void testBug518282d() throws CoreException, IOException {
+		if (!isJRE9) return;
+		Hashtable<String, String> javaCoreOptions = JavaCore.getOptions();
+		String libPath = "externalLib/test.jar";
+		try {
+			String[] src = new String[] { 
+					"src/org/astro/World.java",
+					"package org.astro;\n" +
+					"public interface World {\n" +
+					"	public String name();\n" +
+					"}"
+			};
+			IJavaProject p1 = setupModuleProject("org.astro", src);
+			src = new String[] { 
+				"src/org/greetings/Test.java",
+				"package org.greetings;\n" +
+				"import  org.astro.World;\n" +
+				"public class Test implements World {\n" +
+				"	public String name() {\n" +
+				"		return \" My World!!\";\n" +
+				"	}\n" +
+				"}"
+			};
+			IClasspathEntry dep = JavaCore.newProjectEntry(p1.getPath());
+			IJavaProject p2 = setupModuleProject("test", src, new IClasspathEntry[] {dep});
+			getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			File rootDir = new File(p2.getProject().findMember("bin").getLocation().toString());
+			Util.zip(rootDir, getExternalResourcePath(libPath));
+			src = new String[] { 
+				"src/module-info.java",
+				"module test_automodules {\n" +
+				"	requires test;\n" +
+				"}",
+				"src/test/Main.java",
+				"package test;\n" +
+				"import org.greetings.Test;\n" +
+				"public class Main {\n" +
+				"	public static void main(String[] args) {\n" +
+				"		org.astro.World world = new Test();\n" +
+				"		System.out.println(world.name());\n" +
+				"	}\n" +
+				"}"
+			};
+			IClasspathAttribute modAttr = new ClasspathAttribute("module", "true");
+			dep = JavaCore.newLibraryEntry(new Path(getExternalResourcePath(libPath)), null, null,
+				ClasspathEntry.NO_ACCESS_RULES,
+				new IClasspathAttribute[] {modAttr},
+				false/*not exported*/);
+			IClasspathEntry dep2 = JavaCore.newLibraryEntry(p1.getProject().findMember("bin").getFullPath(), null, null,
+				ClasspathEntry.NO_ACCESS_RULES,
+				new IClasspathAttribute[] {modAttr},
+				false/*not exported*/);
+			IJavaProject p3 = setupModuleProject("test_automodules", src, new IClasspathEntry[] {dep, dep2});
+			getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p3.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers", "", markers);
+		} finally {
+			this.deleteProject("test");
+			this.deleteProject("test_automodules");
+			this.deleteProject("org.astro");
+			deleteExternalResource(libPath);
+			JavaCore.setOptions(javaCoreOptions);
+		}
+	}
+	// Automatic module should not allow access to other explicit modules without
+	// requires
+	public void testBug518282e() throws CoreException, IOException {
+		if (!isJRE9) return;
+		Hashtable<String, String> javaCoreOptions = JavaCore.getOptions();
+		String libPath = "externalLib/test.jar";
+		try {
+			String[] src = new String[] { 
+					"src/module-info.java",
+					"module org.astro {\n" +
+					"	exports org.astro;\n" +
+					"}",
+					"src/org/astro/World.java",
+					"package org.astro;\n" +
+					"public interface World {\n" +
+					"	public String name();\n" +
+					"}"
+			};
+			IJavaProject p1 = setupModuleProject("org.astro", src);
+			src = new String[] { 
+				"src/com/greetings/Test.java",
+				"package com.greetings;\n" +
+				"import  org.astro.World;\n" +
+				"public class Test implements World {\n" +
+				"	public String name() {\n" +
+				"		return \" My World!!\";\n" +
+				"	}\n" +
+				"}"
+			};
+			IClasspathEntry dep = JavaCore.newProjectEntry(p1.getPath());
+			IJavaProject p2 = setupModuleProject("test", src, new IClasspathEntry[] {dep});
+			getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			File rootDir = new File(p2.getProject().findMember("bin").getLocation().toString());
+			Util.zip(rootDir, getExternalResourcePath(libPath));
+			src = new String[] { 
+				"src/module-info.java",
+				"module test_automodules {\n" +
+				"	requires test;\n" +
+				"}",
+				"src/test/Main.java",
+				"package test;\n" +
+				"import com.greetings.Test;\n" +
+				"import org.astro.*;\n" +
+				"public class Main {\n" +
+				"	public static void main(String[] args) {\n" +
+				"		World world = new Test();\n" +
+				"		System.out.println(world.name());\n" +
+				"	}\n" +
+				"}"
+			};
+			IClasspathAttribute modAttr = new ClasspathAttribute("module", "true");
+			dep = JavaCore.newLibraryEntry(new Path(getExternalResourcePath(libPath)), null, null,
+				ClasspathEntry.NO_ACCESS_RULES,
+				new IClasspathAttribute[] {modAttr},
+				false/*not exported*/);
+			modAttr = new ClasspathAttribute("module", "true");
+			IClasspathEntry dep2 = JavaCore.newProjectEntry(p1.getPath(), null, true,
+				new IClasspathAttribute[] {modAttr},
+				false/*not exported*/);
+			IJavaProject p3 = setupModuleProject("test_automodules", src, new IClasspathEntry[] {dep, dep2});
+			getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p3.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			sortMarkers(markers);
+			assertMarkers("Unexpected markers", 
+					"The package org.astro is not accessible\n" +
+					"World cannot be resolved to a type", markers);
+		} finally {
+			this.deleteProject("test");
+			this.deleteProject("test_automodules");
+			this.deleteProject("org.astro");
+			deleteExternalResource(libPath);
+			JavaCore.setOptions(javaCoreOptions);
+		}
+	}
+	// An automatic module shouldn't allow access to classpath
+	public void testBug518282f() throws CoreException, IOException {
+		if (!isJRE9) return;
+		Hashtable<String, String> javaCoreOptions = JavaCore.getOptions();
+		String libPath = "externalLib/test.jar";
+		try {
+			String[] src = new String[] { 
+					"src/org/astro/World.java",
+					"package org.astro;\n" +
+					"public interface World {\n" +
+					"	public String name();\n" +
+					"}"
+			};
+			IJavaProject p1 = setupModuleProject("org.astro", src);
+			src = new String[] { 
+				"src/com/greetings/Test.java",
+				"package com.greetings;\n" +
+				"import  org.astro.World;\n" +
+				"public class Test implements World {\n" +
+				"	public String name() {\n" +
+				"		return \" My World!!\";\n" +
+				"	}\n" +
+				"}"
+			};
+			IClasspathEntry dep = JavaCore.newProjectEntry(p1.getPath());
+			IJavaProject p2 = setupModuleProject("test", src, new IClasspathEntry[] {dep});
+			getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			File rootDir = new File(p2.getProject().findMember("bin").getLocation().toString());
+			Util.zip(rootDir, getExternalResourcePath(libPath));
+			src = new String[] { 
+				"src/module-info.java",
+				"module test_automodules {\n" +
+				"	requires test;\n" +
+				"}",
+				"src/test/Main.java",
+				"package test;\n" +
+				"import com.greetings.Test;\n" +
+				"public class Main {\n" +
+				"	public static void main(String[] args) {\n" +
+				"		org.astro.World world = new Test();\n" +
+				"		System.out.println(world.name());\n" +
+				"	}\n" +
+				"}"
+			};
+			IClasspathAttribute modAttr = new ClasspathAttribute("module", "true");
+			dep = JavaCore.newLibraryEntry(new Path(getExternalResourcePath(libPath)), null, null,
+				ClasspathEntry.NO_ACCESS_RULES,
+				new IClasspathAttribute[] {modAttr},
+				false/*not exported*/);
+			modAttr = new ClasspathAttribute("module", "false");
+			IClasspathEntry dep2 = JavaCore.newLibraryEntry(p1.getProject().findMember("bin").getFullPath(), null, null,
+				ClasspathEntry.NO_ACCESS_RULES,
+				new IClasspathAttribute[] {modAttr},
+				false/*not exported*/);
+			IJavaProject p3 = setupModuleProject("test_automodules", src, new IClasspathEntry[] {dep, dep2});
+			getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p3.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers",
+					"The project was not built since its build path is incomplete. Cannot find the class file for org.astro.World. Fix the build path then try building this project\n" + 
+					"The type org.astro.World cannot be resolved. It is indirectly referenced from required .class files",
+					markers);
+		} finally {
+			this.deleteProject("test");
+			this.deleteProject("test_automodules");
+			this.deleteProject("org.astro");
+			deleteExternalResource(libPath);
+			JavaCore.setOptions(javaCoreOptions);
+		}
+	}
+
+	public void testUnnamedModule_bug519674() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			IJavaProject p1 = createJava9Project("Project1");
+			createFolder("/Project1/src/pack1");
+			createFile("/Project1/src/pack1/Class1.java",
+					"package pack1;\n" +
+					"public class Class1 {}\n");
+			
+			IJavaProject p2 = createJava9Project("Project2");
+			{
+				IClasspathEntry[] old = p2.getRawClasspath();
+				IClasspathEntry[] newPath = new IClasspathEntry[old.length + 1];
+				System.arraycopy(old, 0, newPath, 0, old.length);
+				newPath[old.length] = JavaCore.newProjectEntry(p1.getPath());
+				p2.setRawClasspath(newPath, null);
+			}
+			createFolder("/Project2/src/pack2");
+			createFile("/Project2/src/pack2/Class2.java",
+					"package pack2;\n" +
+					"import pack1.Class1;\n" +
+					"public class Class2 extends Class1 {}\n");
+			getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p2.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers", "", markers);
+		} finally {
+			this.deleteProject("Project1");
+			this.deleteProject("Project2");
+		}
+
+	}
+	public void testBug520246() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			String[] src = new String[] { 
+				"src/module-info.java",
+				"module test_automodules {\n" +
+				"	requires java.sql;\n" +
+				"}",
+				"src/org/astro/World.java",
+				"package org.astro;\n" +
+				"import some.pack.Type;\n" +
+				"public interface World {\n" +
+				"	public String name();\n" +
+				"}"
+			};
+			IJavaProject p1 = setupModuleProject("org.astro", src);
+			getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p1.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers", "The import some cannot be resolved", markers);
+		} finally {
+			this.deleteProject("org.astro");
+		}
+
+	}	
+	public void testBug520147() throws CoreException, IOException {
+		if (!isJRE9) return;
+		Hashtable<String, String> javaCoreOptions = JavaCore.getOptions();
+		try {
+			String[] src = new String[] { 
+					"src/module-info.java",
+					"module org.astro {\n" +
+					"	exports org.astro;\n" +
+					"}",
+					"src/bundle/org/SomeClass.java",
+					"package bundle.org;\n" +
+					"public class SomeClass {}",
+					"src/org/astro/World.java",
+					"package org.astro;\n" +
+					"public interface World {\n" +
+					"	public String name();\n" +
+					"}"
+			};
+			IJavaProject p1 = setupModuleProject("org.astro", src);
+			src = new String[] {
+				"src/module-info.java",
+				"module com.greetings {\n" +
+					"	requires org.astro;\n" +
+					"	exports bundle.org;\n" +
+					"}",
+				"src/bundle/org/SomeWorld.java",
+				"package bundle.org;\n" +
+				"import  org.astro.World;\n" +
+				"public class SomeWorld implements World {\n" +
+				"	public String name() {\n" +
+				"		return \" Some World!!\";\n" +
+				"	}\n" +
+				"}"
+			};
+			IClasspathAttribute modAttr = new ClasspathAttribute("module", "true");
+			IClasspathEntry dep = JavaCore.newProjectEntry(p1.getPath(), null, false, new IClasspathAttribute[] {modAttr}, false);
+			IJavaProject p2 = setupModuleProject("com.greetings", src, new IClasspathEntry[] {dep});
+			getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			src = new String[] { 
+				"src/module-info.java",
+				"module test {\n" +
+				"	exports test;\n" +
+				"	requires org.astro;\n" +
+				"	requires com.greetings;\n" +
+				"}",
+				"src/test/Main.java",
+				"package test;\n" +
+				"import bundle.org.SomeWorld;\n" +
+				"public class Main {\n" +
+				"	public static void main(String[] args) {\n" +
+				"		org.astro.World world = new SomeWorld();\n" +
+				"		System.out.println(world.name());\n" +
+				"	}\n" +
+				"}"
+			};
+			IClasspathEntry dep2 = JavaCore.newProjectEntry(p2.getPath(), null, false, new IClasspathAttribute[] {modAttr}, false);
+			IJavaProject p3 = setupModuleProject("test", src, new IClasspathEntry[] {dep, dep2});
+			getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p3.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers", "", markers);
+		} finally {
+			this.deleteProject("test");
+			this.deleteProject("com.greetings");
+			this.deleteProject("org.astro");
+			JavaCore.setOptions(javaCoreOptions);
+		}
+	}	
+	public void testBug520147a() throws CoreException, IOException {
+		if (!isJRE9) return;
+		Hashtable<String, String> javaCoreOptions = JavaCore.getOptions();
+		try {
+			String[] src = new String[] { 
+					"src/module-info.java",
+					"module org.astro {\n" +
+					"	exports org.astro;\n" +
+					"}",
+					"src/bundle/org/SomeClass.java",
+					"package bundle.org;\n" +
+					"public class SomeClass {}",
+					"src/org/astro/World.java",
+					"package org.astro;\n" +
+					"public interface World {\n" +
+					"	public String name();\n" +
+					"}"
+			};
+			IJavaProject p1 = setupModuleProject("org.astro", src);
+			src = new String[] {
+				"src/module-info.java",
+				"module com.greetings {\n" +
+					"	requires org.astro;\n" +
+					"	exports bundle.org;\n" +
+					"}",
+				"src/bundle/org/SomeWorld.java",
+				"package bundle.org;\n" +
+				"import  org.astro.World;\n" +
+				"public class SomeWorld implements World {\n" +
+				"	public String name() {\n" +
+				"		return \" Some World!!\";\n" +
+				"	}\n" +
+				"}"
+			};
+			IClasspathAttribute modAttr = new ClasspathAttribute("module", "true");
+			IClasspathEntry dep = JavaCore.newProjectEntry(p1.getPath(), null, false, new IClasspathAttribute[] {modAttr}, false);
+			IJavaProject p2 = setupModuleProject("com.greetings", src, new IClasspathEntry[] {dep});
+			getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			src = new String[] { 
+				"src/module-info.java",
+				"module test {\n" +
+				"	exports test;\n" +
+				"	requires com.greetings;\n" +
+				"}",
+				"src/test/Main.java",
+				"package test;\n" +
+				"import bundle.org.SomeWorld;\n" +
+				"public class Main {\n" +
+				"	public static void main(String[] args) {\n" +
+				"		org.astro.World world = new SomeWorld();\n" +
+				"		System.out.println(world.name());\n" +
+				"	}\n" +
+				"}"
+			};
+			IClasspathEntry dep2 = JavaCore.newProjectEntry(p2.getPath(), null, false, new IClasspathAttribute[] {modAttr}, false);
+			IJavaProject p3 = setupModuleProject("test", src, new IClasspathEntry[] {dep, dep2});
+			getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p3.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers", 
+					"The type org.astro.World is not accessible", markers);
+		} finally {
+			this.deleteProject("test");
+			this.deleteProject("com.greetings");
+			this.deleteProject("org.astro");
+			JavaCore.setOptions(javaCoreOptions);
+		}
+	}
+	public void testBug520147b() throws CoreException, IOException {
+		if (!isJRE9) return;
+		Hashtable<String, String> javaCoreOptions = JavaCore.getOptions();
+		try {
+			String[] src = new String[] { 
+					"src/module-info.java",
+					"module org.astro {\n" +
+					"	exports org.astro;\n" +
+					"	exports bundle.org to com.greetings;\n" +
+					"}",
+					"src/bundle/org/SomeClass.java",
+					"package bundle.org;\n" +
+					"public class SomeClass {}",
+					"src/org/astro/World.java",
+					"package org.astro;\n" +
+					"public interface World {\n" +
+					"	public String name();\n" +
+					"}"
+			};
+			IJavaProject p1 = setupModuleProject("org.astro", src);
+			src = new String[] {
+				"src/module-info.java",
+				"module com.greetings {\n" +
+					"	requires org.astro;\n" +
+					"	exports bundle.org;\n" +
+					"}",
+				"src/bundle/org/SomeWorld.java",
+				"package bundle.org;\n" +
+				"import  org.astro.World;\n" +
+				"public class SomeWorld implements World {\n" +
+				"	public String name() {\n" +
+				"		return \" Some World!!\";\n" +
+				"	}\n" +
+				"}"
+			};
+			IClasspathAttribute modAttr = new ClasspathAttribute("module", "true");
+			IClasspathEntry dep = JavaCore.newProjectEntry(p1.getPath(), null, false, new IClasspathAttribute[] {modAttr}, false);
+			IJavaProject p2 = setupModuleProject("com.greetings", src, new IClasspathEntry[] {dep});
+			getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			src = new String[] { 
+				"src/module-info.java",
+				"module test {\n" +
+				"	exports test;\n" +
+				"	requires org.astro;\n" +
+				"	requires com.greetings;\n" +
+				"}",
+				"src/test/Main.java",
+				"package test;\n" +
+				"import bundle.org.SomeWorld;\n" +
+				"public class Main {\n" +
+				"	public static void main(String[] args) {\n" +
+				"		org.astro.World world = new SomeWorld();\n" +
+				"		System.out.println(world.name());\n" +
+				"	}\n" +
+				"}"
+			};
+			IClasspathEntry dep2 = JavaCore.newProjectEntry(p2.getPath(), null, false, new IClasspathAttribute[] {modAttr}, false);
+			IJavaProject p3 = setupModuleProject("test", src, new IClasspathEntry[] {dep, dep2});
+			getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p3.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers", "", markers);
+		} finally {
+			this.deleteProject("test");
+			this.deleteProject("com.greetings");
+			this.deleteProject("org.astro");
+			JavaCore.setOptions(javaCoreOptions);
+		}
+	}
+	public void testSourceFolders_Bug519673() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			// Setup project PSources1:
+			String[] src = new String[] { 
+					"src/module-info.java",
+					"module PSources1 {\n" +
+					"	//exports p.q;\n" +
+					"}",
+					"src2/p/q/SomeClass.java",
+					"package p.q;\n" +
+					"public class SomeClass {}",
+			};
+			IJavaProject p1 = setupModuleProject("PSources1", new String[] { "src", "src2" }, src, new IClasspathEntry[0]);
+			getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+
+			// Edit PSources1/src/module-info.java:
+			String infoSrc =
+					"module PSources1 {\n" +
+					"	exports p.q;\n" +
+					"}";
+			String infoPath = "/PSources1/src/module-info.java";
+			editFile(infoPath, infoSrc);
+			this.workingCopies = new ICompilationUnit[1];
+			char[] sourceChars = src[1].toCharArray();
+			this.problemRequestor.initialize(sourceChars);
+			this.workingCopies[0] = getCompilationUnit(infoPath).getWorkingCopy(this.wcOwner, null);
+			// was: ERROR: The package pkg does not exist or is empty
+			assertProblems(
+					"Unexpected problems",
+					"----------\n" + 
+					"----------\n",
+					this.problemRequestor);
+
+			// Setup project PClient2:
+			String[] src2 = new String[] { 
+					"src/module-info.java",
+					"module PClient2 {\n" +
+					"	requires PSources1;\n" +
+					"}",
+					"src/x/Client.java",
+					"package x;\n" +
+					"public class Client {\n" +
+					"	p.q.SomeClass f;\n" +
+					"\n}",
+			};
+			setupModuleProject("PClient2", src2);
+			getWorkspace().build(IncrementalProjectBuilder.INCREMENTAL_BUILD, null);
+			IMarker[] markers = p1.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers", "", markers);
+
+			// Edit PClient2/src/module-info.java:
+			// was NPE in ModuleBinding.canAccess()
+			char[] info2Chars = src2[2].toCharArray();
+			this.problemRequestor.initialize(info2Chars);
+			this.workingCopies[0] = getCompilationUnit("PClient2/src/module-info.java").getWorkingCopy(this.wcOwner, null);
+			assertProblems(
+					"Unexpected problems",
+					"----------\n" + 
+					"----------\n",
+					this.problemRequestor);
+
+			// Failed attempt to trigger NPE in ModuleBinding.isPackageExportedTo() by editing Client.java
+			char[] source2Chars = src2[3].toCharArray();
+			this.problemRequestor.initialize(source2Chars);
+			this.workingCopies[0] = getCompilationUnit("PClient2/src/x/Client.java").getWorkingCopy(this.wcOwner, null);
+			assertProblems(
+					"Unexpected problems",
+					"----------\n" + 
+					"----------\n",
+					this.problemRequestor);
+		} finally {
+			deleteProject("PSources1");
+			deleteProject("PClient2");
+		}
+	}
+	public void testPrivateMethod_Bug515985() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			String[] src = new String[] {
+					"src/module-info.java", 
+					"module mod.one { \n" +
+					"	exports pm;\n" +
+					"}",
+					"src/impl/Other.java", 
+					"package impl;\n" +
+					"public class Other {\n" +
+					"    public void privateMethod() {}" + 
+					"}\n",
+					"src/pm/C1.java", 
+					"package pm;\n" +
+					"import impl.Other;\n" + 
+					"public class C1 extends Other {\n" + 
+					"}\n"
+			};
+			IJavaProject p1 = setupModuleProject("mod.one", src);
+			getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+	
+			String[] src2 = new String[] {
+					"src/module-info.java", 
+					"module mod.two { \n" +
+					"	requires mod.one;\n" +
+					"}",
+					"src/po/Client.java", 
+					"package po;\n" + 
+					"import pm.C1;\n" + 
+					"public class Client {\n" + 
+					"    void test1(C1 one) {\n" + 
+					"        one.privateMethod(); // ecj: The method privateMethod() is undefined for the type C1\n" + 
+					"    }\n" + 
+					"}\n"
+			};
+			IClasspathAttribute modAttr = new ClasspathAttribute("module", "true");
+			IClasspathEntry dep = JavaCore.newProjectEntry(p1.getPath(), null, false, new IClasspathAttribute[] {modAttr}, false);
+			IJavaProject p2 = setupModuleProject("mod.two", src2, new IClasspathEntry[] {dep});
+			getWorkspace().build(IncrementalProjectBuilder.INCREMENTAL_BUILD, null);
+			IMarker[] markers = p2.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers", "", markers);
+		} finally {
+			deleteProject("mod.one");
+			deleteProject("mod.two");
+		}
+	}
+	public void testAddExports() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			String[] sources = new String[] {
+					"src/module-info.java",
+					"module morg.astro {\n" +
+//					"	exports org.astro to com.greetings;\n" + // this export will be added via add-exports
+					"}",
+					"src/org/astro/World.java",
+					"package org.astro;\n" +
+					"public interface World {\n" +
+					"	public String name();\n" +
+					"}"
+			};
+			IJavaProject p1 = setupModuleProject("morg.astro", sources);
+			IClasspathAttribute modAttr = new ClasspathAttribute("module", "true");
+			IClasspathAttribute addExports = new ClasspathAttribute(IClasspathAttribute.ADD_EXPORTS, "morg.astro/org.astro=com.greetings");
+			IClasspathEntry dep = JavaCore.newProjectEntry(p1.getPath(), null, false,
+															new IClasspathAttribute[] {modAttr, addExports},
+															false/*not exported*/);
+			String[] src = new String[] {
+					"src/module-info.java",
+					"module com.greetings {\n" +
+					"	requires morg.astro;\n" +
+					"	exports com.greetings;\n" +
+					"}",
+					"src/com/greetings/MyWorld.java",
+					"package com.greetings;\n" +
+					"import org.astro.World;\n" +
+					"public class MyWorld implements World {\n" +
+					"	public String name() {\n" +
+					"		return \" My World!!\";\n" +
+					"	}\n" +
+					"}"
+			};
+			IJavaProject p2 = setupModuleProject("com.greetings", src, new IClasspathEntry[] { dep });
+			p2.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p2.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers",	"",  markers);
+		} finally {
+			deleteProject("morg.astro");
+			deleteProject("com.greetings");
+		}
+	}
+	public void testAddExports2() throws CoreException {
+		if (!isJRE9) return;
+		try {
+			String[] sources = new String[] {
+					"src/module-info.java",
+					"module morg.astro {\n" +
+//					"	exports org.astro to com.greetings;\n" + // this export will be added via add-exports
+//					"	exports org.eclipse to com.greetings;\n" + // this export will be added via add-exports
+					"}",
+					"src/org/astro/World.java",
+					"package org.astro;\n" +
+					"public interface World {\n" +
+					"	public String name();\n" +
+					"}",
+					"src/org/eclipse/Planet.java",
+					"package org.eclipse;\n" +
+					"public class Planet {}\n"
+			};
+			IJavaProject p1 = setupModuleProject("morg.astro", sources);
+			IClasspathAttribute modAttr = new ClasspathAttribute("module", "true");
+			IClasspathAttribute addExports = new ClasspathAttribute(IClasspathAttribute.ADD_EXPORTS,
+						"morg.astro/org.astro=com.greetings:morg.astro/org.eclipse=com.greetings");
+			IClasspathEntry dep = JavaCore.newProjectEntry(p1.getPath(), null, false,
+															new IClasspathAttribute[] {modAttr, addExports},
+															false/*not exported*/);
+			String[] src = new String[] {
+					"src/module-info.java",
+					"module com.greetings {\n" +
+					"	requires morg.astro;\n" +
+					"	exports com.greetings;\n" +
+					"}",
+					"src/com/greetings/MyWorld.java",
+					"package com.greetings;\n" +
+					"import org.astro.World;\n" +
+					"public class MyWorld implements World {\n" +
+					"	org.eclipse.Planet planet;\n" +
+					"	public String name() {\n" +
+					"		return \" My World!!\";\n" +
+					"	}\n" +
+					"}"
+			};
+			IJavaProject p2 = setupModuleProject("com.greetings", src, new IClasspathEntry[] { dep });
+			p2.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p2.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers",	"",  markers);
+		} finally {
+			deleteProject("morg.astro");
+			deleteProject("com.greetings");
+		}
+	}
+	public void testAddReads() throws CoreException, IOException {
+		if (!isJRE9) return;
+		try {
+			// org.astro defines the "real" org.astro.World:
+			String[] sources = new String[] {
+					"src/module-info.java",
+					"module org.astro {\n" +
+					"	exports org.astro;\n" + 
+					"}",
+					"src/org/astro/World.java",
+					"package org.astro;\n" +
+					"public interface World {\n" +
+					"	public String name();\n" +
+					"}"
+			};
+			IJavaProject p = setupModuleProject("org.astro", sources);
+
+			// build mod.one with a private copy of org.astro.World:
+			String[] src1 = new String[] {
+					"src/module-info.java",
+					"module mod.one {\n" +
+					"	exports one.p;\n" +
+					"}\n",
+					"src/org/astro/World.java",
+					"package org.astro;\n" +
+					"public interface World { public String name(); }\n",
+					"src/one/p/C.java",
+					"package one.p;\n" +
+					"public class C {\n" +
+					"	public void test(org.astro.World w) {\n" +
+					"		System.out.println(w.name());\n" +
+					"	}\n" +
+					"}\n"
+			};
+			IClasspathAttribute modAttr = new ClasspathAttribute("module", "true");
+			IClasspathEntry dep = JavaCore.newProjectEntry(p.getPath(), null, false,
+															new IClasspathAttribute[] { modAttr },
+															false/*not exported*/);
+			IJavaProject p1 = setupModuleProject("mod.one", src1, new IClasspathEntry[] { dep });
+			p1.setOption(JavaCore.COMPILER_PB_API_LEAKS, JavaCore.IGNORE); // the stub org.astro.World is not exported but used in API
+			p1.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p1.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers",	"",  markers);
+
+			// jar-up without the private copy:
+			deleteFile("/mod.one/src/org/astro/World.java");
+			deleteFile("/mod.one/bin/org/astro/World.class");
+			String modOneJarPath = getWorkspacePath()+File.separator+"mod.one.jar";
+			Util.zip(new File(getWorkspacePath()+"/mod.one/bin"), modOneJarPath);
+
+			// com.greetings depends on both other modules:
+			String[] src2 = new String[] {
+				"src/module-info.java",
+				"module com.greetings {\n" +
+				"	requires org.astro;\n" +
+				"	requires mod.one;\n" +
+				"}",
+				"src/com/greetings/MyTest.java",
+				"package com.greetings;\n" +
+				"public class MyTest {\n" +
+				"	public void test(one.p.C c, org.astro.World w) {\n" +
+				"		c.test(w);\n" +
+				"	}\n" +
+				"}"
+			};
+			IClasspathEntry dep1 = JavaCore.newProjectEntry(p.getPath(), null, false,
+															new IClasspathAttribute[] {new ClasspathAttribute("module", "true")},
+															false/*not exported*/);
+			// need to re-wire dependency mod.one -> org.astro for resolving one.p.C:
+			IClasspathEntry dep2 = JavaCore.newLibraryEntry(new Path(modOneJarPath), null, null, null,
+															new IClasspathAttribute[] {
+																	new ClasspathAttribute("module", "true"),
+																	new ClasspathAttribute(IClasspathAttribute.ADD_READS, "mod.one=org.astro")
+															},
+															false/*not exported*/);
+			IJavaProject p2 = setupModuleProject("com.greetings", src2, new IClasspathEntry[] { dep1, dep2 });
+			p2.getProject().getWorkspace().build(IncrementalProjectBuilder.INCREMENTAL_BUILD, null);
+			markers = p2.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers",	"",  markers);
+
+			// check that reconcile respects --add-reads, too:
+			this.problemRequestor.reset();
+			ICompilationUnit cu = getCompilationUnit("/com.greetings/src/com/greetings/MyTest.java");
+			cu.getWorkingCopy(this.wcOwner, null);
+			assertProblems(
+				"Unexpected problems",
+				"----------\n" +
+				"----------\n",
+				this.problemRequestor);
+
+		} finally {
+			deleteProject("mod.one");
+			deleteProject("org.astro");
+			deleteProject("com.greetings");
+		}
+	}
+	public void testBug520147c() throws CoreException, IOException {
+		if (!isJRE9) return;
+		Hashtable<String, String> javaCoreOptions = JavaCore.getOptions();
+		try {
+			String[] src = new String[] { 
+					"src/module-info.java",
+					"module org.astro {\n" +
+					"	exports org.astro;\n" +
+					"}",
+					"src/org/astro/World.java",
+					"package org.astro;\n" +
+					"public interface World {\n" +
+					"	public String name();\n" +
+					"}"
+			};
+			IJavaProject p1 = setupModuleProject("org.astro", src);
+			src = new String[] {
+				"src/org/eclipse/pack1/SomeWorld.java",
+				"package org.eclipse.pack1;\n" +
+				"import  org.astro.World;\n" +
+				"public class SomeWorld implements World {\n" +
+				"	public String name() {\n" +
+				"		return \" Some World!!\";\n" +
+				"	}\n" +
+				"}"
+			};
+			IClasspathAttribute modAttr = new ClasspathAttribute("module", "true");
+			IClasspathEntry dep = JavaCore.newProjectEntry(p1.getPath(), null, false, new IClasspathAttribute[] {modAttr}, false);
+			IJavaProject p2 = setupModuleProject("com.greetings", src, new IClasspathEntry[] {dep});
+			getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			src = new String[] { 
+				"src/module-info.java",
+				"module test {\n" +
+				"	exports test;\n" +
+				"	requires com.greetings;\n" +
+				"	requires org.astro;\n" +
+				"}",
+				"src/test/Main.java",
+				"package test;\n" +
+				"import org.eclipse.pack1.SomeWorld;\n" +
+				"public class Main {\n" +
+				"	public static void main(String[] args) {\n" +
+				"		org.astro.World world = new SomeWorld();\n" +
+				"		System.out.println(world.name());\n" +
+				"	}\n" +
+				"}"
+			};
+			IClasspathEntry dep2 = JavaCore.newProjectEntry(p2.getPath(), null, false, new IClasspathAttribute[] {modAttr}, false);
+			IJavaProject p3 = setupModuleProject("test", src, new IClasspathEntry[] {dep, dep2});
+			getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p3.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers", "", markers);
+		} finally {
+			this.deleteProject("test");
+			this.deleteProject("com.greetings");
+			this.deleteProject("org.astro");
+			JavaCore.setOptions(javaCoreOptions);
+		}
+	}
+	public void testBug519935() throws CoreException, IOException {
+		if (!isJRE9) return;
+		Hashtable<String, String> javaCoreOptions = JavaCore.getOptions();
+		try {
+			String[] src = new String[] { 
+				"src/module-info.java",
+				"module org.astro {\n" +
+				"	exports org.astro;\n" +
+				"}",
+				"src/org/astro/World.java",
+				"package org.astro;\n" +
+				"public interface World {\n" +
+				"	public String name();\n" +
+				"}"
+			};
+			IJavaProject p1 = setupModuleProject("org.astro", src);
+			src = new String[] { 
+				"src/org/eclipse/pack/Test.java",
+				"package org.eclipse.pack;\n" +
+				"import org.astro.World;\n" +
+				"public class Test implements World {\n" +
+				"	public String name() {\n" +
+				"		return \" My World!!\";\n" +
+				"	}\n" +
+				"}"
+			};
+			IClasspathEntry dep = JavaCore.newProjectEntry(p1.getPath());
+			IJavaProject p2 = setupModuleProject("test", src, new IClasspathEntry[] {dep});
+			getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			src = new String[] { 
+				"src/module-info.java",
+				"module test_automodules {\n" +
+				"	requires bin;\n" +
+				"	requires org.astro;\n" +
+				"}",
+				"src/test/Main.java",
+				"package test;\n" +
+				"import org.eclipse.pack.Test;\n" +
+				"import org.astro.*;\n" +
+				"public class Main {\n" +
+				"	public static void main(String[] args) {\n" +
+				"		World world = new Test();\n" +
+				"		System.out.println(world.name());\n" +
+				"	}\n" +
+				"}"
+			};
+			IClasspathAttribute modAttr = new ClasspathAttribute("module", "true");
+			dep = JavaCore.newLibraryEntry(p2.getProject().findMember("bin").getFullPath(), null, null,
+				ClasspathEntry.NO_ACCESS_RULES,
+				new IClasspathAttribute[] {modAttr},
+				false/*not exported*/);
+			modAttr = new ClasspathAttribute("module", "true");
+			IClasspathEntry dep2 = JavaCore.newProjectEntry(p1.getPath(), null, true,
+				new IClasspathAttribute[] {modAttr},
+				false/*not exported*/);
+			setupModuleProject("testSOE", src, new IClasspathEntry[] {dep, dep2});
+			this.workingCopies = new ICompilationUnit[1];
+			this.workingCopies[0] = getCompilationUnit("/testSOE/src/test/Main.java").getWorkingCopy(this.wcOwner, null);
+			this.problemRequestor.initialize(src[3].toCharArray());
+			CompilationUnit unit = this.workingCopies[0].reconcile(AST.JLS9, true, this.wcOwner, null);
+			assertNotNull("Could not reconcile", unit);
+		} finally {
+			this.deleteProject("test");
+			this.deleteProject("testSOE");
+			this.deleteProject("org.astro");
+			JavaCore.setOptions(javaCoreOptions);
+		}
+	}
+	public void testBug520310() throws CoreException, IOException {
+		if (!isJRE9) return;
+		try {
+			String[] src = new String[] { 
+				"src/module-info.java",
+				"module mod.one {\n" +
+//				"	requires mod.two;\n" +
+				"	exports org.astro;\n" +
+				"}",
+				"src/org/astro/World.java",
+				"package org.astro;\n" +
+				"public interface World {\n" +
+				"	public String name();\n" +
+				"}"
+			};
+			IClasspathEntry modDep = JavaCore.newContainerEntry(new Path(JavaCore.MODULE_PATH_CONTAINER_ID));
+			IJavaProject p1 = setupModuleProject("mod.one", src, new IClasspathEntry[] {modDep});
+
+			src = new String[] { 
+					"src/module-info.java",
+					"module mod.two {\n" +
+					"	requires mod.one;\n" +
+					"	exports test;\n" +
+					"}",
+					"src/test/Test.java",
+					"package test;\n" +
+					"import org.astro.World;\n" +
+					"public class Test implements World {\n" +
+					"	public String name() {\n" +
+					"		return \" My World!!\";\n" +
+					"	}\n" +
+					"}"
+			};
+			IJavaProject p2 = setupModuleProject("mod.two", src, new IClasspathEntry[] {modDep});
+			
+			getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = p1.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers in mod.one", "", markers);
+			markers = p2.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers in mod.two", "", markers);
+			
+			editFile("/mod.one/src/module-info.java",
+				"module mod.one {\n" +
+				"	requires mod.two;\n" + // added
+				"	exports org.astro;\n" +
+				"}");
+			getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null); // modules see each other only on 2nd attempt, don't ask me...
+			markers = p1.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers in mod.one", 
+					"Cycle exists in module dependencies, Module mod.one requires itself via mod.two",
+					markers);
+			markers = p2.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			sortMarkers(markers);
+			assertMarkers("Unexpected markers in mod.two", 
+					"The import org cannot be resolved\n" + // cannot use cyclic requires 
+					"Cycle exists in module dependencies, Module mod.two requires itself via mod.one\n" + 
+					"World cannot be resolved to a type",
+					markers);
+
+			this.workingCopies = new ICompilationUnit[1];
+			this.workingCopies[0] = getCompilationUnit("/mod.two/src/module-info.java").getWorkingCopy(this.wcOwner, null);
+			this.problemRequestor.initialize(src[1].toCharArray());
+			CompilationUnit unit = this.workingCopies[0].reconcile(AST.JLS9, true, this.wcOwner, null);
+			assertNotNull("Could not reconcile", unit);
+		} finally {
+			this.deleteProject("mod.one");
+			this.deleteProject("mod.two");
+		}
+	}
+	public void testBug521346() throws CoreException, IOException {
+		if (!isJRE9) return;
+		IJavaProject javaProject = null;
+		try {
+			String src =
+					"import java.*;\n" + 
+					"public class X {\n" + 
+					"    public static void main(String[] args) {\n" + 
+					"        System.out.println(true);\n" + 
+					"    }\n" + 
+					"}";
+			javaProject = createJava9Project("Test");
+			this.problemRequestor.initialize(src.toCharArray());
+			getWorkingCopy("/Test/src/X.java", src, true);
+			assertProblems("should have not problems",
+					"----------\n" + 
+					"1. WARNING in /Test/src/X.java (at line 1)\n" + 
+					"	import java.*;\n" + 
+					"	       ^^^^\n" + 
+					"The import java is never used\n" + 
+					"----------\n",
+					this.problemRequestor);
+		} finally {
+			if (javaProject != null)
+				deleteProject(javaProject);
+		}
+	}
+	public void testAutoModule1() throws Exception {
+		if (!isJRE9) return;
+		IJavaProject javaProject = null;
+		try {
+			String[] sources = {
+				"p/a/X.java",
+				"package p.a;\n" +
+				"public class X {}\n;"
+			};
+			String outputDirectory = Util.getOutputDirectory();
+	
+			String jarPath = outputDirectory + File.separator + "lib-x.jar";
+			Util.createJar(sources, jarPath, "1.8");
+			
+			javaProject = createJava9Project("mod.one", new String[] {"src"});
+			IClasspathAttribute[] attributes = { JavaCore.newClasspathAttribute(IClasspathAttribute.MODULE, "true") };
+			addClasspathEntry(javaProject, JavaCore.newLibraryEntry(new Path(jarPath), null, null, null, attributes, false));
+
+			String srcMod =
+				"module mod.one { \n" +
+				"	requires lib.x;\n" + // lib.x is derived from lib-x.jar
+				"}";
+			createFile("/mod.one/src/module-info.java", 
+				srcMod);
+			createFolder("mod.one/src/q");
+			String srcX =
+				"package q;\n" +
+				"public class X {\n" +
+				"	p.a.X f;\n" +
+				"}";
+			createFile("/mod.one/src/q/X.java", srcX);
+			
+			this.problemRequestor.initialize(srcMod.toCharArray());
+			getWorkingCopy("/mod.one/module-info.java", srcMod, true);
+			assertProblems("module-info should have no problems",
+					"----------\n" + 
+					"----------\n",
+					this.problemRequestor);
+
+			this.problemRequestor.initialize(srcX.toCharArray());
+			getWorkingCopy("/mod.one/src/q/X.java", srcX, true);
+			assertProblems("X should have no problems",
+					"----------\n" + 
+					"----------\n",
+					this.problemRequestor);
+
+			javaProject.getProject().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			assertNoErrors();
+		} finally {
+			if (javaProject != null)
+				deleteProject(javaProject);
+		}
+	}
+	public void testAutoModule2() throws Exception {
+		if (!isJRE9) return;
+		IJavaProject javaProject = null;
+		try {
+			String[] sources = {
+				"p/a/X.java",
+				"package p.a;\n" +
+				"public class X {}\n;",
+			};
+			String[] mfSource = {
+				"META-INF/MANIFEST.MF",
+				"Manifest-Version: 1.0\n" + 
+				"Automatic-Module-Name: org.eclipse.lib.x\n"
+			};
+			String outputDirectory = Util.getOutputDirectory();
+
+			String jarPath = outputDirectory + File.separator + "lib-x.jar";
+			Util.createJar(sources, mfSource, jarPath, "1.8");
+			
+			javaProject = createJava9Project("mod.one", new String[] {"src"});
+			IClasspathAttribute[] attributes = { JavaCore.newClasspathAttribute(IClasspathAttribute.MODULE, "true") };
+			addClasspathEntry(javaProject, JavaCore.newLibraryEntry(new Path(jarPath), null, null, null, attributes, false));
+
+			String srcMod =
+				"module mod.one { \n" +
+				"	requires org.eclipse.lib.x;\n" + // from jar attribute
+				"}";
+			createFile("/mod.one/src/module-info.java", 
+				srcMod);
+			createFolder("mod.one/src/q");
+			String srcX =
+				"package q;\n" +
+				"public class X {\n" +
+				"	p.a.X f;\n" +
+				"}";
+			createFile("/mod.one/src/q/X.java", srcX);
+
+			this.problemRequestor.initialize(srcMod.toCharArray());
+			getWorkingCopy("/mod.one/module-info.java", srcMod, true);
+			assertProblems("module-info should have no problems",
+					"----------\n" + 
+					"----------\n",
+					this.problemRequestor);
+
+			this.problemRequestor.initialize(srcX.toCharArray());
+			getWorkingCopy("/mod.one/src/q/X.java", srcX, true);
+			assertProblems("X should have no problems",
+					"----------\n" + 
+					"----------\n",
+					this.problemRequestor);
+
+			javaProject.getProject().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			assertNoErrors();
+		} finally {
+			if (javaProject != null)
+				deleteProject(javaProject);
+		}
+	}
+	public void _testAutoModule3() throws Exception {
+		if (!isJRE9) return;
+		IJavaProject javaProject = null, auto = null;
+		try {
+			auto = createJava9Project("auto", new String[] {"src"});
+			createFolder("auto/src/p/a");
+			createFile("auto/src/p/a/X.java",
+				"package p.a;\n" +
+				"public class X {}\n;");
+			createFolder("auto/META-INF");
+			createFile("auto/META-INF/MANIFEST.MF",
+				"Manifest-Version: 1.0\n" + 
+				"Automatic-Module-Name: org.eclipse.lib.x\n");
+
+			javaProject = createJava9Project("mod.one", new String[] {"src"});
+			IClasspathAttribute[] attributes = { JavaCore.newClasspathAttribute(IClasspathAttribute.MODULE, "true") };
+			addClasspathEntry(javaProject, JavaCore.newProjectEntry(auto.getPath(), null, false, attributes, false));
+
+			String srcMod =
+				"module mod.one { \n" +
+				"	requires org.eclipse.lib.x;\n" + // from manifest attribute
+				"}";
+			createFile("/mod.one/src/module-info.java", 
+				srcMod);
+			createFolder("mod.one/src/q");
+			String srcX =
+				"package q;\n" +
+				"public class X {\n" +
+				"	p.a.X f;\n" +
+				"}";
+			createFile("/mod.one/src/q/X.java", srcX);
+
+			this.problemRequestor.initialize(srcMod.toCharArray());
+			getWorkingCopy("/mod.one/module-info.java", srcMod, true);
+			assertProblems("module-info should have no problems",
+					"----------\n" + 
+					"----------\n",
+					this.problemRequestor);
+
+			this.problemRequestor.initialize(srcX.toCharArray());
+			getWorkingCopy("/mod.one/src/q/X.java", srcX, true);
+			assertProblems("X should have no problems",
+					"----------\n" + 
+					"----------\n",
+					this.problemRequestor);
+
+			javaProject.getProject().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			assertNoErrors();
+		} finally {
+			if (javaProject != null)
+				deleteProject(javaProject);
+			if (auto != null)
+				deleteProject(auto);
+		}
+	}
+
+	public void testAutoModule4() throws Exception {
+		if (!isJRE9) return;
+		IJavaProject javaProject = null;
+		IJavaProject javaProject2 = null;
+		try {
+			// auto module as jar:
+			String[] sources = {
+				"p/a/X.java",
+				"package p.a;\n" +
+				"public class X {}\n;",
+			};
+			String[] mfSource = {
+				"META-INF/MANIFEST.MF",
+				"Manifest-Version: 1.0\n" + 
+				"Automatic-Module-Name: org.eclipse.lib.x\n" // automatic module reads all (incl. mod.one below)
+			};
+			String outputDirectory = Util.getOutputDirectory();
+
+			String jarPath = outputDirectory + File.separator + "lib-x.jar";
+			Util.createJar(sources, mfSource, jarPath, "1.8");
+			
+			// first source module:
+			javaProject = createJava9Project("mod.one", new String[] {"src"});
+			IClasspathAttribute[] attributes = { JavaCore.newClasspathAttribute(IClasspathAttribute.MODULE, "true") };
+			addClasspathEntry(javaProject, JavaCore.newLibraryEntry(new Path(jarPath), null, null, null, attributes, false));
+
+			String srcMod =
+				"module mod.one { \n" +
+				"	requires org.eclipse.lib.x;\n" + // creates cycle mod.one -> org.eclipse.lib.x -> mod.one
+				"	exports p.q.api;\n" +
+				"}";
+			createFile("/mod.one/src/module-info.java", srcMod);
+			createFolder("mod.one/src/p/q/api");
+			String srcX =
+				"package p.q.api;\n" +
+				"public class X {\n" +
+				"	p.a.X f;\n" +
+				"}";
+			createFile("/mod.one/src/p/q/api/X.java", srcX);
+
+			// second source module:
+			javaProject2 = createJava9Project("mod.two", new String[] {"src"});
+			addClasspathEntry(javaProject2, JavaCore.newProjectEntry(new Path("/mod.one"), null, false, attributes, false));
+			addClasspathEntry(javaProject2, JavaCore.newLibraryEntry(new Path(jarPath), null, null, null, attributes, false));
+			String srcMod2 =
+				"module mod.two { \n" +
+				"	requires mod.one;\n" +
+				"}";
+			createFile("/mod.two/src/module-info.java", srcMod2);
+			createFolder("mod.two/src/p/q");
+			String srcY =
+				"package p.q;\n" +
+				"import p.q.api.X;\n" + // here we saw "The package p.q.api is accessible from more than one module: mod.one, mod.one"
+				"public class Y {\n" +
+				"	X f;\n" +
+				"}";
+			createFile("/mod.two/src/p/q/Y.java", srcY);
+
+			this.problemRequestor.initialize(srcMod.toCharArray());
+			getWorkingCopy("/mod.one/module-info.java", srcMod, true);
+			assertProblems("module-info should have no problems",
+					"----------\n" + 
+					"----------\n",
+					this.problemRequestor);
+
+			this.problemRequestor.initialize(srcX.toCharArray());
+			getWorkingCopy("/mod.one/src/p/q/api/X.java", srcX, true);
+			assertProblems("X should have no problems",
+					"----------\n" + 
+					"----------\n",
+					this.problemRequestor);
+
+			this.problemRequestor.initialize(srcY.toCharArray());
+			getWorkingCopy("/mod.two/src/p/q/Y.java", srcY, true);
+			assertProblems("Y should have no problems",
+					"----------\n" + 
+					"----------\n",
+					this.problemRequestor);
+
+			javaProject.getProject().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			assertMarkers("markers in mod.one", "", javaProject);
+			
+			javaProject2.getProject().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			assertMarkers("markers in mod.two", "", javaProject2);
+
+			javaProject.getProject().getWorkspace().build(IncrementalProjectBuilder.CLEAN_BUILD, null);
+			assertNoErrors();
+		} finally {
+			if (javaProject != null)
+				deleteProject(javaProject);
+			if (javaProject2 != null)
+				deleteProject(javaProject2);
+		}
+	}
+
+	// patch can see unexported type from host (and package accessible method), but not vice versa
+	public void testPatch1() throws CoreException, IOException {
+		if (!isJRE9) return;
+		try {
+			IJavaProject mainProject = createJava9Project("org.astro");
+			String[] sources = { 
+				"src/module-info.java",
+				"module org.astro {\n" + // no exports
+				"}",
+				"src/org/astro/World.java",
+				"package org.astro;\n" +
+				"public class World {\n" +
+				"	public String name() { return \"world\"; }\n" +
+				"	void internalTest() { }\n" +
+				"	public org.astro.test.WorldTest test;\n" +
+				"}",
+			};
+			createSourceFiles(mainProject, sources);
+
+			IJavaProject patchProject = createJava9Project("org.astro.patch");
+			IClasspathAttribute[] attributes = {
+						JavaCore.newClasspathAttribute(IClasspathAttribute.MODULE, "true"),
+						JavaCore.newClasspathAttribute(IClasspathAttribute.PATCH_MODULE, "org.astro")
+					};
+			addClasspathEntry(patchProject, JavaCore.newProjectEntry(new Path("/org.astro"), null, false, attributes, false));
+			String[] patchSources = {
+				"src/org/astro/test/WorldTest.java",
+				"package org.astro.test;\n" +
+				"import org.astro.*;\n" +
+				"public class WorldTest {\n" +
+				"	void testWorld(World w) {\n" +
+				"		w.name();\n" +
+				"	}\n" +
+				"}\n",
+				"src/org/astro/Test2.java",
+				"package org.astro;\n" +
+				"class Test2 {\n" +
+				"	void test(World w) {\n" +
+				"		w.internalTest();\n" + // package access
+				"	}\n" +
+				"}\n"
+			};
+			createSourceFiles(patchProject, patchSources);
+			
+			getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = mainProject.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers",
+					"org.astro.test cannot be resolved to a type", // missing reverse dependency
+					markers);
+
+			this.problemRequestor.reset();
+			ICompilationUnit cu = getCompilationUnit("/org.astro.patch/src/org/astro/test/WorldTest.java");
+			cu.getWorkingCopy(this.wcOwner, null);
+			assertProblems(
+				"Unexpected problems",
+				"----------\n" +
+				"----------\n",
+				this.problemRequestor);
+
+			this.problemRequestor.reset();
+			cu = getCompilationUnit("/org.astro/src/org/astro/World.java");
+			cu.getWorkingCopy(this.wcOwner, null);
+			assertProblems(
+				"Unexpected problems",
+				"----------\n" + 
+				"1. ERROR in /org.astro/src/org/astro/World.java\n" + 
+				"org.astro.test cannot be resolved to a type\n" +
+				"----------\n",
+				this.problemRequestor);
+
+		} finally {
+			this.deleteProject("org.astro");
+			this.deleteProject("org.astro.patch");
+		}
+	}
+
+	// patch can see unexported type from host - JRE patched from two source folders
+	public void testPatch2() throws CoreException, IOException {
+		if (!isJRE9) return;
+		try {
+			IClasspathAttribute[] attributes = {
+					JavaCore.newClasspathAttribute(IClasspathAttribute.MODULE, "true"),
+					JavaCore.newClasspathAttribute(IClasspathAttribute.PATCH_MODULE, "java.base")
+			};
+			IJavaProject patchProject = createJava9ProjectWithJREAttributes("org.astro.patch", new String[]{"src", "src2"}, attributes);
+
+			String[] patchSources = {
+				"src/org/astro/Test2.java",
+				"package org.astro;\n" +
+				"class Test2 {\n" +
+				"	int test(jdk.internal.misc.Unsafe unsafe) {\n" +
+				"		return unsafe.addressSize();\n" +
+				"	}\n" +
+				"}\n",
+				"src2/jdk/internal/misc/Test3.java",
+				"package jdk.internal.misc;\n" +
+				"class Test3 {\n" +
+				"	Signal.NativeHandler handler;\n" + // package access
+				"}\n"
+			};
+			createSourceFiles(patchProject, patchSources);
+			
+			getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			assertNoErrors();
+
+			this.problemRequestor.reset();
+			ICompilationUnit cu = getCompilationUnit("/org.astro.patch/src/org/astro/Test2.java");
+			cu.getWorkingCopy(this.wcOwner, null);
+			assertProblems(
+				"Unexpected problems",
+				"----------\n" +
+				"----------\n",
+				this.problemRequestor);
+
+		} finally {
+			this.deleteProject("org.astro.patch");
+		}
+	}
+
+	// patch can share a package with its host - jar
+	public void testPatch3() throws CoreException, IOException {
+		if (!isJRE9) return;
+		try {
+			String[] sources = {
+				"p/a/X.java",
+				"package p.a;\n" +
+				"class X {}\n;", // package access
+				"module-info.java",
+				"module mod.one {\n" + // no exports
+				"}\n"
+			};
+			String outputDirectory = Util.getOutputDirectory();
+
+			String jarPath = outputDirectory + File.separator + "mod-one.jar";
+			Util.createJar(sources, jarPath, "9");
+
+			IJavaProject patchProject = createJava9Project("mod.one.patch");			
+			IClasspathAttribute[] attributes = {
+					JavaCore.newClasspathAttribute(IClasspathAttribute.MODULE, "true"),
+					JavaCore.newClasspathAttribute(IClasspathAttribute.PATCH_MODULE, "mod.one")
+			};
+			addClasspathEntry(patchProject, JavaCore.newLibraryEntry(new Path(jarPath), null, null, null, attributes, false));
+
+			String[] patchSources = {
+				"src/p/a/Test2.java",
+				"package p.a;\n" +
+				"class Test2 extends X {\n" +
+				"}\n"
+			};
+			createSourceFiles(patchProject, patchSources);
+			
+			getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			assertNoErrors();
+
+			this.problemRequestor.reset();
+			ICompilationUnit cu = getCompilationUnit("/mod.one.patch/src/p/a/Test2.java");
+			cu.getWorkingCopy(this.wcOwner, null);
+			assertProblems(
+				"Unexpected problems",
+				"----------\n" +
+				"----------\n",
+				this.problemRequestor);
+
+		} finally {
+			this.deleteProject("mod.one.patch");
+		}
+	}
+	public void testLimitModules1() throws CoreException, IOException {
+		if (!isJRE9) return;
+		String save = System.getProperty("modules.to.load");
+		// allow for a few more than we are using via limit-modules:
+		System.setProperty("modules.to.load", "java.base,java.desktop,java.datatransfer,java.rmi,java.sql,java.prefs,java.xml");
+		JRTUtil.reset();
+		ClasspathJrt.resetCaches();
+		try {
+			IClasspathAttribute[] attributes = {
+					JavaCore.newClasspathAttribute(IClasspathAttribute.MODULE, "true"),
+					JavaCore.newClasspathAttribute(IClasspathAttribute.LIMIT_MODULES, "java.base,java.desktop")
+			};
+			IJavaProject project = createJava9ProjectWithJREAttributes("org.astro", new String[]{"src", "src2"}, attributes);
+
+			String[] sources = {
+				"src/module-info.java",
+				"module org.astro {\n" +
+				"	requires java.base;\n" +
+				"	requires java.desktop;\n" +
+				"	requires java.datatransfer;\n" + // within the closure of java.desktop
+				"	requires java.sql;\n" + // not included
+				"}\n",
+				"src/org/astro/Test2.java",
+				"package org.astro;\n" +
+				"class Test2 {\n" +
+				"	java.awt.Window window;\n" +
+				"}\n",
+				"src2/org/astro/Test3.java",
+				"package org.astro;\n" +
+				"class Test3 {\n" +
+				"	java.awt.datatransfer.Clipboard clippy;\n" +
+				"}\n"
+			};
+			createSourceFiles(project, sources);
+			
+			getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = project.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers",
+					"java.sql cannot be resolved to a module", // outside limited scope
+					markers);
+
+			this.problemRequestor.reset();
+			ICompilationUnit cu = getCompilationUnit("/org.astro/src/module-info.java");
+			cu.getWorkingCopy(this.wcOwner, null);
+			assertProblems(
+				"Unexpected problems",
+				"----------\n" +
+				"1. ERROR in /org.astro/src/module-info.java\n" + 
+				"java.sql cannot be resolved to a module\n" +
+				"----------\n",
+				this.problemRequestor);
+
+			this.problemRequestor.reset();
+			cu = getCompilationUnit("/org.astro/src/org/astro/Test2.java");
+			cu.getWorkingCopy(this.wcOwner, null);
+			assertProblems(
+				"Unexpected problems",
+				"----------\n" +
+				"----------\n",
+				this.problemRequestor);
+
+			this.problemRequestor.reset();
+			cu = getCompilationUnit("/org.astro/src/org/astro/Test3.java");
+			cu.getWorkingCopy(this.wcOwner, null);
+			assertProblems(
+				"Unexpected problems",
+				"----------\n" +
+				"----------\n",
+				this.problemRequestor);
+
+		} finally {
+			this.deleteProject("org.astro");
+			System.setProperty("modules.to.load", save);
+			JRTUtil.reset();
+			ClasspathJrt.resetCaches();
+		}
+	}
+	public void testLimitModules2() throws CoreException, IOException {
+		if (!isJRE9) return;
+		String save = System.getProperty("modules.to.load");
+		// allow all
+		System.setProperty("modules.to.load", "");
+		JRTUtil.reset();
+		ClasspathJrt.resetCaches();
+		try {
+			IClasspathAttribute[] attributes = {
+					JavaCore.newClasspathAttribute(IClasspathAttribute.MODULE, "true"),
+					JavaCore.newClasspathAttribute(IClasspathAttribute.LIMIT_MODULES, "java.se") // test transitive closure
+			};
+			IJavaProject project = createJava9ProjectWithJREAttributes("org.astro", new String[]{"src", "src2"}, attributes);
+
+			String[] sources = {
+				"src/module-info.java",
+				"module org.astro {\n" +
+				"	requires java.base;\n" +
+				"	requires java.desktop;\n" +
+				"	requires java.datatransfer;\n" +
+				"	requires java.sql;\n" +
+				"}\n",
+				"src/org/astro/Test2.java",
+				"package org.astro;\n" +
+				"class Test2 {\n" +
+				"	java.awt.Window window;\n" +
+				"}\n",
+				"src2/org/astro/Test3.java",
+				"package org.astro;\n" +
+				"class Test3 {\n" +
+				"	java.awt.datatransfer.Clipboard clippy;\n" +
+				"}\n"
+			};
+			createSourceFiles(project, sources);
+			
+			getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = project.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			assertMarkers("Unexpected markers",
+					"",
+					markers);
+
+			this.problemRequestor.reset();
+			ICompilationUnit cu = getCompilationUnit("/org.astro/src/module-info.java");
+			cu.getWorkingCopy(this.wcOwner, null);
+			assertProblems(
+				"Unexpected problems",
+				"----------\n" +
+				"----------\n",
+				this.problemRequestor);
+
+			this.problemRequestor.reset();
+			cu = getCompilationUnit("/org.astro/src/org/astro/Test2.java");
+			cu.getWorkingCopy(this.wcOwner, null);
+			assertProblems(
+				"Unexpected problems",
+				"----------\n" +
+				"----------\n",
+				this.problemRequestor);
+
+			this.problemRequestor.reset();
+			cu = getCompilationUnit("/org.astro/src/org/astro/Test3.java");
+			cu.getWorkingCopy(this.wcOwner, null);
+			assertProblems(
+				"Unexpected problems",
+				"----------\n" +
+				"----------\n",
+				this.problemRequestor);
+
+		} finally {
+			this.deleteProject("org.astro");
+			System.setProperty("modules.to.load", save);
+			JRTUtil.reset();
+			ClasspathJrt.resetCaches();
+		}
+	}
+	public void testDefaultRootModules() throws CoreException, IOException {
+		if (!isJRE9) return;
+		String save = System.getProperty("modules.to.load");
+		// need to see all modules:
+		System.setProperty("modules.to.load", "");
+		JRTUtil.reset();
+		ClasspathJrt.resetCaches();
+		try {
+
+			IJavaProject project = createJava9Project("org.astro", new String[]{"src"});
+
+			String[] sources = {
+				"src/org/astro/ProblemWithPostConstruct.java",
+				"package org.astro;\n" +
+				"import javax.annotation.PostConstruct;\n" + 
+				"\n" + 
+				"public class ProblemWithPostConstruct {\n" +
+				"	@PostConstruct void init() {}\n" + 
+				"}\n"
+			};
+			createSourceFiles(project, sources);
+			
+			getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = project.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+			sortMarkers(markers);
+			assertMarkers("Unexpected markers",
+					"The import javax.annotation.PostConstruct cannot be resolved\n" + 
+					"PostConstruct cannot be resolved to a type", // not in default root modules: java.xml.ws.annotation
+					markers);
+			
+			this.problemRequestor.reset();
+			ICompilationUnit cu = getCompilationUnit("/org.astro/src/org/astro/ProblemWithPostConstruct.java");
+			cu.getWorkingCopy(this.wcOwner, null);
+			assertProblems(
+				"Unexpected problems",
+				"----------\n" + 
+				"1. ERROR in /org.astro/src/org/astro/ProblemWithPostConstruct.java\n" + 
+				"The import javax.annotation.PostConstruct cannot be resolved\n" + 
+				"----------\n" + 
+				"2. ERROR in /org.astro/src/org/astro/ProblemWithPostConstruct.java\n" + 
+				"PostConstruct cannot be resolved to a type\n" + 
+				"----------\n",
+				this.problemRequestor);
+		} finally {
+			this.deleteProject("org.astro");
+			System.setProperty("modules.to.load", save);
+			JRTUtil.reset();
+			ClasspathJrt.resetCaches();
+		}
+	}
+	public void testBug522398() throws CoreException {
+		if (!isJRE9) return;
+		String save = System.getProperty("modules.to.load");
+		System.setProperty("modules.to.load", "java.base;java.desktop;java.rmi;java.sql;java.xml");
+		JRTUtil.reset();
+		ClasspathJrt.resetCaches();
+		try {
+
+			String[] sources = new String[] {
+				"src/javax/xml/mysubpackage/MyClass.java",
+				"package javax.xml.mysubpackage;\n" +
+				"\n" +
+				"public class MyClass {\n" +
+				"}\n" +
+				"\n" +
+				"",
+				"src/nonmodular/UsesMySubPackage.java",
+				"package nonmodular;\n" +
+				"\n" +
+				"import javax.xml.mysubpackage.MyClass;\n" +
+				"\n" +
+				"public class UsesMySubPackage {\n" +
+				"	public MyClass field;\n" +
+				"}\n" +
+				"",
+			};
+			IJavaProject p1 = setupModuleProject("nonmodular1", sources);
+			IClasspathEntry dep = JavaCore.newProjectEntry(p1.getPath(), null, false,
+				new IClasspathAttribute[] {},
+				false/*not exported*/);
+			String[] src = new String[] {
+				"src/nonmodular2/Problem.java",
+				"package nonmodular2;\n" +
+				"\n" +
+				"import javax.xml.XMLConstants;\n" +
+				"\n" +
+				"import nonmodular.UsesMySubPackage;\n" +
+				"\n" +
+				"public class Problem extends nonmodular.UsesMySubPackage {\n" +
+				"	String s = XMLConstants.NULL_NS_URI;\n" +
+				"}\n" +
+				"",
+			};
+			IJavaProject p2 = setupModuleProject("nonmodular2", src, new IClasspathEntry[] { dep });
+			p2.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			assertNoErrors();
+		} finally {
+			System.setProperty("modules.to.load", save);
+			JRTUtil.reset();
+			ClasspathJrt.resetCaches();
+			deleteProject("nonmodular1");
+			deleteProject("nonmodular2");
+		}
+	}
+	public void testBug522330() throws CoreException, IOException {
+		if (!isJRE9) return;
+		try {
+			String[] sources = new String[] {
+				"src/javax/net/ServerSocketFactory1.java",
+				"package javax.net;\n" +
+				"\n" +
+				"public class ServerSocketFactory1 {\n" +
+				"}\n" +
+				"\n" +
+				"",
+			};
+			IJavaProject p1 = setupModuleProject("nonmodular1", sources);
+			p1.setOption(JavaCore.COMPILER_COMPLIANCE, "1.8"); // compile with 1.8 compliance to avoid error about package conflict
+			
+			IClasspathEntry dep = JavaCore.newProjectEntry(p1.getPath(), null, false,
+				new IClasspathAttribute[] {},
+				false/*not exported*/);
+			String[] src = new String[] {
+				"src/nonmodular2/Problem.java",
+				"package nonmodular2;\n" +
+				"\n" +
+				"import javax.net.ServerSocketFactory;\n" +
+				"\n" +
+				"public class Problem  {\n" +
+				"	Object o = ServerSocketFactory.getDefault();\n" +
+				"} \n" +
+				"",
+			};
+			IJavaProject p2 = setupModuleProject("nonmodular2", src, new IClasspathEntry[] { dep });
+			p2.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			assertNoErrors();
+		} finally {
+			deleteProject("nonmodular1");
+			deleteProject("nonmodular2");
+		}
+	}
+
+	public void testBug522503() throws Exception {
+		if (!isJRE9) return;
+		try {
+			IJavaProject p1 = setupModuleProject("mod.one",
+				new String[] {
+					"src/module-info.java",
+					"module mod.one {\n" +
+					"	exports p1;\n" +
+					"}\n",
+					"src/p1/API.java",
+					"package p1;\n" +
+					"public class API {}\n"
+				});
+			IClasspathAttribute[] attr = { JavaCore.newClasspathAttribute(IClasspathAttribute.MODULE, "true") };
+			IClasspathEntry[] deps = { JavaCore.newLibraryEntry(p1.getOutputLocation(), null, null, null, attr, false) };
+			String[] sources2 = new String[] {
+				"src/module-info.java",
+				"module mod.two {\n" +
+				"	requires mod.one;\n" +
+				"}\n",
+				"src/client/Client.java",
+				"package client;\n" +
+				"import p1.API;\n" +
+				"public class Client {\n" +
+				"	API api;\n" +
+				"}\n"
+			};
+			IJavaProject p2 = setupModuleProject("mod.two", sources2, deps);
+			p2.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			assertNoErrors();
+	
+			this.problemRequestor.reset();
+			ICompilationUnit cu = getCompilationUnit("/mod.two/src/client/Client.java");
+			cu.getWorkingCopy(this.wcOwner, null);
+			assertProblems(
+				"Unexpected problems",
+				"----------\n" + 
+				"----------\n",
+				this.problemRequestor);
+		} finally {
+			deleteProject("mod.one");			
+			deleteProject("mod.two");			
+		}
+	}
+
+	protected void assertNoErrors() throws CoreException {
+		for (IProject p : getWorkspace().getRoot().getProjects()) {
+			int maxSeverity = p.findMaxProblemSeverity(null, true, IResource.DEPTH_INFINITE);
+			if (maxSeverity == IMarker.SEVERITY_ERROR) {
+				for (IMarker marker : p.findMarkers(null, true, IResource.DEPTH_INFINITE))
+					System.err.println("Marker "+ marker.toString());
+			}
+			assertFalse("Unexpected errors in project " + p.getName(), maxSeverity == IMarker.SEVERITY_ERROR);
+		}
+	}
+	// sort by CHAR_START
+	protected void sortMarkers(IMarker[] markers) {
+		Arrays.sort(markers, (a,b) -> a.getAttribute(IMarker.CHAR_START, 0) - b.getAttribute(IMarker.CHAR_START, 0)); 
+	}
+}
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/NullAnnotationModelTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/NullAnnotationModelTests.java
index d36497b..6c76ce1 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/NullAnnotationModelTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/NullAnnotationModelTests.java
@@ -39,7 +39,6 @@
 import org.eclipse.jdt.core.JavaCore;
 import org.eclipse.jdt.core.JavaModelException;
 import org.eclipse.jdt.core.compiler.IProblem;
-import org.eclipse.jdt.core.dom.AST;
 import org.eclipse.jdt.core.dom.ASTParser;
 import org.eclipse.jdt.core.dom.CompilationUnit;
 import org.eclipse.jdt.core.dom.MarkerAnnotation;
@@ -294,7 +293,7 @@
 					"Buildpath problem: the type invalid, which is configured as a null annotation type, cannot be resolved\n" +
 					"----------\n");
 
-			ASTParser parser = ASTParser.newParser(AST.JLS8);
+			ASTParser parser = ASTParser.newParser(AST_INTERNAL_JLS9);
 			parser.setProject(p);
 			parser.setResolveBindings(true);
 			parser.setSource(unit);
@@ -357,7 +356,7 @@
 			assertEquals("Should have no markers", 0, markers.length);
 
 			// Challenge CompilationUnitResolver:
-			ASTParser parser = ASTParser.newParser(AST.JLS8);
+			ASTParser parser = ASTParser.newParser(AST_INTERNAL_JLS9);
 			parser.setProject(p);
 			parser.setResolveBindings(true);
 			parser.setSource(unit);
@@ -428,7 +427,7 @@
 			assertEquals("Unexpected marker path", "/P/p1/C1.java", markers[0].getResource().getFullPath().toString());
 
 			// Challenge CompilationUnitResolver:
-			ASTParser parser = ASTParser.newParser(AST.JLS8);
+			ASTParser parser = ASTParser.newParser(AST_INTERNAL_JLS9);
 			parser.setProject(p);
 			parser.setResolveBindings(true);
 			parser.setSource(unit);
@@ -481,7 +480,7 @@
 			final ICompilationUnit unit = getCompilationUnit("/P/p1/C1.java").getWorkingCopy(this.wcOwner, null);
 			assertNoProblem(c1SourceString.toCharArray(), unit);
 
-			ASTParser parser = ASTParser.newParser(AST.JLS8);
+			ASTParser parser = ASTParser.newParser(AST_INTERNAL_JLS9);
 			parser.setProject(p);
 			parser.setResolveBindings(true);
 			parser.setSource(unit);
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ReconcilerTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ReconcilerTests.java
index 241908a..99e42e6 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ReconcilerTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ReconcilerTests.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2016 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
@@ -77,7 +77,7 @@
 		}
 	}
 	
-	/*package*/ static final int JLS_LATEST = AST.JLS8;
+	/*package*/ static final int JLS_LATEST = AST.JLS9;
 
 	static class ReconcileParticipant extends CompilationParticipant {
 		IJavaElementDelta delta;
@@ -88,10 +88,13 @@
 		public boolean isActive(IJavaProject project) {
 			return true;
 		}
+		/**
+		 * @deprecated
+		 */
 		public void reconcile(ReconcileContext context) {
 			this.delta = context.getDelta();
 			try {
-				this.ast = context.getAST8();
+				this.ast = context.getAST(JLS_LATEST);
 			} catch (JavaModelException e) {
 				assertNull("Unexpected exception", e);
 			}
@@ -107,10 +110,13 @@
 		public boolean isActive(IJavaProject project) {
 			return true;
 		}
+		/**
+		 * @deprecated
+		 */
 		public void reconcile(ReconcileContext context) {
 			this.delta = context.getDelta();
 			try {
-				this.ast = context.getAST8();
+				this.ast = context.getAST(JLS_LATEST);
 				assertTrue("Context should have statement recovery enabled", (context.getReconcileFlags() & ICompilationUnit.ENABLE_STATEMENTS_RECOVERY) != 0);
 				assertTrue("Context should have ignore method body enabled", (context.getReconcileFlags() & ICompilationUnit.IGNORE_METHOD_BODIES) != 0);
 			} catch (JavaModelException e) {
@@ -128,10 +134,13 @@
 		public boolean isActive(IJavaProject project) {
 			return true;
 		}
+		/**
+		 * @deprecated
+		 */
 		public void reconcile(ReconcileContext context) {
 			this.delta = context.getDelta();
 			try {
-				this.ast = context.getAST8();
+				this.ast = context.getAST(JLS_LATEST);
 				assertFalse("Context should have statement recovery enabled", (context.getReconcileFlags() & ICompilationUnit.ENABLE_STATEMENTS_RECOVERY) != 0);
 				assertTrue("Context should have ignore method body enabled", (context.getReconcileFlags() & ICompilationUnit.IGNORE_METHOD_BODIES) != 0);
 			} catch (JavaModelException e) {
@@ -2989,6 +2998,9 @@
  */
 public void testReconcileParticipant05() throws CoreException {
 	new ReconcileParticipant() {
+		/**
+		 * @deprecated
+		 */
 		public void reconcile(ReconcileContext context) {
 			try {
 				setWorkingCopyContents(
@@ -3024,6 +3036,9 @@
  */
 public void testReconcileParticipant06() throws CoreException {
 	new ReconcileParticipant() {
+		/**
+		 * @deprecated
+		 */
 		public void reconcile(ReconcileContext context) {
 			try {
 				setWorkingCopyContents(
@@ -3107,6 +3122,9 @@
 
 	// reconcile with a participant adding a list of problems
 	new ReconcileParticipant() {
+		/**
+		 * @deprecated
+		 */
 		public void reconcile(ReconcileContext context) {
 			context.putProblems("test.marker", new CategorizedProblem[] {});
 		}
@@ -3125,6 +3143,9 @@
 public void testReconcileParticipant09() throws CoreException {
 	this.workingCopy.makeConsistent(null);
 	new ReconcileParticipant() {
+		/**
+		 * @deprecated
+		 */
 		public void reconcile(ReconcileContext context) {
 			assertTrue("Participant should not be notified of a reconcile", false);
 		}
@@ -3140,6 +3161,9 @@
 	this.workingCopy.makeConsistent(null);
 	final boolean[] participantReconciled = new boolean[1];
 	new ReconcileParticipant() {
+		/**
+		 * @deprecated
+		 */
 		public void reconcile(ReconcileContext context) {
 			participantReconciled[0] = true;
 		}
@@ -3157,6 +3181,9 @@
  */
 public void testReconcileParticipant11() throws CoreException {
 	new ReconcileParticipant() {
+		/**
+		 * @deprecated
+		 */
 		public void reconcile(ReconcileContext context) {
 			context.resetAST();
 		}
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/RenameTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/RenameTests.java
index b8fb5c9..a386f6f 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/RenameTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/RenameTests.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 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
@@ -209,7 +209,7 @@
  * Ensures that a binary field cannot be renamed.
  */
 public void testRenameBinaryField() throws JavaModelException {
-	IClassFile cf = getClassFile("BinaryProject", "lib", "", "X.class");
+	IOrdinaryClassFile cf = getClassFile("BinaryProject", "lib", "", "X.class");
 	IField binaryField = cf.getType().getField("bar");
 	renameNegative(binaryField, "fred", false, IJavaModelStatusConstants.READ_ONLY);
 }
@@ -217,7 +217,7 @@
  * Ensures that a binary method cannot be renamed.
  */
 public void testRenameBinaryMethod() throws JavaModelException {
-	IClassFile cf = getClassFile("BinaryProject", "lib", "", "X.class");
+	IOrdinaryClassFile cf = getClassFile("BinaryProject", "lib", "", "X.class");
 	IMethod binaryMethod = cf.getType().getMethods()[0];
 	renameNegative(binaryMethod, "fred", false, IJavaModelStatusConstants.READ_ONLY);
 }
@@ -225,7 +225,7 @@
  * Ensures that a binary type cannot be renamed.
  */
 public void testRenameBinaryType() throws JavaModelException {
-	IClassFile cf = getClassFile("BinaryProject", "lib", "", "X.class");
+	IOrdinaryClassFile cf = getClassFile("BinaryProject", "lib", "", "X.class");
 	IType binaryType = cf.getType();
 	renameNegative(binaryType, "Y", false, IJavaModelStatusConstants.READ_ONLY);
 }
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ResolveTests9.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ResolveTests9.java
new file mode 100644
index 0000000..64df620
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ResolveTests9.java
@@ -0,0 +1,303 @@
+/*******************************************************************************
+ * Copyright (c) 2016, 2017 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.jdt.core.tests.model;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jdt.core.IClassFile;
+import org.eclipse.jdt.core.IClasspathAttribute;
+import org.eclipse.jdt.core.IClasspathEntry;
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jdt.core.IJavaModelMarker;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.core.WorkingCopyOwner;
+
+import junit.framework.Test;
+
+public class ResolveTests9 extends AbstractJavaModelTests {
+	ICompilationUnit wc = null;
+
+	static {
+//		 TESTS_NAMES = new String[] { "testModuleInfo_" };
+//		 TESTS_NUMBERS = new int[] { 124 };
+//		 TESTS_RANGE = new int[] { 16, -1 };
+	}
+	public static Test suite() {
+		return buildModelTestSuite(ResolveTests9.class);
+	}
+	public ResolveTests9(String name) {
+		super(name);
+	}
+	public ICompilationUnit getWorkingCopy(String path, String source) throws JavaModelException {
+		return super.getWorkingCopy(path, source, this.wcOwner);
+	}
+	public void setUpSuite() throws Exception {
+		super.setUpSuite();
+	
+		System.setProperty("modules.to.load", "java.base;java.desktop;java.rmi;java.sql;");
+	
+		IJavaProject project = setUpJavaProject("Resolve", "9", true);
+	
+		String bootModPath = System.getProperty("java.home") + File.separator +"jrt-fs.jar";
+		IClasspathEntry jrtEntry = JavaCore.newLibraryEntry(new Path(bootModPath), null, null, null, null, false);
+		IClasspathEntry[] old = project.getRawClasspath();
+		IClasspathEntry[] newPath = new IClasspathEntry[old.length +1];
+		System.arraycopy(old, 0, newPath, 0, old.length);
+		newPath[old.length] = jrtEntry;
+		project.setRawClasspath(newPath, null);
+	
+		waitUntilIndexesReady();
+	}
+	
+	protected void setUp() throws Exception {
+		super.setUp();
+		this.wcOwner = new WorkingCopyOwner(){};
+	}
+	public void tearDownSuite() throws Exception {
+		deleteProject("Resolve");
+	
+		super.tearDownSuite();
+	}
+	
+	protected void tearDown() throws Exception {
+		if (this.wc != null) {
+			this.wc.discardWorkingCopy();
+		}
+		super.tearDown();
+	}
+	public void testModuleInfo_serviceImplementation_OK() throws CoreException {
+		IFile modInfo = null;
+		try {
+			getWorkingCopy(
+					"/Resolve/src/test/ITest.java",
+					"public interface ITest {}\n");
+			getWorkingCopy(
+					"/Resolve/src/test/TestClass.java",
+					"public class TestClass implements ITest {}\n");
+		
+			this.wc = getWorkingCopy(
+					"/Resolve/src/module-info.java",
+					"module com.test {\n" +
+					"  provides p1.Y with ResolveInterface;\n" +
+					"}\n");
+		
+			String str = this.wc.getSource();
+			String selection = "ResolveInterface";
+			int start = str.indexOf(selection);
+			int length = selection.length();
+		
+			IJavaElement[] elements = this.wc.codeSelect(start, length);
+			assertElementsEqual(
+				"Unexpected elements",
+				"ResolveInterface [in ResolveInterface.java [in <default> [in src [in Resolve]]]]",
+				elements
+			);
+		} finally {
+			if (modInfo != null)
+				deleteResource(modInfo);
+		}
+	}
+	public void testModuleInfo_serviceInterface_OK() throws CoreException {
+		IFile modInfo = null;
+		IFolder testFolder = null;
+		try {
+			testFolder = createFolder("/Resolve/src/test");
+			createFile(
+					"/Resolve/src/test/ITest.java",
+					"public interface ITest {}\n");
+			createFile(
+					"/Resolve/src/test/TestClass.java",
+					"public class TestClass implements ITest {}\n");
+		
+			this.wc = getWorkingCopy(
+					"/Resolve/src/module-info.java",
+					"module com.test {\n" +
+					"  provides test.ITest with test.TestClass;\n" +
+					"}\n");
+		
+			String str = this.wc.getSource();
+			String selection = "ITest";
+			int start = str.indexOf(selection);
+			int length = selection.length();
+		
+			IJavaElement[] elements = this.wc.codeSelect(start, length);
+			assertElementsEqual(
+				"Unexpected elements",
+				"ITest [in ITest.java [in test [in src [in Resolve]]]]",
+				elements
+			);
+		} finally {
+			if (modInfo != null)
+				deleteResource(modInfo);
+			if (testFolder != null)
+				deleteResource(testFolder);
+		}
+	}
+	public void testModuleInfo_noReferenceAtKeyword() throws CoreException {
+		IFile providesFile = createFile("/Resolve/src/provides.java", "public class provides {}");
+		IFile modInfo = null;
+		try {
+			getWorkingCopy(
+					"/Resolve/src/test/ITest.java",
+					"public interface ITest {}\n");
+			getWorkingCopy(
+					"/Resolve/src/test/TestClass.java",
+					"public class TestClass implements ITest {}\n");
+		
+			this.wc = getWorkingCopy(
+					"/Resolve/src/module-info.java",
+					"module com.test {\n" +
+					"  provides p1.Y with ResolveInterface;\n" +
+					"}\n");
+		
+			String str = this.wc.getSource();
+			String selection = "provides";
+			int start = str.indexOf(selection);
+			int length = selection.length();
+		
+			IJavaElement[] elements = this.wc.codeSelect(start, length);
+			assertElementsEqual(
+				"Unexpected elements",
+				"",
+				elements
+			);
+		} finally {
+			deleteResource(providesFile);
+			if (modInfo != null)
+				deleteResource(modInfo);
+		}
+	}
+	public void testModuleInfo_referenceAtKeywordInNonKWPosition() throws CoreException {
+		IFile providesFile = createFile("/Resolve/src/provides.java", "public class provides implements p1.Y {}");
+		IFile modInfo = null;
+		try {
+			getWorkingCopy(
+					"/Resolve/src/test/ITest.java",
+					"public interface ITest {}\n");
+			getWorkingCopy(
+					"/Resolve/src/test/TestClass.java",
+					"public class TestClass implements ITest {}\n");
+		
+			this.wc = getWorkingCopy(
+					"/Resolve/src/module-info.java",
+					"module com.test {\n" + 
+					"  provides p1.Y with provides;\n" + 
+					"}\n");
+		
+			String str = this.wc.getSource();
+			String selection = "provides";
+			int start = str.lastIndexOf(selection);
+			int length = selection.length();
+		
+			IJavaElement[] elements = this.wc.codeSelect(start, length);
+			assertElementsEqual(
+				"Unexpected elements",
+				"provides [in provides.java [in <default> [in src [in Resolve]]]]",
+				elements
+			);
+		} finally {
+			deleteResource(providesFile);
+			if (modInfo != null)
+				deleteResource(modInfo);
+		}
+	}
+
+	public void testClassFileInModule1() throws CoreException, IOException {
+		if (!isJRE9) {
+			System.err.println("Test "+getName()+" requires a JRE 9");
+			return;
+		}
+		IJavaProject javaProject = createJava9Project("Test");
+		try {
+			IType type = javaProject.findType("java.util.zip.ZipFile");
+			IClassFile classFile = type.getClassFile();
+			String contents = classFile.getBuffer().getContents();
+			int start = contents.indexOf("this(");
+			IJavaElement[] selected = classFile.codeSelect(start, 4);
+			assertElementsEqual(
+					"Unexpected elements",
+					"ZipFile(java.io.File, int) [in ZipFile [in ZipFile.class [in java.util.zip [in <module:java.base>]]]]",
+					selected);
+		} finally {
+			deleteProject(javaProject);
+		}
+	}
+
+	public void testUnnamedNamedConflict() throws CoreException, IOException {
+		if (!isJRE9) {
+			System.err.println("Test "+getName()+" requires a JRE 9");
+			return;
+		}
+		IJavaProject mod = null;
+		IJavaProject test = null;
+		try {
+			mod = createJava9Project("mod");
+			createFolder("mod/src/p1/p2");
+			createFile("mod/src/p1/p2/C.java", "package p1.p2;\n public class C {}\n");
+			createFile("mod/src/module-info.java",
+					"module mod {\n" +
+					"	exports p1.p2;\n" +
+					"}\n");
+			mod.getProject().build(IncrementalProjectBuilder.FULL_BUILD, null);
+
+			test = createJava9Project("Test");
+			IClasspathAttribute[] attributes = { JavaCore.newClasspathAttribute(IClasspathAttribute.MODULE, "true") };
+			addClasspathEntry(test, JavaCore.newProjectEntry(new Path("/mod"), null, false, attributes, false));
+			createFolder("Test/src/p1/p2");
+			createFile("Test/src/p1/p2/C1.java", "package p1.p2;\n public class C1 {}\n");
+			String source =
+					"package q;\n" +
+					"public class Main {\n" +
+					"	p1.p2.C c;\n" +
+					"	p1.p2.C1 c1;\n" +
+					"}\n";
+			createFolder("Test/src/q");
+			createFile("Test/src/q/Main.java", source);
+			test.getProject().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			IMarker[] markers = test.getProject().findMarkers(IJavaModelMarker.JAVA_MODEL_PROBLEM_MARKER, true, IResource.DEPTH_INFINITE);
+			sortMarkers(markers);
+			assertMarkers("Unexpected markers", "The package p1.p2 conflicts with a package accessible from another module: mod", markers);
+
+			ICompilationUnit unit = getCompilationUnit("Test/src/q/Main.java");
+
+			// test that we can select both types despite the package conflict:
+			int start = source.indexOf("C c");
+			IJavaElement[] selected = unit.codeSelect(start, 2);
+			assertElementsEqual(
+					"Unexpected elements",
+					"C [in C.java [in p1.p2 [in src [in mod]]]]",
+					selected);
+
+			start = source.indexOf("C1");
+			selected = unit.codeSelect(start, 2);
+			assertElementsEqual(
+					"Unexpected elements",
+					"C1 [in C1.java [in p1.p2 [in src [in Test]]]]",
+					selected);
+		} finally {
+			deleteProject(test);
+			deleteProject(mod);
+		}
+	}
+}
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/RunCompletionModelTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/RunCompletionModelTests.java
index 66b387c..af74283 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/RunCompletionModelTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/RunCompletionModelTests.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2016 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
@@ -33,6 +33,8 @@
 			COMPLETION_SUITES.add(CompletionTests3.class);
 			COMPLETION_SUITES.add(CompletionTests_1_5.class);
 			COMPLETION_SUITES.add(CompletionTests18.class);
+			// TODO uncomment after bug509050 is done
+			//COMPLETION_SUITES.add(CompletionTests9.class);
 			COMPLETION_SUITES.add(CompletionContextTests.class);
 			COMPLETION_SUITES.add(CompletionContextTests_1_5.class);
 			COMPLETION_SUITES.add(CompletionWithMissingTypesTests.class);
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/SnippetCompletionTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/SnippetCompletionTests.java
index 6d7a81c..1d4bdba 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/SnippetCompletionTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/SnippetCompletionTests.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2014 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 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
@@ -10,8 +10,8 @@
  *******************************************************************************/
 package org.eclipse.jdt.core.tests.model;
 
-import org.eclipse.jdt.core.IClassFile;
 import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.IOrdinaryClassFile;
 import org.eclipse.jdt.core.IType;
 import org.eclipse.jdt.core.JavaModelException;
 import org.eclipse.jdt.internal.codeassist.RelevanceConstants;
@@ -49,7 +49,7 @@
 }
 public void testCodeSnippetAssistForClassFile() throws JavaModelException {
 	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(false,false,true);
-	IClassFile cf = getClassFile("SnippetCompletion", "class-folder", "aa.bb.cc", "AClass.class");
+	IOrdinaryClassFile cf = getClassFile("SnippetCompletion", "class-folder", "aa.bb.cc", "AClass.class");
 	IType type = cf.getType();
 
 	String snippet =
@@ -108,7 +108,7 @@
 
 public void testCodeSnippetAssistForClassFileWithSource() throws JavaModelException {
 	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(false,false,true);
-	IClassFile cf = getClassFile("SnippetCompletion", "class-folder", "aa.bb.cc", "CClass.class");
+	IOrdinaryClassFile cf = getClassFile("SnippetCompletion", "class-folder", "aa.bb.cc", "CClass.class");
 	IType type = cf.getType();
 
 	String snippet =
@@ -171,7 +171,7 @@
 
 public void testCodeSnippetAssistForClassFileInInnerClass() throws JavaModelException {
 	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(false,false,true);
-	IClassFile cf = getClassFile("SnippetCompletion", "class-folder", "aa.bb.cc", "AClass$Inner.class");
+	IOrdinaryClassFile cf = getClassFile("SnippetCompletion", "class-folder", "aa.bb.cc", "AClass$Inner.class");
 	IType type = cf.getType();
 
 	String snippet =
@@ -205,7 +205,7 @@
  */
 public void testCodeSnippetAssistForClassFileInInterface() throws JavaModelException {
 	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(false,false,true);
-	IClassFile cf = getClassFile("SnippetCompletion", "class-folder", "xx.yy", "MyInterface.class");
+	IOrdinaryClassFile cf = getClassFile("SnippetCompletion", "class-folder", "xx.yy", "MyInterface.class");
 	IType type = cf.getType();
 
 	String snippet =
@@ -233,7 +233,7 @@
  */
 public void testCodeSnippetAssistForClassFileInInterface2() throws JavaModelException {
 	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(false,false,true);
-	IClassFile cf = getClassFile("SnippetCompletion", "class-folder", "xx.yy", "MyInterface2.class");
+	IOrdinaryClassFile cf = getClassFile("SnippetCompletion", "class-folder", "xx.yy", "MyInterface2.class");
 	IType type = cf.getType();
 
 	String snippet =
@@ -259,7 +259,7 @@
 }
 public void testCodeSnippetAssistForClassFileWithDollar() throws JavaModelException {
 	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(false,false,true);
-	IClassFile cf = getClassFile("SnippetCompletion", "class-folder", "test00XX", "Test.class");
+	IOrdinaryClassFile cf = getClassFile("SnippetCompletion", "class-folder", "test00XX", "Test.class");
 	IType type = cf.getType();
 
 	String snippet =
@@ -283,7 +283,7 @@
 
 public void testCodeSnippetAssistInsideNumber() throws JavaModelException {
 	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(false,false,true);
-	IClassFile cf = getClassFile("SnippetCompletion", "class-folder", "aa.bb.cc", "AClass.class");
+	IOrdinaryClassFile cf = getClassFile("SnippetCompletion", "class-folder", "aa.bb.cc", "AClass.class");
 	IType type = cf.getType();
 
 	String snippet =
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/SnippetCompletionTests_1_5.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/SnippetCompletionTests_1_5.java
index 7fcf487..586aa85 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/SnippetCompletionTests_1_5.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/SnippetCompletionTests_1_5.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2017 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
@@ -10,7 +10,7 @@
  *******************************************************************************/
 package org.eclipse.jdt.core.tests.model;
 
-import org.eclipse.jdt.core.IClassFile;
+import org.eclipse.jdt.core.IOrdinaryClassFile;
 import org.eclipse.jdt.core.IType;
 import org.eclipse.jdt.core.JavaModelException;
 import org.eclipse.jdt.internal.codeassist.RelevanceConstants;
@@ -47,7 +47,7 @@
 }
 public void testCodeSnippetAssistForBug132665() throws JavaModelException {
 	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2();
-	IClassFile cf = getClassFile("SnippetCompletion", "class-folder", "bug132665", "Bug132665.class");
+	IOrdinaryClassFile cf = getClassFile("SnippetCompletion", "class-folder", "bug132665", "Bug132665.class");
 	IType type = cf.getType();
 
 	String snippet =
@@ -67,7 +67,7 @@
 }
 public void testCodeSnippetAssistForBug223878() throws JavaModelException {
 	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2();
-	IClassFile cf = getClassFile("SnippetCompletion", "class-folder", "bug223878", "Bug223878.class");
+	IOrdinaryClassFile cf = getClassFile("SnippetCompletion", "class-folder", "bug223878", "Bug223878.class");
 	IType type = cf.getType();
 
 	String snippet =
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/TypeHierarchyNotificationTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/TypeHierarchyNotificationTests.java
index 88182d0..8a172e6 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/TypeHierarchyNotificationTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/TypeHierarchyNotificationTests.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2013 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 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
@@ -607,7 +607,7 @@
 		((IFolder) pf.getUnderlyingResource()).getFile("Error.class").create(file.getContents(false), false, null);
 		assertOneChange(h);
 		h.refresh(null);
-		assertEquals("Superclass of MyError should be Error in patch", pf.getClassFile("Error.class").getType(), h.getSuperclass(type));
+		assertEquals("Superclass of MyError should be Error in patch", pf.getOrdinaryClassFile("Error.class").getType(), h.getSuperclass(type));
 
 		// Test removal of 'Error.class'
 		reset();
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/TypeHierarchyTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/TypeHierarchyTests.java
index 31e9115..2a543d1 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/TypeHierarchyTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/TypeHierarchyTests.java
@@ -31,6 +31,7 @@
 import org.eclipse.jdt.core.ICompilationUnit;
 import org.eclipse.jdt.core.IJavaElement;
 import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IOrdinaryClassFile;
 import org.eclipse.jdt.core.IPackageFragment;
 import org.eclipse.jdt.core.IPackageFragmentRoot;
 import org.eclipse.jdt.core.IRegion;
@@ -50,7 +51,7 @@
 	ITypeHierarchy typeHierarchy;
 
 static {
-//	TESTS_NAMES= new String[] { "testBug300576" };
+//	TESTS_NAMES= new String[] { "testBug329663a" };
 }
 public static Test suite() {
 	return buildModelTestSuite(TypeHierarchyTests.class, BYTECODE_DECLARATION_ORDER);
@@ -388,7 +389,7 @@
  * Ensures that the superclass can be retrieved for a binary inner type.
  */
 public void testBinaryInnerTypeGetSuperclass() throws JavaModelException {
-	IClassFile cf = getClassFile("TypeHierarchy", "lib.jar", "binary", "Y$Inner.class");
+	IOrdinaryClassFile cf = getClassFile("TypeHierarchy", "lib.jar", "binary", "Y$Inner.class");
 	IType type = cf.getType();
 	ITypeHierarchy h = type.newSupertypeHierarchy(null);
 	IType superclass = h.getSuperclass(type);
@@ -399,7 +400,7 @@
  * Ensures that the superinterfaces can be retrieved for a binary inner type.
  */
 public void testBinaryInnerTypeGetSuperInterfaces() throws JavaModelException {
-	IClassFile cf = getClassFile("TypeHierarchy", "lib.jar", "binary", "Y$Inner.class");
+	IOrdinaryClassFile cf = getClassFile("TypeHierarchy", "lib.jar", "binary", "Y$Inner.class");
 	IType type = cf.getType();
 	ITypeHierarchy h = type.newSupertypeHierarchy(null);
 	assertTypesEqual(
@@ -454,7 +455,7 @@
  * Ensures that the superclass can be retrieved for a binary type's superclass.
  */
 public void testBinaryTypeGetSuperclass() throws JavaModelException {
-	IClassFile cf = getClassFile("TypeHierarchy", "lib.jar", "binary", "Y.class");
+	IOrdinaryClassFile cf = getClassFile("TypeHierarchy", "lib.jar", "binary", "Y.class");
 	IType type = cf.getType();
 	ITypeHierarchy h= type.newSupertypeHierarchy(null);
 	IType superclass= h.getSuperclass(type);
@@ -466,7 +467,7 @@
  * This is a relatively deep type hierarchy.
  */
 public void testBinaryTypeGetSuperclass2() throws JavaModelException {
-	IClassFile cf = getClassFile("TypeHierarchy", "lib.jar", "binary", "Deep.class");
+	IOrdinaryClassFile cf = getClassFile("TypeHierarchy", "lib.jar", "binary", "Deep.class");
 	IType type = cf.getType();
 	ITypeHierarchy h= type.newSupertypeHierarchy(null);
 	IType superclass= h.getSuperclass(type);
@@ -477,7 +478,7 @@
  * Ensures that the superinterfaces can be retrieved for a binary type's superinterfaces.
  */
 public void testBinaryTypeGetSuperInterfaces() throws JavaModelException {
-	IClassFile cf = getClassFile("TypeHierarchy", "lib.jar", "binary", "X.class");
+	IOrdinaryClassFile cf = getClassFile("TypeHierarchy", "lib.jar", "binary", "X.class");
 	IType type = cf.getType();
 	ITypeHierarchy h = type.newSupertypeHierarchy(null);
 	IType[] superInterfaces = h.getSuperInterfaces(type);
@@ -491,7 +492,7 @@
  * Test with type that has a "rich" super hierarchy
  */
 public void testBinaryTypeGetSuperInterfaces2() throws JavaModelException {
-	IClassFile cf = getClassFile("TypeHierarchy", "lib.jar", "rich", "C.class");
+	IOrdinaryClassFile cf = getClassFile("TypeHierarchy", "lib.jar", "rich", "C.class");
 	IType type = cf.getType();
 	ITypeHierarchy h = type.newSupertypeHierarchy(null);
 	IType[] superInterfaces = h.getSuperInterfaces(type);
@@ -540,7 +541,7 @@
 			externalJar2
 		);
 		IJavaProject project = createJavaProject("P", new String[] {}, new String[] {"JCL_LIB", externalJar1, externalJar2}, "");
-		IType focus = project.getPackageFragmentRoot(externalJar2).getPackageFragment("p").getClassFile("Y.class").getType();
+		IType focus = project.getPackageFragmentRoot(externalJar2).getPackageFragment("p").getOrdinaryClassFile("Y.class").getType();
 		assertHierarchyEquals(
 			"Focus: Y [in Y.class [in p [in " + externalJar2 + "]]]\n" +
 			"Super types:\n" +
@@ -584,7 +585,7 @@
 			externalJar
 		);
 		IJavaProject project = createJavaProject("P", new String[] {}, new String[] {"JCL_LIB", externalJar}, "");
-		IType focus = project.getPackageFragmentRoot(externalJar).getPackageFragment("p").getClassFile("X.class").getType();
+		IType focus = project.getPackageFragmentRoot(externalJar).getPackageFragment("p").getOrdinaryClassFile("X.class").getType();
 		assertHierarchyEquals(
 			"Focus: X [in X.class [in p [in " + externalJar + "]]]\n" +
 			"Super types:\n" +
@@ -731,7 +732,7 @@
 			new HashMap(),
 			getExternalResourcePath("externalLib"));
 		createJavaProject("P", new String[0], new String[] {getExternalResourcePath("externalLib")}, "");
-		IClassFile classFile = getClassFile("P", getExternalResourcePath("externalLib"), "p", "X.class");
+		IOrdinaryClassFile classFile = getClassFile("P", getExternalResourcePath("externalLib"), "p", "X.class");
 		ITypeHierarchy hierarchy = classFile.getType().newTypeHierarchy(null);
 		assertHierarchyEquals(
 			"Focus: X [in X.class [in p [in "+ getExternalPath() + "externalLib]]]\n" +
@@ -764,7 +765,7 @@
 		IJavaProject p = createJavaProject("P", new String[0], new String[] {getExternalResourcePath("externalLib.abc")}, "");
 		refreshExternalArchives(p);
 
-		IClassFile classFile = getClassFile("P", getExternalResourcePath("externalLib.abc"), "p", "X.class");
+		IOrdinaryClassFile classFile = getClassFile("P", getExternalResourcePath("externalLib.abc"), "p", "X.class");
 		ITypeHierarchy hierarchy = classFile.getType().newTypeHierarchy(null);
 		assertHierarchyEquals(
 			"Focus: X [in X.class [in p [in "+ getExternalPath() + "externalLib.abc]]]\n" +
@@ -784,7 +785,7 @@
  */
 public void testFindObject() throws CoreException {
 	// ensure Object.class is closed
-	this.currentProject.getPackageFragmentRoot(getExternalJCLPathString()).getPackageFragment("java.lang").getClassFile("Object.class").close();
+	this.currentProject.getPackageFragmentRoot(getExternalJCLPathString()).getPackageFragment("java.lang").getOrdinaryClassFile("Object.class").close();
 	// find Object to fill internal jar type cache
 	IType type = this.currentProject.findType("java.lang.Object");
 	// create hierarchy
@@ -835,7 +836,7 @@
  * Ensures that a hierarchy on a generic type can be opened
  */
 public void testGeneric02() throws JavaModelException {
-	IType type = getPackageFragmentRoot("/TypeHierarchy15/lib15.jar").getPackageFragment("util").getClassFile("ArrayList.class").getType();
+	IType type = getPackageFragmentRoot("/TypeHierarchy15/lib15.jar").getPackageFragment("util").getOrdinaryClassFile("ArrayList.class").getType();
 	ITypeHierarchy hierarchy = type.newTypeHierarchy(null);
 	assertHierarchyEquals(
 		"Focus: ArrayList [in ArrayList.class [in util [in lib15.jar [in TypeHierarchy15]]]]\n" +
@@ -1175,7 +1176,7 @@
 	IJavaElement javaElement = JavaCore.create(getFile(fileName));
 	assertNotNull("Problem to get class file \""+fileName+"\"", javaElement);
 	assertTrue("Invalid type for class file \""+fileName+"\"", javaElement instanceof IClassFile);
-	IType type = ((IClassFile) javaElement).getType();
+	IType type = ((IOrdinaryClassFile) javaElement).getType();
 	ITypeHierarchy hierarchy = type.newSupertypeHierarchy(null); // it works when we use newTypeHierarchy(null)
 	IType[] types = hierarchy.getAllSupertypes(type);
 	assertTypesEqual(
@@ -1193,7 +1194,7 @@
  * (see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=54043)
  */
 public void testGetAllSuperclassesFromBinary2() throws JavaModelException {
-	IClassFile cf = getClassFile("TypeHierarchy", "test54043.jar", "p54043", "X54043.class");
+	IOrdinaryClassFile cf = getClassFile("TypeHierarchy", "test54043.jar", "p54043", "X54043.class");
 	IType type = cf.getType();
 	ITypeHierarchy hierarchy = type.newTypeHierarchy(null);
 	IType[] types = hierarchy.getAllSupertypes(type);
@@ -1486,7 +1487,7 @@
  */
 public void testGetType() throws JavaModelException {
 	// hierarchy created on a type
-	IClassFile cf = getClassFile("TypeHierarchy", "lib.jar", "binary", "Y.class");
+	IOrdinaryClassFile cf = getClassFile("TypeHierarchy", "lib.jar", "binary", "Y.class");
 	IType type = cf.getType();
 	ITypeHierarchy hierarchy = null;
 	try {
@@ -1504,7 +1505,7 @@
  * (regression test for bug 58440 type hierarchy incomplete when implementing fully qualified interface)
  */
 public void testImplementBinaryInnerInterface() throws JavaModelException {
-	IClassFile cf = getClassFile("TypeHierarchy", "test58440.jar", "p58440", "Y.class");
+	IOrdinaryClassFile cf = getClassFile("TypeHierarchy", "test58440.jar", "p58440", "Y.class");
 	IType type = cf.getType();
 	ITypeHierarchy hierarchy = type.newTypeHierarchy(null);
 	assertHierarchyEquals(
@@ -1898,7 +1899,7 @@
 		h.getAllTypes()
 	);
 }
-public void testRegion4() throws CoreException {
+public void _testRegion4() throws CoreException {
 	try {
 		IJavaProject p1 = createJavaProject("P1");
 		IJavaProject p2 = createJavaProject("P2", new String[] {""}, new String[] {"JCL_LIB"}, new String[] {"/P1"}, "");
@@ -2444,7 +2445,7 @@
  * @throws CoreException
  * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=329663"
  */
-public void testBug329663() throws JavaModelException, CoreException {
+public void _testBug329663() throws JavaModelException, CoreException {
 	try {
 		IJavaProject p1 = createJavaProject("P1", new String[] {""}, new String[] {"JCL_LIB"}, new String[0], "");
 		IJavaProject p2 = createJavaProject("P2", new String[] {""}, new String[] {"JCL_LIB"}, new String[] {"/P1"}, "");
@@ -2491,7 +2492,7 @@
  * @throws CoreException
  * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=329663"
  */
-public void testBug329663a() throws JavaModelException, CoreException {
+public void _testBug329663a() throws JavaModelException, CoreException {
 try {
 	IJavaProject p1 = createJavaProject("P1", new String[] {""}, new String[] {"JCL_LIB"}, new String[0], "");
 	IJavaProject p2 = createJavaProject("P2", new String[] {""}, new String[] {"JCL_LIB"}, new String[] {"/P1"}, "");
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/TypeResolveTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/TypeResolveTests.java
index eff5a57..b54342b 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/TypeResolveTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/TypeResolveTests.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 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
@@ -189,7 +189,7 @@
  * Resolve the type "X" within a top level binary type.
  */
 public void testResolveTypeInBinary1() throws JavaModelException {
-	IType type = getPackageFragmentRoot("/TypeResolve/myLib.jar").getPackageFragment("p2").getClassFile("Y.class").getType();
+	IType type = getPackageFragmentRoot("/TypeResolve/myLib.jar").getPackageFragment("p2").getOrdinaryClassFile("Y.class").getType();
 	String[][] types = type.resolveType("X");
 	assertTypesEqual(
 		"p1.X",
@@ -199,7 +199,7 @@
  * Resolve the type "X" within a member binary type.
  */
 public void testResolveTypeInBinary2() throws JavaModelException {
-	IType type = getPackageFragmentRoot("/TypeResolve/myLib.jar").getPackageFragment("p2").getClassFile("Y$Member.class").getType();
+	IType type = getPackageFragmentRoot("/TypeResolve/myLib.jar").getPackageFragment("p2").getOrdinaryClassFile("Y$Member.class").getType();
 	String[][] types = type.resolveType("X");
 	assertTypesEqual(
 		"p1.X",
@@ -209,7 +209,7 @@
  * Resolve the type "X" within an anonymous binary type.
  */
 public void testResolveTypeInBinary3() throws JavaModelException {
-	IType type = getPackageFragmentRoot("/TypeResolve/myLib.jar").getPackageFragment("p2").getClassFile("Y$1.class").getType();
+	IType type = getPackageFragmentRoot("/TypeResolve/myLib.jar").getPackageFragment("p2").getOrdinaryClassFile("Y$1.class").getType();
 	String[][] types = type.resolveType("X");
 	assertTypesEqual(
 		"p1.X",
@@ -230,7 +230,7 @@
 			"  }\n" +
 			"}"
 		}, "1.4");
-		IType type = getPackageFragmentRoot("/TypeResolve/lib212224.jar").getPackageFragment("").getClassFile("X212224$Member.class").getType();
+		IType type = getPackageFragmentRoot("/TypeResolve/lib212224.jar").getPackageFragment("").getOrdinaryClassFile("X212224$Member.class").getType();
 		String[][] types = type.resolveType("int");
 		assertTypesEqual(
 			"<null>",
@@ -384,7 +384,7 @@
 		
 		waitForAutoBuild();
 		IPackageFragmentRoot root = project.getPackageFragmentRoot(getFile("/P/lib334783.jar"));
-		IType type = root.getPackageFragment("p").getClassFile("X.class").getType();
+		IType type = root.getPackageFragment("p").getOrdinaryClassFile("X.class").getType();
 		String annotationString = "@p.Default [in processor [in Test(java.lang.String) [in X [in X.class [in p [in lib334783.jar [in P]]]]]]]";
 		
 		IMethod method = type.getMethods()[1];
@@ -479,7 +479,7 @@
 		
 		waitForAutoBuild();
 		IPackageFragmentRoot root = project.getPackageFragmentRoot(getFile("/P/lib334783_2.jar"));
-		IType type = root.getPackageFragment("p").getClassFile("X.class").getType();
+		IType type = root.getPackageFragment("p").getOrdinaryClassFile("X.class").getType();
 		String annotationString1 = "@p.Default [in processor [in Test(int, java.lang.String, int) [in X [in X.class [in p [in lib334783_2.jar [in P]]]]]]]";
 		String annotationString2 = "@p.Marker [in processor [in Test(int, java.lang.String, int) [in X [in X.class [in p [in lib334783_2.jar [in P]]]]]]]";
 		IMethod method = type.getMethods()[1];
@@ -554,7 +554,7 @@
 		
 		waitForAutoBuild();
 		IPackageFragmentRoot root = project.getPackageFragmentRoot(getFile("/P/lib334783_3.jar"));
-		IType type = root.getPackageFragment("p").getClassFile("X.class").getType();
+		IType type = root.getPackageFragment("p").getOrdinaryClassFile("X.class").getType();
 		String annotationString1 = "@p.Default [in arg1 [in Test(int, java.lang.String, int) [in X [in X.class [in p [in lib334783_3.jar [in P]]]]]]]";
 		String annotationString2 = "@p.Marker [in arg1 [in Test(int, java.lang.String, int) [in X [in X.class [in p [in lib334783_3.jar [in P]]]]]]]";
 		IMethod method = type.getMethods()[1];
@@ -633,7 +633,7 @@
 		
 		waitForAutoBuild();
 		IPackageFragmentRoot root = project.getPackageFragmentRoot(getFile("/P/lib334783.jar"));
-		IType type = root.getPackageFragment("p").getClassFile("X.class").getType();
+		IType type = root.getPackageFragment("p").getOrdinaryClassFile("X.class").getType();
 		
 		IMethod method = type.getMethods()[1];
 		ILocalVariable[] localVariables = method.getParameters();
@@ -675,7 +675,7 @@
 		
 		waitForAutoBuild();
 		IPackageFragmentRoot root = project.getPackageFragmentRoot(getFile("/P/lib334783_3.jar"));
-		IType type = root.getPackageFragment("p").getClassFile("X.class").getType();
+		IType type = root.getPackageFragment("p").getOrdinaryClassFile("X.class").getType();
 		String annotationString1 = "@p.Default [in arg1 [in X(int, java.lang.String, int) [in X [in X.class [in p [in lib334783_3.jar [in P]]]]]]]";
 		String annotationString2 = "@p.Marker [in arg1 [in X(int, java.lang.String, int) [in X [in X.class [in p [in lib334783_3.jar [in P]]]]]]]";
 		IMethod method = type.getMethods()[0];
@@ -729,7 +729,7 @@
 		
 		waitForAutoBuild();
 		IPackageFragmentRoot root = project.getPackageFragmentRoot(getFile("/P/lib334783.jar"));
-		IType type = root.getPackageFragment("p").getClassFile("X.class").getType();
+		IType type = root.getPackageFragment("p").getOrdinaryClassFile("X.class").getType();
 		String annotationString = "@p.Default [in processor [in Test(java.lang.String) [in X [in X.class [in p [in lib334783.jar [in P]]]]]]]";
 		
 		IMethod method = type.getMethods()[1];
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/nd/indexer/IndexerTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/nd/indexer/IndexerTest.java
index a5a181d..62bf096 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/nd/indexer/IndexerTest.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/nd/indexer/IndexerTest.java
@@ -26,6 +26,7 @@
 import org.eclipse.jdt.core.IClassFile;
 import org.eclipse.jdt.core.IJavaElement;
 import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IOrdinaryClassFile;
 import org.eclipse.jdt.core.IPackageFragmentRoot;
 import org.eclipse.jdt.core.IParent;
 import org.eclipse.jdt.core.tests.model.AbstractJavaModelTests;
@@ -199,6 +200,7 @@
 					collectAllClassFiles(result, next);
 					iterationMon.setWorkRemaining(result.size());
 					for (IClassFile nextClass : result) {
+						if (!(nextClass instanceof IOrdinaryClassFile)) continue;
 						SubMonitor classMon = iterationMon.split(1);
 						BinaryTypeDescriptor descriptor = BinaryTypeFactory.createDescriptor(nextClass);
 						IndexBinaryType indexedBinaryType = (IndexBinaryType)BinaryTypeFactory.readFromIndex(localIndex, descriptor, classMon);
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingMethodDeclTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingMethodDeclTest.java
index fbce7ed..373a4d4 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingMethodDeclTest.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingMethodDeclTest.java
@@ -65,6 +65,7 @@
 		return ast.apiLevel() < AST.JLS3 ? INTERNAL_METHOD_RETURN_TYPE_PROPERTY : MethodDeclaration.RETURN_TYPE2_PROPERTY; 
 	} 
 
+	/** @deprecated using deprecated code */
 	private ASTNode createNewExceptionType(AST ast, String name) {
 		return ast.apiLevel() < AST.JLS8 ? ast.newSimpleName(name) : (ASTNode) ast.newSimpleType(ast.newSimpleName(name));
 	}
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingModuleDeclarationTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingModuleDeclarationTest.java
new file mode 100644
index 0000000..cb63868
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingModuleDeclarationTest.java
@@ -0,0 +1,364 @@
+/*******************************************************************************
+ * Copyright (c) 2017 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.jdt.core.tests.rewrite.describing;
+
+import java.util.List;
+import junit.framework.Test;
+
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IPackageFragment;
+import org.eclipse.jdt.core.IPackageFragmentRoot;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.core.dom.*;
+import org.eclipse.jdt.core.dom.ModuleModifier.ModuleModifierKeyword;
+import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
+import org.eclipse.jdt.core.dom.rewrite.ListRewrite;
+import org.eclipse.jdt.internal.compiler.util.Util;
+
+public class ASTRewritingModuleDeclarationTest extends ASTRewritingTest {
+
+	public ASTRewritingModuleDeclarationTest(String name) {
+		super(name);
+	}
+
+	public ASTRewritingModuleDeclarationTest(String name, int apiLevel) {
+		super(name, apiLevel);
+	}
+
+	public static Test suite() {
+		return createSuite(ASTRewritingModuleDeclarationTest.class);
+	}
+
+	public void testBug509961_0001_since_9() throws Exception {
+		IJavaProject javaProject = null ;
+		try {
+			javaProject = createProject("P_9", JavaCore.VERSION_9);
+			IPackageFragmentRoot currentSourceFolder = getPackageFragmentRoot("P_9", "src");
+			IPackageFragment pack1= currentSourceFolder.getPackageFragment(Util.EMPTY_STRING);
+			StringBuffer buf= new StringBuffer();
+			buf.append("module first {\n");
+			buf.append("    requires second;\n");
+			buf.append("    requires removeme;\n");
+			buf.append("    exports pack11 to third, fourth;\n");
+			buf.append("    exports pack12 to fifth;\n");
+			buf.append("    exports pack12 to remove.mod1;\n");
+			buf.append("    exports pack13 to well.founded.module2;\n");
+			buf.append("    uses MyType;\n");
+			buf.append("    uses Type.Remove;\n");
+			buf.append("    provides pack22.I22 with pack11.packinternal.Z11;\n");
+			buf.append("    provides pack23.I23 with pack11.Z23, pack12.ZZ23;\n");
+			buf.append("}");
+			ICompilationUnit cu= pack1.createCompilationUnit("module-info.java", buf.toString(), false, null);
+			CompilationUnit astRoot= createAST(cu);
+			ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
+			AST ast= astRoot.getAST();
+
+			ModuleDeclaration moduleDecl = astRoot.getModule();
+			ListRewrite listRewrite = rewrite.getListRewrite(moduleDecl, ModuleDeclaration.MODULE_DIRECTIVES_PROPERTY);
+			List<ModuleDirective> moduleStatements = moduleDecl.moduleStatements();
+			int index = 0;
+			{
+				RequiresDirective req = (RequiresDirective) moduleStatements.get(index++); // replace the module in first required
+				Name newName = ast.newSimpleName("newSecond");
+				rewrite.replace(req.getName(), newName, null);
+				listRewrite.remove(moduleStatements.get(index++), null); // remove the second required
+
+				RequiresDirective newNode = ast.newRequiresDirective(); // add a new required
+				newNode.setName(ast.newSimpleName("addedme"));
+				listRewrite.insertAfter(newNode, req, null);
+			}
+			{
+				// exports pack11 to third, fourth; -> exports newpack11 to third;
+				ExportsDirective exp = (ExportsDirective) moduleStatements.get(index++);
+				Name newName = ast.newSimpleName("newpack11");
+				rewrite.replace(exp.getName(), newName, null);
+				ListRewrite expListRewrite = rewrite.getListRewrite(exp, ExportsDirective.MODULES_PROPERTY);
+				expListRewrite.remove((ASTNode) exp.modules().get(1), null); 
+
+				// exports pack12 to fifth -> exports pack12 to fifth, sixth
+				exp = (ExportsDirective) moduleStatements.get(index++);
+				newName = ast.newSimpleName("sixth");
+				expListRewrite = rewrite.getListRewrite(exp, ExportsDirective.MODULES_PROPERTY);
+				expListRewrite.insertLast(newName, null);
+
+				// exports pack12 to remove.mod1 -> exports pack12
+				exp = (ExportsDirective) moduleStatements.get(index++);
+				expListRewrite = rewrite.getListRewrite(exp, ExportsDirective.MODULES_PROPERTY);
+				expListRewrite.remove((ASTNode) exp.modules().get(0), null);
+
+				// exports pack12 to never.to.be.module - remove the export
+				listRewrite.remove((ASTNode) moduleDecl.moduleStatements().get(index++), null);
+
+				// exports pack12 to new.found.module - add the export
+				exp = ast.newExportsStatement();
+				exp.setName(ast.newSimpleName("pack12"));
+				Name name = ast.newName("well.founded.module3");
+				exp.modules().add(name);
+				listRewrite.insertLast(exp, null);
+			}
+			{
+				// uses MyType -> uses MyNewType;
+				UsesDirective usesStatement = (UsesDirective) moduleStatements.get(index++);
+				Name newName = ast.newSimpleName("MyNewType");
+				rewrite.replace(usesStatement.getName(), newName, null);
+
+				// uses Type.Remove - remove the uses
+				listRewrite.remove(moduleStatements.get(index++), null);
+
+				// uses MyNewFoundType - add the uses
+				usesStatement = ast.newUsesDirective();
+				newName = ast.newSimpleName("MyNewFoundType");
+				usesStatement.setName(newName);
+				listRewrite.insertLast(usesStatement, null);
+			}
+			{
+				// provides pack22.I22 with pack11.packinternal.Z11 ->  provides pack22.INew22 with pack11.packinternal.NewZ11, pack11.Y11
+				ProvidesDirective providesStatement = (ProvidesDirective) moduleStatements.get(index++);
+				Name newName = ast.newName("pack22.INew22");
+				rewrite.replace(providesStatement.getName(), newName, null);
+				newName = ast.newName("pack11.packinternal.NewZ11");
+				ListRewrite pListRewrite = rewrite.getListRewrite(providesStatement, ProvidesDirective.IMPLEMENTATIONS_PROPERTY);
+				pListRewrite.replace((ASTNode) providesStatement.implementations().get(0), newName ,null);
+
+				newName = ast.newName("pack11.Y11");
+				pListRewrite.insertLast(newName, null);
+				// provides pack23.I23 with pack11.Z23, pack12.ZZ23 -> provides pack23.I23 with pack12.ZZ23
+				providesStatement = (ProvidesDirective) moduleStatements.get(index++);
+				pListRewrite = rewrite.getListRewrite(providesStatement, ProvidesDirective.IMPLEMENTATIONS_PROPERTY);
+				pListRewrite.remove((ASTNode) providesStatement.implementations().get(0), null);
+			}
+			String preview= evaluateRewrite(cu, rewrite);
+			buf= new StringBuffer();
+			buf.append("module first {\n");
+			buf.append("    requires newSecond;\n");
+			buf.append("    requires addedme;\n");
+			buf.append("    exports newpack11 to third;\n");
+			buf.append("    exports pack12 to fifth, sixth;\n");
+			buf.append("    exports pack12;\n");
+			buf.append("    uses MyNewType;\n");
+			buf.append("    provides pack22.INew22 with pack11.packinternal.NewZ11, pack11.Y11;\n");
+			buf.append("    provides pack23.I23 with pack12.ZZ23;\n");
+			buf.append("    exports pack12 to well.founded.module3;\n");
+			buf.append("    uses MyNewFoundType;\n");
+			buf.append("}");
+			assertEqualString(preview, buf.toString());
+		} finally {
+			if (javaProject != null)
+				deleteProject(javaProject);
+		}
+	}
+	public void testBug509961_0002_since_9() throws Exception {
+		IJavaProject javaProject = null;
+		try {
+			javaProject = createProject("P_9", JavaCore.VERSION_9);
+			IPackageFragmentRoot currentSourceFolder = getPackageFragmentRoot("P_9", "src");
+			IPackageFragment pack1= currentSourceFolder.getPackageFragment(Util.EMPTY_STRING);
+			StringBuffer buf= new StringBuffer();
+			buf.append("module first {\n");
+			buf.append("    requires existing;\n");
+			buf.append("}");
+
+			ICompilationUnit cu= pack1.createCompilationUnit("module-info.java", buf.toString(), false, null);
+			CompilationUnit astRoot= createAST(cu);
+			ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
+			AST ast= astRoot.getAST();
+
+			ModuleDeclaration moduleDecl = astRoot.getModule();
+			ListRewrite listRewrite = rewrite.getListRewrite(moduleDecl, ModuleDeclaration.MODULE_DIRECTIVES_PROPERTY);
+			{
+				RequiresDirective newNode = ast.newRequiresDirective(); // add a new required
+				newNode.setName(ast.newSimpleName("addedme"));
+				listRewrite.insertLast(newNode, null);
+			}
+			String preview= evaluateRewrite(cu, rewrite);
+			buf= new StringBuffer();
+			buf.append("module first {\n");
+			buf.append("    requires existing;\n");
+			buf.append("    requires addedme;\n");
+			buf.append("}");
+			assertEqualString(preview, buf.toString());		
+		} finally {
+			if (javaProject != null) deleteProject(javaProject);
+		}
+	}
+
+	public void testBug509961_0003_since_9() throws Exception {
+		IJavaProject javaProject = null;
+		try {
+			javaProject = createProject("P_9", JavaCore.VERSION_9);
+			IPackageFragmentRoot currentSourceFolder = getPackageFragmentRoot("P_9", "src");
+			IPackageFragment pack1= currentSourceFolder.getPackageFragment(Util.EMPTY_STRING);
+			StringBuffer buf= new StringBuffer();
+			buf.append("module first {\n");
+			buf.append("    requires existing;\n");
+			buf.append("    requires static module1;\n");
+			buf.append("    requires static module2;\n");
+			buf.append("    requires static module3;\n");
+			buf.append("}");
+			ICompilationUnit cu= pack1.createCompilationUnit("module-info.java", buf.toString(), false, null);
+			CompilationUnit astRoot= createAST(cu);
+			ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
+			AST ast= astRoot.getAST();
+			ModuleDeclaration moduleDecl = astRoot.getModule();
+			ListRewrite listRewrite = rewrite.getListRewrite(moduleDecl, ModuleDeclaration.MODULE_DIRECTIVES_PROPERTY);
+			{
+				RequiresDirective reqNode = (RequiresDirective) moduleDecl.moduleStatements().get(0);
+				ASTNode newModifier = ast.newModuleModifier(ModuleModifierKeyword.STATIC_KEYWORD);
+				rewrite.getListRewrite(reqNode, RequiresDirective.MODIFIERS_PROPERTY).insertFirst(newModifier, null);
+
+				reqNode = (RequiresDirective) moduleDecl.moduleStatements().get(1);
+				rewrite.getListRewrite(reqNode, RequiresDirective.MODIFIERS_PROPERTY).remove((ASTNode) reqNode.modifiers().get(0), null);
+
+				reqNode = (RequiresDirective) moduleDecl.moduleStatements().get(2);
+				newModifier = ast.newModuleModifier(ModuleModifierKeyword.TRANSITIVE_KEYWORD);
+				rewrite.getListRewrite(reqNode, RequiresDirective.MODIFIERS_PROPERTY).replace((ASTNode) reqNode.modifiers().get(0), newModifier, null);
+
+				reqNode = (RequiresDirective) moduleDecl.moduleStatements().get(3);
+				newModifier = ast.newModuleModifier(ModuleModifierKeyword.TRANSITIVE_KEYWORD);
+				rewrite.getListRewrite(reqNode, RequiresDirective.MODIFIERS_PROPERTY).insertLast(newModifier, null);
+
+				RequiresDirective newNode = ast.newRequiresDirective(); // add a new required
+				newNode.setName(ast.newSimpleName("addedme"));
+				newModifier = ast.newModuleModifier(ModuleModifierKeyword.TRANSITIVE_KEYWORD);
+				rewrite.getListRewrite(newNode, RequiresDirective.MODIFIERS_PROPERTY).insertFirst(newModifier, null);
+				listRewrite.insertLast(newNode, null);
+			}
+			String preview= evaluateRewrite(cu, rewrite);
+			buf= new StringBuffer();
+			buf.append("module first {\n");
+			buf.append("    requires static  existing;\n");
+			buf.append("    requires module1;\n");
+			buf.append("    requires transitive module2;\n");
+			buf.append("    requires static transitive module3;\n");
+			buf.append("    requires transitive addedme;\n");
+		buf.append("}");
+			assertEqualString(preview, buf.toString());
+		} finally {
+			if (javaProject != null) deleteProject(javaProject);
+		}
+	}
+	public void testBug516731_0001_since_9() throws Exception {
+		IJavaProject javaProject = null;
+		try {
+			javaProject = createProject("P_9", JavaCore.VERSION_9);
+			IPackageFragmentRoot currentSourceFolder = getPackageFragmentRoot("P_9", "src");
+			IPackageFragment pack1= currentSourceFolder.getPackageFragment(Util.EMPTY_STRING);
+			StringBuffer buf= new StringBuffer();
+			buf.append("module first {\n");
+			buf.append("    requires existing;\n");
+			buf.append("}");
+			ICompilationUnit cu= pack1.createCompilationUnit("module-info.java", buf.toString(), false, null);
+			CompilationUnit astRoot= createAST(cu);
+			ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
+			ModuleDeclaration moduleDecl = astRoot.getModule();
+			rewrite.set(moduleDecl, ModuleDeclaration.OPEN_PROPERTY, Boolean.TRUE, null);
+			String preview= evaluateRewrite(cu, rewrite);
+			buf= new StringBuffer();
+			buf.append("open module first {\n");
+			buf.append("    requires existing;\n");
+			buf.append("}");
+			assertEqualString(preview, buf.toString());
+		} finally {
+			if (javaProject != null) deleteProject(javaProject);
+		}
+	}
+	public void testBug516731_0002_since_9() throws Exception {
+		IJavaProject javaProject = null;
+		try {
+			javaProject = createProject("P_9", JavaCore.VERSION_9);
+			IPackageFragmentRoot currentSourceFolder = getPackageFragmentRoot("P_9", "src");
+			IPackageFragment pack1= currentSourceFolder.getPackageFragment(Util.EMPTY_STRING);
+			StringBuffer buf= new StringBuffer();
+			buf.append("open module first {\n");
+			buf.append("    requires existing;\n");
+			buf.append("}");
+			ICompilationUnit cu= pack1.createCompilationUnit("module-info.java", buf.toString(), false, null);
+			CompilationUnit astRoot= createAST(cu);
+			ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
+			ModuleDeclaration moduleDecl = astRoot.getModule();
+			rewrite.set(moduleDecl, ModuleDeclaration.OPEN_PROPERTY, Boolean.FALSE, null);
+			String preview= evaluateRewrite(cu, rewrite);
+			buf= new StringBuffer();
+			buf.append("module first {\n");
+			buf.append("    requires existing;\n");
+			buf.append("}");
+			assertEqualString(preview, buf.toString());
+		} finally {
+			if (javaProject != null) deleteProject(javaProject);
+		}
+	}
+	public void testBug516731_0003_since_9() throws Exception {
+		IJavaProject javaProject = null;
+		try {
+			javaProject = createProject("P_9", JavaCore.VERSION_9);
+			IPackageFragmentRoot currentSourceFolder = getPackageFragmentRoot("P_9", "src");
+			IPackageFragment pack1= currentSourceFolder.getPackageFragment(Util.EMPTY_STRING);
+			StringBuffer buf= new StringBuffer();
+			buf.append("module first {\n");
+			buf.append("    requires existing;\n");
+			buf.append("    requires static module1;\n");
+			buf.append("    requires static module2;\n");
+			buf.append("    requires static module3;\n");
+			buf.append("    requires static module4;\n");
+			buf.append("}");
+			ICompilationUnit cu= pack1.createCompilationUnit("module-info.java", buf.toString(), false, null);
+			CompilationUnit astRoot= createAST(cu);
+			ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
+			AST ast= astRoot.getAST();
+			ModuleDeclaration moduleDecl = astRoot.getModule();
+			ListRewrite listRewrite = rewrite.getListRewrite(moduleDecl, ModuleDeclaration.MODULE_DIRECTIVES_PROPERTY);
+			{
+				int count = 0;
+				RequiresDirective reqNode = (RequiresDirective) moduleDecl.moduleStatements().get(count++);
+				ASTNode newModifier = ast.newModuleModifier(ModuleModifierKeyword.STATIC_KEYWORD);
+				rewrite.getListRewrite(reqNode, RequiresDirective.MODIFIERS_PROPERTY).insertFirst(newModifier, null);
+				newModifier = ast.newModuleModifier(ModuleModifierKeyword.TRANSITIVE_KEYWORD);
+				rewrite.getListRewrite(reqNode, RequiresDirective.MODIFIERS_PROPERTY).insertLast(newModifier, null);
+
+				reqNode = (RequiresDirective) moduleDecl.moduleStatements().get(count++);
+				rewrite.getListRewrite(reqNode, RequiresDirective.MODIFIERS_PROPERTY).remove((ASTNode) reqNode.modifiers().get(0), null);
+
+				reqNode = (RequiresDirective) moduleDecl.moduleStatements().get(count++);
+				newModifier = ast.newModuleModifier(ModuleModifierKeyword.TRANSITIVE_KEYWORD);
+				rewrite.getListRewrite(reqNode, RequiresDirective.MODIFIERS_PROPERTY).replace((ASTNode) reqNode.modifiers().get(0), newModifier, null);
+
+				reqNode = (RequiresDirective) moduleDecl.moduleStatements().get(count++);
+				newModifier = ast.newModuleModifier(ModuleModifierKeyword.TRANSITIVE_KEYWORD);
+				rewrite.getListRewrite(reqNode, RequiresDirective.MODIFIERS_PROPERTY).insertLast(newModifier, null);
+
+				reqNode = (RequiresDirective) moduleDecl.moduleStatements().get(count++);
+				newModifier = ast.newModuleModifier(ModuleModifierKeyword.TRANSITIVE_KEYWORD);
+				rewrite.getListRewrite(reqNode, RequiresDirective.MODIFIERS_PROPERTY).insertFirst(newModifier, null);
+
+				RequiresDirective newNode = ast.newRequiresDirective(); // add a new required
+				newNode.setName(ast.newSimpleName("addedme"));
+				newModifier = ast.newModuleModifier(ModuleModifierKeyword.TRANSITIVE_KEYWORD);
+				rewrite.getListRewrite(newNode, RequiresDirective.MODIFIERS_PROPERTY).insertFirst(newModifier, null);
+				listRewrite.insertLast(newNode, null);
+			}
+			String preview= evaluateRewrite(cu, rewrite);
+			buf= new StringBuffer();
+			buf.append("module first {\n");
+			buf.append("    requires static  transitive  existing;\n");
+			buf.append("    requires module1;\n");
+			buf.append("    requires transitive module2;\n");
+			buf.append("    requires static transitive module3;\n");
+			buf.append("    requires transitive static module4;\n");
+			buf.append("    requires transitive addedme;\n");
+		buf.append("}");
+			assertEqualString(preview, buf.toString());
+		} finally {
+			if (javaProject != null) deleteProject(javaProject);
+		}
+	}
+
+}
\ No newline at end of file
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingStatementsTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingStatementsTest.java
index 3001d4e..06cf571 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingStatementsTest.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingStatementsTest.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2016 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
@@ -30,6 +30,7 @@
 import org.eclipse.jdt.core.dom.BooleanLiteral;
 import org.eclipse.jdt.core.dom.BreakStatement;
 import org.eclipse.jdt.core.dom.CatchClause;
+import org.eclipse.jdt.core.dom.ChildListPropertyDescriptor;
 import org.eclipse.jdt.core.dom.ClassInstanceCreation;
 import org.eclipse.jdt.core.dom.CompilationUnit;
 import org.eclipse.jdt.core.dom.ConstructorInvocation;
@@ -1486,7 +1487,7 @@
 				VariableDeclarationExpression resource = ast.newVariableDeclarationExpression(fragment);
 				resource.setType(ast.newSimpleType(ast.newSimpleName("Reader")));
 
-				rewrite.getListRewrite(newTry, TryStatement.RESOURCES_PROPERTY).insertLast(resource, null);
+				rewrite.getListRewrite(newTry, getResourcesProperty()).insertLast(resource, null);
 	
 				rewrite.replace(doStatement.getBody(), newTry, null);
 			}
@@ -5005,7 +5006,7 @@
 				VariableDeclarationExpression resource = ast.newVariableDeclarationExpression(fragment);
 				resource.setType(ast.newSimpleType(ast.newSimpleName("Reader")));
 
-				rewrite.getListRewrite(tryStatement, TryStatement.RESOURCES_PROPERTY).insertLast(resource, null);
+				rewrite.getListRewrite(tryStatement, getResourcesProperty()).insertLast(resource, null);
 			}
 			{ // replace catch, remove finally
 				TryStatement tryStatement= (TryStatement) blockStatements.get(1);
@@ -5046,6 +5047,12 @@
 			deleteProject("P_17");
 		}
 	}
+	/**
+	 * @deprecated
+	 */
+	protected ChildListPropertyDescriptor getResourcesProperty() {
+		return this.apiLevel < AST_INTERNAL_JLS9 ? TryStatement.RESOURCES_PROPERTY : TryStatement.RESOURCES2_PROPERTY;
+	}
 
 	public void testTryStatementWithResources2_since_4() throws Exception {
 		createProject("P_17", JavaCore.VERSION_1_7);
@@ -5147,7 +5154,7 @@
 					(VariableDeclarationFragment) rewrite.createCopyTarget(fragment));
 			newVariableDeclarationExpression.setType((Type) rewrite.createCopyTarget(variableDeclarationStatement.getType()));
 
-			ListRewrite listRewrite = rewrite.getListRewrite(tryStatement, TryStatement.RESOURCES_PROPERTY);
+			ListRewrite listRewrite = rewrite.getListRewrite(tryStatement, getResourcesProperty());
 			listRewrite.insertLast(newVariableDeclarationExpression, null);
 			rewrite.remove(variableDeclarationStatement, null);
 
@@ -5225,7 +5232,7 @@
 			VariableDeclarationExpression newVariableDeclarationExpression = ast.newVariableDeclarationExpression(fragment);
 			newVariableDeclarationExpression.setType(ast.newSimpleType(ast.newSimpleName("FileReader")));
 
-			ListRewrite listRewrite = rewrite.getListRewrite(tryStatement, TryStatement.RESOURCES_PROPERTY);
+			ListRewrite listRewrite = rewrite.getListRewrite(tryStatement, getResourcesProperty());
 			listRewrite.insertLast(newVariableDeclarationExpression, null);
 
 			String preview = evaluateRewrite(cu, rewrite);
@@ -5300,7 +5307,7 @@
 			VariableDeclarationExpression newVariableDeclarationExpression = ast.newVariableDeclarationExpression(fragment);
 			newVariableDeclarationExpression.setType(ast.newSimpleType(ast.newSimpleName("FileReader")));
 
-			ListRewrite listRewrite = rewrite.getListRewrite(tryStatement, TryStatement.RESOURCES_PROPERTY);
+			ListRewrite listRewrite = rewrite.getListRewrite(tryStatement, getResourcesProperty());
 			listRewrite.insertLast(newVariableDeclarationExpression, null);
 
 			String preview = evaluateRewrite(cu, rewrite);
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingTest.java
index 2d46ab6..f7a005a 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingTest.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingTest.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2016 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 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
@@ -59,7 +59,10 @@
 	/** @deprecated using deprecated code */
 	private final static int JLS4_INTERNAL = AST.JLS4;
 
-	private final static int[] JLS_LEVELS = { JLS2_INTERNAL, JLS3_INTERNAL, JLS4_INTERNAL, AST.JLS8 };
+	/** @deprecated using deprecated code */
+	private final static int JLS8_INTERNAL = AST.JLS8;
+
+	private final static int[] JLS_LEVELS = { JLS2_INTERNAL, JLS3_INTERNAL, JLS4_INTERNAL, JLS8_INTERNAL, AST.JLS9 };
 
 	private static final String ONLY_AST_STRING = "_only";
 	private static final String SINCE_AST_STRING = "_since";
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingTypeAnnotationsTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingTypeAnnotationsTest.java
index 750c4e0..ceef7af 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingTypeAnnotationsTest.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingTypeAnnotationsTest.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2013, 2015 IBM Corporation and others.
+ * Copyright (c) 2013, 2016 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
@@ -29,7 +29,13 @@
 	}
 
 	public static Test suite() {
-		return createSuite(ASTRewritingTypeAnnotationsTest.class, AST.JLS8);
+		return createSuite(ASTRewritingTypeAnnotationsTest.class, getAST8());
+	}
+	/**
+	 * @deprecated references deprecated old AST level
+	 */
+	protected static int getAST8() {
+		return AST.JLS8;
 	}
 
 	public void testCastAnnotations() throws Exception {
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingTypeDeclTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingTypeDeclTest.java
index 16ff013..f2f7628 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingTypeDeclTest.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingTypeDeclTest.java
@@ -86,7 +86,12 @@
 	public static Test suite() {
 		return createSuite(ASTRewritingTypeDeclTest.class);
 	}
-
+	/**
+	 * @deprecated references deprecated old AST level
+	 */
+	protected static int getAST8() {
+		return AST.JLS8;
+	}
 	/** @deprecated using deprecated code */
 	public void testTypeDeclChanges_only_2() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
@@ -1940,7 +1945,7 @@
 		buf.append("    interface IC {}\n");
 		buf.append("}\n");
 		ICompilationUnit cu= pack1.createCompilationUnit("C.java", buf.toString(), false, null);
-		CompilationUnit astRoot= createAST(AST.JLS8, cu, true, false);
+		CompilationUnit astRoot= createAST(getAST8(), cu, true, false);
 		List types = astRoot.types();
 		TypeDeclaration typeDeclaration = (((TypeDeclaration) types.get(0)).getTypes())[0];
 		ITypeBinding iTypeBinding = typeDeclaration.resolveBinding();
@@ -1954,7 +1959,7 @@
 		buf.append("    interface IC {}\n");
 		buf.append("}\n");
 		ICompilationUnit cu= pack1.createCompilationUnit("C.java", buf.toString(), false, null);
-		CompilationUnit astRoot= createAST(AST.JLS8, cu, true, false);
+		CompilationUnit astRoot= createAST(getAST8(), cu, true, false);
 		List types = astRoot.types();
 		TypeDeclaration outerTypeDeclaration = (TypeDeclaration) types.get(0);
 		TypeDeclaration memberTypeDeclaration = (outerTypeDeclaration.getTypes())[0];
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ImportRewrite18Test.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ImportRewrite18Test.java
index 34c9db1..db6adec 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ImportRewrite18Test.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ImportRewrite18Test.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2014, 2015 IBM Corporation and others.
+ * Copyright (c) 2014, 2016 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
@@ -87,7 +87,12 @@
 
 		waitUntilIndexesReady();
 	}
-
+	/**
+	 * @deprecated
+	 */
+	protected static int getJLS8() {
+		return AST.JLS8;
+	}
 	protected void tearDown() throws Exception {
 		deleteProject(PROJECT);
 		super.tearDown();
@@ -111,7 +116,7 @@
 		createFolder("/" + PROJECT + "/src/pack2/pack3");
 		createFile("/" + PROJECT + "/src/pack2/pack3/B.java", contents);
 
-		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		ASTParser parser = ASTParser.newParser(getJLS8());
 		parser.setSource(getCompilationUnit("/" + PROJECT + "/src/pack1/A.java"));
 		parser.setResolveBindings(true);
 		parser.setStatementsRecovery(true);
@@ -169,7 +174,7 @@
 		createFolder("/" + PROJECT + "/src/pack3/pack4");
 		createFile("/" + PROJECT + "/src/pack3/pack4/B.java", contents);
 
-		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		ASTParser parser = ASTParser.newParser(getJLS8());
 		parser.setSource(getCompilationUnit("/" + PROJECT + "/src/pack1/A.java"));
 		parser.setResolveBindings(true);
 		parser.setStatementsRecovery(true);
@@ -226,7 +231,7 @@
 		createFolder("/" + PROJECT + "/src/pack3/pack4");
 		createFile("/" + PROJECT + "/src/pack3/pack4/B.java", contents);
 
-		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		ASTParser parser = ASTParser.newParser(getJLS8());
 		parser.setSource(getCompilationUnit("/" + PROJECT + "/src/pack1/A.java"));
 		parser.setResolveBindings(true);
 		parser.setStatementsRecovery(true);
@@ -287,7 +292,7 @@
 		createFolder("/" + PROJECT + "/src/pack2");
 		createFile("/" + PROJECT + "/src/pack2/B1.java", contents);
 
-		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		ASTParser parser = ASTParser.newParser(getJLS8());
 		ICompilationUnit cu = getCompilationUnit("/" + PROJECT + "/src/pack1/X.java");
 		parser.setSource(cu);
 		parser.setResolveBindings(true);
@@ -401,7 +406,7 @@
 		createFolder("/" + PROJECT + "/src/pack4");
 		createFile("/" + PROJECT + "/src/pack4/D1.java", contents);
 
-		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		ASTParser parser = ASTParser.newParser(getJLS8());
 		ICompilationUnit cu = getCompilationUnit("/" + PROJECT + "/src/pack1/X.java");
 		parser.setSource(cu);
 		parser.setResolveBindings(true);
@@ -472,7 +477,7 @@
 		createFolder("/" + PROJECT + "/src/pack4");
 		createFile("/" + PROJECT + "/src/pack4/D1.java", contents);
 
-		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		ASTParser parser = ASTParser.newParser(getJLS8());
 		ICompilationUnit cu = getCompilationUnit("/" + PROJECT + "/src/pack1/X.java");
 		parser.setSource(cu);
 		parser.setResolveBindings(true);
@@ -526,7 +531,7 @@
 		createFolder("/" + PROJECT + "/src/pack2");
 		createFile("/" + PROJECT + "/src/pack2/B1.java", contents);
 
-		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		ASTParser parser = ASTParser.newParser(getJLS8());
 		ICompilationUnit cu = getCompilationUnit("/" + PROJECT + "/src/pack1/X.java");
 		parser.setSource(cu);
 		parser.setResolveBindings(true);
@@ -580,7 +585,7 @@
 		createFolder("/" + PROJECT + "/src/pack2");
 		createFile("/" + PROJECT + "/src/pack2/B.java", contents);
 
-		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		ASTParser parser = ASTParser.newParser(getJLS8());
 		ICompilationUnit cu = getCompilationUnit("/" + PROJECT + "/src/pack1/X.java");
 		parser.setSource(cu);
 		parser.setResolveBindings(true);
@@ -692,7 +697,7 @@
 				"}";
 		createFile("/" + PROJECT + "/src/pack2/Annot2.java", contents);
 
-		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		ASTParser parser = ASTParser.newParser(getJLS8());
 		ICompilationUnit cu = getCompilationUnit("/" + PROJECT + "/src/pack1/X.java");
 		parser.setSource(cu);
 		parser.setResolveBindings(true);
@@ -780,7 +785,7 @@
 		createFile("/" + PROJECT + "/src/pack1/X.java", contents);
 
 		ICompilationUnit cu = getCompilationUnit("/" + PROJECT + "/src/pack1/X.java");
-		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		ASTParser parser = ASTParser.newParser(getJLS8());
 		parser.setSource(cu);
 		parser.setResolveBindings(true);
 		parser.setStatementsRecovery(true);
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ImportRewriteTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ImportRewriteTest.java
index 1aae1d6..7877192 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ImportRewriteTest.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ImportRewriteTest.java
@@ -4956,7 +4956,7 @@
 				"}\n";
 		ICompilationUnit cu = pack1.createCompilationUnit("X.java", contents, false, null);
 
-		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		ASTParser parser = ASTParser.newParser(AST_INTERNAL_JLS9);
 		parser.setSource(cu);
 		parser.setResolveBindings(true);
 		parser.setStatementsRecovery(true);
@@ -4981,7 +4981,7 @@
 				"}\n";
 		ICompilationUnit cu = pack1.createCompilationUnit("X.java", contents, false, null);
 
-		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		ASTParser parser = ASTParser.newParser(AST_INTERNAL_JLS9);
 		parser.setSource(cu);
 		parser.setResolveBindings(true);
 		parser.setStatementsRecovery(true);
diff --git a/org.eclipse.jdt.core.tests.model/workspace/ConvertToModule/.classpath b/org.eclipse.jdt.core.tests.model/workspace/ConvertToModule/.classpath
new file mode 100644
index 0000000..b4fec06
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/ConvertToModule/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="jdt.test"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-9"/>
+	<classpathentry kind="lib" path="m1.jar"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.jdt.core.tests.model/workspace/ConvertToModule/.project b/org.eclipse.jdt.core.tests.model/workspace/ConvertToModule/.project
new file mode 100644
index 0000000..21de489
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/ConvertToModule/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>ConvertToModule</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>
diff --git a/org.eclipse.jdt.core.tests.model/workspace/ConvertToModule/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jdt.core.tests.model/workspace/ConvertToModule/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..a698e59
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/ConvertToModule/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,12 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/org.eclipse.jdt.core.tests.model/workspace/ConvertToModule/jdt.test/Dummy.java b/org.eclipse.jdt.core.tests.model/workspace/ConvertToModule/jdt.test/Dummy.java
new file mode 100644
index 0000000..b458dbd
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/ConvertToModule/jdt.test/Dummy.java
@@ -0,0 +1,4 @@
+
+public class Dummy {
+
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/ConvertToModule/jdt.test/org/eclipse/jdt/test/Bar.java b/org.eclipse.jdt.core.tests.model/workspace/ConvertToModule/jdt.test/org/eclipse/jdt/test/Bar.java
new file mode 100644
index 0000000..baf2102
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/ConvertToModule/jdt.test/org/eclipse/jdt/test/Bar.java
@@ -0,0 +1,35 @@
+package org.eclipse.jdt.test;
+
+import java.awt.Graphics;
+import java.awt.Image;
+import java.awt.image.ImageObserver;
+import java.awt.image.ImageProducer;
+
+public class Bar extends Image {
+
+	@Override
+	public Graphics getGraphics() {
+		return null;
+	}
+
+	@Override
+	public int getHeight(ImageObserver arg0) {
+		return 0;
+	}
+
+	@Override
+	public Object getProperty(String arg0, ImageObserver arg1) {
+		return null;
+	}
+
+	@Override
+	public ImageProducer getSource() {
+		return null;
+	}
+
+	@Override
+	public int getWidth(ImageObserver arg0) {
+		return 0;
+	}
+	
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/ConvertToModule/jdt.test/org/eclipse/test/Foo.java b/org.eclipse.jdt.core.tests.model/workspace/ConvertToModule/jdt.test/org/eclipse/test/Foo.java
new file mode 100644
index 0000000..26c5424
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/ConvertToModule/jdt.test/org/eclipse/test/Foo.java
@@ -0,0 +1,12 @@
+package org.eclipse.test;
+
+import java.net.ConnectException;
+import java.sql.Connection;
+
+public class Foo {
+	Connection con = null;
+	public void foo1() throws ConnectException {
+	}
+	public void foo2() throws java.rmi.ConnectException {
+	}
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/Converter9/.classpath b/org.eclipse.jdt.core.tests.model/workspace/Converter9/.classpath
new file mode 100644
index 0000000..3522bc0
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/Converter9/.classpath
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="var" path="CONVERTER_JCL18_LIB" sourcepath="CONVERTER_JCL18_SRC" rootpath="CONVERTER_JCL_SRCROOT"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.jdt.core.tests.model/workspace/Converter9/.project b/org.eclipse.jdt.core.tests.model/workspace/Converter9/.project
new file mode 100644
index 0000000..dc2a4b9
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/Converter9/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>Converter9</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>
diff --git a/org.eclipse.jdt.core.tests.model/workspace/Converter9/src/testBug497719_001/X.java b/org.eclipse.jdt.core.tests.model/workspace/Converter9/src/testBug497719_001/X.java
new file mode 100644
index 0000000..634d21b
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/Converter9/src/testBug497719_001/X.java
@@ -0,0 +1,19 @@
+package testBug497719_001;
+public class X {
+
+    public void foo() throws Exception {
+         final Y y1 = new Y();
+         try (final Y y = new Y(); y1; final Y y2 = new Y()) { 
+        	 //
+         }
+    } 
+    public static void main(String[] args) {
+		System.out.println("Done");
+	}
+}
+class Y implements AutoCloseable {
+    @Override
+    public void close() throws Exception {
+            // nothing
+    }
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/ExternalAnnotations9/Test2/.classpath b/org.eclipse.jdt.core.tests.model/workspace/ExternalAnnotations9/Test2/.classpath
new file mode 100644
index 0000000..611bff8
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/ExternalAnnotations9/Test2/.classpath
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.core.tests.model.TEST_CONTAINER">
+		<attributes>
+			<attribute name="annotationpath" value="annots"/>
+		</attributes>
+	</classpathentry> 
+	<classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.jdt.core.tests.model/workspace/ExternalAnnotations9/Test2/.project b/org.eclipse.jdt.core.tests.model/workspace/ExternalAnnotations9/Test2/.project
new file mode 100644
index 0000000..1b369ff
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/ExternalAnnotations9/Test2/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>Test2</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>
diff --git a/org.eclipse.jdt.core.tests.model/workspace/ExternalAnnotations9/Test2/annots/java/util/Map.eea b/org.eclipse.jdt.core.tests.model/workspace/ExternalAnnotations9/Test2/annots/java/util/Map.eea
new file mode 100644
index 0000000..bf24983
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/ExternalAnnotations9/Test2/annots/java/util/Map.eea
@@ -0,0 +1,4 @@
+class java/util/Map
+get
+ (Ljava/lang/Object;)TV;
+ (Ljava/lang/Object;)T0V;
diff --git a/org.eclipse.jdt.core.tests.model/workspace/ExternalAnnotations9/Test2/src/test1/Test1.java b/org.eclipse.jdt.core.tests.model/workspace/ExternalAnnotations9/Test2/src/test1/Test1.java
new file mode 100644
index 0000000..a2da2b3
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/ExternalAnnotations9/Test2/src/test1/Test1.java
@@ -0,0 +1,13 @@
+package test1;
+
+import java.util.Map;
+import org.eclipse.jdt.annotation.NonNullByDefault; // note: if org.eclipse.jdt.annotation.* was used, no problem appeared
+
+@NonNullByDefault
+public class Test1 {
+	void test(Map<String,Test1> map, String key) {
+		Test1 v = map.get(key);
+		if (v == null)
+			throw new RuntimeException(); // should not be reported as dead code, although V is a '@NonNull Test1'
+	}
+}
\ No newline at end of file
diff --git a/org.eclipse.jdt.core.tests.model/workspace/Formatter/test506430/A_in.java b/org.eclipse.jdt.core.tests.model/workspace/Formatter/test506430/A_in.java
new file mode 100644
index 0000000..1ee3375
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/Formatter/test506430/A_in.java
@@ -0,0 +1,13 @@
+module aaaaaaaaaa.bbbbbbbbbb{
+  requires aaaaaaaaaa.cccccccccc; // a      comment
+  requires transitive aaaaaaaaaa
+      .dddddddddd;
+  requires static aaaaaaaaaa.eeeeeeeeee;
+  requires transitive static aaaaaaaaaa.ffffffffff.ggggggggg.hhhhhhhhhh.iiiiiiiiii;
+  exports aaaaaaaaaa.jjjjjjjjjj;
+  exports aaaaaaaaaa.kkkkkkkkkk to aaaaaaaaaa.llllllllll, aaaaaaaaaa.mmmmmmmmmm, aaaaaaaaaa.nnnnnnnnnn;
+  opens aaaaaaaaaa.oooooooooo;
+  opens aaaaaaaaaa.pppppppppp to aaaaaaaaaa.qqqqqqqqqq;
+  uses aaaaaaaaaa.ssssssssss;
+  provides aaaaaaaaaa.tttttttttt with aaaaaaaaaa.uuuuuuuuuu, aaaaaaaaaa.vvvvvvvvvv;
+}
\ No newline at end of file
diff --git a/org.eclipse.jdt.core.tests.model/workspace/Formatter/test506430/A_out.java b/org.eclipse.jdt.core.tests.model/workspace/Formatter/test506430/A_out.java
new file mode 100644
index 0000000..2fc184a
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/Formatter/test506430/A_out.java
@@ -0,0 +1,18 @@
+module aaaaaaaaaa.bbbbbbbbbb {
+	requires aaaaaaaaaa.cccccccccc; // a comment
+	requires transitive aaaaaaaaaa.dddddddddd;
+	requires static aaaaaaaaaa.eeeeeeeeee;
+	requires transitive static aaaaaaaaaa.ffffffffff.ggggggggg.hhhhhhhhhh.iiiiiiiiii;
+
+	exports aaaaaaaaaa.jjjjjjjjjj;
+	exports aaaaaaaaaa.kkkkkkkkkk to aaaaaaaaaa.llllllllll,
+			aaaaaaaaaa.mmmmmmmmmm, aaaaaaaaaa.nnnnnnnnnn;
+
+	opens aaaaaaaaaa.oooooooooo;
+	opens aaaaaaaaaa.pppppppppp to aaaaaaaaaa.qqqqqqqqqq;
+
+	uses aaaaaaaaaa.ssssssssss;
+
+	provides aaaaaaaaaa.tttttttttt
+			with aaaaaaaaaa.uuuuuuuuuu, aaaaaaaaaa.vvvvvvvvvv;
+}
\ No newline at end of file
diff --git a/org.eclipse.jdt.core.tests.model/workspace/Formatter/test506430/B_in.java b/org.eclipse.jdt.core.tests.model/workspace/Formatter/test506430/B_in.java
new file mode 100644
index 0000000..1ee3375
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/Formatter/test506430/B_in.java
@@ -0,0 +1,13 @@
+module aaaaaaaaaa.bbbbbbbbbb{
+  requires aaaaaaaaaa.cccccccccc; // a      comment
+  requires transitive aaaaaaaaaa
+      .dddddddddd;
+  requires static aaaaaaaaaa.eeeeeeeeee;
+  requires transitive static aaaaaaaaaa.ffffffffff.ggggggggg.hhhhhhhhhh.iiiiiiiiii;
+  exports aaaaaaaaaa.jjjjjjjjjj;
+  exports aaaaaaaaaa.kkkkkkkkkk to aaaaaaaaaa.llllllllll, aaaaaaaaaa.mmmmmmmmmm, aaaaaaaaaa.nnnnnnnnnn;
+  opens aaaaaaaaaa.oooooooooo;
+  opens aaaaaaaaaa.pppppppppp to aaaaaaaaaa.qqqqqqqqqq;
+  uses aaaaaaaaaa.ssssssssss;
+  provides aaaaaaaaaa.tttttttttt with aaaaaaaaaa.uuuuuuuuuu, aaaaaaaaaa.vvvvvvvvvv;
+}
\ No newline at end of file
diff --git a/org.eclipse.jdt.core.tests.model/workspace/Formatter/test506430/B_out.java b/org.eclipse.jdt.core.tests.model/workspace/Formatter/test506430/B_out.java
new file mode 100644
index 0000000..ed4da95
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/Formatter/test506430/B_out.java
@@ -0,0 +1,34 @@
+module aaaaaaaaaa.bbbbbbbbbb
+{
+
+
+
+requires aaaaaaaaaa.cccccccccc; // a comment
+
+requires transitive aaaaaaaaaa.dddddddddd;
+
+requires static aaaaaaaaaa.eeeeeeeeee;
+
+requires transitive static aaaaaaaaaa.ffffffffff.ggggggggg.hhhhhhhhhh.iiiiiiiiii;
+
+
+exports aaaaaaaaaa.jjjjjjjjjj;
+
+exports aaaaaaaaaa.kkkkkkkkkk to
+		aaaaaaaaaa.llllllllll ,
+		aaaaaaaaaa.mmmmmmmmmm ,
+		aaaaaaaaaa.nnnnnnnnnn;
+
+
+opens aaaaaaaaaa.oooooooooo;
+
+opens aaaaaaaaaa.pppppppppp to aaaaaaaaaa.qqqqqqqqqq;
+
+
+uses aaaaaaaaaa.ssssssssss;
+
+
+provides aaaaaaaaaa.tttttttttt with
+		aaaaaaaaaa.uuuuuuuuuu ,
+		aaaaaaaaaa.vvvvvvvvvv;
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test014/X_out.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test014/X_out.java
index 8fe5cec..70e34ab 100644
--- a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test014/X_out.java
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test014/X_out.java
@@ -1,6 +1,6 @@
 public class X {
 	public void value() {
 		Object o = @Marker int.class;
-		Object o2 = @Marker int @Marker [][] @Marker [].class;
+		Object o2 = @Marker int @Marker[][]@Marker[].class;
 	}
 }
diff --git a/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.a.callable/.classpath b/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.a.callable/.classpath
new file mode 100644
index 0000000..f5a4681
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.a.callable/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-9"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.a.callable/.gitignore b/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.a.callable/.gitignore
new file mode 100644
index 0000000..ae3c172
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.a.callable/.gitignore
@@ -0,0 +1 @@
+/bin/
diff --git a/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.a.callable/.project b/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.a.callable/.project
new file mode 100644
index 0000000..653dc7b
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.a.callable/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>bundle.test.a.callable</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>
diff --git a/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.a.callable/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.a.callable/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..2d81990
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.a.callable/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=9
+org.eclipse.jdt.core.compiler.compliance=9
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=9
diff --git a/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.a.callable/.settings/org.eclipse.pde.core.prefs b/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.a.callable/.settings/org.eclipse.pde.core.prefs
new file mode 100644
index 0000000..f29e940
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.a.callable/.settings/org.eclipse.pde.core.prefs
@@ -0,0 +1,3 @@
+eclipse.preferences.version=1
+pluginProject.extensions=false
+resolve.requirebundle=false
diff --git a/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.a.callable/META-INF/MANIFEST.MF b/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.a.callable/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..ee09002
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.a.callable/META-INF/MANIFEST.MF
@@ -0,0 +1,7 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Runnable
+Bundle-SymbolicName: bundle.test.a.callable
+Bundle-Version: 1.0.0.qualifier
+Bundle-RequiredExecutionEnvironment: JavaSE-9
+Export-Package: bundle.test.a.callable
diff --git a/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.a.callable/build.properties b/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.a.callable/build.properties
new file mode 100644
index 0000000..34d2e4d
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.a.callable/build.properties
@@ -0,0 +1,4 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .
diff --git a/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.a.callable/src/bundle/test/a/callable/ACallable.java b/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.a.callable/src/bundle/test/a/callable/ACallable.java
new file mode 100644
index 0000000..1e4c16a
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.a.callable/src/bundle/test/a/callable/ACallable.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package bundle.test.a.callable;
+
+import java.util.concurrent.Callable;
+
+public class ACallable implements Callable<String> {
+
+	@Override
+	public String call() {
+		return getClass().getSimpleName() + " is running.";
+	}
+
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.a.callable/src/module-info.java b/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.a.callable/src/module-info.java
new file mode 100644
index 0000000..f0e5b54
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.a.callable/src/module-info.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+module bundle.test.a.callable {
+
+	requires java.base;
+	exports bundle.test.a.callable;
+}
\ No newline at end of file
diff --git a/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.a/.classpath b/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.a/.classpath
new file mode 100644
index 0000000..8a2634e
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.a/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-9"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.MODULE_PATH"/>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.a/.gitignore b/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.a/.gitignore
new file mode 100644
index 0000000..ae3c172
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.a/.gitignore
@@ -0,0 +1 @@
+/bin/
diff --git a/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.a/.project b/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.a/.project
new file mode 100644
index 0000000..0690f1d
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.a/.project
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>bundle.test.a</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ds.core.builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.eclipse.pde.PluginNature</nature>
+	</natures>
+</projectDescription>
diff --git a/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.a/.settings/org.eclipse.core.resources.prefs b/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.a/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..99f26c0
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.a/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.a/.settings/org.eclipse.core.runtime.prefs b/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.a/.settings/org.eclipse.core.runtime.prefs
new file mode 100644
index 0000000..5a0ad22
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.a/.settings/org.eclipse.core.runtime.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+line.separator=\n
diff --git a/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.a/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.a/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..7e5c907
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.a/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=9
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=9
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=9
diff --git a/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.a/.settings/org.eclipse.pde.core.prefs b/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.a/.settings/org.eclipse.pde.core.prefs
new file mode 100644
index 0000000..f29e940
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.a/.settings/org.eclipse.pde.core.prefs
@@ -0,0 +1,3 @@
+eclipse.preferences.version=1
+pluginProject.extensions=false
+resolve.requirebundle=false
diff --git a/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.a/META-INF/MANIFEST.MF b/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.a/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..9fd006d
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.a/META-INF/MANIFEST.MF
@@ -0,0 +1,10 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: A
+Bundle-SymbolicName: bundle.test.a
+Bundle-Version: 1.0.0.qualifier
+Bundle-RequiredExecutionEnvironment: JavaSE-9
+Import-Package: bundle.test.a.callable
+Export-Package: bundle.test.a
+Private-Package: bundle.test.a.internal
+Service-Component: component.xml
diff --git a/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.a/build.properties b/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.a/build.properties
new file mode 100644
index 0000000..dafca8f
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.a/build.properties
@@ -0,0 +1,5 @@
+output.. = bin/
+bin.includes = META-INF/,\
+               .,\
+               component.xml
+source.. = src/
diff --git a/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.a/component.xml b/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.a/component.xml
new file mode 100644
index 0000000..e94a24e
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.a/component.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" activate="start" deactivate="stop" name="bundle.test.a">
+   <implementation class="bundle.test.a.internal.Activator"/>
+</scr:component>
diff --git a/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.a/src/bundle/test/a/A.java b/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.a/src/bundle/test/a/A.java
new file mode 100644
index 0000000..e83f2e0
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.a/src/bundle/test/a/A.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package bundle.test.a;
+
+public class A {
+
+}
\ No newline at end of file
diff --git a/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.a/src/bundle/test/a/ACallableFactory.java b/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.a/src/bundle/test/a/ACallableFactory.java
new file mode 100644
index 0000000..cb32037
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.a/src/bundle/test/a/ACallableFactory.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package bundle.test.a;
+
+import java.util.concurrent.Callable;
+
+import bundle.test.a.callable.ACallable;
+
+public class ACallableFactory {
+	public Callable<String> createCallable() {
+		return new ACallable();
+	}
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.a/src/bundle/test/a/internal/Activator.java b/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.a/src/bundle/test/a/internal/Activator.java
new file mode 100644
index 0000000..48bdd63
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.a/src/bundle/test/a/internal/Activator.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package bundle.test.a.internal;
+
+public class Activator {
+
+	public void start() {
+		System.out.println(getClass().getCanonicalName() + " from->" + getClass().getModule());
+	}
+
+	public void stop() {
+	}
+
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.a/src/module-info.java b/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.a/src/module-info.java
new file mode 100644
index 0000000..2624ac6
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.a/src/module-info.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+module bundle.test.a {
+	requires java.base;
+	requires bundle.test.a.callable;
+	exports bundle.test.a;
+}
\ No newline at end of file
diff --git a/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.b/.classpath b/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.b/.classpath
new file mode 100644
index 0000000..8a2634e
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.b/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-9"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.MODULE_PATH"/>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.b/.gitignore b/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.b/.gitignore
new file mode 100644
index 0000000..ae3c172
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.b/.gitignore
@@ -0,0 +1 @@
+/bin/
diff --git a/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.b/.project b/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.b/.project
new file mode 100644
index 0000000..eda2046
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.b/.project
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>bundle.test.b</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ds.core.builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.eclipse.pde.PluginNature</nature>
+	</natures>
+</projectDescription>
diff --git a/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.b/.settings/org.eclipse.core.resources.prefs b/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.b/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..99f26c0
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.b/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.b/.settings/org.eclipse.core.runtime.prefs b/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.b/.settings/org.eclipse.core.runtime.prefs
new file mode 100644
index 0000000..5a0ad22
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.b/.settings/org.eclipse.core.runtime.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+line.separator=\n
diff --git a/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.b/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.b/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..7e5c907
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.b/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=9
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=9
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=9
diff --git a/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.b/.settings/org.eclipse.pde.core.prefs b/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.b/.settings/org.eclipse.pde.core.prefs
new file mode 100644
index 0000000..f29e940
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.b/.settings/org.eclipse.pde.core.prefs
@@ -0,0 +1,3 @@
+eclipse.preferences.version=1
+pluginProject.extensions=false
+resolve.requirebundle=false
diff --git a/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.b/META-INF/MANIFEST.MF b/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.b/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..e7dc706
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.b/META-INF/MANIFEST.MF
@@ -0,0 +1,10 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: A
+Bundle-SymbolicName: bundle.test.b
+Bundle-Version: 1.0.0.qualifier
+Bundle-RequiredExecutionEnvironment: JavaSE-9
+Export-Package: bundle.test.b; uses:="bundle.test.a"
+Require-Bundle: bundle.test.a; visibility:=reexport
+Private-Package: bundle.test.b.internal
+Service-Component: component.xml
diff --git a/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.b/build.properties b/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.b/build.properties
new file mode 100644
index 0000000..dafca8f
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.b/build.properties
@@ -0,0 +1,5 @@
+output.. = bin/
+bin.includes = META-INF/,\
+               .,\
+               component.xml
+source.. = src/
diff --git a/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.b/component.xml b/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.b/component.xml
new file mode 100644
index 0000000..0983520
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.b/component.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" activate="start" deactivate="stop" name="bundle.test.b">
+   <implementation class="bundle.test.b.internal.Activator"/>
+</scr:component>
diff --git a/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.b/src/bundle/test/b/B.java b/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.b/src/bundle/test/b/B.java
new file mode 100644
index 0000000..2ab7af9
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.b/src/bundle/test/b/B.java
@@ -0,0 +1,7 @@
+package bundle.test.b;
+
+import bundle.test.a.A;
+
+public class B extends A {
+
+}
\ No newline at end of file
diff --git a/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.b/src/bundle/test/b/internal/Activator.java b/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.b/src/bundle/test/b/internal/Activator.java
new file mode 100644
index 0000000..2d2101d
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.b/src/bundle/test/b/internal/Activator.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package bundle.test.b.internal;
+
+
+public class Activator {
+
+	public void start() {
+		System.out.println(getClass().getCanonicalName() + " from->" + getClass().getModule());
+	}
+
+	public void stop() {
+
+	}
+
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.b/src/module-info.java b/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.b/src/module-info.java
new file mode 100644
index 0000000..2d005d2
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/bug512053/bundle.test.b/src/module-info.java
@@ -0,0 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+module bundle.test.b {
+
+	requires java.base;
+	requires transitive bundle.test.a;
+	exports bundle.test.b;
+}
\ No newline at end of file
diff --git a/org.eclipse.jdt.core.tests.model/workspace/bug512053/jpms.test.a/.classpath b/org.eclipse.jdt.core.tests.model/workspace/bug512053/jpms.test.a/.classpath
new file mode 100644
index 0000000..780c3af
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/bug512053/jpms.test.a/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-9"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.MODULE_PATH"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.jdt.core.tests.model/workspace/bug512053/jpms.test.a/.gitignore b/org.eclipse.jdt.core.tests.model/workspace/bug512053/jpms.test.a/.gitignore
new file mode 100644
index 0000000..ae3c172
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/bug512053/jpms.test.a/.gitignore
@@ -0,0 +1 @@
+/bin/
diff --git a/org.eclipse.jdt.core.tests.model/workspace/bug512053/jpms.test.a/.project b/org.eclipse.jdt.core.tests.model/workspace/bug512053/jpms.test.a/.project
new file mode 100644
index 0000000..2ed8c2a
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/bug512053/jpms.test.a/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>jpms.test.a</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>
diff --git a/org.eclipse.jdt.core.tests.model/workspace/bug512053/jpms.test.a/.settings/org.eclipse.core.resources.prefs b/org.eclipse.jdt.core.tests.model/workspace/bug512053/jpms.test.a/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..99f26c0
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/bug512053/jpms.test.a/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/org.eclipse.jdt.core.tests.model/workspace/bug512053/jpms.test.a/.settings/org.eclipse.core.runtime.prefs b/org.eclipse.jdt.core.tests.model/workspace/bug512053/jpms.test.a/.settings/org.eclipse.core.runtime.prefs
new file mode 100644
index 0000000..5a0ad22
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/bug512053/jpms.test.a/.settings/org.eclipse.core.runtime.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+line.separator=\n
diff --git a/org.eclipse.jdt.core.tests.model/workspace/bug512053/jpms.test.a/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jdt.core.tests.model/workspace/bug512053/jpms.test.a/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..7e5c907
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/bug512053/jpms.test.a/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=9
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=9
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=9
diff --git a/org.eclipse.jdt.core.tests.model/workspace/bug512053/jpms.test.a/src/jpms/test/a/A.java b/org.eclipse.jdt.core.tests.model/workspace/bug512053/jpms.test.a/src/jpms/test/a/A.java
new file mode 100644
index 0000000..a435d9e
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/bug512053/jpms.test.a/src/jpms/test/a/A.java
@@ -0,0 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package jpms.test.a;
+
+public class A extends bundle.test.a.A {
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/bug512053/jpms.test.a/src/jpms/test/a/B.java b/org.eclipse.jdt.core.tests.model/workspace/bug512053/jpms.test.a/src/jpms/test/a/B.java
new file mode 100644
index 0000000..211d034
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/bug512053/jpms.test.a/src/jpms/test/a/B.java
@@ -0,0 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package jpms.test.a;
+
+public class B extends bundle.test.b.B {
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/bug512053/jpms.test.a/src/jpms/test/a/C.java b/org.eclipse.jdt.core.tests.model/workspace/bug512053/jpms.test.a/src/jpms/test/a/C.java
new file mode 100644
index 0000000..59ca78d
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/bug512053/jpms.test.a/src/jpms/test/a/C.java
@@ -0,0 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package jpms.test.a;
+
+public class C {
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/bug512053/jpms.test.a/src/jpms/test/a/TestFunction.java b/org.eclipse.jdt.core.tests.model/workspace/bug512053/jpms.test.a/src/jpms/test/a/TestFunction.java
new file mode 100644
index 0000000..c73351a
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/bug512053/jpms.test.a/src/jpms/test/a/TestFunction.java
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package jpms.test.a;
+
+import java.util.concurrent.Callable;
+import java.util.function.Function;
+
+public class TestFunction implements Function<String, Callable<String>> {
+
+	@SuppressWarnings("unchecked")
+	@Override
+	public Callable<String> apply(String clazz) {
+		try {
+			Class<?> c = Class.forName(clazz);
+			System.out.println("    SUCCESS: " + c + " from->" + c.getModule() + " SUPER: " + c.getSuperclass() + " from->" + c.getSuperclass().getModule());
+			Object obj = c.getConstructor().newInstance();
+			if (obj instanceof Callable) {
+				return (Callable<String>) obj;
+			}
+			return () -> obj.toString();
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+		throw new RuntimeException("FAILED: " + clazz);
+	}
+
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/bug512053/jpms.test.a/src/jpms/test/a/UseACallableFactory.java b/org.eclipse.jdt.core.tests.model/workspace/bug512053/jpms.test.a/src/jpms/test/a/UseACallableFactory.java
new file mode 100644
index 0000000..73eed7e
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/bug512053/jpms.test.a/src/jpms/test/a/UseACallableFactory.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package jpms.test.a;
+
+import java.lang.Module;
+import java.util.concurrent.Callable;
+
+import bundle.test.a.ACallableFactory;
+
+public class UseACallableFactory implements Callable<String> {
+
+	@Override
+	public String call() throws Exception {
+		Callable<String> callable = new ACallableFactory().createCallable();
+		Module thisModule = getClass().getModule();
+		Module callableModule = callable.getClass().getModule();
+		return callable.call() + " called from  '" + thisModule + "' " + thisModule + ".canRead(" + callableModule + "): " + thisModule.canRead(callableModule);
+	}
+
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/bug512053/jpms.test.a/src/module-info.java b/org.eclipse.jdt.core.tests.model/workspace/bug512053/jpms.test.a/src/module-info.java
new file mode 100644
index 0000000..662e391
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/bug512053/jpms.test.a/src/module-info.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+module jpms.test.a {
+	requires java.base;
+	requires bundle.test.b;
+	provides java.util.function.Function with jpms.test.a.TestFunction;
+}
\ No newline at end of file
diff --git a/org.eclipse.jdt.core.tests.model/workspace/bug512053/jpms.test.b/.classpath b/org.eclipse.jdt.core.tests.model/workspace/bug512053/jpms.test.b/.classpath
new file mode 100644
index 0000000..780c3af
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/bug512053/jpms.test.b/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-9"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.MODULE_PATH"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.jdt.core.tests.model/workspace/bug512053/jpms.test.b/.gitignore b/org.eclipse.jdt.core.tests.model/workspace/bug512053/jpms.test.b/.gitignore
new file mode 100644
index 0000000..ae3c172
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/bug512053/jpms.test.b/.gitignore
@@ -0,0 +1 @@
+/bin/
diff --git a/org.eclipse.jdt.core.tests.model/workspace/bug512053/jpms.test.b/.project b/org.eclipse.jdt.core.tests.model/workspace/bug512053/jpms.test.b/.project
new file mode 100644
index 0000000..e65138f
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/bug512053/jpms.test.b/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>jpms.test.b</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>
diff --git a/org.eclipse.jdt.core.tests.model/workspace/bug512053/jpms.test.b/.settings/org.eclipse.core.resources.prefs b/org.eclipse.jdt.core.tests.model/workspace/bug512053/jpms.test.b/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..99f26c0
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/bug512053/jpms.test.b/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/org.eclipse.jdt.core.tests.model/workspace/bug512053/jpms.test.b/.settings/org.eclipse.core.runtime.prefs b/org.eclipse.jdt.core.tests.model/workspace/bug512053/jpms.test.b/.settings/org.eclipse.core.runtime.prefs
new file mode 100644
index 0000000..5a0ad22
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/bug512053/jpms.test.b/.settings/org.eclipse.core.runtime.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+line.separator=\n
diff --git a/org.eclipse.jdt.core.tests.model/workspace/bug512053/jpms.test.b/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jdt.core.tests.model/workspace/bug512053/jpms.test.b/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..7e5c907
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/bug512053/jpms.test.b/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=9
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=9
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=9
diff --git a/org.eclipse.jdt.core.tests.model/workspace/bug512053/jpms.test.b/src/jpms/test/b/A.java b/org.eclipse.jdt.core.tests.model/workspace/bug512053/jpms.test.b/src/jpms/test/b/A.java
new file mode 100644
index 0000000..a4525f0
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/bug512053/jpms.test.b/src/jpms/test/b/A.java
@@ -0,0 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package jpms.test.b;
+
+public class A extends bundle.test.a.A {
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/bug512053/jpms.test.b/src/jpms/test/b/B.java b/org.eclipse.jdt.core.tests.model/workspace/bug512053/jpms.test.b/src/jpms/test/b/B.java
new file mode 100644
index 0000000..800127b
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/bug512053/jpms.test.b/src/jpms/test/b/B.java
@@ -0,0 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package jpms.test.b;
+
+public class B extends bundle.test.b.B {
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/bug512053/jpms.test.b/src/jpms/test/b/C.java b/org.eclipse.jdt.core.tests.model/workspace/bug512053/jpms.test.b/src/jpms/test/b/C.java
new file mode 100644
index 0000000..d2937f6
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/bug512053/jpms.test.b/src/jpms/test/b/C.java
@@ -0,0 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package jpms.test.b;
+
+public class C {
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/bug512053/jpms.test.b/src/jpms/test/b/TestFunction.java b/org.eclipse.jdt.core.tests.model/workspace/bug512053/jpms.test.b/src/jpms/test/b/TestFunction.java
new file mode 100644
index 0000000..ee81b52
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/bug512053/jpms.test.b/src/jpms/test/b/TestFunction.java
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package jpms.test.b;
+
+import java.util.concurrent.Callable;
+import java.util.function.Function;
+
+public class TestFunction implements Function<String, Callable<String>> {
+
+	@SuppressWarnings("unchecked")
+	@Override
+	public Callable<String> apply(String clazz) {
+		try {
+			Class<?> c = Class.forName(clazz);
+			System.out.println("    SUCCESS: " + c + " from->" + c.getModule() + " SUPER: " + c.getSuperclass() + " from->" + c.getSuperclass().getModule());
+			Object obj = c.getConstructor().newInstance();
+			if (obj instanceof Callable) {
+				return (Callable<String>) obj;
+			}
+			return () -> obj.toString();
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+		throw new RuntimeException("FAILED: " + clazz);
+	}
+
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/bug512053/jpms.test.b/src/jpms/test/b/UseACallableFactory.java b/org.eclipse.jdt.core.tests.model/workspace/bug512053/jpms.test.b/src/jpms/test/b/UseACallableFactory.java
new file mode 100644
index 0000000..79aa0e8
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/bug512053/jpms.test.b/src/jpms/test/b/UseACallableFactory.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package jpms.test.b;
+
+import java.lang.Module;
+import java.util.concurrent.Callable;
+
+import bundle.test.a.ACallableFactory;
+
+public class UseACallableFactory implements Callable<String> {
+
+	@Override
+	public String call() throws Exception {
+		Callable<String> callable = new ACallableFactory().createCallable();
+		Module thisModule = getClass().getModule();
+		Module callableModule = callable.getClass().getModule();
+		return callable.call() + " called from  '" + thisModule + "' " + thisModule + ".canRead(" + callableModule + "): " + thisModule.canRead(callableModule);
+	}
+
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/bug512053/jpms.test.b/src/module-info.java b/org.eclipse.jdt.core.tests.model/workspace/bug512053/jpms.test.b/src/module-info.java
new file mode 100644
index 0000000..ac9f0e8
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/bug512053/jpms.test.b/src/module-info.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+module jpms.test.b {
+	requires java.base;
+	requires bundle.test.b;
+	provides java.util.function.Function with jpms.test.b.TestFunction;
+}
\ No newline at end of file
diff --git a/org.eclipse.jdt.core.tests.model/workspace/test_automodules/.classpath b/org.eclipse.jdt.core.tests.model/workspace/test_automodules/.classpath
new file mode 100644
index 0000000..5425f9f
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/test_automodules/.classpath
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="lib" path="lib/junit.jar">
+		<attributes>
+			<attribute name="module" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.jdt.core.tests.model/workspace/test_automodules/.project b/org.eclipse.jdt.core.tests.model/workspace/test_automodules/.project
new file mode 100644
index 0000000..54c805e
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/test_automodules/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>test_automodules</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>
diff --git a/org.eclipse.jdt.core.tests.model/workspace/test_automodules/src/module-info.java b/org.eclipse.jdt.core.tests.model/workspace/test_automodules/src/module-info.java
new file mode 100644
index 0000000..483d5a1
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/test_automodules/src/module-info.java
@@ -0,0 +1,5 @@
+module test_automodules {
+
+	requires junit;
+
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/test_automodules/src/test_automodules/Test.java b/org.eclipse.jdt.core.tests.model/workspace/test_automodules/src/test_automodules/Test.java
new file mode 100644
index 0000000..27db2b2
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/test_automodules/src/test_automodules/Test.java
@@ -0,0 +1,9 @@
+package test_automodules;
+
+import org.junit.runners.JUnit4;
+
+public class Test {
+
+	JUnit4 runner = null;
+	
+}
\ No newline at end of file